0% found this document useful (0 votes)
130 views55 pages

Modelling and Simulation Lab

This document describes modeling a synchronous machine in MATLAB/Simulink. It provides the equations, parameters, and steps to create a model of the machine, including its electrical and mechanical components. Experiments are also outlined to simulate and analyze the machine's behavior.

Uploaded by

Nobita Nobi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views55 pages

Modelling and Simulation Lab

This document describes modeling a synchronous machine in MATLAB/Simulink. It provides the equations, parameters, and steps to create a model of the machine, including its electrical and mechanical components. Experiments are also outlined to simulate and analyze the machine's behavior.

Uploaded by

Nobita Nobi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 55

Lab Record

of

Modelling and Simulation Lab

Submitted by: Submitted to:


Kartik sharma Dr. Vikas Sharma
18EEBEE031 Assistant Professor and Head
18E1EBEEM40P031

Department of Electrical Engineering

Engineering College Bikaner

Bikaner Technical University, Bikaner (Rajasthan)

May 2021
Engineering College Bikaner
6EE4-24: MODELLING AND SIMULATION LAB

Electrical Engineering VI Sem B. Tech. (BTU)

LAB MANUAL (Prepared by: Dr. Vikas Sharma)

List of Experiments:

1. Simulate Swing Equation in Simulink (MATLAB)

2. Modeling of Synchronous Machine.

3. Modeling of Induction Machine.

4. Modeling of DC Machine.

5. Simulate simple circuits.

6. (a) Modeling of Synchronous Machine with PSS (b) Simulation of

Synchronous Machine with FACTS device.

7. (a) Modeling of Synchronous Machine with FACTS device (b) Simulation

of Synchronous Machine with FACTS devices.

8. FACTS Controller designs with FACT devices for SMIB system.


Objective 1: Simulate Swing Equation in Simulink (MATLAB)

Apparatus required: MATLAB Software.

Theory:
The equation governing rotor motion of a synchronous machine is based on the elementary
principle in dynamics which states that accelerating torque is the product of the moment of
inertia of the rotor times its angular acceleration. In the MKS (meter-kilogram-second) system of
units this equation can be written for the synchronous gene rotor in the form:

d 2 8N
J = Ta = TN − Te N − N
dt 2

Where the symbols have the following meanings:


J = The total moment of inertia of the rotor m asses, in kg-m2
θm = The angular displacement of the rotor with respect to a stationary axis, in mechanical
radians (rad)
t = Time, in seconds (s)
Tm = the mechanical or shaft torque supplied by the prime mover less retarding torque due to
rotational losses, i n N-m:
Te= The net electrical or electromagnetic torque, in N-m
Ta = The net accelerating torque, in N-m.

PROBLEM:

A 20 MVA, 50Hz generator delivers 18MW over a double circuit line to an infinite bus. The
generator has KE of 2.52MJ/MVA at rated speed. The generator transient reactance is
Xd=0.35p.u. Each transmission circuit has R=0 and a reactance of 0.2pu on 20 MVA Base.
|E|=1.1 p.u and infinite bus voltage V=1.0. A three phase short circuit occurs at the midpoint of
one of the transmission lines. Plot swing curves with fault cleared by simultaneous opening of
breakers at both ends of the line at 6.25 cycles after the occurrence of fault. Also plot the swing
curve over the period of 0.5 s if the fault sustained. Solve the swing equation by point-by-point
method theoretically and verify using MATLAB Program. Comment on system stability.
Circuit Diagram (Simulink):

Simulink Output:

(a) Swing curve for machine if fault cleared in 0.3 sec. (b) Swing curve for machine if fault
cleared in 0.5 sec.

MATLAB PROGRAM:

m-file program

Program 1: Save this part in another m-file with name swing.m


%Defining the function swing
function[time ang]=swing(tc)
k=0;v=1;E=1.1;pm=0.9;T=0.5;delT=0.05;ddelta=0;time(1)=0;ang(1)=21.64;xdf=1
.25;xaf=0.55;t=0;
delta=21.64*pi/180;i=2;
m=2.52/(180*50);
while t<T
if t<tc
x=xdf;
else x=xaf;
end
pmax=(E*v)/x;
pa=pm-pmax*sin(delta); ddelta=ddelta+
(delT^2*(pa/m));
delta=(delta*180/pi+ddelta)*(pi/180);
deltadeg=delta*180/pi;
t=t+delT;
time(i)=t;
ang(i)=deltadeg;
i=i+1;
end
end

Program 2: Main program that is dependent on swing.m


%solution of Swing equation by point-by-point method
clc
clear all
close all
for i=1:2
tc=input('enter the value of clearing time:\n');
[time,ang]=swing(tc)
t(:,1)=time;
a(:,i)=ang;
end
plot(t,a(:,1),'*-',t,a(:,2),'d-')
axis([0 0.5 0 inf])
t,a

Inputs to main program:


Enter the value of clearing time as
0.25 sec, and
5 sec
Output:

Precaution:
1. Do not tamper with the settings of software.
2. Study the all observations very carefully.

Result: Simulation of Swing Equation in Simulink (MATLAB) has been done.


References:
1. http://www.mathworks.in/matlabcentral/newsreader/view_thread/23445
2. http://seminarprojects.net/q/simulate-swing-equation-in-simulink-matlab
Viva voice Question:
Q. 1 What is swing equation?
Q. 2 What is equal area criteria?
EXPERIMENT: 2

Object:
Modeling of Synchronous Machine

Description:
The Synchronous Machine block operates in generator or motor modes. The operating mode is
dictated by the sign of the mechanical power (positive for generator mode, negative for motor
mode). The electrical part of the machine is represented by a sixth-order state-space model and
the mechanical part is the same as in the Simplified Synchronous Machine block.
The model takes into account the dynamics of the stator, field, and damper windings. The
equivalent circuit of the model is represented in the rotor reference frame (qd frame). All rotor
parameters and electrical quantities are viewed from the stator. They are identified by primed
variables. The subscripts used are defined as follows:
 d,q: d and q axis quantity
 R,s: Rotor and stator quantity
 l,m: Leakage and magnetizing inductance
 f,k: Field and damper winding quantity
The model equations of the synchronous machine can be written as follows:

Note that this model assumes currents flowing into the stator windings. The measured stator
currents returned by the Synchronous Machine block (Ia, Ib, Ic, Id, Iq) are the currents flowing out
of the machine.
The electrical model of the machine is shown in Fig. 2.1.
Fig. 2.1 Model of synchronous machine
Dialog Box and Parameters-
The various parameters of the synchronous machine available with the MATLAB are described
in this section. In the powerlib library you can choose between three Synchronous Machine
blocks to specify the parameters of the model. They simulate exactly the same synchronous
machine model; the only difference is the way of entering the parameter units in the Parameters
tab.

Configuration Tab-

Fig. 2.2 Parameters of machine

