Harmonic Mitigation for VSI Using DP-Based PI Controller

The chapter focuses on the strengths of dynamic phasor (DP) based model over conventional time domain model and the controller designed using it for selected harmonic mitigation. To validate the effectiveness of the controller designed using DP-based model, the single-phase voltage source inverter (VSI) with various loads has been considered including effects of intermittent nature of renewable energy sources e.g. photovoltaic module. The DP technique offers distinct advantages in modelling, simulation, and control with respect to the time domain models. With the assets of DP modelling technique based on the measurement of harmonic coefficients, the PI controller is designed which eliminates selected voltage and current harmonics in VSI and results are compared with the repetitive control technique. It has been proved through simulations that as compared to conventional technique, the proposed DP-based PI controller eliminates multiple selected frequencies effectively.


Introduction
In modern power system, the growth of photovoltaic (PV) due to increase in efficiency, clean sources of energy and decrease in cost of solar technology promotes substantial power integration. According to their functionality and operating requirements, it is classified in standalone and grid connected [1]. In standalone system, remote area is supplied by dc or ac power with converters and energy storage devices, on the other hand, in grid connected system the generated power is supplied to the utility services without any energy storage equipments. Distributed generation (DG) systems making use of renewable energy sources are being designed and connected to grid. In distribution feeder, the high penetration of PV generators has considerable impact on the system behaviour. For better insight into these impacts development and fine tuning of existing power system and power converters in the simulation environment is essential. For fast computation of large distribution systems, the dynamical models for various components and various stages are essential. The chapter concentrates on development of the dynamic phasor (DP)-based model of pulse width modulated (PWM) converters that are capturing the transients of interest. The topology of PV system considered, consist of, three power stage circuit stages, such as dc/dc boost converter for maximum power point tracking (MPPT), low voltage single phase dc/ac inverter and filter inductance with grid.
In grid-connected PV inverter systems, the important power quality issue is current distortion [2][3][4]. According to IEEE Standard 1547-2003 and IEC standard 61,727, the total harmonic distortion (THD) for the grid current is lower than 5% to avoid unfavourable effects on the other equipments that are connected to grid. In addition, for odd harmonics from 3rd to 9th, the limitation is 4% and even harmonics are limited to 25% of the odd harmonic limits [5]. These acceptable current distortion levels are defined for grid-connected PV inverter systems in rated operational mode. Since, solar radiations are not steady in PV inverter systems, the output current of PV is less than its rated value.
Many filter topologies are used in literature for reduction of harmonics, the higher order power filter named as LLCL filter, which inserts a small inductor in the branch of the capacitor in the traditional LCL filter to create a series resonant circuit at the switching frequency [4,6]. It can attenuate current ripple component of switching frequency much better than LCL filter [7], also decrease in total inductance which raise the characteristic resonance frequency for better operation of inverter system control [8][9][10][11].
For analysis of harmonics in PWM systems and the harmonics generated by switching, the DPbased model is best available tool as explained in [18]. The DP-based model is developed from generalised averaging technique and is capable of converting periodic varying state variables into dc state variables which is a widely employed method for modelling of oscillatory systems [12][13]. Contrary to different types of existing numerical methods available in literature, the DP-based technique [14,15] focuses on the frequencies of interest and provides accurate simulations for larger time steps [16].
The chapter highlights the important advantages of DP-based models to capture the harmonic content in the signals. The harmonics of the DP model is represented by Fourier coefficients which are determined by harmonic balance equation which contains useful information according to the selected harmonics. This information can be used for better controller design as well as deeper analysis on system performance according to oscillating dynamics and its interaction within and with system. A DP-based model can also be formed using sequence components of alternators and its voltage controller can be designed as mentioned in [17].
Control strategies that are applied to the power electronics converter could support the power conditioning functionality of the current and grid-connected inverters. With respect to the current control, proportional resonant (PR) controller is the most popular controller for singlephase PV inverters. It is well known that the odd harmonics (3rd, 5th and 7th) are dominant in the output current of single-phase grid-connected inverters. Since PR controller cannot reject all harmonics appearing in the grid current, the PR controlled inverters may not be able to feed high quality currents into the grid. In order to eliminate the current harmonics distortion effectively, repetitive controller (RC) can be used with phase compensator to track and eliminate all the harmonics in the system.
The reduction in THD indicates the accuracy with which the periodic signal is tracked at the steady state. For achieving precise tracking of periodic signal, one of the most preferred approaches is the RC [19][20][21]. The fundamental operating principle of the RC is based on internal model principle [22], where it observes the systems' periodic signals for one-cycle period and a corresponding compensating signal is generated in next cycle period to ensure precise tracking of the signal [23]. From the frequency point of view, the RC performs finer error cancellation for periodic signals by presenting a large magnitude of loop gain at the fundamental frequency and its integral multiples. This can be identified as a form of periodbased integral control [24][25][26][27][28].

