You are on page 1of 108

Experimental Response of Active Filters under Unbalance Grid

Using an Improved Synchronous Reference Frame

Dhurian Rohit Vitoldás

Dissertation submitted for obtaining the degree of


Master in Electrical and Computer Engineering

Jury

President: Paulo da Costa Branco

Supervisor: Gil Domingos Marques

Members: José Fernando Alves da Silva

September 2009
ii
To my Father, Mother, Sister and Brother in Law.

iii
iv
Acknowledgements

Acknowledgements
The work presented was written during the author’s MSc. Within Socrates/Erasmus Program with the
cooperation of Instituto Superior Técnico, Departamento de Engenharia Electrotécnica e de
Computadores and Warsaw University of Technology, Faculty of Electrical Engineering.

I would like to express my gratitude to Professor. Gil Marques and Prof. Mariusz Malinowski for
continuous support, great patience and for having always a word of contort and strength to continue.

I would like also to thank all the staff in the Group of Intelligent Control in Power Electronics, Prof.
Marian P. Kaźmierkowski and his team for all the help in my thesis and in comprehension of Polish
Culture.

Furthermore I would like to say a special word for my family for all the help and love during the time I
took to do this work.

My gratitude to the Erasmus Program to which I owe this opportunity and wish the best of luck to
future Erasmus students.

Finally I would like thank to all my professors, colleagues and friends from Instituto Superior Técnico
for the friendship and help to grow personally and academically.

v
vi
Abstract

Abstract
The following master dissertation appears with the need of testing experimentally a new method
proposed in the article “Improved Synchronous Reference Frame (ISRF)” by the Profs. G. D. Marques,
V. Fernão Pires, Mariusz Malinowski and Marian Kazmierkowski.

The proposed method is an adaptation from the “Modified Synchronous Reference Frame” and it
comes with the willing to suppress the existing gaps in the classical methods when they are in
presence of a polluted or/with unbalanced electrical grid throughout the strategic positioning of filters.

Therefore the main goal of this work is to generate a simulation, a model to be used in laboratory and
do a comparison with the classical method “Modified Synchronous Reference Frame” with different
grid conditions which in this case will be confined between the ideal grid and a polluted grid
characterized by 15% of 5th harmonic, 1.2% of 7rh harmonic and 10% of inverse component.

To test this new method and check the improvements towards the classical method it was used a grid
simulator where it was possible to create a distorted grid in the laboratory. After doing these tests it
was possible to conclude that the ISRF has a much better Total Harmonic Distortion (THD) in
comparison with MSRF but also inserts a delay into the current driven by the grid as it will be shown in
this work.

Keywords

Active Power Filter, Synchronous Reference Frame, Improved Synchronous Reference Frame.

vii
viii
Resumo

Resumo
Este trabalho aparece com a necessidade de verificar experimentalmente o método proposto pelo
artigo intitulado “An Improved Synchronous Reference Frame for Active Filters (ISRF)” de autoria dos
Profs. G. D. Marques, V. Fernão Pires, Mariusz Malinowski e Marian Kazmierkowski

O método proposto é uma adaptação do método clássico o “Modified Synchronous Reference Frame
(MSRF)” e vem com o intuito de superar as lacunas existentes, no método clássico quando está na
presença de redes poluídas com harmónicas e não balanceadas, através da colocação estratégica de
filtros.

Portanto o objectivo proposto para a realização desta dissertação de mestrado foi a realização de um
modelo de simulação, um modelo experimental utilizado num protótipo laboratorial e sua comparação
com o método tradicional o “Modified Synchronous Reference Frame” com diferentes tipos de
degradação de rede passando desde da rede ideal balanceada e sinusoidal até à introdução de 15%
de 5ª harmónica com 1.2% de 7ª harmónica com 10% de componente inversa.

Para realizar os ensaios recorreu-se a um simulador de rede, no qual foi possivel criar uma rede
trifásica de acordo com as especificações que desejadas.

Após a realização experimental foi possível verificar que o ISRF possui um Total Harmonic Distortion
(THD) muito inferior ao MSRF mas também insere atraso na corrente vista pela rede como será
mostrado na dissertação.

Palavras-chave
Active Power Filter, Synchronous Reference Frame, Improved Synchronous Reference Frame

ix
x
Table of Contents

Table of Contents
Acknowledgements ................................................................................. v

Abstract................................................................................................. vii

Resumo ................................................................................................. ix

Table of Contents................................................................................... xi

List of Figures .......................................................................................xiii

List of Tables......................................................................................... xv

List of Acronyms ..................................................................................xvii

List of Symbols......................................................................................xix

1 Introduction ..................................................................................1

2 Synchronous Reference Frame Method .......................................7


2.1 Presentation of the Method...................................................................... 7

2.2 Mathematical description of the passage from a static Three-Phase


reference a,b,c to d,q Rotating Reference.............................................................. 9

3 Improved Synchronous Reference Frame .................................. 17


3.1 Why the need of this new method ..........................................................17

3.2 The Improved Synchronous Reference Frame Method..........................18

3.3 Conclusions ............................................................................................21

4 Design of Controllers.................................................................. 23
4.1 Current Control .......................................................................................23

xi
4.2 Voltage Controller...................................................................................29

4.3 Decoupling System.................................................................................33

4.4 Conclusions ............................................................................................35

5 Experimental and Simulation Results ......................................... 37


5.1 Experimental and Simulation Results .....................................................40

5.2 THD Results ...........................................................................................44


5.2.1 Graphical results.................................................................................................. 44
5.2.2 Achieved Results ................................................................................................. 46

6 Conclusions................................................................................ 49

Laboratory Setup .................................................................................. 53


A.1 - Physical aspect of laboratory and the material used do achieve results .......54

A.2 - Value of the components used in the experimental work..............................57

A.3 - Software used...............................................................................................57

A.4 - Results with a DC-Link of 300V ....................................................................65

Simulation Setup................................................................................... 77
B.1 - Simulation Environment ................................................................................78

B.2 - Simulation Conditions ...................................................................................79

B.3 - Simulation Code ...........................................................................................79

References............................................................................................ 87

xii
List of Figures

List of Figures
Figure 1.1 Several multiple diode-bridge rectifier configurations with current waveforms [3]. .................2
Figure 1.2 Schematic of Parallel Active Power Filter. ..............................................................................3
Figure 1.3 Schematic of Series Active Filter ............................................................................................3
Figure 1.4 Schematic of Universal Active Filter........................................................................................4
Figure 1.5 Schematic Hybrid Filter ...........................................................................................................4
Figure 1.6 Active filters types (PF – Passive Filters , AF – Active Filters). ..............................................5
Figure 2.1 Angle calculation for MSRF.....................................................................................................8
Figure 2.2 Modified Synchronous Reference Frame [1]. .........................................................................8
Figure 2.3 Three Phase Ideal Grid with α = 0 . .......................................................................................9
Figure 2.4 Grid Transformation to α, β coordinates. ..............................................................................10
Figure 2.5 Ideal Grid in Rotating Reference...........................................................................................11
Figure 2.6 Showing how the DC and harmonics appear in the Rotating Reference .............................12
Figure 2.7 Producing the High Pass Filter with the use of a Low Pass Filter. .......................................12
Figure 2.8 Parallel active power filter. ....................................................................................................13
Figure 2.9 Modified Synchronous Reference Method...........................................................................13
Figure 2.10 Selective Harmonic Introduction. ........................................................................................14
Figure 2.11 Open Loop Control Method [3]............................................................................................15
Figure 3.1 MSRF vs. ISRF Reference angle (Laboratory Result)..........................................................18
Figure 3.2 Method do calculate the angle in MSRF. ..............................................................................19
Figure 3.3 Principle of the proposed method. ........................................................................................19
Figure 3.4 Pink color is for the Improved Method reference, the red color is for the Modified
method and the orange color is for the grid current. This test was did with a
th
distortion in the grid of 15% in the 5 harmonic ...........................................................20
Figure 3.5 Rotating Reference demonstration of the method. ...............................................................20
Figure 4.1 Stationary controller PI..........................................................................................................24
Figure 4.2 Synchronous controller PI with rotating reference. ...............................................................24
Figure 4.3 Hysteresis Control. ................................................................................................................25
Figure 4.4 DM Control. ...........................................................................................................................25
Figure 4.5 Current Control Method.........................................................................................................25
Figure 4.6 Simplification in Current Control............................................................................................26
Figure 4.7 MO Method step response at 0.1s to step change to 1A and then in 0.2s comes back
to 0 A in this case is used a fast low pass pre filter it was done in Matlab. ..................28
Figure 4.8 Current response from 20 A to 10 A at 0.2s and from 10 A to 20 A at 0.4s in this case
it is not used a pre filter. It was done in Saber..............................................................28
Figure 4.9 Voltage Control System. .......................................................................................................29

xiii
Figure 4.10 Voltage disturbance simulation in Saber from 300V to 500V T=0.5 and from 500V to
300V at T=1.1. ..............................................................................................................31
Figure 4.11 Voltage disturbance simulation in Matlab from 300V to 500V T=0.2..................................32
Figure 4.12 Laboratorial Response to Voltage disturbance the first line is the reference and the
second line is the system response jump of 50V. ........................................................32
Figure 4.13 System response without decoupling. Blue line is the grid current and the green line
is the load current .........................................................................................................33
Figure 4.14 Diagram of Voltages............................................................................................................33
Figure 4.15 Decoupling schematic. ........................................................................................................34
Figure 5.1 Schematic view. ....................................................................................................................38
Figure 5.2 Generic schematic of Active filtering. ....................................................................................39
Figure 5.3 MSRF (Simulation) ................................................................................................................40
Figure 5.4 MSRF (Experimental)............................................................................................................40
Figure 5.5 ISRF (Simulation Fc=150Hz ) ...............................................................................................40
Figure 5.6 ISRF (Fc=150Hz Experimental) ............................................................................................40
Figure 5.7 MSRF (Simulation) ................................................................................................................41
Figure 5.8 MSRF (Experimental)............................................................................................................41
Figure 5.9 ISRF (Simulation Fc=150Hz) ................................................................................................41
Figure 5.10 ISRF (Fc = 150Hz Experimental) ........................................................................................41
Figure 5.11 MSRF (Simulation Fc=150Hz) ............................................................................................42
Figure 5.12 MSRF (Experimental)..........................................................................................................42
Figure 5.13 ISRF (Simulation Fc=150Hz) ..............................................................................................42
Figure 5.14 ISRF (Fc=150Hz Experimental) ..........................................................................................42
Figure 5.15 MSRF (Simulation) ..............................................................................................................43
Figure 5.16 MSRF (Experimental)..........................................................................................................43
Figure 5.17 ISRF (Simulation Fc=150Hz) ..............................................................................................43
Figure 5.18 ISRF (Fc=150Hz Experimental) ..........................................................................................43
Figure 5.19 THD experimental results for 500V in DC-Link ..................................................................44
Figure 5.20 THD Simulation results for 500V in DC-Link......................................................................45
Figure 5.21 THD experimental results for 300V in DC-Link. .................................................................45
Figure 6.1 Grid Current using ISRF (Pink) and Grid Current Using MSRF (Green) and Load
Current (Blue) (Result obtained in simulation)..............................................................50
Figure 6.2 High Pass Filter using Stationary Reference and Rotating Reference. ...............................51
Figure 6.3 High pass filtering using signals from rotating reference only ..............................................51

xiv
List of Tables

List of Tables
Table 5-1 Laboratory and Simulation Condition .....................................................................................38
Table 5-2 - THD results for experimental results using a DC-Link of 500 V ..........................................46
Table 5-3 - THD for simulation Results using 500V in DC-Link .............................................................46
Table 5-4 - THD for experimental results using 300 V in DC-Link .........................................................47
Table A-1 - Components Values. ..........................................................................................................57

xv
xvi
List of Acronyms

List of Acronyms
AF Active Filters
APF Active Power Filter
DSP Digital Signal Processor
HF Hybrid Filter
HPF High Pass Filter
IGBT Insulated Gate Bipolar Transistor
ISRF Improved Synchronous Reference Frame Method
LPF Low Pass Filter
MOSFET Metal Oxide Semiconductor Field Effect Transistor
MSRF Modified Synchronous Reference Frame
PAF Parallel Active Filter
PCC Point of Common Coupling
PWM Phase Width Modulation
SAF Series Active Filter
SRF Synchronous Reference Frame Method
SVM Space Vector Modulation
Tpwm Delay time for the PWM

