Optimal Adaptive Gain LQR-Based Energy Management Strategy for Battery–Supercapacitor Hybrid Power System

: This paper aims at presenting an energy management strategy (EMS) based upon optimal control theory for a battery–supercapacitor hybrid power system. The hybrid power system consists of a lithium-ion battery and a supercapacitor with associated bidirectional DC/DC converters. The proposed EMS aims at computing adaptive gains using the salp swarm algorithm and load following control technique to assign the power reference for both the supercapacitor and the battery while achieving optimal performance and stable voltage. The DC/DC converter model is derived utilizing the ﬁrst-principles method and computes the required gains to achieve the desired power. The fact that the developed algorithm takes disturbances into account increases the power elements’ life expectancies and supplies the power system with the required power.


Introduction
Nowadays, with the expansion of the energy crisis and ecological pollution, hybrid power systems (HPSs) are becoming a strategic solution. Hybrid power systems (HPSs) are a set of co-operating power sources, and the coordination of their operation is realized using advanced power electronics systems [1]. Due to its advantages, a HPS can be employed for Electrical Vehicles (EV) (EV) applications [2][3][4] or stationary applications [5][6][7]. This has resulted in a spark of interest in the research field, with different hybridizations and energy management strategies having been developed to further reduce emissions and improve fuel economy [8].
Battery-supercapacitor HPSs are receiving more attention due to their superior performance and simplicity of control. The lithium battery, despite having a high energetic density, does not yield a high enough power density, while the opposite can be said about the supercapacitor. A hybridization thus proves suitable to increase both components' lifetime and improve the overall performance, especially considering storage elements' states of charge and temperatures. Using the supercapacitor in the case of sudden load variations is an example. In addition to that, high-frequency disturbances negatively affect the battery's life expectancy, which can be alleviated by the supercapacitor due to its characteristics. The main challenge is to provide a suitable energy management strategy (EMS) that takes all of these factors into account to provide optimal performance while considering different constraints.
Various methods concerning the energy management of a hybrid power system have been reported in the literature [9][10][11]. They are generally divided into a group of three main methods: optimization-based methods, rule-based methods, or, more recently, learningbased methods. Figure 1 showcases the three main categories of energy management strategies and some of the methods involved.
Energies 2021, 14, x FOR PEER REVIEW 2 of 17 strategy (EMS) that takes all of these factors into account to provide optimal performance while considering different constraints. Various methods concerning the energy management of a hybrid power system have been reported in the literature [9][10][11]. They are generally divided into a group of three main methods: optimization-based methods, rule-based methods, or, more recently, learning-based methods. Figure 1 showcases the three main categories of energy management strategies and some of the methods involved. Optimization-based methods make use of the tools provided by optimization theory to solve the problem at hand, the latter being an optimal distribution of the load power amongst the battery-supercapacitor hybrid system such that it improves upon their life expectancies given their respective constraints (state of charge and supercapacitor voltage, for instance). The optimization-based strategies can be subcategorized into two main groups: offline optimization (global optimization) strategies and online optimization (real-time optimization) strategies.
Offline optimization strategies are computationally complexed strategies, which require the pre-knowledge of the load profile. This makes it challenging to implement them in real-time. The most popular strategies are dynamic programming (DP) [12][13][14], stochastic dynamic programming (SDP) [15], and the genetic algorithm (GA) [2,16]. These strategies are mainly used as a benchmark to evaluate the performance of the other strategies.
The online optimization strategies are applicable in a real-time scenario, such as computing the optimal distribution of energy amongst a hybrid system given the power load. In this category, the cost function depends only on the actual state of the system [17]. Methods such as model predictive control (MPC) [18,19], the equivalent consumption minimization strategy (ECMS) [20,21], and the external energy maximization strategy (EEMS) [22] can qualify as online optimization methods.
Rule-based methods, on the other hand, can be summed into a series of IF-THEN scenarios. There are mainly three categories: deterministic rule-based strategies, Boolean logic strategies, and fuzzy logic strategies. State machine control (SMC) [23,24] is one of the most used strategies as a deterministic Boolean which is based on the hysteric controller. It can be easily implemented in a real-time scenario. Another method is to use a fuzzy logic-based EMS [25,26], which proves quite robust and makes its decision regarding the power distribution dependent on the output of its membership functions and can be easily tuned to achieve optimal operation. The main drawback of these methods is that the elaboration of said rules requires the knowledge and experience of an expert, which is not always available. Optimization-based methods make use of the tools provided by optimization theory to solve the problem at hand, the latter being an optimal distribution of the load power amongst the battery-supercapacitor hybrid system such that it improves upon their life expectancies given their respective constraints (state of charge and supercapacitor voltage, for instance). The optimization-based strategies can be subcategorized into two main groups: offline optimization (global optimization) strategies and online optimization (realtime optimization) strategies.
Offline optimization strategies are computationally complexed strategies, which require the pre-knowledge of the load profile. This makes it challenging to implement them in real-time. The most popular strategies are dynamic programming (DP) [12][13][14], stochastic dynamic programming (SDP) [15], and the genetic algorithm (GA) [2,16]. These strategies are mainly used as a benchmark to evaluate the performance of the other strategies.
The online optimization strategies are applicable in a real-time scenario, such as computing the optimal distribution of energy amongst a hybrid system given the power load. In this category, the cost function depends only on the actual state of the system [17]. Methods such as model predictive control (MPC) [18,19], the equivalent consumption minimization strategy (ECMS) [20,21], and the external energy maximization strategy (EEMS) [22] can qualify as online optimization methods.
Rule-based methods, on the other hand, can be summed into a series of IF-THEN scenarios. There are mainly three categories: deterministic rule-based strategies, Boolean logic strategies, and fuzzy logic strategies. State machine control (SMC) [23,24] is one of the most used strategies as a deterministic Boolean which is based on the hysteric controller. It can be easily implemented in a real-time scenario. Another method is to use a fuzzy logic-based EMS [25,26], which proves quite robust and makes its decision regarding the power distribution dependent on the output of its membership functions and can be easily tuned to achieve optimal operation. The main drawback of these methods is that the elaboration of said rules requires the knowledge and experience of an expert, which is not always available.
Learning-based methods make use of the recent advancements regarding machine learning (ML) such as reinforcement learning (RL) [27,28], and deep learning (DL) [29,30], a sub-field of artificial intelligence (AI), which has seen a surge in its use over the last decade. They have proven to yield excellent results in some fields, especially in image classification, hence their extensive use in some other fields, including energy management. A model has to be trained using a database, which is not always available. This can prove quite difficult, notably because not enough research has been conducted in this relatively recent field. Another drawback is the fact that they have no guarantee to work for data outside those used for training.
Despite their use in some cases [31,32], none of these strategies combined the advantages procured by the frequency decoupling approach and optimization-based strategies. The proposed method overcomes some of the drawbacks of the load following technique while providing the benefits of optimization-based methods, thus improving the overall HPS performance.
The load following (LF) strategy is a management strategy, which is mainly based on generating the power references based on the measured load power and the storage system state of charge. The LF strategy has been widely used for controlling hybrid power systems such as battery/SC or FC/battery/SC. Bizon et al. [33,34] proposed a real-time optimized LF strategy using global extremum seeking (GES).
The extremum seeking control (ESC) algorithm is an adaptive search technique for extremes of a nonlinear function [35]. However, this optimization strategy is very sensitive to the filter's parameters. Thus, the design is very difficult.
The proposed method consists of combining the load following (LF) approach with an optimal control by using a linear quadratic regulator (LQR) in order to compute the control gains, which will be updated by means of the salp swarm algorithm. Comparing with the GES, this proposed strategy is very easy where the optimizer will update the control parameters without designer expertise. The models used in simulations were achieved through a literature review [36,37].
In order to distribute the required power between the two energy sources, a load following strategy (LFS) is adopted. The bus voltage will be stabilized by the supercapacitor due to its fast dynamics, while the battery will handle the load power and the supercapacitor required power. The main contribution comes from the usage of both a lower-level control architecture as well as a higher-level one, which allows improving the energy quality while diminishing the strains on the power sources, thus achieving a higher life cycle.
The main contributions of the paper are summarized below: • Robust control ensures a good energy quality provided to the load side and an extended Hybrid Energy Storage System (HESS) component lifetime; • Combination of different methods to achieve an optimal performance.