Preset model-
Provides a set of predetermined electrical and mechanical parameters for various synchronous
machine ratings of power (kVA), phase-to-phase voltage (V), frequency (Hz), and rated speed
(rpm).
Select one of the preset models to load the corresponding electrical and mechanical parameters in
the entries of the dialog box. Select No if you do not want to use a preset model, or if you want
to modify some of the parameters of a preset model, as described below.

Fig. 2.3 Parameters of machine


When you select a preset model, the electrical and mechanical parameters in the Parameters tab
of the dialog box become unmodifiable (grayed out). To start from a given preset model and then
modify machine parameters, you have to do the following:
1. Select the desired preset model to initialize the parameters.
2. Change the Preset model parameter value to No. This will not change the machine
parameters. By doing so, you just break the connection with the particular preset model.
3. Modify the machine parameters as you wish, then click Apply.

Mechanical input-
Allows you to select either the torque applied to the shaft or the rotor speed as the Simulink
signal applied to the block's input.
Select Mechanical power Pm to specify a mechanical power input, in W or in pu, and change
labeling of the block's input to PN . The machine speed is determined by the machine Inertia J
(or inertia constant H for the pu machine) and by the difference between the mechanical torque
TN , resulting from the the applied mechanical power Pm, and the internal electromagnetic
torque Te. The sign convention for the mechanical power is the following: when the speed
is positive, a
positive mechanical power signal indicates generator mode and a negative signal indicates motor
mode.
Select Speed w to specify a speed input, in rad/s or in pu, and change labeling of the block's
input to w. The machine speed is imposed and the mechanical part of the model (inertia constant
H) is ignored. Using the speed as the mechanical input allows modeling a mechanical coupling
between two machines and interfacing with SimMechanics and SimDriveline models.
The next figure indicates how to model a stiff shaft interconnection in a motor-generator set,
where both machines are synchronous machines.
The speed output of machine 1 (motor) is connected to the speed input of machine 2 (generator).
In this figure friction torque is ignored in machine 2. Therefore, its electromagnetic torque output
Te corresponds to the mechanical torque Tm applied to the shaft of machine 1. The
corresponding mechanical input power of machine 1 is computed as PN = TN ∗ w. The
Kw
factor takes into account speed units of both machines (pu or rad/s) and gear box ratio w2/w1.
The KT factor takes into account torque units of both machines (pu or N.m) and machine ratings.
Also, as the inertia J2 is ignored in machine 2, J2 referred to machine 1 speed must be added to
machine 1 inertia J1.

Fig. 2.4. Machine model

Rotor type-
Specify rotor type: Salient-pole or Round (cylindrical). This choice affects the number of rotor
circuits in the q-axis (damper windings).

Mask units-
Specifies the units of the electrical and mechanical parameters of the model. This parameter is
not modifiable; it is provided for information purposes only.

Nominal power, voltage, frequency, field current-


The total three-phase apparent power Pn (VA), RMS line-to-line voltage Vn (V), frequency fn
(Hz), and field current ifn (A). The nominal field current is the current that produces nominal
terminal voltage under no-load conditions. This model was developed with all quantities viewed
from the stator. The nominal field current makes it possible to compute the transformation ratio
of the machine, which allows you to apply the field voltage viewed from the rotor, as in real life.
This also allows the field current, which is a variable in the output vector of the model, to be
viewed from the rotor. If the value of the nominal field current is not known, you must enter 0 or
leave it blank. Since the transformation ratio cannot be determined in this case, you have to apply
the field voltage as viewed from the stator and the field current in the output vector is also
viewed from the stator.
Stator-
The resistance Rs (Ω), leakage inductance Lls (H), and d-axis and q-axis magnetizing
inductances Lmd (H) and Lmq (H).

Field-
The field resistance Rf' (Ω) and leakage inductance Llfd' (H), both referred to the stator.

Dampers-
The d-axis resistance Rkd' (Ω) and leakage inductance Llkd' (H), the q-axis resistance Rkq1' (Ω)
and leakage inductance Llkq1' (H), and (only if round rotor) the q-axis resistance Rkq2' (Ω) and
leakage inductance Llkq2' (H). All these values are referred to the stator.

Inertia, friction factor, pole pairs-


The inertia coefficient J (kg.m2), friction factor F (N.m.s), and number of pole pairs p. The
friction torque Tf is proportional to the rotor speed ω (Tf = F.ω, where Tf is expressed in N.m, F
in N.m.s, and ω in rad/s).

Initial conditions-
The initial speed deviation Δω (% of nominal speed), electrical angle of the rotor Θe (degrees),
line current magnitudes ia, ib, ic (A) and phase angles pha, phb, phc (degrees), and the initial
field voltage Vf (V).
You can specify the initial field voltage in one of two ways. If you know the nominal field
current (first line, last parameter), enter in the dialog box the initial field voltage in volts DC
referred to the rotor. Otherwise, enter a zero as nominal field current, as explained earlier, and
specify the initial field voltage in volts DC referred to the stator. You can determine the nominal
field voltage viewed from the stator by selecting the Display Vfd which produces a nominal Vt
check box at the bottom of the dialog box.

Simulate saturation-
Specifies whether magnetic saturation of rotor and stator iron is to be simulated or not.

Saturation parameters-
The no-load saturation curve parameters. Magnetic saturation of stator and rotor iron is modeled
by a nonlinear function (in this case a polynomial) using points on the no-load saturation curve.
You must enter a 2-by-n matrix, where n is the number of points taken from the saturation curve.
The first row of this matrix contains the values of field currents, while the second row contains
values of corresponding terminal voltages. The first point (first column of the matrix) must
correspond to the point where the effect of saturation begins.
You must select the Simulate saturation check box to simulate saturation. This check box
allows you to enter the matrix of parameters for simulating the saturation. If you do not want to
model saturation in your simulation, do not select the Simulate saturation check box. In this
case the relationship between ifd and Vt obtained is linear (no saturation).

Parameters Tab for Synchronous Machine pu Fundamental-


Fig. 2.5. Machine model

Nominal power, line-to-line voltage, and frequency-


Total three-phase apparent power (VA), RMS line-to-line voltage (V), frequency (Hz), and field
current (A).
This line is identical to the first line of the fundamental parameters in SI dialog box, except that
you do not specify a nominal field current. This value is not required here because we do not
need the transformation ratio. Since rotor quantities are viewed from the stator, they are
converted to pu using the stator base quantities derived from the preceding three nominal
parameters.

Initial conditions; Simulate saturation; Saturation parameters-


The same initial conditions and saturation parameters as in the SI units dialog box, but all values
are expressed in pu instead of SI units. For saturation, the nominal field current multiplied by the
d-axis magnetizing inductance and nominal RMS line-to-line voltage are the base values for the
field current and terminal voltage, respectively.
Parameters Tab for Synchronous Machine pu Standard-
Fig. 2.6. Machine model
Nominal power, line-to-line voltage, and frequency-
The same parameters as in the pu Fundamental dialog
box. Reactance-
The d-axis synchronous reactance Xd, transient reactance Xd', and subtransient reactance Xd'',
the q-axis synchronous reactance Xq, transient reactance Xq' (only if round rotor), and
subtransient reactance Xq'', and finally the leakage reactance Xl (all in pu).