Ts Sampling Time

TS& H Time for the Sample and Hold

UAF Universal Active Filter

xvii
xviii
List of Symbols

List of Symbols
α Phase Angle

αm Referential shift angle

αu Referential shift angle

γ Reference Angle

γ ul Voltage Reference Angle

G (s) Transfer Function

Gσ (s) Disturbance Transfer Function

ia Phase A of the Grid Current

ib Phase B of the Grid Current

ic Phase C of the Grid Current

ila Phase A of the Load Current

ilb Phase B of the Load Current

ilc Phase C of the Load Current

ica Phase A of the Converter Current

icb Phase B of the Converter Current

icc Phase C of the Converter Current

icα Converter Current in stationary coordinates α, β


icβ Converter Current in stationary coordinates α, β
ilα Load Current in stationary coordinates α, β
ilβ Load Current in stationary coordinates α, β
icd Converter Current in rotating reference d,q
icq Converter Current in rotating reference d,q
ild Load Current in rotating reference d,q

ilq Load Current in rotating reference d,q

i dref DC-Link Current in rotating reference d, q

xix
i qref DC-Link Current in rotating reference d, q

ildfilt Load current after the low pass filter

ilqfilt Load current after the low pass filter

Is Three phase grid current

IL Three phase load current

I CO Three phase converter current

Lc Converter three phase line inductance

Ll Diode three phase line inductance

Ls Grid Inductance

uα Grid Voltage in stationary coordinates α, β


uβ Grid Voltage in stationary coordinates α, β
u0 Grid Voltage in stationary coordinates α, β (zero sequence)

ud Grid Voltage in rotating reference d,q

uq Grid Voltage in rotating reference d, q


usα PWM Reference α, β
usβ PWM Reference α , β

U Voltage Amplitude

Ua Phase A of the Grid Voltage

Ub Phase B of the Grid Voltage

Uc Phase C of the Grid Voltage

U dc DC link Voltage

Us Three phase voltage grid

v AF Active filter voltage

ω Rotating referential speed

ωm Rotating referential speed

xx
Chapter 1

Introduction
1 Introduction
With the wide spread of the nonlinear elements such as diodes, IGBT’s, MOSFET’s, thyristors and
others in the most vulgar applications like ordinary power supplies or uninterruptible power supplies
(UPS) the quality of electricity that is transmitted by the grid began do decrease significantly due to the
introduction of harmonics generated by these nonlinear elements.

This “poor” quality electrical grid leads us to an early usage of electrical and mechanical material due
to the excessive heating, oscillating torque in electrical rotating machines, increase of losses and
heating in electrical grid lines [2].

Upon these facts it was introduced regulation in several countries through these standards IEEE 519-
1992 in the USA and IEC 61000-3-2/IEC 61000-3-4 in Europe to improve the quality of electrical
energy that flows in the grid and to limit the harmonic pollution with in order to provide “clean”
electrical energy [2].

To obey the previous standards it is possible to use several methods to reduce the harmonic content,
introduced by the nonlinear elements and loads.

1
One widely used technique is the usage of L-C filters to a discrete reduction of selected harmonics
usually 5th, 7th, 11th and 13th and capacitors to improve the power factor of ac loads.

Despite having good advantages like easy implementation and low price these filters have several
disadvantages such as being bulky, needing a fixed-point operation for power factor compensation
and can become resonant

Another solution is the usage of a diode bridge with more pulses which leads to a reduction of the
harmonic content introduced into the grid but it has some disadvantage like needing a big and heavy
transformer, may generate unwanted voltage drops and the dc-current may come with a bigger
harmonic level [3].

Figure 1.1 Several multiple diode-bridge rectifier configurations with current waveforms [3].

The solutions proposed above are static meaning that if we change the initial parameters to which
they were projected they become ineffective and start to degrade even more the current driven by the
grid.

So one dynamic method proposed to reduce the harmonic content and can also improve the power
factor are the Active Filters (AF).

The AF can be divided in several groups: the Parallel Active Filters (PAF) which are also called as
Shunt Active Filters, Series Active Filter (SAF), Universal Active Filter (UAF) and the Hybrid Filter (HF)
among many others.

The PAF have the capability to compensate the current harmonics and asymmetries caused by the
nonlinear loads such as thyristors rectifiers in the main currents by inserting currents in phase
opposition to eliminate the existing harmonics and/or reactive components of the nonlinear loads at
the point of common coupling (PCC) [9].

2
Figure 1.2 Schematic of Parallel Active Power Filter.

Series Active Filter (SAF) have the function of correct voltage sinusoidal waveform, so they can
provide better voltage output to generic or critical loads and comply with standards and technical
recommendations as is shown in figure 1.3.

Figure 1.3 Schematic of Series Active Filter

Another type are the UAF (Figure 1.4), which combine the SAF and PAF topology, are considered as
being ideal active filter because they can eliminate voltage and current harmonics and are also able to
provide clean power to sensible loads like medical equipment. They are also capable of balancing and
regulating the terminal voltage and eliminate negative-sequence currents. A possible disadvantage
remains in its complex control but it has also has large amounts of solid-state devices and it’s a very
expensive equipment [11].

3
Figure 1.4 Schematic of Universal Active Filter

Moreover there exists the Hybrid Filters (HF) (Figure1.5) which are the combination of a Series Active
Filter (SAF) and a passive parallel filter. This solution is popular because most of the HF are done with
a passive shunt L-C filter and the series active filter is smaller and cheaper. The L-C filter is used to
eliminate low order harmonics. So this solution can reduce voltage and current harmonics under
reasonable costs [11].

Figure 1.5 Schematic Hybrid Filter

4
Schematically the active filters can be represented in the following chart [11]:

Figure 1.6 Active filters types (PF – Passive Filters , AF – Active Filters).

This technology (Active Filtering) needs a very good control strategy. So to implement a successful
control it is necessary first to acquire correctly the signals with voltage transformers (VT’s) to sense
the voltage and Hall-effect current sensors to gather accurate system information (VT’s or Hall-effect
current sensor are just some types of sensors; it is possible to use other type like Current transformers
or Hall-effect to voltage or even isolation amplifiers), second to define a method to compensate the
signals and third to do the correct compensation.

The compensation is made using information gathered by the sensors and processing it through an
analog to digital converter. So by using this data it’s possible to manipulate it mathematically and to do
the compensation in time-domain or in frequency-domain. Time-Domain compensation control
methods for AF create the compensation commands in real time from a very degraded voltage or
current reference. There exist several control methods based in time-domain like p-q theory [9],
synchronous d-q reference frame method, flux-based, notch filter method, synchronous reference
frame method etc.

The compensation can be determined within the frequency-domain, based in the Fourier analysis of
the distorted current or voltage signals, to extract the compensation signals. The Fourier
transformation is used to separate the polluted harmonics from the fundamental harmonic. After these
harmonics which are polluting the fundamental are combined and produce compensation commands
this will require large amounts of computation and a large time response.

To produce compensation commands it is required that the sampling frequency of the AF must be at
least twice as fast as the highest compensating harmonic according to Nyquist Rate.

The final stage is to create the gate-signals to generate the compensation. For this it is possible to use
a wide range of techniques like hysteresis, current controllers, PWM voltage or sliding mode of current
control. All these controls are implemented through hardware and software (using a DSP) to obtain the
control signals for the switching devices of the AF’s.

5
One of the problems which appear with this type of grid correction is due its high frequency usage, so
it can generate electromagnetic interference and to eliminate this interference it is needed to be
designed L-C or L-C-L filters between the grid and AF [3].

In this master thesis dissertation it is proposed to use a Parallel Active Filter controlled by a strategy
based in time-domain and sending the control signals using Space Vector Modulation, to produce and
study the experimental results achieved with a new method based in the widely used Modified
Synchronous Reference Frame Method called Improved Synchronous Reference Frame.

To develop this experimental work it was used a California Instruments Grid Generator which was able
to create the desired grid distortion in laboratory, a Danfoss inverter to produce the desired currents to
compensate the current driven by the grid, a 6-pulse diode bridge and many other devices shown in
Annex1 Laboratory Setup

After doing the experimental work it was possible to conclude that the Improved Synchronous
Reference Frame has a much better THD in comparison with Modified Synchronous Reference Frame
Method but also inserts a delay into the grid current, as it will be shown in the following work.

This work is divided in 6 chapters. Chapter 1 is the introduction; Chapter 2 is for the introduction of the
Modified Synchronous Reference Method and explanation how it works; Chapter 3 is dedicated to the
explaining the control proposed by this work the Improved Synchronous Reference Method; Chapter 4
explain how to find the parameters used by the Proportional Integral controllers; Chapter 5 are
presented the simulation and experimental results that were achieved in laboratory and in a
professional software package “Saber” and the final chapter are the conclusions of this work.

This thesis has also an appendix which is divided in 2 parts. The first presents the experimental
conditions such as parameters, used code and results using a different DC-Link Voltage, in the
second part is described the environment were simulations were hold.

6
Chapter 2

Modified Synchronous
Reference Frame Method
2 Synchronous Reference Frame Method

2.1 Presentation of the Method

This control method of Active Filters (AF) is based in time and uses Park Transformation to create the
signals which are going to be used to compensate the harmonics created by the non-linear loads.

To determine the angle that will be used by Park transformation in the Modified Synchronous
Reference Frame Method (MSRF) and is used grid voltage as reference. By doing this the rotating
reference will be synchronized with the grid and inherit also it frequency in this case 50 Hz, The angle
will be determined using the following schematic:

7
Figure 2.1 Angle calculation for MSRF.

being γ ul the angle used by the Park transformation.

Because of this the angle is very sensitive to grid quality. Therefore if the grid is polluted and/or
unbalanced it will generate a poor reference and the active filter will not produce accurate
compensation currents. Consequently will contribute for an even higher degradation of the grid. But if
the grid voltage is a three-phase sinusoidal balanced grid this method shows that is accurate as it will
be shown in chapter 5 Experimental and Simulation Results.

Figure 2.2 Modified Synchronous Reference Frame [1].

By applying the Park transformation to grid currents, signals with 50Hz frequency will become dc
components, because they have the same frequency of the rotating frame reference and all other

8
frequencies will become ripple. This behavior will have great importance to determine which
harmonics shall be eliminated and which can be maintained.

2.2 Mathematical description of the passage from a static


Three-Phase reference a,b,c to d,q Rotating Reference

To be able to determine which frequencies will be compensated it is needed to transform the raw
signals acquired by the sensors and transform them from the three phase reference to a rotating
reference in quadrature.

The transformation is made in two steps: in the first, it is used the Concordia Transformation to go
from the three-phased reference a, b, c to stationary coordinates α , β ; in the second it is used the
Park transformation to transform to d , q rotating reference using an angle provided by the grid
voltage as shown by the following equations [6]

U a = 2U cos(ωt + α ) (2.1)


U b = 2U cos(ωt − + α) (2.2)
3


U c = 2U cos(ωt − + α) (2.3)
3

Figure 2.3 Three Phase Ideal Grid with α = 0.

Now using the Concordia transformation; By doing the transformation we obtain the reference in two
coordinates being now in the quadratic stationary reference (figure. 2.3)

9
 1 1 
 1 − −
u α  2 2  U 
  a
  2 3 3  
u β  = 3
0
2
− Ub
2  
(2.4)
u  1 1  U c 
 0 1
 2 2 2
 

uα = 3U cos(ωt + α u ) (2.5)

uβ = 3U sin( ω t + α u ) (2.6)

u0 = 0 (2.7)

Figure 2.4 Grid Transformation to α, β coordinates.

To do the transformation to rotating reference it will be needed to do the following mathematic

multiplication, where cos(γ ul ) and sin(γ ul ) are provided using the schematic present in figure 2.1.

10
u d   cos γ ul sin γ ul   3U cos(ωt + α u ) 
u  =   
cos γ ul   3U sin(ωt + α u ) 
(2.8)
 q  − sin γ ul

