Contributions to Grid-Synchronization Algorithms for ...

2 downloads 0 Views 11MB Size Report
Mar 16, 2009 - [109] T. Ostrem, W. Sulkowski, L. Norum, and W. Yadong, “Phase-locked loop with adaptive ..... Artech House Publishers, 2007. [197] Y. W. Li ...
Vigo University Department of Electronic Technology

Dissertation submitted for the degree of European Doctor of Philosophy in Electrical Engineering

Contributions to Grid-Synchronization Techniques for Power Electronic Converters

Author: Francisco Daniel Freijedo Fernández Director: Jesús Doval Gandoy

Vigo, 9 June 2009

Ph.D. Committee Members: Carlos Martínez Peñalver Carlos Couto Enrique Acha Emilio Bueno Pedro Roncero Grzegorz Benysek Marco Liserre Paolo Mattavelli Enrique Romero Cadaval Enrique Barreiro

9 June 2009 University of Vigo Vigo, Spain

Vita Francisco Daniel Freijedo Fernández was born in Ponteareas (Pontevedra), Spain, in December 1978. He received the M.Sc. in Physics in 2002 from the University of Santiago de Compostela. Since 2003 to 2005 he worked as software developer. From February 2005 he is part time assistant lecturer of the University of Vigo. From June 2008 to October 2008 he had a research stay at the Power Engineering Group of the University of Glasgow. He had a research stay at the University of Alcalá in February 2009. His research interests include digital control of Power Electronics Converters, specially for Power Quality and renewable energy applications. He has authored or coauthored about 20 technical papers in the field of power electronics, 8 of which are IEEE Transactions grade. He is member of the IEEE since 2007 and also of the IEEE Industrial Electronics and IEEE Power Electronics Societies.

Contributions to Grid-Synchronization Techniques for Power Electronic Converters Francisco Daniel Freijedo Fernández

(Abstract) Real time grid-synchronization techniques are studied in this dissertation. The synchronization block is a crucial part of the controller in grid-connected power converters. The phase-angle of the voltage/current vector fundamental component at the point of common coupling (PCC) should be tracked online in order to control the energy transfer between the power converter and the ac mains. Synchronization algorithms have been evolving since the first analog zero-cross detectors to current high performance digital implementations. An in-depth review of the state-of-art in grid synchronization is contributed in the Chapter 2 of this PhD dissertation. In some ways, it could be said that the grid synchronization state-of-art has been evolving to avoid malfunctions due to power quality phenomena. The Ainsworth proposal of using a voltage controlled oscillator (VCO) inside the control loop of a High Voltage Direct Current (HVDC) successfully dealt with the novel, at that time, harmonic instability problem. Subsequently, analog phase locked loops (PLL) were proposed to be used as measurement blocks, which provide frequency adaptation in motor drives. Since then, controllers using analog and digital PLLs have been proposed in all kind of applications such as controlled rectifiers, Flexible ac Transmission Systems (FACTS) and power line conditioners. Nowadays, the fields of Distributed Power Generation Systems (DPGS), power line conditioners and traction applications have an important demand of optimized synchronization algorithms. Even though the main part of chapter 2 is only dedicated to synchronization with fundamental component (and positive-sequence), the issue of harmonic and negative sequences extraction is also dealt with. The advanced synchronization/extraction methods based on synchronous reference frames (SRFs) and moving average filters (MAFs), which are major contributions of this PhD dissertation, are introduced in this chapter. Digital PLLs are the most employed synchronization algorithm, mainly due to their simple implementation, good frequency adaptation and acceptable filtering versus transient response trade-off. Chapter 3 is devoted to digital PLLs design. In a general way, PLLs with a low bandwidth (low-gain PLLs) are required when handling with distorted voltages. It is analytically demonstrated that low-gain PLLs have more trade-offs than high-gain PLLs (e.g. PLLs for communications): it is not possible to optimize the settling time for a phase-jump without getting slower the PLL response to frequency variations. Existing tuning methods do not take into account low-gain features, which may result in non-optimum designs. An intuitive tuning methodology based on inspection of frequencydomain diagrams is contributed in this chapter. Contrary to the other existing tuning methods, it takes into account low-gain dynamics. It is assured an optimized performance

in the presence of any kind of disturbances in the grid. In the second part of the chapter, the DCO based on a RC oscillator is presented: the digital model of a sinusoidal oscillator is implemented, instead of explicit trigonometric functions. This solution reduces the needed digital resources without reducing the performance, which could be specially useful for DSP-based control of power converters. SRF synchronization algorithms based on moving average filters (SRF-MAF), which have been introduced in chapter 2, provide a quite fast transient response and very good harmonic cancellation. However, its main drawback with respect of PLLs is its lack of frequency adaptation working open loop. This problem is also observed in other schemes based on stochastic filtering. A novel synchronization technique based on filtering in the SRF provided in chapter 4. The main novelty with respect to previous works is the fact that it is frequency adaptive working open loop. This is achieved by cascading two kinds of finite impulse response (FIR) filters: a moving average FIR filter providing an excellent harmonic cancellation and a predictive filter compensating for the negative phase (delay) introduced by the first one. The resulting schemes are named Predictive SRF-MAFs. It is proved that predictive SRF-MAFs have a very high performance under distorted conditions, specially when compared with PLLs. Chapter 5 provides a novel approach in the implementation of Proportional+Resonant (PR) current controllers, specially suitable for active power filters (APFs) compensating for high order harmonics. The difference equation to implement each resonant controller has been obtained from the impulse invariant discretization method. An explicit estimation of the grid-frequency deviation, which is obtained from a PLL, is employed to update online the PR current controller. An excellent frequency adaptation is achieved with this technique. Technical details of the whole discrete-time controller are provided. A 1 kVA rated lab prototype has been implemented and tested. Experimental tests show how the system performs both in steady-state and under different transients. Perfect tracking in steady-state for a wide range of grid-frequencies is achieved. Regarding transient response, different tests were programmed such as load transients (change in the load), sudden and large changes in the ac mains frequency (frequency steps) and strong source voltage faults (voltage sags with phase-jump). Experimental results prove how the system is robust and fast responding to all of these possible real operation faults. Even though this chapter is focused in APF applications, the proposed PR controller is suitable for a vast range of industrial applications such as power line conditioners (including APFs), DPGS, FACTS, controlled rectifiers, motor drives, etc. Chapter 6 is devoted to review all the contributions of this PhD thesis. A brief outline of the future work is also provided.

