Top Banner
ENHANCEMENT Project report submitted in pa degree B.E in ELECTRICAL C DEPARTMENT OF ELE M.V.S AFFILIA i T OF POWER QUALITY U STATCOM artial fulfillment of the requirements for th L AND ELECTRONICS ENGINEERI SUBMITTED BY K.SANTHOSH(05092006) K.VIVEK(05092059) CH.VEERRAJU(05092061) ECTRICAL AND ELECTRONICS EN S.R ENGINEERING COLLEGE ATED TO OSMANIA UNIVERSITY USING D- he award of the ING. NGINEERING
84
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Documentation

ENHANCEMENT OF POWER QUALITY USING D

Project report submitted in partial fulfillment of the requirements

degree B.E in ELECTRICAL AND ELECTRONICS ENGINEERING

CH.VEERRAJU(05092061)

DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

M.V.S.R

AFFILIATED TO OSMANIA

i

ENHANCEMENT OF POWER QUALITY USING D

STATCOM

ubmitted in partial fulfillment of the requirements for the award of the

ELECTRICAL AND ELECTRONICS ENGINEERING

SUBMITTED BY

K.SANTHOSH(05092006)

K.VIVEK(05092059)

CH.VEERRAJU(05092061)

DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

M.V.S.R ENGINEERING COLLEGE

AFFILIATED TO OSMANIA UNIVERSITY

ENHANCEMENT OF POWER QUALITY USING D-

for the award of the

ELECTRICAL AND ELECTRONICS ENGINEERING.

DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Page 2: Documentation

ii

CERTIFICATE

This is to certify that the project report entitled ENHANCEMENT OF POWER

QUALITY USING D-STATCOM is the work done by K.Santhosh, K.Vivek and

CH.Veerraju submitted in partial fulfillment for the award of ‘Bachelor of

Engineeering (B.E)’ in Electrical and Electronics Engineering from M.V.S.R

Engineering College affiliated to Osmania University, Hyderabad.

Date:

D.Venu Madhava Chary Y.L.N Rao

Head of the department, EEE Asst. Professor (Internal Guide)

M.V.S.R Engineering College M.V.S.R Engineering College

EXTERNAL EXAMINER

Page 3: Documentation

iii

ACKNOWLEDGEMENT

The contentment and exhilaration that accompanies the successful completion of any

task would be incomplete without acknowledging the people whose constant guidance

and encouragement made it possible. We take pleasure in presenting before you, our

project, which is result of studied blend of both research and knowledge.

We express our earnest gratitude to our internal guide, Assistant Professor Y.L.N Rao,

Department of EEE, our project guide, for his constant support, encouragement and

guidance. We are grateful for his cooperation and his valuable suggestions.

Finally, we express our gratitude to all other members who are involved either directly

or indirectly for the completion of this project.

Page 4: Documentation

iv

DECLARATION

We, the undersigned, declare that the project entitled ‘ENHANCEMENT OF

POWER QUALITY USING D-STATCOM’, being submitted in partial fulfillment

for the award of Bachelor of Engineering Degree in Electronics and Electrical

Engineering, affiliated to Osmania University, is the work carried out by us.

K.SANTHOSH (05092006)

K.VIVEK (05092059)

CH.VEERRAJU (05092061)

Page 5: Documentation

v

ABSTRACT

This project presents the enhancement of voltage sags, harmonic

distortion and low power factor using Distribution Static

Compensator (D-STATCOM) with LCL Passive Filter in

distribution system. The model is based on the Voltage Source

Converter (VSC) principle. The D-STATCOM injects a current

into the system to mitigate the voltage sags.LCL Passive Filter was

then added to D-STATCOM to improve harmonic distortion and

low power factor. The simulations were performed using

MATLAB 2011b.

Page 6: Documentation

6

CONTENTS PAGE NO

1. Introduction 1

1.1 Need for D-Statcom 2

2. D-Statcom 3

2.1 Basic principle of D-Statcom 4

2.2 Basic structure of D-Statcom 5

2.3 Advantages and Uses 6

2.4 Main Components 7

2.4.1 Voltage Source Inverter 7

2.4.2 Controller 8

2.4.3 Energy Storage circuit 8

2.4.4 LCL Passive Filter 9

3. Methodology 10

4. Simulink model for test system 11

4.1 Outputs from Simulink 12

5. Introduction to Matlab 17

5.1 Introduction 17

5.2 The role of Simulation in design 17

5.3 Sim power systems Block Library 18

5.3.1 Overview 18

5.3.2 Non linear simulink blocks 18

5.3.3 Access Block Library 18

5.4 Required and Related products 19

5.5 Universal Bridge 21

5.6 GTO Based Statcom 27

5.7 Three phase transformer 35

5.8 Three phase Breaker 42

5.9 Three phase fault 46

5.10 Three phase sequence analyzer 51

5.11 PID Controller 55

6. Results and Conclusions 74

6.1 Voltage sags w/o D-statcom 75

6.2 Voltage sags with D-statcom 75

6.3 Current harmonic w/o filter 76

6.4 Current harmonic without filter 76

6.5 Results and Conclusions 76

7. Bibliography 77

Page 7: Documentation

7

Page 8: Documentation

1

1. INTRODUCTION

Page 9: Documentation

2

1.1 The Need for D-Statcom:

An increasing demand for high quality, reliable electrical power and increasing number of

distorting loads may leads to an increased awareness of power quality both by customers

and utilities. The most common power quality problems today are voltage sags, harmonic

distortion and low power factor. Voltage sags is a short time (10 ms to 1 minute) event

during which a reduction in r.m.s voltage magnitude occurs [4]. It is often set only by two

parameters, depth/magnitude and duration. The voltage sags magnitude is ranged from

10% to 90% of nominal voltage and with duration from half a cycle to 1 min.

Voltage sags is caused by a fault in the utility system, a fault within the customer’s facility or

a large increase of the load current, like starting a motor or transformer energizing. Voltage

sags are one of the most occurring power quality problems. For an industry voltage sags

occur more often and cause severe problems and economical losses. Utilities often focus on

disturbances from end-user equipment as the main power quality problems.

Harmonic currents in distribution harmonic distortion, low power factor as well as heating in

the electrical equipment. It also can cause vibration and noise in machines and malfunction

of the sensitive equipment.

The development of power electronics devices such as Flexible AC Transmission System

(FACTS) and customs power devices have introduced and emerging branch of technology

providing the power system with versatile new control capabilities. There are different ways

to enhance power quality problems in transmission and distribution systems. Among these,

the D-STATCOM is one of the most effective devices. A new PWM-based control scheme has

been implemented to control the electronic valves in the DSTATCOM.

Page 10: Documentation

3

2. D-STATCOM

Page 11: Documentation

4

2.1 Basic principle of DSTATCOM: A DSTATCOM is a controlled reactive source, which

includes a Voltage Source Converter (VSC) and a DC link capacitor connected in shunt,

capable of generating and/or absorbing reactive power. The operating principles of a

DSTATCOM are based on the exact equivalence of the conventional rotating synchronous

compensator.

2.2 Basic structure of DSTATCOM

The AC terminals of the VSC are connected to the Point of Common Coupling (PCC) through

an inductance, which could be a filter inductance or the leakage inductance of the coupling

transformer. The DC side of the converter is connected to a DC capacitor, which carries the

input ripple current of the converter and is the main reactive energy storage element. This

capacitor could be charged by a battery source, or could be recharged by the converter

itself. If the output voltage of the VSC is equal to the AC terminal voltage, no reactive power

is delivered to the system. If the output voltage is greater than the AC terminal voltage, the

DSTATCOM is in the capacitive mode of operation and vice versa. The quantity of reactive

power flow is proportional to the difference in the two voltages. It is to be noted that

voltage regulation at PCC and power factor correction cannot be achieved simultaneously.

For a DSTATCOM used for voltage regulation at the PCC, the compensation should be such

that the supply currents should lead the supply voltages; whereas, for power factor

Correction, the supply current should be in phase with the supply voltages. The control

strategies studied in this paper are applied with a view to study-ing the performance of a

DSTATCOM for power factor correction and harmonic mitigation.

.

Page 12: Documentation

5

The equivalent circuit of a power system with a DSTATCOM

DSTATCOM generates a variable voltage, Vd, that is very nearly in phase with the source

voltage, Vs. The inductance in this simplified circuit, L, consists of the inductance of the

coupling transformer and filter. The voltage across the inductance, VL, equals Vs-Vd and is

small in per-unit terms . . . on the order of 5-20%.

If Vs > Vd, VL is in phase with Vs and current IL lags Vs by 90°; DSTATCOM, acting as a

generator, produces leading (inductive) reactive current.

If Vs < Vd, VL is antiphase with Vs and current IL leads Vs by 90°; DSTATCOM produces lagging

(capacitive) reactive current.

Page 13: Documentation

6

2.3 Advantages and Uses of D-Statcom:

In order to improve the survivability of a navy ship in battle condition, DSTATCOM or

Distribution Static Compensator can be used, which reduces the impact of pulsed loads on