γ ul = ω m t + α m (2.9)

ωm is the referential speed and αm is the referential shift

ud  cos γ ul cos(ωt + α u ) + sin γ ul sin(ωt + α u ) 


  = 3U  (2.10)
uq  −sin γ ul cos(ωt + α u ) + cos γ ul sin(ωt + α u )

ud  cos(ωt + α u − ω m t − α m )
  = 3U  (2.11)
uq  sin(ωt + α u − ω m t − α m ) 

Doing:

ωm = ω (2.12)

u d = 3U cos(α u − α m ) (2.13)

u q = 3U sin( α u − α m ) (2.14)

Figure 2.5 Ideal Grid in Rotating Reference.

When is realized the Park transformation the fundamental harmonic becomes a dc component and the
rest of the harmonics are modulated under a different frequency.

11
The undesirable harmonics are presented in this method under the form of a ripple and are the one to
be extracted.

Thus it’s shown in the figure 2.5 the dc component is produced for the frequency of 50Hz which
means, the reference is rotating at 50Hz.

Figure 2.6 Showing how the DC and harmonics appear in the Rotating Reference

When the fundamental harmonic is isolated, as it’s in the rotating reference, is used a high pass filter
to remove the harmonic content of the signal is easier and more efficient.

To create High Pass Filter it is used a low pass filter with feed-forward instead a high pass filter to
remove the fundamental harmonic because of better phase bandwidth behavior. Doing the
mathematical operation shown in the Fig 2.6:

+

Figure 2.7 Producing the High Pass Filter with the use of a Low Pass Filter.

Therefore, this will be the method used to remove the ripple from the fundamental harmonic and
determine which currents will be injected by the converter in phase opposition into the grid. This is
done to compensate the harmonic content inserted by nonlinear loads.

A top level schematic of a shunt active filter to compensate non-linear load:

12
Figure 2.8 Parallel active power filter.

To find the harmonics which are going to be inserted it is possible to use two methods [3]: the first a
total harmonic compensation method which uses a high pass filter to get the higher harmonics taken
by the whole load and use them to compensate the grid current Figure 2.8; the second is a selective
harmonic compensation method to insert the selected harmonics as is shown Figure 2.9:

Figure 2.9 Modified Synchronous Reference Method.

13
Figure 2.10 Selective Harmonic Introduction.

In the first method (Figure 2.9) the distorted currents are delivered in a il a , ilb , il c and are transformed

to dq using the reference angle provided by the voltage reference (Figure 2.1) so the fundamental
harmonic 50Hz becomes a dc component and the rest of harmonics will become ripple as explained
before (Figure 2.6). After, this dc components will pass through a high pass filter (HPF) and the filtered
signal will be inserted in phase opposition to cancel the higher harmonics introduced by the non-linear
loads.

In the Figure 2.10 it is used a discrete insertion of harmonics which are selected with the reference
speed frame, producing a dc component for the wanted harmonic. The following operation will be the
passage through a Low Pass Filter (LPF) calibrated with the desired cut frequency (e.g. Fc=20Hz) to
remove the ripple which has been produced when it’s made the abc to dq transformation. This
information is all added into one signal which is going to be inserted in phase opposition to
compensate the higher harmonics.

These two methods are open-loop methods. It means they don’t read the signals produced by the grid
but instead they control the signal produced by the load current as is shown in the figure 2.10.

14
Figure 2.11 Open Loop Control Method [3].

15
16
Chapter 3

Improved Synchronous
Reference Frame
3 Improved Synchronous Reference Frame

3.1 Why the need of this new method

As it was explained in the previous chapter on the Modified Synchronous Reference Frame Method
(MSRF), the reference used to determine the angle, which is going to be used by the Park
transformation, is the ac three-phase voltage grid. Therefore, when this grid is polluted with harmonics

17
and/or unbalance this reference will also appear distorted.

This distortion in the grid will create an incorrect reference to the Park transformation leading to an
injection of an inadequate compensation current leading to an even higher grid disturbance in that
region. So, to correct this situation, it is presented the Improved Synchronous Reference Frame [1].

3.2 The Improved Synchronous Reference Frame Method

Consequently, to remove the pollution from the grid signal used to create the reference to Park
transformation are applied low pass filters and to remove the harmonics it is also used a low pass filter
in the ∆1 [1].

So, when are used these low pass filters the reference angle becomes clean, as is shown in the
Figure 3.1, which compares both, experimental results of the transformation angle obtained with the
MSRF and ISRF.

MSRF
ISRF

Figure 3.1 MSRF vs. ISRF Reference angle (Laboratory Result).

The used schematic to calculate the reference angle is the following:

1
∆ = eα2 + e β2

18
Figure 3.2 Method do calculate the angle in MSRF.

Figure 3.3 Principle of the proposed method2.

As it is expected and shown in Figure 3.1 when are introduced filters into the ac main voltage signal,
the quality of the used angle is improved becoming sharper but will also delay the angle, introducing
an undesired delay in the current driven by the grid. This shifting in the reference angle will provoke
when charging the DC-Link capacitor a reduction of the power factor and will lead to an increase
consumption of reactive power.

In practice is possible to decrease this delay by doing a more refine tuning to the low pass filter, like
changing the cut frequency, the order of the filter or even changing the type of filter (e.g. Chebyshev).
If the cut frequency is too high it won’t remove all the non-fundamental harmonics having the
consequence of polluting the reference but it will lead to a decrease of the delay and if the cut
frequency is diminished it will lead to an even higher delay, by changing the order of the filter to a
lower order it will need an lower cut frequency because it will take more time to make the filtering
efficiently and even if the filter is changed the filtering it will not produce much difference because the
order and the cut frequency have a bigger importance in this compromise.

To simulate these increase of reactive power it will be connected a resistance of 1,2 kΩ in parallel to

2
In this work it wasn’t used a low pass filter in ∆ as is shown in the figure.

19
the DC-link capacitor to simulate a real first harmonic compensation in the system and verify the delay
existent in the referential created from the filtered ac main voltage Figure 3.4.

Figure 3.4 Pink color is for the Improved Method reference, the red color is for the Modified method
and the orange color is for the grid current. This test was did with a distortion in the grid of 15% in the
5th harmonic

In the previous image and Figure 3.1 is clear that the ISRF is delayed comparing with the MSRF of
almost 36º, which is equivalent to 0.002 seconds.

In the following figure is shown in vectorial chart why this delay occurs.

Figure 3.5 Rotating Reference demonstration of the method.

It is possible to verify in the previous figure appears three reference frames the stationary (α, β), and

20
two rotating reference (d*, q*) and (d’, q’) an angle (θ) and a current ICapacitor’ .

These vector diagrams are determined with the following method, the stationary is determined by the
Concordia transformation (chapter 2), the reference to the rotating referential (d*, q*) is produced
using the grid voltage without any “treatment” (MSRF), finally we have the new reference that we
produced using the filtered voltage grid (d’, q’) ISRF.

This last reference (d’, q’) appears with a delay of θ due to the filter that we used to produce a clean
reference, which will be used by the several Park transformations needed in the Active Power Filters.

Here is possible to see why is introduced reactive power into the system when we use the ISRF
because when we charge the capacitor in DC-Link with the Improved referential it will produce a
Iq_Capacitor* and a Id_capacitor* and these two currents exists in the (d*, q*) referential so the reactive power
will not be zero as it is in the MSRF, but the advantages are remarkable because it is possible to get
almost half the THD with the ISRF instead using the MSRF.

3.3 Conclusions

Moreover the method doesn’t depend on the position of the angle only the speed of rotation, because
it has infinite inertia towards the system so it will never loose it synchronization with the grid.

One possible way to eliminate the insertion of reactive power is by creating a control to eliminate the
error introduced by the new referential in the q coordinate but the study of this possible solution is out
of this study range.

As it is explained in this chapter the ISRF presents a much better THD due the clean reference
(experimental results are shown in chapter 5.3) than the MSRF this is due the sophistication of the
method but it has also a downside of the introduction of reactive power because Iq* is no longer 0
(zero) as it is in the MSRF and consequently reducing the power factor.

The following chapter will introduce the design of PI controllers used to eliminate the errors, and the
decoupling system used.

21
22
Chapter 4

Design of Controllers
4 Design of Controllers

4.1 Current Control

The correct dimensioning of this controller is critical to a proper functioning of the system that is
desired to control, in this case, the active filter.

So to the active filter is able to compensate the distorted current inserted by the nonlinear loads, the
active filter must have the capability to track sudden slope variations in the current reference,
di
corresponding to a very high value, which makes the design of control and the practical
dt
implementation particularly critical. Therefore, in the active filter application, the choice and
implementation of the current regulator is very important to achieve a satisfactory performance level
[8].

23
Due to this high quality demand to design a proper current control, were created several methods to
do the control. The created methods can be divided in various groups here are going to be shown
some methods from the linear and non-linear groups and given a brief explanation.

The linear controllers operate with the conventional type of PWM modulators or SVM and they have
separated control for eliminating the error and have voltage modulation [9].

Because of that it is possible to use open-loop modulators (sinusoidal PWM, space vector modulator
etc.) which have a fixed switching frequency, well-defined harmonic spectrum and optimum switch
patterns, and in the linear group there exists several controllers like the stationary controller PI Figure
4.1, synchronous vector controller Figure 4.2, state feedback, predictive and dead beat controller,
these are just few examples [13].

Figure 4.2 Synchronous controller PI with rotating


Figure 4.1 Stationary controller PI. reference.

On the other hand the nonlinear group includes the hysteresis control (Figure 4.3), and the Delta
Modulation (DM) (Figure 4.4) among others.

The hysteresis control can be based with two or three level hysteresis comparators, and the switching
signals are produced directly when the error exceeds an assigned tolerance band h . It is possible to
highlight it remarkable simplicity, robustness, lack of tracking errors however it has some limitations
like the operation is rough, the converter switching frequency depends largely on the load parameters
and may cause resonance problems.

Moreover the DM control (Figure 4.4) which has a very similar scheme to the hysteresis controller but
it has a Sample and Hold (S&H) and it has comparators to detect the errors, which means the outputs
are sampled so the signal to the inverter gates are constant in each sampling interval.

24
Figure 4.3 Hysteresis Control. Figure 4.4 DM Control.

Above were shown some current techniques that can be used into AF so in this work it was used the
synchronous reference PI controller.

Therefore, to design this control it will be created a model in rotating reference. Because the model will
be produced in a discontinuous environment it will be needed to take in account the sampling time,
here represented by the Sample and Hold block (S&H) TS& H = Ts , the statistical delay of the SVM

generator TSVM = 0.5 * Ts in block Voltage Source Controller (VSC). Also in block VSC it is needed to

specify the gain Kc =1, and the dead time τ 0 of the VSC τ0 = 0 for ideal converter (these are the
some approximation that we are going to be used to design the parameters of the controllers) [2].

Figure 4.5 Current Control Method.

As we can see the most basic linear controller that we can use the PI because if we had just used the
proportional controller it would not be enough to eliminate the error caused by the changes of the
currents. So next choice it would be the PI controller, which can cancel the errors.

In the next step we add the S &H to the VSC which gives the block S & H + VSC and their time
constant can be add giving origin to :

25
Ttotal = Ts + TSVM (4.1)

And the model will become

Figure 4.6 Simplification in Current Control.

L
Considering that, Ttotal is the sum of all small time constants, τ RL = is the large time constant,
R
1 T 1
K RL = is the gain of the input choke, with K p = n and K i = .
R Ti Ti

From several control methods is going to introduced one simple method to calculate the parameters

the MO – Modulus Optimum. With the assumption that U L is constant and multiplying and dividing the
input choke by R, this will give the following open loop transfer function:

(1 + sTn )
Goi ( s) = (4.2)
sTi R ( sTtotal + 1)( sτ RL + 1)
Doing

Tn = τ RL (4.3)

With this operation the transfer function will be simplified to:

1
Goi ( s) = (4.4)
sTi R ( sTtotal + 1)
The closed loop will leads us to the following transfer function:

1
Ti RTtotal
Gcf ( s ) = (4.5)
s 1
s2 + +
Ttotal Ttotal RTi

