<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Module 9: Position Observer (Part 2/2) in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/1346729#M6534</link>
    <description>&lt;P&gt;Thanks for the update and quick reply. I'll be sure to&amp;nbsp;&lt;A href="https://www.tellthebell.run/" target="_self"&gt;&lt;SPAN&gt;tellthebell&lt;/SPAN&gt; &amp;nbsp;&lt;/A&gt;keep an eye on this thread.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Sep 2021 03:47:10 GMT</pubDate>
    <dc:creator>Robert7288</dc:creator>
    <dc:date>2021-09-28T03:47:10Z</dc:date>
    <item>
      <title>Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748340#M1768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="info" __jive_macro_name="alert" alert="info" class="jive_text_macro jive_macro_alert"&gt;&lt;P&gt;The first part of this article can be found here:&amp;nbsp;&lt;A href="https://community.nxp.com/thread/477109" rel="noopener noreferrer" target="_blank"&gt;Module 9: Position Observer (Part 1/2)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; color: #333399; font-weight: bold;"&gt;&lt;STRONG&gt;2.2 Modelling the RL circuit used to predict the currents&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;As we learned from the DC motor back-EMF estimation exercise, in order to be able to predict these&amp;nbsp;two back-EMF components&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Eγ and Eδ we need a way to predict the current iγ and iδ using a mathematical model of the PMSM. The key of back-EMF&amp;nbsp;estimator is to create a closed&amp;nbsp;loop system consisting of a model of R-L circuit which represents the motor&amp;nbsp;winding and a&amp;nbsp;PI controller with an output referring to the back-EMF&amp;nbsp;signals.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;In case of Fig. 2 we have used a basic first order transfer function to simulate the RL circuit in continuous time domain but now since we are dealing with a model that needs to be computed at each FOC sample loop, we need to find a suitable model that can be implemented on the MCU.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;Starting from Eq. 15, lets start to write the equations for the predicted currents in&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;γδ&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp;axes. First lets get rid of the matrix from and write them as a system of equations:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="" style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #ffffff; font-weight: inherit; margin: 0px 0px 2px;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="border: inherit solid inherit; padding: 5px;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;IMG alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61621i1BFBB288290105B2/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: inherit solid inherit; padding: 5px;"&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="border: 0px; font-weight: inherit; text-align: right;"&gt;&lt;SPAN style="color: #333333;"&gt;Eq. 16&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;Now, lets transform the Eq. 16 from s-domain to time-domain using Inverse Laplace transformation:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="" style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #ffffff; font-weight: inherit; margin: 0px 0px 2px;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="border: inherit solid inherit; padding: 5px;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;IMG alt="pastedImage_5.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61622i6B5FACED4ED43498/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_5.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: inherit solid inherit; padding: 5px;"&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="border: 0px; font-weight: inherit; text-align: right;"&gt;&lt;SPAN style="color: #333333;"&gt;Eq. 17&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;If we rearrange the Eq. 18 in order to highlight the derivative terms for each current in&amp;nbsp;&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;γδ axes we will obtain a system of differential equations:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="" style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #ffffff; font-weight: inherit; margin: 0px 0px 2px;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="border: inherit solid inherit; padding: 5px;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_6.png"&gt;&lt;IMG alt="pastedImage_6.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61623i847A3C1499D0655B/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_6.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: inherit solid inherit; padding: 5px;"&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="border: 0px; font-weight: inherit; text-align: right;"&gt;&lt;SPAN style="color: #333333;"&gt;Eq. 18&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; color: #333333;"&gt;Is case you are interested to do the math and solve these 2 equations, then you will obtained the PMSM motor model as:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="" style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #ffffff; font-weight: inherit; margin: 0px 0px 2px;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="padding: 5px; width: 87.7387%;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;IMG alt="pastedImage_3.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61624iF4C78C2C65EA292A/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_3.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 5px; width: 8.26131%;"&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #333333;"&gt;Eq. 19&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;All inputs and outputs of the&amp;nbsp;Eq. 19 are limited to the fractional range (-1,1) and the&amp;nbsp;&amp;nbsp;incorrect setting of the scaling constants may lead to an undesirable overflow or&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;saturation during the computations.&amp;nbsp;Scaling constants must be positive values equal to or greater than the expected maxima of&amp;nbsp;the corresponding physical quantities. The following scaling constants are applied to the&amp;nbsp;back-EMF estimator coefficients:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #008000;"&gt;% Scaling constants&lt;/SPAN&gt;