the bus voltage and thus keeps the bus voltage at desired level. DSTATCOM is a voltage-

source inverter (VSI) based shunt device generally used in distribution system to improve

power quality. The main advantage of DSTATCOM is that, it has a very sophisticated power

electronics based control which can efficiently regulate the current injection into the

distribution bus. The second advantage is that, it has multifarious applications:

i. cancelling the effect of poor load power factor,

ii. suppressing the effect of harmonic content in load currents,

iii. regulating the voltage of distribution bus against sag/swell etc

DSTATCOM is well suited to a major goal of the Smart Grid: Integration of renewable energy

sources, such as wind, concentrated solar and tidal power generation. It allows these

renewable energy sources to meet utility interconnection requirements, as well as the

power factor, voltage output, and low-voltage ride-through requirements of various

worldwide grid codes.

I

Figure of a D-Statcom

Page 14: Documentation

7

2.4 MAIN COMPONENTS OF D-STATCOM

2.4.1 Voltage Source Converter (VSC):

A voltage-source converter is a power electronic device that connected in shunt or parallel to the system. It can generate a sinusoidal voltage with any required magnitude, frequency and phase angle. The VSC used to either completely replace the voltage or to inject the ‘missing voltage’. The ‘missing voltage’ is the difference between the nominal voltage and the actual. It also converts the DC voltage across storage devices into a set of three phase AC output voltages [8, 9]. In addition, D-STATCOM is also capable to generate or absorbs reactive power. If the output voltage of the VSC is greater than AC bus terminal voltages, D-STATCOM is said to be in capacitive mode. So, it will compensate the reactive power through AC system and regulates missing voltages. These voltages are in phase and coupled with the AC system through the reactance of coupling transformers. Suitable adjustment of the phase and magnitude of the DSTATCOM output voltages allows effectives control of active and reactive power exchanges between D-STATCOM and AC system. In addition, the converter is normally based on some kind of energy storage, which will supply the converter with a DC voltage [10].

Page 15: Documentation

8

2.4.2 Controller:

Proportional-integral controller (PI Controller) is a feedback controller which drives the system to be controlled with a weighted sum of the error signal (difference between the output and desired set point) and the integral of that value. In this case, PI controller will process the error signal to zero. The load r.m.s voltage is brought back to the reference voltage by comparing the reference voltage with the r.m.s voltages that had been measured at the load point. It also is used to control the flow of reactive power from the DC capacitor storage circuit. PWM generator is the device that generates the Sinusoidal PWM waveform or signal. To operate PWM generator, the angle is summed with the phase angle of the balance supply voltages equally at 120 degrees. Therefore, it can produce the desired synchronizing signal that required. PWM generator also received the error signal angle from PI controller. The modulated signal is compared against a triangle signal in order to generate the switching signals for VSC valves.

2.4.3 Energy Storage Circuit:

DC source is connected in parallel with the DC capacitor. It carries the input ripple current of the converter and it is the main reactive energy storage element. This DC capacitor could be charged by a battery source or could be recharged by the converter itself.

Page 16: Documentation

9

2.4.4 LCL Passive Filter:

LCL Passive filter is more effective on reducing harmonic distortion. To design it, equation (2.3), (2.4) and (2.5) are used.

Page 17: Documentation

10

3. METHODOLOGY

To enhance the performance of distribution system, DSTATCOM was connected to the distribution system. DSTATCOM was designed using MATLAB simulink version R2011b. The figure below shows the flowchart for the methodology:

Page 18: Documentation

11

4. Simulink Model for the test system:

Tapped Transformer

Discrete,Ts = 5e-006 s.

powergui

1

Vref (pu)

Vabc (pu)

Vd_ref (pu)

Vabc_inv

Voltage Regulator

z

1

A

B

C

Three-Phase Source

A B CA B C

Three-Phase Fault

A B C

a b c

Three-Phase Breaker3

A B C

a b c

Three-Phase Breaker1

Vabc

IabcA

B

C

a

b

c

Three-PhaseV-I Measurement2

Vabc

IabcA

B

C

a

b

c

Three-PhaseV-I Measurement

A B C

Three-PhaseR Load2

A B C

Three-PhaseR Load1

Terminator

Scope7

Scope6

Scope5

Scope4

Scope3

Scope2

Scope10

Scope1

g

A

B

C

+

-

PWM

IGBT Inverter

Vabc

IabcA

B

C

a

b

c

Measure1

Va

bc

Iab

cA B C

a b c

Measure

A B C

A

B

C

LCL Passive Filter

L1

abc

Mag

Phase

Discrete 3-phasePositive-SequenceFundamental Value

THD(discrete)

DiscreteTotal Harmonic

Distortion

UrefPulses

Discrete

PWM Generator

DC Voltage Source

i+

-

Current Measurement

C

A

B

C

a

b

c

230kV /11KV

500 kVA

A

B

C

a

b

c

11kV / 600V

50 kVA1

Page 19: Documentation

12

4.1 OUTPUTS FROM SIMULINK:

Page 20: Documentation

13

TPG without D-Statcom

TPG with insertion of DStatcom

Page 21: Documentation

14

DLG without D-Statcom

DLG with insertion of D-Statcom:

:

Page 22: Documentation

15

LL fault without D-Statcom:

LL with insertion of D-Statcom:

Page 23: Documentation

16

D-STATCOM without LCL Passive Filter:

D-STATCOM witht LCL Passive Filter:

Note: Results from the graphs are tabulated in Results and Conclusions Section.

Page 24: Documentation

17

5. INTRODUCTION TO MATLAB (SIMULINK)

5.1 Introduction

SimPowerSystems software and other products of the Physical Modeling product family work together with Simulink software to model electrical, mechanical, and control systems.

SimPowerSystems software operates in the Simulink environment. Therefore, before starting this user's guide, make yourself familiar with Simulink documentation.

5.2 The Role of Simulation in Design

Electrical power systems are combinations of electrical circuits and electromechanical devices like motors and generators. Engineers working in this discipline are constantly improving the performance of the systems. Requirements for drastically increased efficiency have forced power system designers to use power electronic devices and sophisticated control system concepts that tax traditional analysis tools and techniques. Further complicating the analyst's role is the fact that the system is often so nonlinear that the only way to understand it is through simulation.

Land-based power generation from hydroelectric, steam, or other devices is not the only use of power systems. A common attribute of these systems is their use of power electronics and control systems to achieve their performance objectives.

SimPowerSystems software is a modern design tool that allows scientists and engineers to rapidly and easily build models that simulate power systems. It uses the Simulink environment, allowing you to build a model using simple click and drag procedures. Not only can you draw the circuit topology rapidly, but your analysis of the circuit can include its interactions with mechanical, thermal, control, and other disciplines. This is possible because all the electrical parts of the simulation interact with the extensive Simulink modeling library. Since Simulink uses the MATLAB® computational engine, designers can also use MATLAB toolboxes and Simulink blocksets. SimPowerSystems software belongs to the Physical Modeling product family and uses similar block and connection line interface.

Page 25: Documentation

18

5.3 SimPowerSystems Block Libraries

5.3.1 Overview of SimPowerSystems Libraries

SimPowerSystems libraries contain models of typical power equipment such as transformers, lines, machines, and power electronics. These models are proven ones coming from textbooks, and their validity is based on the experience of the Power Systems Testing and Simulation Laboratory of Hydro-Québec, a large North American utility located in Canada, and also on the experience of École de Technologie Supérieure and Université Laval. The capabilities of SimPowerSystems software for modeling a typical electrical system are illustrated in demonstration files. And for users who want to refresh their knowledge of power system theory, there are also self-learning case studies.

The SimPowerSystems main library, powerlib, organizes its blocks into libraries according to their behavior. To open this library, type powerlib in the MATLAB Command Window. The powerlib library window displays the block library icons and names. Double-click a library icon to open the library and access the blocks. The main powerlib library window also contains the Powergui block that opens a graphical user interface for the steady-state analysis of electrical circuits.

5.3.2 Nonlinear Simulink Blocks for SimPowerSystems Models

The nonlinear Simulink blocks of the powerlib library are stored in a special block library named powerlib_models. These masked Simulink models are used by SimPowerSystems software to build the equivalent Simulink model of your circuit

5.3.3 Using the Simulink Library Browser to Access the Block Libraries

You can also access SimPowerSystems libraries through the Simulink Library Browser. To display the Library Browser, click the Library Browser button in the toolbar of the MATLAB desktop or Simulink model window:

Alternatively, you can type simulink in the MATLAB Command Window. Then expand the Simscape entry in the contents tree.

Page 26: Documentation

19

For more information on using the Library Browser, see Library Browser in the Simulink Graphical User Interface documentation.

5.4 Required and Related Products

SimPowerSystems software requires the following products:

• MATLAB • Simulink • Simscape™

In addition to SimPowerSystems software, the Physical Modeling product family includes other products for modeling and simulating mechanical and electrical systems. Use these products together to model physical systems in Simulink and Simscape environment. There are also a number of closely related products from MathWorks that you can use with SimPowerSystems software.

Page 27: Documentation

20