d-axis time constants; q-axis time constant(s)-


Specify the time constants you supply for each axis: either open-circuit or short-circuit.

Time constants-
The d-axis and q-axis time constants (all in s). These values must be consistent with choices
made on the two previous lines: d-axis transient open-circuit (Tdo') or short-circuit (Td') time
constant, d-axis subtransient open-circuit (Tdo'') or short-circuit (Td'') time constant, q-axis
transient open-circuit (Tqo') or short-circuit (Tq') time constant (only if round rotor), q-axis
subtransient open-circuit (Tqo'') or short-circuit (Tq'') time constant.

Inertia coefficient, friction factor, pole pairs; Initial conditions; Simulate


saturation; Saturation parameters-
The same parameters as in the pu Fundamental dialog box.

Advanced Tab-

Fig. 2.7. Machine model


Display V†d which produces a nominal Vt-

Select to determine the nominal field voltage viewed from the stator. This parameter is visible
only for the Synchronous Machine SI Fundamental block.

Sample time (-1 for inherited)-


Specifies the sample time used by the block. To inherit the sample time specified in the
Powergui block, set this parameter to -1.

Inputs and Outputs-


The units of inputs and outputs vary according to which dialog box was used to enter the block
parameters. If the fundamental parameters in SI units is used, the inputs and outputs are in SI
units (except for dw in the vector of internal variables, which is always in pu, and angle Θ, which
is always in rad). Otherwise, the inputs and outputs are in pu.
Pm-
The first Simulink input is the mechanical power at the machine's shaft. In generating mode, this
input can be a positive constant or function or the output of a prime mover block (see the
Hydraulic Turbine and Governor or Steam Turbine and Governor blocks). In motoring mode,
this input is usually a negative constant or function.
w
The alternative block input instead of Pm (depending on the value of the Mechanical input
parameter) is the machine speed, in rad/s.
V†
The second Simulink input of the block is the field voltage. This voltage can be supplied by a
voltage regulator in generator mode (see the Excitation System block). It is usually a constant in
motor mode.
If you use the model in SI fundamental units, the field voltage Vf should be entered in volts DC
if nominal field current Ifn is specified or in volts referred to stator if Ifn is not specified. To
obtain the Vfd producing nominal voltage, select the last check box of the dialog box. If you use
the model in pu Standard or in pu Fundamental units, Vf should be entered in pu (1 pu of field
voltage producing 1 pu of terminal voltage at no load).
m
The Simulink output of the block is a vector containing 22 signals. You can demultiplex these
signals by using the Bus Selector block provided in the Simulink library.

Limitations-
When you use Synchronous Machine blocks in discrete systems, you might have to use a small
parasitic resistive load, connected at the machine terminals, in order to avoid numerical
oscillations. Large sample times require larger loads. The minimum resistive load is proportional
to the sample time. As a rule of thumb, remember that with a 25 μs time step on a 60 Hz system,
the minimum load is approximately 2.5% of the machine nominal power. For example, a 200
MVA synchronous machine in a power system discretized with a 50 μs sample time requires
approximately 5% of resistive load or 10 MW. If the sample time is reduced to 20 μs, a resistive
load of 4 MW should be sufficient.

Simulink Model:

Fig. 2.8. Simulink model of synchronous machine


Results:
The model has been simulated and the results obtained are as shown in Fig. 1.9 (a)-(c).

1.02

1.01
Pm (pu)

0.99

0.98
0 0.5 1 1.5 2
time (s)

Fig. 2.9 (a)


The simulation starts from steady state. Observe that the terminal voltage Va is 1.0 p.u. at the
beginning of the simulation. It falls to about 0.4 pu during the fault and returns to nominal
quickly after the fault is cleared. This quick response in terminal voltage is due to the fact that
the Excitation System output Vƒ can go as high as 11.5 pu which it does during the fault. The
speed of the machine increases to 1.01 pu during the fault then it oscillates around 1 p.u. as the
governor system regulates it. The speed takes much longer than the terminal voltage to stabilize
mainly because the rate of valve opening/closing in the governor system is limited to 0.1 pu/s.

0
Va

-1

0 0.2 0.4 0.6 0.8 1

20

10
Vf

-10

0 0.2 0.4 0.6 0.8 1


time (s)
(b)

5
abc

0
I

-5

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7


time (s)

(c)
Fig. 2.9(a-c) Responses of synchronous machine
EXPERIMENT: 3

Object:
Modeling of Induction Machine
Description:
The Asynchronous Machine block operates in either generator or motor mode. The mode of
operation is dictated by the sign of the mechanical torque:
 If Tm is positive, the machine acts as a motor.
 If Tm is negative, the machine acts as a generator.
The electrical part of the machine is represented by a fourth-order state-space model and the
mechanical part by a second-order system. All electrical variables and parameters are referred to
the stator. This is indicated by the prime signs in the machine equations given below. All stator
and rotor quantities are in the arbitrary two-axis reference frame (dq frame). The subscripts used
are defined as follows:

Subscript Definition

d d axis quantity

q q axis quantity

r Rotor quantity

s Stator quantity

l Leakage inductance

m Magnetizing inductance

Electrical System-

Fig. 3.1 Induction machine model


The model equation of the induction machine can be written as follows-
Mechanical System-

The Asynchronous Machine block parameters are defined as follows (all quantities are referred
to the stator):

Parameter Definition

Rs, Lls Stator resistance and leakage inductance

R'r, L'lr Rotor resistance and leakage inductance

Lm Magnetizing inductance

Ls, L'r Total stator and rotor inductances

Vqs, iqs q axis stator voltage and current

V'qr, i'qr q axis rotor voltage and current

Vds, ids d axis stator voltage and current

V'dr, i'dr d axis rotor voltage and current

Te Electromagnetic torque

Tm Shaft mechanical torque

J Combined rotor and load inertia coefficient. Set to infinite to simulate locked rotor.

H Combined rotor and load inertia constant. Set to infinite to simulate locked rotor.

F Combined rotor and load viscous friction coefficient

Dialog Box and Parameters


You can choose between two Asynchronous Machine blocks to specify the electrical and
mechanical parameters of the model, by using the pu Units dialog box or the SI dialog box. Both
blocks are modeling the same asynchronous machine model. Depending on the dialog box you
choose to use, SimPowerSystems™ software automatically converts the parameters you enter
into per unit parameters. The Simulink® model of the Asynchronous Machine block uses pu
parameters.

Configuration Tab

Fig. 3.2 Induction machine model parameters