Background preliminaries 2.1. Concept of repetitive control
The main objective of RC is to asymptotically track the reference signal while rejecting disturbances. Any periodic signal with period T can be generated by a positive feedback system with the specified initial function as shown in Figure 1(a). According to Internal Model Principle [29], it is necessary to include model of Figure 1(a) into closed loop system in order to achieve perfect tracking or external disturbance rejection. In case of inverter control, when reference signal is the periodic signal, a pair of conjugate imaginary poles should be included at the frequency w in the closed loop which can be provided by 1/(s 2 + w 2 ), as used in proportional resonant controller scheme. The inverter output voltage is full of harmonics and it is essential to reduce the level of concern harmonics to obtain low THD. One of the solutions is to include bundle of pairs of conjugate imaginary poles at different frequencies. Another solution could be so-called RC [30][31][32], which adopts infinite dimensional internal model to provide series of conjugate poles at all concerned harmonic frequencies. The stability and robustness of RC system is improved by introducing a low pass filter Q(s) in series with time delay element. Any low pass filter satisfying Q s ð Þ k k ∞ < 1 can be used in minimum phase systems, but there are bandwidth restrictions on Q(s) for non-minimal phase plant [30].
The design and synthesis methods for modified RC system vary with different configurations as mentioned in [25][26][27][28]31]. The plug-in RC system depicted in Figure 1(b) is most commonly used structure. The design problem is mainly to choose and optimise the dynamic compensator G f (s) and the low pass filter Q(s). The choice of controller parameters involves a trade-off between steady-state accuracy, robustness, and transient response of the system. The closedloop control of single-phase VSI without RC is shown in Figure 1(c), where R(s) is the reference signal, D(s) is the disturbance, G p (s) is the plant and G c (s) is the closed-loop controller. The closed-loop transfer function H(s) of the control system without RC is represented in (1) and the tracking error E 0 (s) of the signal due to periodic input R(s) and disturbance D(s) is given by To assure the effectiveness of RC for accurate tracking, the system tracking error E(s) with RC is written in terms of tracking error E 0 (s) of the original system without RC and is expressed as To assure stability, the dynamic compensator must be chosen such that Eq.
(2) can be expressed as the sum of a geometric progression where e ÀTs implies a one-cycle delay of fundamental period. Eq. (4) indicates that the first cycle error e 0 (t) = L À1 [E 0 (s)] for t ∈ [0, T] is unaffected by RC. If then the error can be simplified to E s ð Þ ¼ E 0 s ð Þ 1 À Q s ð Þe ÀTs Â Ã , which is the error of second cycle. If Q(s) can be achieved by where w = 2π/T, then the steady-state tracking will converge to zero at each of the harmonics. However, because of physical nonideality of the system, the design requirements (5), (6) cannot be practically satisfied for all of the harmonics, rather it is more appropriate to adopt the conditions thus, the task of designing the RC is to meet the harmonic elimination requirements of (7) while satisfying stability conditions (1) and (3).

The dynamic phasor-based model
The voltages and currents in power electronic converters and electrical drives are typically periodic in steady state, and mostly nonsinusoidal. The dynamics of interest for analysis and control are often those of deviations from periodic behaviour, for instance as manifested in deviations of the envelope of a quasi-sinusoidal waveform from its steady-state value. For analysis of the steady state, generally used methods are phasor, harmonic, and describing function [12,13,18]. With analytical approach reviewed, the main aim of this research is systematic development of phasor dynamics, from which the dynamic behaviour of the original waveform or its envelope can efficiently be deduced.