SimPowerSystems software allows you to build and simulate electrical circuits containing linear and nonlinear elements.

In this section you

• Explore the powerlib library • Learn how to build a simple circuit from the powerlib library • Interconnect Simulink blocks with your circuit

5.5 Universal Bridge - Implement universal power converter with selectable topologies

and power electronic devices

Library

Power Electronics

Page 28: Documentation

21

Description

The Universal Bridge block implements a universal three-phase power converter that consists of up to six power switches connected in a bridge configuration. The type of power switch and converter configuration are selectable from the dialog box.

The Universal Bridge block allows simulation of converters using both naturally commutated (or line-commutated) power electronic devices (diodes or thyristors) and forced-commutated devices (GTO, IGBT, MOSFET).

The Universal Bridge block is the basic block for building two-level voltage-sourced converters (VSC).

The device numbering is different if the power electronic devices are naturally commutated or forced-commutated. For a naturally commutated three-phase converter (diode and thyristor), numbering follows the natural order of commutation:

Page 29: Documentation

For the case of a two-phase diode or thyristor bridge, and for any other bridge configuration, the order of commutation is the following:

GTO-Diode bridge:

IGBT-Diode bridge:

Dialog Box and Parameters

22

phase diode or thyristor bridge, and for any other bridge configuration, the order of commutation is the following:

phase diode or thyristor bridge, and for any other bridge

Page 30: Documentation

23

Page 31: Documentation

24

Number of bridge arms

Set to 1 or 2 to get a single-phase converter (two or four switching devices). Set to 3 to get a three-phase converter connected in Graetz bridge configuration (six switching devices).

Snubber resistance Rs

The snubber resistance, in ohms (Ω). Set the Snubber resistance Rs parameter to inf to eliminate the snubbers from the model.

Snubber capacitance Cs

The snubber capacitance, in farads (F). Set the Snubber capacitance Cs parameter to 0 to eliminate the snubbers, or to inf to get a resistive snubber.

Power electronic device

Select the type of power electronic device to use in the bridge.

When you select Switching-function based VSC, a switching-function voltage source converter type equivalent model is used, where switches are replaced by two voltage sources on the AC side and a current source on the DC side. This model uses the same firing pulses as for other power electronic devices and it correctly represents harmonics normally generated by the bridge.

When you select Average-model based VSC, an average-model type of voltage source converter is used to represent the power-electronic switches.

Ron

Internal resistance of the selected device, in ohms (Ω).

Lon

Internal inductance, in henries (H), for the diode or the thyristor device. When the bridge is discretized, the Lon parameter must be set to zero.

Page 32: Documentation

25

Forward voltage Vf

This parameter is available only when the selected Power electronic device is Diodes or Thyristors.

Forward voltage, in volts (V), across the device when it is conducting.

Forward voltages [Device Vf, Diode Vfd]

This parameter is available when the selected Power electronic device is GTO/Diodes or IGBT/Diodes.

Forward voltages, in volts (V), of the forced-commutated devices (GTO, MOSFET, or IGBT) and of the antiparallel diodes.

[Tf (s) Tt (s)]

Fall time Tf and tail time Tt, in seconds (s), for the GTO or the IGBT devices.

Inputs and Outputs

The gate input for the controlled switch devices. The pulse ordering in the vector of the gate signals corresponds to the switch number indicated in the six circuits shown in the Description section. For the diode and thyristor bridges, the pulse ordering corresponds to the natural order of commutation. For all other forced-commutated switches, pulses are sent to upper and lower switches of phases A, B, and C.

Topology Pulse Vector of Input g

one arm [Q1,Q2]

two arms [Q1,Q2,Q3,Q4]

three arms [Q1,Q2,Q3,Q4,Q5,Q6]

Page 33: Documentation

26

5.6 GTO-Based STATCOM

Introduction

The example described in this section illustrates application of SimPowerSystems software to study the steady-state and dynamic performance of a static synchronous compensator (STATCOM) on a transmission system. The STATCOM is a shunt device of the Flexible AC Transmission Systems (FACTS) family using power electronics. It regulates voltage by generating or absorbing reactive power. If you are not familiar with the STATCOM, please refer to the Static Synchronous Compensator (Phasor Type) block documentation, which describes the STATCOM principle of operation.

Depending on the power rating of the STATCOM, different technologies are used for the power converter. High power STATCOMs (several hundreds of Mvars) normally use GTO-based, square-wave voltage-sourced converters (VSC), while lower power STATCOMs (tens of Mvars) use IGBT-based (or IGCT-based) pulse-width modulation (PWM) VSC. The Static Synchronous Compensator (Phasor Type) block of the FACTS library is a simplified model, which can simulate different types of STATCOMs. You can use it with phasor simulation, available through the Powergui block, for studying dynamic performance and transient stability of power systems. Due to low frequencies of electromechanical oscillations in large power systems (typically 0.02 Hz to 2 Hz), this type of study usually requires simulation times of 30–40 seconds or more.

Description of the STATCOM

The STATCOM described in this example is available in the power_statcom_gto48p model. Load this model and save it in your working directory as case3.mdl to allow further modifications to the original system. This model shown on SPS Model of the 100 Mvar STATCOM on a 500 kV Power System (power_statcom_gto48p) represents a three-bus 500 kV system with a 100 Mvar STATCOM regulating voltage at bus B1.

The internal voltage of the equivalent system connected at bus B1 can be varied by means of a Three-Phase Programmable Voltage Source block to observe the STATCOM dynamic response to changes in system voltage.

SPS Model of the 100 Mvar STATCOM on a 500 kV Power System

(power_statcom_gto48p)

Page 34: Documentation

27

STATCOM Power Component

The STATCOM consists of a three-level 48-pulse inverter and two series-connected 3000 µF capacitors which act as a variable DC voltage source. The variable amplitude 60 Hz voltage produced by the inverter is synthesized from the variable DC voltage which varies around 19.3 kV.

48-Pulse Three-Level Inverter

Page 35: Documentation

28

The STATCOM uses this circuit to generate the inverter voltage V2 voltage mentioned in the Static Synchronous Compensator (Phasor Type) block documentation. It consists of four 3-phase 3-level inverters coupled with four phase shifting transformers introducing phase shift of +/-7.5 degrees.

Except for the 23rd and 25th harmonics, this transformer arrangement neutralizes all odd harmonics up to the 45th harmonic. Y and D transformer secondaries cancel harmonics 5+12n (5, 17, 29, 41,...) and 7+12n (7, 19, 31, 43,...). In addition, the 15° phase shift between the two groups of transformers (Tr1Y and Tr1D leading by 7.5°, Tr2Y and Tr2D lagging by 7.5°) allows cancellation of harmonics 11+24n (11, 35,...) and 13+24n (13, 37,...). Considering that all 3n harmonics are not transmitted by the transformers (delta and ungrounded Y), the first harmonics that are not canceled by the transformers are therefore the 23rd, 25th, 47th and 49th harmonics. By choosing the appropriate conduction angle for the three-level inverter (σ = 172.5°), the 23rd and 25th harmonics can be minimized. The first significant harmonics generated by the inverter will then be 47th and 49th. Using a bipolar DC voltage, the STATCOM thus generates a 48-step voltage approximating a sine wave.

Page 36: Documentation

29

The following figure reproduces the primary voltage generated by the STATCOM 48-pulse inverter as well as its harmonics contents.

Frequency Spectrum of Voltage Generated by 48-Pulse Inverter at No Load

This frequency spectrum was obtained by running the power_48pulsegtoconverter demo, which uses the same converter topology.

STATCOM Control System

Page 37: Documentation

30

The control system task is to increase or decrease the capacitor DC voltage, so that the generated AC voltage has the correct amplitude for the required reactive power. The control system must also keep the AC generated voltage in phase with the system voltage at the STATCOM connection bus to generate or absorb reactive power only (except for small active power required by transformer and inverter losses).

The control system uses the following modules:

• PLL (phase locked loop) synchronizes GTO pulses to the system voltage and provides a reference angle to the measurement system.

• Measurement System computes the positive-sequence components of the STATCOM voltage and current, using phase-to-dq transformation and a running-window averaging.

• Voltage regulation is performed by two PI regulators: from the measured voltage Vmeas and the reference voltage Vref, the Voltage Regulator block (outer loop) computes the reactive current reference Iqref used by the Current Regulator block (inner loop). The output of the current regulator is the α angle which is the phase shift of the inverter voltage with respect to the system voltage. This angle stays very close to zero except during short periods of time, as explained below.

Page 38: Documentation

31

A voltage droop is incorporated in the voltage regulation to obtain a V-I characteristics with a slope (0.03 pu/100 MVA in this case). Therefore, when the STATCOM operating point changes from fully capacitive (+100 Mvar) to fully inductive (-100 Mvar) the SVC voltage varies between 1-0.03=0.97 pu and 1+0.03=1.03 pu.

• Firing Pulses Generator generates pulses for the four inverters from the PLL output (ω.t) and the current regulator output (α angle).

