Sliding mode control strategy for grid-connected inverters based on boundary layer

A sliding mode controller is designed to effectively track the reference current for the characteristics of conventional grid-connected controllers that cannot perform static-free tracking. and aiming at the jitter phenomenon of sliding mode controller, a boundary layer-based sliding mode controller is designed, which adopts traditional linear control inside the boundary layer and sliding mode control outside the boundary layer. the error is limited to a certain range and a compensation term is used to improve the problem of slow control speed. The proposed strategy is validated by simulation using matlab simulation software, and the simulation results prove that the proposed strategy can achieve grid current and grid voltage in the same frequency and phase, which proves the effectiveness of the proposed strategy.


Introduction
Currently, grid-connected inverters commonly use current control strategies.For grid-connected inverters, the improvement of control strategy can help to improve power generation efficiency and reduce cost [1] .
PID control, as the most classical control strategy, has gained wide application in engineering and practice [2] .However, PID control requires an precise mathematical model and the output waveform of the systems at nonlinear loads is not good.
Differential-free beat control has fast response and low distortion of system output waveform.However, the robustness of non-differential beat control is poor, and the response to nonlinear load parameter changes is not sensitive [3] .
Model predictive control has gained very wide application as a popular nonlinear algorithm [4] .In the literature [5] , a multi-objective hybrid cost function was established to achieve accurate tracking of grid currents through the rational design of weighting factors.
In the literature [6] , a nonlinear controller was designed by combining the backstepping method with a PI controller to achieve power balancing between the grid and the PV generation system, but the effects of external disturbances such as grid voltage fluctuations were not taken into account.
To reduce the quantity of sensors with no impact on the active damping performance, a Kalman filter is used in the literature [7] to evaluate the current of the inverter, thus eliminating current detection, On the other hand, the performances of the Kalman filter is quite dependent on the parameters of the LCL filter, so the robustness is average.
Sliding mode control has the advantages of not relying on an accurate mathematical model and being insensitive to parameter disturbances, so many sliding mode control strategies have started to be used in inverters in recent years [8] .
The literature [9] combines sliding mode control with an adaptive observer to attenuate jitter by adjusting the coefficients of the system switching function, but does not detail the adaptive observer used to adjust the sign function system online.
The literature [10] designed simple and easy-to-implement SMC for three-phase inverters that was connected to the grid through an L-shaped filter, but the damping of LCL filters was not considered.
A sliding mode control system for single phase power grids is proposed.For the jitter phenomenon of the Slide mode controllers, a tanh function are used instead of the slide mode switching function sgn to make the switching gain as smooth as possible, and a boundary layer design is introduced for the sliding mode controller, the boundary layer is controlled by sliding mode outside the boundary layer and linear control inside the boundary layer.

Single phase LC grid-connected inverters and its mathematical model
The LC single phase grid-connected full-bridge inverters is shown in Figure 1.
In the figure, U represents the voltage of the DC link, U ac represents the voltage of the AC bus, i L is the current flowing into the inductor, L stands for filter inductance, C 1 stands for filter capacitance, and R 1 ,R 2 ,R 3 are the equivalent resistances.
The loop equation of the system can be obtained based on Kirchhoff's voltage and current law, as shown in (1): ) When switched device S 1 , S 3 is work and S 2 , S 4 is off .a voltage relationship can be obtained: (2) When switched device S 2 , S 4 is work and S 1 , S 3 is off .a voltage relationship can be obtained: Where U is the supply voltage U c1 is the voltage of the filter capacitor C 1 and U ac is the grid-connected voltage.
Combining (1)(2)(3) and using u to denote the open state of the H-bridge : , Then the equation of state of the system is derived from the above circuit relationship as: (5)

Model of the control systems
When a suitable sliding mode surface is selected, the sliding mode controller is adaptive to external disturbances and insensitive to parameter ingestion.In practical engineering applications, affected by various complex situations, it is often impossible to specifically describe the disturbances and precise mathematical model of the systems, which brings unavoidable troubles to the design of other controllers.
The design based on sliding mode controller can effectively alleviate the drawbacks brought by it.The logic block diagram is shown in Figure 2: The system adopts single current loop control and the voltage source is an ideal voltage source.The system collects the grid current flowing into the inductor as the feedback quantity of the whole system, and the reference current is calculated by the phase-locked loop measuring the angle of the grid side.After the error exceeds the boundary layer, the nonlinear SMC controller can obtain faster response speed to ensure the stability of the system.