&lt;SPAN style="color: #008000;"&gt;% (to be set according to known maxima)&lt;/SPAN&gt;
Imax =&amp;nbsp; 31.25;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;% maximum stator phase current [A]&lt;/SPAN&gt;
Umax =&amp;nbsp; 12.00;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;% maximum stator phase voltage [V]&lt;/SPAN&gt;
Wmax =&amp;nbsp;&amp;nbsp; 1047;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;% maximum angular velocity [rad/s]&lt;/SPAN&gt;
Emax =&amp;nbsp; 12.00;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;% maximum backEMF [V]&lt;/SPAN&gt;&lt;SPAN class="" style="border-width: 0px 1px 0px 0px; border-style: initial solid initial initial; border-color: initial #999999 initial initial; font-weight: inherit;"&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;The constants used in Eq. 19 are computed starting from motor parameters:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #008000;"&gt;% Motor parameters&lt;/SPAN&gt;
&lt;SPAN style="color: #008000;"&gt;% (to be set according to measurements)&lt;/SPAN&gt;
Ld = 0.000375;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;% inductance in d-axis [H]&lt;/SPAN&gt;
Lq = 0.000435;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;% inductance in q-axis [H]&lt;/SPAN&gt;
Rs = 0.56;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;% resistance of one stator phase [ohms]&lt;/SPAN&gt;
PP = 2;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;% number of pole-pairs&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE __default_attr="warning" __jive_macro_name="alert" alert="warning" class="jive_text_macro jive_macro_alert"&gt;&lt;SPAN style="color: #333333;"&gt;Before using the back-EMF&amp;nbsp;estimator&amp;nbsp;with a particular motor,&amp;nbsp;you&amp;nbsp;need to provide a set of coefficients.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;The following script snippet shows how to compute these parameters automatically if the motor parameters are known.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #008000;"&gt;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;/SPAN&gt;
&lt;SPAN style="color: #008000;"&gt;% Virtual RL circuit parameters&lt;/SPAN&gt;
&lt;SPAN style="color: #008000;"&gt;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;/SPAN&gt;
maxCoeffRL = max(abs([Ts/(2*Ld+Ts*Rs)*Umax/Imax,...
&amp;nbsp;&amp;nbsp;&amp;nbsp; Ts*Lq/(2*Ld+Ts*Rs)*Wmax,...
&amp;nbsp;&amp;nbsp;&amp;nbsp; Ts/(2*Ld+Ts*Rs)*Emax/Imax]));
NShiftRL = ceil(log2(maxCoeffRL));
if (NShiftRL &amp;lt; -14)
&amp;nbsp;&amp;nbsp;&amp;nbsp; NShiftRL = -14;
end
if (NShiftRL &amp;gt; 14)
&amp;nbsp;&amp;nbsp;&amp;nbsp; error('Inputted parameters cannot be used - s16Shift exceeds 14');
end

&lt;SPAN style="color: #008000;"&gt;%current gain&lt;/SPAN&gt;
f16IGain = (2*Ld-Ts*Rs)/(2*Ld+Ts*Rs);
f16IGain = round(f16IGain * 2^15);
f16IGain(f16IGain &amp;lt; -(2^15)) = -(2^15);
f16IGain(f16IGain &amp;gt; (2^15)-1) = (2^15)-1;

&lt;SPAN style="color: #008000;"&gt;%voltage gain&lt;/SPAN&gt;
f16UGain = Ts/(2*Ld+Ts*Rs)*Umax/Imax*2^-NShiftRL;
f16UGain = round(f16UGain * 2^15);
f16UGain(f16UGain &amp;lt; -(2^15)) = -(2^15);
f16UGain(f16UGain &amp;gt; (2^15)-1) = (2^15)-1;

&lt;SPAN style="color: #008000;"&gt;%speed x current gain&lt;/SPAN&gt;
f16WIGain = Ts*Lq/(2*Ld+Ts*Rs)*Wmax*2^-NShiftRL;
f16WIGain = round(f16WIGain * 2^15);
f16WIGain(f16WIGain &amp;lt; -(2^15)) = -(2^15);
f16WIGain(f16WIGain &amp;gt; (2^15)-1) = (2^15)-1;

&lt;SPAN style="color: #008000;"&gt;%back-EMF gain&lt;/SPAN&gt;
f16EGain = Ts/(2*Ld+Ts*Rs)*Emax/Imax*2^-NShiftRL;
f16EGain = round(f16EGain * 2^15);
f16EGain(f16EGain &amp;lt; -(2^15)) = -(2^15);
f16EGain(f16EGain &amp;gt; (2^15)-1) = (2^15)-1;

disp(['f16IGain = ' num2str(f16IGain) ';'])
disp(['f16UGain = ' num2str(f16UGain) ';'])
disp(['f16WIGain = ' num2str(f16WIGain) ';'])
disp(['f16EGain = ' num2str(f16EGain) ';'])
disp(['s16Shift = ' num2str(NShiftRL) ';'])&lt;SPAN class="" style="border-width: 0px 1px 0px 0px; border-style: initial solid initial initial; border-color: initial #999999 initial initial; font-weight: inherit;"&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;The Simulink model used to implement the Eq. 19 is shown below:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="" style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #ffffff; font-weight: inherit; margin: 0px 0px 2px;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="font-weight: inherit; height: 604px;"&gt;&lt;TD style="padding: 5px; height: 604px;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_13.png"&gt;&lt;IMG alt="pastedImage_13.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61625i3BF1E4DFEA4F5973/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_13.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="font-weight: inherit; height: 24px;"&gt;&lt;TD style="padding: 5px; text-align: center; height: 24px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; color: #333333; font-size: 12px;"&gt;Fig. 12:&amp;nbsp;RL circuit implementation used to predict the current in&amp;nbsp;γδ axes&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #ffffff; font-weight: inherit; margin: 0px 0px 2px;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="border: inherit solid inherit; padding: 5px;"&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_14.png"&gt;&lt;IMG alt="pastedImage_14.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61626i58BE42C22442B6F7/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_14.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_15.png"&gt;&lt;IMG alt="pastedImage_15.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61627i9FB86F6DBCEAC00F/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_15.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="padding: 5px; text-align: center;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; color: #333333; font-size: 12px;"&gt;Fig. 13: Implementation details for each of the gamma and delta axis based on Eq. 19&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;In order to check the accuracy of the predictions using this RL model lets compare the measured currents in dq frame with the predicted currents in&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;γδ quasi-synchronous frame.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="" style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #ffffff; font-weight: inherit; margin: 0px 0px 2px;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="padding: 5px; text-align: center;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_16.png"&gt;&lt;IMG alt="pastedImage_16.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61628iA31510AE0FA612C0/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_16.png" /&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_17.png"&gt;&lt;IMG alt="pastedImage_17.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61629i421D1850216C805E/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_17.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="padding: 5px; text-align: center;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Fig. 14: On the&amp;nbsp;left hand side are the dq measured currents, while on the right hand side are the predicted currents using Eq. 19&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #333333;"&gt;At this point we have all the quantities we need to extract the rotor position information, therefore lets now talk about the actual back-EMF estimator.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; color: #000080; font-weight: bold;"&gt;&lt;STRONG&gt;2.3&amp;nbsp;back-EMF Estimator&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;The back-EMF estimator is formed in both of&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;γδ&lt;/SPAN&gt;&amp;nbsp;axes and the resulting θerr is later on extracted from the division Eγ/Eδ. If we assume sufficient rotor speed to create back-EMF then,&amp;nbsp;the result of the&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Eγ/Eδ&amp;nbsp;&lt;/SPAN&gt;division is insensitive to the actual level of back-EMF. This allows correct setup&amp;nbsp;of the PI controllers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;The PI controllers (one for each of the gamma and delta axes) coefficients can be easy computed as shown before using the root-locus method. All you need to do is to set&amp;nbsp;ξ (the current loop attenuation), and ω0 (the current loop natural frequency)&amp;nbsp;and the easiest way for choosing those coefficients&amp;nbsp;is to use same&amp;nbsp;values chosen for the FOC current&amp;nbsp;loop controllers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;The following code snipped can be used to compute automatically the controller parameters.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #008000;"&gt;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;/SPAN&gt;
&lt;SPAN style="color: #008000;"&gt;% backEMF Observer parameters&lt;/SPAN&gt;
&lt;SPAN style="color: #008000;"&gt;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;/SPAN&gt;
&lt;SPAN style="color: #008000;"&gt;% (to be set according to the chosen control system dynamics)&lt;/SPAN&gt;
Ts = 1e-4;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;% sampling period [s]&lt;/SPAN&gt;
i_Ksi = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;% current loop attenuation&lt;/SPAN&gt;
i_fo = 300;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;% current loop natural frequency [Hz]&lt;/SPAN&gt;
i_wo = 2*pi*i_fo;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;% current loop natural angular frequency [rad/s]&lt;/SPAN&gt;
Kp = 2*i_Ksi*i_wo*Ld-Rs;
Ki = i_wo^2*Ld;

