Dynamic Compensation Control Strategy for DC Converter Based on Linear Optimal Quadratic

Aiming at the problem of DC bus voltage fluctuation, a DC-DC converter control method combining LQR (Linear Optimal Quadratic) and dynamic compensation control is proposed. Firstly, the state space model of DC-DC converter is established. Secondly, according to the following characteristics of LQR controller, the error of the controlled output is introduced into the integral control as an extended state to eliminate the output tracking error. Then, in order to suppress the voltage fluctuation caused by load switching of DC-DC converter during power grid operation, a dynamic compensation structure based on disturbance observer is designed through robust coprime decomposition and Euler parameterization theory. The structure compensates directly at the input of the current loop, and the compensation controller Q(s) is calculated by model matching. Finally, the simulation is carried out by Matlab / Simulink. The results show that without changing the structural parameters of the original system, the new control architecture can effectively suppress the DC bus voltage fluctuation caused by load theft and power fluctuation, and enhance the anti-interference performance and dynamic performance of the system.


INTRODUCTION
After entering the 21st century, with the progress of science and technology, human economy and industry have also entered a stage of rapid development. However, under this overall booming development, the problem of environmental degradation has gradually become non negligible, and the development of new energy has become the focus of scientific research all over the world. As an indispensable part of new energy power generation, new energy vehicles, information equipment and smart grid, power electronic devices, among which DC-DC converter is the core component of new energy management such as hybrid electric vehicle and photovoltaic inverter [1][2][3]. With the wide application of DC-DC converter in, academic and engineering circles at home and abroad are constantly exploring and studying the control methods of DC-DC converter, and are committed to maintaining constant output even in the event of sudden situations such as input and large-scale load change during system operation [4].
There are many control methods of DC-DC converter, traditional analog compensation network control, PID control, fuzzy control, adaptive control, synovial control, robust control, neural network control, hysteresis control and so on. PID control method is widely used in practical engineering because

Mathematical Model of DC Converter
The state space equation of buck converter is: x Ax Bu Ew y Cx Its input, output and state matrix respectively are：u=[Vr]、y=[Uc]、x=[Uc IL]，Vr is the output modulation wave of the current loop；w is disturbance.
In the formula: r, L and C are the inductance parasitic resistance, inductance and capacitance of the converter respectively. Ut and Uc are the instantaneous voltage and output voltage after the switching transistor of the converter respectively; IL and Io are the inductance current and output current of the converter respectively.
Boost DC-DC converter is a non-minimum phase system. Select a static stable working point to linearize its state space, and select the difference between the actual value of inductance current and the steady-state value as the state quantity. Modify the parameter matrix in equation (2) according to the topology of boost converter, as shown in equation (3).

Linear Optimal Control Strategy
When a linear system model is known, if you want the system to achieve an optimal control effect, you can introduce the optimal quadratic control index of the linear system, and equation (4) is the optimal objective function.
In the formula: Q is a semi positive definite real symmetric matrix, which is the weighting matrix of the target requirement term; R is a positive definite real symmetric matrix, which is the weighting matrix of the control signal term.
In LQR theory, the necessary and sufficient condition for its optimal control is In the formula: K is the optimal feedback gain matrix K= [k1 k2 k3 ] T , a is a constant valued positive definite matrix, and must satisfy the Riccati algebraic equation.
Therefore, we can transform the problem of solving the optimal control into solving the Riccati equation, that is, we can find the feedback gain matrix K.
While the microgrid operates stably, the switched DC-DC converter will inevitably be disturbed by some known or unknown disturbances. In order to ensure the stable operation of a system, even when the unknown disturbance is a continuous and slowly changing disturbance, it is very necessary to apply a controller to the system.
In practical engineering, the types of systems are often distinguished and determined by different forms of open-loop transfer function of the system, which are generally divided into type 0, type I and type II. The buck and boost DC-DC converters discussed in this paper are 0-type systems, that is, when the input is a step signal, the system output will have steady-state error. In order to eliminate this steadystate error, it is necessary to include an "integrator" in the feedback path.
In order to realize the simultaneous control of state feedback parameters and integrator parameters by LQR, a new system model must be reconstructed. That is, first define a new state variable: Then the new system state equation can be written as: In the formula: Then the new system is represented as equation (10): Then the system control block diagram after defining the new state variable can be represented as Figure 1.  In the control block diagram of Figure 1, the control variable becomes by transformation, so the optimal control problem can be expressed by the following formula: In the formula； Through the Q matrix, the tracking problem is transformed into a calibration problem that can be solved by LQR. In the LQR of the new system, three relevant parameter K lues can be solved by calling relevant statements through MATLAB.