HPS Topology Structure and Modeling
Batteries have the characteristics of a high energy density and relatively low power density. Moreover, the internal resistance could increase when the battery operates with high-frequency loads, which leads to its degradation. Supercapacitors have a high power density with a high number of charging/discharging cycles. Thus, the combination of a battery and a supercapacitor can provide a complementary advantage to meet the load demand [38].
In the literature, passive, semi-active, and active topologies have been reported. Each one has its characteristics. Figure 2 illustrates these topologies.
As displayed in Figure 3a, the configuration of the studied HPS is based on the fully active topology. The electrical power system is composed of a supercapacitor and a lithium battery, where each one of them connects the DC bus through bidirectional DC/DC converters to power the load, as detailed in Figure 3b. In this system, the proposed EMS is based on the optimal power-sharing method (LQR) that calculates the references to the low-level controllers in order to satisfy the load demand while a high-level control minimizes the DC bus overshoots under step loads. As displayed in Figure 3a, the configuration of the studied HPS is based on the fully active topology. The electrical power system is composed of a supercapacitor and a lithium battery, where each one of them connects the DC bus through bidirectional DC/DC converters to power the load, as detailed in Figure 3b. In this system, the proposed EMS is based on the optimal power-sharing method (LQR) that calculates the references to the low-level controllers in order to satisfy the load demand while a high-level control minimizes the DC bus overshoots under step loads. In this paper, a Li-ion battery was selected as a principal source due to its proven efficiency and high energy density as opposed to other battery technologies. A model available in MATLAB's SPS (SimPowerSystems) Toolbox was considered in order to validate the proposed EMS by simulation. The battery model depicted in Figure 4 is based on the Thévenin circuit. This battery model is detailed in [31]. The battery voltage is expressed as follows:  As displayed in Figure 3a, the configuration of the studied HPS is based on the fully active topology. The electrical power system is composed of a supercapacitor and a lithium battery, where each one of them connects the DC bus through bidirectional DC/DC converters to power the load, as detailed in Figure 3b. In this system, the proposed EMS is based on the optimal power-sharing method (LQR) that calculates the references to the low-level controllers in order to satisfy the load demand while a high-level control minimizes the DC bus overshoots under step loads. In this paper, a Li-ion battery was selected as a principal source due to its proven efficiency and high energy density as opposed to other battery technologies. A model available in MATLAB's SPS (SimPowerSystems) Toolbox was considered in order to validate the proposed EMS by simulation. The battery model depicted in Figure 4 is based on the Thévenin circuit. This battery model is detailed in [31]. The battery voltage is expressed as follows: In this paper, a Li-ion battery was selected as a principal source due to its proven efficiency and high energy density as opposed to other battery technologies. A model available in MATLAB's SPS (SimPowerSystems) Toolbox was considered in order to validate the proposed EMS by simulation. The battery model depicted in Figure 4 is based on the Thévenin circuit. This battery model is detailed in [31]. The battery voltage is expressed as follows: where V batt is the battery voltage, E 0 is the battery constant voltage (V), K is the polarization constant (V/Ah), Q is the battery capacity (Ah), i* is the filtered battery current (A), i t is the actual battery charge (Ah), A b is the exponential zone amplitude (V), B is the exponential zone time constant inverse (Ah (−1) ), and R b is the battery internal resistance (Ω). As for the polarization resistance Pol res , which is only present when charging the battery, it is expressed as follows: is the actual battery charge (Ah), Ab is the exponential zone amplitude (V), B is the ex-ponential zone time constant inverse (Ah (−1) ), and Rb is the battery internal resistance (Ω). As for the polarization resistance Polres, which is only present when charging the battery, it is expressed as follows: The detailed battery scheme is given in Figure 4. Supercapacitors, despite not being able to withhold as much energy as Li-ion batteries, are able to release energy at a faster rate due to their high dynamics. The considered model also comes from MATLAB's SPS Toolbox, where more details can be found in [4]. The supercapacitor output voltage VSC is given as follows: where QT is the total electric charge (Coulombs), CT is the supercapacitor module capacitance, RSC is the supercapacitor module resistance (Ω), and iSC is the supercapacitor module current (A). It is dependent on the supercapacitor's state of charge. The supercapacitor block is given in Figure 5.  The detailed battery scheme is given in Figure 4. Supercapacitors, despite not being able to withhold as much energy as Li-ion batteries, are able to release energy at a faster rate due to their high dynamics. The considered model also comes from MATLAB's SPS Toolbox, where more details can be found in [4]. The supercapacitor output voltage V SC is given as follows: where Q T is the total electric charge (Coulombs), C T is the supercapacitor module capacitance, R SC is the supercapacitor module resistance (Ω), and i SC is the supercapacitor module current (A). It is dependent on the supercapacitor's state of charge. The supercapacitor block is given in Figure 5.
where Vbatt is the battery voltage, E0 is the battery constant voltage (V), K is the polarization constant (V/Ah), Q is the battery capacity (Ah), i * is the filtered battery current (A), it is the actual battery charge (Ah), Ab is the exponential zone amplitude (V), B is the exponential zone time constant inverse (Ah (−1) ), and Rb is the battery internal resistance (Ω). As for the polarization resistance Polres, which is only present when charging the battery, it is expressed as follows: The detailed battery scheme is given in Figure 4. Supercapacitors, despite not being able to withhold as much energy as Li-ion batteries, are able to release energy at a faster rate due to their high dynamics. The considered model also comes from MATLAB's SPS Toolbox, where more details can be found in [4]. The supercapacitor output voltage VSC is given as follows: where QT is the total electric charge (Coulombs), CT is the supercapacitor module capacitance, RSC is the supercapacitor module resistance (Ω), and iSC is the supercapacitor module current (A). It is dependent on the supercapacitor's state of charge. The supercapacitor block is given in Figure 5.  Two main models are used throughout the literature: the switching model and the average one. The average model proves sufficient for this case. The switching models are mainly used for design purposes and to investigate types of pulse width-modulated schemes with regard to switching harmonics and losses. These models require a low sampling time to observe all the switching actions, which makes the simulation very time-consuming, hence the choice of an average model for this paper.

