<?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 How to calculate AMCLIB_PMSMBemfObsrvAB_A32 in C programming without the library file. in Motor Control and Smart Energy</title>
    <link>https://community.nxp.com/t5/Motor-Control-and-Smart-Energy/How-to-calculate-AMCLIB-PMSMBemfObsrvAB-A32-in-C-programming/m-p/599222#M63</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I'm using my own board of MKV10Z32VLC7(CM0 based device). Unfortunately the AMCLIB_PMSMBemfObsrvAB_F16 is not available for CM0 based devices. It's based on FOC control of PMSM motor.&lt;span class="lia-inline-image-display-wrapper" image-alt="165326_165326.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122310i14E6CBD8FFE04BE2/image-size/large?v=v2&amp;amp;px=999" role="button" title="165326_165326.jpg" alt="165326_165326.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/2984i909C616EAF001654/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.jpg" alt="pastedImage_3.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are processing with the same processor because of low cost. Now we want to calculate the &lt;STRONG&gt;back-emf sin and cos components&lt;/STRONG&gt; to find omega(rotor position) and theta(speed) using&amp;nbsp;&lt;STRONG&gt;AMCLIB_AngleTrackObsrv_F16 &lt;/STRONG&gt;function. Is there any methods or formulas to find the &lt;STRONG&gt;back-emf sin and cos components &lt;/STRONG&gt;through c-programming.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Sep 2016 10:34:28 GMT</pubDate>
    <dc:creator>vigneshkumarp</dc:creator>
    <dc:date>2016-09-30T10:34:28Z</dc:date>
    <item>
      <title>How to calculate AMCLIB_PMSMBemfObsrvAB_A32 in C programming without the library file.</title>
      <link>https://community.nxp.com/t5/Motor-Control-and-Smart-Energy/How-to-calculate-AMCLIB-PMSMBemfObsrvAB-A32-in-C-programming/m-p/599222#M63</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I'm using my own board of MKV10Z32VLC7(CM0 based device). Unfortunately the AMCLIB_PMSMBemfObsrvAB_F16 is not available for CM0 based devices. It's based on FOC control of PMSM motor.&lt;span class="lia-inline-image-display-wrapper" image-alt="165326_165326.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122310i14E6CBD8FFE04BE2/image-size/large?v=v2&amp;amp;px=999" role="button" title="165326_165326.jpg" alt="165326_165326.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/2984i909C616EAF001654/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.jpg" alt="pastedImage_3.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are processing with the same processor because of low cost. Now we want to calculate the &lt;STRONG&gt;back-emf sin and cos components&lt;/STRONG&gt; to find omega(rotor position) and theta(speed) using&amp;nbsp;&lt;STRONG&gt;AMCLIB_AngleTrackObsrv_F16 &lt;/STRONG&gt;function. Is there any methods or formulas to find the &lt;STRONG&gt;back-emf sin and cos components &lt;/STRONG&gt;through c-programming.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 10:34:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Motor-Control-and-Smart-Energy/How-to-calculate-AMCLIB-PMSMBemfObsrvAB-A32-in-C-programming/m-p/599222#M63</guid>
      <dc:creator>vigneshkumarp</dc:creator>
      <dc:date>2016-09-30T10:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate AMCLIB_PMSMBemfObsrvAB_A32 in C programming without the library file.</title>
      <link>https://community.nxp.com/t5/Motor-Control-and-Smart-Energy/How-to-calculate-AMCLIB-PMSMBemfObsrvAB-A32-in-C-programming/m-p/599223#M64</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to calculate the sin and cos components manually??&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;&amp;nbsp; &lt;A href="https://community.nxp.com/space/11480"&gt;Kinetis Motor Suite&lt;/A&gt;‌, Deactivated user‌ &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/MarMi"&gt;MarMi&lt;/A&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/pavelrech"&gt;pavelrech&lt;/A&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/kubanb"&gt;kubanb&lt;/A&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/vicentegomez"&gt;vicentegomez&lt;/A&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/khumphri"&gt;khumphri&lt;/A&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/Mandar"&gt;Mandar&lt;/A&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/dhaval"&gt;dhaval&lt;/A&gt;‌‌‌‌‌‌‌, &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/RHinnen"&gt;RHinnen&lt;/A&gt;‌,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Oct 2016 05:39:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Motor-Control-and-Smart-Energy/How-to-calculate-AMCLIB-PMSMBemfObsrvAB-A32-in-C-programming/m-p/599223#M64</guid>
      <dc:creator>vigneshkumarp</dc:creator>
      <dc:date>2016-10-01T05:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate AMCLIB_PMSMBemfObsrvAB_A32 in C programming without the library file.</title>
      <link>https://community.nxp.com/t5/Motor-Control-and-Smart-Energy/How-to-calculate-AMCLIB-PMSMBemfObsrvAB-A32-in-C-programming/m-p/599224#M65</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, of course as each function the sine and cosine components of BEMF can by calculated manually. In general it works according following equations:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;f32TmpEObsrvAlpha= psCtrl_sCtrl_f32IAlpha_1 + (psCtrl_sCtrl_a32IGain + psCtrl_sCtrl_a32PGain) * (psUAlBe_f16Alpha - psCtrl_sIObsrv_f32Alpha) &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;f32TmpEObsrvBeta = psCtrl_sCtrl_f32IBeta_1 +&amp;nbsp; (psCtrl_sCtrl_a32IGain + psCtrl_sCtrl_a32PGain) * (psUAlBe_f16Beta&amp;nbsp; - psCtrl_sIObsrv_f32Beta)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;f32TmpEObsrvAlpha= f32TmpEObsrvAlpha / sqrt(f32TmpEObsrvAlpha ^ 2 + f32TmpEObsrvAlpha ^ 2) &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;f32TmpEObsrvBeta = f32TmpEObsrvBeta&amp;nbsp; / sqrt(f32TmpEObsrvBeta ^ 2&amp;nbsp; + f32TmpEObsrvBeta ^ 2)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;f32TmpIObsrvAlpha= a32IGain * psCtrl_sIObsrv_f32Alpha + a32UGain * psUAlBe_f16Alpha + psIAlBe_f16Beta&amp;nbsp; * f16Speed * a32WIGain + a32EGain * f32TmpEObsrvAlpha&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;f32TmpIObsrvBeta = a32IGain * psCtrl_sIObsrv_f32Beta&amp;nbsp; +&amp;nbsp; a32UGain * psUAlBe_f16Beta - psIAlBe_f16Alpha * f16Speed * a32WIGain + a32EGain * f32TmpEObsrvBeta&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sin = -f32TmpEObsrvAlpha ... &amp;nbsp; for&amp;nbsp; f16Speed &amp;lt; 0&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sin =&amp;nbsp; f32TmpEObsrvAlpha&amp;nbsp;... &amp;nbsp; for&amp;nbsp; f16Speed &amp;gt;= 0&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Cos= -f32TmpEObsrvBeta&amp;nbsp; ... &amp;nbsp; for&amp;nbsp; f16Speed &amp;lt;= 0 &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Cos= f32TmpEObsrvBeta&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;... &amp;nbsp; for&amp;nbsp; f16Speed &amp;gt; 0&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The results of some operation must be saturated or correctly shifted to obtain the right value range and in real there are some tricks to calculate the results with determined precision.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 06:43:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Motor-Control-and-Smart-Energy/How-to-calculate-AMCLIB-PMSMBemfObsrvAB-A32-in-C-programming/m-p/599224#M65</guid>
      <dc:creator>pavelrech</dc:creator>
      <dc:date>2016-10-04T06:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate AMCLIB_PMSMBemfObsrvAB_A32 in C programming without the library file.</title>
      <link>https://community.nxp.com/t5/Motor-Control-and-Smart-Energy/How-to-calculate-AMCLIB-PMSMBemfObsrvAB-A32-in-C-programming/m-p/599225#M66</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The terms &lt;STRONG&gt;&lt;EM&gt;psCtrl_sCtrl_f32IAlpha_1&lt;/EM&gt;, &lt;EM&gt;psCtrl_sCtrl_a32IGain&lt;/EM&gt;, &lt;EM&gt;psCtrl_sCtrl_a32PGain&lt;/EM&gt;&lt;/STRONG&gt; etc., are available only in AMCLIB_PMSMBemfObsrvAB_F16 library file. Here in MKV10Z32VLC7 the files are missing so &lt;STRONG&gt;I can't able to find out these values&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no backemf observer available for ALPHA and BETA terms, available only for D and Q terms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here we are porting the code from MC56F82726 to MKV10Z32VLC7. AMCLIB_PMSMBemfObsrvAB_F16 is available in MC56F82726 but not in KV10.&lt;/P&gt;&lt;P&gt;In MC56F82726 we proceeded with the following format:&lt;/P&gt;&lt;P&gt;* First we have calculated the ABC phase current iABC&lt;/P&gt;&lt;P&gt;* Through Clark transformation iABC in converted to iAlpha and iBeta&lt;/P&gt;&lt;P&gt;* We have calculated the voltage of alpha and beta (vAlpha and vBeta)&amp;nbsp; and initial speed internally&lt;/P&gt;&lt;P&gt;* Using above iAlpha&amp;amp;iBeta, vAlpha&amp;amp;vBeta and speed in AMCLIB_PMSMBemfObsrvAB_F16 we have found out sin and cos components from ACLIB_BEMF_OBSRV_AB_T of AMCLIB_PMSMBemfObsrvAB_F16.&lt;/P&gt;&lt;P&gt;* From the sin and cos components we have calculated the angel and speed by using ACLIB_AngleTrackObsrv.&lt;/P&gt;&lt;P&gt;* Then we carried out park transformation, decoupling, parkinv transformation upto SVM.&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;above flow is working correctly&amp;nbsp; in MC56F82726&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;But while porting to KV10 the AMCLIB_PMSMBemfObsrvAB_F16 is not available &lt;STRONG&gt;only AMCLIB_PMSMBemfObsrvDQ is available&lt;/STRONG&gt;. So I need to change the code based on the available library files. &lt;/P&gt;&lt;P&gt;In KV10 we have only AMCLIB_PMSMBemfObsrvDQ function, so &lt;STRONG&gt;how to process with the same to find out the angel and speed. &lt;/STRONG&gt;What changes need to be done in code ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 08:48:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Motor-Control-and-Smart-Energy/How-to-calculate-AMCLIB-PMSMBemfObsrvAB-A32-in-C-programming/m-p/599225#M66</guid>
      <dc:creator>vigneshkumarp</dc:creator>
      <dc:date>2016-10-04T08:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate AMCLIB_PMSMBemfObsrvAB_A32 in C programming without the library file.</title>
      <link>https://community.nxp.com/t5/Motor-Control-and-Smart-Energy/How-to-calculate-AMCLIB-PMSMBemfObsrvAB-A32-in-C-programming/m-p/599226#M67</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Capturek.JPG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/2550i9A63D71737AB5888/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capturek.JPG" alt="Capturek.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above method is implemented in &lt;STRONG&gt;MC56F82726.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 08:52:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Motor-Control-and-Smart-Energy/How-to-calculate-AMCLIB-PMSMBemfObsrvAB-A32-in-C-programming/m-p/599226#M67</guid>
      <dc:creator>vigneshkumarp</dc:creator>
      <dc:date>2016-10-04T08:52:51Z</dc:date>
    </item>
  </channel>
</rss>