Preset model-
Provides a set of predetermined electrical and mechanical parameters for various asynchronous
machine ratings of power (HP), phase-to-phase voltage (V), frequency (Hz), and rated speed (rpm).
Select one of the preset models to load the corresponding electrical and mechanical parameters in
the entries of the dialog box. Note that the preset models do not include predetermined
saturation parameters. Select No if you do not want to use a preset model, or if you want to modify
some of the parameters of a preset model, as described below.
When you select a preset model, the electrical and mechanical parameters in the Parameters tab of
the dialog box become unmodifiable (grayed out). To start from a given preset model and then
modify machine parameters, you have to do the following:
1. Select the desired preset model to initialize the parameters.
2. Change the Preset model parameter value to No. This will not change the machine
parameters. By doing so, you just break the connection with the particular preset model.
3. Modify the machine parameters as you wish, then click Apply.

Mechanical input-
Allows you to select either the torque applied to the shaft or the rotor speed as the Simulink signal
applied to the block's input.
Select Torque Tm to specify a torque input, in N.m or in pu, and change labeling of the block's
input to Tm. The machine speed is determined by the machine Inertia J (or inertia constant H for
the pu machine) and by the difference between the applied mechanical torque Tm and the internal
electromagnetic torque Te. The sign convention for the mechanical torque is the following: when
the speed is positive, a positive torque signal indicates motor mode and a negative signal indicates
generator mode.
Select Speed w to specify a speed input, in rad/s or in pu, and change labeling of the block's input
to w. The machine speed is imposed and the mechanical part of the model (Inertia J) is ignored.
Using the speed as the mechanical input allows modeling a mechanical coupling between two
machines and interfacing with SimMechanics™ and SimDriveline™ models.
The next figure indicates how to model a stiff shaft interconnection in a motor-generator set when
friction torque is ignored in machine 2. The speed output of machine 1 (motor) is connected to the
speed input of machine 2 (generator), while machine 2 electromagnetic torque output Te is applied
to the mechanical torque input Tm of machine 1. The Kw factor takes into account speed units of
both machines (pu or rad/s) and gear box ratio w2/w1. The KT factor takes into account torque
units of both machines (pu or N.m) and machine ratings. Also, as the inertia J2 is ignored in
machine 2, J2 referred to machine 1 speed must be added to machine 1 inertia J1.

Fig. 3.3. Mechanical system


Rotor type-
Specifies the branching for the rotor windings.

Reference frame-
Specifies the reference frame that is used to convert input voltages (abc reference frame) to the dq
reference frame, and output currents (dq reference frame) to the abc reference frame. You can
choose among the following reference frame transformations:
 Rotor (Park transformation)
 Stationary (Clarke or αβ transformation)
 Synchronous
The following relationships describe the abc-to-dq reference frame transformations applied to the
Asynchronous Machine phase-to-phase voltages.

In the preceding equations, Θ is the angular position of the reference frame, while is
the difference between the position of the reference frame and the position (electrical) of the
rotor. Because the machine windings are connected in a three-wire Y configuration, there is no
homopolar (0) component. This also justifies the fact that two line-to-line input voltages are used
inside the model instead of three line-to-neutral voltages. The following relationships describe the
dq-to-abc reference frame transformations applied to the Asynchronous Machine phase currents.

Inputs and Outputs-


Tm

The Simulink input of the block is the mechanical torque at the machine's shaft. When the input is
a positive Simulink signal, the asynchronous machine behaves as a motor. When the input is a
negative signal, the asynchronous machine behaves as a generator.
When you use the SI parameters mask, the input is a signal in N.m, otherwise it is in pu.
w
The alternative block input (depending on the value of the Mechanical input parameter) is the
machine speed, in rad/s.
m
The Simulink output of the block is a vector containing 21 signals. You can demultiplex these
signals by using the Bus Selector block provided in the Simulink library. Depending on the type
of mask you use, the units are in SI, or in pu.

The stator terminals of the Asynchronous Machine block are identified by the A, B, and C
letters. The rotor terminals are identified by the a, b, and c letters. Note that the neutral
connections of the stator and rotor windings are not available; three-wire Y connections are
assumed.

Parameters Tab
Fig. 3.4. Induction machine model parameters

Limitations-
1. The Asynchronous Machine block does not include a representation of the saturation of
leakage fluxes. You must be careful when you connect ideal sources to the machine's stator.
If you choose to supply the stator via a three-phase Y-connected infinite voltage source, you
must use three sources connected in Y. However, if you choose to simulate a delta source
connection, you must use only two sources connected in series.
2. When you use Asynchronous Machine blocks in discrete systems, you might have to use a
small parasitic resistive load, connected at the machine terminals, in order to avoid numerical
oscillations. Large sample times require larger loads. The minimum resistive load is
proportional to the sample time. As a rule of thumb, remember that with a 25 μs time step on
a 60 Hz system, the minimum load is approximately 2.5% of the machine nominal power.
For example, a 200 MVA asynchronous machine in a power system discretized with a 50 μs
sample time requires approximately 5% of resistive load or 10 MW. If the sample time is
reduced to 20 μs, a resistive load of 4 MW should be sufficient.

Simulink Model:

Fig. 3.5. Induction machine Simulink model

Results: The model has been simulated and the results obtained are as shown in Fig. 2.6 (a)-(c).
2000

1500

Speed, N (rpm)
1000

500

0
-500
0 0.2 0.4 0.6 0.8 1

(a)

100

50
Te

-50
0 0.2 0.4 0.6 0.8 1
time (s)

(b)

100

50
Ir (pu)

-50

-100
0 0.2 0.4 0.6 0.8 1
100

50
Is (pu)

-50

-100
0
0.2 0.4 0.6 0.8 1
time (s)
Fig. . Responses of the asynchronous machine
MODELLING AND SIMULATION OF THE D.C. MOTOR
USING MATLAB AND LABVIEW

