This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BQ40Z50-R2: BQ40Z50-R2 Average Current

Part Number: BQ40Z50-R2

Hi,

I'm having some questions about the average current measurement.

What is the sample period or number for AverageCurrent() measurement? Or how many Current() values if used are contribute to the AverageCurrent() measurement?

Another question is for Avg I Last Run. Is this the average current of entire last discharge period or just the last updated average current?

Thanks,

Zhihan

  • Hi Zhihan,

    Let me take a look at the firmware code and then get back to you. 

    Andy

  • Hi Zhihan,

    See my answers below.

    What is the sample period or number for AverageCurrent() measurement? Or how many Current() values if used are contribute to the AverageCurrent() measurement?

    [Andy] The AverageCurrent() is based on the Current() and is calculated once per second.  A filter like the one below is applied to the Current() to get the AverageCurrent().

    y[n] = α y[n - 1] + (1 - α) x[n]

    Another question is for Avg I Last Run. Is this the average current of entire last discharge period or just the last updated average current?

    [Andy]  It should be the average current from the last discharge cycle.

    Andy

  • Hi Andy,

    Thank you very much for your answers!

    For the equation, y[n] = α y[n - 1] + (1 - α) x[n], I assume y[n] would be the AverageCurrent() of current second, y[n-1] is AverageCurrent() of previous second, and x[n] is Current() of the current second, right?

    For Avg I Last Run, is this value related to AverageCurrent() algorithm? Let's say from last cycle, we have 100 Current() and AverageCurrent() values. So for Avg I Last Run, the value would be Sum[Current]/100 or the 100th AverageCurrent() value? Or maybe neither?

    Thanks,

    Zhihan

  • See my comments below.

    For the equation, y[n] = α y[n - 1] + (1 - α) x[n], I assume y[n] would be the AverageCurrent() of current second, y[n-1] is AverageCurrent() of previous second, and x[n] is Current() of the current second, right?

    [Andy] Correct.

    For Avg I Last Run, is this value related to AverageCurrent() algorithm? Let's say from last cycle, we have 100 Current() and AverageCurrent() values. So for Avg I Last Run, the value would be Sum[Current]/100 or the 100th AverageCurrent() value? Or maybe neither?

    [Andy]  Sum[Current]/100.

  • Hi Andy,

    Thank you so much for your answer! 

    I have one more question about the AverageCurrent() algorithm. According to SMBus Data Specification v1.1, AverageCurrent() is returning 1 minute rolling average based on current, which seems to be different from the filter you gave me. Is there any particular reason that you decide use a different filter from SMB data spec?

    Thanks again for you help! Really appreciate it!

    Zhihan

  • Hi Zhihan,

    Unfortunately, I don't have a good answer to that question.  As far as I can tell,  the algorithm that calculates the AverageCurrent() is not invented for this part.  The same implementation is probably inherited from some old parts.

    Andy