The Proposed EMS
The proposed EMS is based on the load following strategy (LFS). It possesses two main components: a lower-level controller and a higher-level one. The power reference for each source is generated by the higher-level controller, while the lower-level one compensates for the DC bus current fluctuations, ensuring an optimal performance paired with an overall better energy quality. The operating control scheme is illustrated in Figure 6.
handles the high-frequency power. The DC power reference is generated based on the DC bus voltage, where an LQR is used to stabilize it. The available bus energy can be expressed as where Ebus is the bus energy, and Pload, PSC, and Pbatt are the load, supercapacitor, and battery powers, respectively. The supercapacitor power reference can be obtained as where the required power by the bus can be obtained using an LQR controller. The battery mainly feeds the load and maintains the DC voltage at the reference value. An LQR controller is used for generating the SC required power. The control law can be written as = + where the supercapacitor power required is generated by an LQR controller. At the higher-level EMS, the supercapacitor power regulates the DC bus voltage and handles the high-frequency power. The DC power reference is generated based on the DC bus voltage, where an LQR is used to stabilize it. The available bus energy can be expressed as dE bus dt = P SC + P batt − P load (5) where E bus is the bus energy, and P load , P SC , and P batt are the load, supercapacitor, and battery powers, respectively. The supercapacitor power reference can be obtained as where the required power by the bus can be obtained using an LQR controller. The battery mainly feeds the load and maintains the DC voltage at the reference value. An LQR controller is used for generating the SC required power. The control law can be written as P re f batt = P req SC + P load where the supercapacitor power required is generated by an LQR controller. The lower level generates the duty cycle for each converter, based on the generated power references. The current references will be generated and compared with the measured ones. The regulation process will be achieved using the current LQR. The adaptation of the controller parameters will be realized by means of the SSA real-time optimizer. The detailed control scheme is described in Figure 7.
The LQR (linear quadratic regulator) is an optimal controller that is used extensively due to its solid performances. It relies upon the minimization of the cost function J: where Q and R are the control parameters, and u is the control signal. A state feedback control is present by: U = −Kx(t), U being the control input, x(t) the state vector, and K = R (−1) B T . S is the gain matrix defined as A and B are the model state space matrices.
due to its solid performances. It relies upon the minimization of the cost function J: where Q and R are the control parameters, and u is the control signal. A state feedback control is present by: U = −Kx(t), U being the control input, x(t) the state vector, and K = R (−1) B T . S is the gain matrix defined as = (8) While S is the symmetric positive definite solution to the algebraic Riccati equation: A and B are the model state space matrices.

