Reference Generation of Custom Power Devices ( CPs )

Custom power devices (CP) used in distribution systems can control power quality. One of the most efficient CPs is Unified Power Quality Conditioner (UPQC). It consists of a Parallel-Active Filter (PAF) and a Series-Active Filter (SAF) together with a common dc link [1-3]. This combination allows a simultaneous compensation for source side currents and delivered voltage to the load. In this way, operation of the UPQC isolates the utility from current quality problems of the load and at the same time isolates the load from the voltage quality problems of utility.


Introduction
One of the serious problems in electrical power systems is the increase of electronic devices which are used by the industry.These devices, which need high-quality energy to work properly, at the same time, are the most responsible ones for decreasing of power quality by themselves.
Custom power devices (CP) used in distribution systems can control power quality.One of the most efficient CPs is Unified Power Quality Conditioner (UPQC).It consists of a Parallel-Active Filter (PAF) and a Series-Active Filter (SAF) together with a common dc link [1][2][3].This combination allows a simultaneous compensation for source side currents and delivered voltage to the load.In this way, operation of the UPQC isolates the utility from current quality problems of the load and at the same time isolates the load from the voltage quality problems of utility.
Reference generation of UPQC is an important problem.One of the scopes of this research is extending of Fourier transform for increasing of its responsibility speed twelve times as the main control part of reference generation of the UPQC.Proposed approach named Very Fast Fourier Transform (VFFT) can be used in balanced three phase systems for extraction of reference voltage and current signals.Proposed approach has fast responsibility as well as good steady state response.As it is known, Fourier transform response needs at least one cycle data for the settling down which results in slow responsibility and week capability in dynamic condition.In the proposed approach there are two different data window lengths.In the sag or swell condition, control system switches to T/12 data window length but, in the steady state condition it is switched to T/2 data window length.It causes fast responsibility as well as good steady state response.This approach will be used for the UPQC control circuit for extraction of the reference signals.
Second scope of this research is to use Multy Output ADAptive LINEar (MOADALINE) approach for the reference generation of UPQC.Simplicity and flexibility in extraction of different reference signals can be advantage of the proposed algorithm.Third scope of this research is reference generation of UPQC with the scope of power flow control as well as power quality compensation.In this stage, SAF is controlled by dqo approach for voltage sag, swell, unbalance, interruption, harmonic compensation and power flow control.Also, PAF is controlled by composition of dqo and Fourier theories for current harmonic and reactive power compensation.
Also for the validity of the proposed approaches, power quality compensation has been done in a test circuit via simulation.Voltage sag, swell and harmonics will be compensated by SAF of UPQC.Also, current harmonics and reactive power will be compensated by PAF of UPQC.Section 2 generally introduces UPQC and its equivalent circuit.Section 3 explains the proposed VFFT and related equations.Section 4 introduces UPQC reference generation system based on the proposed VFFT approach.Section 5 explains proposed MOADALINE algorithm for reference generation.Section 6 explains reference generation based on power flow control.Section 7 simulates the research.Finally, section 8 concludes the results.

Unified Power Quality Conditioner (UPQC)
UPQC is composed of two inverters that are connected back to back [3][4][5][6][7][8][9][10]. One of them is connected to the grid via a parallel transformer and can compensate the current problems (PAF).Another one is connected to the grid via a series transformer and can compensate the voltage problems (SAF).These inverters are controlled for the compensation of the power quality problems instantaneously.Figure 1 shows the general schematic of a UPQC.

VFFT problem statement
Fourier transform has the capability of different order components extraction of distorted periodic voltage and current.It is possible to use voltage and current first order components for determining the compensator signals.Based on the related equations of Fourier transform, there is a need for at least one cycle data for settling down the response.This problem can cause week responsibility in dynamic condition.Proposed extended Fourier transform will be responsible for improving this problem.First order Fourier coefficients of a sinusoidal signal can be written as equations ( 1) and (2).
Based on equations ( 1) and (2) it is possible to reduce settling time of the Fourier transform responsibility to T/2; where, T is the main period of the signal.In this condition the responsibility speed will be increased twice but, it is not reasonable speed in dynamic condition yet.Equation ( 5) can be resulted from equations ( 3) and ( 4), for a sinusoidal signal with phase angle Φ. Equation ( 6) can be resulted similarly.
This solution has advantage of reducing the data window length to T/12.In this condition, settling time of the Fourier transform responsibility will be decreased to T/12.In other words, the responsibility speed will be increased twelve times.It should be noticed that this approach can be used only in balanced three phase systems.In this condition reach to the same accuracy in response is possible as compared to that of one cycle but very faster than one cycle.When data window length is chosen T sec, all of even components of distorted voltage and current in the related integral of Fourier transform can be filtered completely.But this is not possible in T/12 data window length condition.So, the problem of this approach is the unfiltered steady state oscillations in the response.This is because of small data window length.Thus, to complete the proposed approach for accessing the fast response, as well as good steady state response, proper composition of T/12 and T/2 data window lengths have been used.Completed proposed approach uses T/12 data window length in signal magnitude change instances, for accessing the fast response, and T/2 data window length in other times, for accessing the good response without oscillation [10].