Definition and concepts used in DP model
The DP modelling technique is based on the generalised averaging method wherein the complex time domain signal is represented in the interval (t-T, t) with the Fourier series representation. The time varying Fourier coefficients are termed as DPs, which is essentially a frequency-domain method where various harmonics developed over time can be decomposed. In power system steady-state analysis, these Fourier coefficients X k (t) are also called as phasors. During transients, the system is not in a pure periodic state but nearly periodic state. The idea is now to extend this approach to nearly periodic signals [13] and to approximate x(τ) in the interval t ∈ (tÀT, t] with a Fourier series representation given as In this representation, as the signal x(τ) is nearly periodic and since the interval under consideration slides as a function of time, the Fourier coefficients X k (t) are time varying. This expression can also interpreted as an orthogonal signal expansion of the function x(t) with orthonormal basis e jkω s t . The k th phasor (Fourier coefficient) of X is defined as: where w s = 2π/T s . Note that the phasors are defined over a moving time-window and hence, time dependent. Additionally, if X is periodic with time T s , then X k (t) is constant. In the DP approach, only a few coefficients provide a good approximation of the original waveform. Some important properties of DPs are-

i.
The relation between the derivatives of x(τ) and the derivatives of X k (t) is given by ii. The product of two time-domain variables equals a discrete time convolution of the two DP sets of the variables, which is given by iii. For a complex valued signal x, the relationship between X k and X Àk is given as X Àk ¼ X * k

Advantages and limitations of dynamic phasors
The DP approach offers a numbers of advantages over conventional methods.
1. The oscillating waveforms of ac circuits become constant or slowly-varying in the DP domain and different frequency components can be handled separately with convenience.

2.
It approximates a periodically switched system with a continuous system, thereby converting periodic varying state variables into dc state variables.
3. At steady state the DP X k becomes constant.

4.
As the variations of DP X k are much slower than the instantaneous quantities x(t), they can be used to compute the fast electromagnetic transients with larger step sizes, so that it makes simulation potentially faster than conventional time domain EMTP-like simulation.

5.
The selection of DP index-k gives a wider bandwidth in the frequency domain than traditional slow quasi-stationary models used in transient stability programs.
6. The selection and variation of k also gives the possibility of showing coupling between various quantities and addressing particular problems at different frequencies.
The only disadvantage of the DP approach is that the number of variables and equations are higher than in the original equations.

Single-phase inverter with R-load
The typical structure of a single-phase inverter is presented in Figure 2 which includes Hbridge with switching function S i that is fed by LVDC link voltage (V dcL ) and LC circuit is connected between inverter output and load resistance (R L ) for filtering purposes. LC filter consists of filter inductor L fi , filter resistance R fi , and filter capacitor C fi .

System modelling of inverter with R-load
The dynamic model of inverter can be represented as: where, S i (t) is a switching function that denotes the switching status as: In this case, the switch is controlled using fixed frequency switching, i.e. time axis is divided into intervals [kT s , (k + 1)T s ], where T s > 0 is the switch period and k ∈ N. The duty cycle d k ∈ [0, 1] is chosen at the beginning of each switch. The duty cycle determines the fraction of time the switch is active (1 & 0 represents the on-mode and off-mode respectively) and thus controls the system dynamics. The aim of controller is to regulate inverter output voltage (V cfi ) at desired value of voltage, which is a pure sinusoidal signal with angular frequency w and amplitude V p .

DP model of inverter with R-load
The DP-based dynamic model for inverter topology shown in Figure 2 has been developed based on theory explained in Section 2.2. In order to obtain an accurate approximation, the foremost step is to fix Fourier coefficients for the DP model as specified in Table 1.
Converting (12) and (13) into DP form, the state variables, inductor current and capacitor voltage are modified to Eqs. (15)- (16) represented in real and imaginary coefficients as (i) Modelling of switching function S i Let the duty cycle d i and switching period T are the variables associated with a switch and Hbridge of inverter consists of 4 switches Q i1 ÀQ i4 (with reference to Figure 2). Representing state 1 in S i (t) for Q i1 and Q i2 ON while state À1 for Q i3 and Q i4 ON, the switching function (S i (t)) and its DP form S i h i k À Á is defined in (21).
Substituting (21) into (17)- (20), and organising dynamical equations into state-space represen- The state Eqs. (22)- (25) implies that the dynamics of single-phase inverter represented using index-1, 3 and 5 of output filter inductor current (i fi ) and index-1, 3 and 5 of output filter capacitor voltage (V cfi ) as state variables. If more indices-k were used, then the model would be more accurate, however, the resulting model would be too complex to provide insightful information for controller design.