26
1 1
After inspection of the equation 4.3 is possible to conclude that ω n2 = and 2ξω n = so
Ti RTtotal Ttotal

2
if is used a damping factor ξ= is possible to reach :
2

2Ttotal
Ti = (4.6)
R
Therefore using the previous equation is possible to see the system response when are used this
controllers.

Now replacing Ti with the value from equation (4.6) in the closed transfer function (4.5) is possible to
achieve the following equation:

1
Gcf ( s ) = (4.7)
1 + 2 sTtotal (1 + sTtotal )

And therefore is possible to conclude that:

1
ωn = (4.8)
2Ttotal
Is also possible to use a simplified response neglecting the quadratic term of the closed transfer
function obtaining:

1
Gcf ( s ) = (4.9)
1 + 2 sTtotal

Consequently the system will of first order and have a time constant of 2Ttotal .

Thus:

L
Kp = (4.10)
2Ttotal

R
Ki = (4.11)
2Ttotal

27
Figure 4.7 MO Method step response at 0.1s to step change to 1A and then in 0.2s comes back to
0 A in this case is used a fast low pass pre filter it was done in Matlab.

Figure 4.8 Current response from 20 A to 10 A at 0.2s and from 10 A to 20 A at 0.4s in this case it is
not used a pre filter. It was done in Saber.

28
4.2 Voltage Controller

The value of the DC-Link used with the converter to produce accurate currents demands that voltage
must be constant and to accomplish it, will be used a control method to eliminate the errors between
the capacitor voltage and the reference voltage fo the DC-Link [2], [3], [5], [7].

This method works controlling the converter currents in Park’s coordinates but only the current id ,
thus, it only changes the active power flow giving us faster responses.

Here it will also be used a P.I. controller and to design the control method parameters, K p and K i the
proportional constant, and the integration constant respectively, for the DC-Link it is possible to
establish an equivalent model to synthesize them as it was did for the current controller.

The Voltage Source Rectifier (VSR) can be modeled by a first order function to simplify as it was done

to calculate the line controller doing K c = 1 , τ 0 = 0 and a time equivalent Tc .

T c = 0 . 5 * T SVM + T s (4.12)
1
Gvsr = (4.13)
1+ sTc
The model used will be the following:

Figure 4.9 Voltage Control System.

Tnn 1
Where, K p = and K i = .
Tin Tin

To determine K p first it is needed to do the open loop of the system, which will result in:

(1 + sTnn )
Go ( s) = (4.14)
sTin (1 + sTc ) sC
So the open loop will be done just with the proportional controller and it will originate:

29
Tnn 1
Go ( s) = (4.15)
Tin (1 + sTc ) sC
And the correspondent closed loop transfer function:

Tnn 1
Go Tin (1 + sTc ) sC
(s) = (4.16)
1 + Go T 1
1 + nn
Tin (1 + sTc ) sC

Tnn
Go Tc CTin
= (4.17)
1 + Go s 2 + s + Tnn
Tc Tc CTin
Therefore:

Tnn
ω n2 = (4.18)
Tc CTin
And

1 CTin
ζ = (4.19)
2 TcTnn

2
Putting ζ = his optimal value the value of the proportional part will be:
2

Tnn 1 C
Kp = = (4.20)
Tin 2 Tc
Using the K p it will give in close loop:

Go 1
= (4.21)
1 + Go 2Tc s (1 + sTc ) + 1
And,

2Tc
(1 + sTc )
Gσ C (4.22)
=
1 + Go 2Tc s (1 + sTc ) + 1

To have static error zero it is needed that the first equation when s = 0 has an unitary gain and the
second equation has zero gain, in deed the first equation has unitary gain but the second equation has
2Tc
a gain of therefore the static error is not zero and sensible to the perturbation so it will be
C
necessary the integral part of the PI.

30
To continue the calculation of the integral part, it will be done substituting the K p in the initial open

loop transfer function which will result in the following equations:

1 + sTnn
Go = 2 (4.23)
s 2TnnTc (1 + sTc )
Replacing in the previous equation and doing the closed loop3:

Go 1 + sTnn
= (4.24)
1 + Go s 3 2TnnTc2 + s 2 2TnnTc + sTnn + 1
And

2TcTnn
s (1 + sTc )
Gσ C (4.25)
=
1 + Go s 3 2TnnTc2 + s 2 2TnnTc + sTnn + 1
So the integral part will be equal will be:

1 C
Ki = (4.26)
8 Tc2
The time constant will depend from the criteria that are chosen to control the Dc-Link if is chosen the

Modulus Optimum it will be Tc = 2Tc or if is the Symmetry Optimum Tc = 4Tc .

In this case because is better a fast response it will be used the Modulus Optimum criteria.

Figure 4.10 Voltage disturbance simulation in Saber from 300V to 500V T=0.5 and from 500V to 300V
at T=1.1.

3
Doing TiC = 2TnnTc

31
Figure 4.11 Voltage disturbance simulation in Matlab from 300V to 500V T=0.2
And from 500V to 300V at T=0.4.

Figure 4.12 Laboratorial Response to Voltage disturbance the first line is the reference and the second
line is the system response jump of 50V.

After using the achieved values in the previous demonstrated equations it was possible to realize that
it would not be enough as is shown in the following figure:

32
Figure 4.13 System response without decoupling. Blue line is the grid current and the green line is the
load current

di
As is possible to see the controllers aren’t controlling the system because of the to high current
dt
slope therefore it will be introduced a decoupling system to improve the system response.

4.3 Decoupling System

As it was said previously in the Voltage Controller to control accurately the DC-Link voltage is needed
to control the id . Therefore to be able to do that, will be used a decoupled system.

First it will be shown (Figure 4.14) a single-phase diagram from the grid, a block diagram schematic
and after it will be extrapolated from the Kirchhoff’s Voltage Law the mathematical equations to create
the decoupled system

Figure 4.14 Diagram of Voltages.

33
ω Lc

ω Lc

Figure 4.15 Decoupling schematic.

This derives in single-phase representation:

Us − jωLic − ric −Uc = 0 (4.27)

In d coordinate that are going to be used in the work the result will be:

u d − jω Li cd − ri cd − u cd − ω Li cq = 0 (4.28)

Doing,

hd = jωLicd + ricd (4.29)

Will give,

u d − h d − u cd − ω Li cq = 0 (4.30)

In the end,

h d = u d − u cd − ω Li cq (4.31)

Now for the q coordinate it would be the same thought but the beginning equation is:

u q − jω Li cq − ri cq − u cq + ω Li cd = 0 (4.32)

In the end will give

h q = u q − u cq + ω Li cd (4.33)

So now hq and hd will be references for the SVM.

34
4.4 Conclusions

In the current control it will be used the Modulus Optimum because is easy to implement and gives us
good results while tracking currents with very high slopes and therefore it is fast and accurate. To
control the DC-Link chain it was used the Symmetry Optimum criteria because it great capacity to
follow the capacitors discharges, in this case aren’t very big since the system doesn’t have a load in
DC-Link to take energy from the capacitor.

35
36
Chapter 5

Experimental and Simulation


Results
5 Experimental and Simulation Results
In this chapter, will be shown the achieved results in simulations and laboratory. The simulations
results were obtained using the software SABER, and the experimental results, were acquired in the
laboratory setup provided by the Faculty of Electrical Engineering, belonging to the Warsaw University
of Technology.

There were collected all experimental results and some simulation results, using different cut
th
frequencies for the α, β 4 order Butterworth filters used in the ISRF, eing both tuned for 150Hz for

37
the results shown in this chapter. The remaining results achieved with other cut frequencies used and
DC-Link voltage they will be shown in the annex 1.

The sampling frequency used is 10 kHz to provide enough filtering accuracy, because the harmonics
produced by the diode bridge are odd and non multiple of 3 (three) like are the 1st, 5th, 7th, 11th, 13th
th
and followings. A 13 harmonic frequency is 650Hz so when is used 10kHz sampling frequency it will
give 15 samplings in each period, so it will be enough to achieve filtering accuracy.[3]

In the laboratory setup it was used dS1103 DSP board to read and acquire the measurements did by
current and voltage sensors.

A one phase schematic from the laboratory and used in the simulation Figure 5.1

Figure 5.1 Schematic view.

The condition in which the simulation and experimental results were achieve are in the following table

Simulation Experimental
Line Voltage 50V 50V
Grid Frequency 50 Hz 50 Hz
Line Inductance 10 mH 10 mH
Load Resistance 100Ω 100Ω
DC-Link Capacitor 470µF 470µF
Converter Inductance 10 mH 10 mH
Converter Resistance 100 mΩ 100 mΩ
DC-Link Voltage 500V 500V
Transformer Inductance 0.1mH 0.1mH
Table 5-1 - Laboratory and Simulation Condition

Thus the next pictures are organized under this order, first will be shown the results obtained with 500
V in DC-Link and a cut frequency for the ISRF of 150Hz. Being the first the simulation result and by it
side the experimental result.

38
To compare the methods and verify the results, each method was submitted to different grid condition,
as is shown:
• Ideal Grid,
• 15% 5th harmonic,
th th
• 15% 5 harmonic and 1.2% 7 harmonic,
th th
• 15% 5 harmonic, 1.2% 7 harmonic and 10% unbalance.

This type of study was also done for 300 V in DC-Link (it is presented in annex A.4).

Figure 5.2 Generic schematic of Active filtering.

39
5.1 Experimental and Simulation Results

In this four experimental results are shown the behavior of the MSRF and ISRF under ideal grid
conditions as it was expected there where no substantial differences.

Figure 5.3 MSRF (Simulation) Figure 5.4 MSRF (Experimental)

Figure 5.5 ISRF (Simulation Fc=150Hz ) Figure 5.6 ISRF (Fc=150Hz Experimental)

From top to down the represented signals are - Grid Voltage, Grid Current, Load Current and Current injected by the
Active Filter.

40
In this four experimental results are shown the behavior of the MSRF and ISRF under 15% of 5th
harmonic voltage distortion as it was expected it will be found tremendous differences.

Figure 5.7 MSRF (Simulation) Figure 5.8 MSRF (Experimental)

Figure 5.9 ISRF (Simulation Fc=150Hz) Figure 5.10 ISRF (Fc = 150Hz Experimental)

From top to down the represented signals are - Grid Voltage, Grid Current, Load Current and Current
injected by the Active Filter.

41
In this four experimental results are shown the behavior of the MSRF and ISRF under 15% of 5th and
1.2% of 7th harmonics voltage distortion as it was expected there is some extraordinary differences.

Figure 5.11 MSRF (Simulation Fc=150Hz) Figure 5.12 MSRF (Experimental)

Figure 5.13 ISRF (Simulation Fc=150Hz) Figure 5.14 ISRF (Fc=150Hz Experimental)

From top to down the represented signals are - Grid Voltage, Grid Current, Load Current and Current
injected by the Active Filter.

42
In this four experimental results are shown the behavior of the MSRF and ISRF under 15% of 5th,
1.2% of 7th harmonics and 10% of unbalance voltage distortion as it was expected there are some
differences.

Figure 5.15 MSRF (Simulation) Figure 5.16 MSRF (Experimental)

Figure 5.17 ISRF (Simulation Fc=150Hz) Figure 5.18 ISRF (Fc=150Hz Experimental)

From top to down the represented signals are - Grid Voltage, Grid Current, Load Current and Current
injected by the Active Filter.

43
5.2 THD Results

In this section, will be presented the Total Harmonic Distortion achieved in the laboratory setup using
several grid conditions, it will be easier to see the improvements introduced by the usage of the ISRF
towards the MSRF.

First will be shown a graphical result just to have an overall perception of improvement and second by
showing the exact values used to create the charts.

5.2.1 Graphical results


This THD chart is only referred to the experimental results and is only to have a qualitative point of
view, to have a more exact, analytical, point of view it will be shown tables with the exact values.

The following chart was obtained having as base 500V Dc-Link and using several cut frequencies to
α,β voltage filters, after is done a comparison with the improved and the modified synchronous
references methods, were the improved method is using a cut frequency of 150Hz.

Figure 5.19 THD experimental results for 500V in DC-Link

44
Figure 5.20 THD Simulation results for 500V in DC-Link