Acknowledgments First of all, I would like to thank my director, Dr. Jesús Doval, for his patience, guidance and support. He introduced me to the interesting field of power electronics, and more specifically in the issue of grid-synchronization. Secondly, I would like to express my appreciation to my colleagues of the Electronic Technology Department of the University of Vigo. Specially, I would like to thank Dr. Oscar López for the technical feedback, his continuous support and his help with LATEX. I would like to thank Professor Enrique Acha for giving me the opportunity to be at the University of Glasgow, and for his invaluable help during the development of this dissertation. I would also like to thank University of Vigo for the grant I was given to stay in Glasgow. I wish to thank Dr Emilio Bueno for the good moments at IECON 2008, and for having invited me to the University of Alcala. I would like to thank the PhD Committee Members for their comments which help to improve the overall quality of this dissertation. I wish to thank all the colleagues and students for the good moments we shared. Especially, I would like to mention Enrique Ortega, Pablo, Jano, Jacobo, Renato and Alejandro. I would like to thank Carmenza by her English classes and for the good moments we shared with Miguel. Finally, I would like to dedicate this dissertation to my family, specially to my parents for having encouraged me to study and to Silvinha for her unconditional love.

Á miña familia, Silvinha, Ma Victoria, Bernardo, Marivi, Carmiña e Amelia

Contents

Contents

i

List of Figures

ix

List of Tables

xvii

List of Abbreviations and Acronyms

xix

Nomenclature

xxiii

1 Introduction

1

1.1

Objectives and Motivation of this Work . . . . . . . . . . . . . . . . . . . .

1

1.2

Background on Electric Power Definitions . . . . . . . . . . . . . . . . . .

1

1.2.1

Power Definitions under Sinusoidal Conditions . . . . . . . . . . . .

2

1.2.1.1

Electrical Variables with Phasor Notation . . . . . . . . .

4

Power Definitions under Non-Sinusoidal Conditions . . . . . . . . .

6

1.2.2.1

7

1.2.2

Power Definitions in the Frequency Domain by Budeanu . 1.2.2.1.1

Apparent Power S: . . . . . . . . . . . . . . . . .

7

1.2.2.1.2

Active Power P : . . . . . . . . . . . . . . . . . .

7

1.2.2.1.3

Reactive Power Q: . . . . . . . . . . . . . . . . .

8

i

ii

1.2.2.2

1.2.3

8

1.2.2.1.5

Power Factor λ . . . . . . . . . . . . . . . . . . .

8

1.2.2.1.6

Displacement Factor cos (φ) . . . . . . . . . . . .

8

1.2.2.1.7

Distortion Factor cos(γ) . . . . . . . . . . . . . .

8

Power Definition in the Time Domain by Fryze . . . . . .

9

1.2.2.2.1

Active Power Pw . . . . . . . . . . . . . . . . . .

9

1.2.2.2.2

Apparent Power Ps . . . . . . . . . . . . . . . . .

9

1.2.2.2.3

Active Power Factor λ . . . . . . . . . . . . . . .

9

1.2.2.2.4

Reactive Power . . . . . . . . . . . . . . . . . . .

9

1.2.2.2.5

Reactive Power Factor λq . . . . . . . . . . . . .

9

1.2.2.2.6

Active Voltage vw and Active Current iw . . . . .

9

1.2.2.2.7

Reactive Voltage vq and Reactive Current iq

. . 10

1.2.3.1

Power in Balanced Three-phase Systems . . . . . . . . . . 10

1.2.3.2

Analysis under Unbalanced Conditions . . . . . . . . . . . 11 1.2.3.2.1

”Per-phase” Calculation: . . . . . . . . . . . . . . 11

1.2.3.2.2

”Aggregate rms Value” Calculation: . . . . . . . 12

Power Definitions and Alternatives in Power Electronic Converters Control . . . . . . . . . . . . . . . . . . . . . . 12

Background on Symmetrical Components . . . . . . . . . . . . . . . . . . . 12 1.3.1

1.4

Distortion Power D . . . . . . . . . . . . . . . . .

Power Definitions in Three-Phase Systems . . . . . . . . . . . . . . 10

1.2.3.3

1.3

1.2.2.1.4

Alternatives in Implementation . . . . . . . . . . . . . . . . . . . . 16

Background on Power Quality . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.4.1

Transients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.4.1.1

Impulsive Transient . . . . . . . . . . . . . . . . . . . . . 17

iii 1.4.1.2 1.4.2

1.4.3

1.5

Oscillatory Transients . . . . . . . . . . . . . . . . . . . . 17

Short-duration Variations . . . . . . . . . . . . . . . . . . . . . . . 17 1.4.2.1

Interruptions . . . . . . . . . . . . . . . . . . . . . . . . . 18

1.4.2.2

Sags (Dips) . . . . . . . . . . . . . . . . . . . . . . . . . . 18

1.4.2.3

Swells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Long Duration Variations . . . . . . . . . . . . . . . . . . . . . . . 18 1.4.3.1

Over-Voltage . . . . . . . . . . . . . . . . . . . . . . . . . 18

1.4.3.2

Under-Voltage . . . . . . . . . . . . . . . . . . . . . . . . 19

1.4.3.3

Sustained Interruptions . . . . . . . . . . . . . . . . . . . 19

1.4.4

Voltage Imbalance . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

1.4.5

Waveform Distortion . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.4.5.1

Dc Offset . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

1.4.5.2

Harmonics . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

1.4.5.3

Inter-Harmonics . . . . . . . . . . . . . . . . . . . . . . . 20

1.4.5.4

Notching . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

1.4.5.5

Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

1.4.6

Voltage Fluctuations . . . . . . . . . . . . . . . . . . . . . . . . . . 21

1.4.7

Power Frequency Variations . . . . . . . . . . . . . . . . . . . . . . 21

Power Electronic Converters and Applications . . . . . . . . . . . . . . . . 22 1.5.1

Thyristor Converters . . . . . . . . . . . . . . . . . . . . . . . . . . 22 1.5.1.1

Three-phase Full Rectifier . . . . . . . . . . . . . . . . . . 22

1.5.1.2

Applications of Thyristor Converters . . . . . . . . . . . . 25 1.5.1.2.1

High Voltage dc Transmission . . . . . . . . . . . 25

iv

1.5.2

1.5.1.2.2

Flexible ac Transmission Systems . . . . . . . . . 27

1.5.1.2.3

Ac Motor Drives . . . . . . . . . . . . . . . . . . 27

Pulse-Width-Modulated Converters . . . . . . . . . . . . . . . . . . 28 1.5.2.1

Overview of Modulation Techniques . . . . . . . . . . . . 28 1.5.2.1.1

Sinusoidal PWM . . . . . . . . . . . . . . . . . . 29

1.5.2.2

Voltage Source Converters . . . . . . . . . . . . . . . . . . 30

1.5.2.3

Applications of PWM Converters . . . . . . . . . . . . . . 34 1.5.2.3.1

Ac Motor Drives . . . . . . . . . . . . . . . . . . 34

1.5.2.3.2

Uninterruptible ac power supplies . . . . . . . . . 34

1.5.2.3.3

Power Line Conditioners . . . . . . . . . . . . . . 35

1.5.2.3.4

Flexible ac Transmission Systems . . . . . . . . . 35

1.6

Control of Power Electronic Converters and Synchronization . . . . . . . . 36

1.7

Structure of the Document . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 1.7.1

Chapter 2: State-of-the-Art in Grid Synchronization . . . . . . . . . 41

1.7.2

Chapter 3: Dynamics Study of Low-Gain PLLs . . . . . . . . . . . 41

