*3.2. Sensor Faults*

A fault is defined as a deviation of at least one property or parameter of the system from the standard condition. Faults are commonly classified as actuator faults, sensor faults, and component/parameter faults. They can affect the control action from the controller, produce measurement errors, or change the input/output properties of the system, which leads to degradation and damage of the system [20]. This paper focuses on sensor faults.

Readings from the sensors in the BMS have an important role in estimating other characteristics of the battery. For instance, the measurements from voltage and current sensors can affect the estimation of SOC. A ±1 mV voltage accuracy system used to calculate SOC in a lithium nickel manganese cobalt oxide (NMC) cell can have a base error of 0.2%. If the same accuracy is used to acquire a lithium iron phosphate (LFP) cell's SOC, then a base error of 5.9% can be expected [21].

The BMS current and voltage sensors used in EVs application can be affected by two types of fault: bias (offset), and gain (scaling) faults. Bias fault is a constant offset from the sensor signal during normal operation. Gain fault happens when the measurement magnitudes are scaled by a factor, while the signal form itself does not change. The faults are considered additive and can be modelled as follows [4]:

$$
\overline{y} = y + f \tag{16}
$$

where *y* is the measured value of current and voltage from the sensors, *y* is the actual current or voltage, and *f* is the sensor fault.

### *3.3. Online Fault Detection Using Weighted Moving Average Filter and Cumulative Sum Control Chart*

WMA is a low-pass filter that is used for smoothing fluctuations, such as noise in a time series, to allow for more reliable trend analysis. Additionally, one can use WMA to compute short-term forecasts of time series [22]. The RLS-estimated ECM parameters are time series that contain noise and small fluctuations due to operational conditions (SOC and temperature) and degradation of the cells. A fault, however, is expected to affect the parameters more significantly. Therefore, the difference between WMA-filtered and unfiltered values of the ECM parameters during normal operation of the battery should be considerably smaller than when a fault first occurs. The WMA chosen for the proposed FDI is a two-term WMA to minimize storage requirement. The formula is presented in Equation (17).

$$P\_{f,k} = \lambda\_{WMA} P\_{i,k} + (1 - \lambda\_{WMA}) P\_{f,k-1} \tag{17}$$

where *Pf*,*<sup>k</sup>* is the *k*th WMA value, *Pi*,*<sup>k</sup>* is the *k*th unfiltered value obtained from RLS (*P* represents R0, R1, and C1), and λWMA is the weighting factor. The discrepancy between Pf,k and Pi,k is characterized by an absolute fractional error term, as shown in Equation (18).

$$\sigma(P\_k) = \left| \frac{P\_{i,k} - P\_{f,k}}{P\_{f,k}} \right| \tag{18}$$

The error is monitored using CUSUM, a common change-point detection algorithm, which accumulates deviations of data and signals when the cumulative sum exceeds a certain threshold. The algorithm is outlined in Equation (19) below [23]:

$$S(\mathcal{e}(P\_k)) \ = \max\{0, S(\mathcal{e}(P\_{k-1})) + \mathcal{e}(P\_k) - (\mu\_0 - L\sigma)\}\tag{19}$$

where S is the cumulative sum value, <sup>S</sup>(e(P0)) = 0; e is the absolute fractional error from Equation (18); μ0 and σ are the mean and standard deviation of the error population; and L is a specified constant.

In this paper, the λWMA value from Equation (17) is set to 0.01, since it is more favourable for the filter to obtain a smooth line which can adapt to minor changes over a long period of time, such as noise or degradation effect. In Equation (19), the expected value for μ0 is 0, and σ is estimated experimentally. During normal operation, the unfiltered values should not deviate from the smooth filtered line, because the amplitude of fluctuation is not significant. When a fault occurs, the unfiltered values would diverge significantly from the smooth filtered series. The CUSUM algorithm detects this divergence by indicating a fault (F(Pk) = 1) when <sup>S</sup>(e(Pk)) exceeds an experimentally calibrated threshold J, as shown in Equation (20). When a fault is detected, the BMS will produce an alarm; and appropriate actions, such as replacing the faulty sensor, will be taken to resolve the fault.

$$F(P\_k) = \begin{cases} 1 & \text{if } S(\mathfrak{e}(P\_k)) > f \\ 0 \text{ if } S(\mathfrak{e}(P\_k)) < f \end{cases} \tag{20}$$

The method outlined in this section can only be used for fault detection, not fault isolation. The full proposed FDI scheme will be shown in Section 4.5, after determining the effects of different sensor faults on ECM parameters. Since there has not been any work done in literature to determine fault effects on parameters, preliminary experiments will need to be performed to obtain this data before completing the full FDI scheme. The isolation will be based on the response time of the parameters when a certain fault occurs.

### **4. E**ff**ect of Degradation and Faults on ECM Parameters**

In order to determine and validate the effect of degradation and faults on the ECM parameters, testing was done on an LFP pouch cell in a laboratory environment. The specifications of the cell at the initial state are listed in Table 1.

**Table 1.** Lithium iron phosphate (LFP) cell specifications.

