## 4 Dual Filtering
Each filter executes the aforementioned process to estimate either the states or the parameters, and they are linked by exchanging information during the time update step. This interconnected process enables the more accurate tracking of changes in the states and parameters, with the exception of the present capacity. The weak observability of capacity has also been reported [32; 41]. Here, the DEKFs have difficulty accurately estimating capacity. This observation is related to the facts that the terminal voltage is the sole measurement, and capacity is weakly linked to the terminal voltage, according to the derived system model. This inaccuracy in capacity estimation can also negatively impact SOC estimation, owing to its strong dependency on the present capacity. Specifically for capacity estimation, the parameter filter of the developed DEKF was thus replaced with a separate optimization technique based on the weighted least-squares (WLS). As reported in series [42; 43; 44], this method has been continuously improved, aiming at its BMS implementation. The basis of this method is to estimate the present capacity in the least-squares sense by utilizing changes in the shape of a charge curve as capacity decreases. The present capacity is estimated during battery charging, taking advantage of highly standardized and less dynamic charging profiles compared to arbitrary discharging profiles. In practice, however, the shape of the curve is influenced by operational factors before charging; for example, the duty cycle, rest time, SOC, and temperature. The WLS was thus selected to assign varying weights to each data point on the curve, since they differ in reliability for capacity estimation. In consequence, the WLS assigns greater weights to the later part of the curve, as these points are more dependable than those in the earlier part. Despite variations in such operational factors, a capacity error of less than 3% was achieved. However, this original scheme relies on prior information, specifically the past capacity estimate, which serves as the best guess for the true value of the present capacity. Consequently, if batteries or their BMSs are replaced, the stored value of capacity in the BMS no longer matches the actual value. The original scheme is enhanced to eliminate this issue, allowing it to operate independently of such replacements. Meanwhile, the original scheme relies on the WLS as its optimization technique, which necessitates Jacobian calculations and matrix inversion to solve the normal equation. As a result, during batch processing, state estimation requires substantially higher CPU usage and greater memory capacity than data measurement, creating challenges for BMS implementation. The original scheme is enhanced to mitigate these issues by replacing the batch estimator with a recursive estimator for solving the normal equation. This replacement helps distribute CPU usage more evenly and reduces the memory footprint since it eliminates the need for long, multi-vector formulations of the normal equation. By adopting this method, the present capacity was solely estimated during charging, while the states and the remaining parameters were simultaneously estimated by the DEKF during discharging.