&lt;SPAN style="color: #008000;"&gt;% PIr controller parameters for backEMF observers&lt;/SPAN&gt;
maxCoeff = max(abs([( Kp + Ki*Ts/2)*Imax/Umax,...
&amp;nbsp;&amp;nbsp;&amp;nbsp; (-Kp + Ki*Ts/2)*Imax/Umax]));
NShift = max(0, ceil(log2(maxCoeff)));
if (NShift &amp;gt; 14)
&amp;nbsp;&amp;nbsp;&amp;nbsp; error('Inputted parameters cannot be used - u16NShift exceeds 14');
end

&lt;SPAN style="color: #008000;"&gt;%f16CC1 for PIr backEMF controller in Gamma axis&lt;/SPAN&gt;
PIr_BackEMF_Gamma_f16CC1 = (Kp + Ki*Ts/2)*Imax/Umax*2^-NShift;
PIr_BackEMF_Gamma_f16CC1 = round(PIr_BackEMF_Gamma_f16CC1 * 2^15);
PIr_BackEMF_Gamma_f16CC1(PIr_BackEMF_Gamma_f16CC1 &amp;lt; -(2^15)) = -(2^15);
PIr_BackEMF_Gamma_f16CC1(PIr_BackEMF_Gamma_f16CC1 &amp;gt; (2^15)-1) = (2^15)-1;

&lt;SPAN style="color: #008000;"&gt;%f16CC2 for PIr backEMF controller in Gamma axis&lt;/SPAN&gt;
PIr_BackEMF_Gamma_f16CC2 = (-Kp + Ki*Ts/2)*Imax/Umax*2^-NShift;
PIr_BackEMF_Gamma_f16CC2 = round(PIr_BackEMF_Gamma_f16CC2 * 2^15);
PIr_BackEMF_Gamma_f16CC2(PIr_BackEMF_Gamma_f16CC2 &amp;lt; -(2^15)) = -(2^15);
PIr_BackEMF_Gamma_f16CC2(PIr_BackEMF_Gamma_f16CC2 &amp;gt; (2^15)-1) = (2^15)-1;

&lt;SPAN style="color: #008000;"&gt;%u16NShift for PIr backEMF controller in Gamma axis&lt;/SPAN&gt;
PIr_BackEMF_Gamma_u16NShift = NShift;

&lt;SPAN style="color: #008000;"&gt;%f16CC1 for PIr backEMF controller in Delta axis&lt;/SPAN&gt;
PIr_BackEMF_Delta_f16CC1 = PIr_BackEMF_Gamma_f16CC1;
&lt;SPAN style="color: #008000;"&gt;%f16CC2 for PIr backEMF controller in Delta axis&lt;/SPAN&gt;
PIr_BackEMF_Delta_f16CC2 = PIr_BackEMF_Gamma_f16CC2;
&lt;SPAN style="color: #008000;"&gt;%u16NShift for PIr backEMF controller in Delta axis&lt;/SPAN&gt;
PIr_BackEMF_Delta_u16NShift = NShift;