Abstract
One of the most used actuator in control systems is direct current (D.C.) motor. The
general output variable of this actuator can by angular speed or angular displacement motion,
but coupled with wheels or drums and cables, can provide translate motion. This paper
proposes a state-space model of the D.C. motor build for constant flux and considering two
inputs: supply voltage and resistive torque.
The three states of the resulted model are represented by angular speed, angular
displacement and current supply and either of these states can be an output variable for
simulation model. Consequently, the system’s model has two inputs and three outputs.
For the system’s simulate is build a VI where the most important element is a Matlab
script which contains the matrices A, B, C, D of the state-space model, the independent
variable time and the Matlab simulation function lsim. The motor’s parameters are given by
digital controls on the panel so that these parameters can by interactive modified. To generate
inputs, there are used two CASE structures where can by set the inputs variables form:
impulse, step and ramp and here is also possible to set the signal amplitude and duration by
knob or slide control. For setting the matrices’ dimensions there are used TRANSPOSE 2D
ARRAY and INDEX ARRAY.
The output signals are live display one by one or together on the WAVEFORM GRAPH
1. Introduction
Students can use the model and the VI in the classroom to have a full realization of a
D.C. motor running and also how to use the latter into a control loop. As a starter, based on a
functionally structure of the D.C. motor and on the laws of physics and electricity that rule the
variable magnetic flux density (separate excitation) motor’s operation, students build the
mathematical model of this. Afterwards, using the mathematical model in a series of
simulation experiments in LabView, the students can notice the behavior of the motor
dynamics. For that, it is necessary to build the simulation VI and students must analyze the
diagram bloc of the VI to observe the component subdiagrams with adequate functionality of
these.
As input signal, it’s possible to select various forms for supply voltage and/or resistive
torque so that the form of the outputs above-mentioned can be observed. These forms of the
output can suggest the design of the control loop or the type of the controller used. Also, for
every input signal, students can observe the effect of the parameters’ variation of the D.C.
motor over the outputs.
R L 1. Functionally equations
of the D.C. motor
iS e ω(t) m(t) We’ll be considered a direct
s Re Le current (D.C.) electric motor with
v DCM separate excitation, compensating
iE (Φ) winding and commutating pole.
uE This machine structure is presenting
rT(t)
in fig.1. where:
vS, iS – supply voltage and current;
uE, iE – excitation voltage and
Fig.1. D.C. Motor functionally structure current;
R, L – winding electric resistance and inductance;
φ(t) – excitation flux;
e(t) – back electromotive force;
ω(t) – angular speed;
m(t) – electromagnetic torque;
rT(t)- restoring torque.
Applying Kirchhoff voltage theorem on supply circuit we have:

vS (t )  e(t )  R di
(t )  L  a (1)
 ia (t )
dt
Torques equilibrium equation on the axis of motor is:

mt  = mT t   fT t   rT t 
(2)
where mT(t) is motoring torque and that is dependent on moment of inertia of the rotor and
fT(t) is motor friction torque.
Now torques equilibrium equation can be writing:
d(t )
m(t )  J   F  (t
(t (3)
)r )
T
dt
Is known that electromagnetic torque is dependent on the excitation flux in excitation
winding and on the supply current by armature constant kt which in SI units (which we will
use) is equal to motor constant ke (kt = ke = k), i.e.:

m(t )  k  (t )  iS (t ) (4)
and also back electromotive force is dependent on the angular speed and on the excitation flux
in excitation winding by motor constant k, i.e.:
e(t) = k  (t )  (t)
(5)
Relations (1), (3), (4) and (5) are functionally analytical equations i.e. general
mathematical model of the D.C. electrical motor.
Considering the angular displacement α(t) instead of angular speed ω(t) like output
variable is necessary to include the relationship between these:
d(t )
(t ) 
dt (6)

The D.C. motor angular speed control is achieve by two methods namely constant flux
and variable flux and in this paper is considering the speed control by constant flux.
2. Constant flux simulation model
If the excitation flux is considering constant insert the notation:
k   Km (7)
into general mathematical model of the D.C. electrical motor. Now it can build the
mathematical in state-space form so that is possible to use it into Matlab program simulation.
Substituting equations (4) and (5) and notation (7) into equations (1) and (3) result
complete model by constant flux D.C. motor, respectively:
dia (t ) 1 R Km
 v (t )  (t) )  (t )
i
dt L S L S (8)
L
d(t ) F K 1
  (t )  m  i (t )  (t )
m
dt J J
a
J
L
To build the state-space model bring in this mathematical model the input, state and
output vectors i.e.:
 state vector x(t) whose components is represented by supply current iS(t), angular
displacement α(t) and angular speed ω(t):
iS (t )
x(t )  (t ) (9)
(t )
 input vector u(t) whose components is represented by supply voltage vS(t) and load
torque mL(t), i.e.:
vS (t
u(t )  (10)
)
mL (t
)
 output vector y(t) whose components we consider that is the same with state vector
components so that is possible to simulate these three physical quantities.
Having these vectors is possible to write equations (8) in matrix form:

˙ (t ) 1
iS 0  iS (t 0
R Km L v (t )
)
L L 0
˙ (t ) 0 0 1   (t ) 0 0  S (11)
 0   1 mL (t
Km F  )
˙ (t ) J (t ) J
J
Act on systems general equations this form can write in compact
form:
(12)
x˙ (t )  A  x(t )  B  u(t )
where A and B are constants
matrix:
Km 1 0
R 0 
L L
L 0 1 ; B 00 (13)
A 0 0 F 
1
K J 0 J
m
Bring on output vector definition the input-output equation can write in matrix form:
J
1 0 0 i (t 0 0 v (t )
S
)
y (t )  0 1 0   (t )  0 (14)
0
S

0 0 1 (t mL (t )
0 0
)
or in compact form:

where:
y(t)= C ⋅ x(t) + D ⋅u(t)

1
0 0 0 0
C0
1 0 D0 0 (16)
0 ;
0 0
0 1
Now we have the matrix A, B, C, D and we can use the function lsim whence has the
form:
y = lsim (A , B, C, D, v, t) (17)
where vector t specifies the time samples for the simulation and consists of regularly spaced
time samples t to simulate the D.C. motor like an LTI system.
3. Build the VI to simulate D.C. motor in LabView
The control panel and bloc diagram of the VI used to simulate D.C. motor are
presented in fig.2.

Fig.2. Front panel and bloc diagram of the simmot.vi


The base element of the LabView program named simmot.vi whence is used to
simulation D.C. motor working is the Matlab script node. Through this, is insert into LabView
program the matrix A, B, C, D of the motor state-space model and the simulation function
also (fig.3).

Fig.3. Matlab script node and parameters


controls The motor constructive parameters
R, L, Km, F and J represent also the model
parameters and these are sets by controls
placed on front panel named with the same letters like mentioned parameters. For the
respectively controls are chosen the steps of values corresponding to the real values of these
parameters. The values set by these controls represent the inputs for script node with real data
type.
Because the input vector has two components for generate the right signals are build
two blokes on the front panel. These two blokes are represented in diagram bloc by CASE
structure, each with three subdiagrams, which generates the standard signals i.e. IMPULSE,
STEP and RAMP. Subdiagrams contain respectively Impulse Pattern.vi, Pulse Pattern.vi and
Ramp Pattern.vi and these are shifting by corresponding controls and also from the control
panel are setting the parameters like amplitude, width (given by START TIME end STOP
TIME), delay (given by START TIME) using for this knob or slide control (fig.4).
With the two arrays contain the input pattern using BUIL ARRAY node it can obtain a
new array that has values arranged by rows form and represent for real system the input
signals and for graphic representation of these it can use a graphic display WAVEFORM
Fig.4. Generation of input
GRAPH type. Necessary form signals
for input vector require a transpose array so that obtain a
vector arranged by two columns and for realize that it can use TRANSPOSE 2D ARRAY
node that rearranges the elements of 2D array such that 2D array [i, j] becomes transposed
array [j, i]. Similarly the same node it using at output of the Matlab script node because the
output vector of this node must row type and must have three columns that correspond to the
three output signals. The input and the output terminals of the Matlab script node
corresponding to the input and output signals must be Real Matrix type.

