## 3 Adaptive LQG-FF Current-Voltage Controller  
The control of the proposed HESS has the main objective of avoiding high-frequency variations on the battery current (\(i_{b}\)) on any operation condition, i.e., in charge and discharge modes. Moreover, the controller must guarantee the stability conditions on the overall operation range; that is, under any voltage ratio between the battery and supercapacitor (i.e., buck mode, boost mode, or unitary gain). Therefore, the controller must to impose a fast output current (\(i_{sz}\)) in the converter to provide the fast variations of the bus current (\(i_{dc}\)). The compensation is performed with a disturbance rejection controller, in particular a feed-forward controller. The system model given in Equation (14) has matrices \(A_{m}\) and \(B_{m}\) that change in function of the operation point, and hence it is a system with variable parameters. Controlling this system over a wide operation range requires an adaptive algorithm; in this paper a feed-forward/optimal Linear Quadratic Gaussian (LQG) controller, with parameters adaptation, is designed. The general structure of the control strategy is shown in Figure 6, where high-frequency components of the load current (\(i_{dc}\)) are sensed and feed back through a high-pass filter (HPF) block. Moreover, this structure has an inner loop to provide the high-frequency current components, and an external loop to regulate the DC bus voltage. The control system design is divided into three stages. First, the design of the LQG controller; second, the design of an optimal observer to estimate the states; and, third, the design of the adaptive parameters function to adjust the controller to any operation point. First, the optimal LQG approach was selected to track the current reference (generated by the HPF), to regulate the voltage (\(v_{sc}\)) and to ensure stability conditions. The target of an optimal trajectory system is to design a controller that ensures a close tracking of a specified time-varying trajectory (\(z(t)\)) [28]. For the HESS model, the anticipative input signals (\(d\)) and the non-anticipative disturbance input signals are used, which correspond to the high-frequency components of the load (bus) current (\(i_{dc}\)). The control law for the optimal trajectory tracking consists of a feed-forward controller and a feedback controller, which are designed to minimize a performance index that includes penalties on the tracking errors (\(z\)) and the control energy (\(d\)):  
\[J=\int_{0}^{t_{f}}\frac{1}{2}\cdot(\tilde{z}^{T}Qz+r\tilde{d}^{2})\cdot dt, \quad r\in\mathcal{  
\[\dot{\hat{z}}= \begin{bmatrix}\hat{x}\\ \dot{\hat{x}}_{i}\end{bmatrix} =\underbrace{ \begin{bmatrix}A_{m}&0\\ -C_{m}&0\end{bmatrix} }_{A_{w}}\cdot\underbrace{ \begin{bmatrix}\hat{x}\\ \dot{x}_{i}\end{bmatrix} }_{\underline{z}}+\underbrace{ \begin{bmatrix}B_{m}\\ 0\end{bmatrix} }_{\underline{B_{w}}}\cdot\hat{d} \tag{18}\]  
Then, the optimal value for the control signal \(\hat{d}^{*}\) is calculated using the Hamiltonian matrix [29], as given in (19). \[\tilde{d}^{*} = -r^{-1}\cdot B_{w}^{T}\cdot S_{m}\cdot\tilde{z}=K\cdot\tilde{z} \tag{19}\] \[K = r^{-1}\cdot B_{w}^{T}\cdot S_{m} \tag{20}\]  
Next, the \(S_{m}\) matrix must be solved from the Riccati differential equation given in (21). \[Q+A_{w}^{T}\cdot S_{m}+S_{m}\cdot A_{w}-S_{m}\cdot B_{w}\cdot r^{-1}\cdot B_{ w}^{T}\cdot S_{m}+\hat{S}_{m}=0 \tag{21}\]  
In addition, to ensure null steady-state errors, integrators are added to both output current and bus voltage errors. On the other hand, to ensure a high reference tracking speed for the current loop, a feed-forward control is added, which ensures a fast action on the control signal \(d\) in response to changes on the bus current. In this way, the supercapacitor supplies the high-frequency variations of the DC bus, while the battery supports only the frequencies below the cutoff frequency of the high-pass filter. In addition to the current control, an external cascade loop is added to regulate the supercapacitor voltage (\(v_{sc}\)).