By last, the results achieved having a 300V DC-Link , is verified that the THD results aren’t as good as
500V DC-Link.

Figure 5.21 THD experimental results for 300V in DC-Link.

45
After reviewing this charts it is possible to affirm that the ISRF presents a much better THD result
under very severe voltage grid conditions, almost independently from the cut frequency used by the α,
β Butterworth filters.

5.2.2 Achieved Results


Here is possible to have an accurate perception of the results achieved being the first two tables used
for showing the results from the ISRF and MSRF for different cut frequencies and having a DC-Link of
500V in laboratory and in simulation.

Improved Method
Classical Fc=150 Hz Fc=200 Hz Fc=250 Hz
Harmonics
Method [%] [%] [%] [%]
Ideal Grid 7,56 6,0 6,3 6,8
5h -5% 8,9 6,2 6,8 7,1
5h -10% 10,4 6,8 6,6 7,1
5h-15% 14,6 7,5 7,9 7,7
5h-5% 7h-1,2% 9,63 6,4 7,0 7,1
5h-10% 7h-1,2% 12,1 6,8 7,3 7,3
5h-15% 7h-1,2% 15,3 7,7 8,1 7,5
5h-5% 7h-1,2% 10%imb 9,5 6,3 6,7 7,1
5h-10% 7h-1,2% 10%imb 12,0 6,8 7,3 7,1
5h-15% 7h-1,2% 10%imb 14,8 7,7 8,0 7,4

Table 5-2 - THD results for experimental results using a DC-Link of 500 V

Classical Method Improved Method


Harmonics
[%] Fc=150 Hz [%]
Ideal Grid 9,3 9,3
5h - 5% 9,8 8,9
5h-10% 13,6 9,7
5h-15% 15,9 9,3
5h-5%+ 7h-1,2% 11,6 9,1
5h-10%+7h-1,2% 13,4 9,0
5h-15%+7h-1,2% 15,47 9,4
5h-5%+7h-1,2%+10%imb 11,7 8,8
5h-10%+7h-1,2%+10%imb 13,1 8,8
5h-15%+7h-1,2%+10%imb 16,6 9,0

Table 5-3 - THD for simulation Results using 500V in DC-Link

46
The result shown in the following table is also for different cut frequencies but for a DC-Link of 300 V
for the MSRF and ISRF.

Improved Method
Classical Fc=100 Hz Fc=150 Hz Fc=200 Hz Fc=250 Hz
Harmonics
Method [%] [%] [%] [%] [%]
Ideal Grid 10,5 7,0 8,0 8,6 9,0
5h -5% 11,9 7,5 9,6 9,4 9,0
5h -10% 14,6 8,1 10,8 10,2 9,5
5h-15% 17,5 9,1 11,5 11,0 10
5h-5% 7h-1,2% 12,3 9,0 10,0 9,5 9,2
5h-10% 7h-1,2% 15,3 8,3 10,3 10,2 10,0
5h-15% 7h-1,2% 17,5 9,3 11,4 11,5 10,1
5h-5% 7h-1,2% 10%imb 12,3 7,8 9,0 9,2 9,1
5h-10% 7h-1,2% 10%imb 15,2 8,4 9,9 10,2 9,5
5h-15% 7h-1,2% 10%imb 17,8 9,2 11,3 11,0 10,3

Table 5-4 - THD for experimental results using 300 V in DC-Link

47
48
Chapter 6

Conclusions
6 Conclusions
In this work were presented the experimental results for a new control strategy based on the Modified
Synchronous Reference Frame Method, called the Improved Synchronous Reference Frame Method.
This new method was conceived to be insensitive to pollution in the signals which are used to create
the rotating reference frame, in this case was used the Grid Voltage as presented in chapter 3.

This reference is critical for the good and accurate functioning of the active filter and therefore
producing the correct compensation for the current driven by the grid.

Consequently, to verify the reliability and the improvement brought by this new method it were created
several grid conditions using a grid simulator from California Instruments, creating grids which went
th
from the ideal grid condition till the more severe condition, tested in this work, where the 5 harmonic
has 15% from the fundamental the 7th has 1.2% and also it involves 10% of unbalance.

49
After testing the different methods under the proposed grid condition in simulation and laboratory
setup, it is possible to verify that the Improved Synchronous Reference Frame Method has a very
good behavior under severe conditions.

Is also possible to point out that it, has an easy implementation in the DSP, provides a much better
THD results as it was shown in Table 5-2, some times we can reach 50 % less THD (e.g. under very
th th
distorted grid condition such as 10% unbalance 15% of 5 harmonic and 1.2% of 7 harmonic, Figure.
5.18) than the classical method.

Is also possible to conclude that is completely independent from the harmonic content in the grid
voltage as is verified in Table 5-3 under different grid conditions the method presented always the
same THD, approximately 9%.

Moreover this method is based in the speed of the rotating reference and not the position of the angle
reference it also has an infinite inertia inherited from the grid voltage

One negative effect resulted with the use of this method is the introduction of reactive power, created
when is used the angle produced by the improved method.

The reactive power appears from using a delayed reference in comparison with the load current as is
shown the Figure 3.3.

This situation is very clear in the following simulation result:

Figure 6.1 Grid Current using ISRF (Pink) and Grid Current Using MSRF (Green) and Load Current
(Blue) (Result obtained in simulation).

The delay in the compensation current occurs due the low pass filters used to clean the grid reference
implicating a later creation of the compensation signals being this effect exposed when the AF is
charging the capacitor.

After the insertion of this shift, it will increase the active power that flows in the system to compensate

50
the harmonics and therefore it might be necessary to redesign of the power electronic circuit.

To produce the high pass filtering of harmonics was demanded to do it in stationary coordinates
because the transformation though in theory is linear in practice as it was verified in laboratory in this
case was not.

Figure 6.2 High Pass Filter using Stationary Reference and Rotating Reference.

Figure 6.3 High pass filtering using signals from rotating reference only

Moreover is also verified that with higher voltage in the DC-Link it was achieved better THD to the
same shift of grid current, which is a result extrapolated after doing the reading from laboratorial
results is visible that is possible to improve the inner current loop, because it demonstrated a slow
response of the current proportion integral controller due it phase bandwidth limitation, it could be
improved by using hysteresis controller.

51
52
Annex 1

Laboratory Setup
Laboratory Setup
In this stage of the report will be introduced the condition where the experimental results were hold
and will be presented in the following way:

1. Physical aspect of the laboratory and the material used to achieve results
2. A table with the values of each component
3. Used software
4. Achieved results with 300 V in DC-Link

Therefore starting with the first point

53
A.1 - Physical aspect of laboratory and the material used do
achieve results

The laboratory was constructed according with the following schematic idea [3], [4]:

Figure A. 1 - Schematic drawing of the laboratory setup where the red lines are the signals, the blue
lines are the power lines and the black lines are the measurements

So in reality the previous schematic is reproduced in the following pictures:

Figure A. 2 – Laboratory Overview

54
And it was equipped with the following materials which were fundamental to get the results:

Figure A. 3 - 1-Resistive Load, 2-Diode bridge, 3- Grid Line inductance

Figure A. 5 - Current Measurements

Figure A. 4 - Danfoss VLT5000 inverter

55
Figure A. 7 – Analog to Digital Converter
and Digital to Analog Converter

Figure A. 6 - Fluke 343 Quality

Power Analyzer

Figure A. 8 - Oscilloscope Tektronix

Figure A. 9 - Galvanic Isolation Transformer

56
A.2 - Value of the components used in the experimental work

Therefore the results that were achieved in the presented work had as basis the following
components:

Sample Frequency 10 kHz


Load Resistance 100 Ω
Converter Inductance 10 mH
Converter Resistance 100 mΩ
DC Link Capacitor 470 µF
DC Link Voltage 300 V / 500 V
Line Voltage 50 V
Grid Frequency 50 HZ
Table A-1 - Components Values.

It also had a Danfoss inverter VLT5000 and California Instruments as Grid Generator.

A.3 - Software used

The software used was Control Desktop which is the software that comes with the DS1103 Figure.
Due to this program is possible to control in real time the parameters and the code flow in the
program.

Figure A. 10 – dSpace Cockpit

57
And the experimental code used was the following:
#include <Brtenv.h>
#include <math.h>
#include <slavedsp\usrdsp.h>
#include "zmienne_voc.h"
#include "D:\user_files\Dhurian\dspace\AF_dspace_lib.h"
//----------------------- Global Variables---------------------------------------
#define Fs 10000
#define DT 1e-4 // Sampling Frequency
#define pi 3.11415
#define sqrt2 1.4142135624
#define sqrt3 1.7320508076
#define sqrt23 0.8164965809
#define sqrt3tosqrt2 1.224744871
#define _1sqrt3 0.577350269
#define _sqrt3to2 0.866025404
#define _sqrt2to2 0.707106781
#define _1to3 0.333333333
#define _2to3 0.666666667
#define _1pi3 1.047197551
#define _2pi3 2.094395102
#define _4pi3 4.188790205
#define _5pi3 5.235987756
#define _2pi 6.283185307
#define PI 3.1415926536
#define _kt2 1.102657791
#define _kt1 0.954929658

//----------------------- Comunicação ------------------------------------------


Int16 task_id=0; // nr kanalu komunikacji 0 najwyzszy priorytet
Int16 index=-1; // identyfikacja funkcji w tabeli
//----------------------- Control Desk -----------------------------------------
Float64 exec_time; // czas wykonywania
//----------------- Stale niezbedne do uruchomienia DSP ------------------------
/* parameters for PWM1 initialization */
Float64 deadband= 2e-6; /* deadband period */
UInt16 sync_mode= SLVDSP1103_PWM3_SYNC_LEFT; /* sync mode */
/*****************************************************************************************/
/*Variables*/
Float64 Vd, Vq, Id, Iq, coseno, seno,Idd,Idq,Iddf1,Idd_old,Iddf,Iddf_old;
Float64 Idqf1,Idq_old,Idqf,Idqf_old;
Float64 vfalfa,vfbeta,coseno1,seno1;
Float64 udcerr,pUdc;
Float64 deltaf,deltaf_old=0.0,delta_old=0.000001,delta;
volatile Float64 udc_ref=0.0,ki=0.37,kpi=40.0,kii=17000.0,kp=0.35,iqref=0.0;
Float64 iderr,iqerr,ud,uq, idref,iud,iuq;
Float64 pId,pIq,iu,hq_old,hd_old;
Float64 ed=0.0,eq=0.0,hd,hq;
Float64 usalfa,usbeta, M_index, Module, Theta;
Float64 x_alf1=0.0001,x_alf2=0.0001,x_alf3=0.0001,x_alf4=0.0001;
Float64 y_alf1=0.0001,y_alf2=0.0001,y_alf3=0.0001,y_alf4=0.0001;
Float64 x_bet1=0.0001,x_bet2=0.0001,x_bet3=0.0001,x_bet4=0.0001;

58
Float64 y_bet1=0.0001,y_bet2=0.0001,y_bet3=0.0001,y_bet4=0.0001;
Float64 x_delt1=0.0001,x_delt2=0.0001,x_delt3=0.0001,x_delt4=0.0001;
Float64 y_delt1=0.0001,y_delt2=0.0001,y_delt3=0.0001,y_delt4=0.0001;
Float64 Idalfaf1,Idalfaf, Idbetaf, Idbetaf1;
Float64 D_R,D_S,D_T;
volatile Float64 choose=0.0,choose2=0.0,choose3=3.0;
volatile Float64 choose4=0.0,choose5=-3.0,limitation=0.0,choosedelta=0;
Float64 Theta;
Float64 T_2, T_1, T_0;
Float64 sinus, cosinus;
Float64 arg;
Float64 theta1,theta3,theta4;
Float64 ad,aq;
/* End Variables*/
/******************************************************************************************/
//-----------------------Function declaration -----------------------------------

