## 3 Materials and Methods
### Bidirectional DC-DC Converter
Hence, when S2 is OFF and the S1 is ON, \(V_{Lm}\) could be expressed as in Equation (15) below [37];  
\[V_{Lm}=-V_{Batt}=L_{m}.\frac{di_{Lm}}{dt}; \tag{15}\]  
Therefore, the converter parameters during the buck mode were determined as in Equations (16) and (17) [37];  
\[D=\frac{V_{o}}{V_{in}}; \tag{16}\]  
\[L_{min-buck}\geq\frac{(1-D)^{2}V_{o}}{I_{o}2f_{s}}; \tag{17}\]  
where \(\Delta I_{L}\) is considered as 20% of \(I_{L}\). Battery charging, discharging voltage, and current were controlled based on the proposed controller for the battery management strategy. Table 1 shows the converter parameters for both battery capacities under study. Figures 3 and 4 show the operation of the HESS during the charging and discharging modes. During the charging mode, the HESS needs to meet the following conditions:  
* when \(I_{All}>I_{Demand}\) and \(SoC_{HESS}\leq 99\%\), the alternator supplies the current to the vehicle while charging the battery simultaneously. While during discharging, the following conditions have to be met;
* when \(I_{Demand}\geq CCC\) and the \(SoC_{HESS}\geq 99\%\) (i.e., \(SoC_{LAB}=100\%\)\(SoC_{LIB}=100\%\)), which means that the HESS supplies the required CCC to start the vehicle while maintaining the HESS SoC above 98.9%. * when \(I_{Demand}\leq I_{Alex}\) and \(SoC_{HESS}\geq 97\%\), means that the HESS supplies the auxiliary loads of the vehicle while sustaining the HESS state-of-charge above 97%. Integrated Fuzzy-Logic and Triple-Loop PI-Based Control  
In this subsection, the integrated fuzzy logic and triple-loop PI BMS-based control for the HESS is discussed. The bidirectional DC-DC buck-boost converters were controlled by the pulse width modulation (PWM). The voltage and current of the converters were controlled by the PI controllers. The control technique controls the input voltage and generates the required output voltage and current based on the reference voltage and current. The controller was used to improve the efficiency of the bidirectional DC-DC buck-boost converter by controlling the current and the voltage during charging and discharging modes. The single-loop PI control could not achieve the desired stability, voltage, and current output of the bidirectional DC-DC buck-boost converters. Therefore, a triple-loop was used in each DC-DC converter to monitor the current and voltage during charging and discharging modes. Figure 5 shows the experimental procedure for this research study. During the discharging mode, the first PI controller controlled the voltage ranges. The difference between the reference voltage (i.e., \(V_{ref}\)) with the battery voltage (i.e., \(V_{batt}\)) was sent to the PI controller. The output of PI was limited and multiplied with the reference CCC from FLC. The difference between reference CCC with the battery current (\(I_{p}\)) proceeding to the second PI was connected to the PWM DC generator, which supplied the MOSFET (i.e., S1 and S2). The saw tooth PWM generator from MATLAB under the generator of different signals was used for the research. The waveform peak value between 1 and \(-1\) was used. The producer output is stated as the pair of time values for imitation. Figure 4: Logic flow chart of the proposed rule-based BMS for HESS during discharging mode operation, Reproduced from [37]. During charging mode, the difference in value between the reference charging voltage (i.e., \(V_{(ch-ref)}\)) with \(V_{Bat}\) was sent to the PI controller, which generated the current charging reference (i.e., \(I_{(ch-ref)}\)) based on the characteristics of the battery, and it followed the same procedure as in the discharging mode. The PI controller used for the research study was found in MATLAB and Simulink (i.e., version 2019a, MathWorks, Natick, MA, USA) library and the PI controller was formulated as in Equation (18) as in [37]:  
\[\rho=P+I\times T_{\rm s}\frac{1}{(z-1)}; \tag{18}\]  
where \(\rho\) is the control compensation factor of the PI control. The saturation output of PI was set between 0 and 0.98.