To explain the regulation principle, let us suppose that the system voltage Vmeas becomes lower than the reference voltage Vref. The voltage regulator will then ask for a higher reactive current output (positive Iq= capacitive current). To generate more capacitive reactive power, the current regulator will then increase α phase lag of inverter voltage with respect to system voltage, so that an active power will temporarily flow from AC system to capacitors, thus increasing DC voltage and consequently generating a higher AC voltage.

As explained in the preceding section, the conduction angle σ of the 3-level inverters has been fixed to 172.5°. This conduction angle minimizes 23rd and 25th harmonics of voltage generated by the square-wave inverters. Also, to reduce noncharacteristic harmonics, the positive and negative voltages of the DC bus are forced to stay equal by the DC Balance Regulator module. This is performed by applying a slight offset on the conduction angles σ for the positive and negative half-cycles.

The STATCOM control system also allows selection of Var control mode (see the STATCOM Controller dialog box). In such a case, the reference current Iqref is no longer generated by the voltage regulator. It is rather determined from the Qref or Iqref references specified in the dialog box.

Page 39: Documentation

32

Steady-State and Dynamic Performance of the STATCOM

You will now observe steady-state waveforms and the STATCOM dynamic response when the system voltage is varied. Open the programmable voltage source menu and look at the sequence of voltage steps that are programmed. Also, open the STATCOM Controller dialog box and verify that the STATCOM is in Voltage regulation mode with a reference voltage of 1.0 pu. Run the simulation and observe waveforms on the STATCOM scope block. These waveforms are reproduced below.

Waveforms Illustrating STATCOM Dynamic Response to System Voltage Steps

Initially the programmable voltage source is set at 1.0491 pu, resulting in a 1.0 pu voltage at bus B1 when the STATCOM is out of service. As the reference voltage Vref is set to 1.0 pu, the STATCOM is initially floating (zero current). The DC voltage is 19.3 kV. At t=0.1s, voltage

Page 40: Documentation

33

is suddenly decreased by 4.5% (0.955 pu of nominal voltage). The STATCOM reacts by generating reactive power (Q=+70 Mvar) to keep voltage at 0.979 pu. The 95% settling time is approximately 47 ms. At this point the DC voltage has increased to 20.4 kV.

Then, at t=0.2 s the source voltage is increased to1.045 pu of its nominal value. The STATCOM reacts by changing its operating point from capacitive to inductive to keep voltage at 1.021 pu. At this point the STATCOM absorbs 72 Mvar and the DC voltage has been lowered to 18.2 kV. Observe on the first trace showing the STATCOM primary voltage and current that the current is changing from capacitive to inductive in approximately one cycle.

Finally, at t=0.3 s the source voltage in set back to its nominal value and the STATCOM operating point comes back to zero Mvar.

The figure below zooms on two cycles during steady-state operation when the STATCOM is capacitive and when it is inductive. Waveforms show primary and secondary voltage (phase A) as well as primary current flowing into the STATCOM.

Steady-State Voltages and Current for Capacitive and Inductive Operation

Notice that when the STATCOM is operating in capacitive mode (Q=+70 Mvar), the 48-pulse secondary voltage (in pu) generated by inverters is higher than the primary voltage (in pu) and in phase with primary voltage. Current is leading voltage by 90°; the STATCOM is therefore generating reactive power.

On the contrary, when the STATCOM is operating in inductive mode, secondary voltage is lower than primary voltage. Current is lagging voltage by 90°; the STATCOM is therefore absorbing reactive power.

Page 41: Documentation

34

Finally, if you look inside the Signals and Scopes subsystem you will have access to other control signals. Notice the transient changes on α angle when the DC voltage is increased or decreased to vary reactive power. The steady-state value of α (0.5 degrees) is the phase shift required to maintain a small active power flow compensating transformer and converter losses.

Page 42: Documentation

35

5.7 Three-Phase Transformer (Two Windings) - Implement three-phase transformer with

configurable winding connections

Library

Elements

Description

The Three-Phase Transformer (Two Windings) block implements a three-phase transformer using three single-phase transformers. You can simulate the saturable core or not simply by setting the appropriate check box in the parameter menu of the block. See the Linear Transformer block and Saturable Transformer block sections for a detailed description of the electrical model of a single-phase transformer.

The two windings of the transformer can be connected in the following manner:

• Y • Y with accessible neutral • Grounded Y • Delta (D1), delta lagging Y by 30 degrees • Delta (D11), delta leading Y by 30 degrees

The block takes into account the connection type you have selected, and the icon of the block is automatically updated. An input port labeled N is added to the block if you select the Y connection with accessible neutral for winding 1. If you ask for an accessible neutral on winding 2, an extra output port labeled n is generated.

The saturation characteristic, when activated, is the same as the one described for the Saturable Transformer block, and the icon of the block is automatically updated. If the fluxes are not specified, the initial values are automatically adjusted so that the simulation starts in steady state.

The leakage inductance and resistance of each winding are given in pu based on the transformer nominal power Pn and on the nominal voltage of the winding (V1 or V2). For an explanation of per units, refer to the Linear Transformer and to the Saturable Transformer.

Page 43: Documentation

36

Configuration Tab

Winding 1 connection (ABC terminals)

The winding connections for winding 1.

Winding 2 connection (abc terminals)

The winding connections for winding 2.

Saturable core

If selected, implements a saturable three-phase transformer. See also the Saturation

characteristic parameter on the Parameters tab.

Simulate hysteresis

Page 44: Documentation

37

Select to model a saturation characteristic including hysteresis instead of a single-valued saturation curve. This parameter is visible only if the Saturable core parameter is selected.

Hysteresis Mat file

This parameter is visible only if the Simulate hysteresis parameter is selected.

Specify a .mat file containing the data to be used for the hysteresis model. When you open the Hysteresis Design Tool of the Powergui, the default hysteresis loop and parameters saved in the hysteresis.mat file are displayed. Use the Load button of the Hysteresis Design tool to load another .mat file. Use the Save button of the Hysteresis Design tool to save your model in a new .mat file.

Specify initial fluxes

If selected, the initial fluxes are defined by the Initial fluxes parameter on the Parameters tab. The Specify initial fluxes parameter is visible only if the Saturable

core parameter is selected.

When the Specify initial fluxes parameter is not selected upon simulation, SimPowerSystems software automatically computes the initial fluxes to start the simulation in steady state. The computed values are saved in the Initial Fluxes parameter and will overwrite any previous values.

Measurements

Select Winding voltages to measure the voltage across the winding terminals of the Three-Phase Transformer block.

Select Winding currents to measure the current flowing through the windings of the Three-Phase Transformer block.

Select Fluxes and excitation currents (Im + IRm) to measure the flux linkage, in volt seconds (V.s), and the total excitation current including iron losses modeled by Rm (for saturable transformers only).

Select Fluxes and magnetization currents (Im) to measure the flux linkage, in volt seconds (V.s), and the magnetization current, in amperes (A), not including iron losses modeled by Rm (for saturable transformers only).

Select All measurements (V, I, Flux) to measure the winding voltages, currents, magnetization currents, and the flux linkages.

Page 45: Documentation

38

Place a Multimeter block in your model to display the selected measurements during the simulation. In the Available Measurements list box of the Multimeter block, the measurements are identified by a label followed by the block name.

If the Winding 1 connection (ABC terminals) parameter is set to Y, Yn, or Yg, the labels are as follows).

Measurement Label

Winding 1 voltages Uan_w1:, Ubn_w1:, Ucn_w1:

or

Uag_w1:, Ubg_w1:, Ucg_w1:

Winding 1 currents Ian_w1:, Ibn_w1:, Icn_w1:

or

Iag_w1:, Ibg_w1:, Icg_w1:

Fluxes Flux_A:, Flux_B:, Flux_C:

Magnetization currents Imag_A:, Imag_B:, Imag_C:

Excitation currents Iexc_A:, Iexc_B:, Iexc_C:

The same labels apply for winding 2, except that 1 is replaced by 2 in the labels.

If the Winding 1 connection (ABC terminals) parameter is set to Delta (D11) or Delta (D1), the labels are as follows.

Measurement Label

Winding 1 voltages Uab_w1:, Ubc_w1:, Uca_w1:

Winding 1 currents Iab_w1:, Ibc_w1:, Ica_w1:

Flux linkages Flux_A:, Flux_B:, Flux_C:

Magnetization currents Imag_A:, Imag_B:, Imag_C:

Excitation currents Iexc_A:, Iexc_B:, Iexc_C:

Page 46: Documentation

39

Parameters Tab

Units

Specify the units used to enter the parameters of the Three Phase Transformer block. Select pu to use per unit. Select SI to use SI units. Changing the Units parameter from pu to SI, or from SI to pu, will automatically convert the parameters displayed in the mask of the block. The per unit conversion is based on the transformer rated power Pn in VA, nominal frequency fn in Hz, and nominal voltage Vn, in Vrms, of the windings.

Nominal power and frequency

Page 47: Documentation

40

The nominal power rating, in volt-amperes (VA), and nominal frequency, in hertz (Hz), of the transformer. Note that the nominal parameters have no impact on the transformer model when the Units parameter is set to SI.

Winding 1 parameters