disp(['PIr_BackEMF_Gamma_f16CC1 = ' num2str(PIr_BackEMF_Gamma_f16CC1) ';'])
disp(['PIr_BackEMF_Gamma_f16CC2 = ' num2str(PIr_BackEMF_Gamma_f16CC2) ';'])
disp(['PIr_BackEMF_Gamma_u16NShift = ' num2str(NShift) ';'])
disp(['PIr_BackEMF_Delta_f16CC1 = ' num2str(PIr_BackEMF_Delta_f16CC1) ';'])
disp(['PIr_BackEMF_Delta_f16CC2 = ' num2str(PIr_BackEMF_Delta_f16CC2) ';'])
disp(['PIr_BackEMF_Delta_u16NShift = ' num2str(NShift) ';'])&lt;SPAN class="" style="border-width: 0px 1px 0px 0px; border-style: initial solid initial initial; border-color: initial #999999 initial initial; font-weight: inherit;"&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;The Simulink model of the actual back-EMF estimator is shown in Fig. 15:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="" style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #ffffff; font-weight: inherit; margin: 0px 0px 2px;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="border: inherit solid inherit; padding: 5px;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;IMG alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61630i17DEC7BA70DEBA23/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="padding: 5px; text-align: center;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; color: #333333; font-size: 12px;"&gt;Fig. 15:&amp;nbsp;back-EMF estimator based on PI in recurrent&amp;nbsp;form model&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;The outputs of the PI controllers represents the predicted back-EMF terms produced by rotating magnets in the motor stator coils and are shown in the Fig. 16:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="" style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #ffffff; font-weight: inherit; margin: 0px 0px 2px;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="border: inherit solid inherit; padding: 5px;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;IMG alt="pastedImage_5.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61631iD08429AF35B507CD/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_5.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="padding: 5px; text-align: center;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Fig. 16: The back-EMF estimator predicted back-EMF waveforms for a speed profile with 1000rpm/sec ramp&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="border: 0px; color: #000080; font-weight: bold; font-size: 22px;"&gt;&lt;STRONG&gt;3.&amp;nbsp;Position Tracking Observer&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="border: 0px; font-weight: inherit; color: #333333;"&gt;&lt;STRONG&gt;And finally we reached to the point where we can compute the actual rotor position and speed.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;Since for the back-EMF estimator we have used the&amp;nbsp;differences between the actual and estimated parameters, the&amp;nbsp;resulting back-EMF estimates as outputs of PI controllers can be divided, to extract the information about the&amp;nbsp;displacement between the estimated&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;γδ&lt;/SPAN&gt;&amp;nbsp;and dq reference frames, while reducing the&amp;nbsp;effect of the observer parameter variation. The position displacement&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;θerr&lt;/SPAN&gt;&amp;nbsp;is obtained from Eq. 3.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;The Simulink model used is shown in Fig. 17:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="" style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #ffffff; font-weight: inherit; margin: 0px 0px 2px;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="font-weight: inherit; height: 301px;"&gt;&lt;TD style="padding: 5px; height: 301px;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;IMG alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61632i230C7C1315C81B7C/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="font-weight: inherit; height: 24px;"&gt;&lt;TD style="padding: 5px; text-align: center; height: 24px;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Fig. 17:&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;θerr angle computation&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #ffffff; font-weight: inherit; margin: 0px 0px 2px;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="border: inherit solid inherit; padding: 5px;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;IMG alt="pastedImage_3.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61633iC1CD50FECB849BC1/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_3.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="padding: 5px; text-align: center;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Fig. 18:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;θerr angle variation during startup and steady state regime&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;The rotor estimated position can then be obtained by driving the position of the estimated&amp;nbsp;reference frame γδ, to achieve zero displacement&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;θerr&amp;nbsp;&lt;/SPAN&gt;= 0.&amp;nbsp;To achieve this,&amp;nbsp;a phase locked&amp;nbsp;loop mechanism is implemented, where the loop compensator ensures the correct&amp;nbsp;tracking of the actual rotor position by trying to maintain the error signal&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;θ&lt;/SPAN&gt;err&amp;nbsp;to zero.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;The Simulink model of the position&amp;nbsp;tracking observer with a standard PI controller used as the loop compensator is&amp;nbsp;shown in Fig. 19:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="" style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #ffffff; font-weight: inherit; margin: 0px 0px 2px;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="border: inherit solid inherit; padding: 5px;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_6.png"&gt;&lt;IMG alt="pastedImage_6.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61634i86A027C8315AF11E/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_6.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="padding: 5px; text-align: center;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Fig. 19: Position tracking observer based on PI controller&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;As shown in Fig. 19, the position tracking controller consists of the standard&amp;nbsp;PI controller and an Integrator. In between there is a moving average filter to level out some of the peaks within the estimated quantities.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;Once again, using the root-locus tuning method we can compute the PI controller and Integrator gains starting from the second order characteristic polynomial. In this case the ξ is the required attenuation and the&amp;nbsp;f0 is the required bandwidth of the position tracking loop. Since the position error&amp;nbsp;signal is calculated by the&amp;nbsp;back-EMF estimator&amp;nbsp;formed in the rotating reference frame, the dynamics of the position tracking loop includes only frequencies proportional to the&amp;nbsp;rate of change of&amp;nbsp;rotor displacement which in general are lower than for the current loop.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;Without going into many details about gains computations since these aspects were discussed in the beginning of this article, the following snipped can be used to compute automatically the position tracking observer parameters:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #008000;"&gt;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;/SPAN&gt;
&lt;SPAN style="color: #008000;"&gt;% Tracking Observer parameters&lt;/SPAN&gt;
&lt;SPAN style="color: #008000;"&gt;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;/SPAN&gt;
&lt;SPAN style="color: #008000;"&gt;% (to be set according to the chosen control system dynamics)&lt;/SPAN&gt;
p_Ksi = 0.707;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;% position loop attenuation&lt;/SPAN&gt;
p_fo = 15;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;% position loop natural frequency [Hz]&lt;/SPAN&gt;
p_wo = 2*pi*p_fo;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;% position loop natural angular frequency [rad/s]&lt;/SPAN&gt;
Kp = 4*pi*p_Ksi*p_fo;
Ki = p_wo^2;

