{'fraction_non_alphanumeric': 0.027185414292690866, 'fraction_numerical': 0.009116067068207716, 'mean_word_length': 4.669024915410643, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Model Predictive Control of Electric Spring for Voltage Regulation and Harmonics Suppression

This paper presents a model predictive control (MPC) strategy for electric spring (ES) to address the power quality problems, especially voltage regulation and harmonic suppression, which are more acute for a growing proportion of renewable energy generation to the grid. A Kalman filter is used to estimate the random variation of the supply voltage and extract the fundamental and harmonic components of the supply voltage, respectively. In this way, the supply voltage, which is treated as an external disturbance for the plant, can be established in the state-space model form. Such processing brings great convenience to the application of MPC and also lays a foundation for MPC to achieve an ideal control effect. Based on an integrated state-space model of the supply voltage and the ES, an MPC controller is designed for power quality improvement. Simulation studies are carried out and the simulation results are presented to verify the effectiveness and accuracy of the control strategy.


Introduction
Due to environmental pollution and excessive consumption of fossil energy, more and more attention has been paid to the research, development and utilization of renewable energy sources (RESs) [1]. The increasing proportion of renewable energy generation to the grid means that the inertia of the power system declines, which makes the demand side [2,3] of the power system sensitive to voltage and frequency fluctuations. Nowadays, solar [4,5] and wind power [6] are the two most common sources of renewable energy for grid-connected generation. However, their own limitations, mainly randomness and unpredictability [7], cause a variation of active and reactive power at the power generation side, which is expected to cause power system [8,9] instability. In addition, it should also be considered that the harmonic distortion of line voltage is further aggravated by the additional power electronics used for renewable energy generation. As a consequence, the problems of power quality will be more and more serious with the increase of the proportion of renewable energy power generation, especially voltage fluctuation and harmonic distortion. These power quality problems will be a great concern for users.
Electric spring (ES) was first introduced in 2012 as a new smart grid technology to balance the power between the power supply and demand automatically [10]. Therefore, power mismatch between the generation side and the demand side can be effectively alleviated. So far, a significant amount of research work has been conducted and rich research results have been achieved, which mainly consist of basic analyses, topological structures, and control strategies of ESs. The most basic function of ESs to keep active and reactive power balance for mitigating voltage and frequency fluctuation is described in [11]. Dynamic modeling for ESs to implement large-scale simulation research and a general analysis on the steady-state behavior of ESs are introduced in [12] and [13,14], respectively. The actual circuit and algorithm implementation of an ES to regulate the AC mains voltage by reactive power compensation is described in [15]. To reduce the use of energy storage equipment in the future smart grid with substantial renewable energy sources can be realized by ESs [16]. Voltage regulation in a microgrid by multiple 2 Mathematical Problems in Engineering Figure 1: Overall simplified schematic diagram of the power system with an ES.
electric springs based on the distributed control is presented in [17], which can reduce the cost of centralized control [18] and compensate the inaccuracy of the traditional droop control effectively. In addition, there are also some research results about the use of ESs to improve power quality [19].
Harmonics suppression for the AC mains voltage by ESs with current-source inverters is introduced in [20]. However, in view of the above results, the research results about control strategies and control methods for ESs are relatively few, which mainly consists of the PI controller and the PR controller. The novel control strategy named control for ESs to provide different types of power/voltage compensations is presented in [21], which is significantly different from phaselocked control. A fuzzy logic controller designed for ESs to adjust the AC mains voltage is described in [22], which does not take into account the harmonics.
In this paper, model predictive control (MPC) [23][24][25] is combined with a Kalman filter [26] to be applied to ESs for harmonics suppression and voltage regulation for the first time, where the Kalman filter is used to estimate the random variation of the voltage source and to extract the fundamental and harmonic components, respectively. MPC is an online optimization control method based on a process prediction model, which comprehensively considers system constraints, dynamic responses, and control objectives. It should be noted that the online optimization problem of MPC is usually to solve a quadratic programming problem. The state-space model of ES presented in Section 3 is linear and time-invariant, which is greatly consistent with the requirement of online optimization of MPC. Furthermore, the most prominent advantage of model predictive control is the handling of hard constraints. For ES, the output voltage is realized by a Pulse Width Modulation (PWM) technology and its control signal is limited to ± 1. Thus, the active filter is guaranteed to operate in the linear modulation range.
The rest of this paper is organized as follows. In Section 2, the operating principle of ES for the smart grid with high penetration of renewable energy is described. The statespace model of ES is presented in Section 3. Section 4 describes the controller design based on MPC in detail. Numerical simulations are presented in Section 5 to verify the effectiveness of the control strategy. Section 6 draws the conclusions.

Basic Principles of Electric Spring
A simplified schematic diagram of a power system with an ES is shown in Figure 1. As distributed generation (e.g., such as wind and solar power generation) requires a large number of power electronic devices, the introduction of power harmonics is inevitable. With more and more distributed power supplies introduced to the power distribution network, the problem of harmonics will be more serious. Therefore, the supply voltage V can be represented by the sum of V (fundamental component) and V ℎ (harmonics component) in Figure 1. 1 and 1 are the equivalent resistance and inductance of the transmission line, respectively. The voltage at the point of common coupling (PCC) is represented by V , which is also the voltage across the critical load . It should be pointed out that represents a class of impedance that is sensitive to voltage fluctuation, while noncritical load represents a class of impedance that can withstand a wide range of voltage fluctuations. Due to the characteristic of the noncritical load mentioned above, it withstands most of the power fluctuations of the grid. 2 and 3 are the currents flowing through the noncritical load and critical load , respectively. 1 is the line current. The ES in the red dotted box shown in Figure 1 includes a DC link capacitor, a PWM inverter [27,28], and an LC filter. The voltage across the capacitor is the output voltage of the ES, namely, . is the equivalent resistance of the inverter transmission line. V is the output equivalent voltage of the PWM inverter. In the case of a half-bridge, where is the DC link voltage, is the modulation index [12] and also the output signal of the controller.
The ES was first proposed as a special reactive power compensator to regulate the line voltage V at its rated value with a standard sine wave at 50Hz in spite of V fluctuations. It injects a voltage, namely, V , leading (or lags) the current flowing through the noncritical load for voltage suppression (or voltage boosting). In simple terms, ES mainly has two compensation modes, namely, inductive mode and capacitive mode to adjust the line voltage. When the voltage V exceeds its reference V − , V leads 0 by 90 degrees in the inductive mode for voltage suppression as shown in Figure 2, where V 0 and 0 are the voltage and current of the noncritical load, respectively. When the voltage V under its reference V − , ES operates in the capacitive mode to boost the line voltage. It is noteworthy that the phase angle of V has a significant change before and after ES becomes effective as shown in Figure 2, which corresponds to V [21]. The internal phase relation between V and V is of great importance to the control design in Section 4, which determines the compensation mode of the ES. Once the DC link capacitor on the DC side of the inverter is replaced by an energy storage system, ES will not be limited to the above two modes of compensation [13].

Modelling of Electric Spring
The simplified power circuit of the ES with a supply voltage and transmission lines is shown in Figure 1. Applying Kirchhoff 's Voltage and Current Laws, one obtains Solving (1)- (7), a state-space model for the ES can be derived aṡ= Denote the state vector as = [ 1 V ] . Ideally, our control aim is to keep the line voltage V at its reference level all the time. Therefore, V , the core of our concern, should be considered as an output of the plant in the above state-space model. In addition, supply voltage V is treated as an external disturbance. is the modulation index and also the control signal generated by the MPC controller, which is limited to ± 1. It is worth mentioning that the state-space model of ES is a multiple-input-single-output system with only one control input, which means that the complexity of control is greatly reduced. Note that the dynamic of is not considered for simplicity.

Control Design for Electric Spring
ES generates the compensation voltage V through the PWM inverter technology based on the control signal generated by the MPC controller to correct the harmonic distortion and adjust V to an ideal sine wave with an amplitude of 220 volts and a frequency of 50Hz under the condition that the supply voltage V fluctuates with time. In other words, our aim here is to regulate the line voltage V while suppressing the harmonics of V .

Disturbance Modeling.
For the established state-space model of ES, the supply voltage V can be treated as a disturbance signal, which is fortunately a periodic and measurable signal. Thus, an exogenous model for V is employed to access the useful information immediately rather than after one full period. The exogenous model is designed based on the following observation: In this way, the periodic signal V , which consists of a finite number of harmonics, can be represented aṡ where and is a block-diagonal matrix with the blocks given by In this way, the measured voltage V can be expressed in the form of state-space, which can be combined with the statespace model of ES to form a complete state-space model used for the MPC controller as follows: =̂, Denote the state vector aŝ= [ ] . Note that 0 in matrix A, matrix B, and matrix C is a vector, not a scalar, whose dimension depends on state . That is to say, it has to do with the number of harmonics that we predefined. A Kalman filter [29] is used to estimate the state from the measured voltage signal V by voltage sensors; thus the disturbance to the plant as mentioned in the previous section becomes instead of V .

MPC Controller.
The MPC controller designed for ES is based on the state-space model, while it cannot be applied to ES model (16)-(17) directly for the reason that MPC controller should apply to a discrete-time model. Therefore, model (16)-(17) should be discretized as follows: where , , are the discrete forms of , , in (16)- (17), respectively [29]. The method to construct the optimization problem in MPC is to expand the expression in the model to predict the statêand output V and then formulate a quadratic programming problem according to the control objective as follows: where , are the positive definite gain matrices and , are the control horizon and the prediction horizon, respectively. In MPC, one should find to minimize and the first value of the control sequence will be applied to the actuator; then the previous steps will be repeated at the next sampling time. It is noteworthy that the prominent feature of the MPC control strategy used in this paper is that the future characteristics of disturbance are fully taken into account in the online optimization based on the disturbance V modeling and the Kalman filter, which is an effective method for state estimation and prediction [26]. In fact, similar methods of Kalman filtering have been used to estimate harmonics in previous studies on power quality problems [30]. Specifically, the system model of the Kalman filter for the state estimation of V is defined as follows: where is the discrete form of in (12), which is a blockdiagonal matrix with each block taking [ cos( ) − sin( ) sin( ) cos( ) ], is the sampling time, and is the angular frequency of the grid. and are the covariance matrices of the system noise and the measurement noise, respectively. and are the covariance matrix of the estimation error and the Kalman gain, respectively. | is the estimation of , while | −1 is the estimation at time instant − 1. V − is the measurement of voltage V , which includes measurement noise. In this paper, the voltage V is treated as a measurable disturbance, so the Kalman filter can accurately estimate its state. It should be pointed out that the measurement noise in the simulation is far less than the system noise because the random variation of V has a large deviation from the trajectory of the disturbance model. The overall control of the system based on the MPC controller with a Kalman filter [29] is shown in Figure 3. The supply voltage V is measured by the voltage sensors and transmitted to the Kalman filter to obtain the state , which contains fundamental and harmonic components information. It should be pointed out that the selection of the phase of the reference voltage V − is closely

Simulation Studies
To demonstrate the effectiveness of the control scheme proposed in this paper, four case studies are conducted by using MATLAB/SIMULINK. The Simulation parameters are shown in Table 1. Without loss of generality, the RMS of V − is assumed to be 220 V. The number of harmonics is up to the 15 ℎ , which is used to simulate supply voltage harmonics.

Voltage Support Mode.
In order to verify the voltage support capability of an ES under the MPC control strategy proposed in Section 4, supply voltage V is set below the rated value, which is used to simulate the situation of insufficient power output at the generation side. From Figure 4(a), one can observe a significant variation in the line voltage, namely, the voltage across critical loads, before and after the ES is activated. Before the ES is activated, the line voltage V is about 203 V, and it rises to the rated value (i.e., 220V) rapidly after the ES is activated at 1 second. Figures 4(b) and 4(c) show the corresponding output voltage of ES and control signal , respectively.

Voltage Suppression Mode.
To test the voltage suppression capability of an ES under the MPC control strategy, supply voltage V is set over the rated value, which is used to simulate the situation of excess power output on the generation side. From Figure 5(a), one can also observe a significant variation in the line voltage V before and after the ES is activated. Before ES is activated, the line voltage V is about 228 V, and it drops to the rated value (i.e., 220V) rapidly after the ES is activated at 1 second. Figures 5(b) and 5(c) show the corresponding output voltage of ES and control signal , respectively.

Harmonic Compensation for Line Voltage.
In order to illustrate the ability of an ES to regulate the voltage while suppressing voltage harmonics at the same time under the proposed MPC control strategy, supply voltage V is set below the rated value, and up to the 15 ℎ order of the odd harmonics are added to V , which is closer to the real voltage with an increasing proportion of renewable energy fed into the power grid. As clearly seen from Figure 6(a), the line voltage V is not only smaller than the rated value, but the waveform is non-smooth with a large harmonic distortion before the ES is activated. After the ES is activated at 1 second, the waveform of the line voltage V is effectively improved, whose total harmonics distortion (THD) value is reduced from 18.79% to 1.36% as shown in Figures 6(b) and 6(c). Therefore, an ES with the MPC controller can deal with voltage regulation and harmonic correction satisfactorily.  random change accompanied by relatively large fluctuations. However, the line voltage V is tightly regulated at 220V as shown in Figure 7(a). If one zooms in and looks at the waveform of V as shown in Figure 7(b), one can see that the waveform of V is corrected greatly, which shows that the ES is powerful enough to be used for voltage regulation and harmonics suppression. Figure 7(c) shows the corresponding output voltage of the ES.

Conclusion
This paper presented a new control strategy based on MPC for ESs to improve the power quality, mainly about voltage regulation and harmonic suppression. A Kalman filter was used to estimate the random variation of the supply voltage and extract the fundamental and harmonic components of the supply voltage, respectively. In this way, the supply voltage, which was treated as an external disturbance for the plant, could be incorporated in the state-space model form. Then, the supply voltage model was integrated with the ES model into a complete state-space model used for the model predictive controller design. The effectiveness and accuracy of using an ES under the MPC control strategy were verified by the simulation studies, which showed that MPC controller has the capability of realizing voltage regulation and restraining harmonics effectively at the same time.

Data Availability
All data can be accessed in the Simulation Studies section of this article.

Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this article.