void protections(void);
void PWM_sync_interrupt(void);
void da_converter(void);
void Control(void);
//----------------------- End of Function Declaration----------------------------------------------
//######################## CONTROL
void Control(void)
{
//Low pass filter cut frequency=250Hz sample frequency=10000
vfalfa=1.0e-3*(0.031*Valfa+ 0.12*x_alf1+0.18*x_alf2 + 0.12*x_alf3 + 0.03*x_alf4) + 3.5*y_alf1-
4.8*y_alf2+2.9*y_alf3-0.6*y_alf4;
vfbeta=1.0e-3*(0.031*Vbeta+ 0.12*x_bet1+0.18*x_bet2 + 0.12*x_bet3 + 0.03*x_bet4) + 3.5*y_bet1-
4.8*y_bet2+2.9*y_bet3-0.663010484385891*y_bet4;
x_alf4=x_alf3;
x_alf3=x_alf2;
x_alf2=x_alf1;
x_alf1=Valfa;
y_alf4=y_alf3;
y_alf3=y_alf2;
y_alf2=y_alf1;
y_alf1=vfalfa;
x_bet4=x_bet3;
x_bet3=x_bet2;
x_bet2=x_bet1;
x_bet1=Vbeta;
y_bet4=y_bet3;
y_bet3=y_bet2;
y_bet2=y_bet1;
y_bet1=vfbeta;
delta=sqrt(vfalfa*vfalfa+vfbeta*vfbeta);
theta1=atan2(Vbeta,Valfa);
if (choosedelta>1){
theta3=atan2(vfbeta/deltaf,vfalfa/deltaf);
};

59
if (choosedelta<1){
theta3=atan2(vfbeta/delta,vfalfa/delta);
};
if(choose2>1){
theta4=theta3;
}
if(choose2<1){
theta4=theta1;
}
coseno=cos(theta4);
seno=sin(theta4);
Vd=coseno*Valfa+seno*Vbeta;
Vq=-seno*Valfa+coseno*Vbeta;
Id=coseno*Ialfa+seno*Ibeta;
Iq=-seno*Ialfa+coseno*Ibeta;
Idd=coseno*Idalfa+seno*Idbeta;
Idq=-seno*Idalfa+coseno*Idbeta;
//Low pass filter cut frequency=50Hz
Iddf1=Idd*0.015+0.015*Idd_old+0.96*Iddf_old;
Idd_old=Idd;
Iddf_old=Iddf1;
//Low pass filter cut frequency = 50Hz
Idqf1=Idq*0.015+0.015*Idq_old+0.96*Idqf_old;
Idq_old=Idq;
Idqf_old=Idqf1;
//producing the high pass filter in alfa beta coordinates
Idalfaf1=Iddf1*coseno-seno*Idqf1;
Idbetaf1=Iddf1*seno+coseno*Idqf1;
Idalfaf=Idalfa-Idalfaf1;
Idbetaf=Idbeta-Idbetaf1;
Iddf=Idalfaf*coseno+seno*Idbetaf;
Idqf=-Idalfaf*seno+coseno*Idbetaf;
udcerr=udc_ref-Udc;
PI_d_2(udcerr,kp,ki,DT,10.0,-10.0,&idref,&iu);
if(choose>1){
iderr=idref-Id-Iddf;
if(choose5<1){
iqerr=-Iq-Idqf;
}
if(choose5>1){
iqerr=Idqf;
}
}
if(choose <1){
iderr=idref-Id;
iqerr=0-Iq;
}
PI_d_2(iderr,kpi,kii,DT,325.0,-325.0,&hd,&hd_old);
PI_d_2(iqerr,kpi,kii,DT,325.0,-325.0,&hq,&hq_old);

60
if (choose3>1){
ad=Vd-_2pi*50.0*10.0e-3*Iq;
aq=Vq+_2pi*50.0*10.0e-3*Id;
if(ad>limitation){ad=limitation;}
if(ad<-limitation){ad=-limitation;}
if(aq>limitation){aq=limitation;}
if(aq<-limitation){aq=-limitation;}
}
ed=hd+ad;
eq=hq+aq;
usalfa=coseno*ed-seno*eq;
usbeta=seno*ed+coseno*eq;
Theta =atan2(usbeta,usalfa);
if(Theta>2.0*pi){Theta=Theta-2.0*pi;}
if(Theta<0.0){Theta=Theta+2.0*pi;}
Module=sqrt(usalfa*usalfa+usbeta*usbeta);
M_index=pi*Module/(2*Udc);
if(M_index>0.9){M_index=0.9;}
if(M_index<0.0){M_index=0.0;}
/*********Modulator********/
if ( (0.0 <= Theta) & (Theta < _1pi3) ) { /* 0 <= Theta < 60 */
arg = Theta;
cosinus = cos(arg);
sinus = sin(arg);
T_2 = _kt2*M_index * sinus;
T_1 = _kt1*M_index*cosinus - T_2*0.5;
T_0 = 1.0 - (T_1 + T_2);
D_R = 0.5*T_0 + T_1 + T_2;
D_S = 0.5*T_0 + T_2;
D_T = 0.5*T_0;
}
else if ( (_1pi3 <= Theta) & (Theta < _2pi3) ) { /* 60 <= Theta < 120 */
arg = Theta - _1pi3;
cosinus = cos(arg);
sinus = sin(arg);
T_2 = _kt2*M_index * sinus;
T_1 = _kt1*M_index*cosinus - T_2*0.5;
T_0 = 1.0 - (T_1 + T_2);
D_R = 0.5*T_0 + T_1;
D_S = 0.5*T_0 + T_1 + T_2;
D_T = 0.5*T_0;
}
else if ( (_2pi3 <= Theta) & (Theta < PI) ) { /* 120 <= Theta < 180 */
arg = Theta - _2pi3;
cosinus = cos(arg);
sinus = sin(arg);
T_2 = _kt2*M_index * sinus;
T_1 = _kt1*M_index*cosinus - T_2*0.5;
T_0 = 1.0 - (T_1 + T_2);
D_R = 0.5*T_0;
D_S = 0.5*T_0 + T_1 + T_2;
D_T = 0.5*T_0 + T_2;
}

61
else if ( (PI <= Theta) & (Theta < _4pi3) ) { /* 180 <= Theta < 240 */
//if ( (-PI <= Theta) & (Theta < -_2pi3) ) { /* 180 <= Theta < 240 */
arg = Theta - PI;
// arg = Theta + PI;
cosinus = cos(arg);
sinus = sin(arg);
T_2 = _kt2*M_index * sinus;
T_1 = _kt1*M_index*cosinus - T_2*0.5;
T_0 = 1.0 - (T_1 + T_2);

D_R = 0.5*T_0;
D_S = 0.5*T_0 + T_1;
D_T = 0.5*T_0 + T_1 + T_2;
}
else if ( (_4pi3 <= Theta) & (Theta < _5pi3) ) { /* 240 <= Theta < 300 */
//if ( (-_2pi3 <= Theta) & (Theta < -_1pi3) ) { /* 240 <= Theta < 300 */
arg = Theta - _4pi3;
// arg = Theta + _2pi3;
cosinus = cos(arg);
sinus = sin(arg);
T_2 = _kt2*M_index * sinus;
T_1 = _kt1*M_index*cosinus - T_2*0.5;
T_0 = 1.0 - (T_1 + T_2);
D_R = 0.5*T_0 + T_2;
D_S = 0.5*T_0;
D_T = 0.5*T_0 + T_1 + T_2;
}

else if ( (_5pi3 <= Theta) & (Theta < 2*PI) ) { /* 300 <= Theta < 360 */
//if ( (-_1pi3 <= Theta) & (Theta < 0) ) { /* 300 <= Theta < 360 */
arg = Theta - _5pi3;
// arg = Theta + _1pi3;
cosinus = cos(arg);
sinus = sin(arg);
T_2 = _kt2*M_index * sinus;
T_1 = _kt1*M_index*cosinus - T_2*0.5;
T_0 = 1.0 - (T_1 + T_2);

D_R = 0.5*T_0 + T_1 + T_2;


D_S = 0.5*T_0;
D_T = 0.5*T_0 + T_1;
}
D_R2=1.0-D_R;
D_S2=1.0-D_S;
D_T2=1.0-D_T;

/* write PWM Duty cycle to slave DSP and test for error */

D_R2_scaled=(Int16) (((1-D_R2)/2.0)*DT/50e-9);
D_S2_scaled=(Int16) (((1-D_S2)/2.0)*DT/50e-9);
D_T2_scaled=(Int16) (((1-D_T2)/2.0)*DT/50e-9);
init_parms[SLVDSP_USRFCT_PWM3_INIT_DTY1]=D_R2_scaled;

62
init_parms[SLVDSP_USRFCT_PWM3_INIT_DTY2]=D_S2_scaled;
init_parms[SLVDSP_USRFCT_PWM3_INIT_DTY3]=D_T2_scaled;
// ds1103_slave_dsp_pwm3_duty_write(task_id, index,D_A,D_B,D_C); // PWM 1 (inverter)
ds1103_slave_dsp_usrfct_execute(task_id,
SLVDSP_USRFCT_PWM3_INIT,SLVDSP_USRFCT_PWM3_INIT_PCNT, init_parms);
}
/* Protections */
void protections(void)
{
if(Ia>Ifmax){start_pr=0;}
else if(Ib>Ifmax){start_pr=0;}
else if(Ic>Ifmax){start_pr=0;}
start_motor=start_pr;
if (start_pr == 0)
ds1103_bit_io_clear(DS1103_DIO2_CLEAR);
if (start_pr == 1)
ds1103_bit_io_set(DS1103_DIO2_SET);
/*
if (start_motor == 0)
ds1103_bit_io_clear(DS1103_DIO2_CLEAR);
if (start_motor == 1)
ds1103_bit_io_set(DS1103_DIO2_SET);
*/
}
/*End of protections*/
void da_converter(void)
{
Int32 iout;
Float64 out_da;
canal[0]= kanal_scope1;
canal[1]= kanal_scope2;
canal[2]= kanal_scope3;
canal[3]= kanal_scope4;
canal[4]= kanal_scope5;
canal[5]= kanal_scope6;
canal[6]= kanal_scope7;
canal[7]= kanal_scope8;
for (iout= 0.0; iout<8.0; iout++) {
switch(canal[iout])
{
case 0:
out_da= udc_ref/600.0;
break;
case 1:
out_da= Udc/600.0;
break;
case 2:
out_da= iqref/20.0;
break;
case 3:
out_da= iqerr/30.0;
break;
}

63
ds1103_dac_write(iout+1, out_da);
ds1103_dac_strobe();
}
}
void PWM_sync_interrupt(void)
{
host_service(1, 0); // TRACE service
ds1103_tic_start(); // start time measurement
if(skaluj_offset== 1.0){
// DC offset remove procedure "skaluj_offset" on/off
Skal_offset(&skaluj_offset, &kUa_offset, &kUb_offset,
&kIa_offset, &kIb_offset, &kUdc_offset,
&kiid1_offset, &kiid2_offset);
}
else{
Pomiary(kUa_offset, kUb_offset, kIa_offset, kIb_offset, kUdc_offset,
kiid1_offset, kiid2_offset,
&Ua, &Ub, &Uc, &Ia, &Ib, &Ic, &udc, &idc_l, &Id1, &Id2, &Id3); // Measure

abc2ab(Ua, Ub, Uc, &Valfa, &Vbeta);


abc2ab(Ia, Ib, Ic, &Ialfa, &Ibeta);
abc2ab(Id1,Id2,Id3,&Idalfa,&Idbeta);
LPF50Hz(udc, &Udc_old, &Udc);
protections();
Control();
da_converter();
}
exec_time = ds1103_tic_read();
}

//----------------------- Main Function---------------------------------------