The phase-to-phase nominal voltage in volts RMS, resistance, and leakage inductance in pu for winding 1.

Winding 2 parameters

The phase-to-phase nominal voltage in volts RMS, resistance, and leakage inductance in pu for winding 2.

Magnetization resistance Rm

The magnetization resistance Rm, in pu.

Magnetization inductance Lm

The magnetization inductance Lm, in pu, for a nonsaturable core. The Magnetization

inductance Lm parameter is not accessible if the Saturable core parameter on the Configuration tab is selected.

Saturation characteristic

The saturation characteristic for the saturable core. Specify a series of current/ flux pairs (in pu) starting with the pair (0,0). This parameter is accessible only if the

Saturable core parameter on the Configuration tab is selected.

Initial fluxes

Specify initial fluxes for each phase of the transformer. This parameter is accessible only if the Specify initial fluxes and Saturable core parameters on the Configuration tab are selected.

5.8 Three-Phase Breaker - Implement three-phase circuit breaker opening at current zero

crossing

Library

Elements

Page 48: Documentation

41

Description

The Three-Phase Breaker block implements a three-phase circuit breaker where the opening and closing times can be controlled either from an external Simulink signal (external control mode), or from an internal control timer (internal control mode).

The Three-Phase Breaker block uses three Breaker blocks connected between the inputs and the outputs of the block. You can use this block in series with the three-phase element you want to switch. See the Breaker block reference pages for details on the modeling of the single-phase breakers.

If the Three-Phase Breaker block is set in external control mode, a control input appears in the block icon. The control signal connected to this input must be either 0 or 1, 0 to open the breakers, 1 to close them. If the Three-Phase Breaker block is set in internal control mode, the switching times are specified in the dialog box of the block. The three individual breakers are controlled with the same signal.

Series Rs-Cs snubber circuit are included in the model. They can be optionally connected to the three individual breakers. If the Three-Phase Breaker block happens to be in series with an inductive circuit, an open circuit or a current source, you must use the snubbers.

Dialog Box and Parameters

Page 49: Documentation

42

Initial status of breakers

The initial status of the breakers. The initial status is the same for the three breakers. Depending on the initial status, the icon shows a closed contact or an open contact.

Switching of phase A

If selected, the switching of phase A is activated. If not selected, the breaker of phase A stays in its initial status specified in the Initial status of breakers parameter.

Page 50: Documentation

43

Switching of Phase B

If selected, the switching of phase B is activated. If not selected, the breaker of phase B stays in its initial status specified in the Initial status of breakers parameter.

Switching of phase C

If selected, the switching of phase C is activated. If not selected, the breaker of phase C stays in its initial status specified in the Initial status of breakers parameter.

Transition times(s)

The Transition times(s) parameter is not visible in the dialog box if the External

control of switching times parameter is selected.

Specify the vector of switching times when using the Three-Phase Breaker block in internal control mode. At each transition time the selected breakers opens or closes depending to their initial state.

External control of switching times

If selected, adds a fourth input port to the Three-Phase Breaker block for an external control of the switching times of the breakers. The switching times are defined by a Simulink signal (0-1 sequence).

Breakers resistance Ron

The internal breaker resistances, in ohms (Ω). The Breaker resistance Ron parameter cannot be set to 0.

Snubbers resistance Rp

The snubber resistances, in ohms (Ω). Set the Snubber resistance Rp parameter to inf to eliminate the snubbers from the model.

Snubbers capacitance Cp

The snubber capacitances, in farads (F). Set the Snubber capacitance Cp parameter to 0 to eliminate the snubbers, or to inf to get resistive snubbers.

Page 51: Documentation

44

Measurements

Select Breaker voltages to measure the voltage across the three internal breaker terminals.

Select Breaker currents to measure the current flowing through the three internal breakers. If the snubber devices are connected, the measured currents are the ones flowing through the breakers contacts only.

Select Breaker voltages and currents to measure the breaker voltages and the breaker currents.

Place a Multimeter block in your model to display the selected measurements during the simulation. In the Available Measurements list box of the Multimeter block, the measurements is identified by a label followed by the block name and the phase:

Measurement Label

Breaker voltages Ub <block name> /Breaker A: Ub <block name> /Breaker B:

Ub <block name> /Breaker C.

Breaker currents Ib <block name> /Breaker A: Ib <block name> /Breaker B:

Ib <block name> Breaker C.

Inputs and Outputs

If the Three-Phase Breaker block is set in external control mode, a Simulink input is added to the block to control the opening and closing of the three internal breakers.

Page 52: Documentation

5.9 Three-Phase Fault - Implement programmable phase

fault breaker system

Library

Elements

Description

The Three-Phase Fault block implements a threeand closing times can be controlled either from an external Simulink signal (external control mode), or from an internal control timer (internal control mode).

The Three-Phase Fault block uses three Breaker blocks that can be individually switched on and off to program phase-to-phase-to-phase and ground faults.

The ground resistance Rg is automatically set to 10not programmed. For example, to program a fault betweselect the Phase A Fault and between the phase A and the ground, you need to select the Fault parameters and specify a small value for the gr

If the Three-Phase Fault block is set in external control mode, a control input appears in the block icon. The control signal connected to the fourth input must be either 0 or 1, 0 to open the breakers, 1 to close them. If the Threethe switching times and status are specified in the dialog box of the block.

45

Implement programmable phase-to-phase and phase

Phase Fault block implements a three-phase circuit breaker where the opening closing times can be controlled either from an external Simulink signal (external control

mode), or from an internal control timer (internal control mode).

Phase Fault block uses three Breaker blocks that can be individually switched on -phase faults, phase-to-ground faults, or a combination of

phase and ground faults.

The ground resistance Rg is automatically set to 106 ohms when the ground fault option is not programmed. For example, to program a fault between the phases A and B you need to

and Phase B Fault block parameters only. To program a fault between the phase A and the ground, you need to select the Phase A Fault

parameters and specify a small value for the ground resistance.

Phase Fault block is set in external control mode, a control input appears in the block icon. The control signal connected to the fourth input must be either 0 or 1, 0 to open the breakers, 1 to close them. If the Three-Phase Fault block is set in internal control mode, the switching times and status are specified in the dialog box of the block.

phase and phase-to-ground