&lt;SPAN style="color: #008000;"&gt;% PIr controller parameters for position tracking observer&lt;/SPAN&gt;
maxCoeff = max(abs([( Kp + (Ki*Ts)/2)*pi/Wmax,...
&amp;nbsp;&amp;nbsp;&amp;nbsp; (-Kp + (Ki*Ts)/2)*pi/Wmax]));
NShift = max(0, ceil(log2(maxCoeff)));
if (NShift &amp;gt; 14)
&amp;nbsp;&amp;nbsp;&amp;nbsp; error('Inputted parameters cannot be used - u16NShift exceeds 14');
end

&lt;SPAN style="color: #008000;"&gt;%f16CC1 for PIr Tracking Observer controller&lt;/SPAN&gt;
TO_ControllerPIr_f16CC1 = (Kp+(Ki*Ts)/2)*pi/Wmax*2^-NShift;
TO_ControllerPIr_f16CC1 = round(TO_ControllerPIr_f16CC1 * 2^15);
TO_ControllerPIr_f16CC1(TO_ControllerPIr_f16CC1 &amp;lt; -(2^15)) = -(2^15);
TO_ControllerPIr_f16CC1(TO_ControllerPIr_f16CC1 &amp;gt; (2^15)-1) = (2^15)-1;

&lt;SPAN style="color: #008000;"&gt;%f16CC2 for PIr Tracking Observer controller&lt;/SPAN&gt;
TO_ControllerPIr_f16CC2 = (-Kp+(Ki*Ts)/2)*pi/Wmax*2^-NShift;
TO_ControllerPIr_f16CC2 = round(TO_ControllerPIr_f16CC2 * 2^15);
TO_ControllerPIr_f16CC2(TO_ControllerPIr_f16CC2 &amp;lt; -(2^15)) = -(2^15);
TO_ControllerPIr_f16CC2(TO_ControllerPIr_f16CC2 &amp;gt; (2^15)-1) = (2^15)-1;

&lt;SPAN style="color: #008000;"&gt;%u16NShift for PIr Tracking Observer controller&lt;/SPAN&gt;
TO_ControllerPIr_u16NShift = NShift;

&lt;SPAN style="color: #008000;"&gt;%f16C1, u16NShift for PIr Tracking Observer integrator&lt;/SPAN&gt;
TO_IntegratorTR_f16C1 = (Ts/2)*Wmax/pi;
TO_IntegratorTR_f16C1 = round(TO_IntegratorTR_f16C1 * 2^15);
TO_IntegratorTR_u16NShift = 0;