void main (void)
{
/* basic initialization of DS1103 */
ds1103_init();
/* initialization of slave DSP communication */
/* ensure 2 us settling time */
ds1103_tic_delay(2.0e-6);
/* init D/A converter in latched mode */
ds1103_dac_init(DS1103_DACMODE_LATCHED);
//ds1103_dac_init(DS1103_DACMODE_TRANSPARENT);
ds1103_slave_dsp_communication_init();
/*Encoder*/
/* reset the incremental encoders */
ds1103_inc_reset(6);
/* init incremental encoder channel 6*
* input signal for channel 6 input signal TTL*/
ds1103_inc_init(6, DS1103_INC_CH6_TTL);
/*PWM1 generation*/
/* init and start of 3-phase PWM generation on slave DSP */
ds1103_slave_dsp_pwm3_init(task_id, DT,D_R,D_S,D_T, deadband, sync_mode);
ds1103_slave_dsp_pwm3_start(task_id);

64
/* registration of PWM duty cycle update command */
ds1103_slave_dsp_pwm3_duty_write_register(task_id, &index);
/*END_PWM1 generation*/
/*PWM2 generation*/
ds1103_slave_dsp_pwm_init(task_id, DT, duty_init,mode, pol,
SLVDSP1103_PWM_CH2_MSK | SLVDSP1103_PWM_CH3_MSK |
SLVDSP1103_PWM_CH4_MSK);
/* start of PWM2 generation on slave DSP */
ds1103_slave_dsp_pwm_start(task_id, SLVDSP1103_PWM_CH2_MSK |
SLVDSP1103_PWM_CH3_MSK | SLVDSP1103_PWM_CH4_MSK);
/*END_PWM2 generation*/
/* initialization of PWM sync interrupt */
ds1103_set_interrupt_vector(DS1103_INT_SLAVE_DSP_PWM,(DS1103_Int_Handler_Type)
&PWM_sync_interrupt,SAVE_REGS_ON);
ds1103_enable_hardware_int(DS1103_INT_SLAVE_DSP_PWM);
DS1103_GLOBAL_INTERRUPT_ENABLE();
/*Inicjacja pierwszych 8 bitow jako wyjscia*/
ds1103_bit_io_init( DS1103_DIO1_OUT );
/* Background tasks */
while(1)
{
master_cmd_server();
host_service(0, 0); /* COCKPIT service */
}
}

A.4 - Results with a DC-Link of 300V

The following results were achieved with a DC-Link of 300V and a line voltage of 50V and maintaining
the previous specifications.

These results are presented with the following order first the Modified Synchronous Reference Method
next Improved Synchronous Reference Method with the following cut frequencies Fc=150 Hz and
Fc=200 Hz and Fc=250 Hz.

65
In this four experimental results is shown the behavior of the MSRF and ISRF under ideal grid
conditions as it was expected there where no substantial differences.

Figure A. 11 - MSRF Figure A. 12 - ISRF (Fc=150Hz)

Figure A. 13 – ISRF(Fc = 200Hz) Figure A. 14 - ISRF (Fc=250Hz)

From top to down the represented signals are - Grid Voltage, Grid Current, Load Current and Current
injected by the Active Filter.

66
In this four experimental results is shown the behavior of the MSRF and ISRF under 5% of 5th
harmonic voltage distortion as it was expected there is some noticeable differences. Being the best
result when we use the cut frequency to 150 Hz Figure A. 18.

Figure A. 15 - MSRF Figure A. 16 - ISRF (Fc=150Hz)

Figure A. 17 – ISRF(Fc = 200Hz) Figure A. 18 - ISRF (Fc=250Hz)

From top to down the represented signals are - Grid Voltage, Grid Current, Load Current and Current
injected by the Active Filter.

67
In this four experimental results is shown the behavior of the MSRF and ISRF under 10% of 5th
harmonic voltage distortion as it was expected there is some noticeable differences. Being the best
result when we use the cut frequency to 200 Hz Figure A. 21.

Figure A. 19 - MSRF Figure A. 20 - ISRF (Fc=150Hz)

Figure A. 21 – ISRF(Fc = 200Hz) Figure A. 22 - ISRF (Fc=250Hz)

From top to down the represented signals are - Grid Voltage, Grid Current, Load Current and Current
injected by the Active Filter.

68
In this four experimental results is shown the behavior of the MSRF and ISRF under 15% of 5th
harmonic voltage distortion as it was expected there is some noticeable differences. Being the best
result when we use the cut frequency to 200 Hz Figure A. 26.

Figure A. 23 - MSRF Figure A. 24 - ISRF (Fc=150Hz)

Figure A. 25 – ISRF(Fc = 200Hz) Figure A. 26 - ISRF (Fc=250Hz)

From top to down the represented signals are - Grid Voltage, Grid Current, Load Current and Current
injected by the Active Filter.

69
In this four experimental results is shown the behavior of the MSRF and ISRF under 5% of 5th and
1.2% of 7th harmonics voltage distortion as it was expected there is some extraordinary differences.
Being the best result when we use the cut frequency to 200 Hz Figure A. 29.

Figure A. 27 - MSRF Figure A. 28 - ISRF (Fc=150Hz)

Figure A. 29 – ISRF(Fc = 200Hz) Figure A. 30 - ISRF (Fc=250Hz)

From top to down the represented signals are - Grid Voltage, Grid Current, Load Current and Current
injected by the Active Filter.

70
In this four experimental results is shown the behavior of the MSRF and ISRF under 10% of 5th and
1.2% of 7th harmonics voltage distortion as it was expected there is some extraordinary differences.
Being the best result when we use the cut frequency to 200 Hz Figure A. 34.

Figure A. 31 – MSRF Figure A. 32 – ISRF (Fc=150Hz)

Figure A. 33 – ISRF(Fc = 200Hz) Figure A. 34 – ISRF (Fc=250Hz)

From top to down the represented signals are - Grid Voltage, Grid Current, Load Current and Current
injected by the Active Filter.

71
In this four experimental results is shown the behavior of the MSRF and ISRF under 15% of 5th and
1.2% of 7th harmonics voltage distortion as it was expected there is some extraordinary differences.
Being the best result when we use the cut frequency to 200 Hz Figure A. 37.

Figure A. 35 – MSRF Figure A. 36 – ISRF (Fc=150Hz)

Figure A. 37 – ISRF(Fc = 200Hz) Figure A. 38 – ISRF (Fc=250Hz)

From top to down the represented signals are – Grid Voltage, Grid Current, Load Current and Current
injected by the Active Filter.

72
In this four experimental results is shown the behavior of the MSRF and ISRF under 5% of 5th, 1.2% of
7th harmonics and 10% of imbalance voltage distortion, there aren’t big differences between the
methods. Being the best result when we use the cut frequency to 200 Hz Figure A. 41.

Figure A. 39 – MSRF Figure A. 40 – ISRF (Fc=150Hz)

Figure A. 41 – ISRF(Fc = 200Hz) Figure A. 42 – ISRF (Fc=250Hz)

From top to down the represented signals are - Grid Voltage, Grid Current, Load Current and Current
injected by the Active Filter.

73
In this four experimental results is shown the behavior of the MSRF and ISRF under 10% of 5th, 1.2%
of 7th harmonics and 10% of imbalance voltage distortion as it was expected there is some
extraordinary differences. Being the best result when we use the cut frequency to 250 Hz Figure A. 46.

Figure A. 43 – MSRF Figure A. 44 – ISRF (Fc=150Hz)

Figure A. 45 – ISRF(Fc = 200Hz) Figure A. 46 – ISRF (Fc=250Hz)

From top to down the represented signals are - Grid Voltage, Grid Current, Load Current and Current
injected by the Active Filter.

74
In this four experimental results is shown the behavior of the MSRF and ISRF under 15% of 5th, 1.2%
of 7th harmonics and 10% of imbalance voltage distortion as it was expected there is some
extraordinary differences. Being the best result when we use the cut frequency to 250 Hz Figure A. 50.

Figure A. 47 – MSRF Figure A. 48 – ISRF (Fc=150Hz)

Figure A. 49 – ISRF(Fc = 200Hz) Figure A. 50 – ISRF (Fc=250Hz)

From top to down the represented signals are - Grid Voltage, Grid Current, Load Current and Current
injected by the Active Filter.

75
76
Annex B

Simulation Setup
Simulation Setup
Here will explained how were done the simulation results and will be presented in the following way:

1. Simulation Environment
2. Used Conditions
3. Simulation Code

Thus starting with the first point

77
B.1 - Simulation Environment

The simulation work was accomplished using a professional software package “SABER”.

To produce the simulation it was used some electrical elements from the library included in SABER
and other were introduced using MAST programming language, like the one used to produce the
control method and will be shown in the following point, due the usage of this program it was possible
to simulate digital signals and the behavior of each element of the system in the following picture is
shown the desktop:

Figure B. 1 – Simulation Environment

After it will be introduced the conditions used to simulate the system

78
B.2 - Simulation Conditions

So the simulation conditions were the shown in the following table:

Sample Frequency 10.0 kHz


Load Resistance 100 Ω
Converter Inductance 10 mH
Converter Resistance 100 mΩ
Line Inductance 10 mH
DC Link Capacitor 470 µF
DC Link Voltage 500 V
Line Voltage 50 V
Grid Frequency 50 HZ
Table B. 1 – Simulation Parameters

B.3 - Simulation Code

To simulate the desired system it was written a code in MAST language to produce the control signals
that are going to be sent to the Inverter to inject the desired current and therefore compensate the
harmonics.

To produce these signals it was used the SVM (Space Vector Modulation)

So the used code was the following:

#################################################
# Control for Active Filter #
#################################################
element template volt_est_control vaz vbz vcz aiz biz ciz aiz1 biz1 ciz1 gate_a gate_ai gate_b
gate_bi gate_c gate_ci udc_z smp = ti,pi,ti_p,pi_p,pdc,T_in,udc_ref,t_filtr, flaga,kk,k1,k2
state nu aiz,biz,ciz,aiz1,biz1,ciz1,udc_z,smp,vaz,vbz,vcz
state logic_4 gate_a, gate_ai, gate_b, gate_bi, gate_c, gate_ci
number pi=-1,
ti=50m,
pi_p=-0.37,
ti_p=10m,
pdc=0.35,
T_in=0.016,
udc_ref=710,