UPQC reference generation based on the VFFT
Based on the previous indications, the detection of sag, swell, and load change conditions are essential problem for proper control of the UPQC.In this research, for the detection of sag or swell condition in the source voltage and changes in the load current, derivative of the first order component magnitude of the voltage and current signals has been compared with a constant value.This is based on the facts that in these conditions, the derivative of the signal magnitude can change rapidly with an almost increasing slope amount.Figure 3, shows the block diagram of the proposed VFFT based control approach [10].

Series active filter reference generation
Proposed approach can be used for the extraction of direct and indirect first order components of the source voltage.In this control approach, series active filter can compensate harmonics as well as voltage sag and swells.In this approach the reference voltage magnitude can be setup to the nominal value as equation ( 9). Figure 4, shows the block diagram of the SAF control circuit.

Parallel active filter reference generation
In this research parallel active filter have the duty of the reactive power compensation, as well as, current harmonics.For this purpose as equation ( 10), active first order component of load current which is tangent component of the load current to the load voltage can be used as the reference current.This problem has been shown in Figure 5.

Reference generation based on MOADALINE approach
Based on MOADLINE approach each 1 n  signal of y can be written as a weighted linear combination of its components.If S(t) be nm  component matrix of y at time t and W(t) be 1 m  vector of weighted coefficient then, the signal of y can be written as equation (11).MOADALINE can be used for determining weight vector of W which generates a special signal of y from its components [11].Weighted factors can be updated in each stage of an adaptation approach for extraction of a desired signal.Equation (11) shows adaptation rule that is based on Least Mean Square (LMS) algorithm.
Where, e(t) is the error between desired and actual signal of y, and K is the convergence factor.It is possible to extract the reference voltage and current from uncompensated source voltage and load current.Fourier coefficients can be determined as vector of y.Reference signal can be determined as W. Matrix of S is constant.After determination of uncompensated signal Fourier coefficients, they can be compared with the desired values.
Error signal can be used in adaptation rule for updating the vector of W. Therefore reference voltage and current can be determined.Figure 7, shows block diagram of the proposed MOADALINE approach [11].

Reference generation based on power flow control
Park transform which is used for the conversion of abc to dqo frame, is useful in the steady state and dynamic analysis of electrical systems [3].Conversion matrix and related equations have been shown in Equations ( 16) and (17).An Update on Power Quality 102 Instantaneous active and reactive powers in dqo axis can be written as Equations ( 18) and (19).00 Equations ( 20) and ( 21) show direct and quadratic axis voltages based on P and Q that have been determined from equations ( 18) and ( 19).It should be noticed that the active and reactive powers in equations ( 20) and ( 21) are transmitted powers after series active filter toward the load.These equations show that in constant impedance loads there is a relation between voltage and transmitted power.In other words, a particular load voltage is needed for a particular load power and vice versa.In equations ( 20) and ( 21) it have been assumed that the voltages are balanced and 0 0 v  .22 2 () 3 Therefore, setup transmission active and reactive powers in equations ( 20) and (21) in considered amounts will result the related load voltage magnitude and phase angle.In reactive power compensated condition, Q=0 and the amount of active power will be extracted from the above equations as equation ( 22). 3 () ( ) 2 Generally, in this approach nominal active and reactive powers of load will be substituted in equation ( 20) and (21) for reference voltage extraction.But, there is a problem.If we don't have load nominal power data, extracted reference voltage will not have nominal magnitude.For correct arrangement of the voltage magnitude, a PI controller is used for minimum error between magnitudes of extracted reference voltage and the nominal voltage.