phase circuit breaker where the opening closing times can be controlled either from an external Simulink signal (external control

Phase Fault block uses three Breaker blocks that can be individually switched on ground faults, or a combination of

ohms when the ground fault option is en the phases A and B you need to

block parameters only. To program a fault Phase A Fault and Ground

Phase Fault block is set in external control mode, a control input appears in the block icon. The control signal connected to the fourth input must be either 0 or 1, 0 to open

Fault block is set in internal control mode,

Page 53: Documentation

46

Series Rp-Cp snubber circuits are included in the model. They can be optionally connected to the fault breakers. If the Three-Phase Fault block is in series with an inductive circuit, an open circuit or a current source, you must use the snubbers.

Dialog Box and Parameters

Page 54: Documentation

47

Phase A Fault

If selected, the fault switching of phase A is activated. If not selected, the breaker of phase A stays in its initial status. The initial status of the phase A breaker corresponds to the complement of the first value specified in the vector of Transition status. The initial status of the fault breaker is usually 0 (open). However, it is possible to start a simulation in steady state with the fault initially applied on the system. For example, if the first value in the Transition status vector is 0, the phase A breaker is initially closed. It opens at the first time specified in the Transition time(s) vector.

Phase B Fault

If selected, the fault switching of phase B is activated. If not selected, the breaker of phase B stays in its initial status. The initial status of the phase B breaker corresponds to the complement of the first value specified in the vector of Transition status.

Phase C Fault

If selected, the fault switching of phase C is activated. If not selected, the breaker of phase C stays in its initial status. The initial status of the phase C breaker corresponds to the complement of the first value specified in the vector of Transition status.

Fault resistances Ron

The internal resistance, in ohms (Ω), of the phase fault breakers. The Fault

resistances Ron parameter cannot be set to 0.

Ground Fault

If selected, the fault switching to the ground is activated. A fault to the ground can be programed for the activated phases. For example, if the Phase C Fault and Ground

Fault parameters are selected, a fault to the ground is applied to the phase C. The ground resistance is set internally to 1e6 ohms when the Ground Fault parameter is not selected.

Ground resistance Rg

Page 55: Documentation

48

The Ground resistance Rg (ohms) parameter is not visible if the Ground Fault parameter is not selected. The ground resistance, in ohms (Ω). The Ground

resistance Rg (ohms) parameter cannot be set to 0.

External control of fault timing

If selected, adds a fourth input port to the Three-Phase Fault block for an external control of the switching times of the fault breakers. The switching times are defined by a Simulink signal (0 or 1) connected to the fourth input port of the block.

Transition status

Specify the vector of switching status when using the Three-Phase Breaker block in internal control mode. The selected fault breakers open (0) or close (1) at each transition time according to the Transition status parameter values.

The initial status of the breakers corresponds to the complement of the first value specified in the vector of switching status.

Transition times(s)

Specify the vector of switching times when using the Three-Phase Breaker block in internal control mode. At each transition time the selected fault breakers opens or closes depending to the initial state. The Transition times (s) parameter is not visible in the dialog box if the External control of switching times parameter is selected.

Snubbers resistance Rp

The snubber resistances are in ohms (Ω). Set the Snubbers resistance Rp parameter to inf to eliminate the snubbers from the model.

Snubbers capacitance Cp

The snubber capacitances are in farads (F). Set the Snubbers capacitance Cp parameter to 0 to eliminate the snubbers, or to inf to get resistive snubbers.

Page 56: Documentation

49

Measurements

Select Fault voltages to measure the voltage across the three internal fault breaker terminals.

Select Fault currents to measure the current flowing through the three internal breakers. If the snubber devices are connected, the measured currents are the ones flowing through the breakers contacts only.

Select Fault voltages and currents to measure the breaker voltages and the breaker currents.

Place a Multimeter block in your model to display the selected measurements during the simulation. In the Available Measurements list box of the Multimeter block, the measurements are identified by a label followed by the block name and the phase:

Measurement Label

Fault voltages Ub <block name> /Fault A: Ub <block name> /Fault B: Ub <block name> /Fault C.

Fault currents Ib <block name> /Fault A: Ib <block name> /Fault B: Ib <block name> /Fault C.

Inputs and Outputs

The three fault breakers are connected in wye between terminals A, B and C and the internal ground resistor. If the Three-Phase Fault block is set to external control mode, a Simulink input is added to the block to control the opening and closing of the three internal breakers.

Page 57: Documentation

50

5.10 Three-Phase Sequence Analyzer - Measure positive-, negative-, and zero-sequence

components of three-phase signal

Library

Extras/Measurements

A discrete version of this block is available in the Extras/Discrete Measurements library

Description

The Three-Phase Sequence Analyzer block outputs the magnitude and phase of the positive- (denoted by the index 1), negative- (index 2), and zero-sequence (index 0) components of a set of three balanced or unbalanced signals. The signals can contain harmonics or not. The three sequence components of a three-phase signal (voltages V1 V2 V0 or currents I1 I2 I0) are computed as follows:

V1=(Va+aVb+a2Vc)/3

V2=(Va+a2Vb+aVc)/3

V0 = (Va + Vb + Vc)/3

where

Va, Vb, Vc = three voltage phasors at specified frequency a = ej2π/3 = 1∠120° complex operator.

A Fourier analysis over a sliding window of one cycle of the specified frequency is first applied to the three input signals. It evaluates the phasor values Va, Vb, and Vc at the specified fundamental or harmonic frequency. Then the transformation is applied to obtain the positive sequence, negative sequence, and zero sequence.

The Three-Phase Sequence Analyzer block is not sensitive to harmonics or imbalances. However, as this block uses a running average window to perform the Fourier analysis, one cycle of simulation has to be completed before the outputs give the correct magnitude and angle. For example, its response to a step change of V1 is a one-cycle ramp.

The discrete version of this block allows you to specify the initial magnitude and phase of the output signal. For the first cycle of simulation the outputs are held to the values specified by the initial input parameter.

Page 58: Documentation

51

You can modify any parameter during the simulation in order to obtain the different sequence and harmonic components of the input signals.

Fundamental frequency f1

The fundamental frequency, in hertz, of the three-phase input signal.

Harmonic n

Specify the harmonic component from which you want to evaluate the sequences. For DC, enter 0. For fundamental, enter 1.

Page 59: Documentation

52

Sequence

Specify which sequence component the block outputs. Select Positive to calculate the positive sequence, select Negative to calculate the negative sequence, select 0 to compute the zero sequence of the fundamental or specified harmonic of the three-phase input signal. Select Positive Negative Zero to get all the sequences.

Inputs and Outputs

abc

Connect to the input the vectorized signal of the three [a b c] sinusoidal signals.

Mag

The first output gives the magnitude (peak value) of the specified sequence component, in the same units as the abc input signals.

Phase

The second output gives the phase in degrees of the specified component(s).

Example

The power_3phsignalseq demo illustrates the use of the Discrete Sequence Analyzer block to measure the fundamental and harmonic components of a three-phase voltage. A 25kV, 100 MVA short-circuit level, equivalent network feeds a 5 MW, 2 Mvar capacitive load. The internal voltage of the source is controlled by the Discrete 3-phase Programmable Voltage Source block.

A positive sequence of 1.0 pu, 0 degrees is specified for the fundamental signal. At t = 0.05 s a step of 0.5 pu is applied on the positive-sequence voltage magnitude, then at t = 0.1 s, 0.08 pu of fifth harmonic in negative sequence is added to the 1.5 pu voltage.

Two Discrete Three-Phase Sequence Analyzer blocks are used to measure the positive-sequence fundamental component and the negative-sequence fifth harmonic of the three-phase voltage.

Page 60: Documentation

53

As the Three-Phase Sequence Analyzer blocks use Fourier analysis, their response time is delayed by one cycle of the fundamental frequency.

Page 61: Documentation

54

5.11 PID Controller - Simulate continuous- or discrete-time PID controllers

Library

Continuous, Discrete

Description

Implement a continuous- or discrete-time controller (PID, PI, PD, P, or I) in your Simulink model. PID controller gains are tunable either manually or automatically. Automatic tuning requires Simulink® Control Design™ software (PID Tuner or SISO Design Tool).

The PID Controller block output is a weighted sum of the input signal, the integral of the input signal, and the derivative of the input signal. The weights are the proportional, integral, and derivative gain parameters. A first-order pole filters the derivative action.

Configurable options in the PID Controller block include:

• Controller type (PID, PI, PD, P, or I) • Controller form (Parallel or Ideal) • Time domain (continuous or discrete) • Initial conditions and reset trigger • Output saturation limits and built-in anti-windup mechanism • Signal tracking for bumpless control transfer and multiloop control

In one common implementation, the PID Controller block operates in the feedforward path of the feedback loop:

Page 62: Documentation

55

The input of the block is typically an error signal, which is the difference between a reference signal and the system output. For a two-input block that permits setpoint weighting, see the PID Controller (2 DOF) block reference page.

You can generate code to implement your controller using any Simulink data type, including fixed-point data types. (Code generation requires Simulink Coder software; fixed-point implementation requires the Fixed-Point Toolbox product.)

For examples illustrating some applications of the PID Controller block, see the following Simulink demos:

• Anti-Windup Control Using a PID Controller • Bumpless Control Transfer Between Manual and PID Control

Data Type Support

The PID Controller block accepts real signals of any numeric data type that Simulink software supports, including fixed-point data types. See Data Types Supported by Simulink in the Simulink documentation for more information.

Parameters

The following table summarizes the PID Controller block parameters, accessible on the block parameter dialog box.

Page 63: Documentation

56

Task Parameters

Choose controller form and type. • Controller Form in Main tab • Controller

Choose discrete or continuous

time.

• Time-domain • Sample time

Choose an integration method

(discrete time).

• Integrator method • Filter method

Set and tune controller gains. • Proportional (P) in Main tab • Integral (I) in Main tab • Derivative (D) in Main tab • Filter coefficient (N) in Main tab

Set integrator and filter initial

conditions.

• Initial conditions Source in Main tab • Integrator Initial condition in Main tab • Filter Initial condition in Main tab • External reset in Main tab • Ignore reset when linearizing in Main tab

Limit block output. • Limit output in PID Advanced tab • Lower saturation limit in PID Advanced tab • Upper saturation limit in PID Advanced tab • Ignore saturation when linearizing in PID

Advanced tab

Configure anti-windup

mechanism (when you limit

block output).

• Anti-windup method in PID Advanced tab • Back-calculation gain (Kb) in PID Advanced tab

Enable signal tracking. • Enable tracking mode in PID Advanced tab • Tracking gain (Kt) in PID Advanced tab

Configure data types. • Parameter data type in Data Type Attributes tab • Product output data type in Data Type Attributes

tab

Page 64: Documentation

57

Task Parameters

• Summation output data type in Data Type Attributes tab

• Accumulator data type in Data Type Attributes tab • Integrator output data type in Data Type

Attributes tab • Filter output data type in Data Type Attributes tab • Saturation output data type in Data Type

Attributes tab • Lock output data type setting against changes by

the fixed-point tools in Data Type Attributes tab • Saturate on integer overflow in Data Type

Attributes tab • Integer rounding mode in Data Type Attributes

tab

Configure block for code

generation.

• State name in State Attributes tab • State name must resolve to Simulink signal object

in State Attributes tab • Code generation storage class in State Attributes

tab • Code generation storage type qualifier in State

Attributes tab

Controller form

Select the controller form.

Settings

Parallel (Default)

Selects a controller form in which the output is the sum of the proportional, integral, and derivative actions, weighted according to the independent gain parameters P, I, and D. The filter coefficient N sets the location of the pole in the derivative filter. For a continuous-time parallel PID controller, the transfer function is:

Page 65: Documentation

For a discrete-time parallel PID controller, the transfer function takes the form:

where the Integrator method

(for sampling time Ts):

(determined by Integrator method)

(determined by Filter method)

The controller transfer function for the current settings is displayed in the block dialog box.

58

time parallel PID controller, the transfer function takes the form:

Integrator method determines a(z) and the Filter method

Forward Euler

method

Backward Euler

method

(determined by Integrator

(determined by Filter

The controller transfer function for the current settings is displayed in the block

time parallel PID controller, the transfer function takes the form:

Filter method determines b(z)

Trapezoidal

method

The controller transfer function for the current settings is displayed in the block

Page 66: Documentation

Parallel PID Controller

Ideal

Selects a controller form in which the proportional gain actions. The transfer functions are the same as for the parallel form, except that multiplies all terms. For a continuousis:

For a discrete-time ideal PID controller the transfer function is:

where the Integrator method

as described previously for the parallel controller form.

59

Selects a controller form in which the proportional gain P acts on the sum of all actions. The transfer functions are the same as for the parallel form, except that multiplies all terms. For a continuous-time ideal PID controller, the transfer function

time ideal PID controller the transfer function is:

Integrator method determines a(z) and the Filter method

as described previously for the parallel controller form.

acts on the sum of all actions. The transfer functions are the same as for the parallel form, except that P

time ideal PID controller, the transfer function

Filter method determines b(z)

Page 67: Documentation

60

Ideal PID Controller

Controller

Specify the controller type.

Settings

PID (Default): Implements a controller with proportional, integral, and derivative action.

PI: Implements a controller with proportional and integral action.

PD: Implements a controller with proportional and derivative action.

P: Implements a controller with proportional action.

I: Implements a controller with integral action.

The controller transfer function for the current settings is displayed in the block dialog box.

Page 68: Documentation

61

Time-domain

Select continuous or discrete time domain. The appearance of the block changes to reflect your selection.

Settings

Continuous-time (Default)

Selects the continuous-time representation.

Discrete-time

Selects the discrete-time representation. Selecting Discrete-time also allows you to specify the:

• Sample time, which is the discrete interval between samples. • Discrete integration methods for the integrator and the derivative filter using

the Integrator method and Filter method menus.

Integrator method

(Available only when you set Time-domain to Discrete-time.) Specify the method used to compute the integrator output. For more information about discrete-time integration methods, see the Discrete-Time Integrator block reference page.

Page 69: Documentation

62

Settings

Forward Euler (Default)

Selects the Forward Rectangular (left-hand) approximation.

• This method is best for small sampling times, where the Nyquist limit is large compared to the bandwidth of the controller. For larger sampling times, the Forward Euler method can result in instability, even when discretizing a system that is stable in continuous time.

Backward Euler

Selects the Backward Rectangular (right-hand) approximation.

• If you are generating code using Simulink Coder software or the Fixed-Point Toolbox product and you activate the Back-calculation Anti-windup method, this integration method can cause algebraic loops in your controller. Algebraic loops can lead to slower performance of generated code. For more information about algebraic loops in Simulink models, see Algebraic Loops in the Simulink documentation.

• An advantage of the Backward Euler method is that discretizing a stable continuous-time system using this method always yields a stable discrete-time result.

Trapezoidal

Selects the Bilinear approximation.

• If you are generating code using Simulink Coder software or the Fixed-Point Toolbox product and you activate the Back-calculation Anti-windup method, this integration method can cause algebraic loops in your controller. Algebraic loops can lead to slower performance of generated code. For more information about algebraic loops in Simulink models, see Algebraic Loops in the Simulink documentation.

• An advantage of the Trapezoidal method is that discretizing a stable continuous-time system using this method always yields a stable discrete-time result. Of all available integration methods, the Trapezoidal method yields the closest match between frequency-domain properties of the discretized system and the corresponding continuous-time system.

Page 70: Documentation

63

Filter method

(Available only when you set Time-domain to Discrete-time.) Specify the method used to compute the derivative filter output. For more information about discrete-time integration methods, see the Discrete-Time Integrator block reference page.

Settings

Forward Euler (Default)

Selects the Forward Rectangular (left-hand) approximation.

• This method is best for small sampling times, where the Nyquist limit is large compared to the bandwidth of the controller. For larger sampling times, the Forward Euler method can result in instability, even when discretizing a system that is stable in continuous time.

Backward Euler

Selects the Backward Rectangular (right-hand) approximation.

• If you are generating code using Simulink Coder software or the Fixed-Point Toolbox product, this filter method can cause algebraic loops in your controller. Algebraic loops can lead to slower performance of generated code. For more information about algebraic loops in Simulink models, see Algebraic Loops in the Simulink documentation.

• An advantage of the Backward Euler method is that discretizing a stable continuous-time system using this method always yields a stable discrete-time result. Any filter parameter value N > 0 yields a stable result with this method.

Trapezoidal

Selects the Bilinear approximation.

• If you are generating code using Simulink Coder software or the Fixed-Point Toolbox product, this filter method can cause algebraic loops in your controller. Algebraic loops can lead to slower performance of generated code. For more information about algebraic loops in Simulink models, see Algebraic Loops in the Simulink documentation.

• An advantage of the Trapezoidal method is that discretizing a stable continuous-time system using this method always yields a stable discrete-time result. Any filter parameter value N > 0 yields a stable result with this method. Of all available filter methods, the Trapezoidal method yields the closest

Page 71: Documentation

64

match between frequency-domain properties of the discretized system and the corresponding continuous-time system.

Sample time (-1 for inherited)

(Available only when you set Time-domain to Discrete-time.) Specify the discrete interval between samples.

Settings

Default: 1

By default, the block uses a discrete sample time of 1. To specify a different sample time, enter another discrete value, such as 0.1.

If you specify a value of -1, the PID Controller block inherits the sample time from the upstream block. Do not enter a value of 0; to implement a continuous-time controller, select the Time-domain Continuous-time.

See How to Specify the Sample Time in the online documentation for more information.

Proportional (P)

(Available for PID, PD, PI, and P controllers.) Specify the proportional gain P.

Default: 1

Enter a finite, real gain value into the Proportional (P) field. Use either scalar or vector gain values. For a Parallel PID Controller form, the proportional action is independent of the integral and derivative actions. For an Ideal PID Controller form, the proportional action acts on the integral and derivative actions. See Controller form for more information about the role of P in the controller transfer function.

When you have Simulink Control Design software installed, you can automatically tune the controller gains using the PID Tuner or the SISO Design Tool. See Designing Compensators in the Simulink Control Design documentation.

Page 72: Documentation

65

Integral (I)

(Available for PID, PI, and I controllers.) Specify the integral gain I.

Default: 1

Enter a finite, real gain value into the Integral (I) field. Use either scalar or vector gain values.

When you have Simulink Control Design software installed, you can automatically tune the controller gains using the PID Tuner or the SISO Design Tool. See Designing Compensators in the Simulink Control Design documentation.

Derivative (D)

(Available for PID and PD controllers) Specify the derivative gain D.

Default: 0

Enter a finite, real gain value into the Derivative (D) field. Use either scalar or vector gain values.

When you have Simulink Control Design software installed, you can automatically tune the controller gains using the PID Tuner or the SISO Design Tool. See Designing Compensators in the Simulink Control Design documentation.

Filter coefficient (N)

(Available for PID and PD controllers.) Specify the filter coefficient N, which determines the pole location of the filter in the derivative action:

The filter pole falls at s = -N in the Continuous-time Time-domain. For Discrete-time, the location of the pole depends on which Filter method you select (for sampling time Ts):

Page 73: Documentation

• Forward Euler:

• Backward Euler:

• Trapezoidal:

Default: 100.

Enter a finite, real gain value into the gain values. Note that the PID controller block does not support derivative).

When you have Simulink Control Design software installed, you can automatically tune the controller gains using the PID Tuner or the SISO Design Tool. See the Simulink Control Design documentation. Automatic tuning requires

Initial conditions Source

(Only available for controllers with integral or derivative action.) Select the source of the integrator and filter initial conditions. Simulink uses initial conditions to initialize the integrator and filter output at the start of a simulation or at a specified trigExternal reset). The integrator and filter initial conditions in turn determine the initial block output.

Settings

internal (Default)

Specifies the integrator and filter initial conditions explicitly using the Initial condition and Filter Initial condition

external

66

Enter a finite, real gain value into the Filter Coefficient (N) field. Use either scalar or vector gain values. Note that the PID controller block does not support N = inf

When you have Simulink Control Design software installed, you can automatically tune the PID Tuner or the SISO Design Tool. See Designing Compensators

the Simulink Control Design documentation. Automatic tuning requires N > 0

able for controllers with integral or derivative action.) Select the source of the integrator and filter initial conditions. Simulink uses initial conditions to initialize the integrator and filter output at the start of a simulation or at a specified trig

). The integrator and filter initial conditions in turn determine the initial block