79
t_filtr=10m,
flaga=0,
kk=0.0,
k1=-66.75n,
k2=35.75n
{
<consts.sin
state nu iq_ref=0.0, ts=100.0u
state nu u_alf, u_bet, i_alf, i_bet, i_alf1, i_bet1, id, iq, id1, iq1, u_alf_ref, u_bet_ref,u_alf_y=0,
u_bet_y=0
state nu theta, id_ref, id_err, iq_err, id_err_old, iq_err_old
state nu uq_ref_old=0, ud_ref_old=550, uq_ref, ud_ref,ud,uq
state nu id_ref_old=0,id_ref_old_2=0,iq_ref_old=0,iq_ref_old_2=0
state nu id1_old,id1_2,id1_1,iq1_old,iq1_2,iq1_1
state logic_4 Sa_in=l4_1,Sb_in=l4_1,Sc_in=l4_1
state nu m=0.98, pwm_a=0.5, pwm_b=0.5,pwm_c=0.5, theta_ref
state nu sektor,alpha,a,b,t0_2,ua_2,ub_2
state nu deadtime=2u,tss=50.0u
state nu x_alf1=0.000001,x_alf2=0.00001,x_alf3=0.00001,x_alf4=0.0000001
state nu x_bet1=0.00001,x_bet2=0.000001,x_bet3=0.0001,x_bet4=0.000001
state nu delta1=0.000001,delta2=0.000001,delta3=0. 001,delta4=0.0000001
state nu y_alf1=0.0, y_alf2=0.0, y_alf3=0.0,y_alf4=0.0
state nu y_bet1=0.0, y_bet2=0.0, y_bet3=0.0,y_bet4=0.0
state nu deltaf1=0.0,deltaf2=0.0,deltaf3=0.0,deltaf4=0.0
state nu vfalfa, vfbeta, delta, deltaf,coseno,seno, iddf,iddf_old, idqf, idqf_old
state nu kpi=42.667,kii=91022
state nu iId_, pId_,iIq_, pIq_,iId_old_,iIq_old_
state nu eq,ed
state nu pId_ref,iId_ref,iId_ref_old=0.0
state nu pUdc=0.5013 , ki=267
state nu angulo
when(time_init){
schedule_event(time,gate_a,l4_0)
schedule_event(time,gate_ai,l4_0)
schedule_event(time,gate_b,l4_0)
schedule_event(time,gate_bi,l4_0)
schedule_event(time,gate_c,l4_0)
schedule_event(time,gate_ci,l4_0)
}
when(event_on(smp)){

80
if (kk<1.0){
#****************************************************************************#
#* Alfa/Beta- Transformations #
#****************************************************************************#
i_alf = sqrt(2/3)*(aiz-0.5*biz-0.5*ciz)
i_bet = sqrt(2/3)*(sqrt(3)/2)*(biz-ciz)
i_alf1 = sqrt(2/3)*(aiz1-0.5*biz1-0.5*ciz1)
i_bet1 = sqrt(2/3)*(sqrt(3)/2)*(biz1-ciz1)
u_alf =sqrt(2/3)*(vaz-0.5*vbz-0.5*vcz)
u_bet =sqrt(2/3)*(sqrt(3)/2)*(vbz-vcz)

###############################################################
#
# Filtering of the voltage to create the reference angle
#
##############################################################
vfalfa=1.0e-6*(0.1095*u_alf+0.4379
*x_alf1+0.6568*x_alf2+0.4379*x_alf3+0.1095*x_alf4)+3.9038*y_alf1-5.7160*y_alf2+3.7205*y_alf3-
0.9083*y_alf4
vfbeta=1.0e-6*(0.1095*u_bet+0.4379
*x_bet1+0.6568*x_bet2+0.4379*x_bet3+0.1095*x_bet4)+3.9038*y_bet1-5.7160*y_bet2+
3.7205*y_bet3 -0.9083*y_bet4
x_alf4=x_alf3
x_alf3=x_alf2
x_alf2=x_alf1
x_alf1=u_alf
y_alf4=y_alf3
y_alf3=y_alf2
y_alf2=y_alf1
y_alf1=vfalfa
x_bet4=x_bet3
x_bet3=x_bet2
x_bet2=x_bet1
x_bet1=u_bet
y_bet4=y_bet3
y_bet3=y_bet2
y_bet2=y_bet1
y_bet1=vfbeta
delta=sqrt(vfalfa*vfalfa+vfbeta*vfbeta)

81
coseno=vfalfa/(deltaf)
seno=vfbeta/(deltaf)
if(coseno<0 & seno>0) angulo = atan(seno/(coseno))+math_pi
else if(coseno<0 & seno< 0) angulo = atan(seno/(coseno))-math_pi
else angulo=atan(seno/(coseno))
if(u_alf<0 & u_bet>0) theta = atan(u_bet/(u_alf+0.000001p))+math_pi
else if(u_alf<0 & u_bet< 0) theta = atan(u_bet/(u_alf+0.000001p))-math_pi
else theta=atan(u_bet/(u_alf+0.000001p))
theta=ângulo

#**************************************************************************#
#* d/q - Transformation *#
#**************************************************************************#
id = (cos(theta)*i_alf+sin(theta)*i_bet)
iq = (-sin(theta)*i_alf+cos(theta)*i_bet)
id1 =(cos(theta)*i_alf1+sin(theta)*i_bet1)
iq1 =(-sin(theta)*i_alf1+cos(theta)*i_bet1)
ud=cos(theta)*u_alf+sin(theta)*u_bet
uq=-sin(theta)*u_alf+cos(theta)*u_bet
iddf=0.0061*id1+0.0061*id1_old+0.9878*iddf_old # Low Pass Filter @20Hz
iddf_old=iddf #Low Pass Filter Continuation
id1_old=id1 #Low Pass Filter Continuation
id1_2=id1-iddf #Producing the High pass filter using #a Low pass
#filter in the d coordinate the same option is used in the q coordinate

idqf=0.0061*iq1+0.0061*iq1_old+0.9878*idqf_old
idqf_old=idqf
iq1_old=iq1
iq1_2=iq1-idqf
#**************************************************************************#
#* Conventional Regulators *#
#**************************************************************************#
##### DC Voltage Control ####
delta_Udc=udc_ref-udc_z #* regulator PI*#
pId_ref= pUdc*delta_Udc # Proportional Part of th PI
iId_ref=ki*delta_Udc*ts+iId_ref_old #Integral part od the PI

82
iId_ref_old=iId_ref
if (iId_ref>(10.0))iId_ref=10.0 #Higher Limitation of the integrator
if (iId_ref<(-10.0))iId_ref=-10.0 #Lower Limitation of the integrator
id_ref=pId_ref+iId_ref
if(id_ref>(10.0))id_ref=10.0 #Higher limitation of the PI
if(id_ref<(-10.0))id_ref=-10.0 #Lower Limitation of the PI

######## Current control ####


id_err=id_ref-id -id1_2
iq_err=0.0-iq-iq1_2
iId_=kii*id_err*ts+iId_old_
pId_=kpi*id_err
if(iId_>(325.0))iId_=325.0
if(iId_<(-325.0))iId_=-325.0
ed=pId_+iId_
if(ed>(325.0))ed=325.0
if(ed<(-325.0))ed=-325.0
iIq_=kii*iq_err*ts+iIq_old_
pIq_=kpi*iq_err
if(iIq_>(325.0))iIq_=325.0
if(iIq_<(-325.0))iIq_=-325.0
eq=pIq_+iIq_
if(eq>(325.0))eq=325.0
if(eq<(-325.0))eq=-325.0
ud_ref=ed+ud+iq*2*pi*50*10.0e-3 # Decoupling System
uq_ref=eq+uq-id*2*pi*50*10.0e-3 #Decoupling System
uq_ref_old=uq_ref
ud_ref_old=ud_ref
iq_err_old=iq_err
id_err_old=id_err
iId_old_=iId_
iIq_old_=iIq_
u_alf_ref = ud_ref*cos(theta) - uq_ref*sin(theta)
u_bet_ref = ud_ref*sin(theta) + uq_ref*cos(theta)

#**************************************************************************#
#* Modulator *#
#**************************************************************************#
if(u_alf_ref<0 & u_bet_ref>0) theta_ref = atan(u_bet_ref/(u_alf_ref+0.000001p))+math_pi
else if(u_alf_ref<0 & u_bet_ref< 0) theta_ref = atan(u_bet_ref/(u_alf_ref+0.000001p))-math_pi

83
else theta_ref=atan(u_bet_ref/(u_alf_ref+0.000001p))
ua_2=u_alf_ref*u_alf_ref
ub_2=u_bet_ref*u_bet_ref
m=sqrt(ua_2+ub_2)/(udc_z*0.866)
if (m>1) m=1
if (m<0) m=0
if (theta_ref>2*math_pi/3) {
alpha=theta_ref-2*math_pi/3
sektor=3
}
else if (theta_ref>math_pi/3) {
alpha=theta_ref-math_pi/3
sektor=2
}
else if (theta_ref>0) {
alpha=theta_ref
sektor=1
}
else if (theta_ref<(-2*math_pi/3)) {
alpha=theta_ref+math_pi
sektor=4
}
else if (theta_ref<(-math_pi/3)){
alpha=theta_ref+2*math_pi/3
sektor=5
}
else {
alpha=theta_ref+math_pi/3
sektor=6
}

a=(sqrt(3)/2)*m*cos(alpha)-0.5*m*sin(alpha)
b=m*sin(alpha)
t0_2=(1-a-b)/2
if (sektor==1){
pwm_a=a+b+t0_2
pwm_b=b+t0_2
pwm_c=t0_2
}
else if (sektor==2){

84
pwm_b=a+b+t0_2
pwm_a=a+t0_2
pwm_c=t0_2
}
else if (sektor==3){
pwm_b=a+b+t0_2
pwm_c=b+t0_2
pwm_a=t0_2
}
else if (sektor==4){
pwm_c=a+b+t0_2
pwm_b=a+t0_2
pwm_a=t0_2
}
else if (sektor==5){
pwm_c=a+b+t0_2
pwm_a=b+t0_2
pwm_b=t0_2
}
else if (sektor==6){
pwm_a=a+b+t0_2
pwm_c=a+t0_2
pwm_b=t0_2
}
if (pwm_a<0.01) pwm_a=0
if (pwm_b<0.01) pwm_b=0
if (pwm_c<0.01) pwm_c=0
if (pwm_a>0.99) pwm_a=1
if (pwm_b>0.99) pwm_b=1
if (pwm_c>0.99) pwm_c=1
pwm_a=pwm_a*tss
pwm_b=pwm_b*tss
pwm_c=pwm_c*tss
schedule_event(time+tss-pwm_a,gate_a,l4_1)
schedule_event(time+tss-pwm_a,gate_ai,l4_0)
schedule_event(time+tss-pwm_b,gate_b,l4_1)
schedule_event(time+tss-pwm_b,gate_bi,l4_0)
schedule_event(time+tss-pwm_c,gate_c,l4_1)
schedule_event(time+tss-pwm_c,gate_ci,l4_0)
schedule_event(time+tss+pwm_a,gate_a,l4_0)

85
schedule_event(time+tss+pwm_a,gate_ai,l4_1)
schedule_event(time+tss+pwm_b,gate_b,l4_0)
schedule_event(time+tss+pwm_b,gate_bi,l4_1)
schedule_event(time+tss+pwm_c,gate_c,l4_0)
schedule_event(time+tss+pwm_c,gate_ci,l4_1)
}

if (kk>1.0){
schedule_event(time+tss-pwm_a,gate_a,l4_0)
schedule_event(time+tss-pwm_a,gate_ai,l4_0)
schedule_event(time+tss-pwm_b,gate_b,l4_0)
schedule_event(time+tss-pwm_b,gate_bi,l4_0)
schedule_event(time+tss-pwm_c,gate_c,l4_0)
schedule_event(time+tss-pwm_c,gate_ci,l4_0)
schedule_event(time+tss+pwm_a,gate_a,l4_0)
schedule_event(time+tss+pwm_a,gate_ai,l4_0)
schedule_event(time+tss+pwm_b,gate_b,l4_0)
schedule_event(time+tss+pwm_b,gate_bi,l4_0)
schedule_event(time+tss+pwm_c,gate_c,l4_0)
schedule_event(time+tss+pwm_c,gate_ci,l4_0)
}

schedule_next_time(time)
}

86
References

References
[1] G. D. Marques; V. Fernão Pires; Mariusz Malinowski; Marian Kazmierkowski “An
Improved Synchronous Reference Frame Method for Active Filters”.

[2] Marek Jasiński “Direct Power and Torque Control of AC/DC/AC Converter-Fed Induction
Motor Drives”, 2005.

[3] Mariusz Cichowlas “PWM Rectifier with Activer Filtering”, 2004

[4] Mariusz Malinowski “Sensorless Control Strategies for Three-Phase PWM Rectifiers”,
2001.

[5] Gil Marques, “Controlo de Motores Eléctricos”, 2007.

[6] Gil Marques, “Modelo Dinâmico de Máquinas Eléctricas”, 2007.

[7] Pedro Verdelho; G. D. Marques “DC Voltage Control and Stability Analysis of PWM-
Voltage-Type Reversible Rectifiers”, IEEE Transactions on Industrial Electronics, vol.45,
no.2, April 1998, pp 263-273.

87
[8] Simone Buso; Luigi Malesani; Paulo Mattavelli “Comparison of Current Control
Techniques for Active Filter Applications”, IEEE Transactions on Industrial Electronics,
vol. 45, no.5 1998, pp 722-729.

[9] Bhim Singh; Kamal Al-Haddad; Ambrish Chandra “A Review of Active Filters for Power
Quality Improvement”, IEEE Transactions on Industrial Electronics, vol. 46, no.5 October
1999, pp 960-971.

[10] Reyes S. Herrera; Patricio Salmerón; Hyosung Kim “Instantaneous Reactive Power
Theory Applied to Active Power Filter Compensation: Different Approaches, Assessment,
and Experimental Results”, IEEE Transactions on Industrial Electronics, vol.55, no.1,
January 2008, pp 184-196.

[11] M.El-Habrouk; M.K.Darwish; P.Mehta “Active power filters: A review”, IEE Proc.-Electr.
Power Appl., vol.145, no.5, September 2000, pp 403-413.

[12] Donghua Chen; Shaojun Xie “Review of the control strategies applied to active power
filters”, IEEE International Conference on Electric Utility Deregulation, Restructuring and
Power Technologies (DRPT2004), April, 2004, pp 666-670.

[13] Marian P. Kazmierkowski, Luigi Malesani “Current Control Techniques for Three-Phase
Voltage-Source PWM Converters: A Survey”, IEEE Transactions on Industrial
Electronics, vol. 45, no.5, October 1998, pp 691-703.

88

You might also like