77 int32_t diff_mV = voltageMic_mV - voltageCurrentSensor_mV;
86 int16_t baseCellVoltage,
87 int16_t redundancy0CellVoltage,
88 int16_t *pCellVoltage) {
98 *pCellVoltage = (baseCellVoltage + redundancy0CellVoltage) / 2;
103 int16_t baseCelltemperature,
104 int16_t redundancy0Celltemperature,
105 int16_t *pCelltemperature) {
115 *pCelltemperature = (baseCelltemperature + redundancy0Celltemperature) / 2;
Configuration of the battery system (e.g., number of battery modules, battery cells,...
#define BS_NR_OF_CELLS_PER_MODULE
number of battery cells per battery module (parallel cells are counted as one)
#define BS_NR_OF_MODULES
number of modules in battery pack
#define BS_NR_OF_TEMP_SENSORS_PER_MODULE
number of temperature sensors per battery module
STD_RETURN_TYPE_e DIAG_CheckEvent(STD_RETURN_TYPE_e cond, DIAG_ID_e diag_id, DIAG_IMPACT_LEVEL_e impact, uint32_t data)
DIAG_CheckEvent provides a simple interface to check an event for STD_OK.
@ DIAG_ID_PLAUSIBILITY_CELL_TEMPERATURE_SPREAD
@ DIAG_ID_PLAUSIBILITY_CELL_VOLTAGE_SPREAD
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
math library for often used math functions
#define NULL_PTR
Null pointer.
enum STD_RETURN_TYPE STD_RETURN_TYPE_e
STD_RETURN_TYPE_e PL_CheckStringVoltage(int32_t voltageMic_mV, int32_t voltageCurrentSensor_mV)
Pack voltage plausibility check between LTC and current sensor values.
STD_RETURN_TYPE_e PL_CheckTemperatureSpread(DATA_BLOCK_CELL_TEMPERATURE_s *pCellTemperatures, DATA_BLOCK_MIN_MAX_s *pMinMaxAverageValues)
Cell temperature spread plausibility check.
STD_RETURN_TYPE_e PL_CheckCellvoltage(int16_t baseCellVoltage, int16_t redundancy0CellVoltage, int16_t *pCellVoltage)
Cell voltage plausibility check between two redundant cell voltage measurement values.
STD_RETURN_TYPE_e PL_CheckCelltemperature(int16_t baseCelltemperature, int16_t redundancy0Celltemperature, int16_t *pCelltemperature)
Cell temperature plausibility check between two redundant cell temperature measurement values.
STD_RETURN_TYPE_e PL_CheckVoltageSpread(DATA_BLOCK_CELL_VOLTAGE_s *pCellvoltages, DATA_BLOCK_MIN_MAX_s *pMinMaxAverageValues)
Cell voltage spread plausibility check.
plausibility checks for cell voltage and cell temperatures
#define PL_CELL_TEMPERATURE_TOLERANCE_dK
Maximum difference between redundant cell temperature measurements in deci kelvin.
#define PL_CELL_VOLTAGE_TOLERANCE_mV
Maximum difference between redundant cell voltage measurement.
#define PL_STRING_VOLTAGE_TOLERANCE_mV
Maximum difference between pack voltage measurement from Measurement IC and current sensor.
#define PL_CELL_TEMPERATURE_SPREAD_TOLERANCE_dK
Maximum deviation between a single cell temperature measurement and the average cell temperature in d...
#define PL_CELL_VOLTAGE_SPREAD_TOLERANCE_mV
Maximum deviation between a single cell voltage measurement and the average cell voltage.
int16_t cellTemperature_ddegC[BS_NR_OF_STRINGS][BS_NR_OF_TEMP_SENSORS_PER_STRING]
uint16_t invalidCellTemperature[BS_NR_OF_STRINGS][BS_NR_OF_MODULES]
uint16_t nrValidTemperatures[BS_NR_OF_STRINGS]
int16_t cellVoltage_mV[BS_NR_OF_STRINGS][BS_NR_OF_BAT_CELLS]
uint64_t invalidCellVoltage[BS_NR_OF_STRINGS][BS_NR_OF_MODULES]
float averageTemperature_ddegC[BS_NR_OF_STRINGS]
int16_t averageCellVoltage_mV[BS_NR_OF_STRINGS]