Fig.5. Data representation of input


signals

Fig.6. Data representation of output


signals
The inputs and the outputs signals have different form and different values range too
(fig.5, fig.6) so that to display using the AutoScale option of the WAVEFORM GRAPH
display is necessary a selection of these signals. To do that is used INDEX ARRAY nodes on
the input and on the output too. The right signal is selected setting the index input of these
nodes, by corresponding push button on front panel, such as to display signal in the same with
connexion this to the Matlab scrip input.
To right course of the simulation program is necessary that number of samples of the
vector t that represent simulation time in Matlab must be the same with the number of
samples of the signal generation pattern. To do that, in Matlab script, the vector t that specifies
the time samples for the simulation has 5/0.01+1=501 components and is necessary that the
number of samples of the Ramp Pattern must be 501, too. For Stop Time control, Relative
time (seconds) for Format & Precision option is to be chosen.
4. Conclusions
The Matlab lsim function simulates the (time) response of continuous or discrete linear
systems to arbitrary inputs and lsim (sys, u, t) produces a plot of the time response of the LTI
model sys to the input time history. If this function is used into a Matlab simulation program
additive like Matlab scrip into a LabView program named Virtual Instrument (VI) the input u
can be produce by a different signal generation function in VI.
LabVIEW launches Matlab and if used the plot (t,y) instruction after lsim instruction
into Matlab script, a new Matlab window appears, labeled Figure No. 1, that displays the
graphical responses of the D.C. motor outputs. In fig.7, the similarity between both LabView
and Matlab results can be observed.

Fig.7. Data representation of output signals in LabView and Matlab


Through the instrumentality of controls placed on front panel of the VI it can settings
the model parameters and the input signals parameters too. For example, as shown in fig.6,
where load torque has a significant value, negative values appear for displacement and speed
outputs. This means that the motor axle starts spinning the other way around.
Also, because LabView is a data acquisition dominant program is possible to make
comparison between data acquired from a real system and data obtained from mathematical
model of this system.
5. Bibliography
1. Fransua, A. Masini si actionari electrice
Ed. Tehnica, Bucuresti, 1986
2. Ghinea, M. Matlab. Calcul numeric-grafica
Ed. Teora, Bucureşti, 1997
3. Matko D., Simulation and Modelling of Continuous
System Karba R., Prentice Hall, New York, 1992
4. Patrascoiu, N. Modelarea şi simularea sistemelor
Ed. Focus, Petroşani, 2001
5. * * * LabVIEW. User
Manual National
Instruments
6. * * * MATLAB® Release 11.
Documentation Set
http://www.mathworks.com/support/

Nicolae Patrascoiu is Associate Professor in Engineering. He teaches Data Acquisition


and Control System at the Automatic and Industrial Informatics Department at the University
of Petrosani, Romania. He shows a particular interest in the links between Data Acquisition
and Modeling and Simulation Systems.
EXPERIMENT
:5
Object:

Simulate simple circuits using MATLAB

Creating a Simple Model


Before you can begin building your model, you must start Simulink and create an empty model.
To create a new model:
1. If Simulink is not running, enter simulink in the MATLAB Command Window to open
the Simulink Library Browser.
2. Select File > New > Model in the Simulink Library Browser to create a new model.
The software opens an empty model window.

Adding Blocks to Your Model


To construct a model, you first copy blocks from the Simulink Library Browser to the model
window. To create the simple model in this chapter, you need four blocks:
 Sine Wave — To generate an input signal for the model
 Integrator — To process the input signal
 Scope — To visualize the signals in the model
 Mux — To multiplex the input signal and processed signal into a single
scope To add blocks to your model:
1. Select the Sources library in the Simulink Library Browser.
The Simulink Library Browser displays the Sources library.

2. Select the Sine Wave block in the Simulink Library Browser, then drag it to the model
window. A copy of the Sine Wave block appears in the model window.
3. Select the Sinks library in the Simulink Library Browser.
4. Select the Scope block from the Sinks library, then drag it to the model window.
A Scope block appears in the model window.
5. Select the Continuous library in the Simulink Library Browser.
6. Select the Integrator block from the Continuous library, then drag it to the model
window.
An Integrator block appears in the model window.
7. Select the Signal Routing library in the Simulink Library Browser.
8. Select the Mux block from the Sinks library, then drag it to the model window.
A Mux block appears in the model window.

Moving Blocks in the Model Window


Before you connect the blocks in your model, you should arrange them logically to make the
signal connections as straightforward as possible.
To move a block in the model window, you can either:
 Drag the block.
 Select the block, then press the arrow keys on the keyboard.
Arrange the blocks in the model to look like the following figure.
Connecting Blocks in the Model Window
After you add blocks to the model window, you must connect them to represent the signal
connections within the model.
Notice that each block has angle brackets on one or both sides. These angle brackets represent
input and output ports:
 The > symbol pointing into a block is an input port.
 The > symbol pointing out of a block is an output port.

The following sections describe how to connect blocks by drawing lines from output ports to
input ports:
 Drawing Lines Between Blocks
 Drawing a Branch Line

Drawing Lines between Blocks


You connect the blocks in your model by drawing lines between output ports and input ports.
To draw a line between two blocks:
1. Position the mouse pointer over the output port on the right side of the Sine Wave
block. Note that the pointer changes to a crosshairs (+) shape while over the port.

2. Drag a line from the output port to the top input port of the Mux block.
Note that the line is dashed while you hold the mouse button down, and that the pointer changes
to a double-lined crosshairs as it approaches the input port of the Mux block.

3. Release the mouse button over the output port.


The software connects the blocks with an arrow that indicates the direction of signal flow.

4. Drag a line from the output port of the Integrator block to the bottom input port on the
Mux block.
The software connects the blocks.
5. Select the Mux block, then Ctrl+click the Scope block.
The software automatically draws the connection line between the blocks.

The model should now look similar to the following figure.

Drawing a Branch Line


The model is almost complete, but one connection is missing. To finish the model, you must
connect the Sine Wave block to the Integrator block.
This final connection is somewhat different from the other three, which all connect output ports
to input ports. Because the output port of the Sine Wave block already has a connection, you
must connect this existing line to the input port of the Integrator block. The new line, called a
branch line, carries the same signal that passes from the Sine Wave block to the Mux block.
To weld a connection to an existing line:
1. Position the mouse pointer on the line between the Sine Wave and the Mux block.

2. Press and hold the Ctrl key, then drag a line to the Integrator block's input port.

The software draws a line between the starting point and the input port of the Integrator block.
The model is now complete. It should look similar to the following figure.

Saving the Model