1.7.3

Chapter 4: Predictive based SRF-MAF Synchronization Algorithms 42

1.7.4

Chapter 5: Frequency Adaptive PR Current Controller for APFs . . 42

1.7.5

Chapter 6: Conclusions and Future Work . . . . . . . . . . . . . . . 43

2 State-of-the-Art in Grid Synchronization 2.1

Methods based on Zero-Cross Detection 2.1.1

45 . . . . . . . . . . . . . . . . . . . 46

The First High-Voltage Direct Current Systems . . . . . . . . . . . 48 2.1.1.1

Constant-α Method . . . . . . . . . . . . . . . . . . . . . 48

2.1.1.2

Inverse-Cosine Method . . . . . . . . . . . . . . . . . . . . 49

v 2.1.2

2.2

Drawbacks of Zero-cross Detectors . . . . . . . . . . . . . . . . . . 49 2.1.2.1

Improvements in Zero-cross Detectors . . . . . . . . . . . 50

2.1.2.2

Harmonic Instability of Zero-cross based HVDCs . . . . . 50

Phase-Locked Oscillator Control Systems . . . . . . . . . . . . . . . . . . . 52 2.2.1

PLO Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 2.2.1.1

2.2.2

2.3

2.4

Design Example . . . . . . . . . . . . . . . . . . . . . . . 56

Other Phase-Locked Oscillator Schemes . . . . . . . . . . . . . . . . 62 2.2.2.1

PLO for Voltage Control . . . . . . . . . . . . . . . . . . . 62

2.2.2.2

PLO for Speed Control of dc Motors . . . . . . . . . . . . 62

Phase Locked Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 2.3.1

Charge-Pump PLLs . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

2.3.2

Digital SRF-PLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 2.3.2.1

SRF-PLL Operation . . . . . . . . . . . . . . . . . . . . . 69

2.3.2.2

Pre-filters for the SRF-PLL . . . . . . . . . . . . . . . . . 70 2.3.2.2.1

All-pass Filters based Sequence Detector . . . . . 71

2.3.2.2.2

Delayed Signal Cancellation in the αβ Frame . . 73

2.3.2.2.3

Generalized Integrators in PLLs . . . . . . . . . . 74

2.3.2.2.4

Extended and Generalized Delayed Signal Cancellation . . . . . . . . . . . . . . . . . . . . . . . 75

2.3.3

Digital Single-phase PLL . . . . . . . . . . . . . . . . . . . . . . . . 76

2.3.4

Single-phase PLLs Vs SRF-PLLs . . . . . . . . . . . . . . . . . . . 78

2.3.5

Amplitude Compensation in Digital PLLs . . . . . . . . . . . . . . 78

2.3.6

Limit Cycles of Digital PLLs . . . . . . . . . . . . . . . . . . . . . . 79

Digital Alternatives to PLLs . . . . . . . . . . . . . . . . . . . . . . . . . . 82

vi 2.4.1

2.4.2

2.4.3

Filtering in the αβ Frame . . . . . . . . . . . . . . . . . . . . . . . 82 2.4.1.1

Transformation Angle Detector (LP-TAD) . . . . . . . . . 82

2.4.1.2

Normalised Positive-sequence Synchronous Frame (NPSF)

Filtering in Synchronous Reference Frames . . . . . . . . . . . . . . 85 2.4.2.1

Single-phase SRF Synchronization Algorithms . . . . . . . 85

2.4.2.2

MAF as LPF for SRF based Schemes . . . . . . . . . . . . 87

2.4.2.3

Equivalent Implementations . . . . . . . . . . . . . . . . . 92

2.4.2.4

Three-phase SRF Synchronization Algorithm . . . . . . . 93

2.4.2.5

SRF-MAFs for Harmonics and Negative-sequences Extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

Stochastic Filtering based Synchronization Schemes . . . . . . . . . 96 2.4.3.1

Kalman Filtering . . . . . . . . . . . . . . . . . . . . . . . 96 2.4.3.1.1

2.4.3.2

2.6

Single-phase Example . . . . . . . . . . . . . . . 96

Weighted Least-Squares Estimation (WLSE) algorithms . 99 2.4.3.2.1

2.5

83

Three-phase WLSE Algorithm . . . . . . . . . . . 99

Frequency Adaptation of Synchronization Algorithms . . . . . . . . . . . . 104 2.5.1

Frequency Adaptation in WLSE Schemes . . . . . . . . . . . . . . . 106

2.5.2

Frequency Adaptive MAFs . . . . . . . . . . . . . . . . . . . . . . . 107

2.5.3

Adaptative Filtering for Frequency Adaptation/Estimation . . . . . 109

Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

3 Dynamics Study of Low-Gain PLLs

115

3.1

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

3.2

Frequency Domain Based Tuning . . . . . . . . . . . . . . . . . . . . . . . 116

vii 3.2.1

Stability Margins and Cut-off Frequency . . . . . . . . . . . . . . . 117

3.2.2

Steady-state Distortion and Bandwidth . . . . . . . . . . . . . . . . 118

3.2.3

Grid Events and Transient Responses . . . . . . . . . . . . . . . . . 119

3.2.3.2

Overdamped Case: ζ > 1 . . . . . . . . . . . . . . . . . . 121

Limitations of Existing Tuning Approaches for Low-gain PLLs . . . 123

3.2.5

Design Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 3.2.5.1

High Bandwidth SRF-PLL (HB-PLL) . . . . . . . . . . . 124

3.2.5.2

Unbalance/Notch SRF-PLL (UN-PLL) . . . . . . . . . . . 125

3.2.5.3

SRF-PLL with Moving Average Filter (MA-PLL) . . . . . 126

Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . 127

RC Model of Digitally Controlled Oscillator . . . . . . . . . . . . . . . . . 129 3.3.1

3.4

Underdamped Case: ζ < 1 . . . . . . . . . . . . . . . . . . 121

3.2.4

3.2.6 3.3

3.2.3.1

Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . 131 3.3.1.1

Simulation Results . . . . . . . . . . . . . . . . . . . . . . 131

3.3.1.2

Single-phase PLL Implementation . . . . . . . . . . . . . . 131

3.3.1.3

SRF-PLL . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

4 Predictive based SRF-MAF Synchronization Algorithms

135

4.1

Calculation of Predictive Filters . . . . . . . . . . . . . . . . . . . . . . . . 137

4.2

Design Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

4.3

4.2.1

Design Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

4.2.2

Design Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

viii 4.4

Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 4.4.1

4.5

Brief Comparative . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

5 Frequency Adaptive PR Current Controller for APFs

153

5.1

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

5.2

Active Power Filter Prototype . . . . . . . . . . . . . . . . . . . . . . . . . 156

5.3

Phase Locked Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 5.3.1

5.4

PLL Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

PR Current Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 5.4.1

Resonant Controllers Implementation . . . . . . . . . . . . . . . . . 161

5.4.2

Frequency Adaptive Implementation of Resonant Blocks . . . . . . 162 5.4.2.1

5.4.3