Single-phase inverter with RL-load
The typical structure of a single-phase inverter is same as presented in Figure 2 except the load part, where R is replaced by combination of R L and inductance L L as a RL load. State variables for this case are output filter inductor current (i fi ), output filter capacitor voltage (V cfi ), and load current (i L ).
The dynamic model of inverter with RL load can be represented as: The DP form of (26)-(28) for the state variables inductor current, capacitor voltage and load current are: Using the switching function model derived in Section 3.1 the detailed DP model can be summarised as: Harmonic Mitigation for VSI Using DP-Based PI Controller http://dx.doi.org/10.5772/intechopen.74587 The state space representation d dt X ¼ AX þ Bu can be obtained by substituting (21) into (32)-

Single-phase grid-connected inverter for PV system
The configuration of system consist of three stages, the boost converter stage which is used for tracking of maximum power of photovoltaic array, the inverter stage which generates the behaviour of a sine square wave and the filtering step through L arrangement with grid is represented in Figure 3. The input voltage V PV is from photovoltaic array and the system employs signals at different frequencies: i. The boost converter with switch μ having switching frequency (f c ), which is of kHz.
ii. The switching function (S) constitutes inverter switching frequency (f i ) in range of kHz.
iii. The main systems frequency (f) of 50 Hz.

System modelling of grid-connected PV inverter
In Figure 3, V PV is the input voltage to the system from photovoltaic renewable source where i L is a input current to boost converter, V C is the output voltage of the boost converter and also the input voltage to the inverter, μ is the control signal of the boost converter. In inverter output side i Lf is the current passing through the filter inductor while V AC = Esin(2πft) is the grid voltage and switching function for all inverter switches (S 1 to S 4 ) is S.
For the topology considered in Figure 3, different operating states can be obtained depending on the position of switches, μ and S. The dynamical model of single-phase grid-connected PV system is obtained in (42)-(44).

DP model of grid-connected PV inverter
Similar procedure is followed for the model development of PV inverter system which is shown in Figure 3. The considered Fourier coefficients for the system are specified in Table 2.
(i) Modelling of the boost converter switching function μ.
Let, the duty cycle d and switching period T s be the variables associated with a boost converter switch and state 1 and 0 represents ON and OFF mode of the switch respectively. The switching function (μ) and its DP form μ k is provided in (48).
(ii) Modelling of the inverter switching function S. Figure 3). Using state 1 to represent S 1 and S 2 ON while state À1 for S 3 and S 4 ON, the switching function (S(t)) and its DP notation S h i k À Á can be defined as (49).