Disturbance Suppression Theory Based on Residuals
Residual information is often used for fault diagnosis and location, as well as disturbance detection and suppression. Its expression is: In the formula: r(s) is the residual signal, y(s) is the actual output of the system, and ˆ( ) y s is the estimated output of the system.
The residual information can reflect the influence degree of disturbance and other faults on the system. Through the performance of the residual, the working state of the system can be judged. When r(s)≠0, it indicates that the actual output of the system deviates from the estimated output, which means that the system is disturbed or the system has faults. On the contrary, when r(s)=0, it means that the system is not affected by disturbance or fault.
Based on the Luenberger observer, the gain matrix L is calculated by pole assignment method, and the disturbance residual generator is established. The expression is equation (13). Where: A, C and E are the system matrix, output matrix and disturbance input matrix of the controlled object; Is the deviation between the actual output value and the estimated value of the system, that is, the state quantity of the disturbance observer; Is the differential of; L is the gain matrix of the observer, and its value is generally 3 ~ 4 times of the real part of the poles of the original system.
According to the robust double coprime decomposition and Euler parameter stabilization controller theory.
In the formula, u(s) is the input value of the controlled object; uo(s) is the output of the original controller; Q(s) is the compensation controller.
Without affecting the stability of the original system, the residual information r(s) generated by the disturbance observer is applied to the original system through the compensation controller Q(s) and superimposed with the output signal of the integral controller to quickly suppress the disturbance of the system. That is, on the basis of equation (14), the LQR dynamic disturbance suppression structure based on residual is designed. The control structure is shown in Figure 2. Figure 2. Dynamic disturbance suppression structure based on residual When the disturbance w(s) occurs, the compensation controller Q(s) will quickly output the compensation signal ur(s) according to the disturbance and conduct disturbance suppression compensation through the LQR control loop. According to Figure 2, the overall transfer function expression of the disturbance suppression compensation structure based on the residual is obtained as formula (15).
In the formula, GT(s) is the closed-loop transfer function of the combination of LQR controller and controlled object.
It can be seen from Figure 2 that the output of Q(s) is not directly superimposed with the output of the converter double closed-loop controller, but the signal action point of Q(s) is adjusted to the input side of the LQR controller and superimposed with the output signal of the integral controller of the original system to realize the suppression and compensation of system disturbance. Therefore, the compensation structure of Figure 2 can be equivalent to that shown in Figure 3.   Figure 3, the red dotted line is the equivalent block diagram of the compensation structure proposed in this paper. According to the superposition theorem, it is superimposed with the disturbance under the action of the compensation controller, so that Z(s)=0, so as to achieve the compensation effect of restraining the disturbance. That is, the compensation control structure can be expressed by formula (16).
The solution expression (17) of the compensation controller can be written out from formula (16): As can be seen from equation (17) and Figure 3, the compensation structure proposed in this paper only considers LQR controller and some control objects. When solving the transfer function of the compensation controller, only the transfer function of the inner loop of the controller and some compensation objects are required, which simplifies the solution of the compensation controller.

Dynamic Compensation Structure and Controller Solution of DC Microgrid Based on LQR
According to the above theory, the control block diagram of disturbance suppression compensation structure based on Buck and Boost DC-DC converters can be obtained, as shown in Figure 4.
Because boost DC-DC converter is a non-minimum phase system, when model matching is used to solve compensator Q(s), a positive pole will be generated in the transfer function of the model, which will affect the stability of the system. However, the compensation position of the compensation controller Q(s) to the system compensation is adjusted to the input node of the LQR controller, which avoids the problem of converting the positive zero point into the positive point in the boost DC-DC converter and ensures the stability of the system.
Based on the linearized system state space model, a disturbance observer is established and transformed into a transfer function model. Obviously, the system is completely controllable, so the pole assignment method can be used to determine the state feedback matrix L=[l1 l2] T of the disturbance observer. Therefore, the transfer function expression of the DC-DC converter disturbance observer is formula (20).