Effect of the Frequency Correction in Dynamics . . . . . . 163

Design and Tuning of C(z) . . . . . . . . . . . . . . . . . . . . . . . 165

5.5

Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

5.6

Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

6 Conclusion and Future Work

173

6.1

Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

6.2

Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174

6.3

Future Research . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174

A Matlab Scripts

175

References

183

List of Figures

1.1

Simple electrical system. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2

1.2

Waveforms associated to power concepts in a linear single-phase circuit. . .

5

1.3

Voltage/current and Power phasors for Fig. 1.2 example. . . . . . . . . . .

6

1.4

Example of decomposition of an unbalanced three-phase set of fundamental voltages/currents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

1.5

vabc in the SRF established by θ. . . . . . . . . . . . . . . . . . . . . . . . 15

1.6

6-pulse thyristor based rectifier. . . . . . . . . . . . . . . . . . . . . . . . . 23

1.7

Working points of the thyristor full wave rectifier. . . . . . . . . . . . . . . 25

1.8

Steady-state voltages of the thyristor three-phase full rectifier. . . . . . . . 26

1.9

Simple HVDC diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

1.10 ac Motor controlled with Thyristor-based inverter and rectifier. . . . . . . . 27 1.11 One leg of a switch mode inverter. . . . . . . . . . . . . . . . . . . . . . . . 29 1.12 Set of S+ firing signal with sinusoidal PWM. . . . . . . . . . . . . . . . . . 30 1.13 va output with sinusoidal PWM. . . . . . . . . . . . . . . . . . . . . . . . . 31 1.14 Fourier Components of va . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 1.15 VSC connected to an ac source. . . . . . . . . . . . . . . . . . . . . . . . . 32 1.16 Per-phase representation of VSC connected to an ac source. . . . . . . . . 32 1.17 Complex power diagram of grid-connected VSC. . . . . . . . . . . . . . . . 33 ix

x 1.18 P − Q diagram. Operation points of grid-connected VSCs. . . . . . . . . . 34 1.19 Control of induction motor by PWM-VSI with diode rectifier . . . . . . . . 34 1.20 Simplified dc-link voltage control loop of VSC. . . . . . . . . . . . . . . . . 37 1.21 VSC operation in steady-state. Effect of phase-error. . . . . . . . . . . . . 38 1.22 VSC operation in steady-state. Effect of ripple in θˆ1 . . . . . . . . . . . . . 39 1.23 VSC operation during a transient. Effect of the re-tracking speed. . . . . . 40 2.1

Zero-cross detector example. . . . . . . . . . . . . . . . . . . . . . . . . . . 46

2.2

OA based zero-cross detector example. . . . . . . . . . . . . . . . . . . . . 47

2.3

Simple HVDC diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

2.4

Constant-α vs Inverse-Cosine HVDCs. . . . . . . . . . . . . . . . . . . . . 49

2.5

Main drawbacks of zero-cross detectors. . . . . . . . . . . . . . . . . . . . . 51

2.6

Weak Grid. Short circuit ratio Xr /Xs ≈ 3 − 6. . . . . . . . . . . . . . . . . 52

2.7

Scheme of the PLO controller for the HVDC rectifier proposed in [1]. . . . 53

2.8

Equivalent block diagram of PLO circuit and control. . . . . . . . . . . . . 55

2.9

Equivalent block diagram of PLO circuit and controller for firing maximum delay. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

2.10 PLO equivalent model at different α values. . . . . . . . . . . . . . . . . . 57 2.11 Start-up simulation of PLO for different i∗dc (dotted), idc is the blue line. . . 58 2.12 Steady-state system voltages for Figs. 2.12. . . . . . . . . . . . . . . . . . . 59 2.13 PLO tested under a very unbalanced system of voltages. . . . . . . . . . . 59 2.14 PLO tested in the presence of an unbalanced and polluted with harmonics system of voltages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 2.15 PLO transient test: sudden change in zL . . . . . . . . . . . . . . . . . . . . 61 2.16 PLO tested under a sudden change in the input frequency at 10 s. . . . . . 61

xi 2.17 Control scheme of a dc motor in a single-phase grid. . . . . . . . . . . . . . 63 2.18 Basic conceptual models of PLLs. . . . . . . . . . . . . . . . . . . . . . . . 64 2.19 Block diagram of an analog CP-PLL. . . . . . . . . . . . . . . . . . . . . . 65 2.20 Key diagrams for the EXOR-Charge Pump Phase Detector . . . . . . . . . 66 2.21 Time domain simulation results from the CP-PLL model at f = 49 Hz. . . 67 2.22 SRF-PLL block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 2.23 SRF-PLL with Fortescue operator based pre-filter. . . . . . . . . . . . . . . 71 2.24 Matlab Simulink model and all-pass filter features. . . . . . . . . . . . . . . 72 2.25 Positive-sequence estimation with all-pass filters (f1 = 50 Hz). . . . . . . . 72 2.26 SRF-PLL with pre-filters in the αβ frame. . . . . . . . . . . . . . . . . . . 73 2.27 Comparative of the dynamics of A(z) and D(z) (fs = 10 kHz, so n = 50 in D(z)). 74 2.28 Hd (s) and Hq (s) dynamic response. . . . . . . . . . . . . . . . . . . . . . . 76 2.29 Single-phase PLL with multiplier as PD. . . . . . . . . . . . . . . . . . . . 77 2.30 ALL-PLL compensation block. . . . . . . . . . . . . . . . . . . . . . . . . . 79 2.31 Key figures of the ALL-PLL. . . . . . . . . . . . . . . . . . . . . . . . . . . 80 2.32 Phase-plane portraits of a SRF-PLL implementation. The curves are obtained through different initial conditions (color legends indicate the initial θˆ1 ). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 2.33 LP-TAD scheme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 2.34 Significant simulation results for LP-TAD: fault and unbalance conditions.

84

2.35 v1 in the single-phase SRF. . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 2.36 Single-phase SRF synchronization algorithm: ωsrf = ω1 to decouple v1 . . . 86 2.37 Time and frequency responses of H(z)1 implemented at fs = 10 kHz and n = 100. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 2.38 Simulation results for SRF-MAF1 working open loop (ωsrf = ω1 = ω1n ). . . 91

xii 2.39 DCT based implementation figures. . . . . . . . . . . . . . . . . . . . . . . 92 + . . 93 2.40 Three-phase SRF synchronization algorithm; ωsrf = ω1 to decouple vabc 1

2.41 Simulation results for SRF-MAF3 working in open loop (ωsrf = ω1 = ω1n ).

95

2.42 Single-phase Kalman based synchronization algorithm. . . . . . . . . . . . 98 2.43 WLSE experimental results for different λs. . . . . . . . . . . . . . . . . . 102 2.44 WLSE experimental results. Effect of adding extra sequences to H. . . . . 103 2.45 Frequency adaptive MAFs. . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 2.46 Adaptive filter scheme of SRF-MAF1 with frequency adaptation/estimation.110 2.47 Adaptive SRF-MAF1 Vs open loop SRF-MAF1 during the start-up and steady-state. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 2.48 Frequency estimation with Adaptive SRF-MAF3. . . . . . . . . . . . . . . 113 3.1