After you complete the model, you should save it for future use.
To save the model:
1. Select File > Save in the model window.
2. Specify the location in which you want to save the model.
3. Enter simple_model in the File name field.
4. Click Save.
The software saves the model with the file name simple_model.mdl.
EXPERIMENT: 7 (Included Exp. No. 6)

Object:

(a) Modelling of Synchronous Machine with FACTS device (b) Simulation of Synchronous
Machine with FACTS devices.

UPFC (Detailed Model):


Model Description-
A Unified Power Flow Controller (UPFC) is used to control the power flow in a 500 kV
transmission system. The UPFC located at the left end of the 75-km line L2, between the 500 kV
buses B1 and B2, is used to control the active and reactive powers flowing through bus B2 while
controlling voltage at bus B1. It consists of two 100-MVA, three-level, 48-pulse GTO-based
converters, one connected in shunt at bus B1 and one connected in series between buses B1 and
B2. The shunt and series converters can exchange power through a DC bus. The series converter
can inject a maximum of 10% of nominal line-to-ground voltage (28.87 kV) in series with line
L2.
This pair of converters can be operated in three modes:
 Unified Power Flow Controller (UPFC) mode, when the shunt and series converters are
interconnected through the DC bus. When the disconnect switches between the DC buses
of the shunt and series converter are opened, two additional modes are available:
 Shunt converter operating as a Static Synchronous Compensator (STATCOM)
controlling voltage at bus B1
 Series converter operating as a Static Synchronous Series Capacitor (SSSC)
controlling injected voltage, while keeping injected voltage in quadrature with current.
The mode of operation as well as the reference voltage and reference power values can be
changed by means of the “UPFC GUI” block.
The principle of operation of the harmonic neutralized converters is explained in another demo
entitled “Three-phase 48-pulse GTO converter”. This demo (power_48pulsegtoconverter.mdl) is
accessible in the Power Electronics Models library of demos. When the two converters are
operated in UPFC mode, the shunt converter operates as a STATCOM. It controls the bus B1
voltage by controlling the absorbed or generated reactive power while also allowing active
power transfer to the series converter through the DC bus. The reactive power variation is
obtained by varying the DC bus voltage. The four three-level shunt converters operate at a
constant conduction angle (Sigma= 180-7.5 = 172.5 degrees), thus generating a quasi-sinusoidal
48-step voltage waveform. The first significant harmonics are the 47th and the 49th.
When operating in UPFC mode, the magnitude of the series injected voltage is varied by varying
the Sigma conduction angle, therefore generating higher harmonic contents than the shunt
converter. As illustrated in this demo, when the series converter operates in SSSC mode it
generates a “true” 48-pulse waveform.
The natural power flow through bus B2 when zero voltage is generated by the series converter
(zero voltage on converter side of the four converter transformers) is P=+870 MW and Q=-70
Mvar. In UPFC mode, both the magnitude and phase angle and the series injected voltage can be
varied, thus allowing control of P and Q. The UPFC controllable region is obtained by keeping
the injected voltage to its maximum value (0.1 pu) and varying its phase angle from zero to 360
degrees. To see the resulting P-Q trajectory, double click the “Show UPFC Controllable
Region”. Any point located inside the PQ elliptic region can be obtained in UPFC mode.

Fig. 7.1. Simulink model of UPFC


Demonstration
1. Power control in UPFC mode
Open the UPFC GUI block menu. The GUI allows you to choose the operation mode (UPFC,
STATCOM or SSSC) as well as the Pref/Qref reference powers and/or Vref reference voltage
settings. Also, in order to observe the dynamic response of the control system, the GUI allows
you to specify a step change of any reference value at a specific time.

10
P, Pref (pu)

9.5

8.5

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8

1
Q (pu)

0
Q, ref

-1

-2
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
time (s)

1200

1000
P L1 L2 L3

800

600
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8

100

0
Q L1 L2 L3

-100

-200
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
time (s)

Fig. 7.2. Simulation Results (UPFC Mode), Power Control Mode


Make sure that the operation mode is set to “UPFC (Power Flow Control)”. The reference active
and reactive powers are specified in the last two lines of the GUI menu. Initially, Pref= +8.7
pu/100MVA (+870 MW) and Qref=-0.6 pu/100MVA (-60 Mvar). At t=0.25 sec Pref is changed
to +10 pu (+1000MW). Then, at t=0.5 sec, Qref is changed to +0.7 pu (+70 Mvar). The reference
voltage of the shunt converter (specified in the 2nd line of the GUI) will be kept constant at
Vref=1 pu during the whole simulation (Step Time=0.3*100> Simulation stop time (0.8 sec).
When the UPFC is in power control mode, the changes in STATCOM reference reactive power
and in SSSC injected voltage (specified respectively in 1st and 3rd line of the GUI) as are not
used.
Run the simulation for 0.8 sec. Open the “Show Scopes” subsystem. Observe on traces 1 and 2
of the UPFC scope the variations of P and Q. After a transient period lasting approximately 0.15
sec, the steady state is reached (P=+8.7 pu; Q=-0.6 pu). Then P and Q are ramped to the new
settings (P=+10 pu Q=+0.7 pu). Observe on traces 3 and 4 the resulting changes in P Q on the
three transmission lines. The performance of the shunt and series converters can be observed
respectively on the STATCOM and SSSC scopes. If you zoom on the first trace of the
STATCOM scope, you can observe the 48-step voltage waveform Vs generated on the secondary
side of the shunt converter transformers (yellow trace) superimposed with the primary voltage
Vp (magenta) and the primary current Ip (cyan). The dc bus voltage (trace 2) varies in the 19kV-
21kV range. If you zoom on the first trace of the SSSC scope, you can observe the injected
voltage waveforms Vinj measured between buses B1 and B2.

2. Var control in STATCOM mode


In the GUI block menu, change the operation mode to “STATCOM (Var Control)”. Make sure
that the STATCOM references values (1st line of parameters, [T1 T2 Q1 Q2]) are set to [0.3 0.5
+0.8 -0.8 ]. In this mode, the STATCOM is operated as a variable source of reactive power.
Initially, Q is set to zero, then at T1=0.3 sec Q is increased to +0.8 pu (STATCOM absorbing
reactive power) and at T2=0.5 sec, Q is reversed to -0.8 pu (STATCOM generating reactive
power).
Run the simulation and observe on the STATCOM scope the dynamic response of the
STATCOM. Zoom on the first trace around t=0.5 sec when Q is changed from +0.8 pu to -0.8
pu. When Q=+0.8 pu, the current flowing into the STATCOM (cyan trace) is lagging voltage
(magenta trace), indicating that STATCOM is absorbing reactive power. When Qref is changed
from +0.8 to -0.8, the current phase shift with respect to voltage changes from 90 degrees
lagging to 90 degrees leading within one cycle. This control of reactive power is obtained by
varying the magnitude of the secondary voltage Vs generated by the shunt converter while
keeping it in phase with the bus B1 voltage Vp. This change of Vs magnitude is performed by
controlling the dc bus voltage. When Q is changing from +0.8 pu to -0.8 pu, Vdc (trace 3)
increases from 17.5 kV to 21 kV.

2
V , V , pI (pu)

0
p
s

-2

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8


4
x 10
4
3
Vdc (V)

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
time (s)

Fig. 7.3. Simulation Results (STATCOM Mode)

0.5
Q (pu)

0
Q, ref

-0.5

-1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8

1.005
Vmeas, Vref (pu)

0.995

0.99
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
time (s)

Fig. 7.4. Simulation Results (STATCOM Mode)


3. Series voltage injection in SSSC mode
In the GUI block menu change the operation mode to “SSSC (Voltage injection)”. Make sure
that the SSSC references values (3rd line of parameters) [Vinj_Initial Vinj_Final StepTime] ) are
set to [0.0 0.08 0.3 ]. The initial voltage is set to 0 pu, then at t=0.3 sec it will be ramped to 0.8
pu.
Run the simulation and observe on the SSSC scope the impact of injected voltage on P and Q
flowing in the 3 transmission lines. Contrary to the UPFC mode, in SSCC mode the series
inverter operates with a constant conduction angle (Sigma= 172.5 degrees). The magnitude of
the injected voltage is controlled by varying the dc voltage which is proportional to Vinj (3rd
trace). Also, observe the waveforms of injected voltages (1st trace) and currents flowing through
the SSSC (2nd trace). Voltages and currents stay in quadrature so that the SSSC operates as a
variable inductance or capacitance.