disp(['TO_ControllerPIr_f16CC1 = ' num2str(TO_ControllerPIr_f16CC1) ';'])
disp(['TO_ControllerPIr_f16CC2 = ' num2str(TO_ControllerPIr_f16CC2) ';'])
disp(['TO_ControllerPIr_u16NShift = ' num2str(NShift) ';'])
disp(['TO_IntegratorTR_f16C1 = ' num2str(TO_IntegratorTR_f16C1) ';'])
disp(['TO_IntegratorTR_u16NShift = ' num2str(TO_IntegratorTR_u16NShift) ';'])&lt;SPAN class="" style="border-width: 0px 1px 0px 0px; border-style: initial solid initial initial; border-color: initial #999999 initial initial; font-weight: inherit;"&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;Now, if we run the model, we can get both the rotor position and speed.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="" style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #ffffff; font-weight: inherit; margin: 0px 0px 2px;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="border: inherit solid inherit; padding: 5px;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_8.png"&gt;&lt;IMG alt="pastedImage_8.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61635i3EA556D030E7192A/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_8.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="padding: 5px; text-align: center;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Fig. 20: Predicted position (blue) against rotor true position (yellow). The predicted position is shown in both [rad] top, and scaled units [Q15] bottom&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="" style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #ffffff; font-weight: inherit; margin: 0px 0px 2px;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="border: inherit solid inherit; padding: 5px;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_10.png"&gt;&lt;IMG alt="pastedImage_10.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61636i738E4BDEEE01E89C/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_10.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="border: inherit solid inherit; padding: 5px;"&gt;&lt;P style="border: 0px; font-weight: inherit; text-align: center;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Fig. 21: Predicted position details: startup and delays&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="border: 0px; font-weight: inherit; text-align: center;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;(yellow - true rotor position, blue - predicted position using back-EMF estimator and Position Tracking Observer)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333;"&gt;In Fig. 22 is shown a comparison of the motor actual/true speed and the predicted value based on the position tracking observer output. As can be seen at startup the speed information is subject to error due to low back-EMF levels but once enough back-EMF is built into the motor coils the estimation becomes accurate. Fortunately we have the means to get rid of those errors by using the special startup sequence.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="" style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #ffffff; font-weight: inherit; margin: 0px 0px 2px;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="border: inherit solid inherit; padding: 5px;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_12.png"&gt;&lt;IMG alt="pastedImage_12.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61637i14F54F0CF5F85CB0/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_12.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD style="padding: 5px; text-align: center;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Fig. 22: Rotor speed comparison: (yellow) true motor speed vs (blue) predicted speed&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; color: #000080; font-weight: bold; font-size: 30px;"&gt;&lt;STRONG&gt;EXPERIMENTS and VALIDATIONS&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333; border: 0px; font-weight: inherit;"&gt;At this point we can say we have managed to build and tune a position observer using only standard blocks from AMMCLIB package. The main question that may arise now: &lt;STRONG&gt;can it handle motor parameter variations due to temperature changes ?&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To check that, at 2 seconds after startup we are going to simulate an increase in motor phase resistance as is the motor copper coils have increased the temperature from 20 degC up to 100 degC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_6.png"&gt;&lt;IMG alt="pastedImage_6.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61610i1B4A6833B4A6371F/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_6.png" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 12px;"&gt;Fig. 23: Disturbance due to phase resistance increase by 30%&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;In this case the position observer predictions are:&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY&gt;&lt;TR style="height: 1001px;"&gt;&lt;TD style="text-align: center; height: 1001px;"&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_14.png"&gt;&lt;IMG alt="pastedImage_14.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61611i53E195FD8C79F8F3/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_14.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_16.png"&gt;&lt;IMG alt="pastedImage_16.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61612i34E6982B90DAC0F5/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_16.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 50px;"&gt;&lt;TD style="text-align: center; height: 50px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;Fig. 24: Back-EMFs and Angle Error predictions in case of&amp;nbsp;R increases suddenly by 30%&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;The only noticeable effect is small glitch in the estimated speed.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_9.png"&gt;&lt;IMG alt="pastedImage_9.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61613iA45F036E3B2B747D/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_9.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_21.png"&gt;&lt;IMG alt="pastedImage_21.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61614i4263017E155064B9/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_21.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 12px;"&gt;Fig. 25: Speed and Position prediction in case of R increases suddenly by 30%&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, let's assume that the R decreases by 50%:&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_23.png"&gt;&lt;IMG alt="pastedImage_23.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61615iD3BBDAE51E2C560A/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_23.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_24.png"&gt;&lt;IMG alt="pastedImage_24.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61616i5E3C2CC76A16C576/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_24.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_25.png"&gt;&lt;IMG alt="pastedImage_25.png" src="https://community.nxp.com/t5/image/serverpage/image-id/61617i9C10D3C19FC6F2DD/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_25.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 12px;"&gt;Fig. 26: Angle Error, Predicted Speed and Position in case of sudden decrease in R by 50%&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What other scenarios can you imagine for testing such position observer ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; color: #000080; font-weight: bold; font-size: 30px;"&gt;&lt;STRONG&gt;CONCLUSIONS&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333; border: 0px; font-weight: inherit;"&gt;Up to this point we have discussed the mathematical model and implementation of the position observer based on back-EMF estimation technique to predicts the rotor speed and position. We have checked its functionality in simulation environment to ensure the predictions are accurate against reference signals.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333; border: 0px; font-weight: inherit;"&gt;In the next module, we are going to integrate this position observer in the PMSM FOC system and used it to close the speed loop and get the rotor angle information required by PARK transformation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;SPAN style="color: #333333; border: 0px; font-weight: inherit;"&gt;Attached are the Simulink models and MATLAB scripts used in the module for designing the position observer.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; text-align: justify;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; color: #800000; font-weight: bold;"&gt;&lt;STRONG&gt;Update January 28th 2019 -&amp;nbsp;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;This&amp;nbsp;Simulink model is now available on MATLAB 2018b and MBDT for S32K14x 2018.R1 release&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="info" __jive_macro_name="alert" alert="info" class="jive_text_macro jive_macro_alert"&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Before using the new models make sure you apply all the hot-patches from here:&amp;nbsp;&lt;/SPAN&gt;&lt;A _jive_internal="true" data-objecttype="1" href="https://community.nxp.com/thread/489947" rel="noopener noreferrer" style="color: #3d9ce7; background-color: transparent; border: 0px; font-weight: inherit; padding: 1px 0px 1px calc(12px + 0.35ex);" target="_blank"&gt;HotFix: MBD Toolbox 2018.R1 for S32K&lt;/A&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 2pt 0in;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12pt;"&gt;&lt;SPAN style="border: 0px; font-weight: bold; font-size: 16px;"&gt;&lt;STRONG&gt;Update revisions&lt;/STRONG&gt;&lt;/SPAN&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 2pt 0in;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 11.5pt;"&gt;March&amp;nbsp;18, 2019&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px 0px 0px 30px;"&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px 0.0001pt;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12pt;"&gt;update the model&amp;nbsp;to work with&amp;nbsp;&lt;A _jive_internal="true" data-objecttype="102" href="https://community.nxp.com/docs/DOC-342724" rel="noopener noreferrer" style="color: #3d9ce7; background-color: transparent; border: 0px; font-weight: inherit; font-size: 16px; padding: 1px 0px 1px calc(12px + 0.35ex);" target="_blank"&gt;&lt;SPAN style="color: blue; border: 0px; font-weight: inherit; font-size: 16px;"&gt;Model-Based Design Toolbox for MPC57xx Automotive Version 3.0.0&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp; .&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 2pt 0in;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 11.5pt;"&gt;May 06, 2020&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px 0px 0px 30px;"&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px 0.0001pt;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12pt;"&gt;update the model&amp;nbsp;to work with&amp;nbsp;&lt;A _jive_internal="true" data-objecttype="102" href="https://community.nxp.com/docs/DOC-346265" rel="noopener noreferrer" style="color: #3d9ce7; background-color: transparent; border: 0px; font-weight: inherit; font-size: 16px; padding: 1px 0px 1px calc(12px + 0.35ex);" target="_blank"&gt;&lt;SPAN style="color: blue; border: 0px; font-weight: inherit; font-size: 16px;"&gt;Model-Based Design Toolbox for MPC57xx Automotive Version 3.2.0&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp; .&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:05:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748340#M1768</guid>
      <dc:creator>Daniel_Popa</dc:creator>
      <dc:date>2020-11-02T14:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748341#M1769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H1 style="color: #646464; background-color: #ffffff; border: 0px; font-weight: 200; font-size: 2rem;"&gt;&lt;BR /&gt;i am from china。&lt;BR /&gt;Position Observer (Part 1/2)：question about Eq1，Eq2。&lt;BR /&gt;how these eq1，eq2 come from？&lt;/H1&gt;&lt;H1 style="color: #646464; background-color: #ffffff; border: 0px; font-weight: 200; font-size: 2rem;"&gt;can you give me some book name about that？ thanks。&lt;/H1&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2018 08:50:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748341#M1769</guid>
      <dc:creator>sjh2100</dc:creator>
      <dc:date>2018-09-26T08:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748342#M1770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi wu chao,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are many articles and books available for free on the internet. I can't indicate a specific book but the eq. 1 and 2 represent the PMSM mathematical model in fixed orthogonal system (alpha/beta) which is standard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyhow, please find here attached a &lt;A href="https://www.researchgate.net/file.PostFileLoader.html?id=55bd34a26307d936878b458f&amp;amp;assetKey=AS%3A273823490871303%401442296015731"&gt;generic article about PMSM equations&lt;/A&gt;. Have a look at eq. 1-7 (page 9). It is the same with eq. 1 with the following assumptions:&lt;/P&gt;&lt;P&gt;- v0 = 0 due to the motor symetrie&lt;/P&gt;&lt;P&gt;- rs = R&lt;/P&gt;&lt;P&gt;- Lls+3/2Lms = L&lt;/P&gt;&lt;P&gt;- p (Laplace operator) = d/dt&lt;/P&gt;&lt;P&gt;lapbda*dOr/dt =kv*w&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2018 09:29:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748342#M1770</guid>
      <dc:creator>Daniel_Popa</dc:creator>
      <dc:date>2018-09-26T09:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748343#M1771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks！ that paper is very helpful。&lt;/P&gt;&lt;P&gt;now i have another question: how to determine&amp;nbsp; &lt;SPAN class=""&gt;Q-aligned or&amp;nbsp; D-aligned&lt;/SPAN&gt;&amp;nbsp; to a sensorless&amp;nbsp;motor?&lt;/P&gt;&lt;P&gt;Sincerely&lt;/P&gt;&lt;P&gt;wuchao&lt;/P&gt;&lt;P&gt;sdust&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2018 01:58:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748343#M1771</guid>
      <dc:creator>sjh2100</dc:creator>
      <dc:date>2018-09-28T01:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748344#M1772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniel,&lt;/P&gt;&lt;P&gt;I read your topic in another link, that is about PMSM VF control, Thanks for your wonderful teaching.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have a boubt, PMSM its modle under open-loop is unstable, from small signal modling and its root locus，we can see it may have unstable poles when rotor speed changes. So Is it necessary to add a stable loop while using VF control？I know some approach about adding stable loop for PMSM-VF driving.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is one of them:&lt;A class="link-titled" href="https://ieeexplore.ieee.org/abstract/document/1201547" title="https://ieeexplore.ieee.org/abstract/document/1201547"&gt;A sensorless, stable V/f control method for permanent-magnet synchronous motor drives - IEEE Journals &amp;amp; Magazine&lt;/A&gt; . It takes a high pass filter to abstract the ripple of the rotor speed from motor power and compensates it. (P=U*I*Powerfactor)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because I have a SPMSM, but I need to control it under low speed, and BEMF estimation doesn't work for low speed operation. Moreover, High frequency signal injection method will not work as well due to Ld=Lq.(Sensorless FOC)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hmm~~&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No position sensor, no available parameters estimator, So it reminds me of VF control. Could you please give me some advice?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;ZiJun.Wan&lt;/P&gt;&lt;P&gt;&amp;nbsp;2018.9.28&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2018 05:30:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748344#M1772</guid>
      <dc:creator>jonny0811</dc:creator>
      <dc:date>2018-09-28T05:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748345#M1773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #51626f; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;Hi,Daniel&lt;/P&gt;&lt;P style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #51626f; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;&amp;nbsp; &amp;nbsp; In the&amp;nbsp; Eq.19, we have to add E(k-1)、W(k-1)*I(k-1)、U(k-1),&lt;/P&gt;&lt;P style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #51626f; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="untitled.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78433i079A5BD2EA6863F1/image-size/large?v=v2&amp;amp;px=999" role="button" title="untitled.png" alt="untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #51626f; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;&lt;/P&gt;&lt;P style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #51626f; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; but in the RL_Circuit_Model&amp;nbsp; block, we no need to add this, I have a doubt about it , thanks you!&lt;/P&gt;&lt;P style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #51626f; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78520i6A34D9E3E7E2D321/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #51626f; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;&lt;/P&gt;&lt;P style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #51626f; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;&lt;/P&gt;&lt;P style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #51626f; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #51626f; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 03:12:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748345#M1773</guid>
      <dc:creator>jihan</dc:creator>
      <dc:date>2018-11-28T03:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748346#M1774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the same problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2018 03:07:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748346#M1774</guid>
      <dc:creator>lin_luobin</dc:creator>
      <dc:date>2018-12-10T03:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748347#M1775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;这个问题你搞懂了吗？&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2018 03:09:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748347#M1775</guid>
      <dc:creator>lin_luobin</dc:creator>
      <dc:date>2018-12-10T03:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748348#M1776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for a great workshop within this topic!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a couple of thoughts/questions that I would be glad if you cleared out to me!?&lt;/P&gt;&lt;P&gt;A. "&lt;SPAN style="color: #333333; background-color: #ffffff;"&gt;If we rearrange the Eq. 18 in order to highlight...&lt;/SPAN&gt;", shouldnt that be referring to Eq. 17 instead?&lt;/P&gt;&lt;P&gt;B. When looking at your implementation of Eq 19 in the simulink environment I get insecure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;B0. As people are asking about where the (k-1) variables disappears I guess that the variable is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;considered to be fairly constant from one sample to another? But then there should be a *2 in there too, shouldn't &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;B1. The "Shift Ey = Eu" blocks, what is that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;B2. Shouldn't the output of the "PredictedCurrentGamma"&amp;nbsp;be routed from before the 1/z block?&lt;/P&gt;&lt;P&gt;C. Under the section when you calculate the parameters for the Back-emf controllers. Can you please tell what PIr_BackEMF_Gamma_f16CC1 and&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;PIr_BackEMF_Gamma_f16CC2 are? Are these the proportional and integrating controller amplificatons?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you can help out!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Tomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2019 14:00:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748348#M1776</guid>
      <dc:creator>tomas1</dc:creator>
      <dc:date>2019-01-24T14:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748349#M1777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel,&lt;BR /&gt;I would like to know the answer on this question as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2019 12:45:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748349#M1777</guid>
      <dc:creator>shey_alex</dc:creator>
      <dc:date>2019-02-20T12:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748350#M1778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for delay! For some reasons i was not aware of these replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, thank you all for highlighting this issue. I think you are right.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The correct implementation should be something like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/8398iD83A8934C46EBF3E/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm going to recheck the model in the&amp;nbsp;next&amp;nbsp;days and i'll let you know my finding.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In any case if anyone of you have already fix the model and is willing to share it - i would be more than happy to reuse it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2019 10:08:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748350#M1778</guid>
      <dc:creator>Daniel_Popa</dc:creator>
      <dc:date>2019-02-25T10:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748351#M1779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/dumitru-daniel.popa"&gt;dumitru-daniel.popa&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;I have modelled the back-EMF observer&amp;nbsp;using the block diagram you posted (which can be also found in the AMMCLIB user guide) and I can confirm that it works. However,&amp;nbsp;could you please share for reference a link or article&amp;nbsp;which details how the difference equations are derived?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Luca&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2019 11:26:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/748351#M1779</guid>
      <dc:creator>lucabarbiero</dc:creator>
      <dc:date>2019-07-29T11:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/1238804#M5841</link>
      <description>&lt;P&gt;Hi Dainiel,&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;My matlab version is matlab 2019a&lt;/SPAN&gt; and Model-Based Design Toolbox for S32K1xx Series Version 4.2.0.&lt;/P&gt;&lt;P&gt;When I am opening the simulink model Observer_Model.mdl from M9_2018.R1 , all the libraries are showing as "unresolved link".&lt;/P&gt;&lt;P&gt;Could you please help me to resolve this issue.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abhijithreji14_0-1614704137863.png" style="width: 603px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138502iB89977FA88063756/image-dimensions/603x208?v=v2" width="603" height="208" role="button" title="abhijithreji14_0-1614704137863.png" alt="abhijithreji14_0-1614704137863.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 16:55:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/1238804#M5841</guid>
      <dc:creator>AjRj14</dc:creator>
      <dc:date>2021-03-02T16:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/1249264#M5887</link>
      <description>&lt;P&gt;Hi Luca,&lt;/P&gt;&lt;P&gt;Did you got any reference which details how the differential equations are derived? If yes, could you please share it...Thanks in Advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;AJ&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 03:05:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/1249264#M5887</guid>
      <dc:creator>AjRj14</dc:creator>
      <dc:date>2021-03-22T03:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/1345776#M6529</link>
      <description>&lt;P&gt;Thank you for this extremely useful workshop! I have tried to implement the position observer in my project with S32K144, and it works perfectly with no load. However there seems to be a small estimation error that increases with current, resulting in step loss at high load. More specifically, the error seems to be approximately linearly dependent on both Iq and Id. Is this a known pheonomenon, or did I get something wrong with the implementation? Do you have any suggestion on how to fix it?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 09:39:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/1345776#M6529</guid>
      <dc:creator>alessandro96</dc:creator>
      <dc:date>2021-09-24T09:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/1346126#M6531</link>
      <description>&lt;P&gt;That’s what I was looking for, what a information! present&amp;nbsp;&lt;A href="https://www.mymilestonecard.biz/" target="_self"&gt;&lt;SPAN&gt;MyMileStoneCard&lt;/SPAN&gt; &lt;/A&gt;here at this website, thank you admin!!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 04:01:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/1346126#M6531</guid>
      <dc:creator>Shawn8893</dc:creator>
      <dc:date>2021-12-03T04:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/1346729#M6534</link>
      <description>&lt;P&gt;Thanks for the update and quick reply. I'll be sure to&amp;nbsp;&lt;A href="https://www.tellthebell.run/" target="_self"&gt;&lt;SPAN&gt;tellthebell&lt;/SPAN&gt; &amp;nbsp;&lt;/A&gt;keep an eye on this thread.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 03:47:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/1346729#M6534</guid>
      <dc:creator>Robert7288</dc:creator>
      <dc:date>2021-09-28T03:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Module 9: Position Observer (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/1705671#M8406</link>
      <description>&lt;P&gt;&lt;SPAN&gt;thanks！ that paper is very helpful。&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have a question.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the difference between the method "sliding mode" and "Position Observer". There are many articles using the method&amp;nbsp;"sliding mode"&amp;nbsp;without&amp;nbsp;"Position Observer".&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 10:02:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-9-Position-Observer-Part-2-2/m-p/1705671#M8406</guid>
      <dc:creator>Thanh1</dc:creator>
      <dc:date>2023-08-16T10:02:05Z</dc:date>
    </item>
  </channel>
</rss>

