<?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: Electrical angle of etpu Resolver output wrong in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1597163#M22840</link>
    <description>&lt;P&gt;Thanks！the code you provided help me a lot,the problem has been solved perfectly!&lt;/P&gt;</description>
    <pubDate>Fri, 10 Feb 2023 08:43:53 GMT</pubDate>
    <dc:creator>Harry0001</dc:creator>
    <dc:date>2023-02-10T08:43:53Z</dc:date>
    <item>
      <title>Electrical angle of etpu Resolver output wrong</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1592776#M22773</link>
      <description>&lt;P&gt;Hello,my etpu resolver alway output the electrial angle equal to the mechanical rotor angle,seem to be lack of&amp;nbsp; a pair poles.I want to know where can be setting in the etpu can fix this trouble?&lt;/P&gt;&lt;P&gt;I posted a picture to show this problem,the blue line is the EI angle from etpu and the green is the open loop EI angle,my pole-pairs is 4.Thanks!&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Resolver output thRotEl.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/209451i9FB9CC14C7F41493/image-size/large?v=v2&amp;amp;px=999" role="button" title="Resolver output thRotEl.png" alt="Resolver output thRotEl.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 03:49:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1592776#M22773</guid>
      <dc:creator>Harry0001</dc:creator>
      <dc:date>2023-02-03T03:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Electrical angle of etpu Resolver output wrong</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1592779#M22774</link>
      <description>&lt;P&gt;I get the blue line from the function: angle fs_etpu_resolver_get_outputs_calculated(),its angel output should be the rotor electrical angle.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 03:57:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1592779#M22774</guid>
      <dc:creator>Harry0001</dc:creator>
      <dc:date>2023-02-03T03:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Electrical angle of etpu Resolver output wrong</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1592975#M22777</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Could you specify which device and which eTPU library you are referring to?&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 08:48:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1592975#M22777</guid>
      <dc:creator>petervlna</dc:creator>
      <dc:date>2023-02-03T08:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Electrical angle of etpu Resolver output wrong</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1593078#M22779</link>
      <description>&lt;P&gt;MPC5777C,and the etpu lib is from others,i do not know its source.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 10:27:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1593078#M22779</guid>
      <dc:creator>Harry0001</dc:creator>
      <dc:date>2023-02-03T10:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Electrical angle of etpu Resolver output wrong</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1594504#M22807</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I was talking with eTPU expert and she pointed out following:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR clear="none" /&gt;You should use the &lt;STRONG&gt;bold &lt;/STRONG&gt;highlighted function routine for conversion of electrical position to mechanical from eTPU.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider we b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Get the extrapolated values from Resolver&amp;nbsp; */&lt;BR clear="none" /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // fs_etpu_resolver_get_outputs_extrapolated(&amp;amp;resolver_instance, &amp;amp;resolver_outputs_extrapolated); zmena&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider we b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while ( fs_etpu_resolver_get_outputs_extrapolated(&amp;amp;resolver_instance, &amp;amp;resolver_outputs_extrapolated));&lt;BR clear="none" /&gt;&lt;STRONG&gt;fs_etpu_resolver_trans_outputs_el_to_mech&lt;/STRONG&gt;(RES_POLE_PAIRS,&amp;amp;resolver_outputs_extrapolated,&amp;amp;resolver_outputs_mechanical);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider we b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;Best regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider we b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;Peter&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 08:00:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1594504#M22807</guid>
      <dc:creator>petervlna</dc:creator>
      <dc:date>2023-02-07T08:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Electrical angle of etpu Resolver output wrong</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1594610#M22811</link>
      <description>&lt;P&gt;Thanks for your reply!&lt;/P&gt;&lt;P&gt;I has to point out that the problem is the electrical rotor angel is wrong but not the mechnical angle,i get the electrical angle form the function:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;fs_etpu_resolver_get_outputs_extrapolated(&amp;amp;resolver_instance,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;amp;resolver_outputs_extrapolated);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;then i process the avove function output like this:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;T_S32 temp_pos24;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;temp_pos24 = (T_S32)resolver_outputs_extrapolated.angle;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;// temp_pos24 = (T_S32)resolver_outputs_calculated.angle;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;if(temp_pos24 &amp;lt; 0)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;temp_pos24 = 0xFFFFFF+temp_pos24; // +2pi&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;temp_pos24 = (temp_pos24&amp;gt;&amp;gt;12)&amp;amp;0x0FFF; // takes only the 12 bit result&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;*Pos= (T_S16)(temp_pos24);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;the pos div 4096,then mutl 2π，then substract π，then it bccame what has been showed in the picture i posted.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;The problem is why the output of etpu "&lt;FONT color="#FF0000"&gt;resolver_outputs_calculated.angle&lt;/FONT&gt;"is not the electrical but in fact the mechanical angle,seems to lack of the pairs poles.if I take it to divide pairs poles to get the mechanical angle,the mechanical angle will be not fit with the true condition.Thus i want to know where is wrong and where can i set the pair poles in the etpu moudle.Thanks!&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 09:55:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1594610#M22811</guid>
      <dc:creator>Harry0001</dc:creator>
      <dc:date>2023-02-07T09:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Electrical angle of etpu Resolver output wrong</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1596148#M22828</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The angle got from fs_etpu_resolver_get_outputs_calculated() is mechanical angle. If resolver is 1xpole pairs, motor is 4x pole pairs, electrical andgel = mechanical*4, here saturation has to be taken into account, regarding the details implement method, you can refer AN12017sw and add bold code.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ptr-&amp;gt;Resolver_SW.fltThRotMec = ((tFloat)resolver_outputs_calculated.angle / 0x800000) * FLOAT_PI; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ptr-&amp;gt;Resolver_SW.wRotMec.raw = (((tFloat) resolver_outputs_calculated.speed) / 0x800000) * FLOAT_PI *&lt;SPAN&gt;20000&lt;/SPAN&gt;; /* rad/s */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;// Mechanical rotor position - convert from FLOAT to FIX, &amp;lt;-1,1&amp;gt; range f32ThRotMe = MLIB_ConvertPU_F32FLT(MLIB_Div(ptr-&amp;gt;fltThRotMec,FLOAT_PI));&lt;/P&gt;&lt;P&gt;// Electrical rotor offset position - convert from FLOAT to FIX, &amp;lt;-1,1&amp;gt; range f32ThRotElOffset = MLIB_ConvertPU_F32FLT(MLIB_Div(ptr-&amp;gt;fltThRotElOffset,FLOAT_PI));&lt;/P&gt;&lt;P&gt;// Electrical rotor position calculation respecting the resolver position offset - fix point arithmetic f32ThRotEl = MLIB_ShL_F32(MLIB_MulSat_F32(f32ThRotMe,ptr-&amp;gt;s32motorPPscale),ptr-&amp;gt;s16motorPPscaleShift); f32ThRotEl = MLIB_Sub_F32(f32ThRotEl,f32ThRotElOffset);&lt;/P&gt;&lt;P&gt;// Electrical rotor position -&amp;gt; convert from FIX to FlOAT, &amp;lt;-pi, pi&amp;gt; range ptr-&amp;gt;fltThRotEl = MLIB_Mul(MLIB_ConvertPU_FLTF32(f32ThRotEl), FLOAT_PI);&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 03:16:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1596148#M22828</guid>
      <dc:creator>Yongbing_Nan</dc:creator>
      <dc:date>2023-02-09T03:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Electrical angle of etpu Resolver output wrong</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1597163#M22840</link>
      <description>&lt;P&gt;Thanks！the code you provided help me a lot,the problem has been solved perfectly!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 08:43:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Electrical-angle-of-etpu-Resolver-output-wrong/m-p/1597163#M22840</guid>
      <dc:creator>Harry0001</dc:creator>
      <dc:date>2023-02-10T08:43:53Z</dc:date>
    </item>
  </channel>
</rss>

