SLAAEF5 March   2024 MSPM0G1505 , MSPM0G1505 , MSPM0G1506 , MSPM0G1506 , MSPM0G1507 , MSPM0G1507 , MSPM0L1303 , MSPM0L1303 , MSPM0L1304 , MSPM0L1304 , MSPM0L1304-Q1 , MSPM0L1304-Q1 , MSPM0L1305 , MSPM0L1305 , MSPM0L1305-Q1 , MSPM0L1305-Q1 , MSPM0L1306 , MSPM0L1306 , MSPM0L1306-Q1 , MSPM0L1306-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Algorithm Introduction
    1. 2.1 Battery Basic Knowledge Introduction
    2. 2.2 Different SOCs and Used Equations
      1. 2.2.1 NomAbsSoc Calculation
        1. 2.2.1.1 Coulometer With OCV Calibration
        2. 2.2.1.2 Battery Model Filter
      2. 2.2.2 CusRltSoc Calculation
      3. 2.2.3 SmoothRltSoc Calculation
    3. 2.3 Algorithm Overview
      1. 2.3.1 Voltage Gauge Introduction
      2. 2.3.2 Current Gauge Introduction
      3. 2.3.3 Capacity Learn Introduction
      4. 2.3.4 Mixing Introduction
  6. 3Gauge GUI Introduction
    1. 3.1 MCU COM Tool
    2. 3.2 SM COM Tool
    3. 3.3 Data Analysis Tool
  7. 4MSPM0 Gauge Evaluation Steps
    1. 4.1 Step1: Hardware Preparation
    2. 4.2 Step2: Get Battery Model
      1. 4.2.1 Battery Test Pattern
      2. 4.2.2 Battery Model Generation
    3. 4.3 Step3: Input Customized Configuration
    4. 4.4 Step4: Evaluation
      1. 4.4.1 Detection Data Input Mode
      2. 4.4.2 Communication Data Input Mode
  8. 5MSPM0 Gauge Solutions
    1. 5.1 MSPM0L1306 + 1 LiCO2 Battery
      1. 5.1.1 Hardware Setup Introduction
      2. 5.1.2 Software and Evaluation Introduction
      3. 5.1.3 Battery Testcases
        1. 5.1.3.1 Performance Test
        2. 5.1.3.2 Current Consumption Test
    2. 5.2 MSPM0G3507 + BQ76952 + 4 LiFePO4 Batteries
      1. 5.2.1 Hardware Setup Introduction
      2. 5.2.2 Software and Evaluation Introduction
      3. 5.2.3 Battery Testcases
        1. 5.2.3.1 Performance Test1 (Pulse Discharge)
        2. 5.2.3.2 Performance Test2 (Load Change)
  9. 6References

Step3: Input Customized Configuration

First, you need to make some system change based on your applications in “Gauge_UserConfig.h”. The common changed parameters are shown in Figure 4-7.

GUID-2B3043B7-0E9C-416D-8145-68A87E61A074-low.png Figure 4-7 Gaugge_UserConfig.h Setting

The explanation of these parameters is shown in Table 4-3.

Table 4-3 System Configuration Parameters
Parameters Comment
DETECTION_MODE Affect the algorithm data input source, described in Section 4.4.
OUTPUT_MODE Control whether to output tested data to GUI, described in Section 4.4.
CELL_NUMBER The cell numbers for the battery pack.
CIRCUIT_TABLE_LENGTH circuitParamsTable length.

Second, you need to fulfill the data structure configuration in “Gauge_UserConfig.c”. A brief introduction to the used data structure in this gauge solution is shown in Figure 4-8.

"tGaugeApplication" represents the battery pack. All the pack related results are saved in "tBattPackParams".

"battGlobalParams_xx" represents every battery cell in the battery pack. All the algorithm data structures are all under it. You need to create the "battGlobalParams_xx" structure same as the battery numbers, and hang it under the "tGaugeApplication", through "battGlobalParamsArray".

GUID-71D4A820-7946-4A69-9D9F-7AADF90D046C-low.png Figure 4-8 Data Structure

The most important data structure is “tBattParamsConfig”, shown in Figure 4-9. It contains all the battery parameter settings and algorithm settings.

GUID-6CE6CD5A-C33B-4379-A0A3-38CF117012AB-low.png Figure 4-9 tBattParamsConfig Structure

For easy evaluation, you only need to change the general configuration parameters. These parameters are divided into five parts. A short description is provided for all these related parameters.

Table 4-4 General Configuration Parameters
Parameters Comment
u16DesignCap_mAh Design capacity. Just input the standard capacity of battery or the tested one through battery parameter generation test.
u16MinBattVoltThd_mV / u16MaxBattVoltThd_mV
i16MaxChgCurtThd_mA / i16MinDhgCurtThd_mA
i8MaxChgTempThd_C / i8MinChgTempThd_C
i8MaxDhgTempThd_C / i8MinDhgTempThd_C
Battery Vcell, Icell and Tcell threshold. They are reserved to control warning flags when the battery situation is above these parameters.
u16MinFullChgVoltThd_mV
u16MaxFullChgVoltThd_mVi16FullChgCurtThd_mA
Battery full related setting. The battery charge voltage should be in this range. u16MinFullChgVoltThd_mV will help to judge when the battery is full. u16MaxFullChgVoltThd_mV will be used as default Full OCV after MCU power on. When the current is below than i16FullChgCurtThd_mA and the voltage is above u16MinFullChgVoltThd_mV, we will treat the battery is full.
u16EmptyDhgVoltThd_mV When voltage reaches this value, we treat battery is empty.
u8AvgBattParamsUpdateCount The average data will be obtained after the settled cycles.
Table 4-5 Mixing Algorithm Related Parameters
Parameters Comment
i8TempThdx_Ci16CurtThdx_mA The current and temperature threshold for iq15AbsEmptySocMatrixInput[], iq15AbsEmptySocMatrix[], iq15AbsFullSocMatrix[]. Only for emptySoc, is input provided. You can use divide range you want according to Section 2.3.4.
iq15AbsEmptySocMatrixInput[] The pretested EmptySoc matrix input. If all is 0, u16EmptyDhgVoltThd_mV is used as the empty OCV to calculate a related EmptySoc. Then, it will be auto learned after cycling.
Table 4-6 Capacity Learn Algorithm Related Parameters
Parameters Comment
i16UnloadCurtLowThd_mA
i16UnloadCurtHighThd_mA
If the current is between this range, the battery will be treated as rest.
Remember to consider the noise of current detection. Otherwise the rest detection will have problem.
u8SOHCalcCycleThd The battery discharge cycle threshold to do SOH calculation.
iq15DefaultSOH_DEC Battery default SOH value.
Table 4-7 VGauge Algorithm Related Parameters
Parameters Comment
u8CircuitTableLength Circuit table length.
u8CircuitTableTestTemp_C
iq15RcellNegTshift_R
iq15RcellPosTshift_R
These parameters are used to evaluate the Rcell under different temperatures. It is by experience and will not affect the performance too much.
Table 4-8 IGauge Algorithm Related Parameters
Parameters Comment
i16AvgLeckageCurt_mA Internal leakage current compensation.
i16PassiveDhgCurt_mA This is reserved for passive discharge current condition.