Results of VFFT approach
For the investigation of the validity of the proposed VFFT reference generation strategy in power quality compensation of a distribution system, simulation of the test circuit of Figure 9, has been done in MATLAB/SIMULINK software.Source voltage and load current, have been measured and analyzed in the proposed control system for the determination of the compensator signals of SAF and PAF.This power system consists of a three phase 380V (RMS, L-L), 50 Hz utility, two three phase linear R-L load and a three phase rectifier as a nonlinear load which can be connected to the circuit at different times.This is for the investigation of the proposed control system capability in dynamic conditions.For the investigation of the voltage sag and swell conditions, utility voltages have 0.25 percent sag between 0.04 sec and 0.08 sec and 0.25 percent swell between 0.08 sec and 0.12 sec.Also, for the investigation of the proposed control strategy in the harmonic conditions, source voltage has been harmonized between 0.17 sec and 0.4 sec.Figure 11 shows the compensated load side voltage of phase 1. Figure 12 shows SAF voltage of phase 1. Figure 13 and 14 shows first order component magnitude of the source voltage extracted by T and T/2 data windows respectively.Figure 15 shows first order component magnitude of the source voltage extracted by T/12 data window.Figure 16 shows the first order component magnitude of the source voltage extracted by the proposed composition of T/2 and T/12 data windows.Figure 17 shows the load side current of phase 1. Figure 18 shows the source side current of phase . Source side voltage of phase 1 (sag has been occurred between 0.04 sec and 0.08 sec and swell has been occurred between 0.08 sec and 0.12 sec.Also, harmonics have been concluded between 0.17 sec to 0.4 sec) 1. Figure 19 shows the PAF current of phase 1. Figure 20 and 21 show first order component magnitude of the load current extracted by T and T/2 data windows respectively.Figure 22 shows the first order component magnitude of the load current extracted by T/12 data window.Figure 23 shows the first order component magnitude of the load current extracted 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 by the proposed composition of T/2 and T/12 data windows.Figure 24 and 25 show the source side and load side voltages frequency spectrum, respectively.Finally Figures 26 and  27 show the load side and source side currents frequency spectrum, respectively.Table 3 shows THDs of the source and load voltages and currents.Load voltage and source current harmonics have been compensated satisfactory.Table 3.Total Harmonic Distortion (THD)

Results of MOADALINE approach
For the investigation of the validity of the mentioned control strategy of MOADALINE for power quality compensation of a distribution system, simulation of the test circuit has been done in MATLAB software.Source current and load voltage have been measured and analyzed in the proposed control system for the determination of the compensator signals of SAF and PAF.Related equations of the controlled system have been compiled in MATLAB software via M-file.Desired values of n a and n b are determined in the proposed algorithm for extraction of the reference signals.
The power system consists of a harmonized and unbalanced three phase 380V (RMS, L-L), 50 Hz utility, a three phase rectifier as a nonlinear load, a three phase balanced R-L load which is connected to the circuit at 0.04 sec and a one phase load which is connected to the circuit at 0.07 sec.
For the investigation of the voltage harmonic condition, utility voltages have harmonic and negative sequence components between 0.03 sec and 0.1 sec.Also, for the investigation of the proposed control strategy in unbalance condition, magnitude of the first phase voltage is increased to the 1.25 pu between 0.02 sec and 0.04 sec and decreased to the 0.75 pu between 0.06 sec to 0.08 sec.Figure 28 shows the source side voltage of phase 1. Figure 29, shows the compensator voltage of phase 1. Figure 30, shows load side voltage of phase 1. Figure 31, shows the load side current of phase 1. Figure 32, shows the reactive current of phase 1. Figure 33, shows the harmonic current of phase 1. Finally Figure 34, shows the source side   This power system consists of a harmonized and unbalanced three phase 20 kV (RMS, L-L), 50 Hz utility, a three phase balanced R-L load and a nonlinear three phase load.For the investigation of the voltage harmonic condition, utility voltages have harmonic and negative sequence components between 0.15 s and 0.35 s.Also, for the investigation of the proposed control strategy in unbalance condition, magnitude of the first phase voltage is increased to the 1.25 pu between 0.10 s and 0.20 s and decreased to the 0.75 pu between 0.3 s to 0.4 s.Investigation of the control circuit performance in fault condition is done by a three phase fault in output terminal of the main source between 0.4 s to 0.5 s.Table 4 shows the utility voltage harmonic and sequence parameters data and Table 5 shows the load power and voltage parameters.

