Escolar Documentos
Profissional Documentos
Cultura Documentos
1.1
SimPowerSystems
Models
GENERAL CHARACTERISTICS
MATLAB is a programming language that has been developed for resolving technical problems. The graphical programming language Simulink is included in
MATLAB and is intended for the simulation of dynamic systems. It uses MATLAB
as a computational engine and therefore enables the use of MATLAB algorithms
and sends simulation results to MATLAB for further analysis. Simulink contains the
vast nomenclature of the blocks that model the blocks, devices, and units of the real
dynamic systems; when the system model is developed, the proper blocks are carried
from the Simulink library to the model block diagram and are connected according
to their functions.
The great merit of MATLAB/Simulink is the possibility to utilize the toolboxes that
are intended for certain branches of science and engineering. Their employment makes
the investigation of the systems, which they are meant for, easier and faster.
Electrotechnical systems are very complex for full analysis of steady states and
transients; therefore, simulation is the only reasonable method. The blocks, devices,
and units that form the electrotechnical system have a very complex intrinsic structure; the employment of Simulink blocks for building an appropriate model demands
from the staff developing this model in-depth knowledge about the device structure
and processes in them. The set of the SimPowerSystems blocks [1] contains the models of rather complex but standard devices and units, whose fields of application are
production, transmission, transformation, and utilization of the electric power, the
electrical drives, and the power electronics. Evidently, renewable sources of electrical energy belong to these types of systems, and SimPowerSystems can be successfully used for their creation, simulation, and investigation.
The first step in the simulation is the creation of a model diagram consisting of
the separate blocks of Simulink and SimPowerSystems. The terminals of Simulink
blocks are designated as >; the connecting lines transmit the directional signals.
The terminals of the blocks of SimPowerSystems are the electrical line; they transmit the electrical power in both directions and are designated as . The terminals
of these two types cannot be connected with one another. For that, the blocks of
SimPowerSystems that interact with the Simulink blocks have the special terminals,
designated as > as well. Moreover, the special blocks are in the SimPowerSystems
that convert the quantities of SimPowerSystems in the signals that are available for
Simulink blocks and, on the contrary, convert the Simulink signals in the voltages
and currents for SimPowerSystems.
Before the simulation start, the block parameters must be specified in the block dialog boxes. They can be given as numerical values or letters, which are determined either
1
Va Vb
Va Vb
=
= ( Va Vb ) Y,
Z
R + jL j /C
(1.1)
(1.2)
If not the maximal but the effective (root-mean-square) values are used for phasors, the multiplier 0.5 drops out. For more details about phasor employment, one
can read, for example, in the work of Dorf and Svoboda [2].
When calculations are executed with the Phasor simulation method, it is not the
instantaneous values of the voltages and the currents that are found, but their phasors
that are coupled by the relationship in Equation 1.1. At this, the differential equations
are replaced by the algebraic ones; the rapid proceeding processes are neglected.
This method is used, mainly, under the study of electromechanical oscillations in the
power systems, which contain many generators and motors, but gives the decision on
one certain frequency. For simulation in this mode, the option Phasor is selected in
Powergui, with the indication of the frequency (50 Hz for our systems).
SimPowerSystems Models
0.5
0.55
50
0
50
0.45
(b)
FIGURE 1.1
0.5
t (s)
0.55
Explanation of the difference between (a) discrete and (b) Phasor modes.
Independent
sources
u1
dx/dt = Ax + Bu
y = Cx + Du
u2
FIGURE 1.2
yv
Nonlinear
blocks
very large and does not affect the simulation results. However, under the simulation
of the alternating current generators, whose windings are connected in series with the
inductors, cases have often occurred where the simulation process stopped when the
resistance was not chosen to be sufficiently low. In order to make simulation possible,
there are two ways: either to decrease the resistance or to decrease the sampling time.
Under the first choice, the power loss in the resistor can distort the real power distribution, and under the second choice, the simulation time increases impermissibly. These
problems will be considered in the following chapters when required.
A number of commands are included in the SimPowerSystems that are executed
from the Command window. As a result, information appears that can be useful for
experienced users to gain more knowledge about the model, but, in principle, to know
them is not obligatory. Therefore, only one command is given here; its execution gives
the opportunity to better understand the model structure; the matrixes A, B, C, and
D of the linear part that are formed under this command can be used for subsequent
analysis, for instance, with the employment of the Control System Toolbox.
The command appears as
[A,B,C,D,x0,electrical_states,inputs,outputs] =
power_analyze('sys'),
where sys is the name of the considered model. It computes the equivalent space
system of the model and estimates the matrixes A, B, C, and D in the standard form:
dx
= Ax + Bu, y = Cx + Du .
dt
(1.3)
The state variables in the vector x are the inductance currents and capacitor voltages. The nonlinear elements are the current sources that are controlled by voltages.
The inputs in the vector u are the voltage and current sources and the currents from
the nonlinear elements. The output vector y contains the measured voltages and currents and the voltages across the nonlinear elements. The breakers, switches, and the
devices of power electronics are supposed to be open.
The simple model Example2 is depicted in Figure 1.3. This model has three state
variables: the currents in branches 1 and 2 and the voltage across the capacitor in
branch 1. The outputs are the measured current and the voltage across the breaker.
SimPowerSystems Models
Branch 1
Source
100 V
50 Hz
FIGURE 1.3
Current
t = 0.1 s
Current
measurement
c
1
Breaker
Branch 2
The inputs are the source voltage and the breaker current. Executing the given command with sys = example2 results in the following:
A = 1.0e+04 *
-0.8375 -0.0008 0.8333
1.0000
0
0
1.0000
0
-1.0120
B = 1.0e+04 *
0.8333
0.0008
0
0
-1.0000
0
C = 1000
1
0
0
D = -1000
0
0
0
-1000
-1
x0 = -1.3765
-64.9571
-1.4214
electrical_states = 'Il_Branch1' 'Uc_Branch1' 'Il_Branch2'
inputs = 'I_Breaker' 'U_Source'
outputs = U_Breaker I_Current Measurement
The simulation of the renewable electrical sources has a peculiarity that they almost
always utilize the devices of the power electronics; it results in very little sampling
timenot more than 510 s. But the transient processes in such systems last minutes
or dozens of minutes, demanding an enormous time for the full simulation. Therefore,
it is necessary to take a number of simplifications under their investigations, including
(not all simultaneously) neglecting the processes of the initial setting; neglecting the
torsional elasticity; modeling by parts; decreasing the time constants of the mechanical, thermal, and chemical processes in comparison with actual values; and so on.
1.2
FIGURE 1.4
SimPowerSystems Models
the inner resistances of the switches and the devices of the power electronics equal to
zero, and to take the forward voltages of the power electronics devices equal to zero.
Moreover, the opportunity appears to show the system differential equations in the
Command window or in the window Diagnostic Viewer. When the discrete method
of simulation or the Phasor method is selected, the sampling time or the frequency
must be specified in the emerging lines, respectively.
The field Load Flow contains a number of lines for the specification of the parameters that can be used under the computation of the load flow for the model (see further): the frequency, the base power, the tolerance under the solution of the nonlinear
equations with the approximating method, and so on. The field Preferences has four
lines; the selection of three of them gives the opportunity to receive some messages
about the model operation and to use the special function in the Acceleration mode
(the utilization of this function often makes the simulation slower, and it is not considered here). In the last line, the initial conditions for the simulation are defined.
There are three opportunities: Blocks, Steady, and Zero. In the first case, the initial
conditions are defined in the model blocks; in the second one, they are taken equal to
the steady-state values; and they are equal to zero in the third case.
Furthermore, the available analysis tools are listed. The item Steady-State
Voltages and Currents gives the possibility to find the steady-state values of the
variables in the vectors x, u, and y that were mentioned in Section 1.1. The window
for the model depicted in Figure 1.3 is displayed in Figure 1.5. The opportunity is to
FIGURE 1.5
select for the display of only the part of the variables: states, measurements, sources,
inputs, and outputs of the nonlinear elements.
The item Initial States Setting defines the initial values of the state variables (they
are the currents in the inductances and the voltages across the capacitors) for simulation. They can be equal to the values that were found in the previous item at t = 0,
but they can be set equal to zero or, depending on model configuration, be set at will.
The next item Load Flow gives an opportunity to run the simulation, beginning
from the steady state. The analysis of voltages and currents in the steady state is of
great importance during the investigation of the electric power systems. Since the
computation of a steady state is rather difficult, one begins the simulation simply
with arbitrary initial values and waits to get the steady state, which often requires a
lot of time. This item makes the simulation much quicker.
It is supposed that the system consists of n nodes, or collecting buses. The relationships that describe the system steady state can be expressed as follows. In the
general case, to each ith node, the generator lines that deliver currents Igi and have
the complex powers Sgi, the load lines consuming currents Ili and having the complex
powers Sli, and the lines that transfer in transit the complex powers Sti with currents
Iti are connected, so that
Igi = Ili + Iti.
(1.4)
(1.5)
(1.6)
(1.7)
or
Because
and it is the same for the other powers, it may be written for the active and the reactive power, respectively,
Pgi = Pli + Pti
(1.8)
(1.9)
and
Therefore, with the knowledge of the vectors of the in-flow and out-flow currents,
and also the voltage vectors, the active and reactive powers can be computed. It may
be written for the currents Iti as
SimPowerSystems Models
n
I*ti =
y V ,
ij
i = 1, 2,, n.
(1.10)
j =1
I *ti =
y V
ij
ij j ,
i = 1, 2,, n,
(1.11)
j =1
where the expression in the braces means the vector angle, yij is the admittance module, ij is its angle, Vj is the voltage module, and j is its angle.
After substitution in Equation 1.5 and taking in mind Equations 1.6 through 1.9,
we receive the following for each node:
n
Pgi = Pli +
y VV cos(
ij i
ij
j)
(1.12)
ij
j)
(1.13)
j =1
Qgi = Qli +
y VV sin (
ij i
j =1
The load powers Pli and Qli are supposed to be known. Thus, for each node, there
are two equations with four unknown quantities: Pgi, Qgi, Vi, and i; therefore, two
quantities have to be assigned. Which of them depends on the selected bus type.
Three available types exist: (1) The reference bus; in SimPowerSystems, it is called
Swing bus. In this node (bus), it is accepted as Vi = 1, i = 0; the unknown quantities
are Pgi and Qgi. Such a node is one for the system. Usually, it is the generator of the
largest power or the bus of the connection with the other system. (2) The load buses;
they are buses with the known Pgi and Qgi. Usually, they are the buses without the
generator power, so that Pgi = 0 and Qgi = 0; the unknown quantities are Vi and i.
(3)The generator buses; the system generatorprime moverusually has the power
and voltage regulators with fixed references, so it may be accepted: Pgi and Vi are
known; Qgi and i have to be found.
The system of nonlinear equations that is received in this way is solved by an
approximate method; subsequently, the computed values of voltages, currents, and
powers are fed into the model automatically, and the simulation starts.
In order to better understand the Powergui operation, the model Example3 is
considered. Explanations provided here are brief, and the reader can return to this
model later. G1 is the synchronous generator (SG) model of 250 MVA power, of
13.8kV voltage. The step-up transformer with 13.8/230 kV is set at the SG output;
via this transformer, the electrical energy is transferred to the network. The same unit
SGtransformer (G2), but with the power of 200 MVA, is connected parallel to the
10
first unit via the transmission line 100 km in length. The generators are driven with
the hydraulic turbines. Each turbine has a governor that controls the turbine rotating speed (which is assigned as 1 pu); the governor characteristic has a droop that is
assigned equal to 0.05. The excitation system maintains the SG voltage equal to the
nominal value. The main load with the power of 100 MW is set at the high-voltage
side of the second transformer. Moreover, there are the local loads with powers of 5
and 15 MW connected directly to the terminals of the G1 and the G2, respectively.
The reference powers for the governors are chosen as 0.8 and 0.75 for SG1 and SG2,
respectively, so that the power delivered to the network has to be 0.8 250 + 0.75
200 100 5 15 = 230 kW.
If the simulation is run with the zero initial conditions (vector of the initial conditions [0 0 0 0 0 0 0 0 1.5]), it may be seen that the indicated powers are reached after
rather long transients (about 200 s).
Now we will use the item Load Flow. Copy this model under the name Example3a.
For the source of 230 kV, the Swing bus is selected, for the SG1 and the SG2 the
PV buses, with the powers of 0.8 250 = 200 MW and 0.75 200 = 150 MW
are selected, respectively; the mode with the constant impedance is determined for
the loads. In a dialog box of Powergui, the item Load Flow is selected; after the
execution of the command Compute, the item window receives the view displayed
in Figure 1.6. Now to fulfill the command Apply, the calculated values are put into
the corresponding fields of the model blocks that results in change in the model: the
source voltage and its angle changed to 230 1.00176 kV, = 2.62. In the SG models, the vectors of the initial conditions change to nonzero; in the models of the governors, the values of the initial powers come to 0.80183 and 0.75161, respectively. To
execute simulation, it will be seen that the assigned power values of SG1 (200 MW)
and SG2 (150 MW) are obtained immediately, so that the investigations, beginning
from the steady states (changes in the voltages and the loads, emergency operations),
can begin on the simulation start.
The neighbor item Machine Initialization is the simplified version of the previous one (in the preceding versions of SimPowerSystems, only one item existed:
Load Flow and Machine Initialization). In the model Example3b, the source
230kV is replaced with the load of 100 MW. Let the SG2 produce a power of
125MW (0.625 pu). Then the reference and the initial values of the power for
the governor of SG2 are set to 0.625; the vector of the initial conditions of SG2
is chosen as [000 0 0 0 0 0 1.5]; and the bus type for the Load Flow is PV with
a power of 125 MW. The swing bus is selected for SG1; the reference and the
initial values of the power for the governor of SG1 are set arbitrarily as 0.5.
The vector of the initial conditions is the same as for SG2. To run the simulation, it will be seen that after transients lasting for about 1 s, the SG1 and SG2
powers are equal to 110 and 111MW, respectively. To choose the item Machine
Initialization and to carry out the command Compute and Apply, one sees how
the model parameters change: the references and the initial power values for
SG1 and SG2 come to 0.345 and 0.675, respectively, and the nonzero vectors of
the initial conditions appear in the SG models. The values of the powers that are
obtained after the simulation are equal to 86 and 135 MW, respectively; at this,
the transients are absent.
SimPowerSystems Models
FIGURE 1.6
Window of the item Load Flow.
11
Impedance ()
Carry on with the study of Powergui. The item Use LTI Viewer gives the
opportunity to use the methods that are found in the MATLAB toolbox Control
System Toolbox. Since the reader is not expected to be aware of this toolbox,
this item is not described here. Interested readers can get to know this toolbox
fromRef. [3].
The item Impedance vs Frequency Measurement gives the opportunity to
build the frequency characteristic of the complex resistance of any model block.
The model Example3c is a copy of model Example3. The block Impedance
Measurement from the folder Measurement is added in the model; this block is
connected in parallel to one phase of the transmission line. To actuate the aforesaid
item, the frequency amplitude and the phase characteristics are plotted as shown
in Figure 1.7.
The item FFT Analysis is intended for the frequency analysis with the help
of the Fourier transformation of the recorded data. Under the data record, the
scopes have to be in the following format: Structure with Time. For the demonstration of this item, we use the model Three_Ph_Contr_Source, which is considered in more detail in Chapter 2. The diagram of this model is depicted in Figure
2.1. In the controlled source, with the amplitude of the fundamental harmonic
of 100 2 / 3 = 81.6 V at the frequency of 50 Hz, the 5th harmonic with the
amplitude of 0.4 of fundamental and the 11th harmonic with the amplitude of 0.2
of fundamental are selected. After the simulation and the actuation of the item
FFT Analysis, a window appears having a number of fields (Figure 1.8). In the
upper right field, a list of the available structures that are formed in Workspace
appears. There is only one structure in the case under consideration that is formed
by ScopeData. The structure, the number of its input, and the number of the signal
in this input are selected. Then the initial time of the processed signal, the number
of the cycles of the fundamental frequency and the value of this frequency, the
Impedance
5000
Impedance measurements
Example3c/impedance measurement
4000
3000
2000
1000
0
Axis
0
500
1000
1500
100
Phase ()
12
2000
2500
3000
Frequency (Hz)
Phase
3500
4000
4500
5000
Logarithmic impedance
Linear impedance
Logarithmic frequency
50
Linear frequency
Grid
50
100
Range (Hz):
[0:2:5000]
500
1000
1500
2000
2500
3000
Frequency (Hz)
3500
4000
4500
5000
Update
Close
SimPowerSystems Models
FIGURE 1.8
13
maximal frequency for computation of Fourier transformation, the unit for axis x,
and a style of result showbar or listare set.
The processed signal is displayed in the upper left window; at that point, a part
of the signal (Display selected signal) or all signal (Display FFT window) can be
chosen. With the command Display, the result of the Fourier transformation appears
in the lower left field in the selected style of representation.
The next item Generate Report gives the opportunity to store the part of the computation results previously mentioned: the initial states, the steady states, theload
flow, and machine initializationas the text file with the model name and the extension .rep.
The item Hysteresis Design Tool is used with the transformer models while
taking saturation into account and will be considered later. The last item Compute
RLC Line Parameters is used for computing the active and reactive impedances
of the electrical power transmission line by using the conductor data, the data of
the line, and the support construction. This procedure is considered in Chapter
2 as well.
From the previous discussion, it follows that Powergui is a convenient tool that
makes operations with SimPowerSystems models easier.
14
REFERENCES