Studied linear model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

3.2

Frequency response of different filters for canceling harmonics. . . . . . . . 119

3.3

Comparative between underdamped and overdamped cases. . . . . . . . . . 123

3.4

Frequency response of H(z) for the HB-PLL (L(s)HB−P LL was discretized using the ’zoh’ method). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

3.5

Frequency response of H(z) for the UN-PLL (L(s)U N −P LL was discretized using the ’zoh’ method). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

3.6

Frequency response of H(z) for the MA-PLL (PI filter was discretized using the ’zoh’ method). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

3.7

Experimental results for different SRF-PLLs: Ch1 (black) is the Va input in p.u./V, Ch4 is the instantaneous phase-angle measurement (100 mV/rad), Ch2 is the error signal vq in p.u./V (1 p.u. = π/2 deg of phase error), Ch3 is ∆ωo (10 mV/(rad/s)). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

3.8

RC Oscillator features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

3.9

P1+ generation from the oscillator signals. . . . . . . . . . . . . . . . . . . . 131

xiii 3.10 Simulation results for single-phase PLL (ω1 = 2π50.3 rad/s). . . . . . . . . 132 3.11 Experimental results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 4.1

Filtering blocks of the design examples. . . . . . . . . . . . . . . . . . . . . 139

4.2

Design example 1: time and frequency responses of H1 (z) · H2 (z). . . . . . 140

4.3

Design example 2: Frequency and Step responses of H1 (z) · H1 (z) · H2 (z). . 142

4.4

S1: Test to show predictive filters action. . . . . . . . . . . . . . . . . . . . 143

4.5

− S1 response to a big frequency step at 0.2 s. Unbalanced (va1 = 0.1 · max + va1max ) input wave. Frequency step (up), phase error (center) and frequency error (down). Zero steady state error and transient duration of 0.01 s are achieved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

4.6

S1 tested under a distorted set of input waves rotating at 49.5 Hz. At 1 s, a 1 p.u. to 0.2 p.u. sag with +45 deg phase jump has been programmed. . . 145

4.7

S1: steady state error for a balanced set of inputs oscillating at 48 Hz. . . . 146

4.8

− + S1: Steady state error for an unbalanced (va1 = 0.1 · va1 ) set of inputs max max oscillating at 51 Hz. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

4.9

S1: Transient response for a sag with −45 deg phase jump. . . . . . . . . . 148

0

4.10 S1: steady-state phase measurement at 48 Hz. Ch1 is θ1 , Ch2 is va , Ch3 is vb , Ch4 is vc (phase in ≈ 2 rad, voltages in p.u.). The measurement does not have ripple. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 + 4.11 Comparative between S1 and S2 in terms of noise rejection. Ch1 is va1 , max Ch2 is va , Ch3 is vb , Ch4 is vc (voltages in p.u., ω1 = 2π · 49.75 rad/s). . . 150 + 4.12 S1 Vs S2 in terms of transient response. Ch1 is va1 , Ch2 is va , Ch3 is max vb , Ch4 is vc (voltages in p.u., ω1 = 2π · 49 rad/s). . . . . . . . . . . . . . . 150

5.1

APF prototype and controller. . . . . . . . . . . . . . . . . . . . . . . . . . 157

5.2

Experimental set-up features. . . . . . . . . . . . . . . . . . . . . . . . . . 158

5.3

Phase locked loop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

5.4

Open loop PLL Bode diagram.

. . . . . . . . . . . . . . . . . . . . . . . . 160

xiv 5.5

Two integrators based implementations, as proposed in [2]. . . . . . . . . . 161

5.6

Comparative of the error induced by different implementations (fs = 10 kHz).163

5.7

Frequency adaptive resonant block implementation. . . . . . . . . . . . . . 163

5.8

Accuracy of the resonant controllers (fs = 10 kHz). . . . . . . . . . . . . . 164

5.9

Frequency response of C(z) · P (z) around 150 Hz. When ∆ˆ ω1 > 0 the peak ”moves” to higher frequencies and vice versa. . . . . . . . . . . . . . . . . . 164

5.10 Current control block diagram. . . . . . . . . . . . . . . . . . . . . . . . . 165 5.11 PR block (C(z)). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 5.12 Bode diagram of C(z) · P (z).

. . . . . . . . . . . . . . . . . . . . . . . . . 167

5.13 Steady-state currents and vP CC for different input frequencies. Ch1 is iL , Ch2 is iF , Ch3 is iS and Ch4 is vP CC . . . . . . . . . . . . . . . . . . . . . . 168 5.14 Transient response when there is a load change. Ch1 is iL , Ch2 is iF , Ch3 is iS and Ch4 is vP CC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 5.15 Transient response when there is a frequency step in f1 from 48 Hz to 52 Hz. Ch1 is iL , Ch2 is iF , Ch3 is iS and Ch4 is vP CC . . . . . . . . . . . . . . . . 169 5.16 Transient response when there is a frequency step in f1 : from 52 Hz to 48 Hz. Ch1 is iL , Ch2 is ∆ˆ ω1 (scale at 2π∆3 rad/div), Ch3 is iS and Ch4 is vP CC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 5.17 Transient response when there is a frequency step in f1 from 48 Hz to 52 Hz. Effect of ripple of ≈ ±1 Hz in ∆ˆ ω1 . Ch1 is iL , Ch2 is ∆ωˆ1 (scale at 2π∆3 rad/div), Ch3 is iS and Ch4 is vP CC . . . . . . . . . . . . . . . . . . . 170 5.18 Steady state figures when error in estimation of ∆ˆ ω1 is considered. ∆ˆ ω1 = 0 rad/s and ∆ω1 = −4π rad/s (f1 = 48 Hz). Ch1 is iL , Ch2 is ∆ωˆ1 (scale at 2π∆3 rad/div), Ch3 is iS and Ch4 is vP CC . . . . . . . . . . . . . . . . . 171 5.19 Transient response when there is a voltage sag (1 p.u. → 0.8 p.u.) with phase-angle jump of +45 deg in vP CC (vS ). Ch1 is iL , Ch2 is ∆ωˆ1 (scale at 2π∆3 rad/div), Ch3 is iS and Ch4 is vP CC . . . . . . . . . . . . . . . . . . . 171 A.1 PLO system Matlab script. Main file. . . . . . . . . . . . . . . . . . . . . . 176 A.2 PLO system Matlab script. Function file (page 1 of 2). . . . . . . . . . . . 177

xv A.3 PLO system Matlab script. Function file (page 2 of 2). . . . . . . . . . . . 178 A.4 Matlab script to depict SRF-PLL trajectories in the Phase-plane. . . . . . 179 A.5 Matlab script of the Kalman Filter Single-phase synchronization example. . 180 A.6 Matlab script of the WLSE syncrhonization example. . . . . . . . . . . . . 181 A.7 Matlab script of the single-phase PLL with RC-Oscillator based DCO. . . . 182