Specifies the integrator and filter initial conditions explicitly using the Filter Initial condition parameters.

field. Use either scalar or vector N = inf (ideal unfiltered

When you have Simulink Control Design software installed, you can automatically tune the Designing Compensators in

N > 0.

able for controllers with integral or derivative action.) Select the source of the integrator and filter initial conditions. Simulink uses initial conditions to initialize the integrator and filter output at the start of a simulation or at a specified trigger event (See

). The integrator and filter initial conditions in turn determine the initial block

Specifies the integrator and filter initial conditions explicitly using the Integrator

Page 74: Documentation

67

Specifies the integrator and filter initial conditions externally. An additional input port appears under the block input for each initial condition: I0 for the integrator and D0 for the filter:

Integrator Initial condition

(Available only when Initial conditions Source is internal and the controller includes integral action.) Specify the integrator initial value. Simulink uses the initial condition to initialize the integrator output at the start of a simulation or at a specified trigger event (see External reset). The integrator initial condition, together with the filter initial condition, determines the initial output of the PID controller block.

Default: 0

Simulink does not permit the integrator initial condition to be inf or NaN.

Filter Initial condition

(Available only when Initial conditions Source is internal and the controller includes integral action.) Specify the filter initial value. Simulink uses the initial condition to initialize the filter output at the start of a simulation or at a specified trigger event (see External reset). The filter initial condition, together with the integrator initial condition, determines the initial output of the PID controller block.

