# Dead-Beat Control Cooperating with State Observer for Single-Phase Electric Springs
## 4 Simulation and Discussions
### Pure Reactive Power Compensation Mode  
In this part, the simulations are divided into two steps, of which the one is under ideal grid conditions and the other one is with grid distortions.  
(1) Ideal Grid Conditions: The parameters for simulation are the same as Table 1 and there is no distortion on the line voltage. Figure 6 shows simulation waveforms under ideal grid conditions when dead-beat and \(\delta\) control are both applied to the single-phase ES. As explained in Reference [6], three typical values such as 102 V, 115 V, and 123 V are selected to simulate capacitive mode, resistive mode, and inductive mode, respectively. In each subfigure, four channels are recorded as line voltage, CL voltage, ES voltage, and NCL voltage, respectively. Figure 6a is the overview all the full time ranges including three different modes. In Figure 6b when \(V_{G}\) is set to 102 V, ES current which is in phase with NCL voltage leads ES voltage by 90\({}^{\circ}\), which can be observed at 0.1832 s, meaning that the ES operates at the capacitive mode; In Figure 6b when \(V_{G}\) is set to 115 V, ES voltage is very low and NCL voltage is almost the same as the CL voltage, meaning that the ES operates at the resistive mode; In Figure 6c when \(V_{G}\) is set to 123 V, ES current lags ES voltage by 90\({}^{\circ}\) at 0.5873 s, meaning that the ES operates at the inductive mode. It can also be observed from Figure 6b-d that CL voltages are well regulated to be sinusoidal and RMS values are almost around 110 V. It is validated from the results above that the two control objectives under the pure reactive power compensation mode and also under ideal grid conditions have been achieved with the proposed dead-beat and \(\delta\) control.  
(2) Grid Voltage Distorted: The parameters for simulation are the same as Table 1. The only difference is that the grid voltage is set as follows. From 0 to 0.3 s, the nominal value of \(V_{G}\) is set to 102 V without any distortion. From 0.3 s to 0.6 s, the 3 rd, 5 th, and 7 th harmonic components are added to the fundamental element, of which the amplitudes are 20 V, 10 V, 5 V, respectively.  
As a result, the THD value of \(v_{G}\) is up to 22.46%, which is the same as that in Figure 2c. Figure 7a shows the simulation waveforms before and after grid distortion. Before 0.2 s, the ES operates at the capacitive mode and both ES voltage and CL voltage are sinusoidal. However, after 0.3 s, it is seen that the distortion on the line voltage has been passed to NCL voltage by the ES. It can also be seen that CL voltages are regulated well during the full time range. Figure 7b shows that the THD value of CL voltage is controlled to 1.54%, which is far smaller than that with the PR and P controllers. It should be noticed that when the grid voltage is distorted, the rms value of its fundamental component is used for \(\delta\) calculation. If the \(\delta\) is not accurate, the rms value of the PCC voltage will not be affected, only the ES will deviate a little bit from the pure reactive power compensation mode.  
Figure 5: The program flowchart of dead-beat control and \(\delta\) control.  
Figure 6: _Cont._  
Figure 6: The simulation waveforms based on the dead-beat and \(\delta\) control under the ideal grid conditions and pure reactive power compensation mode. (**a**) Three operating modes at full time ranges; (**b**) Capacitive mode @VG = 102 V; (**c**) Resistive mode @ VG =115 V; (**d**) Inductive mode @ VG = 123 V.  
Figure 7: The simulation waveforms based on the dead-beat with observer and \(\delta\) control under the pure reactive power compensation mode. (**a**) Comparison between ideal grid condition and distorted condition; (**b**) FFT analysis of line voltage and critical load voltage under distorted grid condition.