Method to compensate measurement error in a battery management system
Voltage measurement techniques for battery cells in a battery management system (BMS) are described. Raw voltage measurements may include errors caused by ohmic losses due to cable impedances and other elements in the BMS. The techniques include performing a calibration cycle to generate correction values based on measured response with discharge switches in different states. The techniques also include scaling the correction values during runtime to correct for filter response errors in the voltage measurement.
1 . A method to compensate for a measurement error in a battery management system, the method comprising:
performing a calibration cycle to calculate a set of correction factors, wherein the set of correction factors are calculated based on determined cable impedances of respective channels in the battery management system, the calibration cycle including:
disabling one or more discharge switches in the channels in the battery management system,
performing a first measurement based on the disabling one or more discharge switches in the channels,
enabling a first discharge switch of the one or more discharge switches in the battery management system,
performing a second measurement based on the enabling the first discharge switch of the one or more discharge switches,
enabling a second discharge switch of the one or more discharge switches in the battery management system,
performing a third measurement based on enabling the second discharge switch of the one or more discharge switches, and
determining at least one cable impedance based on the first, second, and third measurements;
receiving a raw voltage measurement; and
applying at least one correction factor from the set of correction factors to generate a compensated voltage measurement.
2 . The method of claim 1 , further comprising:
determining that the raw voltage measurement is receiving during a discharge switch configuration change;
obtaining a scaling factor related to a filter property used to generate the raw voltage measurement; and
scaling the at least one correction factor with the scaling factor.
3 . A battery management system comprising:
at least one hardware processor; and
at least one memory storing instructions that, when executed by the at least one hardware processor, cause the at least one hardware processor to perform operations comprising:
performing a calibration cycle to calculate a set of correction factors, wherein the set of correction factors are calculated based on determined cable impedances of respective channels in the battery management system, the calibration cycle including:
disabling one or more discharge switches in the channels in the battery management system,
performing a first measurement based on the disabling one or more discharge switches in the channels,
enabling a first discharge switch of the one or more discharge switches in the battery management system,
performing a second measurement based on the enabling the first discharge switch of the one or more discharge switches,
enabling a second discharge switch of the one or more discharge switches in the battery management system,
performing a third measurement based on enabling the second discharge switch of the one or more discharge switches, and
determining at least one cable impedance based on the first, second, and third measurements;
receiving a raw voltage measurement; and
applying at least one correction factor from the set of correction factors to generate a compensated voltage measurement.
4 . The battery management system of claim 3 , further comprising:
determining that the raw voltage measurement is receiving during a discharge switch configuration change;
obtaining a scaling factor related to a filter property used to generate the raw voltage measurement; and
scaling the at least one correction factor with the scaling factor.
5 . A non-transitory machine-readable medium embodying instructions that, when executed by a machine, cause the machine to perform operations comprising:
performing a calibration cycle to calculate a set of correction factors, wherein the set of correction factors are calculated based on determined cable impedances of respective channels in a battery management system, the calibration cycle including:
disabling one or more discharge switches in the channels in the battery management system,
performing a first measurement based on the disabling one or more discharge switches in the channels,
enabling a first discharge switch of the one or more discharge switches in the battery management system,
performing a second measurement based on the enabling the first discharge switch of the one or more discharge switches,
enabling a second discharge switch of the one or more discharge switches in the battery management system,
performing a third measurement based on enabling the second discharge switch of the one or more discharge switches, and
determining at least one cable impedance based on the first, second, and third measurements;
receiving a raw voltage measurement; and
applying at least one correction factor from the set of correction factors to generate a compensated voltage measurement.
6 . The non-transitory machine-readable medium of claim 5 , further comprising:
determining that the raw voltage measurement is receiving during a discharge switch configuration change;
obtaining a scaling factor related to a filter property used to generate the raw voltage measurement; and
scaling the at least one correction factor with the scaling factor.
7 . A method to compensate for a measurement error in a battery management system, the method comprising:
performing a calibration cycle to calculate a set of correction factors, wherein the set of correction factors are calculated based on voltage gain values, the calibration cycle including:
disabling one or more discharge switches in the battery management system,
performing a first measurement based on the disabling one or more discharge switches,
enabling one or more discharge switches in the battery management system with a discharge configuration,
performing a second measurement based on the enabling one or more discharge switches associated with the discharge configuration, and
determining the voltage gain values associated with the discharge switch configuration based on the first and second measurements;
receiving a raw voltage measurement; and
applying at least one correction factor from the set of correction factors to generate a compensated voltage measurement.
8 . The method of claim 7 , further comprising:
determining a change to the discharge switch configuration, and
performing the calibration cycle with the changed discharge switch configuration to determine voltage gain values associated with the change discharge switch configuration.
9 . A battery management system comprising:
at least one hardware processor; and
at least one memory storing instructions that, when executed by the at least one hardware processor, cause the at least one hardware processor to perform operations comprising:
performing a calibration cycle to calculate a set of correction factors, wherein the set of correction factors are calculated based on voltage gain values, the calibration cycle including:
disabling one or more discharge switches in the battery management system,
performing a first measurement based on the disabling one or more discharge switches,
enabling one or more discharge switches in the battery management system with a discharge configuration,
performing a second measurement based on the enabling one or more discharge switches associated with the discharge configuration, and
determining the voltage gain values associated with the discharge switch configuration based on the first and second measurements;
receiving a raw voltage measurement; and
applying at least one correction factor from the set of correction factors to generate a compensated voltage measurement.
10 . The battery management system of claim 9 , the operations further comprising:
determining a change to the discharge switch configuration, and
performing the calibration cycle with the changed discharge switch configuration to determine voltage gain values associated with the change discharge switch configuration.
11 . A non-transitory machine-readable medium embodying instructions that, when executed by a machine, cause the machine to perform operations comprising:
performing a calibration cycle to calculate a set of correction factors, wherein the set of correction factors are calculated based on voltage gain values, the calibration cycle including:
disabling one or more discharge switches in the battery management system,
performing a first measurement based on the disabling one or more discharge switches,
enabling one or more discharge switches in the battery management system with a discharge configuration,
performing a second measurement based on the enabling one or more discharge switches associated with the discharge configuration, and
determining the voltage gain values associated with the discharge switch configuration based on the first and second measurements;
receiving a raw voltage measurement; and
applying at least one correction factor from the set of correction factors to generate a compensated voltage measurement.
12 . The non-transitory machine-readable medium of claim 11 , the operations further comprising:
determining a change to the discharge switch configuration, and
performing the calibration cycle with the changed discharge switch configuration to determine voltage gain values associated with the change discharge switch configuration.