Conclusions
In this research different approaches for reference generation of UPQC have been proposed.Based on the general equations of Fourier transform, its response settling time is one cycle.In this research for increasing the response speed and improving the control system capabilities in dynamic conditions, very fast Fourier transform approach has been proposed for balanced three phase systems.In the proposed approach, settling time of the response could be reduced to one twelfth of a cycle.In the proposed approach, there were two data window lengths, T/12 and T/2.In the sag, swell, and load change conditions, control system was switched to T/12 for obtaining fast response.Then for improving the proposed approach responsibility in filtering of unwanted steady state oscillation, control system was switched to T/2 for obtaining no oscillated response.In these states, fast response in dynamic conditions as well as good response in the steady state conditions would be possible.In this research for the detection of the source voltage sag, swell, and load change conditions, derivative of the first order magnitude of the voltage and current signal, were compared to a constant value.This was based on the fact that in these conditions voltage or current magnitude generally changes rapidly.Proposed control approach was simulated in MATLAB/SIMULINK software.Voltage sag, swell, and harmonics were compensated by SAF.But, reactive power and current harmonics were compensated by PAF.THD of load voltage before compensation was 14.14 percent which was reduced to almost zero after the compensation.But, THD of the source current before compensation was 9 percent which was reduced to almost zero after the compensation.
Also the proposed reference generation algorithm based on MOADALINE has been compiled in MATLAB software via M-File.Voltage harmonics have been compensated by SAF of the UPQC and current harmonics have been compensated by PAF of the UPQC.
Based on the results proposed strategy not only could generate pure sinusoidal source current and load voltage but also could compensate source reactive power satisfactory.Total harmonic distortion of load voltage and current before compensation was 0.17 and 0.12 respectively which was reduced to almost zero after the compensation.
Another scope of this research was reference generation based on power flow control.This approach was based on relation between active and reactive powers and load voltage.In this approach amount of reactive power arranged to zero but amount of active power arranged to load nominal power.Also a PI controller used for arranging the load voltage magnitude to the nominal amount.

Figure 1 .
Figure 1.General schematic of a UPQC

Figure 4 .
Figure 4. SAF control system block diagram

Figure 6 .
Figure 6.Block diagram of the PAF control circuit

Figure 7 .
Figure 7. Block diagram of the proposed MOADALINE approach voltage magnitude and extracted voltage magnitude, respectively.

Figure 8 ,
Figure 8, shows the block diagram of the proposed control circuit.

Figure 8 .
Figure 8. Block diagram of the voltage control circuit

Figure 9 .
Figure 9.General test system circuit

Figure 10 ,
Figure 10, shows the source side voltage of phase 1. Figure11shows the compensated load side voltage of phase 1. Figure12shows SAF voltage of phase 1. Figure13and 14 shows first order component magnitude of the source voltage extracted by T and T/2 data windows respectively.Figure15shows first order component magnitude of the source voltage extracted by T/12 data window.Figure16shows the first order component magnitude of the source voltage extracted by the proposed composition of T/2 and T/12 data windows.Figure17shows the load side current of phase 1. Figure18shows the source side current of phase

Figure 21 .Figure 22 .Figure 23 .Figure 24 .Figure 25 .
Figure 21.Extracted load side current magnitude (in this state data window length is T/2 and settling time is 0.01 sec)

Figure 26 .
Figure 26.Load side current harmonic spectrum Reference Generation of Custom Power Devices (CPs) 109 current of phase 1. Load voltage and source current harmonics have been compensated satisfactory.

Figure 35 .
Figure 35.General test system circuit

Figure 36 ,
Figure36, shows the source side voltage of phase 1. Figure37, shows the compensator voltage of phase 1. Figure38, shows the load side voltage of phase 1. Figure39, shows the load side current of phase 1. Figure40, shows the compensator current of phase 1. Figure41, shows the source side current of phase 1. Figure42, shows the load active and reactive powers.Figure43, shows generation PAF active and reactive powers.Figure44, shows the consumption active and reactive powers of the series active filter.Figure45, shows generation active and reactive powers of the source.Figure46, shows the difference between load voltage magnitude and nominal value and finally Figure47, shows the difference between load voltage and source voltage phases.

Table 1
, shows the utility voltage data and Table2, shows the load powers and related switching times.In this study series active filter has been connected to the circuit at time zero.But parallel active filter has been connected to the circuit at time 0.25 sec.A number of selected simulation results will be shown later.

Table 1 .
Utility voltage harmonic and sequence parameters data

Table 2 .
Load powers and related switching times data

Table 6
show states of switches of 1

Table 4 .
Utility voltage harmonic and sequence parameters data

Table 5 .
Load power and voltage parameters data

Table 6 .
States of switches