foxBMS  1.6.0
The foxBMS Battery Management System API Documentation
soc_counting.c
Go to the documentation of this file.
1 /**
2  *
3  * @copyright © 2010 - 2023, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright notice, this
12  * list of conditions and the following disclaimer.
13  *
14  * 2. Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  *
18  * 3. Neither the name of the copyright holder nor the names of its
19  * contributors may be used to endorse or promote products derived from
20  * this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  *
33  * We kindly request you to use one or more of the following phrases to refer to
34  * foxBMS in your hardware, software, documentation or advertising materials:
35  *
36  * - ″This product uses parts of foxBMS®″
37  * - ″This product includes parts of foxBMS®″
38  * - ″This product is derived from foxBMS®″
39  *
40  */
41 
42 /**
43  * @file soc_counting.c
44  * @author foxBMS Team
45  * @date 2020-10-07 (date of creation)
46  * @updated 2023-10-12 (date of last update)
47  * @version v1.6.0
48  * @ingroup APPLICATION
49  * @prefix SOC
50  *
51  * @brief SOC module responsible for calculation of SOC
52  *
53  */
54 
55 /*========== Includes =======================================================*/
56 #include "general.h"
57 
58 #include "soc_counting_cfg.h"
59 
60 #include "bms.h"
61 #include "database.h"
62 #include "foxmath.h"
63 #include "fram.h"
64 #include "state_estimation.h"
65 
66 #include <math.h>
67 #include <stdbool.h>
68 #include <stdint.h>
69 
70 /*========== Macros and Definitions =========================================*/
71 /** This structure contains all the variables relevant for the SOX */
72 typedef struct {
73  bool socInitialized; /*!< true if the initialization has passed, false otherwise */
74  bool sensorCcUsed[BS_NR_OF_STRINGS]; /*!< bool if coulomb counting functionality from current sensor is used */
75  float_t ccScalingAverage[BS_NR_OF_STRINGS]; /*!< current sensor offset scaling for average SOC */
76  float_t ccScalingMinimum[BS_NR_OF_STRINGS]; /*!< current sensor offset scaling value for minimum SOC */
77  float_t ccScalingMaximum[BS_NR_OF_STRINGS]; /*!< current sensor offset scaling value for maximum SOC */
78  uint32_t previousTimestamp[BS_NR_OF_STRINGS]; /*!< timestamp buffer to check if current/CC data has been updated */
79 } SOC_STATE_s;
80 
81 /** Maximum SOC in percentage */
82 #define SOC_MAXIMUM_SOC_perc (100.0f)
83 /** Minimum SOC in percentage */
84 #define SOC_MINIMUM_SOC_perc (0.0f)
85 
86 /*========== Static Constant and Variable Definitions =======================*/
87 /** state variable for SOC module */
89  .socInitialized = false,
90  .sensorCcUsed = {GEN_REPEAT_U(false, GEN_STRIP(BS_NR_OF_STRINGS))},
91  .ccScalingAverage = {GEN_REPEAT_U(0.0f, GEN_STRIP(BS_NR_OF_STRINGS))},
92  .ccScalingMinimum = {GEN_REPEAT_U(0.0f, GEN_STRIP(BS_NR_OF_STRINGS))},
93  .ccScalingMaximum = {GEN_REPEAT_U(0.0f, GEN_STRIP(BS_NR_OF_STRINGS))},
94  .previousTimestamp = {GEN_REPEAT_U(0u, GEN_STRIP(BS_NR_OF_STRINGS))},
95 };
96 
97 /** local copies of database tables */
98 /**@{*/
100 /**@}*/
101 
102 /*========== Extern Constant and Variable Definitions =======================*/
103 
104 /*========== Static Function Prototypes =====================================*/
105 
106 /**
107  * @brief calculates string SOC in percentage from passed string charge in As
108  * @param[in] charge_As charge in As
109  * @return returns corresponding string SOC in percentage [0.0, 100.0]
110  */
111 static float_t SOC_GetStringSocPercentageFromCharge(uint32_t charge_As);
112 
113 /**
114  * @brief initializes database and FRAM SOC values via lookup table (average,
115  * minimum and maximum).
116  * @param[out] pTableSoc pointer to database entry with SOC values
117  */
118 static void SOC_RecalibrateViaLookupTable(DATA_BLOCK_SOC_s *pTableSoc);
119 
120 /**
121  * @brief sets SOC value with a parameter between 0.0 and 100.0.
122  * @details limits the SOE value to 0.0 respectively 100.0 if a value outside
123  * of the allowed SOE range is passed. Updates local fram and database
124  * struct but does *NOT* write them
125  * @param[out] pTableSoc pointer to SOC database entry
126  * @param[in] socMinimumValue_perc SOC min value to set
127  * @param[in] socMaximumValue_perc SOC max value to set
128  * @param[in] socAverageValue_perc SOC average value to set
129  * @param[in] stringNumber addressed string
130  */
131 static void SOC_SetValue(
132  DATA_BLOCK_SOC_s *pTableSoc,
133  float_t socMinimumValue_perc,
134  float_t socMaximumValue_perc,
135  float_t socAverageValue_perc,
136  uint8_t stringNumber);
137 
138 /**
139  * @brief Check if all database SOC percentage values are within [0.0, 100.0]
140  * Limits SOC values to limit values if outside of this range.
141  * @param[in,out] pTableSoc pointer to database struct with SOC values
142  * @param[in] stringNumber string that is checked
143  */
144 static void SOC_CheckDatabaseSocPercentageLimits(DATA_BLOCK_SOC_s *pTableSoc, uint8_t stringNumber);
145 
146 /**
147  * @brief Set SOC-related values in non-volatile memory
148  * @param[in] pTableSoc pointer to database struct with SOC values
149  * @param[in] stringNumber addressed string
150  */
151 static void SOC_UpdateNvmValues(DATA_BLOCK_SOC_s *pTableSoc, uint8_t stringNumber);
152 
153 /*========== Static Function Implementations ================================*/
154 static float_t SOC_GetStringSocPercentageFromCharge(uint32_t charge_As) {
155  const float_t charge_mAs = (float_t)charge_As * UNIT_CONVERSION_FACTOR_1000_FLOAT;
157 }
158 
160  FAS_ASSERT(pTableSoc != NULL_PTR);
161  DATA_BLOCK_MIN_MAX_s tableMinMaxCellVoltages = {.header.uniqueId = DATA_BLOCK_ID_MIN_MAX};
162  DATA_READ_DATA(&tableMinMaxCellVoltages);
163 
164  for (uint8_t s = 0u; s < BS_NR_OF_STRINGS; s++) {
165  SOC_SetValue(
166  pTableSoc,
167  SE_GetStateOfChargeFromVoltage(tableMinMaxCellVoltages.minimumCellVoltage_mV[s]),
168  SE_GetStateOfChargeFromVoltage(tableMinMaxCellVoltages.maximumCellVoltage_mV[s]),
169  SE_GetStateOfChargeFromVoltage(tableMinMaxCellVoltages.averageCellVoltage_mV[s]),
170  s);
171  }
173 }
174 
175 static void SOC_SetValue(
176  DATA_BLOCK_SOC_s *pTableSoc,
177  float_t socMinimumValue_perc,
178  float_t socMaximumValue_perc,
179  float_t socAverageValue_perc,
180  uint8_t stringNumber) {
181  FAS_ASSERT(pTableSoc != NULL_PTR);
182  /* Set database values */
183  pTableSoc->averageSoc_perc[stringNumber] = socAverageValue_perc;
184  pTableSoc->minimumSoc_perc[stringNumber] = socMinimumValue_perc;
185  pTableSoc->maximumSoc_perc[stringNumber] = socMaximumValue_perc;
186 
187  if (soc_state.sensorCcUsed[stringNumber] == true) {
188  /* Current sensor database entry is read before the call of SOC_SetValue */
189  float_t ccOffset_perc =
191 
192 #if BS_POSITIVE_DISCHARGE_CURRENT == false
193  ccOffset_perc *= (-1.0f);
194 #endif /* BS_POSITIVE_DISCHARGE_CURRENT == false */
195 
196  /* Recalibrate scaling values */
197  soc_state.ccScalingAverage[stringNumber] = pTableSoc->averageSoc_perc[stringNumber] + ccOffset_perc;
198  soc_state.ccScalingMinimum[stringNumber] = pTableSoc->minimumSoc_perc[stringNumber] + ccOffset_perc;
199  soc_state.ccScalingMaximum[stringNumber] = pTableSoc->maximumSoc_perc[stringNumber] + ccOffset_perc;
200  }
201 
202  /* Limit SOC values to [0.0, 100.0] */
203  SOC_CheckDatabaseSocPercentageLimits(pTableSoc, stringNumber);
204 
205  /* Update non-volatile memory values */
206  SOC_UpdateNvmValues(pTableSoc, stringNumber);
207 
209 }
210 
211 static void SOC_CheckDatabaseSocPercentageLimits(DATA_BLOCK_SOC_s *pTableSoc, uint8_t stringNumber) {
212  FAS_ASSERT(pTableSoc != NULL_PTR);
213  FAS_ASSERT(stringNumber < BS_NR_OF_STRINGS);
214 
215  if (pTableSoc->averageSoc_perc[stringNumber] > SOC_MAXIMUM_SOC_perc) {
216  pTableSoc->averageSoc_perc[stringNumber] = SOC_MAXIMUM_SOC_perc;
217  }
218  if (pTableSoc->averageSoc_perc[stringNumber] < SOC_MINIMUM_SOC_perc) {
219  pTableSoc->averageSoc_perc[stringNumber] = SOC_MINIMUM_SOC_perc;
220  }
221  if (pTableSoc->minimumSoc_perc[stringNumber] > SOC_MAXIMUM_SOC_perc) {
222  pTableSoc->minimumSoc_perc[stringNumber] = SOC_MAXIMUM_SOC_perc;
223  }
224  if (pTableSoc->minimumSoc_perc[stringNumber] < SOC_MINIMUM_SOC_perc) {
225  pTableSoc->minimumSoc_perc[stringNumber] = SOC_MINIMUM_SOC_perc;
226  }
227  if (pTableSoc->maximumSoc_perc[stringNumber] > SOC_MAXIMUM_SOC_perc) {
228  pTableSoc->maximumSoc_perc[stringNumber] = SOC_MAXIMUM_SOC_perc;
229  }
230  if (pTableSoc->maximumSoc_perc[stringNumber] < SOC_MINIMUM_SOC_perc) {
231  pTableSoc->maximumSoc_perc[stringNumber] = SOC_MINIMUM_SOC_perc;
232  }
233 }
234 
235 static void SOC_UpdateNvmValues(DATA_BLOCK_SOC_s *pTableSoc, uint8_t stringNumber) {
236  FAS_ASSERT(pTableSoc != NULL_PTR);
237  FAS_ASSERT(stringNumber < BS_NR_OF_STRINGS);
238  fram_soc.averageSoc_perc[stringNumber] = pTableSoc->averageSoc_perc[stringNumber];
239  fram_soc.minimumSoc_perc[stringNumber] = pTableSoc->minimumSoc_perc[stringNumber];
240  fram_soc.maximumSoc_perc[stringNumber] = pTableSoc->maximumSoc_perc[stringNumber];
241 }
242 
243 /*========== Extern Function Implementations ================================*/
244 
245 void SE_InitializeStateOfCharge(DATA_BLOCK_SOC_s *pSocValues, bool ccPresent, uint8_t stringNumber) {
246  FAS_ASSERT(pSocValues != NULL_PTR);
247  FAS_ASSERT(stringNumber < BS_NR_OF_STRINGS);
249 
251 
252  if (ccPresent == true) {
253  soc_state.sensorCcUsed[stringNumber] = true;
254 
255  float_t scalingOffset_perc =
257 
258  if (soc_tableCurrentSensor.currentCounter_As[stringNumber] < 0) {
259  scalingOffset_perc *= (-1.0f);
260  }
261 
262 #if BS_POSITIVE_DISCHARGE_CURRENT == false
263  scalingOffset_perc *= (-1.0f);
264 #endif /* BS_POSITIVE_DISCHARGE_CURRENT == false */
265 
266  soc_state.ccScalingAverage[stringNumber] = fram_soc.averageSoc_perc[stringNumber] + scalingOffset_perc;
267  soc_state.ccScalingMinimum[stringNumber] = fram_soc.minimumSoc_perc[stringNumber] + scalingOffset_perc;
268  soc_state.ccScalingMaximum[stringNumber] = fram_soc.maximumSoc_perc[stringNumber] + scalingOffset_perc;
269  } else {
271  soc_state.sensorCcUsed[stringNumber] = false;
272  }
273 
274  pSocValues->averageSoc_perc[stringNumber] = fram_soc.averageSoc_perc[stringNumber];
275  pSocValues->minimumSoc_perc[stringNumber] = fram_soc.minimumSoc_perc[stringNumber];
276  pSocValues->maximumSoc_perc[stringNumber] = fram_soc.maximumSoc_perc[stringNumber];
277 
278  SOC_CheckDatabaseSocPercentageLimits(pSocValues, stringNumber);
279 
280  /* Alternatively, SOC can be initialized with {V,SOC} lookup table if available */
281  /* with the function SOC_Init_Lookup_Table() */
282 
283  soc_state.socInitialized = true;
284 }
285 
286 /* INCLUDE MARKER FOR THE DOCUMENTATION; DO NOT MOVE cc-documentation-start-include */
288  /* INCLUDE MARKER FOR THE DOCUMENTATION; DO NOT MOVE cc-documentation-stop-include */
289  FAS_ASSERT(pSocValues != NULL_PTR);
290  bool continueFunction = true;
291  if (soc_state.socInitialized == false) {
292  /* Exit if SOC not initialized yet */
293  continueFunction = false;
294  }
295 
296  if (continueFunction == true) {
297  /* Read current sensor entry for coulomb/current counting or CC recalibration */
299 
301  /* Recalibrate SOC via LUT */
302  SOC_RecalibrateViaLookupTable(pSocValues);
303  } else {
304  for (uint8_t s = 0u; s < BS_NR_OF_STRINGS; s++) {
305  if (soc_state.sensorCcUsed[s] == false) {
306  /* check if current measurement has been updated */
308  float_t timeStep_s =
310  1000.0f;
311 
312  if (timeStep_s > 0.0f) {
313  /* Current in charge direction negative means SOC increasing --> BAT naming, not ROB */
314 
315  float_t deltaSOC_perc = (((float_t)soc_tableCurrentSensor.current_mA[s] * timeStep_s) /
317  100.0f / 1000.0f; /* ((mA) * 1s) / 1As) * 100% */
318 
319 #if BS_POSITIVE_DISCHARGE_CURRENT == false
320  deltaSOC_perc *= (-1.0f);
321 #endif /* BS_POSITIVE_DISCHARGE_CURRENT == false */
322 
323  pSocValues->averageSoc_perc[s] = pSocValues->averageSoc_perc[s] - deltaSOC_perc;
324  pSocValues->minimumSoc_perc[s] = pSocValues->minimumSoc_perc[s] - deltaSOC_perc;
325  pSocValues->maximumSoc_perc[s] = pSocValues->maximumSoc_perc[s] - deltaSOC_perc;
326 
327  /* Limit SOC calculation to 0% respectively 100% */
329 
330  /* Update values in non-volatile memory */
331  SOC_UpdateNvmValues(pSocValues, s);
332  }
334  } /* end check if current measurement has been updated */
335  /* update the variable for the next check */
336  } else {
337  /* check if cc measurement has been updated */
339  float_t deltaSoc_perc =
341 
342 #if BS_POSITIVE_DISCHARGE_CURRENT == false
343  deltaSoc_perc *= (-1.0f);
344 #endif /* BS_POSITIVE_DISCHARGE_CURRENT == false */
345 
346  pSocValues->averageSoc_perc[s] = soc_state.ccScalingAverage[s] - deltaSoc_perc;
347  pSocValues->minimumSoc_perc[s] = soc_state.ccScalingMinimum[s] - deltaSoc_perc;
348  pSocValues->maximumSoc_perc[s] = soc_state.ccScalingMaximum[s] - deltaSoc_perc;
349 
350  /* Limit SOC values to [0.0, 100.0] */
352 
353  /* Update values in non-volatile memory */
354  SOC_UpdateNvmValues(pSocValues, s);
355 
357  } /* end check if cc measurement has been updated */
358  }
359  }
360  /* Update database and FRAM value */
362  }
363  }
364 }
365 
366 extern float_t SE_GetStateOfChargeFromVoltage(int16_t voltage_mV) {
367  float_t soc_perc = 0.50f;
368 
369  /* Variables for interpolating LUT value */
370  uint16_t between_high = 0;
371  uint16_t between_low = 0;
372 
373  /* Cell voltages are inserted in LUT in descending order -> start with 1 as we do not want to extrapolate. */
374  for (uint16_t i = 1u; i < bc_stateOfChargeLookupTableLength; i++) {
375  if (voltage_mV < bc_stateOfChargeLookupTable[i].voltage_mV) {
376  between_low = i + 1u;
377  between_high = i;
378  }
379  }
380 
381  /* Interpolate between LUT values, but do not extrapolate LUT! */
382  if (!(((between_high == 0u) && (between_low == 0u)) || /* cell voltage > maximum LUT voltage */
383  (between_low >= bc_stateOfChargeLookupTableLength))) { /* cell voltage < minimum LUT voltage */
384  soc_perc = MATH_LinearInterpolation(
385  (float_t)bc_stateOfChargeLookupTable[between_low].voltage_mV,
386  bc_stateOfChargeLookupTable[between_low].value,
387  (float_t)bc_stateOfChargeLookupTable[between_high].voltage_mV,
388  bc_stateOfChargeLookupTable[between_high].value,
389  (float_t)voltage_mV);
390  } else if ((between_low >= bc_stateOfChargeLookupTableLength)) {
391  /* LUT SOE values are in descending order: cell voltage < minimum LUT voltage */
392  soc_perc = SOC_MINIMUM_SOC_perc;
393  } else {
394  /* cell voltage > maximum LUT voltage */
395  soc_perc = 100.0f;
396  }
397  return soc_perc;
398 }
399 
400 /*========== Externalized Static Function Implementations (Unit Test) =======*/
401 #ifdef UNITY_UNIT_TEST
402 #endif
uint16_t bc_stateOfChargeLookupTableLength
const BC_LUT_s bc_stateOfChargeLookupTable[]
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
BMS_CURRENT_FLOW_STATE_e BMS_GetBatterySystemState(void)
Returns current battery system state (charging/discharging, resting or in relaxation phase)
Definition: bms.c:1586
bms driver header
@ BMS_AT_REST
Definition: bms.h:76
Database module header.
#define DATA_READ_DATA(...)
Definition: database.h:86
@ DATA_BLOCK_ID_MIN_MAX
Definition: database_cfg.h:99
@ DATA_BLOCK_ID_CURRENT_SENSOR
Definition: database_cfg.h:93
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
Definition: fassert.h:255
float_t MATH_LinearInterpolation(const float_t x1, const float_t y1, const float_t x2, const float_t y2, const float_t x_interpolate)
Linear inter-/extrapolates a third point according to two given points.
Definition: foxmath.c:84
math library for often used math functions
#define UNIT_CONVERSION_FACTOR_1000_FLOAT
Definition: foxmath.h:78
#define UNIT_CONVERSION_FACTOR_100_FLOAT
Definition: foxmath.h:77
FRAM_RETURN_TYPE_e FRAM_ReadData(FRAM_BLOCK_ID_e blockId)
Reads a variable from the FRAM.
Definition: fram.c:211
FRAM_RETURN_TYPE_e FRAM_WriteData(FRAM_BLOCK_ID_e blockId)
Writes a variable to the FRAM.
Definition: fram.c:133
Header for the driver for the FRAM module.
FRAM_SOC_s fram_soc
Definition: fram_cfg.c:71
@ FRAM_BLOCK_ID_SOC
Definition: fram_cfg.h:106
#define NULL_PTR
Null pointer.
Definition: fstd_types.h:77
General macros and definitions for the whole platform.
#define GEN_REPEAT_U(x, n)
Macro that helps to generate a series of literals (for array initializers).
Definition: general.h:250
#define GEN_STRIP(x)
Definition: general.h:261
void SE_CalculateStateOfCharge(DATA_BLOCK_SOC_s *pSocValues)
periodically called algorithm to calculate state-of-charge (SOC)
Definition: soc_counting.c:287
void SE_InitializeStateOfCharge(DATA_BLOCK_SOC_s *pSocValues, bool ccPresent, uint8_t stringNumber)
initializes startup SOC-related values like lookup from nonvolatile ram at startup
Definition: soc_counting.c:245
float_t SE_GetStateOfChargeFromVoltage(int16_t voltage_mV)
look-up table for SOC initialization
Definition: soc_counting.c:366
static float_t SOC_GetStringSocPercentageFromCharge(uint32_t charge_As)
calculates string SOC in percentage from passed string charge in As
Definition: soc_counting.c:154
static SOC_STATE_s soc_state
Definition: soc_counting.c:88
static void SOC_SetValue(DATA_BLOCK_SOC_s *pTableSoc, float_t socMinimumValue_perc, float_t socMaximumValue_perc, float_t socAverageValue_perc, uint8_t stringNumber)
sets SOC value with a parameter between 0.0 and 100.0.
Definition: soc_counting.c:175
#define SOC_MINIMUM_SOC_perc
Definition: soc_counting.c:84
static DATA_BLOCK_CURRENT_SENSOR_s soc_tableCurrentSensor
Definition: soc_counting.c:99
static void SOC_RecalibrateViaLookupTable(DATA_BLOCK_SOC_s *pTableSoc)
initializes database and FRAM SOC values via lookup table (average, minimum and maximum).
Definition: soc_counting.c:159
static void SOC_UpdateNvmValues(DATA_BLOCK_SOC_s *pTableSoc, uint8_t stringNumber)
Set SOC-related values in non-volatile memory.
Definition: soc_counting.c:235
#define SOC_MAXIMUM_SOC_perc
Definition: soc_counting.c:82
static void SOC_CheckDatabaseSocPercentageLimits(DATA_BLOCK_SOC_s *pTableSoc, uint8_t stringNumber)
Check if all database SOC percentage values are within [0.0, 100.0] Limits SOC values to limit values...
Definition: soc_counting.c:211
Header for SOC configuration.
#define SOC_STRING_CAPACITY_As
#define SOC_STRING_CAPACITY_mAs
Header for state-estimation module responsible for the estimation of state-of-charge (SOC),...
uint32_t timestampCurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:224
int32_t current_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:220
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:219
int32_t currentCounter_As[BS_NR_OF_STRINGS]
Definition: database_cfg.h:232
uint32_t timestampCurrentCounting[BS_NR_OF_STRINGS]
Definition: database_cfg.h:235
DATA_BLOCK_ID_e uniqueId
Definition: database_cfg.h:125
int16_t averageCellVoltage_mV[BS_NR_OF_STRINGS]
Definition: database_cfg.h:169
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:167
int16_t maximumCellVoltage_mV[BS_NR_OF_STRINGS]
Definition: database_cfg.h:172
int16_t minimumCellVoltage_mV[BS_NR_OF_STRINGS]
Definition: database_cfg.h:170
float_t averageSoc_perc[BS_NR_OF_STRINGS]
Definition: database_cfg.h:518
float_t minimumSoc_perc[BS_NR_OF_STRINGS]
Definition: database_cfg.h:519
float_t maximumSoc_perc[BS_NR_OF_STRINGS]
Definition: database_cfg.h:520
float_t maximumSoc_perc[BS_NR_OF_STRINGS]
Definition: fram_cfg.h:142
float_t averageSoc_perc[BS_NR_OF_STRINGS]
Definition: fram_cfg.h:143
float_t minimumSoc_perc[BS_NR_OF_STRINGS]
Definition: fram_cfg.h:141
float_t ccScalingMinimum[BS_NR_OF_STRINGS]
Definition: soc_counting.c:76
bool socInitialized
Definition: soc_counting.c:73
uint32_t previousTimestamp[BS_NR_OF_STRINGS]
Definition: soc_counting.c:78
bool sensorCcUsed[BS_NR_OF_STRINGS]
Definition: soc_counting.c:74
float_t ccScalingAverage[BS_NR_OF_STRINGS]
Definition: soc_counting.c:75
float_t ccScalingMaximum[BS_NR_OF_STRINGS]
Definition: soc_counting.c:77