<?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>S12 / MagniV MicrocontrollersのトピックGain and Offset Compensation for Voltage and current Measurement</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Gain-and-Offset-Compensation-for-Voltage-and-current-Measurement/m-p/809573#M15802</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on 12V Battery Management system project and am using MM9Z1_638 micro controller. I wanted to understand why we need to have the compensations configured for the voltage and temperatures (I know it's a basic question). It would be helpful if you provide an&amp;nbsp;example that explain "what would be the output value if i&amp;nbsp;provide&amp;nbsp; constant input values for the voltages and current and varying the compensation values&lt;/P&gt;&lt;P&gt;&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/65450iAF474E5515D78375/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;&lt;/P&gt;&lt;P&gt;I got a below table where i am NOT able to interpret much. If possible please explain the below table as well&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/65466i9804030140E658F1/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Krishna Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jul 2018 19:41:07 GMT</pubDate>
    <dc:creator>krishnakarthik6</dc:creator>
    <dc:date>2018-07-12T19:41:07Z</dc:date>
    <item>
      <title>Gain and Offset Compensation for Voltage and current Measurement</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Gain-and-Offset-Compensation-for-Voltage-and-current-Measurement/m-p/809573#M15802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on 12V Battery Management system project and am using MM9Z1_638 micro controller. I wanted to understand why we need to have the compensations configured for the voltage and temperatures (I know it's a basic question). It would be helpful if you provide an&amp;nbsp;example that explain "what would be the output value if i&amp;nbsp;provide&amp;nbsp; constant input values for the voltages and current and varying the compensation values&lt;/P&gt;&lt;P&gt;&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/65450iAF474E5515D78375/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;&lt;/P&gt;&lt;P&gt;I got a below table where i am NOT able to interpret much. If possible please explain the below table as well&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/65466i9804030140E658F1/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Krishna Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2018 19:41:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Gain-and-Offset-Compensation-for-Voltage-and-current-Measurement/m-p/809573#M15802</guid>
      <dc:creator>krishnakarthik6</dc:creator>
      <dc:date>2018-07-12T19:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Gain and Offset Compensation for Voltage and current Measurement</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Gain-and-Offset-Compensation-for-Voltage-and-current-Measurement/m-p/809574#M15803</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 compensation allows to handle device to device variations, influence of external circuitry and temperature effects, whilst still achieving precise results.&lt;/P&gt;&lt;P&gt;The compensation is a mathematical correction of the measured values, in this case a linear correction using a multiplication factor (gain compensation) and by adding a factor (offset compensation). The compensation is channel specific, that why you see different entries in above table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Lets take the VSENSE2 as example (and explain the principle, not the detailed implementation):&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;going through the picture from left to right...&lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the input voltage vin is scaled by an internal voltage divider &lt;STRONG&gt;vin * 1/28&lt;/STRONG&gt; (desired sigma delta converter input voltage is 0.0 - 1.0V)&lt;/LI&gt;&lt;LI&gt;the scaled vin&amp;nbsp; is sampled by a sigma delta converter, which resolution is &lt;STRONG&gt;sdres = Vref / (2^16-1)&lt;/STRONG&gt; = 1.25V / 65535 ~ 19uV&lt;/LI&gt;&lt;LI&gt;the compensation is using a gain and a offset value&amp;nbsp; &lt;STRONG&gt;out = in * gain + offset&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp; (nominal gain = 1.0679, offset = 0)&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;This results into the following formula:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACQ_VOLT =&amp;nbsp; ( vin * 1/28 * (2^16-1) / Vref&amp;nbsp; ) * gain + offset&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;with nominal values:&lt;/P&gt;&lt;P&gt;ACQ_VOLT = vin * 1/28 * 65535/1.25V * 1.0679&amp;nbsp; + 0 V&lt;/P&gt;&lt;P&gt;or a resulting channel resolution:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;vsense2res&lt;/STRONG&gt; = 28 * 1.25V / 65535 / 1.0679 = &lt;STRONG&gt;0.5 mV / lsb&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having the flexibility to modify &lt;STRONG&gt;gain&lt;/STRONG&gt; and &lt;STRONG&gt;offset&lt;/STRONG&gt; values allows to maintain the 0.5mV/lsb resolution with errors in the system.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Example:&lt;/SPAN&gt; If the scaling is 2 % to low 1/(0.98* 28) a 2% high gain compensation factor 1.0679 * 1.02 would maintain the 0.5mV/lsb resolution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As the compensation is done in the digital domain the &lt;STRONG&gt;representation&lt;/STRONG&gt; of the compensation code has to be known. The table above provides this information. The nominal gain of 1.0679 is represented with a gain code of 0x200. The resolution of the gain code is LSB = 0.000488.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The gain factor for e.g. 0x210 can be calculated:&lt;/P&gt;&lt;P&gt;gain = 1.0679 + (gaincode - default code) * LSB = 1.0679 + 16 * 0.000488 = 1.075708&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Wolfgang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2018 11:33:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Gain-and-Offset-Compensation-for-Voltage-and-current-Measurement/m-p/809574#M15803</guid>
      <dc:creator>Q_man</dc:creator>
      <dc:date>2018-07-13T11:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Gain and Offset Compensation for Voltage and current Measurement</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Gain-and-Offset-Compensation-for-Voltage-and-current-Measurement/m-p/809575#M15804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for detailed explanation Wolfgang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2018 22:25:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Gain-and-Offset-Compensation-for-Voltage-and-current-Measurement/m-p/809575#M15804</guid>
      <dc:creator>krishnakarthik6</dc:creator>
      <dc:date>2018-07-19T22:25:25Z</dc:date>
    </item>
  </channel>
</rss>