xvi

List of Tables

1.1

States of diode full rectifier depending of θ1 . . . . . . . . . . . . . . . . . . 24

1.2

State of controlled rectifier depending of θ1 and α. . . . . . . . . . . . . . . 24

1.3

VSC based Rectifier Values. . . . . . . . . . . . . . . . . . . . . . . . . . . 37

2.1

HVDC values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

2.2

Controller Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

2.3

Controller Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

2.4

Look-up table: control of n depending on ω ˆ 1 . . . . . . . . . . . . . . . . . 107

2.5

Adaptive algorithm values. . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

3.1

Significant parameters of HB-PLL . . . . . . . . . . . . . . . . . . . . . . . 124

3.2

Significant parameters of UN-PLL . . . . . . . . . . . . . . . . . . . . . . . 125

3.3

Significant parameters of MA-PLL . . . . . . . . . . . . . . . . . . . . . . 126

4.1

Design Example 1 Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

4.2

Design Example 2 Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

4.3

Brief comparative among significant systems with good unbalance rejection 148

5.1

Significant values of the power circuit. . . . . . . . . . . . . . . . . . . . . 156

5.2

Values of PLL parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 xvii

xviii 5.3

Values of parameters of the PR controller. . . . . . . . . . . . . . . . . . . 166

List of Abbreviations and Acronyms ac

Alternate current.

ADC

Analog-to-digital converter.

ADALINE

Adaptive Linear Combiner.

APF

Active Power Filter.

CP

Charge-Pump (PLL).

dc

Direct current.

DCO

Digitally Controlled Oscillator.

DCT

Discrete Cosine Transform.

DFT

Discrete Fourier Transform.

DPGS

Distributed Power Generation System.

DSP

Digital Signal Processor.

DSRF

Double SRF. Applied to a PLL (DSRF-PLL).

DST

Discrete Sine Transform.

EXOR

Exclusive OR.

EKF-TAD

Enhanced Kalman Filter-TAD (Synchronization Algorithm).

FACTS

Flexible ac Transmission Systems.

FIR

Finite Impulse Response (filter).

FPGA

field-programmable gate array.

GI

Generalized integrator.

GTO

gate turn-off thyristor.

HVDC

High-Voltage Direct Current. xix

xx IC

Integrated Circuit.

IEEE

Institute of Electrical and Electronics Engineers.

IIR

Infinite Impulse Response (filter).

IGBT

insulated-gate bipolar transistor.

IGCT

integrated gate-commutated thyristor.

LF

Loop filter (PLL).

LPF

Low pass filter.

LP-TAD

Low pass-TAD (Synchronization Algorithm).

MAF

Moving average Filter.

MSRF

Multiple Synchronous Reference Frame.

NPSF

Normalised Positive-sequence Synchronous Frame.

OA

Operational Amplifier.

PCC

Point of common coupling.

PD

Phase detector (PLL).

PI

Proportional Integrator (filter).

PLL

Phase locked loop.

PLO

Phase locked oscillator (control system).

PM

Phase margin.

PQ

Power Quality.

PR

Proportional+Resonant (current controller).

PWM

Pulse Width Modulation.

RDFT

Recursive DFT.

SRF

Synchronous Reference Frame.

SSSC

Static Synchronous Series Compensator.

SRF-MAF

Synchronization algorithm based on SRF and MAFs.

STATCOM

static compensator.

SVC

static VAr compensator.

SVF-TAD

Space Vector Filter-TAD (Synchronization Algorithm).

xxi TAD

Transformation angle detector.

THD

Total Harmonic Distortion.

UPFC

unified power-flow controller.

VCO

Voltage Controlled Oscillator (IC).

VSC

voltage-source controller.

VSI

voltage-source inverter.

WLSE

Weighted Least Squares Estimation (Synchronization Algorithms).

xxii

Nomenclature α

Firing angle in thyristor based converters.

B

Angle transformation from an αβ rotating frame to a dq frame.

C

Clarke transformation from an abc rotating frame to an equivalent αβ frame.

∆α

Small perturbation in α.

d

Duty cycle of PWM converters..



Optimization parameter of predictive filters.

f

Frequency in Hz..

f1n

Nominal fundamental frequency (e.g. 50 Hz in Europe).

fs

Sampling frequency of a discrete model.

φ

Relative phase-angle between i(t) and v(t).

ϕ

Offset phase-angle.

i

Single-phase current.

i

Vector of currents in a multiphase system or reference frame.

j

Imaginary Unit.

m

Modulating/control signal of PWM converters.

n

Set the order of a filter. xxiii

xxiv N1

Set the order of a MAF (chapter 4).

N2

Set the order of a predictive filter (chapter 4).

P

Active Power.

P

Park transformation from an abc rotating frame to a dq static frame.

Q

Reactive Power.

R

Resistance.

S

Apparent Power.

S

Fortescue matrix.

t

Time, in seconds.

T

= 1/f . Time cycle.

∆t

Very short instant, in seconds.

θ

Instantaneous rotating phase-angle.

v

Single-phase voltage.

v

Vector of voltages in a multiphase system or reference frame.

ω

= 2πf . Angular frequency or pulsation.

z

Impedance. Subscript

1

Fundamental component.

abc

Voltage/current vector in the abc frame.

a

Phase a in the abc frame.

b

Phase b in the abc frame.

xxv c

Phase c in the abc frame.

co

Relative to controlled oscillator (voltage).

cp

Relative to charge-pump (voltage).

αβ

Voltage/current vector in the αβ frame.

α

Component α in the αβ frame.

β

Component β in the αβ frame.

d

Relative to d component in a srf .

dc

Voltages/currents in a DC bus.

e

Relative to the error between real and estimated value.

i

Input value.

j

Relative to jittering of synchronization algorithms (phase).

ll

Line to line (voltage).

LP F

Low pass filter.

max

Maximum. ”Peak value” referred to voltages/currents.

min

Minimum.

n

Nominal value, e.g. f1n = 50 Hz nominal fundamental frequency.

o

Output value.

q

Relative to q component in a srf .

rms

Root-mean square.

s

Relative to sampling (f and T ).

s

Relative to settling time.

srf

Relative to SRF.

xxvi Superscript

+

Positive sequence.



Negative sequence.

0

Zero sequence.

T

Transpose of a matrix.

(−1)

Inverse of a matrix.



Reference value. Accents



Average value of x.



Estimated value of x.



x vector of voltages/currents in phasor notation.

Chapter 1 Introduction 1.1

Objectives and Motivation of this Work

This work approaches an in-depth study of synchronization algorithms employed in the control of grid-connected power electronics converters. The goal of this research is to supply an added knowledge to all the researchers and engineers working in this field. Due to the high amount of recent proposals and applications, an in-depth review of the state-of-art in grid synchronization seems to be necessary. Active fields of research such as Flexible ac Transmission Systems (FACTs), Distributed Power Generation Systems (DPGS), Power Conditioning and Traction Systems claim for an ever-increasing performance of synchronization algorithms. This works provides a study of existing schemes and implementation techniques and also provides novel high performance algorithms. Special emphasis is devoted to take advantage of digital implementation. It is also a goal of this work to show how a good knowledge in the synchronization field permits to improve other blocks employed in the controllers of power electronic converters. A novel discrete-time implementation of the Proportional+Resonant (PR) controllers is contributed in chapter 5. The added value of this implementation is the manner how each resonant controller is made frequency adaptive using a phase locked loop (PLL). This provides robustness in the presence of grid frequency deviations.