Analysis and proof of sliding mode controller
Take the current flowing into the inductor as the feedback quantity and make the difference with the desired output current.Define the error function as: where i L * is the desired output current magnitude and i L is the current magnitude flowing into the inductor.Defining the sliding mode surface of the system as an error function, the convergence law is designed as an equal velocity convergence law has: sgn Since the traditional switching function causes the problem of oscillation when it is about to reach the stabilization point, a slowly changing optimization function is used instead of the drastically changing switching function.The changing equation is: where d is the error in the current.

Boundary layer-based sliding mode control
The sliding mode controller designed based on this control causes jitter at the over-zero point, so a boundary layer is introduced for this control and a linear PR control strategy is used inside the boundary layer.
The PR control transfer function is: Based on the control strategy, the following control structure diagram can be derived.as shown in Fig3: Based on the control strategy proposed in the paper, the desired output current i ref is first differentiated from the inductor current i L .Then enter the SMC controller and PR controller, and judge by selecting the switch, when the error is larger than the boundary layer need to converge the error quickly, so the SMC control is used.When the error is less than the boundary layer, the linear control strategy is used in order to decrease the jitter of SMC.
Because the SMC control limits error to the ring width, resulting in a slower convergence of the PR control, a certain compensation term is introduced for the PR control.The introduction of the compensation term helps the error to converge quickly within the ring width and reduces the jitter of the whole system.
Its error convergence rate varies with the value of A as shown in Fig4.As evidenced in the graph, it can be seen that the speed of error convergence varies when the coefficient A of the compensation term takes different values.When A=0.1, the error starts to decrease gradually at 0.3 seconds.When A=0.2, the error starts to decrease gradually at 0.15 seconds.When A=0.3, the error starts to decrease gradually at 0.02 sec.and the system can be made to converge to stability faster when A takes a suitable value.

Simulation results
Based on the above control strategies, the grid-connected inverter system with LC filter is simulated on simulink with the bus voltage of 400 V, inductor of 6 mH, capacitor of 5 uF, grid-connected voltage of 220 V and grid-connected current of 70 A.
Figure 5. Improved sliding mode control of grid-connected THD Figure 5 shows the FFT analysis of the current flowing into the grid under the improved sliding mode control strategy proposed in this paper.as is shown in the graph that its current flowing into the grid THD is only 0.33%.Figure 6 shows the FFT analysis of the current flowing into the grid under PR control, which shows that the THD of current flowing into the grid is 1.42%.Significant reduction in current grid PHD compared to PR control strategy.Figure 7 shows the effect of simulated sudden change of bus voltage on the grid-connected current, from which it can be seen that when the bus voltage changes suddenly from 400V to 450V, the current does not fluctuate significantly and has very good stability.

Conclusion
The paper proposes an improved sliding mode grid-connected control strategy, which reduces the jittering of the sliding mode control by introducing the boundary layer design and optimization function, and proves the stability of the control through simulation and analysis.

Figure 3 .
Figure 3.Improved sliding mode control block diagram where Φ is the boundary layer thickness, d is the error result, and Asin(d) is the compensation term.Based on the control strategy proposed in the paper, the desired output current i ref is first differentiated from the inductor current i L .Then enter the SMC controller and PR controller, and judge by selecting the switch, when the error is larger than the boundary layer need to converge the error quickly, so the SMC control is used.When the error is less than the boundary layer, the linear control strategy is used in order to decrease the jitter of SMC.Because the SMC control limits error to the ring width, resulting in a slower convergence of the PR control, a certain compensation term is introduced for the PR control.The introduction of the compensation term helps the error to converge quickly within the ring width and reduces the jitter of the whole system.Its error convergence rate varies with the value of A as shown in Fig4.

Figure 4 .
Figure 4. Effect of different compensation factors on grid-connected voltage errors

Figure 6 .Figure 7 .Fundamental
Figure 6.PR control grid-connected current THD In 0.5s after the start of the simulation, the simulated bus voltage suddenly changes from 400V-450V.