Ls r LCs C Ll r s Cl r Ll
At the same time, considering the method of pole assignment, a state observer is established for boost DC-DC converter, and the transfer function of the state observer can be obtained as formula (21).
From equation (17) and the red dashed box in the equivalent block diagram of dynamic compensation structure in Figure 4, two solution structures of DC converter disturbance suppression compensator can be obtained.
At the same time, considering the physical realizability, the second-order link introduced, which is a very small constant. That is, the new formulas of the compensation controllers of the two DC converters can be expressed in the following equation forms respectively.

Parameter Design
In the experimental verification, the parameter size of the converter has a non-negligible impact on the stable operation of the converter. According to the parameter design principle and calculation method, the relevant parameters of the main circuit of the simulation experiment are determined, as shown in Switching load /Ω 5 5

Simulation Verification
In order to verify the compensation effect of the DC converter dynamic compensation architecture based on linear optimal quadratic control designed in this paper, different kinds of experiments are designed, and MATLAB/Simulink simulation is used to verify the rationality of the compensation architecture.

Comparison Between PID Control and LQR Control
According to the main circuit parameters listed in Table Ⅰ, the control matrix K can be obtained by calling related statements in MATLAB. In order to highlight the advantages of LQR control, the comparison test between LQR control and classical PID control is designed to verify. In order to verify the effectiveness of the proposed dynamic compensation structure, the load is switched in a certain time to simulate the sudden disturbance of the system, and compare the operation state of the converter with or without the compensation structure. There are two different stages in this simulation: the first stage is when the load changes from 5 Ω to 2.5 Ω at 0.4s; In the second stage, the load changes from 2.5 Ω to 5 Ω at 0.7s. At the same time, the other parameters of the circuit remain unchanged during the whole simulation stage. The transient performance of output side voltage and current of the two DC converters during load switching in two stages and four control modes are compared respectively. As can be seen in Figure 6, when the 0.4s load changes from 5 Ω to 2.5 Ω, the load resistance decreases and the steady-state operation of the converter is disturbed. At the moment of switching the load, the output side voltage remains unchanged, the load becomes the original load value, and the output current rises from 20a to 40A. Affected by the disturbance current, the output voltage drops, and then the capacitor releases energy, and the output voltage gradually rises to 100V. It can be clearly seen in Figure 6 that there are obvious differences in the control effects under the four control modes. In order to make the simulation results more convincing, the simulation data under four control modes are listed. Therefore, both PID compensation and LQR compensation have a certain inhibitory effect on the voltage and current drop amplitude. Compared with the three control modes of PID control, LQR control and PID compensation, LQR compensation has a very obvious improvement on the compensation speed of voltage and current. The superiority and the advanced nature of LQR compensation control mode are proved.  As can be seen in Figure 7, when the 0.4s load changes from 5 Ω to 2.5 Ω, the load resistance decreases and the steady-state operation of the converter is disturbed. The output current rises from 20a to 40A. Affected by the output current, the output voltage drops. Correspondingly, the capacitor immediately releases energy, and the output voltage gradually rises to 100V. However, it is obvious that due to different control modes, there are also obvious differences in the voltage and current drop amplitude at the output side and the compensation speed between the two. In order to more intuitively reflect the differences between the four control modes, the experimental data are listed and compared to realize quantitative analysis. In the experimental simulation data in TABLE Ⅲ , it can be seen that after 0.4s load change, the output voltage under PID control mode drops to 86.75v, while the voltage drop under LQR control, PID control compensation and LQR compensation is more than 90. Therefore, PID control, LQR control and compensation structure have a very good inhibitory effect on the voltage and current drop amplitude. Compared with the three control modes of PID control, LQR control and PID compensation, LQR compensation has a very obvious improvement on the compensation speed of voltage and current. The superiority and the advanced nature of LQR compensation control mode are proved.

Power Fluctuation Experiment
By harmonic injection on the right side of the converter, the power fluctuation of the DC microgrid is simulated, and the running state of the converter under different control modes is compared, and the superiority and the advanced nature of the LQR compensation control mode are verified.

CONCLUSIONS
Under the background of microgrid, this paper selects boost and buck DC-DC converters in DC microgrid as the research object. The main purpose is to solve the power quality problem of microgrid, solve the optimal parameters of controller through LQR, so that the output voltage of DC converter can obtain the best steady-state performance and dynamic performance, and add dynamic compensation structure, The anti-interference performance of DC microgrid is further improved, the impact of load switching on output voltage is effectively solved, and the stability of microgrid itself is enhanced.