0.1
Vinj, Vref (pu)

0.05

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
4

x 10
2
1.5
Vdc (V)

0.5

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
time (s)
1400

P L1 L2 L3 (MW)
1200

1000

800

600
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8

20
Q L1 L2 L3 (MVar)

-20
-40

-60

-80
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
time (s)

Fig. 7.5. Simulation Results (SSSC Mode)


EXPERIMENT: 8
Object:

FACTS Controller designs with FACT devices for SMIB system

Description:
Circuit Description-

A 100-Mvar STATCOM regulates voltage on a three-bus 500-kV system. The 48-pulse


STATCOM uses a Voltage-Sourced Converter (VSC) built of four 12-pulse three-level GTO
inverters. Look inside the STATCOM block to see how the VSC inverter is built. The four sets
of three-phase voltages obtained at the output of the four three-level inverters are applied to the
secondary windings of four phase-shifting transformers (-15 deg., -7.5 deg., 7.5 deg., +7.5 deg.
phase shifts). The fundamental components of voltages obtained on the 500 kV side of the
transformers are added in phase by the serial connection of primary windings. Please refer to the
"power_48pulsegtoconverter" demo to get details on the operation of the VSC.

Fig. 8.1. STATCOM (Detailed Model)


During steady-state operation the STATCOM control system keeps the fundamental component
of the VSC voltage in phase with the system voltage. If the voltage generated by the VSC is
higher (or lower) than the system voltage, the STATCOM generates (or absorbs) reactive power.
The amount of reactive power depends on the VSC voltage magnitude and on the transformer
leakage reactances. The fundamental component of VSC voltage is controlled by varying the DC
bus voltage. In order to vary the DC voltage, and therefore the reactive power, the VSC voltage
angle (alpha) which is normally kept close to zero is temporarily phase shifted. This VSC voltage
lag or lead produces a temporary flow of active power which results in an increase or decrease of
capacitor voltages.
One of the three voltage sources used in the 500 kV system equivalents can be be varied in order
to observe the STATCOM dynamic response to changes in system voltage. Open the
"Programmable Voltage Source" menu and look at the sequence of voltage steps which are
programmed.

Demonstration:
Dynamic response of the STATCOM-

Run the simulation and observe waveforms on the STATCOM scope block. The STATCOM is
in voltage control mode and its reference voltage is set to Vref=1.0 pu. The voltage droop of the
regulator is 0.03 pu/100 VA.Therefore when the STATCOM operating point changes from fully
capacitive (+100 Mvar) to fully inductive (-100 Mvar) the STATCOM voltage varies between 1-
0.03=0.97 pu and 1+0.03=1.03 pu.
2

Va, Ia Prim
0

-1

-2
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

100

5 0
Q (Mvar)

-5 0

-100
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4
time (s)

Fig. 8.2. Simulation results


Initially the programmable voltage source is set at 1.0491 pu, resulting in a 1.0 pu voltage at
SVC terminals 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 is suddenly decreased by 4.5 % (0.955 pu of nominal voltage). The SVC reacts by
generating reactive power (Q=+70 Mvar) in order to keep voltage at 0.979 pu. The 95% settling
time is approximately 47 ms. At this point the DC voltage has increasded to 20.4 kV. Then, at
t=0.2 s the source voltage is increased to1.045 pu of its nominal value. The SVC reacts by
changing its operating point from capacitive to inductive in order 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.
1.05

Vm, Vref (pu)


1

0.95
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4
4

2.4 x 10

2.2
Vdc (V)

1.8

1.6
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4
time (s)

Fig. 8.3. Simulation results


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

How to Regenerate Initial Conditions-


The initial states required to start this demo in steady state have been saved in the
"power_statcom_gto48p.mat" file. When you open this demo, the InitFcn callback (in the Model
Properties/Callbacks) automatically loads into your workspace the contents of this .mat file
("xInitial" variable).
If you modify this model, or change parameter values of power components, the initial
conditions stored in the "xInitial" variable will no longer be valid and Simulink will issue an
error message. To regenerate the initial conditions for your modified model, follow the steps
listed below:
1. In the Simulation/Configuration/Data Import/Export Parameters menu, uncheck the
"Initial state" parameter and check the "Final states" parameter.
2. In the Programmable Voltage Source menu, disable the source voltage steps by setting
the "Time variation of " parameter to "none".
3. Make sure that the Simulation Stop Time is 0.4 second. Note that in order to generate
initial conditions coherent with the 60 Hz voltage source phase angles, the Stop Time
must an integer number of 60 Hz cycles.
4. Start simulation. When simulation is completed, verify that steady state has been reached
by looking at waveforms displayed on the scope. The final states which have been saved
in the "xFinal" structure with time can be used as initial states for future simulations.
Executing the next two commands copies these final conditions in "xInitial" and saves
this variable in a new file (myModel_init.mat).
5. >> xInitial=xFinal;
6. >> save myModel_init xInitial
7. In the File/Model Properties/Callbacks/InitFcn window, change the name of the
initialization file from "power_statcom_gto48p.mat" to "myModel_init.mat". Next time
you open this model, the variable xInitial saved in the myModel_init.mat file will be
loaded in your workspace.
8. In the Simulation/Configuration Parameters menu, check "Initial state".
9. Start simulation and verify that your model starts in steady-state.
10. In the Programmable Voltage Source menu, set the "Time variation of" parameter back to
"Amplitude".
11. Save your Model.

You might also like