Let, the duty cycle d i and switching period T be the variables associated with a inverter switch and H-bridge inverter consisting of 4 switches S 1 to S 4 (as shown in
Expanding (45)-(47) for every coefficient of Table 2, a system dynamics can be obtained as:  Corresponding to the boost converter switching frequency, for both current (i L ) and voltage (V C ) signals, the DPs are chosen as the direct current (k = 0) and the second harmonic (k = 2). On the other hand, for inverter, the DP form of the filter current (i Lf ) is chosen as fundamental and the third harmonic frequencies (k = 1, 3). In addition, if switching harmonics needs to be accommodated in the model, the DP index should be extended to k = m fc for boost converter and k = m fi for inverter.

Development of PI controller using DP model
To design a PI controller using DP-based small signal model, for maintaining constant desired voltage at the output of the inverter, a nested controller is proposed as shown in Figure 4 with inner current and outer voltage control loops.
Controller design and stability analysis for inverter requires the deviation of small-signal control-to-output transfer function, which is the dynamic response for small perturbation in control signal. In state-space model of single-phase inverter, when there is a small perturbation in d i , all the state variables will deviate from their steady states. Assume that the input voltage V dcL h i 0 is constant, the capitalised variables represents steady state values, lower case variables are the actual states and Δ variables represents small-signal states. The deviation of state variables are defined as: The small signal model of the single-phase inverter is given as: Figure 4. PI control scheme for DP model of single-phase inverter.
Eqs. (56)-(58) can be used to calculate the control-to-output transfer function of single-phase inverter.
The real and imaginary references for the voltage loop are generated by phase-locked-loop (PLL) with the desired ac voltage. The outer voltage loop generates the current references for inner current loop whereas the inner current loop generates desired duty ratio.

Design of the inner current loop controllers
The inner current loop dynamics is described as In (59), Δ i fi I k and Δ i fi R k are considered as perturbation which are further eliminated by the decoupling structure.
Describing transfer function for both Δ i fi R k and Δ i fi the current control loop is built using a PI controller H PIC (s) and the closed loop transfer function is H 0C (s) as given in (61) To compute T iC in terms of T 0C and hence, K pC for given fixed damping coefficient ξ C , imposing a closed-loop transfer function of the form (61) leads to (62).

Design of the outer voltage loop controllers
The dynamics of outer voltage loop is described as The transfer function from current component to voltage is The voltage control loop is built using PI controller H PIV (s) and the voltage closed loop transfer function H 0V (s) is given in (65) By imposing closed loop transfer function of the form (65) for fixed damping coefficients ξ V , the time constant T iV can be investigated in terms of T 0V and hence, K pV is calculated as (66) It should be noted that the outer voltage control loop time constant is larger than inner current control loop.

Performance evaluation of harmonic mitigation for VSI
Using simulation parameters as shown in Table 3, the models for single-phase inverter and grid-connected PV inverters are developed in MATLAB/Simulink and effectiveness of controller is validated for the single-phase inverter with R-load.
Single-phase inverter with R and RL load Grid-connected PV inverter  Using input voltage to the inverter as 400 V with constant modulation of 0.8, the response obtained by conventional time domain model without controller is shown in Figure 5 and Figure 6 for only R and RL load respectively. It can be seen from Figures 5 and 6(a) and (b),  irrespective of type of load R or RL, the inverter output filter current is more distorted as compared to output filter voltage which indicates the necessity of proper controller to eliminate unwanted harmonics in voltage or current. Figures 5 and 6(c) and (d) shows switching signal and discontinuous output voltage of inverter respectively.

Response of VSI using DP model
In this section, open loop analysis of simulation results using DP model are built within the SimPowerSystem of the MATLAB/Simulink library with the change in load resistance from 35 Ω to 25 Ω at 0.2 sec. DP coefficient dynamics of state variables of inverter are presented in Figures 7 and 8. With DP index k = 1, 3, 5 inverter filter output voltage and current is shown in Figures 7 and 8(a) and (b) for R and RL load respectively. Figure 7. Response of single-phase inverter with R-load using DP-based model without controller(a) output filter voltage (V cfi ) (b) output filter current (I fi ) (c) re-coefficients of DP V cfi (d) Im-coefficients of DP V cfi (e) re-coefficients of DP I fi (f) Im-coefficients of DP I fi (g) re-coefficients of DP S i (h) Im-coefficients of DP S i . Figure 8. Response of single-phase inverter with RL-load using DP-based model without controller. (a) Output filter voltage (V cfi ) (b) output filter current (I fi ) (c) re-coefficients of DP V cfi (d) Im-coefficients of DP V cfi (e) re-coefficients of DP I fi (f) Im-coefficients of DP I fi (g) re-coefficients of DP i L (h) Im-coefficients of DP i L (i) re-coefficients of DP S i (j) Im-coefficients of DP S i .
The corresponding real and imaginary parts of harmonic coefficients are separately shown in Figures 7 and 8(c) and (d) for inverter filter voltage and Figures 7 and 8(e) and (f) for load current for R and RL load respectively. The switching function is also separated in harmonic coefficients that are shown in Figures 7 and 8(g) and (h).
It should be noted that as compared to conventional time domain model, DP-based model provides better insight in the features of output current and voltage waveforms. Using this valuable precise details, the controller could be designed to target selected harmonics.

5.2.
Response comparison of single-phase grid-connected inverter for PV system using time domain and DP-based model The single-phase grid-connected PV model is simulated in MATLAB/Simulink using input PV voltage as 200 V. The system consists of three stages that is boost stage, inverter stage, and filter stage. The variable of interest for harmonic analysis is the filter current in inverter stage and Figure 9 shows the inverter filter current with harmonics. Same single-phase grid-connected PV system response is observed using DP-based model using higher index by plotting harmonic coefficients separately for output filter current as shown in Figure 10.

Performance analysis of VSI with controller
Again it should be noted that DP-based model provides more accurate information about harmonic content as compared to time domain model. In both models, it is clearly seen that the controller is highly recommended for mitigation of dominant harmonic components. As a result, a conventional RC is designed and used with time domain model. On the other hand, a proposed DP-based PI controller is also designed to show its effectiveness as compared to RC in harmonic mitigation. The aim of the repetitive controller is to track the sinusoidal reference voltage of 230V rms and eliminate all harmonics present in output voltage of inverter system. In Figure 11(a), the tracking of output voltage signal (V cfi ) to the desired reference signal with Harmonic Mitigation for VSI Using DP-Based PI Controller http://dx.doi.org/10.5772/intechopen.74587   load resistance of 100 Ω is observed and shows the elimination of harmonics present in Figure 5(a). The corresponding current harmonics are also eliminated with this controller as shown in Figure 11(b) which were present in Figure 5(b). A DP-based PI controller is designed with nested form as shown in Figure 4 with outer voltage loop and the inner current loop. The controlled DP coefficients of inverter filter output voltage are shown in Figure 12(a) and (b) and the actual filter output voltage (V cfi ) is shown in Figure 12(c). Though, PI gains can be calculated by numerous techniques like loop shaping, pole placement, root locus, predictionbased method etc., in the proposed controller the gains are computed as explained in Section 4, specifically designed to eliminate 3rd and 5th harmonic coefficients.
Comparing response of VSI with RC-and DP-based PI controller Figures 11 and 12, it can be observed that proposed controller has achieved required quality of output voltage by eliminating selected harmonics. It was possible to target individual harmonic components because of higher index DP model which gave detailed precise information about the elements responsible for deviation from desired quality output. It should be noted that, irrespective of harmonics, the DP-based controller helps in providing better voltage regulation for various disturbances such as intermittent nature of renewable input sources and load variations [32].

Conclusions
In this chapter, the DP technique is used to model single-phase inverter with R-load, RL-load and grid-tied PV inverters with multiple frequencies. The overall design aims to obtain acceptable signal approximations with the selected DP coefficients. The harmonics coefficients (DP index-k) for each model are chosen after analysing the main harmonic from the original systems. These DP-based equations have been introduced to compute total, fundamental and distorting dc/ac voltage and currents. In view of this, the chapter has proposed two major contributions: strengths of DP-based model over time domain model and effectiveness of DPbased PI controller over RC. The simulation results comparing various circuit topologies in time domain and DP-based model has shown that the DP-based model provides more detailed information about harmonic contents in the output variables. Using this pinpoint knowledge of selected harmonics of concern, a DP-based controller with higher index can be designed to precisely target the required response which is otherwise not possible in general time domain model. As a result, the DP-based PI controller has shown expected quality improvements as compared to well-known RC controller in voltage regulation and selected harmonic elimination in both steady-state and transient state. It could be also useful in designing best possible operations by minimising losses in system.

A. Appendix
Procedure to be adopted for three-phase case study: The switching function of the switch S jk is defined as where j represents the phase i.e. j ∈ {a, b, c} and variable k ∈ {p, n} is used to distinguish the upper and lower component of phase leg. The switching constraints for upper switch S jp and the lower switch S jn is S jp + S jn = 1.
The phase switching function defines if the output terminal of the phase leg (point j) is connected to the positive potential or to the negative potential of the dc link voltage by the single-pole double-throw switch S j . The phase switching function (S j ) is defined as follows S j ¼ 1, S j is connected to point p À1, S j is connected to point n & Assuming the case of three-phase inverter with R-load, the notations will be followed as given in Section 3. where i fi ab ¼ i fi a À i fi b , i fi bc ¼ i fi b À i fi c , i fi ca ¼ i fi c À i fi a , S i ab ¼ S ia À S i bc , S i bc ¼ S i b À S ic , S ica ¼ S ic À S ia , V cfi ab ¼ V cfi a À V cfi b , V cfi bc ¼ V cfi b À V cfi c and V cfi ca ¼ V cfi c À V cfi a .
The state variables in of (69) and (70) can be approximated in DP form as sum of the their DC components and index-k components