1.2

Background on Electric Power Definitions

Some concepts should be defined before the analysis of power systems. These concepts and definitions of electric power for sinusoidal ac systems are well stated and accepted nowadays when considering ideal conditions. However, under distorted conditions, several 1

2

Chapter 1 Introduction

Ideal AC Source

Linear Load v

i

ω = 2 ⋅π ⋅ f Figure 1.1: Simple electrical system.

and different power definitions and theories are still in use [3].

1.2.1

Power Definitions under Sinusoidal Conditions

The simple single-phase electrical systems depicted in Fig. 1.1 is considered. The ideal ac source generates a sinusoidal voltage rotating at the the angular frequency, also named frequency pulsation ω. The frequency of oscillation in [ Hz] is obtained as f = ω/(2π). The ac source is connected to a linear load. The instantaneous voltage and current can be analytically represented by

v(t) =

√ 2 · vrms · sin (ωt + ϕv ),

(1.1)

where ϕv is a constant offset phase-angle, and

i(t) =



2 · vrms · sin (ωt + ϕi ),

(1.2)

where ϕi is also a constant offset phase-angle. The relative angle between v(t) and i(t) (φ) is given by

φ = ϕv − ϕi .

(1.3)

φ is set by the load reactance: φ > 0 (the current lags the voltage) for inductive loads, and φ < 0 (the current leads the voltage) for capacitive loads. The value of φ in Fig. 1.1 is limited in the range [−90 deg ≤ φ ≤ 90 deg]. The instantaneous active power p(t) is

3

1.2 Background on Electric Power Definitions given by the product of the instantaneous voltage and current:

p(t) = v(t) · i(t) = P [1 − cos (2ω1 t)] − Q sin (2ω1 t),

(1.4)

P = vrms · irms · cos (φ)

(1.5)

where

is named active power, for which the measurement unit is the Watt [ W].

Q = vrms · irms · sin (φ)

(1.6)

is named reactive power, which is measured in volt-ampere reactive [ VAr] . From (1.4) to (1.6), p(t) is not constant, since it has an oscillating component rotating at 2ω. P represents an unidirectional power flow from the ac source to the load. Therefore, it could be said that P gives a measurement of the averaged energy supplied in any time interval from the ac source to the load. The term associated to Q is an oscillating at 2ω component and its average value is equal to zero. Q is commonly associated as the oscillating power, since the total energy transfered to the load over an entire cycle is zero. For this reason, Q is commonly associated to a parasitic or non desired effect. The apparent power S is defined as:

S = vrms · irms .

(1.7)

The unit of S is the Volt-Ampere [ VA] . The power factor (PF) is defined as cos (φ), which is obtained as:

cos (φ) =

P . S

(1.8)

The physical meaning of S is clear from (1.7) and (1.8). S represents the maximum reachable active power P at unity power factor. A PF of one, or “unity power factor”, is the goal of any electric utility company, since, if the power factor is less than one, they have to supply more current to the user for a given amount of power consumption. In so doing, they incur more line losses. They also must have larger capacity equipment in place than would be otherwise necessary. As a result, an industrial facility will be charged a penalty if its PF is much different from 1.

4

Chapter 1 Introduction

The scheme of Fig. 1.1 has been simulated in the time domain through PSPICE in order to supply the waveforms shown in Fig. 1.2. The linear load is form of a resistor in series with an inductance with a XL /R = 0.6/0.8 ratio, which results in φ ≈ 36 deg (XL is the inductance impedance at ω). The values of the components have been arranged so rms values of v(t) and i(t) are 1 p.u.. The above figures show both v(t) and i(t) and the time delay ≈ 2 ms associated to φ. The figure below shows p(t) and its average value P . As expected, P = V I cos(φ) = 0.8 p.u.. In some points of time, p(t) is negative, which corresponds with an instantaneous power flow from the load to the source. However, the area highlighted with ’A’, corresponding with a positive power flow from the source to the load, is higher than the area highlighted with ’B’, corresponding with the flow from the load to the source. By inspection of (1.4) it is clear that a higher weight of the inductance (XL ) in the load results in a higher ’B’ area, which means a higher Q. If there was no resistive component φ would be equal to 90 deg, and hence, area ’B’ and area ’A’ would be the same; Q would be maximum and P = 0. The sign of Q depends on the kind of load: inductive load (φ > 0) results in a positive Q and a capacitive load (φ < 0) results in a negative Q.

1.2.1.1

Electrical Variables with Phasor Notation

A powerful tool in the analysis of power systems is the use of the so-called phasor notation instead of analytical expressions in the time domain. The phasor notation approach is detailed as follows. Any sinusoidal time function (f (t)) rotating at an angular frequency ω can be represented as the real part of a complex number:

f (t) = A · cos (ωt + φ) = ttran % transient changes end %function call [il,Vd,Vln,phaseVCO,wcorr,e,phaseGrid]=calc_icl(tsim,Ts,w1,... taux=taux+tsim % show current simulation time % update output vector % save output current value for next function call % save output current average value

end % Visualize values % PLOT CURRENTS

%PLOT STEADY-STATE VOLTAGES plot((0:length(Vln)-1)*Ts+tfinal-0.5,Vln,... (0:length(Vd)-1)*Ts+tfinal-0.5,Vd,[Ts+tfinal-0.5 Ts+tfinal]... xlabel('Time (s)','FontSize' ylabel('Current (p.u.)','FontSize'

Figure A.1: PLO system Matlab script. Main file.

177

1 %% Matlab Script for executing the Ainsworth model 2 %% Function file 3 %% Francisco D. Freijedo, Glasgow, August 2008 4 5 function [il,Vd,Vln,phaseVCO,wcorr,e,phaseGrid]=calc_icl(tsim,Ts,w1,R,L,phia,phib, phic,iin,phaseVCOi,wcorri,iref,ei,phaseGridi) 6 % 30 deg phase offset 7 8 % Initialize current values from previous function calls 9 % Grid phase 10 % VCO phase 11 % VCO correction around the nominal frequency (2*pi*50 rad/s) 12 % Set VCO frequency % current error signal 13 14 % current value of the system current 15 16 17 % The Ainsworth problem is stated as a state state. 18 19 % . 20 % x=Ax+Bu 21 % y=x 22 % where x=y is the current through L and R and 23 % u is the set line to neutral voltages vector. 24 25 % A in the continuous space state 26 % Discretize of A 27 28 % Definition of the switching functions: 29 % Different swtiching functions are defined since the circuit 30 % depends on the VCO phase. That is, B is changing with VCO phase. 31 32 % Continuos swtiching function 33 % Discretized switching function 34 35 36 % ss en con 37 38 39 40 41 42 43 44 45 % Initial value of Bd 46 47 for 48 49 % Calculation of instantaneous phase to neutral voltages 50 Va=sin(offset+phaseGrid+phia)/sqrt(3)+0.1*sin(5*phaseGrid)+0.1*sin 51

Vb=1*sin(offset+phaseGrid+phib)/sqrt(3)+0.1*sin(5*phaseGrid+0.1)+0.1*sin

52

Vc=1*sin(offset+phaseGrid+phic)/sqrt(3)+0.1*sin(5*phaseGrid+0.9)+0.1*sin

53 54 55 56

% Error signal vector update

Figure A.2: PLO system Matlab script. Function file (page 1 of 2).

178

Chapter A Matlab Scripts

57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 end

% The output of the filter is obtained through the discretized % transfer function using the tustin method tmp=1.3333*wcorr(2)-0.33329*wcorr(1)+33.334*e(3)+0.0033332*e(2)-33.331*e

%

% VCO frequency update

% The phase must be in the range [0,2*pi] while phaseGrid>=2*pi end while

phaseVCO>=2*pi

end while

phaseVCO high K. R=5; % Measurement covariance. High R ==> low K. x=[]; phase=[]; for i=1:1:1e3 % Innovation Inn = v(i) - H * xhat; % Covariance of Innovation s = H * P * H' + R; % Gain matrix. K = M * P * H' * inv(s); % State estimate xhat = M * xhat + K * Inn; % Covariance of prediction error P = M * P * M' + Q - M * P * H' * inv(s) * H * P * M'; %Save values x=[x xhat]; phase=[phase atan2(xhat(1),xhat(2))]; end plot(t,v,t,x); figure; plot(t,phase);

Figure A.5: Matlab script of the Kalman Filter Single-phase synchronization example.

181

29/12/08 14:14 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

C:\Documents and Settings\anonimo\Mis document...\WLSEExample.m

%% Matlab Script for testing the WLSE synchronization algorithm (3-phase) %% Francisco D. Freijedo, Vigo, December 2008. clear all; t=1e-4:1e-4:0.1; w1n=2*pi*50; % Nominal frequency ==> System frequency w1=2*pi*50; % Input wave frequency. % A transient is programmed in the input wave. The distorted signal has % unbalance. Va=1*cos(w1*t(1:499)-pi/6); Vb=1*cos(w1*t(1:499)-2*pi/3-pi/6); Vc=1*cos(w1*t(1:499)+2*pi/3-pi/6); Va=[Va 1*(sin(w1*t(500:1e3)))]; Vb=[Vb 0.6*sin(w1*t(500:1e3)-2*pi/3+0.4)]; Vc=[Vc 0.9*sin(w1*t(500:1e3)+2*pi/3+0.3)]; % The error covariance is initialized. P=300*[1 0 0 0;0 1 0 0;0 0 1 0; 0 0 0 1]; lamb=0.95; % Forgetting factor lambinv=1/lamb; ang1vec=[]; x=[0 0 0 0]'; % x is v_{dq}^{+-} xvec=[]; angvec=[]; vab=[]; for i=1:1:1e3 Vabc=[Va(i) Vb(i) Vc(i)]; % Input wave Talfabeta=(2/3)*[1 -1/2 -1/2;0 -sqrt(3)/2 sqrt(3)/2]; Valbe=Talfabeta*Vabc'; % input wave in alfa beta frame vab=[vab Valbe]; % Save alfa beta frame values H=[cos(w1n*t(i)) sin(w1n*t(i)) cos(w1n*t(i)) -sin(w1n*t(i));... -sin(w1n*t(i)) cos(w1n*t(i)) sin(w1n*t(i)) cos(w1n*t(i)) ]; r=[1 0; 0 1]+H*P*H'; % compute of R matrix rinv=inv(r); k=P*H'*rinv; % Compute of K gain. P=lambinv*P-lambinv*k*H*P; % Update of error covariance xhat=x+k*[Valbe-H*x]; % Output voltage update xvec=[xvec xhat]; % Save values of SRF coefficients % Compute of phase angle of fundamental positive sequence vector angvec=[angvec atan2(xhat(1)*cos(w1n*t(i))+xhat(2)*+sin(w1n*t(i)) ... ,(-xhat(1)*sin(w1n*t(i))+xhat(2)*cos(w1n*t(i))))]; x=xhat; % for next sample... end plot(t,Va,t,Vb,t,Vc); figure; plot(t,vab); figure; plot(t,xvec); figure; plot(t,angvec);

Figure A.6: Matlab script of the WLSE syncrhonization example.

1 of 1

182

Chapter A Matlab Scripts

21/04/08 16:46 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44

C:\Documents and Settings\anonimo\Mis d...\pll_single_iecon08.m

clear all; Ts=1e-4; % Sampling time (= 1/fs). Tfinal=0.8; % Time for the simulation. t=0:Ts:Tfinal; % time vector. wn=2*pi*50; % Nominal frequency. Mysin=[0;0]; % Initialize Mysin. Mycos=[0;0.99]; % Initialize Mycos. ypd=[0;0]; % Initialize PD output. ylf=[0;0]; % Initialize LF output. ynotch=[0;0]; % Initialize notch filter output. theta=[0;0]; % Initialize phase angle % Create INPUT WAVE for SIMULATION wu=2*pi*50.3; % Input wave frequency u=sin(wu*t+pi); % Input wave definition % SIMULATE THE PROCESS for n = 2:Tfinal/Ts % Number ot iterations ypd(n+1)=u(n)*Mycos(n); % Phase Detector (Q15) % Notch Filter (Q15) %ynotch(n+1)=ypd(n+1); ynotch(n+1)=1.94*ynotch(n)-0.944*ynotch(n-1)+... 0.972*ypd(n+1)-1.94*ypd(n)+0.972*ypd(n-1); % Loop Filter Q(8) ylf(n+1)=(1*ylf(n)+250*ynotch(n+1)-247.8*ynotch(n)); % Limit LF according to its Q8 size pipeline ylf(n+1)=max([ylf(n+1) -128]); ylf(n+1)=min([ylf(n+1) 128]); % Update Output frequency and compensate 1/2 (Q6) wo=wn+2*ylf(n+1); % Integration process (digital oscillation) Mysin(n+1)=Mysin(n)+wo*Ts*(Mycos(n)); %(Q15) Mycos(n+1)=Mycos(n)-wo*Ts*(Mysin(n)); %(Q15) % Limit the oscillator integrators Mysin(n+1)=max([Mysin(n+1) -0.99]); Mysin(n+1)=min([Mysin(n+1) 0.99]); Mycos(n+1)=max([Mycos(n+1) -0.99]); Mycos(n+1)=min([Mycos(n+1) 0.99]); % Update the output phase (Q12) theta(n+1)=theta(n)+wo*Ts; % Output phase reset condition if Mysin(n)>=0 && Mysin(n+1)