<?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 Metering Library With FFT or Filter in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Metering-Library-With-FFT-or-Filter/m-p/536120#M32989</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;I want to design a 3 phase meter which provides following basic functions:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;Harmonic calculation&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;Voltage dip monitoring&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;Voltage swell monitoring&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;….&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;As I know, if the device needs harmonic calculation, the metering library with FFT should be used.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;But to implement the voltage dip monitoring and swell monitoring function, the meter has to calculate the Urms&lt;BR /&gt;every 1/2 period, for 50 Hz grid, every 10 ms the Urms must be calculated. If I choose metering library with FFT, it must call METERLIBFFT_CalcMain first and this function take much time. If I call it every 10 ms, I am afraid the meter performance will reduce a lot. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;Or I can use two metering library FFT and Filter&amp;nbsp; at the same time, using Filter library to calculate Urms every 10 ms and FFT library to calculate harmonic every 20 ms (50 Hz).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;Is there someone can tell me how I can solve this problem? &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;Martin&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jul 2016 08:18:26 GMT</pubDate>
    <dc:creator>martinzhang</dc:creator>
    <dc:date>2016-07-25T08:18:26Z</dc:date>
    <item>
      <title>Metering Library With FFT or Filter</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Metering-Library-With-FFT-or-Filter/m-p/536120#M32989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;I want to design a 3 phase meter which provides following basic functions:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;Harmonic calculation&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;Voltage dip monitoring&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;Voltage swell monitoring&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;….&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;As I know, if the device needs harmonic calculation, the metering library with FFT should be used.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;But to implement the voltage dip monitoring and swell monitoring function, the meter has to calculate the Urms&lt;BR /&gt;every 1/2 period, for 50 Hz grid, every 10 ms the Urms must be calculated. If I choose metering library with FFT, it must call METERLIBFFT_CalcMain first and this function take much time. If I call it every 10 ms, I am afraid the meter performance will reduce a lot. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;Or I can use two metering library FFT and Filter&amp;nbsp; at the same time, using Filter library to calculate Urms every 10 ms and FFT library to calculate harmonic every 20 ms (50 Hz).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;Is there someone can tell me how I can solve this problem? &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&lt;SPAN lang="EN-US" style="line-height: 107%;"&gt;Martin&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2016 08:18:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Metering-Library-With-FFT-or-Filter/m-p/536120#M32989</guid>
      <dc:creator>martinzhang</dc:creator>
      <dc:date>2016-07-25T08:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Metering Library With FFT or Filter</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Metering-Library-With-FFT-or-Filter/m-p/536121#M32990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not think there is good idea to handle your case. I suppose you have to use two library, you can use meter library to calculate the RMS of both voltage and current, in other words, you calculate the Rms of voltage/current in time domian with 10ms period. You can use FFT library in 20ms period to calculate the other parameters.&lt;/P&gt;&lt;P&gt;Hope it can help you.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 05:31:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Metering-Library-With-FFT-or-Filter/m-p/536121#M32990</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-07-26T05:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: Metering Library With FFT or Filter</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Metering-Library-With-FFT-or-Filter/m-p/536122#M32991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;you need to use FFT library as a base and add your own code to compute voltage dip and voltage swell. Your code can leverage the same raw data gathered in a buffers for FFT computing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that filter-based library, namely METERLIB1PH_CalcURMS function, cannot be used because LP filter constant can be set only as high as to achieve RMS computing within approx. one voltage cycle (20ms). Further speeding up filters is possible but don't make sense by my opinion because RMS ripples would be very large (for 20ms filter settling time the RMS ripples are in range +/-5%).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Martin M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 12:04:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Metering-Library-With-FFT-or-Filter/m-p/536122#M32991</guid>
      <dc:creator>MarMi</dc:creator>
      <dc:date>2016-07-26T12:04:13Z</dc:date>
    </item>
  </channel>
</rss>

