Show
Ignore:
Timestamp:
04/23/09 21:12:23 (16 years ago)
Author:
smidl
Message:

doc

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • doc/html/pmsm_8h-source.html

    r312 r323  
    8585<a name="l00026"></a>00026 <span class="keyword">public</span>: 
    8686<a name="l00027"></a>00027         <a class="code" href="classIMpmsm.html" title="State evolution model for a PMSM drive and its derivative with respect to .">IMpmsm</a>() :<a class="code" href="classbdm_1_1diffbifn.html#92ff29d748e445b440453a38d0b09681" title="Default constructor (dimy is not set!).">diffbifn</a> ( ) {<a class="code" href="classbdm_1_1fnc.html#52156cb4a52a62d51fc7455985797a62" title="Length of the output vector.">dimy</a>=4; <a class="code" href="classbdm_1_1diffbifn.html#a193aa2c4a500139c0c4b669691e588e" title="cache for rvx.count()">dimx</a> = 4; <a class="code" href="classbdm_1_1diffbifn.html#30c45617eec89adeb4ebaa763d093fb0" title="cache for rvu.count()">dimu</a>=2;}; 
    87 <a name="l00029"></a><a class="code" href="classIMpmsm.html#42818f3426d99fecb7e97be8ffe2e228">00029</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;} 
     87<a name="l00029"></a><a class="code" href="classIMpmsm.html#14b18793a93617fe48cd8aa5d584906e">00029</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classIMpmsm.html#14b18793a93617fe48cd8aa5d584906e" 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;} 
    8888<a name="l00030"></a>00030  
    8989<a name="l00031"></a><a class="code" href="classIMpmsm.html#45785869d978dda42828a072ec2caebe">00031</a>         vec <a class="code" href="classIMpmsm.html#45785869d978dda42828a072ec2caebe" title="Evaluates .">eval</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0 ) { 
     
    134134<a name="l00076"></a>00076 }; 
    135135<a name="l00077"></a>00077  
    136 <a name="l00079"></a><a class="code" href="classIMpmsm2o.html">00079</a> <span class="keyword">class </span><a class="code" href="classIMpmsm2o.html" title="State evolution model for a PMSM drive and its derivative with respect to .">IMpmsm2o</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1diffbifn.html" title="Class representing a differentiable function of two variables .">diffbifn</a> { 
     136<a name="l00079"></a><a class="code" href="classIMpmsm2o.html">00079</a> <span class="keyword">class </span><a class="code" href="classIMpmsm2o.html" title="State evolution model for a PMSM drive and its derivative with respect to .">IMpmsm2o</a> : <span class="keyword">public</span> <a class="code" href="classIMpmsm.html" title="State evolution model for a PMSM drive and its derivative with respect to .">IMpmsm</a> { 
    137137<a name="l00080"></a>00080         <span class="keyword">protected</span>: 
    138 <a name="l00081"></a>00081                 <span class="keywordtype">double</span> Rs, Ls, dt, Ypm, kp, p,  J, Mz; 
    139 <a name="l00083"></a><a class="code" href="classIMpmsm2o.html#5b668744a1e5189f324897a62b9c3ea6">00083</a>                 <span class="keywordtype">double</span> <a class="code" href="classIMpmsm2o.html#5b668744a1e5189f324897a62b9c3ea6" title="store first derivatives for the use in second derivatives">dia</a>, dib, dom, dth; 
     138<a name="l00081"></a>00081 <span class="comment">//              double Rs, Ls, dt, Ypm, kp, p,  J, Mz;</span> 
     139<a name="l00083"></a><a class="code" href="classIMpmsm2o.html#5b668744a1e5189f324897a62b9c3ea6">00083</a> <span class="comment"></span>                <span class="keywordtype">double</span> <a class="code" href="classIMpmsm2o.html#5b668744a1e5189f324897a62b9c3ea6" title="store first derivatives for the use in second derivatives">dia</a>, dib, dom, dth; 
    140140<a name="l00085"></a><a class="code" href="classIMpmsm2o.html#74954dedce055db9ee50d53790e8341c">00085</a>                 <span class="keywordtype">double</span> <a class="code" href="classIMpmsm2o.html#74954dedce055db9ee50d53790e8341c" title="d2t = dt^2/2, cth = cos(th), sth=sin(th)">d2t</a>, cth, sth; 
    141141<a name="l00086"></a>00086                 <span class="keywordtype">double</span> iam, ibm, omm, thm, uam, ubm; 
    142142<a name="l00087"></a>00087         <span class="keyword">public</span>: 
    143 <a name="l00088"></a>00088                 <a class="code" href="classIMpmsm2o.html" title="State evolution model for a PMSM drive and its derivative with respect to .">IMpmsm2o</a>() :<a class="code" href="classbdm_1_1diffbifn.html" title="Class representing a differentiable function of two variables .">diffbifn</a> () {<a class="code" href="classbdm_1_1fnc.html#52156cb4a52a62d51fc7455985797a62" title="Length of the output vector.">dimy</a>=4;<a class="code" href="classbdm_1_1diffbifn.html#a193aa2c4a500139c0c4b669691e588e" title="cache for rvx.count()">dimx</a>=4;<a class="code" href="classbdm_1_1diffbifn.html#30c45617eec89adeb4ebaa763d093fb0" title="cache for rvu.count()">dimu</a>=2;}; 
     143<a name="l00088"></a>00088                 <a class="code" href="classIMpmsm2o.html" title="State evolution model for a PMSM drive and its derivative with respect to .">IMpmsm2o</a>() :<a class="code" href="classIMpmsm.html" title="State evolution model for a PMSM drive and its derivative with respect to .">IMpmsm</a> () {}; 
    144144<a name="l00090"></a><a class="code" href="classIMpmsm2o.html#abdefc0467678a05abf12f5c77eaf49d">00090</a>                 <span class="keywordtype">void</span> <a class="code" href="classIMpmsm2o.html#abdefc0467678a05abf12f5c77eaf49d" 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; <a class="code" href="classIMpmsm2o.html#74954dedce055db9ee50d53790e8341c" title="d2t = dt^2/2, cth = cos(th), sth=sin(th)">d2t</a>=dt*dt/2;} 
    145145<a name="l00091"></a>00091  
     
    165165<a name="l00111"></a>00111                         xk ( 1 ) = ibm + dt*dib;<span class="comment">// +d2t*d2ib;</span> 
    166166<a name="l00112"></a>00112                         xk ( 2 ) = omm +dt*dom;<span class="comment">// +d2t*d2om;</span> 
    167 <a name="l00113"></a>00113                         xk ( 3 ) = thm + dt*dth;<span class="comment">// +d2t*d2th; // &lt;0..2pi&gt;</span> 
     167<a name="l00113"></a>00113                         xk ( 3 ) = thm + dt*dth;<span class="comment">// +d2t*dom; // &lt;0..2pi&gt;</span> 
    168168<a name="l00114"></a>00114                          
    169169<a name="l00115"></a>00115                         <span class="keywordflow">if</span> ( xk ( 3 ) &gt;pi ) xk ( 3 )-=2*pi; 
     
    201201<a name="l00148"></a>00148                 <span class="comment">// d th</span> 
    202202<a name="l00149"></a>00149                         A ( 3,0 ) = 0.0; A ( 3,1 ) = 0.0; A ( 3,2 ) = dt; A ( 3,3 ) = 1.0; 
    203 <a name="l00150"></a>00150                 } 
    204 <a name="l00151"></a>00151  
    205 <a name="l00152"></a><a class="code" href="classIMpmsm2o.html#27f9d89bce832056f747d985df77a726">00152</a>                 <span class="keywordtype">void</span> <a class="code" href="classIMpmsm2o.html#27f9d89bce832056f747d985df77a726" title="Evaluates  and writes result into A .">dfdu_cond</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0, mat &amp;A, <span class="keywordtype">bool</span> full=<span class="keyword">true</span> ) {it_error ( <span class="stringliteral">"not needed"</span> );}; 
    206 <a name="l00153"></a>00153  
    207 <a name="l00154"></a>00154 }; 
    208 <a name="l00155"></a>00155  
    209 <a name="l00157"></a><a class="code" href="classIMpmsmStat.html">00157</a> <span class="keyword">class </span><a class="code" href="classIMpmsmStat.html" title="State evolution model for a PMSM drive and its derivative with respect to , equation...">IMpmsmStat</a> : <span class="keyword">public</span> <a class="code" href="classIMpmsm.html" title="State evolution model for a PMSM drive and its derivative with respect to .">IMpmsm</a> { 
    210 <a name="l00158"></a>00158         <span class="keyword">public</span>: 
    211 <a name="l00159"></a>00159         <a class="code" href="classIMpmsmStat.html" title="State evolution model for a PMSM drive and its derivative with respect to , equation...">IMpmsmStat</a>() :<a class="code" href="classIMpmsm.html" title="State evolution model for a PMSM drive and its derivative with respect to .">IMpmsm</a>() {}; 
    212 <a name="l00161"></a><a class="code" href="classIMpmsmStat.html#6379210623a2d353d42bfc87ccbd4384">00161</a>         <span class="keywordtype">void</span> <a class="code" href="classIMpmsmStat.html#6379210623a2d353d42bfc87ccbd4384" 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;} 
    213 <a name="l00162"></a>00162  
    214 <a name="l00163"></a><a class="code" href="classIMpmsmStat.html#5ed3582c2c0edb0753387a82598f8d21">00163</a>         vec <a class="code" href="classIMpmsmStat.html#5ed3582c2c0edb0753387a82598f8d21" title="Evaluates .">eval</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0 ) { 
    215 <a name="l00164"></a>00164                 <span class="comment">// last state</span> 
    216 <a name="l00165"></a>00165                 <span class="keywordtype">double</span> iam = x0 ( 0 ); 
    217 <a name="l00166"></a>00166                 <span class="keywordtype">double</span> ibm = x0 ( 1 ); 
    218 <a name="l00167"></a>00167                 <span class="keywordtype">double</span> omm = x0 ( 2 ); 
    219 <a name="l00168"></a>00168                 <span class="keywordtype">double</span> thm = x0 ( 3 ); 
    220 <a name="l00169"></a>00169                 <span class="keywordtype">double</span> uam = u0 ( 0 ); 
    221 <a name="l00170"></a>00170                 <span class="keywordtype">double</span> ubm = u0 ( 1 ); 
    222 <a name="l00171"></a>00171  
    223 <a name="l00172"></a>00172                 vec xk=zeros ( 4 ); 
    224 <a name="l00173"></a>00173                 <span class="comment">//ia</span> 
    225 <a name="l00174"></a>00174                 xk ( 0 ) = ( 1.0- Rs/Ls*dt ) * iam + Ypm/Ls*dt*omm * sin ( thm ) + uam*dt/Ls; 
    226 <a name="l00175"></a>00175                 <span class="comment">//ib</span> 
    227 <a name="l00176"></a>00176                 xk ( 1 ) = ( 1.0- Rs/Ls*dt ) * ibm - Ypm/Ls*dt*omm * cos ( thm ) + ubm*dt/Ls; 
    228 <a name="l00177"></a>00177                 <span class="comment">//om</span> 
    229 <a name="l00178"></a>00178                 xk ( 2 ) = omm;<span class="comment">// + kp*p*p * Ypm/J*dt* ( ibm * cos ( thm )-iam * sin ( thm ) ) - p/J*dt*Mz;</span> 
    230 <a name="l00179"></a>00179                 <span class="comment">//th</span> 
    231 <a name="l00180"></a>00180                 xk ( 3 ) = rem(thm + omm*dt,2*pi); <span class="comment">// &lt;0..2pi&gt;</span> 
    232 <a name="l00181"></a>00181                 <span class="keywordflow">return</span> xk; 
    233 <a name="l00182"></a>00182         } 
    234 <a name="l00183"></a>00183  
    235 <a name="l00184"></a><a class="code" href="classIMpmsmStat.html#29a9c09fd328e89748d9be0801e84831">00184</a>         <span class="keywordtype">void</span> <a class="code" href="classIMpmsmStat.html#29a9c09fd328e89748d9be0801e84831" title="Evaluates  and writes result into A .">dfdx_cond</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0, mat &amp;A, <span class="keywordtype">bool</span> full=<span class="keyword">true</span> ) { 
    236 <a name="l00185"></a>00185 <span class="comment">//              double iam = x0 ( 0 );</span> 
    237 <a name="l00186"></a>00186 <span class="comment">//              double ibm = x0 ( 1 );</span> 
    238 <a name="l00187"></a>00187                 <span class="keywordtype">double</span> omm = x0 ( 2 ); 
    239 <a name="l00188"></a>00188                 <span class="keywordtype">double</span> thm = x0 ( 3 ); 
    240 <a name="l00189"></a>00189                 <span class="comment">// d ia</span> 
    241 <a name="l00190"></a>00190                 A ( 0,0 ) = ( 1.0- Rs/Ls*dt ); A ( 0,1 ) = 0.0; 
    242 <a name="l00191"></a>00191                 A ( 0,2 ) = Ypm/Ls*dt* sin ( thm ); A ( 0,3 ) = Ypm/Ls*dt*omm * ( cos ( thm ) ); 
    243 <a name="l00192"></a>00192                 <span class="comment">// d ib</span> 
    244 <a name="l00193"></a>00193                 A ( 1,0 ) = 0.0 ; A ( 1,1 ) = ( 1.0- Rs/Ls*dt ); 
    245 <a name="l00194"></a>00194                 A ( 1,2 ) = -Ypm/Ls*dt* cos ( thm ); A ( 1,3 ) = Ypm/Ls*dt*omm * ( sin ( thm ) ); 
    246 <a name="l00195"></a>00195                 <span class="comment">// d om</span> 
    247 <a name="l00196"></a>00196                 A ( 2,0 ) = 0.0;<span class="comment">//kp*p*p * Ypm/J*dt* ( - sin ( thm ) );</span> 
    248 <a name="l00197"></a>00197                 A ( 2,1 ) = 0.0;<span class="comment">//kp*p*p * Ypm/J*dt* ( cos ( thm ) );</span> 
    249 <a name="l00198"></a>00198                 A ( 2,2 ) = 1.0; 
    250 <a name="l00199"></a>00199                 A ( 2,3 ) = 0.0;<span class="comment">//kp*p*p * Ypm/J*dt* ( -ibm * sin ( thm )-iam * cos ( thm ) );</span> 
    251 <a name="l00200"></a>00200                 <span class="comment">// d th</span> 
    252 <a name="l00201"></a>00201                 A ( 3,0 ) = 0.0; A ( 3,1 ) = 0.0; A ( 3,2 ) = dt; A ( 3,3 ) = 1.0; 
    253 <a name="l00202"></a>00202         } 
    254 <a name="l00203"></a>00203  
    255 <a name="l00204"></a><a class="code" href="classIMpmsmStat.html#ff740ee20100ae2a2d03a2538638f8e8">00204</a>         <span class="keywordtype">void</span> <a class="code" href="classIMpmsmStat.html#ff740ee20100ae2a2d03a2538638f8e8" title="Evaluates  and writes result into A .">dfdu_cond</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0, mat &amp;A, <span class="keywordtype">bool</span> full=<span class="keyword">true</span> ) {it_error ( <span class="stringliteral">"not needed"</span> );}; 
    256 <a name="l00205"></a>00205  
    257 <a name="l00206"></a>00206 }; 
    258 <a name="l00207"></a>00207  
    259 <a name="l00209"></a><a class="code" href="classOMpmsm.html">00209</a> <span class="keyword">class </span><a class="code" href="classOMpmsm.html" title="Observation model for PMSM drive and its derivative with respect to .">OMpmsm</a>: <span class="keyword">public</span> <a class="code" href="classbdm_1_1diffbifn.html" title="Class representing a differentiable function of two variables .">diffbifn</a> { 
    260 <a name="l00210"></a>00210 <span class="keyword">public</span>: 
    261 <a name="l00211"></a>00211         <a class="code" href="classOMpmsm.html" title="Observation model for PMSM drive and its derivative with respect to .">OMpmsm</a>() :<a class="code" href="classbdm_1_1diffbifn.html#92ff29d748e445b440453a38d0b09681" title="Default constructor (dimy is not set!).">diffbifn</a> () {<a class="code" href="classbdm_1_1fnc.html#52156cb4a52a62d51fc7455985797a62" title="Length of the output vector.">dimy</a>=2;<a class="code" href="classbdm_1_1diffbifn.html#a193aa2c4a500139c0c4b669691e588e" title="cache for rvx.count()">dimx</a>=4;<a class="code" href="classbdm_1_1diffbifn.html#30c45617eec89adeb4ebaa763d093fb0" title="cache for rvu.count()">dimu</a>=2;}; 
     203<a name="l00150"></a>00150                         <span class="comment">// FOR d2t*dom!!!!!!!!!</span> 
     204<a name="l00151"></a>00151 <span class="comment">/*                      A ( 3,0 ) = dt* kp*p*p * Ypm/J*dt* ( - sin ( thm ) );</span> 
     205<a name="l00152"></a>00152 <span class="comment">                        A ( 3,1 ) = dt* kp*p*p * Ypm/J*dt* ( cos ( thm ) );</span> 
     206<a name="l00153"></a>00153 <span class="comment">                        A ( 3,2 ) = dt;</span> 
     207<a name="l00154"></a>00154 <span class="comment">                        A ( 3,3 ) = 1.0 + dt* kp*p*p * Ypm/J*dt* ( -ibm * sin ( thm )-iam * cos ( thm ) );*/</span> 
     208<a name="l00155"></a>00155                 } 
     209<a name="l00156"></a>00156  
     210<a name="l00157"></a><a class="code" href="classIMpmsm2o.html#27f9d89bce832056f747d985df77a726">00157</a>                 <span class="keywordtype">void</span> <a class="code" href="classIMpmsm2o.html#27f9d89bce832056f747d985df77a726" title="Evaluates  and writes result into A .">dfdu_cond</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0, mat &amp;A, <span class="keywordtype">bool</span> full=<span class="keyword">true</span> ) {it_error ( <span class="stringliteral">"not needed"</span> );}; 
     211<a name="l00158"></a>00158  
     212<a name="l00159"></a>00159 }; 
     213<a name="l00160"></a>00160  
     214<a name="l00162"></a><a class="code" href="classIMpmsmStat.html">00162</a> <span class="keyword">class </span><a class="code" href="classIMpmsmStat.html" title="State evolution model for a PMSM drive and its derivative with respect to , equation...">IMpmsmStat</a> : <span class="keyword">public</span> <a class="code" href="classIMpmsm.html" title="State evolution model for a PMSM drive and its derivative with respect to .">IMpmsm</a> { 
     215<a name="l00163"></a>00163         <span class="keyword">public</span>: 
     216<a name="l00164"></a>00164         <a class="code" href="classIMpmsmStat.html" title="State evolution model for a PMSM drive and its derivative with respect to , equation...">IMpmsmStat</a>() :<a class="code" href="classIMpmsm.html" title="State evolution model for a PMSM drive and its derivative with respect to .">IMpmsm</a>() {}; 
     217<a name="l00166"></a><a class="code" href="classIMpmsmStat.html#6379210623a2d353d42bfc87ccbd4384">00166</a>         <span class="keywordtype">void</span> <a class="code" href="classIMpmsmStat.html#6379210623a2d353d42bfc87ccbd4384" 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;} 
     218<a name="l00167"></a>00167  
     219<a name="l00168"></a><a class="code" href="classIMpmsmStat.html#5ed3582c2c0edb0753387a82598f8d21">00168</a>         vec <a class="code" href="classIMpmsmStat.html#5ed3582c2c0edb0753387a82598f8d21" title="Evaluates .">eval</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0 ) { 
     220<a name="l00169"></a>00169                 <span class="comment">// last state</span> 
     221<a name="l00170"></a>00170                 <span class="keywordtype">double</span> iam = x0 ( 0 ); 
     222<a name="l00171"></a>00171                 <span class="keywordtype">double</span> ibm = x0 ( 1 ); 
     223<a name="l00172"></a>00172                 <span class="keywordtype">double</span> omm = x0 ( 2 ); 
     224<a name="l00173"></a>00173                 <span class="keywordtype">double</span> thm = x0 ( 3 ); 
     225<a name="l00174"></a>00174                 <span class="keywordtype">double</span> uam = u0 ( 0 ); 
     226<a name="l00175"></a>00175                 <span class="keywordtype">double</span> ubm = u0 ( 1 ); 
     227<a name="l00176"></a>00176  
     228<a name="l00177"></a>00177                 vec xk=zeros ( 4 ); 
     229<a name="l00178"></a>00178                 <span class="comment">//ia</span> 
     230<a name="l00179"></a>00179                 xk ( 0 ) = ( 1.0- Rs/Ls*dt ) * iam + Ypm/Ls*dt*omm * sin ( thm ) + uam*dt/Ls; 
     231<a name="l00180"></a>00180                 <span class="comment">//ib</span> 
     232<a name="l00181"></a>00181                 xk ( 1 ) = ( 1.0- Rs/Ls*dt ) * ibm - Ypm/Ls*dt*omm * cos ( thm ) + ubm*dt/Ls; 
     233<a name="l00182"></a>00182                 <span class="comment">//om</span> 
     234<a name="l00183"></a>00183                 xk ( 2 ) = omm;<span class="comment">// + kp*p*p * Ypm/J*dt* ( ibm * cos ( thm )-iam * sin ( thm ) ) - p/J*dt*Mz;</span> 
     235<a name="l00184"></a>00184                 <span class="comment">//th</span> 
     236<a name="l00185"></a>00185                 xk ( 3 ) = rem(thm + omm*dt,2*pi); <span class="comment">// &lt;0..2pi&gt;</span> 
     237<a name="l00186"></a>00186                 <span class="keywordflow">return</span> xk; 
     238<a name="l00187"></a>00187         } 
     239<a name="l00188"></a>00188  
     240<a name="l00189"></a><a class="code" href="classIMpmsmStat.html#29a9c09fd328e89748d9be0801e84831">00189</a>         <span class="keywordtype">void</span> <a class="code" href="classIMpmsmStat.html#29a9c09fd328e89748d9be0801e84831" title="Evaluates  and writes result into A .">dfdx_cond</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0, mat &amp;A, <span class="keywordtype">bool</span> full=<span class="keyword">true</span> ) { 
     241<a name="l00190"></a>00190 <span class="comment">//              double iam = x0 ( 0 );</span> 
     242<a name="l00191"></a>00191 <span class="comment">//              double ibm = x0 ( 1 );</span> 
     243<a name="l00192"></a>00192                 <span class="keywordtype">double</span> omm = x0 ( 2 ); 
     244<a name="l00193"></a>00193                 <span class="keywordtype">double</span> thm = x0 ( 3 ); 
     245<a name="l00194"></a>00194                 <span class="comment">// d ia</span> 
     246<a name="l00195"></a>00195                 A ( 0,0 ) = ( 1.0- Rs/Ls*dt ); A ( 0,1 ) = 0.0; 
     247<a name="l00196"></a>00196                 A ( 0,2 ) = Ypm/Ls*dt* sin ( thm ); A ( 0,3 ) = Ypm/Ls*dt*omm * ( cos ( thm ) ); 
     248<a name="l00197"></a>00197                 <span class="comment">// d ib</span> 
     249<a name="l00198"></a>00198                 A ( 1,0 ) = 0.0 ; A ( 1,1 ) = ( 1.0- Rs/Ls*dt ); 
     250<a name="l00199"></a>00199                 A ( 1,2 ) = -Ypm/Ls*dt* cos ( thm ); A ( 1,3 ) = Ypm/Ls*dt*omm * ( sin ( thm ) ); 
     251<a name="l00200"></a>00200                 <span class="comment">// d om</span> 
     252<a name="l00201"></a>00201                 A ( 2,0 ) = 0.0;<span class="comment">//kp*p*p * Ypm/J*dt* ( - sin ( thm ) );</span> 
     253<a name="l00202"></a>00202                 A ( 2,1 ) = 0.0;<span class="comment">//kp*p*p * Ypm/J*dt* ( cos ( thm ) );</span> 
     254<a name="l00203"></a>00203                 A ( 2,2 ) = 1.0; 
     255<a name="l00204"></a>00204                 A ( 2,3 ) = 0.0;<span class="comment">//kp*p*p * Ypm/J*dt* ( -ibm * sin ( thm )-iam * cos ( thm ) );</span> 
     256<a name="l00205"></a>00205                 <span class="comment">// d th</span> 
     257<a name="l00206"></a>00206                 A ( 3,0 ) = 0.0; A ( 3,1 ) = 0.0; A ( 3,2 ) = dt; A ( 3,3 ) = 1.0; 
     258<a name="l00207"></a>00207         } 
     259<a name="l00208"></a>00208  
     260<a name="l00209"></a><a class="code" href="classIMpmsmStat.html#ff740ee20100ae2a2d03a2538638f8e8">00209</a>         <span class="keywordtype">void</span> <a class="code" href="classIMpmsmStat.html#ff740ee20100ae2a2d03a2538638f8e8" title="Evaluates  and writes result into A .">dfdu_cond</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0, mat &amp;A, <span class="keywordtype">bool</span> full=<span class="keyword">true</span> ) {it_error ( <span class="stringliteral">"not needed"</span> );}; 
     261<a name="l00210"></a>00210  
     262<a name="l00211"></a>00211 }; 
    262263<a name="l00212"></a>00212  
    263 <a name="l00213"></a><a class="code" href="classOMpmsm.html#8e32392c9c635584606287b8c0e8c9da">00213</a>         vec <a class="code" href="classOMpmsm.html#8e32392c9c635584606287b8c0e8c9da" title="Evaluates .">eval</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0 ) { 
    264 <a name="l00214"></a>00214                 vec y ( 2 ); 
    265 <a name="l00215"></a>00215                 y ( 0 ) = x0 ( 0 ); 
    266 <a name="l00216"></a>00216                 y ( 1 ) = x0 ( 1 ); 
    267 <a name="l00217"></a>00217                 <span class="keywordflow">return</span> y; 
    268 <a name="l00218"></a>00218         } 
    269 <a name="l00219"></a>00219  
    270 <a name="l00220"></a><a class="code" href="classOMpmsm.html#b75b5fd55b2ac5ed74b5b953af122821">00220</a>         <span class="keywordtype">void</span> <a class="code" href="classOMpmsm.html#b75b5fd55b2ac5ed74b5b953af122821" title="Evaluates  and writes result into A .">dfdx_cond</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0, mat &amp;A, <span class="keywordtype">bool</span> full=<span class="keyword">true</span> ) { 
    271 <a name="l00221"></a>00221                 A.clear(); 
    272 <a name="l00222"></a>00222                 A ( 0,0 ) = 1.0; 
    273 <a name="l00223"></a>00223                 A ( 1,1 ) = 1.0; 
    274 <a name="l00224"></a>00224         } 
    275 <a name="l00225"></a>00225 }; 
    276 <a name="l00226"></a>00226  
    277 <a name="l00228"></a>00228 <span class="preprocessor">#endif //PMSM_H</span> 
     264<a name="l00214"></a><a class="code" href="classOMpmsm.html">00214</a> <span class="keyword">class </span><a class="code" href="classOMpmsm.html" title="Observation model for PMSM drive and its derivative with respect to .">OMpmsm</a>: <span class="keyword">public</span> <a class="code" href="classbdm_1_1diffbifn.html" title="Class representing a differentiable function of two variables .">diffbifn</a> { 
     265<a name="l00215"></a>00215 <span class="keyword">public</span>: 
     266<a name="l00216"></a>00216         <a class="code" href="classOMpmsm.html" title="Observation model for PMSM drive and its derivative with respect to .">OMpmsm</a>() :<a class="code" href="classbdm_1_1diffbifn.html#92ff29d748e445b440453a38d0b09681" title="Default constructor (dimy is not set!).">diffbifn</a> () {<a class="code" href="classbdm_1_1fnc.html#52156cb4a52a62d51fc7455985797a62" title="Length of the output vector.">dimy</a>=2;<a class="code" href="classbdm_1_1diffbifn.html#a193aa2c4a500139c0c4b669691e588e" title="cache for rvx.count()">dimx</a>=4;<a class="code" href="classbdm_1_1diffbifn.html#30c45617eec89adeb4ebaa763d093fb0" title="cache for rvu.count()">dimu</a>=2;}; 
     267<a name="l00217"></a>00217  
     268<a name="l00218"></a><a class="code" href="classOMpmsm.html#8e32392c9c635584606287b8c0e8c9da">00218</a>         vec <a class="code" href="classOMpmsm.html#8e32392c9c635584606287b8c0e8c9da" title="Evaluates .">eval</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0 ) { 
     269<a name="l00219"></a>00219                 vec y ( 2 ); 
     270<a name="l00220"></a>00220                 y ( 0 ) = x0 ( 0 ); 
     271<a name="l00221"></a>00221                 y ( 1 ) = x0 ( 1 ); 
     272<a name="l00222"></a>00222                 <span class="keywordflow">return</span> y; 
     273<a name="l00223"></a>00223         } 
     274<a name="l00224"></a>00224  
     275<a name="l00225"></a><a class="code" href="classOMpmsm.html#b75b5fd55b2ac5ed74b5b953af122821">00225</a>         <span class="keywordtype">void</span> <a class="code" href="classOMpmsm.html#b75b5fd55b2ac5ed74b5b953af122821" title="Evaluates  and writes result into A .">dfdx_cond</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0, mat &amp;A, <span class="keywordtype">bool</span> full=<span class="keyword">true</span> ) { 
     276<a name="l00226"></a>00226                 A.clear(); 
     277<a name="l00227"></a>00227                 A ( 0,0 ) = 1.0; 
     278<a name="l00228"></a>00228                 A ( 1,1 ) = 1.0; 
     279<a name="l00229"></a>00229         } 
     280<a name="l00230"></a>00230 }; 
     281<a name="l00231"></a>00231  
     282<a name="l00233"></a>00233 <span class="preprocessor">#endif //PMSM_H</span> 
    278283</pre></div></div> 
    279 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 9 14:33:20 2009 for mixpp by&nbsp; 
     284<hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 23 21:06:42 2009 for mixpp by&nbsp; 
    280285<a href="http://www.doxygen.org/index.html"> 
    281286<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>