LQR Controller
Q and R are symmetric positive definite weighing matrices. They are chosen depending on the desired closed loop performance, with the Q matrix penalizing the states while the R matrix penalizes the actuators. An augmented system regrouping the battery's and the supercapacitor's voltages and currents is given: The control law U becomes = = − where the LQR matrices are provided in the Appendix A.

LQR Controller
Q and R are symmetric positive definite weighing matrices. They are chosen depending on the desired closed loop performance, with the Q matrix penalizing the states while the R matrix penalizes the actuators. An augmented system regrouping the battery's and the supercapacitor's voltages and currents is given: The control law U becomes (11) where the LQR matrices are provided in the Appendix A.

SSA Optimizer
The salp swarm algorithm (SSA) is a meta-heuristic algorithm created by Mirjalili [39]. This optimizer is inspired by the movement of salps in the ocean. It is mainly characterized by its fast resolving and high precision. In the agent set, there are two types of agents: leader and followers, where the movement of each one can be modeled as where LP(k) is the leader position at iteration k, FP(k) is the food position (the target) at iteration k, and c 2 and c 3 are random variables [0,1]. ub and lb are the upper and lower search space limits. The follower's movement can be modeled as where FP i (k) is the i-th follower position, where it updates its position according to its position and the precedent agent position. The objective function is to minimize the voltage reference and ensure safe operating to the HPS. The objective function can be written as a function of the error as For the HPS, there are four errors: the bus voltage error, the supercapacitor error, the battery current error, and the supercapacitor error.
Based on the measured objective function, which is the integral square error, the SSA generates the following parameters:

Simulation Results
In this part, MATLAB-Simulink is used to validate the proposed EMS. The system parameters are summarized in Table 1, where R 1 and R 2 are the internal converter resistors (Ω); L 1 and L 2 are the converter inductors (mH); V SC ref is the SC voltage reference (V); V re f bus is the (V); C SC and C bus are the SC and the bus capacitance values, respectively (F); C batt is the battery capacity (Ah).

Parameters
Value To validate the performance of the proposed EMS, the load profile illustrated in Figure 8 is used. The simulation results are given in Figure 9. At the beginning, the load is positive, which is supplied by the battery, then it will be negative, and the battery will charge itself. The battery State of Charge (SoC) is given in Figure 10. To validate the performance of the proposed EMS, the load profile illustrated in Figure 8 is used. The simulation results are given in Figure 9. At the beginning, the load is positive, which is supplied by the battery, then it will be negative, and the battery will charge itself. The battery State of Charge (SoC) is given in Figure 10.    As illustrated in Figure 9, the load is mainly provided by the battery, where the supercapacitor supplies the transitory power, which means that its average power is zero. The battery charges the supercapacitor to hold its voltage at the reference value, where the initial supercapacitor voltage is less than the reference, as illustrated in Figure 11. Thus, the supercapacitor power is negative to charge itself.  As illustrated in Figure 9, the load is mainly provided by the battery, where the supercapacitor supplies the transitory power, which means that its average power is zero. The battery charges the supercapacitor to hold its voltage at the reference value, where the initial supercapacitor voltage is less than the reference, as illustrated in Figure 11. Thus, the supercapacitor power is negative to charge itself. The proposed EMS stabilizes the bus voltage against the high steps in the load power. The optimal updating mechanism allows the LQR voltage controller to change its parameters depending on the error between the measured and the reference voltage, which enhances the controller performance. The bus voltage is illustrated in Figure 12. The proposed control method is compared with the classical LF strategy. The proposed EMS stabilizes the bus voltage against the high steps in the load power. The optimal updating mechanism allows the LQR voltage controller to change its parameters depending on the error between the measured and the reference voltage, which enhances the controller performance. The bus voltage is illustrated in Figure 12. The proposed control method is compared with the classical LF strategy. The proposed EMS stabilizes the bus voltage against the high steps in the load power. The optimal updating mechanism allows the LQR voltage controller to change its parameters depending on the error between the measured and the reference voltage, which enhances the controller performance. The bus voltage is illustrated in Figure 12. The proposed control method is compared with the classical LF strategy.  The proposed strategy updates its control parameters depending on the measured objective function; thus, the system performance is improved, as illustrated in Figure 12.
To emulate the real load behavior, the load profile represented in Figure 13 is used. The simulation results are given in Figure 14. The battery SoC is presented in Figure 15. The proposed strategy updates its control parameters depending on the measured objective function; thus, the system performance is improved, as illustrated in Figure 12.
To emulate the real load behavior, the load profile represented in Figure 13 is used. The simulation results are given in Figure 14. The battery SoC is presented in Figure 15.    As given in these figures, the load is principally supplied by the battery power, where the fast load variations are supplied by the supercapacitor power.
The optimal adaptive LQR controllers successfully stabilize the bus and the supercapacitor voltage, as represented in Figures 16 and 17. As given in these figures, the load is principally supplied by the battery power, where the fast load variations are supplied by the supercapacitor power.
The optimal adaptive LQR controllers successfully stabilize the bus and the supercapacitor voltage, as represented in Figures 16 and 17. As given in these figures, the load is principally supplied by the battery power, where the fast load variations are supplied by the supercapacitor power.
The optimal adaptive LQR controllers successfully stabilize the bus and the supercapacitor voltage, as represented in Figures 16 and 17.  In this case, which emulates the real load demand, the bus voltage is stabilized where the maximum overshoot voltage is 5.6 V (1.25%) for significant steps in the load (about 60 A/s). The voltage ripple is minimized by means of the optimal adaptation process (ΔV = 4 V).
The obtained results from Figure 12 prove the ability of the proposed strategy to meet the load demand under different conditions with excellent quality comparing with the classical method. Moreover, as illustrated in Figures 11 and 16, the supercapacitor state of charge is almost fixed at its reference due to the fast response of the management system. As given in Figure 9, the reduced stress at the battery system will extend its lifespan, which is an important issue during the design of the HPS.
In addition to its superior performance, the features of the meta-heuristic optimizer make the design easier and more flexible because these optimization methods do not require the exact mixing of optimization parameters. In this case, which emulates the real load demand, the bus voltage is stabilized where the maximum overshoot voltage is 5.6 V (1.25%) for significant steps in the load (about 60 A/s). The voltage ripple is minimized by means of the optimal adaptation process (∆V = 4 V).
The obtained results from Figure 12 prove the ability of the proposed strategy to meet the load demand under different conditions with excellent quality comparing with the classical method. Moreover, as illustrated in Figures 11 and 16, the supercapacitor state of charge is almost fixed at its reference due to the fast response of the management system. As given in Figure 9, the reduced stress at the battery system will extend its lifespan, which is an important issue during the design of the HPS.
In addition to its superior performance, the features of the meta-heuristic optimizer make the design easier and more flexible because these optimization methods do not require the exact mixing of optimization parameters.

Conclusions
In this paper, a new optimal energy management strategy was designed for a hybrid power system electrified by a battery-supercapacitor. The motivation behind their choice was developed, tested, and presented. From the obtained results, it can be concluded that it is possible to control the converter DC/DC through the proposed strategy, which is based on the load following control strategy (LFS), and gain optimization by means of LQR-SSA hybrid optimization. This management strategy enhances the power quality and ensures the decrease in the bus voltage stress (∆V = 4 V) due to the supercapacitor power. The system robustness is improved; the overshoot voltage is limited to 1.25% for a load step of 60 A/s. Moreover, this strategy satisfies the load respecting the power source dynamics and protects the supercapacitor from the deep discharge, therefore resulting in increased system efficiency and improved power quality. The online updating mechanism improves the system behavior during unknown load variations; thus, the robustness and reliability are enhanced. Funding: This work was carried out as part of the VEHICLE project, funded by INTERREG V A Upper Rhine Programme (Dpasser les frontires, projet aprs projet), FEDER, and Franco-German regional funds (Bade-Wurtemberg, Rhénanie-Palatinat, and Grand Est) and ELECSA Innovation. Data Availability Statement: Not applicable.

Conflicts of Interest:
The authors declare no conflict of interest.