Default: 0

Simulink does not permit the filter initial condition to be inf or NaN.

Page 75: Documentation

68

External reset

Select the trigger event that resets the integrator and filter outputs to the initial conditions you specify in the Integrator Initial condition and Filter Initial condition fields. Selecting any option other than none enables a reset input on the block for the external reset signal, as shown:

Or, if the Initial conditions Source is External,

Settings

none (Default): Does not reset the integrator and filter outputs to initial conditions.

Rising: Resets the outputs when the reset signal has a rising edge.

Falling: Resets the outputs when the reset signal has a falling edge.

Either: Resets the outputs when the reset signal either rises or falls.

Level: Resets and holds the outputs to the initial conditions while the reset signal is nonzero.

Note To be compliant with the Motor Industry Software Reliability Association (MISRA) software standard, your model must use Boolean signals to drive the external reset ports of the PID controller block.

Ignore reset when linearizing

Force Simulink linearization commands to ignore any reset mechanism that you have chosen with the External reset menu. Ignoring reset states allows you to linearize a model around an operating point even if that operating point causes the PID Controller block to reset.

Page 76: Documentation

69

Settings

Off (Default)

Simulink linearization commands do not ignore states corresponding to the reset mechanism.

On

Simulink linearization commands ignore states corresponding to the reset mechanism.

Enable zero-crossing detection

Enable zero-crossing detection in continuous-time models upon reset and upon entering or leaving a saturation state.

Zero-crossing detection can accurately locate signal discontinuities without resorting to excessively small time steps that can lead to lengthy simulation times. If you select Limit

output or activate an External reset in your PID Controller block, activating zero-crossing detection can reduce computation time in your simulation. For more information, see Zero-Crossing Detection.

Settings

On (Default)

Uses zero-crossing detection at any of the following events: reset; entering or leaving an upper saturation state; and entering or leaving a lower saturation state.

Off

Does not use zero-crossing detection.

Enabling zero-crossing detection for the PID Controller block also enables zero-crossing detection for all under-mask blocks that include the zero-crossing detection feature.

Page 77: Documentation

70

Limit output

Limit the block output to values you specify as the Lower saturation limit and Upper

saturation limit parameters.

Activating this option limits the block output internally to the block, obviating the need for a separate Saturation block after the controller in your Simulink model. It also allows you to activate the block's built-in anti-windup mechanism (see Anti-windup method).

Settings

Off (Default)

Does not limit the block output, which equals the weighted sum of the proportional, integral, and derivative actions.

On

Limits the block output to the Lower saturation limit or the Upper saturation limit whenever the weighted sum exceeds those limits. Allows you to select an Anti-

windup method.

Lower saturation limit

(Available only when you select the Limit output check box.) Specify the lower limit for the block output. The block output is held at the Lower saturation limit whenever the weighted sum of the proportional, integral, and derivative actions goes below that value.

Default: -inf

Upper saturation limit

(Available only when you select the Limit output check box.) Specify the upper limit for the block output. The block output is held at the Upper saturation limit whenever the weighted sum of the proportional, integral, and derivative actions exceeds that value.

Default: inf

Page 78: Documentation

71

Settings

none (Default)

Does not use an anti-windup mechanism. This setting may cause the block's internal signals to be unbounded even if the output appears to be bounded by the saturation limits. This can result in slow recovery from saturation or unexpected overflows.

back-calculation

Discharges the integrator when the block output saturates using the integral-gain feedback loop:

You can also specify a value for the Back-calculation coefficient (Kb).

clamping

Stops integration when the sum of the block components exceeds the output limits and the integrator output and block input have the same sign. Resumes integration when the sum of the block components exceeds the output limits and the integrator output and block input have opposite sign. The integrator portion of the block is:

Page 79: Documentation

72

The clamping circuit implements the logic necessary to determine whether integration continues.

Back-calculation gain (Kb)

(Available only when the back-calculation Anti-windup method is active.) Specify the gain coefficient of the anti-windup feedback loop.

The back-calculation anti-windup method discharges the integrator on block saturation using a feedback loop having gain coefficient Kb.

Default: 1

Ignore saturation when linearizing

Force Simulink linearization commands ignore PID Controller block output limits. Ignoring output limits allows you to linearize a model around an operating point even if that operating point causes the PID Controller block to exceed the output limits.

Settings

Off (Default)

Simulink linearization commands do not ignore states corresponding to saturation.

On

Simulink linearization commands ignore states corresponding to saturation.

Page 80: Documentation

73

Bumpless control transfer

Use signal tracking, for example, to achieve bumpless control transfer in systems that switch between two controllers. You can make one controller track the output of the other controller by connecting the TR port to the signal you want to track. For example:

In this example, the outputs Out1 and Out2 can drive a controlled system (not shown) through a switch that transfers control between the "Active controller" block and the PID Controller block. The signal tracking feature of the PID Controller block provides smooth operation upon transfer of control from one controller to another, ensuring that the two controllers have the same output at the time of transfer.

Page 81: Documentation

74

6. RESULTS AND CONCLUSIONS:

Page 82: Documentation

75

6.1 Without insertion of D-Statcom

Results of Voltage Sags without insertion of D-Statcom

Fault

Resistance

(inΩ)

Voltage

Sag TPG

fault (in

p.u)

Voltage

Sag DLG

fault (in

p.u)

Voltage

Sag LL

fault (in

p.u)

Voltage

Sag SLG

fault (in

p.u)

0.66 0.9608 0.9656 0.9655 1.001

0.76 0.9662 0.9705 0.9705 1.001

0.86 0.9701 0.9744 0.9745 1.005

From the table, it can be observed that when the value of fault resistance is increased, the voltage sags will also increase for different types of fault.

6.2 With insertion of D-Statcom

Results of Voltage Sags without insertion of D-Statcom

Fault

Resistance

(inΩ)

Voltage

Sag TPG

fault (in

p.u)

Voltage

Sag DLG

fault (in

p.u)

Voltage

Sag LL

fault (in

p.u)

Voltage

Sag SLG

fault (in

p.u)

0.66 0.8164 0.8942 0.8941 0.9928

0.76 0.8226 0.9080 0.9081 0.9928

0.86 0.8430 0.9188 0.9188 0.9928

From the table, it can be observed that voltage sags improved with insertion of D-STATCOM. The value of voltage sags is between (0.8 to 1.0 p.u.)

Page 83: Documentation

76

6.3 Results of Current Harmonic for different types of faults without LCL passive filter:

The above table shows the current harmonic for different types of fault. The percentage of THD shows that it is not within the IEEE STD 519-1992

6.4 Results of Current Harmonic for different types of faults with LCL passive filter:

Type of fault TPG DLG LL SLG

THD-Current 3.05% 1.74% 1.80% 4.46%

The above table shows the current harmonic for different types of fault with LCL passive filter. The percentage of THD shows that it is within the IEEE STD 519-1992.

6.5 CONCLUSION: The simulation results show that the voltage sags can be mitigated by inserting D-STATCOM to the distribution system. By adding LCL Passive filter to D-STATCOM, the THD is reduced within the IEEE STD 519-1992. Thus, it can be concluded that by adding D-STATCOM with LCL filter the power quality is improved.

Type of fault TPG DLG LL SLG

THD-Current 51.23% 65.17% 44.56% 48.69%

Page 84: Documentation

77

7. BIBLIOGRAPHY

1. Applications of DSTATCOM Using MATLAB/Simulation in Power

System- Bhattacharya Sourabh (Recent Journal of Recent Sciences)

2. Power quality enhancement using custom power devices-Arindam

Ghosh,George Ledwich.

3. Smart Grid: Technology and Applications- Janaka Ekanayake

4. Modern Power System Analysis- Nagrath and Kothari.

5. M. F. McGranaghan, D. R. Mueller and M. 3. Samotyj, “Voltage Sags

in Industrial Systems”, IEEE h n s on Industry Applications,Vol. 29,

No. 2, Mar/Apr 1993.

6. Power Electronics- P.S Bhimbhra.