Changeset 91 for doc/html/pmsm_8h-source.html
- Timestamp:
- 04/30/08 15:20:07 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
doc/html/pmsm_8h-source.html
r79 r91 5 5 <link href="tabs.css" rel="stylesheet" type="text/css"> 6 6 </head><body> 7 <!-- Generated by Doxygen 1.5.3 --> 8 <div class="tabs"> 9 <ul> 10 <li><a href="index.html"><span>Main Page</span></a></li> 11 <li><a href="annotated.html"><span>Classes</span></a></li> 12 <li class="current"><a href="files.html"><span>Files</span></a></li> 13 <li><a href="pages.html"><span>Related Pages</span></a></li> 14 </ul> 15 </div> 7 <!-- Generated by Doxygen 1.5.5 --> 8 <div class="navigation" id="top"> 9 <div class="tabs"> 10 <ul> 11 <li><a href="index.html"><span>Main Page</span></a></li> 12 <li><a href="pages.html"><span>Related Pages</span></a></li> 13 <li><a href="annotated.html"><span>Classes</span></a></li> 14 <li class="current"><a href="files.html"><span>Files</span></a></li> 15 </ul> 16 </div> 16 17 <h1>work/mixpp/pmsm/pmsm.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef PMSM_H</span> 17 18 <a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define PMSM_H</span> … … 30 31 <a name="l00015"></a>00015 }; 31 32 <a name="l00016"></a>00016 32 <a name="l00018"></a><a class="code" href="classIMpmsm.html">00018</a> <span class="keyword">class </span><a class="code" href="classIMpmsm.html" title="State evolution model for a PMSM drive and its derivative with respect to $x$.">IMpmsm</a> : <span class="keyword">public</span> <a class="code" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$.">diffbifn</a> {33 <a name="l00018"></a><a class="code" href="classIMpmsm.html">00018</a> <span class="keyword">class </span><a class="code" href="classIMpmsm.html" title="State evolution model for a PMSM drive and its derivative with respect to $x$.">IMpmsm</a> : <span class="keyword">public</span> <a class="code" href="classdiffbifn.html" title="Class representing a differentiable function of two variables .">diffbifn</a> { 33 34 <a name="l00019"></a>00019 <span class="keyword">protected</span>: 34 35 <a name="l00020"></a>00020 <span class="keywordtype">double</span> Rs, Ls, dt, Ypm, kp, p, J, Mz; 35 36 <a name="l00021"></a>00021 36 37 <a name="l00022"></a>00022 <span class="keyword">public</span>: 37 <a name="l00023"></a>00023 <a class="code" href="classIMpmsm.html" title="State evolution model for a PMSM drive and its derivative with respect to $x$.">IMpmsm</a>() :<a class="code" href="classdiffbifn.html#797772c0d5aab8ddccec19dfe4bb2d77" title="Default constructor (dimy is not set!).">diffbifn</a> (rx.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return length (number of scalars) ofthe RV.">count</a>(), rx, ru ) {};38 <a name="l00023"></a>00023 <a class="code" href="classIMpmsm.html" title="State evolution model for a PMSM drive and its derivative with respect to $x$.">IMpmsm</a>() :<a class="code" href="classdiffbifn.html#797772c0d5aab8ddccec19dfe4bb2d77" title="Default constructor (dimy is not set!).">diffbifn</a> (rx.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>(), rx, ru ) {}; 38 39 <a name="l00025"></a><a class="code" href="classIMpmsm.html#42818f3426d99fecb7e97be8ffe2e228">00025</a> <span class="keywordtype">void</span> <a class="code" href="classIMpmsm.html#42818f3426d99fecb7e97be8ffe2e228" title="Set mechanical and electrical variables.">set_parameters</a> ( <span class="keywordtype">double</span> Rs0, <span class="keywordtype">double</span> Ls0, <span class="keywordtype">double</span> dt0, <span class="keywordtype">double</span> Ypm0, <span class="keywordtype">double</span> kp0, <span class="keywordtype">double</span> p0, <span class="keywordtype">double</span> J0, <span class="keywordtype">double</span> Mz0 ) {Rs=Rs0; Ls=Ls0; dt=dt0; Ypm=Ypm0; kp=kp0; p=p0; J=J0; Mz=Mz0;} 39 40 <a name="l00026"></a>00026 40 <a name="l00027"></a><a class="code" href="classIMpmsm.html#45785869d978dda42828a072ec2caebe">00027</a> vec <a class="code" href="classIMpmsm.html#45785869d978dda42828a072ec2caebe" title="Evaluates $f(x0,u0)$.">eval</a> ( <span class="keyword">const</span> vec &x0, <span class="keyword">const</span> vec &u0 ) {41 <a name="l00027"></a><a class="code" href="classIMpmsm.html#45785869d978dda42828a072ec2caebe">00027</a> vec <a class="code" href="classIMpmsm.html#45785869d978dda42828a072ec2caebe" title="Evaluates .">eval</a> ( <span class="keyword">const</span> vec &x0, <span class="keyword">const</span> vec &u0 ) { 41 42 <a name="l00028"></a>00028 <span class="comment">// last state</span> 42 43 <a name="l00029"></a>00029 <span class="keywordtype">double</span> iam = x0 ( 0 ); … … 89 90 <a name="l00077"></a>00077 <span class="keywordtype">void</span> <a class="code" href="classIMpmsm.html#42818f3426d99fecb7e97be8ffe2e228" title="Set mechanical and electrical variables.">set_parameters</a> ( <span class="keywordtype">double</span> Rs0, <span class="keywordtype">double</span> Ls0, <span class="keywordtype">double</span> dt0, <span class="keywordtype">double</span> Ypm0, <span class="keywordtype">double</span> kp0, <span class="keywordtype">double</span> p0, <span class="keywordtype">double</span> J0, <span class="keywordtype">double</span> Mz0 ) {Rs=Rs0; Ls=Ls0; dt=dt0; Ypm=Ypm0; kp=kp0; p=p0; J=J0; Mz=Mz0;} 90 91 <a name="l00078"></a>00078 91 <a name="l00079"></a>00079 vec <a class="code" href="classIMpmsm.html#45785869d978dda42828a072ec2caebe" title="Evaluates $f(x0,u0)$.">eval</a> ( <span class="keyword">const</span> vec &x0, <span class="keyword">const</span> vec &u0 ) {92 <a name="l00079"></a>00079 vec <a class="code" href="classIMpmsm.html#45785869d978dda42828a072ec2caebe" title="Evaluates .">eval</a> ( <span class="keyword">const</span> vec &x0, <span class="keyword">const</span> vec &u0 ) { 92 93 <a name="l00080"></a>00080 <span class="comment">// last state</span> 93 94 <a name="l00081"></a>00081 <span class="keywordtype">double</span> iam = x0 ( 0 ); … … 111 112 <a name="l00099"></a>00099 112 113 <a name="l00100"></a>00100 <span class="keywordtype">void</span> <a class="code" href="classIMpmsm.html#b4378b5d3bf64c683e4cf5c5f1cd56f1" title="Evaluates and writes result into A .">dfdx_cond</a> ( <span class="keyword">const</span> vec &x0, <span class="keyword">const</span> vec &u0, mat &A, <span class="keywordtype">bool</span> full=<span class="keyword">true</span> ) { 113 <a name="l00101"></a>00101 <span class="keywordtype">double</span> iam = x0 ( 0 );114 <a name="l00102"></a>00102 <span class="keywordtype">double</span> ibm = x0 ( 1 );114 <a name="l00101"></a>00101 <span class="comment">// double iam = x0 ( 0 );</span> 115 <a name="l00102"></a>00102 <span class="comment">// double ibm = x0 ( 1 );</span> 115 116 <a name="l00103"></a>00103 <span class="keywordtype">double</span> omm = x0 ( 2 ); 116 117 <a name="l00104"></a>00104 <span class="keywordtype">double</span> thm = x0 ( 3 ); … … 134 135 <a name="l00122"></a>00122 }; 135 136 <a name="l00123"></a>00123 136 <a name="l00125"></a><a class="code" href="classOMpmsm.html">00125</a> <span class="keyword">class </span><a class="code" href="classOMpmsm.html" title="Observation model for PMSM drive and its derivative with respect to $x$.">OMpmsm</a>: <span class="keyword">public</span> <a class="code" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$.">diffbifn</a> {137 <a name="l00125"></a><a class="code" href="classOMpmsm.html">00125</a> <span class="keyword">class </span><a class="code" href="classOMpmsm.html" title="Observation model for PMSM drive and its derivative with respect to $x$.">OMpmsm</a>: <span class="keyword">public</span> <a class="code" href="classdiffbifn.html" title="Class representing a differentiable function of two variables .">diffbifn</a> { 137 138 <a name="l00126"></a>00126 <span class="keyword">public</span>: 138 139 <a name="l00127"></a>00127 <a class="code" href="classOMpmsm.html" title="Observation model for PMSM drive and its derivative with respect to $x$.">OMpmsm</a>() :<a class="code" href="classdiffbifn.html#797772c0d5aab8ddccec19dfe4bb2d77" title="Default constructor (dimy is not set!).">diffbifn</a> (2, rx,ru ) {}; 139 140 <a name="l00128"></a>00128 140 <a name="l00129"></a><a class="code" href="classOMpmsm.html#8e32392c9c635584606287b8c0e8c9da">00129</a> vec <a class="code" href="classOMpmsm.html#8e32392c9c635584606287b8c0e8c9da" title="Evaluates $f(x0,u0)$.">eval</a> ( <span class="keyword">const</span> vec &x0, <span class="keyword">const</span> vec &u0 ) {141 <a name="l00129"></a><a class="code" href="classOMpmsm.html#8e32392c9c635584606287b8c0e8c9da">00129</a> vec <a class="code" href="classOMpmsm.html#8e32392c9c635584606287b8c0e8c9da" title="Evaluates .">eval</a> ( <span class="keyword">const</span> vec &x0, <span class="keyword">const</span> vec &u0 ) { 141 142 <a name="l00130"></a>00130 vec y ( 2 ); 142 143 <a name="l00131"></a>00131 y ( 0 ) = x0 ( 0 ); … … 153 154 <a name="l00142"></a>00142 154 155 <a name="l00143"></a>00143 <span class="preprocessor">#endif //PMSM_H</span> 155 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Fri Apr 18 11:15:15 2008 for mixpp by 156 </pre></div></div> 157 <hr size="1"><address style="text-align: right;"><small>Generated on Tue Apr 29 20:46:25 2008 for mixpp by 156 158 <a href="http://www.doxygen.org/index.html"> 157 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5. 3</small></address>159 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> 158 160 </body> 159 161 </html>