Power System Block Set
Power System Block Set
Blockset
                      For Use with SIMULINK       ®
                                 Hydro-Québec
                           TEQSIM International
Modeling
Simulation
Implementation
User’s Guide
Version 1
           How to Contact The MathWorks:
 ☎
 PHONE
           508-647-7000                           Phone
           508-647-7001                           Fax
   FAX
  ✉MAIL
           The MathWorks, Inc.
           24 Prime Park Way
                                                  Mail
Natick, MA 01760-1500
           http://www.mathworks.com               Web
INTERNET   ftp.mathworks.com                      Anonymous FTP server
           comp.soft-sys.matlab                   Newsgroup
  @
  E-MAIL
           support@mathworks.com
           suggest@mathworks.com
                                                  Technical support
                                                  Product enhancement suggestions
           bugs@mathworks.com                     Bug reports
           doc@mathworks.com                      Documentation error reports
           subscribe@mathworks.com                Subscribing user registration
           service@mathworks.com                  Order status, license renewals, passcodes
           info@mathworks.com                     Sales, pricing, and general information
Preface
                                                                                     Tutorial
1   Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
    Session5:SimulatingThree-PhaseSystemsandUsingElectricalMachines
    1-27
       System Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-27
       Load Flow Without a Swing Machine . . . . . . . . . . . . . . . . . . . 1-30
       Load Flow With a Swing Machine . . . . . . . . . . . . . . . . . . . . . . 1-34
         References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-36
                                                                                                                i
                                                                                              Case Studies
                2   Series Compensated Transmission Network . . . . . . . . . . . . . 2-3
                      Description of the Transmission Network . . . . . . . . . . . . . . . . . 2-3
                      Obtaining the Steady-State and State-Space Model . . . . . . . . . 2-7
                      Frequency Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
                      Transient Performance Under Fault Condition . . . . . . . . . . . . 2-11
ii   Contents
                                                          Advanced Topics
3   How the Power System Blockset Works . . . . . . . . . . . . . . . . . 3-2
                                                           Block Reference
4   What Each Block Reference Page Contains . . . . . . . . . . . . . . 4-2
Index
                                                                                             iii
iv   Contents
Preface
Preface
                This project was managed by Pierre Mercier. Gilbert Sybille was the technical
                coordinator and author of some sections. The technical supervision of the
                blockset was done by Kamal Al-Haddad, Hoang Le-Huy, Louis A. Dessaint, and
                Momcilo Gavrilovic. Patrice Brunelle, Roger Champagne, Christian Dufour,
                and Mohamed Tou programmed the functions and the models.
vi
                                                                         The Power System Blockset
                                                                                               vii
           1
Tutorial
                                                                                         Introduction
Introduction
               To master the Power Systems Blockset, you must learn how to build and
               simulate electrical circuits. The Power System Blockset operates in the
               Simulink environment. Before starting this training you should become
               familiar with Simulink.
               The tutorial is organized in five different sessions. Sessions 1 through 3 are
               based on a simple power system. Session 4 illustrates power electronics, and
               Session 5 demonstrates three-phase power systems, electrical machinery, and
               load flow.
                                                                                                  1-2
1   Tutorial
                                                                    300 km
                                                               transmission line
                          Rs_eq
                                                             R= 0.011 Ω/km
                          2.0 Ω
                                        Z_eq                 L= 0.8674 mH/km
                                                                                    Q= 110 Mvars
                         424.4 kV rms      R=180.1 Ω         C= 13.41nF/km
                                                                                   quality factor:300
                         0 degrees         L= 26.525 mH
                         60 Hz                                                       @ 424.4 kV
                                           C= 117.84 µF                                    60 Hz
1-3
                                                  Session 1: Simulating a Simple Circuit
These subsystems can be opened to produce the windows containing the blocks
to be copied into your circuit. Each component is represented by a special icon
having one or several inputs and outputs corresponding to the different
terminals of the component.
1 From the File menu of the powerlib window, select New − Model, which will
  contain your first circuit and save it as circuit1.
2 Open the Electrical Sources library and copy the AC Voltage Source block
  into the circuit1 window.
3 Open the AC Voltage Source dialog box by double clicking on the icon and
  enter the Amplitude, Phase, and Frequency parameters according to the
  values shown in Figure 1-1.
  Note that the amplitude to be specified for a sinusoidal source is its peak
  value (424.4e3*sqrt(2) volts in this case).
5 Copy the Parallel RLC Branch block, which can be found in the Elements
  library of powerlib, set its parameters as shown in Figure 1-1, and name it
  Z_eq.
                                                                                     1-4
1   Tutorial
               6 Duplicate the RLC block, which is already in your circuit1 window, set the
                 R parameter according to Figure 1-1, and set the L and C parameters
                 respectively to infinite (inf) and zero values.
                 When the dialog box is closed, you will notice that the L and C components
                 have disappeared so that the icon now shows a single resistor. The same
                 result would have been obtained with the Series RLC Branch block by
                 setting L and C respectively at zero and inf values.
               9 Open the Bus Bar dialog box and set its parameters at 2 inputs and 2
                 outputs and name it B1. Also copy the Ground block (select the block with an
                 output connection).
               Resize the various components and interconnect blocks by dragging lines from
               outputs to inputs of appropriate blocks.
                         Rs_eq
                                  Z_eq
                                               B1
                    Vs
               You need a voltage measurement to measure the voltage at bus B1. This voltage
               measurement can be found in the Measurements subsystem. Copy it and name
               it U1.
               Connect its positive input to the second output of bus bar B1 and its negative
               input to a new ground block.
               Thus far you have used only blocks from the electrical library. To observe the
               voltage measured by the voltage measurement block, you need a display
               system. This could be any device found in the Sinks Subsystem block of
               Simulink. Use the standard Simulink scope.
1-5
                                                    Session 1: Simulating a Simple Circuit
Open the Simulink library and copy the scope in your circuit1 window. If the
scope were connected directly at the output of the voltage measurement, it
would display the voltage in volts. However, electrical engineers in power
systems are used to working with normalized quantities (per unit system). You
can normalize the voltage by dividing the value in volts by a base voltage
corresponding to the peak value of the system nominal voltage. In this case, the
scaling factor K is:
                            1
   K = --------------------------------------------
                                   3
         424.4 × 10 × 2
Copy a Gain block from the Simulink library and set its gain as above. Connect
the measurement system to the voltage measurement as shown below.
             Electrical System
                                                Simulink System
                                                                                       1-6
1   Tutorial
               branch and two shunt C branches. The model accuracy depends on the number
               of pi sections used for the model.
               Copy the PI Section Line block from the Elements library into circuit1. Open
               its dialog box. Set its parameters as shown in Figure 1-1, and specify one line
               section.
               You can model the shunt reactor with a series RL branch. Use a Series RLC
               Branch block or a Series RLC Load block for the model. For the Branch block,
               set the R and L values corresponding to the active and reactive power specified
               in Figure 1-1 (Q=110 Mvar; P=110/300=0.37 MW at V=424.4 kV rms and f= 60
               Hz).
               You will find it more convenient to use a Series RLC Load block which allows
               you to specify the active and reactive powers absorbed by the shunt reactor
               directly.
               Copy the Series RLC Load block, which can be found in the Elements
               subsystem of powerlib. Open the dialog box and set its parameters as follows:
               Vn=424.4e3V; fn=60 Hz; P= 110e6/300 W (quality factor=300);
               QL=110e6 vars and Qc=0.
               Note that, as no reactive capacitive power has been specified, the capacitor
               disappears on the block icon when the dialog box is closed.
               Add a receiving end bus B2 by duplicating B1. Duplicate the voltage
               measurement system (blocks U1, Volts>pu, and Scope U1).
               Finally, interconnect all these new blocks as shown in the following figure.
               Now you can start the simulation from the Simulation menu. As expected,
               voltages are sinusoidal with peak value of 1 pu. While the simulation is
               running open the Vs block dialog box and modify the amplitude. Observe the
               effect on the two scopes. Remember that you may zoom in on the waveforms in
1-7
                                                  Session 1: Simulating a Simple Circuit
the scope windows by rubberbanding (using the left mouse button) around the
region of interest. You can also modify the frequency and the phase. Use one of
the Simulink stiff solvers (like ode15s) for increased simulation.
                                                                                     1-8
1   Tutorial
1-9
                                                      Session 2: Analyzing a Simple Circuit
The sign conventions used for the voltages and currents of sources and state
variables are determined by the orientation of the blocks:
                                                                                       1-10
1   Tutorial
               Note: Depending on the exact position of the various blocks in your circuit1
               diagram, the state variables may not be ordered the same way as in the figure
               above.
               Now, select the Set state variables button to display the initial values of the
               state variables. These initial values are set in order to start the simulation in
               steady-state.
               Frequency Analysis
               To measure the impedance versus frequency at bus B2, you will need a current
               source to provide a second input to the state-space model. Open the Electrical
               Sources subsystem and copy the AC Current Source block in your model.
               Connect this source at bus B2 as shown in Figure 1-2. Set its source amplitude
               to 0, its frequency to 60 Hz, and ground the negative port.
1-11
                                                   Session 2: Analyzing a Simple Circuit
Now compute the state-space representation of the model circuit1 with the
power2sys function. Enter the following command at the MATLAB prompt.
   [A,B,C,D,x0,states,inputs,outputs]=power2sys(’circuitl’);
The power2sys function returns the state-space model of your circuit in the
four matrices A, B, C and D. x0 is the vector of initial conditions that you have
just displayed with the Powergui.The names of the state variables, inputs,
and outputs are returned in three string matrices.
   states
   states =
   Il_110 Mvars
   Uc_PI Section Line->sect:1
   Il_PI Section Line->sect:1
   Uc_PI Section Line->sect:2
   Il_Z_eq
   Uc_Z_eq
   inputs
   inputs =
   U_Vs
   I_AC Current Source
   outputs
   outputs =
   U_U1
   U_U2
                                                                                    1-12
1   Tutorial
               Note that you could have obtained the names and ordering of the states, inputs
               and outputs directly from the Powergui.
               Once the state-space model of the system is known, it can be analyzed in the
               frequency domain. For example, the modes of this circuit can be found from the
               eigenvalues of matrix A (use the MATLAB eig command).
                 eig(A)
                 ans =
                 1.0e+05          *
                 -2.4972
                 -0.0001          +   0.0144i <---229 Hz
                 -0.0001          -   0.0144i
                 -0.0002          +   0.0056i <---89 Hz
                 -0.0002          -   0.0056i
                 -0.0000
               This system has two oscillatory modes at 89 Hz and 229 Hz. The 89 Hz mode
               is due to the equivalent source, which is modeled by a single pole equivalent.
               The 229 Hz mode is the first mode of the line modeled by a single pi section.
               If you have the Control System Toolbox, you can compute the impedance of the
               network as a function of frequency by using the bode function. In the Laplace
               domain, the impedance Z2 at bus B2 is defined as the transfer function between
               the current injected at bus B2 (input 2 of the system) and the voltage measured
               at bus B2 (output 2 of the system).
                            U2 ( s )
                 Z2 ( s ) = ----------------
                             I2 ( s )
               The impedance at bus B2 for the 0-1500Hz range can be calculated and
               visualized as follows.
                 freq=0:1500;
                 w=2*pi*freq;
                 [mag1,phase1]=bode(A,B,C,D,2,w);
                 semilogy(freq,mag1(:,2));
               Repeat the same process to get the frequency response with a 10 line section
               model. Open the PI Section Line dialog box and change the number of sections
1-13
                                                                                                               Session 2: Analyzing a Simple Circuit
from 1 to 10. To calculate the new frequency response and superimpose it with
the one obtained with a single line section, enter the following commands.
                             [A,B,C,D]=power2sys(’circuit1’);
                             [mag10,phase10]=bode(A,B,C,D,2,w);
                             hold on
                             semilogy(freq,mag1(:,2),freq,mag10(:,2));
                                    10 5
                                                    229 Hz
                                    10 4
                                                             one line section
Impedance magnitude at bus B2 (Ω)
                                                                                            10 line sections
                                    10 3
                                            89 Hz
10 2
10 1
                                    10 0
                                        0                             500                             1000                     1500
                                                                                Frequency (Hz)
Figure 1-3 Impedance at Bus B2 as Function of Frequency
This graph indicates that the frequency range represented by the single line
section model is limited to approximately 150 Hz. For higher frequencies, the
10 line section model is a better approximation.
For a distributed parameter line model, the propagation speed is:
                                          1
                               v = ----------------- = 293 208 km/s
                                       L⋅C
The propagation time for 300 km is therefore T=300/293 208=1.023 ms and the
frequency of the first line mode is f1=1/4T=244 Hz. A distributed parameter
line would have an infinite number of modes every 244+n*488 Hz (n=1,2, 3...).
                                                                                                                                                1-14
1   Tutorial
               The 10 line section model simulates the first 10 modes. The first three line
               modes can be seen on Figure 1-3, (244Hz, 732Hz and 1220 Hz).
               Now open the Simulation/Parameters menu of your circuit1 model. In the
               Solver section, select the ode15s integration algorithm. Keep the default
               parameters except set the stop time to 0.1. Open the scopes and start the
               simulation. Look at the waveforms of the sending and receiving end voltages
               on Scope U1 and Scope U2. As the state variables have been automatically
               initialized, the system starts in steady state and sinusoidal waveforms are
               observed.
               Finally, open the Powergui interface, select the Set State Variables button,
               and reset all the states to 0 by selecting the Reset to zero button and then
               Apply button. Restart the simulation and observe the transient when the line
               is energized from zero.
                                        1.5
                                                                     With initial states set to steady-state
                                              1
                                                                     With initial
                                        0.5
                                                                     state reset
                                                                     to zero
               Voltage at bus B2 (V)
-0.5
-1
                                       -1.5
                                                  0   0.005   0.01         0.015        0.02        0.025      0.03   0.035   0.04   0.045   0.05
1-15
                                                                   Session 3: Simulating Transients
            One of the main uses of the Power System Blockset is to simulate transients in
            electrical circuits. This can be done with either mechanical switches (circuit
            breakers) or switches using power electronic devices.
            First open your circuit1 system and delete the current source connected at bus
            B1. Save this new system as circuit2. Before connecting a circuit breaker, you
            will modify the schematic diagram of circuit2. As with Simulink, the Power
            System Blockset allows you to group several components into a subsystem.
            This feature is useful to simplify complex schematic diagrams.
            Use this feature to transform the source impedance into a subsystem by:
            1 Select the two blocks identified Rs_eq and Z_eq by surrounding them with a
              bounding box (left mouse button) and use the Edit/Create Subsystem
              menu. The two blocks now form a new block called Subsystem.
            2 Use the Edit/Mask Subsystem menu to change the icon of that subsystem.
              In the Icon section of the mask editor, type the following command:
               disp(’Equivalent\nCircuit’)
3 Select Apply.
                                                                                               1-16
1   Tutorial
               4 Use the Format/Show Drop shadow menu to get the appearance as shown
                 in the figure. You can now double click on the Subsystem block and look at
                 its content.
               1 Open the breaker dialog box and set its parameters as follows: Ron=0 Ω;
                 Lon=10e-6 H; and Initial state=0 (open).
               2 Insert the circuit breaker in series with the sending end of the line, then
                 rearrange the circuit as shown in the figure in step 1.
               3 Copy the Step block from the Simulink Sources library and connect it to the
                 control input of the circuit breaker.
               4 Set the step time to 16.67e-3/4 so that the line will be energized at the
                 positive peak source voltage.
               Open the PI section Line dialog box and make sure the number of sections is
               set to 1. Open the Simulation/Parameters menu. In the Solver section, select
               the ode15s integration algorithm. Keep the default parameters, except set the
               stop time to 0.02s. Select the Workspace I/O tab and make sure that the time
               is returned in the variable tout. Open the scopes and start the simulation.
               Look at the waveforms of the sending and receiving end voltages on Scope U1
               and Scope U2.
               Once the simulation is complete, copy the variables tout and U2 into t_1 and
               U2_1 respectively.
                  t_1=tout;
                  U2_1=U2;
1-17
                                                       Session 3: Simulating Transients
These two variables now contain the waveform obtained with a single pi section
line model.
Open the PI section Line dialog box and change the number of sections from
1 to 10. Start the simulation. Once the simulation is complete, copy the
variables tout and U2 into t_10 and U2_10 respectively.
  t_10=tout;
  U2_10=U2;
Finally, delete the pi section line model and replace it with a single phase
Distributed Parameter Line block from the powerlib/Elements library. Set the
number of phases to 1 and use the same R,L,C, and length parameters as for
the pi section line (see Figure 1-1). Restart the simulation and save the time
and U2 voltage in t_d and U2_d variables.
You can now compare the three waveforms obtained with the three line models
by plotting them on the same graph.
  plot(t_1,U2_1,t_10,U2_10,t_d,U2_d);
These waveforms are shown in Figure 1-5. As expected from the frequency
analysis performed during “Session 2: Analyzing a Simple Circuit”, the single
pi section model does not respond to frequencies higher than 229 Hz. The 10 pi
section model gives a better accuracy although high frequency oscillations are
introduced by the discretization of the line. You can clearly see on the figure
the propagation time delay of 1.03 ms associated with the distributed
parameter line.
                                                                                   1-18
1   Tutorial
Figure 1-5 Receiving End Voltage Obtained With Three Different Line Models
1-19
                                                                                                  Session 4: Introducing Power Electronics
            The Power System Blockset has been designed to simulate power electronic
            devices. In this session, you will build a simple circuit using thyristors.
            Consider the circuit given in Figure 1-6. It represents one phase of a static var
            compensator used on a 735kV transmission network. On the secondary of the
            735 kV /16 kV transformer, two variable susceptance branches are connected
            in parallel: one thyristor controlled reactor (TCR) branch and one thyristor
            switched capacitor (TSC) branch.
                             2.7 Ω      71.65 mH
                                                                                            70.5 mΩ                1.5 mΩ
                     424.4 kV rms
                     0 degrees
                     60 Hz
308.4 µF
                                                                                       TCR                  TSC
                                                                                     branch               branch
            Transformer parameters
                           Nominal power 110 MVA
                Primary: Rated voltage 424.4 kV rms; leakage reactance=0.15 pu; resistance=0.002 pu
              Secondary: Rated voltage 16 kV rms; leakage reactance=0 pu; resistance=0.002 pu
                           Magnetizing current at 1 pu voltage: Inductive: 0.2% Resistive: 0.2%
            Thyristor parameters
                           Ron = 1mΩ Lon= 1µH; Vf=14*0.8 V (14 thyristors in series)
                           Snubber: Rs= 500Ω Cs= 0.15µF
                                                                                                                                      1-20
1   Tutorial
               The TCR and TSC branches are both controlled by a valve consisting of two
               thyristor strings connected in antiparallel. An RC snubber circuit is connected
               across each valve. The TSC branch is switched on/off, thus providing discrete
               step variation of the SVC capacitive current. The TCR branch is phase
               controlled in order to obtain a continuous variation of the net SVC reactive
               current.
               You will now build two circuits illustrating the operation of the TCR and the
               TSC branches.
               2 Open the Power Electronics library and copy the Thyristor block into your
                 circuit3 model.
Notice that the snubber circuit is integral to the Thyristor dialog box.
               5 Connect this new thyristor Th2 in antiparallel with Th1 one as shown in
                 Figure 1-7.
                 As the snubber circuit has already been specified with Th1, the snubber of
                 Th2 must be eliminated.
6 Open the Th2 dialog box and set the snubber parameters to Rs=Inf; Cs=0.
1-21
                                                Session 4: Introducing Power Electronics
You will now model the synchronized pulse generators firing thyristors Th1 and
Th2. Copy two Simulink pulse generators into your system, name them Pulse1
and Pulse2, and connect them to the gates of Th1 and Th2.
                                                                                    1-22
1   Tutorial
               Now you have to define the timing of the Th1 and Th2 pulses. At every cycle a
               pulse has to be sent to each thyristor α degrees after the zero crossing of the
               thyristor commutation voltage. Set the pulse1 and pulse2 parameters as
               follows:
                           Period : 1/60 s
                           Duty cycle: 1% (3.6 degrees pulses)
                           Amplitude :1
                           Start time : 1/60+T for Pulse1; 1/60+1/120+T for Pulse2
               The pulses sent to Th1 are delayed by 180 degrees with respect to pulses sent
               to Th2. The delay T is used to specify the α firing angle. To get a 120 degrees
               firing angle, specify T in the workspace by typing
                           T=1/60/3;
                              100
               Iprim (A)
                             -100 0
                             2000
                             1000
               Ith1 (A)
                                0
                                  0
                                      4
                                4 x10
                                2
               Uth1 (V)
                                0
                               -2
                               -4
                                  0       0.02       0.04        0.06        0.08          0.1
1-23
                                                  Session 4: Introducing Power Electronics
Connect a capacitor in series with the RL inductor and Th1/Th2 valve as shown
in Figure 1-9. Change the R,L, and C parameters as shown in Figure 1-6.
Connect a voltmeter and oscilloscope to monitor the voltage across the
capacitor.
Contrary to the TCR branch, which was fired by a synchronous pulse
generator, a continuous firing signal will now be applied to the two
thyristors. Delete the two pulse generators. Copy a Step block from the
Simulink/Sources library and connect its output at both gates of Th1 and Th2.
Set its step time at 1/60/4 (energizing at the first positive peak of the source
voltage). Your circuit should now be similar to the one shown in Figure 1-9.
                                                                                      1-24
1   Tutorial
Uc = 17670 × 2 = 24989Volts
               You can now use the Powergui interface to change the capacitor’s initial
               voltage. Open the Powergui interface. In the Set state variables section, a
               menu is available. A list of all the state variables with their default initial
               values appears. The value of the initial voltage across the capacitor C (variable
               Uc_C) should be -0.3141 V. This voltage is not exactly zero because the snubber
               allows circulation of a small current when both thyristors are blocked. Now
               select the Uc_C state variable and enter 24989 in the set to field. Then select
               the Apply button to make this change effective.
               Start the simulation. As expected, the transient component of capacitor voltage
               and current have disappeared. The voltages obtained with and without initial
               voltage are compared in Figure 1-10.
1-25
                                                                                       Session 4: Introducing Power Electronics
-1
-2
-3
-4
 -5
      0   0.005     0.01     0.015     0.02      0.025      0.03     0.035      0.04     0.045      0.05
Figure 1-10 Transient Capacitor Voltage With and Without Initial Charge
                                                                                                                           1-26
1   Tutorial
                  The Machines library of powerlib contains four of the most commonly used
                  three-phase machines: simplified and complete synchronous machines,
                  asynchronous machines and permanent magnet synchronous machines. Each
                  machine can be used either in generator or motor mode. Combined with linear
                  and nonlinear elements such as transformers, lines, loads, and breakers. they
                  can be used to simulate electromechanical transients in an electrical network.
                  They can also be combined with power electronic devices to simulate drives.
                  System Description
                  During this session you will simulate the three-machines system as shown in
                  the single line diagram of Figure 1-11.
                                     25.0 kV     t=0.2s
                                                                              2.4 kV
                                                                                                    ASM
                          1000MVA
                          Q=10                               25/2.4 kV                          Asynchronous
                                      B1                   Y/D 6 MVA          B2                    Motor
                              5 MW                                            500 kvar   1 MW
                                                                                                   2250 HP
                                        Fault t=0.1s
                                                          Diesel         SM
                                                                   Synchronous
                                                                    Generator
                                                                    3.125MVA
1-27
                  Session 5: Simulating Three-Phase Systems and Using Electrical Machines
This system consists of a plant (bus B2), simulated by a resistive and motor load
(ASM) fed at 2.4 kV from a 25 kV distribution network through a 6 MVA 25/2.4
kV transformer, and from an emergency synchronous generator/diesel engine
unit (SM). A 500 kvar capacitor bank is used for power factor correction at the
2.4 kV bus. The 25 kV network is modeled by a simple R-L equivalent source
(short-circuit level 1000 MVA, quality factor X/R=10) and a 5 MW load. The
asynchronous motor is rated 2250 HP, 2.4 kV, and the synchronous machine is
rated 3.125 MVA, 2.4 kV.
Initially, the motor develops a mechanical power of 2000 HP and the diesel
generator delivers 500 kW of active power. The synchronous machine controls
the 2.4 kV B2 bus voltage at 1.0 pu and generates 500 kW of active power. At
t=0.1s, a three-phase to ground fault occurs on the 25 kV system, causing the
opening of the 25 kV circuit breaker at t=0.2s, and a sudden increase of the
generator loading. During the transient period following the fault and
islanding of the Motor/Generator system, the synchronous machine excitation
system and the diesel speed governor will react to maintain the voltage and
speed at a constant value.
This system has already been built with the Power System Blockset for load
flow application. Open the Demos library of powerlib and double click on
Machines and Load Flow (sim) demo.
Figure 1-12 Power System of Figure 1-11 Built With the PSB
                                                                                     1-28
1   Tutorial
                             For the synchronous machine (SM), the block using standard parameters has
                             been used, whereas the asynchronous motor (ASM) parameters are entered in
                             S.I. units. The other three-phase elements (inductive voltage source,
                             Y grounded/Delta transformer, and loads) are masked blocks built from the
                             Three-Phase library provided in Extras. The fault and breaker systems are
                             built with three single-phase circuit breakers. Special measurement blocks
                             provided in the Machine library are used to demultiplex the SM and ASM
                             machine outputs.
                             The SM voltage and speed outputs are used as feedback inputs to a Simulink
                             control system that contains the diesel engine and governor block as well as an
                             excitation block. The excitation system is the standard block provided in the
                             Machines library. The SM parameters as well as the diesel engine and
                             governor models are taken from reference [1].
         1
       wref (pu)         0.2s+1               K              0.25s+1            1         1      Torque
                    0.0002s2+0.01s+1                        0.009s+1        0.0384s+1     s                                     1
          2
        w (pu)                               Gain K            TF1             TF2    Integrator             Td              Pmec (pu)
                                                                                                                   Product
                   CONTROL SYSTEM                                  ACTUATOR                               ENGINE
                             If you simulate this system for the first time, you usually don’t know what the
                             initial conditions are for the SM and ASM to start in steady-state.
                             These initial conditions are:
                             SM: Initial values of speed deviation (usually 0%), rotor angle, magnitudes and
                             phases of currents in stator windings, and initial field voltage required to
                             obtain the desired terminal voltage under the specified load flow.
                             ASM: Initial values of slip, rotor angle, magnitudes, and phases of currents in
                             stator windings.
1-29
                  Session 5: Simulating Three-Phase Systems and Using Electrical Machines
Open the dialog box of the SM and ASM blocks. All initial conditions should be
set at 0, except for the initial SM field voltage -Vf , and ASM slip, which are set
at 1 pu Open the three oscilloscopes monitoring the SM and ASM speeds as well
as the ASM stator currents. Start the simulation and observe the first 100 ms
before fault is applied.
As the simulation starts, you will notice that the three ASM currents start from
0 and contain a slowly decaying DC component. The machine speeds will take
a much longer time to stabilize because of the inertia of the motor/load and
diesel/generator systems. In the example, the ASM even starts to rotate in the
wrong direction because the motor starting torque is lower than the applied
load torque. Stop the simulation.
To start the simulation in steady state with sinusoidal currents and constant
speeds, all the machine states must be initialized properly. This is a difficult
task to perform by hand, even for a simple system. In the next section you will
learn how to use the Machine Load Flow option of the Powergui to perform a
load flow and initialize the machines.
Select the Machine Load Flow button in the Powergui. A new window
appears. Note that for the SM Bus type you have a menu allowing you to choose
either PV Generator or Swing Generator.
For synchronous machines you ordinarily specify the desired terminal voltage
and the active power that you want to generate (positive power for generator
mode) or absorb (negative power for motor mode). This is possible as long as
you have a swing or slack bus that will generate or absorb the excess power
required to balance the active powers throughout the network.
The swing bus can be either a voltage source or any synchronous machine. If
you don’t have any voltage source in your system, you must declare one of the
machines as a swing machine. In the next section you will make a load flow
with the 25 kV voltage source connected to bus B1 used as a swing bus.
                                                                                      1-30
1   Tutorial
               Select the Do Load Flow button. Once the load flow is solved, the phasors of
               AB and BC machine voltages as well as currents flowing in phases A and B are
               updated as shown below.
               The SM active and reactive powers, mechanical power, and field voltage are
               displayed.
                 SM:P=500 kW; Q =315 kvar;
                 Pmec=500.4 kW (or 500/3125=0.1601 pu)
                 Field voltage E/Vf=1.182 pu.
               The ASM active and reactive powers absorbed by the motor, slip, and torque
               are also displayed.
                 ASM:P=1.515MW; Q =615 kvar; Pmec=1.492 MW (2000 HP)
                 Slip=0.006119pv; Torque=7964 N.m
               This torque value should be already entered in the Constant block connected
               at the ASM torque input. If you now open the SM and ASM dialog boxes you
1-31
                  Session 5: Simulating Three-Phase Systems and Using Electrical Machines
can see the updated initial conditions. If you select the Steady-State button in
the Powergui, you will also see the updated values of the measurement
outputs and voltages and currents of non-linear blocks. For example you should
find that the magnitude of the Phase A voltage across the fault breaker (named
U_3 phase fault/Breaker1) is 20.40 kV corresponding to a 24.985 kV rms
phase-phase voltage.
To start the simulation in steady state, you should also initialize the states of
the diesel engine /governor and SM excitation systems initialized according to
the values calculated by the load flow. Open the Governor & Diesel Engine
subsystem which is located inside the Diesel Engine Speed and Voltage Control
subsystem. The initial mechanical power has been already set to 0.1601 pu in
the Governor.
Open the Excitation block. The initial terminal voltage and field voltage have
been set, respectively, to 1.0 and 1.182 pu. Note that the load flow
automatically initializes the machine blocks but not the associated control
blocks. Therefore, if you perform a new load flow you should change the initial
values in the control blocks.
Open the four scopes displaying the terminal voltage, field voltage, mechanical
power, and speed of the synchronous machine as well as the scope displaying
the asynchronous motor speed. Start the simulation.
The simulation results are shown in Figure 1-14.
                                                                                     1-32
1   Tutorial
                                1
                Pmec SM
                   (pu)
                              0.5
                                0
                                2
                Vt SM
                                1
                  (pu)
                                0
                               10
                Vf SM
                  (pu)
                                0
                Speed SM
                              1.0
                   (pu)
0.98
                             1800
                Speed ASM
                     (rpm)
1700
                             1600
                                    0   0.5   1   1.5   2      2.5     3   3.5   4     4.5     5
                                                            Time (s)
               Observe that, during the fault, the terminal voltage drops to about 0.2 pu and
               the excitation voltage hits the limit of 6 pu. After fault clearing and islanding,
               the SM mechanical power quickly increases from its initial value of 0.16 pu to
               1 pu and stabilizes at the final value of 0.80 pu required by the resistive and
               motor load (1.0 MW resistive load + 1.51 MW motor load = 2.51 MW = 2.51/
               3.125= 0.80 pu). After three seconds, the terminal voltage stabilizes close to its
               reference value of 1.0 pu. The motor speed temporarily decreases from 1789
               rpm down to 1625 rpm, then it recovers close to its normal value after two
               seconds.
1-33
                   Session 5: Simulating Three-Phase Systems and Using Electrical Machines
If you increase the fault duration to 12 cycles by changing the breaker opening
time to 0.3s, you will notice that the system collapses. The ASM speed slows to
zero after two seconds.
For the SSM swing machine you only have to specify the requested terminal
voltage (magnitude and phase). The active power is unknown. However you
can specify an active power that will be used as an initial guess and help load
flow convergence. Specify the following parameters:
   SSM:UAB(Vrms)=24985; (Voltage obtained at bus B1 from the previous load
   flow)
   UAN Phase(degrees)=0;
   Active power guess: P(W)=0;
                                                                                      1-34
1   Tutorial
               Select the Do load Flow button. Once the load flow is solved the following
               solution is displayed.
               SM: Active and reactive electrical powers, mechanical power and field voltage:
                 P=500 kW; Q=315 kvar;
                 Pmec=500.4 KW (or 500/3125=0.1601 pu);
                 Field voltage E/Vf=1.182 pu
               ASM: Active and reactive powers absorbed by the motor, slip and torque:
                 P=1.515MW; Q=615 kvar; Pmec=1.492 MW (2000 HP)
                 Slip=0.006119; Torque=7964 N.m
               SSM: Active and reactive electrical powers, mechanical power and internal
               voltage:
                 P=7.041MW;Q=-129 kvar;
                 Pmec=7.046MW (or 7.046/1000=0.007046 pu); E/Vf=1.0 pu
1-35
                  Session 5: Simulating Three-Phase Systems and Using Electrical Machines
As expected, the solution obtained is exactly the same as the one obtained with
the inductive source. The active power delivered by the swing bus is 7.04 MW
(6.0 MW resistive load + 1.51 MW load - 0.5 MW generated by SM = 7.01 MW,
the difference (0.03 MW) corresponding to losses in the transformer).
Connect at inputs 1 and 2 of the SSM block two Constant blocks specifying
respectively the required mechanical power (0.007046 pu) and internal voltage
(1.0 pu). Restart the simulation. You should get the same waveforms as those
of Figure 1-14.
References
[1] Yeager K.E, J.R. Willis “Modeling of Emergency Diesel Generators in an
800 Megawatt Nuclear Power Plant,” IEEE Transactions on Energy
Conversion, Vol.8, No.3, September 1993.
                                                                                     1-36
1   Tutorial
1-37
               2
Case Studies
2   Case Studies
                   The case studies in this section were built to provide examples of uses for the
                   Power System Blockset. They are:
2-2
                                                                                      Series Compensated Transmission Network
           Parameters: 735 kV equivalent network and line parameters (see Figure 1-1 of Tutorial)
           315 kV equivalent: See Subsystem2 on next page
           Transformer: 250 MVA/phase; Primary/secondary leakage reactances: 0.15pu/0.0 pu
           Saturation knee point: 1.20 pu; Xair core: 0.4 pu
           The system shown in Figure 2-1 consists of a 735 kV, 300 km transmission line
           fed by an equivalent system. The line is 40% series compensated at its center
           and it is shunt compensated at both ends. At its receiving end the line is
           connected to a 315 kV network through a 735/315 kV transformer. Only one
           phase of the system is represented. To study the transient behavior of this
           circuit when a phase-to-ground fault is applied at bus B2.
                                                                                                                                                 2-3
2   Case Studies
Subsystem 1 Subsystem 2
Series Compensation
2-4
                                               Series Compensated Transmission Network
This data is the current and flux values at points 1, 2, and 3 of the piecewise
linear approximation to the flux linkage curve shown in Figure 2-2.
                                                                                      2-5
2   Case Studies
Bus B2 R1 X1 X2 R2 Bus B3
                                                         Rm                X
                                                                               m                              Ideal transformer
                                                                          X
                                                                              s
                                                                                         slopeXS = X ac – X 1
                                                    Ψ
                                                                                               point 3
                                   1.45pu
                                                               point 2
                                    1.2pu
                                                                               slope
                                                                               Xm=1000pu
                                     flux linkage (pu)
point 1
                                                                                                               i
                                                               0.0012pu                          1pu
                                                                  current (pu/250 MVA)
2-6
                                                 Series Compensated Transmission Network
In addition to the two voltage source inputs, the list of inputs contains the
currents in the three nonlinear elements (last three lines of input matrix).
   inputs =
   U_Vs1
   V_Subsystem2/vs2
   I_Breaker
   I_250MVA_core
   I_Series Compensation/MOV
                                                                                        2-7
2   Case Studies
                      U_Breaker
                      U_250MVA_core
                      U_Series Compensation/MOV
                      I_i1
                      I_i2
                      U_ub2
                      I_Series Compensation/I_MOV
                      U_Series Compensation/v
                   Frequency Analysis
                   Once the state-space model of the linear system is available, you can obtain the
                   frequency response of the system. The I_Breaker input and the U_Breaker
                   output are used to measure the impedance at bus B2 where the circuit breaker
                   is connected.
                   If you have the Control System Toolbox, you can compute the impedance of the
                   network as function of frequency by using the bode function. In the Laplace
                   domain, the impedance at bus B2 is defined as the transfer function between
                   the current injected at bus B2 (input 3 of the system) and the voltage measured
                   at the same bus (output 1 of the system)
                                 U_breaker ( s )
                       Z ( s ) = ---------------------------------------
                                  I_Breaker ( s )
                   You can calculate and visualize the impedance at bus B2 for the 0-500Hz range
                   as follows:
                      freq=0:500;
                      w=2*pi*freq;
                      [mag,phase]=bode(A,B,C,D,3,w);
                      plot(freq,mag(:,1));
2-8
                                                                                          Series Compensated Transmission Network
                          700
                                                                                 334 Hz Mode
                          600
                          500           Subsynchronous
                                        Mode (14.7 Hz)
Impedance at bus B1 (Ω)
                          400
                                               735 kV equivalent
                                                 Mode (89.5 Hz)
                          300
200
100
                                0
                                    0                    100       200                    300         400         500
                                                                         Frequency (Hz)
                                                                                                                              2-9
2   Case Studies
                   The frequencies of the oscillatory modes can be found from the imaginary parts
                   of the eigenvalues of matrix A
                      imag(eig(A))/2/pi
ans =
1.0e+03 *
                            0
                            0
                       1.2381
                      -1.2381
                       1.0531
                      -1.0531
                       0.7208
                      -0.7208
                       0.3349
                      -0.3349
                       0.2358
                      -0.2358
                       0.0895
                      -0.0895
                       0.0147
                      -0.0147
                            0
                            0
                   The 14.7, 89.5, and 334.9 Hz modes clearly appear on the impedance seen from
                   bus B1. The 14.7 Hz mode is mainly due to a parallel resonance of the series
                   capacitor with the shunt inductors. The 89.5 Hz mode is the first pole of the 735
                   kV equivalent network. These three modes are likely to be excited at fault
                   clearing.
2-10
                                              Series Compensated Transmission Network
Alternatively, these variables are in the workspace and may be plotted from
the MATLAB command line.
                                                                                   2-11
2   Case Studies
                                                    3
                                                x 10
                                        1000
                   Ub2 (kV)
                                           0
                                        -1000
                                           2
                   i1 (kA)
                                           -2
                                          500
                   Ucs (kV)
                                         -500
                                           10
                   IMOV (kA)
                                          -10
                                            1
                    Imag transfo (kA)
                                            0
                                           -1
                                                0       0.05   0.1   0.15        0.2   0.25   0.3   0.35   0.4
Time (s)
                   Figure 2-4 Voltage and Current Waveforms for the Series Compensation Case
                   Study
2-12
                                                                         Chopper-Fed DC Motor Drive
                          Th1            Ia
                                                  DC Motor
                                                                  Mechanical load
                                          +
                                                       La    Tm
            Vdc
                  +               D1      Va                         J, B, TL
                                                       Ra
                  -
                                                      +
                                              -        E
                                                      -
                                                                                               2-13
2   Case Studies
                   Th1
                                 αT
Va
                                                                       Va(avg)
                                                                                   t
                                        Ia
                                                                             Ia(avg)
                   The average armature voltage is a direct function of the chopper duty cycle α
                         Va(avg) = α.Vdc
2-14
                                                                                                      Chopper-Fed DC Motor Drive
Note that this relation is valid only when the current is continuous. In
steady-state, the armature average current is equal to:
                     V a ( avg ) – E
       I a ( avg ) = ---------------------------------
                                  Ra
                                           – αr            –r           – ( 1 – α )r
           Vdc ( 1 – e                          +e –e                                        )
      ∆i = ----------- -----------------------------------------------------------------------
             Ra                                               –r
                                                  1–e
where α is the duty cycle and r is the ratio between the chopper period and the
electrical time constant at the variable-speed DC motor drive.
                            T
              r = -----------------------
                  ( La ⁄ Ra )
       +                                           +                DC
Vdc                              Chopper
       -                                                           Motor
                                                    -
                                      a                    Current
                                                           Sensor                            Speed
                                 Current
                                Controller                                                   Sensor
                                               Ia
                                      -
                            Ia* +
                                Speed
                              Controller
                                               w
                                  +        -
                                 w*
                          Speed Reference
                                                                                                                            2-15
2   Case Studies
                   The motor torque is controlled by the armature current Ia, which is regulated
                   by a current control loop. The motor speed is controlled by an external loop that
                   provides the current reference I a* for the current control loop.
2-16
                                                           Chopper-Fed DC Motor Drive
Electrical
Mechanical
             dω
     T m = J -------- + Bω + T L
              dt
The initial motor speed can be set to any desired value by using the ω0 input
of the DC Motor block.
The motor used in this case study is a permanent-magnet DC motor having the
following parameters: Ra = 0.5 Ω, La = 10 mH, KE =1.23 V/rad/s, KT = 1.23
N.m/A. A 10mH inductor (Ls) is connected in series with the DC motor to
smooth the armature current.
The required trigger signal for the GTO thyristor is generated by a hysteresis
current controller, which forces the motor current to follow the reference within
+h/2 and -h/2 limits (h is the hysteresis band).
                                                                                    2-17
2   Case Studies
The current controller is also a masked block that contains the following.
                   Run the simulation by selecting Start from the Simulation menu in Simulink.
                   The motor voltage, current waveforms, and motor speed are displayed on three
                   scopes connected to the variables Va, Ia, and ω.
                   Once the simulation is completed, you can return to the MATLAB window to
                   examine the results with more details by using the plot function.
2-18
                                                                                  Chopper-Fed DC Motor Drive
Drive Starting
In this example, you simulate the starting transient of the DC drive. The
inertia of the mechanical load is small in order to bring out the details of the
chopper commutation details. The speed reference is stepped from 0 to
150 rad/s at t = 0.0 s and we observe the drive variables, speed, and current.
The transient responses for the starting of the DC motor drive are shown in
Figure 2-9.
Note that the final system state vector can be saved by checking the Final State
box in the Workspace I/O/ Save to Workspace in the Simulation parameters
window.
150
100
50
                                   0
                                       0   0.5                               1                   1.5
                                                         Time , s
35
                                  30
           Armature current , A
25
20
15
10
                                   0
                                       0   0.5                               1                   1.5
                                                         Time , s
                                                                                                        2-19
2   Case Studies
                                                                  8
                                          Armature current , A
                                                                 0
                                                                 0.05   0.051   0.052   0.053    0.054    0.055     0.056    0.057   0.058   0.059
                                                                                                         Time , s
                                                       300
                   Armature voltage , V
200
100
                                          −100
                                             0.05                       0.051   0.052   0.053    0.054    0.055     0.056    0.057   0.058   0.059
                                                                                                         Time , s
2-20
                                                                                                       Chopper-Fed DC Motor Drive
Replace the constant wref and TL blocks in the diagram by two Simulink step
functions with different starting times. The final state vector obtained with the
previous simulation can be used as the initial condition so that the simulation
will start from steady-state. Select Workspace I/O/Load initial in the
Simulation parameters window and restart the simulation. The obtained
response of the DC motor drive to successive changes in speed reference and
load torque is shown in Figure 2-11.
                        150
Motor speed , rad/s
100
50
                                   0
                                       0   0.2   0.4       0.6       0.8       1        1.2      1.4         1.6   1.8   2
                                                                            Time , s
35
                                  30
           Armature current , A
25
20
15
10
                                   0
                                       0   0.2   0.4       0.6       0.8       1        1.2      1.4         1.6   1.8   2
                                                                            Time , s
References
[1] Leonhard,W. Control of Electrical Drives. Springer-Verlag, Berlin 1985.
                                                                                                                             2-21
2   Case Studies
                   Introduction
                   Traditionally, stabilization of power systems was ensured by linear regulators
                   such as the automatic voltage regulator (AVR), the speed governor, or the
                   power system stabilizer (PSS). These compensators assume a linearized model
                   of the power system around an operating point.
                   The demand for improved performance has created the need to operate power
                   systems closer to the limits and therefore well outside the linear domain.
                   Nonlinearities begin to have a significant effect then, especially after
                   important disturbances that lead to a large variation of the operating point.
                   We propose to design a nonlinear controller that takes into account all the
                   nonlinearities of the model. The objective of the controller is to regulate both
                   the terminal voltage and the internal power angle. The control inputs are the
                   field excitation voltage and the gate opening of the turbine.
2-22
                                                                Synchronous Machines and Regulators
Mathematical Model
The model considered is a single machine infinite bus (SMIB) system, as shown
in Figure 2-12. The machine is a synchronous generator driven by a hydraulic
turbine.
                                  Le          Re
 Synchr.                                                          Infinite
 Machine                                                          Bus
                                       Line
                                                      Fault
                                                      Breaker
                  Turbine
The dynamic equations of the machine that are used to derive the linear
feedback controller are for the three-phase Synchronous Machine Hydraulic
Turbine and Governor blocks (see Chapter 4, “Block Reference”). Because the
synchronous machine is connected to an infinite bus, the dq terminal voltages
vd and vq are constrained by the load equations. In the Park-transformed
coordinates, we can write:
   vd             id          d id          i
                                     – ωL e q + V cos ( δ – a )
                                                 ∞
           = Re        + Le
   vq             iq          dτ i         – id    – sin ( δ – a )
                                   q
This equation can be combined with the complete model of the SMIB system in
                               ·
the nonlinear state-space form x = F ( x ) + G ( x )u.
                                                                                               2-23
2   Case Studies
                                A 11 x 1 + A 12 x 3 + A 13 x 2 x 7 + A 14 x 4 + A 15 x 5 x 7 + A 16 cos ( x 6 – a )
                                A 21 x 1 x 7 + A 22 x 2 + A 23 x 3 x 7 + A 24 x 4 x 7 + A 25 x 5 + A 26 sin ( x 6 – a )
                                A 31 x 1 + A 32 x 3 + A 33 x 2 x 7 + A 34 x 4 + A 35 x 5 x 7 + A 36 cos ( x 6 – a )
                                A 41 x 1 + A 42 x 3 + A 43 x 2 x 7 + A 44 x 4 + A 45 x 5 x 7 + A 46 cos ( x 6 – a )
                                A 51 x 1 x 7 + A 52 x 2 + A 53 x 3 x 7 + A 54 x 4 x 7 + A 55 x 5 + A 56 sin ( x 6 – a )
                                ( x 7 – 1 )ω r
                     F( x ) =
                                                                                                                     3
                                                                                                               x8
                                A 71 x 1 x 2 + A 72 x 2 x 3 + A 73 x 2 x 4 + A 74 x 1 x 5 + A 75 x 7 + A 76 -----------2-
                                                                                                            x7x9
                                                 2
                                            x8
                                A 81 – A 82 -----2
                                            x9
                                A 91 x 9
                                                                       T
                                g 11 0 g 31 g 41 0 0 0 0 0
                    G(x) =
                                 0 0 0           0 0 0 0 0 g 92
                   You can find the explicit expressions of the coefficients A and g in Chapter 4,
                   “Block Reference” and are omitted here for simplicity. The other terms of the
                   state-space equation are defined as follows:
                                                                   T
                   • x = i d i q i fd i kd i kq δ ω q G                  is the vector of state variables
                                       T
                   • u = v u               is the vector of control inputs
                          fd G
                   The currents id, iq and voltages vd, vq are the projection of the actual line
                   currents and terminal voltages on the direct and quadrature axes (d-q frame).
                   ifd and vfd represent the field current and voltage. ikq and ikd , the damper
                   windings currents, and ω the angular speed of the machine. δ is the electrical
2-24
                                                                  Synchronous Machines and Regulators
                           2       2
    y1 = Vt =            Vd + V q
         dy 1
                = α 1 ( x ) + β 11 ( x )u1 + β 12 ( x )u2 ,   where
         dt
              ∂Vt
      α (x) =     ⋅ F( x)
       1      ∂x
                     1             ∂V d        ∂Vq
                = ----------  2V d      + 2V q     F( x)
                  2V t             ∂x          ∂x 
                    ∂Vt
     β 11 ( x ) =         ⋅ G1 ( x )
                    ∂x
                     1             ∂V d        ∂Vq
                = ----------  2V d      + 2V q     G (x)
                  2V t             ∂x          ∂x  1
                    ∂Vt
     β 12 ( x ) =         ⋅ G2 ( x )
                    ∂x
                = 0
                                                                                                 2-25
2   Case Studies
                   The second output, y2, is the angle δ , which has to be differentiated three times
                   before the inputs appear, which yields:
                         3
                        d y2      ∂F 7                ∂F 7                    ∂F 7
                             = ωr      ⋅ F ( x ) + ωr      G 1 ( x )u 1 + ω r      G 2 ( x )u 2
                           3      ∂x                  ∂x                      ∂x
                        dt
                                = α 2 ( x ) + β 21 ( x )u 1 + β 22 ( x )u 2
                   If you can combine the equations of the outputs, you obtain the input-output
                   nonlinear system:
                          (1)
                         y1               α1( x )        β 11 ( x )       0      u1
                                    =                +
                          (3)             α2( x )        β 21 ( x ) β 22 ( x ) u2
                         y2
                                                               –1
                        u1              β 11 ( x )       0                α1 ( x )       v1
                                =                                     –              +
                        u2              β 21 ( x ) β22 ( x )              α2 ( x )       v2
                          (1)
                         y1               v1
                                    =
                          (3)             v2
                         y2
                   Once the system has been linearized, you can apply any linear control design
                   to regulate the outputs. Here, we have chosen the pole placement method and
                   propose the following linear control law:
                        v 1 = k 11 ( V t – V tref )
                                                          · ·                  ·· ··
                        v 2 = k 21 ( δ – δ ref ) + k 22 ( δ – δ ref ) + k 23 ( δ – δ ref ) + k 24 ( x 9 – x 9ref )
2-26
                                                 Synchronous Machines and Regulators
Simulation Results
You can test performance of the nonlinear controller on the nonlinear
turbine-generator system. The controller and turbine are simulated using
Simulink blocks while the generator is represented by the Synchronous
Machine block from the powerlib library. A three-phase short-circuit has been
simulated on the load busbar, and the fault has been cleared after 100 ms. The
performance of the nonlinear controller is analyzed.
The case study is included in the psbregulator.mdl file. The system is
illustrated in Figure 2-13. Before running the simulation, make sure that the
simulation parameters are set as follows:
                                                                                  2-27
2   Case Studies
2-28
                                              Synchronous Machines and Regulators
References
[1] Akhrif O., F.A. Okou, L.A. Dessaint, R. Champagne, “Multi-input
Multi-output Feedback Linearization of a Synchronous Generator.” Canadian
Conference on Electrical and Computer Engineering, 1996.
                                                                             2-29
2   Case Studies
2-30
                                                Variable-Frequency Induction Motor Drive
                                L
                                           +
60 Hz
                                                                 Induction
Power                               C    Vdc                       Motor
 Grid
                                           -
                               Dc link
V f
The power grid AC voltage is converted into a fixed DC voltage by the rectifier.
The harmonics are filtered out by an LC filter to provide a smooth DC voltage
which is then applied to the inverter input.
The inverter consists of six power switches that can be Mosfets, IGBTs, or
GTOs, depending on the drive power capacity. Figure 2-16 shows a simplified
diagram of a Mosfet inverter.
  +
                                                A
Vdc                                                B
                                                C
      -
                                                                                    2-31
2   Case Studies
2-32
                                                                             Variable-Frequency Induction Motor Drive
                                                  ia
      +                        PWM                     ib        Induction
Vdc                           Inverter                      ic     Motor
      -
                                                                                     Speed
                             Current                                                 Measurement
                           Controllers
                   Function                       ω
                   Generator             +   +
                      ωr
                   Speed
                 Controller
                                    ω
                              -
                      +
           Speed
          Reference        ω∗
                                                                                                                 2-33
2   Case Studies
                   frequency ωs, which represents the stator current frequency, is simply the sum
                   of the motor speed ω and the slip frequency ωr.
                   The air gap flux is controlled in an open loop by a function generator that
                   relates the current amplitude Is to the rotor frequency ωr according to the
                   following function
                                     2                               2
                                R r + ( ω r L rr )
                      I s = I m ----------------------------------------
                                     2                              2
                                R r + ( ω r L lr )
2-34
                                                                   Variable-Frequency Induction Motor Drive
                                                                                                       2-35
2   Case Studies
                   The current control section, (see Figure 2-20), located under the masked
                   Current controller block, consists of three hysteresis controllers, is built with
                   Simulink blocks. The motor currents are sensed by Current Measurement
                   blocks.
2-36
                                               Variable-Frequency Induction Motor Drive
The speed controller (see Figure 2-22), located under the Speed controller
block, is a proportional-integral (PI) type and is implemented using Simulink
blocks.
                                                                                   2-37
2   Case Studies
                   Run the simulation by selecting Start from the Simulation menu in Simulink.
                   The motor voltage and current waveforms as well as the motor speed are
                   displayed on three Scopes connected to the variables Vab, Is and ω.
                   Once the simulation is complete, return to the MATLAB window to examine
                   the results with more details by using the plot command.
2-38
                                                               Variable-Frequency Induction Motor Drive
Drive Starting
You can start the drive by specifying 0 initial conditions for all state variables
in Powergui interface. In this example, the speed reference is stepped from 0
to 100 rad/s at t = 0 and we observe the drive variables, speed, torque, and
current.
The transient responses for the starting of the induction motor drive are shown
in Figure 2-23.
Note that the final system state vector can be saved by selecting Workspace I/
O/Save final state in the Simulation parameters window.
100
50
                        0
                            0   0.5                                    1                   1.5
                       40
Motor torque , N.m
20
                      −20
                            0   0.5                                    1                   1.5
                       20
Motor current , A
                       10
                        0
                      −10
                      −20
                            0   0.5                                    1                   1.5
                                                Time , s
                                                                                                   2-39
2   Case Studies
                                                  10
                             Motor current , A
−5
−10
                                                 −15
                                                   0.1   0.105   0.11   0.115    0.12     0.125     0.13     0.135   0.14   0.145
400
                                                 200
                   Motor voltage , V
−200
                                        −400
                                           0.1           0.105   0.11   0.115    0.12     0.125     0.13     0.135   0.14   0.145
                                                                                         Time , s
2-40
                                                                            Variable-Frequency Induction Motor Drive
Replace the constant w and TL blocks in the diagram by two Simulink step
                        ref
functions with different starting times. The final state vector obtained with the
previous simulation can be used as initial condition so that the simulation will
start from steady-state. Select Workspace I/O/Load initial states in the
Simulation parameters window and restart the simulation.
100
50
                        0
                            0   0.2   0.4      0.6         0.8          1          1.2     1.4      1.6
                       40
Motor torque , N.m
                       30
                       20
                       10
                        0
                      −10
                            0   0.2   0.4      0.6         0.8          1          1.2     1.4      1.6
                       20
Motor current , A
                       10
                        0
                      −10
                      −20
                            0   0.2   0.4      0.6        0.8           1          1.2     1.4      1.6
                                                        Time , s
References
[1] Leonhard, W., Control of Electrical Drives. Springer-Verlag, Berlin 1985.
[2] Murphy, J. M. D., and F. G. Turnbull, Power Electronic Control of AC
Motors. Pergamon Press, Oxford 1985.
[3] Bose, B. K., Power Electronics and AC Drives. Prentice-Hall, Englewood
Cliffs 1986.
                                                                                                                2-41
2   Case Studies
                                                                  250 kV / 2 kA
                          5000 MVA                 600 MVA                  Smoothing   200 km   Smoothing
                                                   Wye-Delta                  Reactor     line    Reactor
                           315 kV
                          Equivalent
                                                        Uac                                      Inverter
                                                                                                  242 kV
                              320 Mvar      AC
                                         Filters                Pole
                                                               Control
Iord - + Id
2-42
                                                                 HVDC Transmission System
                                                                                     2-43
2   Case Studies
2-44
                                                                                                       HVDC Transmission System
Figure 2-28 (a) demonstrates the magnitude, seen from the busbar where the
filter is connected, of the combined filter and AC network impedance as a
function of frequency. The low principal natural frequency, coinciding with the
parallel resonance at 206 Hz, is a determining factor in the development of
overvoltages and interaction with the DC system. Figure 2-28 (b) illustrates
the magnitude of the impedance as a function of frequency of the DC system,
as seen from the rectifier. It is composed by the DC line, represented by four pi
sections and the two smoothing reactors.
Note the series resonance at 183 Hz, which corresponds to the main mode likely
to be excited, on the DC side, under large disturbances.
                  104
                                              Principal
                                              Mode (206 Hz)
                  103
Impedance (Ohm)
                                                                                              (a) AC system
                  102
101
                  100
                        0   100   200   300    400    500   600     700    800    900 1000
                                              Frequency (Hz)
105
                  104
Impedance (Ohm)
                  103
                                                                                              (b) DC system
                  102
                  101                    Principal
                                         Mode (183 Hz)
                  100
                        0   100   200   300     400   500     600    700    800    900 1000
Frequency (Hz)
                                                                                                                           2-45
2   Case Studies
2-46
                                                                                          HVDC Transmission System
For the moment, disregard the initialization period of the simulation to see how
the DC current and the firing angle respond to the current command changes
of 0.2 pu, at t=0.4 s and t = 0.7 s. The regulator integrator gain was 5000°/pu/
s, and the proportional gain was 50°/pu
2.5
                     2
Id (kA), Io (pu)
1.5
0.5
                     0
                         0   0.1   0.2   0.3       0.4        0.5            0.6    0.7   0.8    0.9     1
                                                           Time (S)
                                                              Alpha
                    35
30
                    25
alpha (deg)
20
15
10
                     5
                      0      0.1   0.2   0.3       0.4        0.5            0.6    0.7   0.8    0.9     1
                                                           Time (S)
                                                                                                              2-47
2   Case Studies
                   The following expression relates the mean direct voltage Vd to the direct
                   current Id and other parameters
Vd = ( Vdio × cos ( α ) ) – ( Rc × Id )
where Vdio is the ideal no-load direct voltage for a six pulse bridge:
Vdio = ( ( 3 2 ) ⁄ π ) × Vc
Rc = ( 3 ⁄ π ) × Xc
2-48
                                                                                         HVDC Transmission System
is practically the simulation value of 250 kV. The inverter direct voltage can be
found from
where Rdc is the resistance of the line and smoothing reactances (4 Ω). Finally,
another expression relates the mean direct voltage Vd to the commutation
angle also called the overlap angle µ.
The rectifier steady-state values are shown in Figure 2-31. Observe the
commutation time interval corresponding to the angle µ of 14°. Notice the
presence of the183 Hz oscillation in the α waveform related to the DC side
mode, which is still not damped after one second of simulation.
                                                                                                             2-49
2   Case Studies
                                                                               DC Voltage
                                  300
                                  280
                                  260
                    Vd (kV)
                                  240
                                  220                                          o
                                                                      m   14
                                  200
                                  180
                                             0.986     0.988   0.99       0.992             0.994   0.996   0.998   1
                                                                             Time (S)
                                                                               DC Current
                                  2.06
                                  2.04
                                  2.02
                    Id (kA)
                                    2
                                  1.98
                                  1.96
                                  1.94
                                             0.986     0.988   0.99       0.992             0.994   0.996   0.998   1
                                                                             Time (S)
                                                                           Delay Angle
                                  20.5
                                  20.4
                                  20.3
                                  20.2
                    alpha (deg)
                                  20.1
                                   20
                                  19.9
                                  19.8
                                  19.7
                                  19.6
                                            0.986      0.988   0.99       0.992             0.994   0.996   0.998   1
                                         Rated value                           Time (S)
                   Before you can simulate the DC line fault, you must bring the DC system to
                   steady-state operation. For the case study an artificial but fast initialization
                   method completely different from the one used for the actual operation of a
                   HVDC system. At the start, the required DC voltage is imposed by fixing α, but
                   with no back EMF. This allows a fast increase of the DC current. Full inverter
                   voltage is not applied until the DC current comes close to its rated value (2 kA).
                   Figure 2-29 shows how the current regulator output is forced to 20° during the
                   first 20 ms of simulation.
2-50
                                                              HVDC Transmission System
                                                                                     2-51
2   Case Studies
400 DC Voltage
                              200
                    Vd (kV)
                                   0
                           -200
                           -400
                                        0   0.05   0.1    Time (S)     0.15         0.25
                                                         DC current
                                    4
                                    3
                   Id (kA)
                                    2
                                    1
                                    0
                                   -1
                                        0   0.05   0.1                 0.15         0.25
                                                          Time (S)
                                                         Delay angle
                                  100
                                   80
                    Alpha (deg)
                                   60
                                   40
                                   20
                                    0
                                        0   0.05   0.1                 0.15         0.25
                                                          Time (S)
                                                         AC Voltage
                           400
                           200
                   Va (Kv)
                             0
                          -200
                          -400
                          -600
                                        0   0.05   0.1                 0.15   0.2   0.25
                                                          Time (S)
                   References
                   [1] Arrilaga, J., High Voltage Direct Current Transmission, IEE Power
                   Engineering Series 6, Peter Peregrinus Ltd., 1983.
                   [2] Electromagnetic Transients Program (EMTP), Workbook IV (TACS),
                   EL-4651, Volume 4, Electric Power Research Institute, 1989.
2-52
                  3
Advanced Topics
3   Advanced Topics
                      • Sorts all the blocks contained in the system into two categories: the Simulink
                        blocks and the Power System blocks. Then it gets the block parameters and
                        evaluates the network topology. The Power System blocks are separated into
                        linear and nonlinear blocks, and each electrical node is automatically given
                        a node number.
                      • Once the network topology has been obtained, the state-space model of the
                        linear part of the circuit is computed by the Circ2ss function. All
                        steady-state calculations and initializations are performed at this stage.
                      • Builds the Simulink model of your circuit and stores it inside one of the
                        measurement blocks. This means that you need at least one current or
                        voltage measurement in your model. The connections between the
                        equivalent circuit and measurements blocks are performed by invisible links
                        using the Goto and From blocks.
3-2
                                                    How the Power System Blockset Works
                                       Simulink library
                  Draw circuit
                                       powerlib library
Start Simulation
                Power2sys
     -Analyze network topology
     -Get circuit parameters
                   Circ2ss
    -Compute state-space model
      of linear circuit.
    -Compute steady-state and
      initial conditions.
powerlib_models library
               Power2sys
   -Build the Simulink Model.
   -Initialize nonlinear models                           Powergui
                                                -Display steady state info.
                                                -Change initial conditions
                   Simulink                      -Initialize machines (Load Flow)
              starts simulation
The Simulink model uses a state-space block to model the linear part of the
circuit. Pre-defined Simulink models are used to simulate nonlinear elements.
These models can be found in the powerlib_models library available with the
Power System Blockset. Simulink source blocks connected at the input of the
state-space block are used to simulate the electrical sources blocks.
                                                                                    3-3
3   Advanced Topics
                      The following figure represents connections among the parts of the Simulink
                      model. The nonlinear models are connected in feedback between voltage
                      outputs and current inputs of the linear model.
                                                  Linear circuit
                         Sources                                             Outputs from
                          (inputs)                 State-space     y         measurements
                                              u
                                                   matrices                  blocks
                                         i                             v
                                              Nonlinear models
                      Once Power2sys has completed the initialization process, Simulink starts the
                      simulation and you can observe waveforms on scopes connected at the outputs
                      of your measurement blocks.
                      If you stop the simulation and drag a copy of the Powergui block into your
                      circuit window, you will have access to the steady-state values of inputs,
                      outputs, and state variables displayed as phasors. You can also use the
                      Powergui interface to modify the initial conditions. Finally the Powergui
                      allows you to perform a load flow with circuits involving three phase machinery
                      and initialize the machine models so that the simulation starts in steady-state.
                      This feature avoids long transients due to mechanical time constants of
                      machines.
3-4
                                                                     The Nonlinear Model Library
           All the nonlinear blocks are simulated as current sources. They use a voltage
           input (output of the state-space model of the linear circuit) and their current
           output is fed into the state-space model. For complex models such as electrical
           machines requiring several inputs and outputs, vectorized signals are used.
           Useful internal signals are also returned by most of the models in a
           measurement output vector.
           For example, the Asynchronous Machine model is stored in the block named
           async_mac. The model uses as inputs a vector of four voltages: two rotor
           voltages (VabR and VbcR) and two stator voltages (VabS and VbcS).
           It returns a vector of four currents: two rotor currents (IaR and IbR) and two
           stator currents (IaS and IbS). The model also returns a measurement output
           vector of 20 signals that are accessible from an internal Goto block. When the
                                                                                             3-5
3   Advanced Topics
3-6
                                                        Which Integration Algorithm Must Be Used
                                                                                             3-7
3   Advanced Topics
                      • Very fast modes may be created by switching circuits. Such is the case when
                        a circuit breaker or an electronic switch is connected across a capacitor. The
                        switch internal R-L impedance together with the capacitance C of the linear
                        circuit may produce fast poorly damped frequencies that will slow down the
                        simulation. You will find in the reference documentation of the circuit
                        breaker a selection criterion to be used for the switch Ron, Lon parameters,
                        thus allowing damping of undesired high frequency modes.
                      • Simulating large systems or complex power electronic converters may be
                        time consuming. If you have to repeat several simulations from a particular
                        operating point you can save time by specifying a vector of initial states in
                        the Simulation/Parameters/Workspace IO menu. You have to save this
                        vector of initial conditions from a previous simulation run.
                      • Reducing the number of open scopes and the number of returned points will
                        also help in reducing the simulation time.
                      • For circuits containing large control systems, the processing time required
                        by Power2sys can also be reduced. Because Power2sys systematically
                        explores all the blocks and their sub-blocks in order to build the network
                        topology, this processing may become time consuming when your circuit is
                        associated to a large number of Simulink blocks. You can prevent Power2sys
                        from exploring these Simulink blocks by preceding their names with a dollar
                        sign. For example: $control_block. To use this option, you must make sure
                        that no powerlib blocks are contained in $control_block.
3-8
                                                                 Changing Your Circuit Parameters
                                                                                              3-9
3   Advanced Topics
3-10
                  4
Block Reference
4 Block Reference
 4-2
                                                                 The Power System Block Libraries
           • The Electrical Sources library contains blocks that generate electric signals
           • The Elements library contains linear and nonlinear network elements
           • The Power Electronics library contains power electronics devices
           • The Machines library contains machinery models
           • The Connectors library contains blocks that can be used to interconnect
             blocks in various situations
           • The Measurements library contains blocks for the current and voltage
             measurements
           • The powerlib Extras library contains the powerlib Extra block library of
             tri-phase blocks and specialized measurements and control blocks. These
             blocks are not documented in the block reference section.
           • The Demos library contains useful demos and case studies. These demos are
             not documented in the block reference section.
                                                                                              4-3
4 Block Reference
 4-4
                                                   The Power System Block Libraries
                                                                                4-5
4 Block Reference
 4-6
                                                                 AC Current Source
Description   The AC Current Source block implements an ideal AC current source. The
              positive current direction is indicated by the arrow in the block icon. The
              generated current is described by the following relationship:
                  I=Amplitude x sin(2pi x Frequency x t + Phase x pi/180)
              Negative values are allowed for amplitude and phase. Negative frequency is
              not allowed, otherwise Simulink signals an error, and the block will display a
              question mark in the block icon. You can modify the three source parameters
              at any time during the simulation.
Dialog Box
                                                                                               4-7
AC Current Source
Example    Parallel connection of two Current Source blocks is used to sum two sinusoidal
           currents in a resistor.
4-8
                                                               AC Voltage Source
Description   The AC Voltage Source block implements an ideal AC voltage source. The
              output and input of the block correspond respectively to the positive and
              negative terminals of the source. The generated voltage U is described by the
              following relationship:
                  U=Amplitude x sin(2pi x Frequency x t + Phase x pi/180)
              Negative values are allowed for amplitude and phase. Negative frequency is
              not allowed, otherwise Simulink signals an error, and the block will display a
              question mark in the block icon. You can modify the three source parameters
              at any time during the simulation.
Dialog Box
                                                                                               4-9
AC Voltage Source
Example    Two Voltage Source blocks at different frequencies are connected in series
           across a resistor. The sum of the two voltages is read by a Voltage
           Measurement block.
4-10
                                                        Asynchronous Machine
              • d: d axis quantity
              • q: q axis quantity
              • r: rotor quantity
              • s: stator quantity
              • l: leakage inductance
              • m: mutual inductance
                                                                                                 4-11
Asynchronous Machine
Electrical System
                      ωeφds                                                  ωeφqs
                   Rs + - Lls        L’lr      R’r                        Rs - + Lls       L’lr      R’r
            +                                          +             +                                       +
                              d                                     ϕ qs = L s i qs + L m ′ qr
           V qs = R s i qs + ------ ϕ qs + ω e ϕ ds         where
                             dt
                                                                    ϕ ds = L s i ds + L m i′ dr
                                 d
           V ds    = R s i ds + ------ ϕ ds – ω e ϕ qs              ϕ′ qr = L′ r i′ qr + L m i qs
                                dt
                                 d                                  ϕ′ dr = L′ r i′ dr + L m i ds
           V′ qr = R′ r i′ qr + ------ ϕ′ qr
                                dt                                    L s = L ls + L m
                                   d
           V′ dr   = R′ r i′ dr + ------ ϕ′ dr                       L′ r = L′ lr + L m
                                  dt
             T e = 1.5p ( ϕ ds i qs – ϕ qs i ds )
          Mechanical System
                     d        1
                       ω = -------- ( T e – Fω r – T m )
                     dt r  2H
                          dθ
                             = ωr
                          dt
4-12
                                                              Asynchronous Machine
Parameters   In the powerlib library you can choose between two Asynchronous Machine
and Dialog   blocks to specify the electrical and mechanical parameters of the model.
Boxes
                                                                                                 4-13
Asynchronous Machine
          If you choose to enter the parameters in S.I. units, you must first enter the
          nominal power (VA), line-to-line rms voltage (V) and frequency (Hz). The
          second entry is the stator resistance (ohm) and leakage inductance (H). The
          third entry is the rotor resistance (ohm) and leakage inductance (H), both
          viewed from the stator. The fourth entry is the mutual inductance (H). The fifth
          entry is the inertia (kg.m2), the viscous friction coefficient (N.m.s) and the
          number of pole pairs. Finally, the sixth entry is where you specify initial slip,
          electrical angle (degrees) and stator currents (magnitude in A, phase angle in
          degrees).
4-14
                                         Asynchronous Machine
If you choose to enter the parameters in per unit, you must enter at the first
line the nominal power (VA), line-to-line rms voltage (V) and frequency (Hz).
You then enter the electrical and mechanical parameters expressed in pu, with
the exception of H, which is expressed in s. Initial conditions are entered the
same way as in the S.I. units case, except that the current magnitudes are in
pu.
                                                                                  4-15
Asynchronous Machine
             Note: These two blocks simulate the same asynchronous machine model. The
             only difference is that the parameters are expressed in different units.
Inputs and   The electrical inputs of the block are the three electrical connections of the
Outputs      stator, and the electrical outputs are the three electrical connections of the
             rotor. Note that the neutral connections of the stator and rotor windings are
             not available; three-wire Y connections are assumed. The rotor’s connections
             should ordinarily be short-circuited or connected to an external circuit, for
             example external resistors or a power converter.
             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 source delta connection, you must only use
             two sources connected in series:
4-16
                                                 Asynchronous Machine
The Simulink input of the block is the mechanical torque at the machine’s
shaft. This input must be positive in the motoring mode and negative in the
generating mode.
The Simulink output of the block is a vector containing 20 variables. They are,
in order (refer to “Description” section, all currents flowing into machine):
                                                                                  4-17
Asynchronous Machine
Limitations   The Asynchronous Machine block does not include a representation of the
              effects of stator and rotor iron saturation.
Example       This example illustrates the use of the Asynchronous Machine block in
              motoring mode. It consists of an asynchronous machine in an open-loop speed
              control system. The machine’s rotor is short-circuited and the stator is fed by a
              PWM inverter, which is built with Simulink blocks and interfaced to the
              Asynchronous Machine block through the Controlled Voltage Source blocks.
              The inverter uses sinusoidal pulse-width modulation, which is described in [1].
              The base frequency of the sinusoidal reference wave is set at 60 Hz and the
              triangular carrier wave’s frequency is set at 360 Hz. The 3 HP machine is
              connected to a constant load of nominal value (11.87 N.m). It is started and
              reaches the setpoint speed of 0.5 pu at t=1.0 second, at which time the setpoint
              is stepped to 0.75 pu. The parameters of the machine are those found in the SI
              dialog box.
4-18
                                         Asynchronous Machine
Run the simulation by choosing Start from the Simulation menu. Once the
simulation is completed, observe the machine’s speed and torque.
                                                                               4-19
Asynchronous Machine
          The top graph shows the machine’s speed going from 0 to 810 rpm (0.5 pu) and
          then to 1252 rpm (0.75 pu). The bottom graph shows the electromagnetic
          torque developed by the machine. Since the stator is fed by a PWM inverter, a
          noisy torque is observed.
          This noise is not visible in the speed however because it is filtered out by the
          machine’s inertia, but it can also be seen in the stator and rotor currents, which
          are observed next.
4-20
                                         Asynchronous Machine
Finally, look at the output of the PWM inverter. Because nothing of interest
can be seen at the simulation time scale, the graph concentrates on the
moments preceding and following the speed step (around 1 second).
                                                                               4-21
Asynchronous Machine
References   [1] Dubey G.K., Power Semiconductor Controlled Drives, section 8.1.4,
             Prentice-Hall, Inc., 1989.
4-22
                                                                                        Breaker
Purpose       4Breaker
              Implement a circuit breaker opening at current zero crossing
Dialog Box
                                                                                                     4-23
Breaker
Limitations   The circuit breaker is modeled as a current source driven by the voltage
              appearing across its terminals. Therefore, it cannot be connected in series with
              an inductor or another current source. You can avoid this by connecting a large
              resistor across its terminals. The internal breaker inductance cannot be set
              to zero. However, a null resistance is allowed.
              It can happen that a breaker is connected across a capacitor. Depending on the
              capacitor value, breaker resistance and inductance, a high-frequency poorly
              damped oscillatory voltage, and current oscillation can be produced when the
              breaker closes. If the breaker parameters (Ron, Lon) are not properly selected,
              this will result in a slow simulation speed. This situation can arise, when a
              circuit breaker is used to simulate a phase-to-ground fault at one end of the PI
              line section.
              To damp this high frequency mode, set the inductance of the circuit breaker
              sufficiently small. A good practice is to achieve a damping factor z<0.5 for the
              RLC circuit formed by the circuit breaker and the capacitor. This condition is
              obtained for
                 L on < R on
                          2
                             C
              For example, for a capacitor C=1µF and a breaker resistance Ron=0.01Ω, the
              breaker inductance Lon should be selected so that:
                              – 10
                  L on ≅ 10          H
              You must use a stiff integration algorithm to simulate circuits with a circuit
              breaker. Ode15s usually gives the best simulation speed.
4-24
                                                                     Breaker
Current(A)
Time(s)
Control
Time(s)
                                                                                4-25
Bus Bar
Description   The Bus Bar block is used to interconnect components. It allows multiple
              electrical block outputs and inputs to be connected together.
Dialog Box
Example A three input, one output bus bar is used to connect three elements in parallel.
4-26
                                                                  Bus Bar
                                                                       4-27
Circ2ss
Purpose       4Circ2ss
              Compute the state-space model of a linear electrical circuit
Synopsis      You must call circ2ss with a minimum of seven input arguments.
                    [A,B,C,D,states,x0,x0sw,rlsw,u,x,y,freq,Asw,Bsw,Csw,Dsw,Hlin]=
                    circ2ss(rlc,switches,source,line_dist,yout,y_type,unit)
              You can also specify additional arguments. To use options, the number of input
              arguments must be 12, 13, 14 or 16.
                    [A,B,C,D,states,x0,x0sw,rlsw,u,x,y,freq,Asw,Bsw,Csw,Dsw,Hlin]=
                    circ2ss(rlc,switches,source,line_dist,yout,y_type,unit,net_arg1,
                    net_arg2,net_arg3,...
                    netsim_flag,fid_outfile,freq_sys,options,vary_name,vary_val)
4-28
                                                                                    Circ2ss
            with the linear circuit through voltage outputs and current inputs of the
            state-space model. You can find the models of the nonlinear elements provided
            with the Power System Blockset in the powerlib_models library.
Input       The number of input arguments must be 7, 12, 13, 14, or 16. Arguments 8 to 16
Arguments   are optional. The first seven arguments that must be specified are (see format
            following):
            • rlc: Branch matrix specifying the network topology as well as the resistance
              R, inductance L, and capacitance C values.
            • switches: Switch matrix. Specify an empty variable if no switches are used.
            • source: Source matrix specifying the parameters of the electrical voltage and
              current sources. Specify an empty variable if no sources are used.
            • line_dist: Distributed parameter line matrix. Specify an empty variable if
              no distributed lines are used.
            • yout: String matrix of output expressions.
            • y_type: Integer vector indicating output types (zero for voltage output, one
              for current output).
            • unit: String specifying the units to be used for R L and C values in the rlc
              matrix. If unit= ’OHM’, R L C values are specified in ohms at the fundamental
              frequency specified by freq_sys (default value is 60Hz). If unit= ’OMU’, R L
              C values are specified in ohms, millihenries (mH) and microfarads (µF).
            The following arguments are optional. Some of them are used to pass
            arguments from the power2sys function. Hereafter, we describe only the
            arguments to be specified when circ2ss is used as a stand-alone function.
                                                                                              4-29
Circ2ss
Output      • A,B,C,D: State-space matrices of the linear circuit with all switches open.
Arguments     A (nstates, nstates), B (nstates, ninput), C (noutput, nstates), D
              (noutput, ninput) where nstates is the number of state variables, ninput is
              the number of inputs, and noutput is the number of outputs.
            • states: String matrix containing the names of the state variables. Each
              string has the following format:
              -Inductor currents: Il_bxx_nzz1_zz2
              -Capacitor voltages: Uc_bxx_nzz1_zz2
              where:
              -xx = branch number
              -zz1= 1st node number of the branch
              -zz2 = 2nd node number of the branch
4-30
                                                                                             Circ2ss
                The last lines of the states matrix, which are followed by an asterisk, indicate
                inductor currents and capacitor voltages which are not considered as state
                variables. This situation arises when inductor currents or capacitor voltages
                are not independent (inductors in series or capacitors forming a loop). The
                currents and voltages followed by an asterisk can be expressed as a linear
                combination of the other state variables:
                • x0: Column vector of initial values of state variables considering the open or
                  closed status of switches
                • x0sw: Vector of initial values of switch currents
                • rlsw: Matrix (nswitch,2) containing the R and L values of series switch
                  impedances in Ohm and Henry. nswitch is the number of switches in the
                  circuit.
                • u,x,y: Matrices u(ninput, nfreq), x (nstates, nfreq) and y (noutput, nfreq)
                  containing the steady-state complex values of inputs, states, and outputs.
                  nfreq is the length of the freq vector. Each column corresponds to a different
                  source frequency, as specified by the next argument freq.
                • freq: Column vector containing the source frequencies ordered by increasing
                  frequencies
                • Asw,Bsw,Csw,Dsw: State-space matrices of the circuit including the closed
                  switches. Each closed switch adds one extra state to the circuit.
                • Hlin: Three dimension array (nfreq, noutput, ninput) of the nfreq complex
                  transfer impedance matrices of the linear system corresponding to each
                  frequency of the freq vector
                Each line of the RLC matrix must be specified according to the following format:
                [node1,   node2,   type,   R,   L,   C,   Nobr]   for RLC or line branch
                [node1,   node2,   type,   R,   L,   C,   Nobr]   for transformer magnetizing branch
                [node1,   node2,   type,   R,   L,   U,   Nobr]   for transformer winding
                [node1,   node2,   type,   R,   L,   U,   Nobr]   for mutual inductances
                                                                                                       4-31
Circ2ss
          • node1: First node number of the branch. The node number must be positive
            or zero. Decimal node numbers are allowed.
          • node2: Second node number of the branch. The node number must be positive
            or zero. Decimal node numbers are allowed.
            type: Integer indicating the type of connection of RLC elements, or the
            transmission line length (negative value).
            type=0: Series RLC element,
            type=1: Parallel RLC element
            type=2: Transformer winding
            type=3: Coupled (mutual) winding
            If type is negative value: transmission line modeled by a PI section. See
            details below.
4-32
                                                                                          Circ2ss
                The following restrictions apply for transformer and mutually coupled winding
                R-L values: Null values are not allowed for winding resistances. Specify a very
                low value (e.g., 1e-6 pu, based on rated voltage and power) to simulate a quasi
                ideal transformer. The leakage reactances can be set to zero. The resistive part
                of the magnetizing branch Rm of a transformer must have a finite value.
                Specify a very high value (low losses, e.g, Rm=1e4 pu or 0.01% current based
                on rating) to simulate a quasi ideal transformer. The inductive part of the
                magnetizing branch can be set to infinite (No reactive losses; specify Xm=0). A
                null value is not allowed for the mutual inductance of coupled windings. The
                resistive part of series mutual branch can be set to zero.
                                                                                                     4-33
Circ2ss
                Each line of the Source matrix must be specified according to the following
                format:
                   [node1, node2, type, amp, phase, freq, model]
Format of the   Switches are nonlinear elements simulating mechanical or electronic devices
SWITCHES        such as circuit breakers diodes or thyristors. As for other nonlinear elements,
Input Matrix    they are simulated by current sources driven by the voltage appearing across
                their terminals. Therefore, they cannot have a perfectly zero impedance. They
                are simulated as ideal switches in series with a series R-L circuit. Various
                models of switches (circuit breaker, ideal switch, and power electronic devices)
                are available in the powerlib_models library. They must be interconnected to
                the State-Space block through appropriate voltage outputs and current inputs.
                The switch parameters must be specified in a line of the Switches matrix in
                seven different columns according to the following format:
                   [node1, node2, status, R, L/Xl, no_I, no_U]
4-34
                                                                                       Circ2ss
                Note: For these last two fields, the same units as specified for the rlc matrix
                must be used. Null inductance values are not allowed. However, the resistance
                can be set to zero.
                The next two fields specify the current input number and the voltage output
                number to be used for interconnecting the switch model to the state-space
                block.
                • no_I: Current input number coming from the output of the switch model.
                • no_U: Voltage output number driving the input of the switch model.
Format of the   The distributed parameter line model contains two parts:
LINE_DIST
                1 A linear part containing current sources and resistances that are connected
Matrix
                  at the line sending and receiving buses together with the linear circuit.
                2 A nonlinear part available in the dist_line block of the powerlib_models
                  library. This block performs the phase to mode transformations of voltage
                  and currents and simulates the transmission delays for each mode. The
                  dist_line block must be connected to appropriate voltage outputs and
                  current inputs of the State-Space block. The line parameters have to be
                  specified in the line_dist matrix and also in the dist_line block.
                                                                                                  4-35
Circ2ss
Format of the   The desired outputs are specified by a string matrix yout. Each line of the yout
YOUT Matrix     matrix must be an algebraic expression containing a linear combination of
                states and state derivatives specified according the following format:
4-36
                                                                                      Circ2ss
          If variable names are used (as R1 and L2 in the above example), their names
          and values must be specified by the two input arguments vary_name and
          vary_val.
Example   The following circuit consists of two sources (one voltage source and one
          current source), two series RLC branches (R1-L1 and C6), two parallel RLC
          branches (R5-C5 and L7-C7), one saturable transformer and two switches (Sw1
          and Sw2). Sw1 is initially closed whereas Sw2 is initially open. Three
          measurement outputs are specified (I1,V2 and V3). This circuit has seven nodes
          numbered 0, 1, 2, 2.1, 10, 11 and 12. Node 0 is used for the ground. Node 2.1 is
          the internal node of the transformer where the magnetization branch is
          connected.
                                                                                                  4-37
Circ2ss
                     I1
                R1        L1       Rt1         Lt1                 Rt2
           1                   2                     2.1                  10                  11
                                                                               Sw1
                                                                                                  Sw2    C6
                                                              U1   U2
                  100V                                                                              12
                  0deg.                   Rm               Lsat                R5         C5 V2
                  60Hz                                                      2A
                                                                           -30deg.
                                                                           180Hz              C7              L7
                                                                                                                V3
                 0
                                          Saturable Transformer
          You can use the circ2ss function to find the state-space model of the linear
          part of the circuit. The nonlinear elements Sw1,Sw2 and Lsat must be modeled
          separately by means of current sources driven by the voltage appearing across
          their terminals. Therefore you must foresee three additional currents sources
          and three additional voltage outputs for interfacing the nonlinear elements to
          the linear circuit.
4-38
                                                                        Circ2ss
You will obtain the state-space model of the circuit by entering the following
commands in a .m executable file, available in the psbcirc2ss.m file.
  unit=’OMU’ % specifies units : Ohms mH uF
  rlc=[
  %node1 node2    typeR   L   C(uF)/U(V)
  1 2    0        0.1     1       0%R1 L1
  2 0    2        0.05    1.5     100%transfo Wind.#1
  10 0   2        0.20    0       200%transfo Wind.#2
  2.1 0  1        1000    0       0%transfo mag.branch
  11 0   1        200     0       1%R5 C5
  11 12 0         0       0       1e-3%C6
  12 0   1        0       500     2%L7 C7
  ];
  source=[
  %node1 node2    typeU/I     phasefreq
  1 0    0        100         0   60 % Voltage source
  0 10 1          2           -30 180% Current source
  2.1 0  1        0           0   0% Saturation
  10 11 1         0           0   0% Sw1
  11 12 1         0           0   0% Sw2
  ];
  switches=[
  %node1 node2    status R(ohm) L(mH)I#U#
  10     11       1       0       10e-6 42% Sw1
  11     12       0       0.1     1e-6 53% Sw2
  ];
  % outputs
  %=========
  y_u1=’U_n2.1_0’;    %U_sat= Saturable reactor voltage
  y_u2=’U_n10_11’;    %U_Sw1= Voltage across Sw1
  y_u3=’U_n11_12’;    %U_Sw2= Voltage across Sw2
  y_i4=’I_b1’;        %I1 measurement
  y_u5=’U_n11_0’;     %V2 measurement
  y_u6=’U_n12_0’;     %V3 measurement
  yout=str2mat(y_u1,y_u2,y_u3,y_i4,y_u5,y_u6); %outputs
  y_type=[0,0,0,1,0,0]; %output type 0=voltage 1=current
  [A,B,C,D,states,x0,x0sw,rlsw,u,x,y,freq,...
  Asw,Bsw,Csw,Dsw,Hlin]=...
  circ2ss(rlc,switches,source,[],yout,y_type,unit);
                                                                                 4-39
Circ2ss
          The names of the state variables are returned in the states string matrix:
            states =
            Il_b2_n2_2.1
            Uc_b5_n11_0
            Uc_b6_n11_12
            Il_b7_n12_0
            Il_b1_n1_2*
            Uc_b7_n12_0*
4-40
                                                                        Circ2ss
Although this circuit contains six inductors and capacitors, there are only four
state variables. The names of the state variables are given by the first four
lines of the states matrix. The last two lines are followed by an asterisk
indicating that these two variables are a linear combination of the state
variables:
   Uc_b7_n12_0 = + Uc_b5_n11_0 - Uc_b6_n11_12
   Il_b1_n1_2 = + Il_b2_n2_2.1
The A,B,C,D matrices contain the state-space model of the circuit without
nonlinear elements (sw1 switch open). The x0 vector contains the initial state
values considering the switch sw1 closed. The Asw, Bsw, Csw, Dsw matrices
contain the state-space model of the circuit considering the closed switch sw1.
In our example, the system contains an extra state corresponding to the
current flowing into the Sw1 inductor. The xosw vector contains the initial
current in the closed switch.
   A =
   -4.0006e+005       0             0       0
   -1.8998e-008      -4995          0      -499.25
    1.8998e-005      -4992.5        0       4.9925e+005
    0                 2            -2       0
   Asw =
   -4.0006e+005       0             0       08e+005
   -1.8998e-008      -4995          0      -499.259.99e+005
    1.8998e-005      -4992.5        0       4.9925e+0059.985e+005
    0                 2            -2       0
    2e+011           -1e+008        0      -4.0002e+011
0 60 180
                                                                                   4-41
Circ2ss
          For example, you can obtain the magnitude of the six voltage and current
          outputs at 60Hz as follows:
             abs(y(:,2))
ans =
              99.808
               3.7696e-006
             199.43
               2.0994
             199.42
               0.01652
          The initial values of the four state variables are returned in the x0 vector. You
          must use this vector in the State-Space block to start the simulation in
          steady-state.
             x0 =
              2.3303
             14.113
             14.071
              3.1393e-005
          The initial values of switch currents are returned in x0sw. To start the
          simulation in steady-state, you must use these values as initial currents for the
          nonlinear model simulating the switches.
             x0sw =
             0.16155
             0
          The Simulink model of the circuit is shown in the following figure. If you had
          used the powerlib library to build your circuit, the same Simulink system
          would have been generated automatically by the power2sys function. The
          corresponding version of this circuit built with the Power System Blockset is
          available in the psbcirc2ss_slk.mdl file.
          The linear part of the circuit is simulated by the State-Space block.
          Appropriate inputs and outputs are used to connect the switch and saturable
          reactance models to the linear system. You can find the breaker and transfosat
4-42
                                                                                               Circ2ss
           blocks in the powerlib_models library containing all the nonlinear models used
           by the Blockset. As the breaker model is vectorized, a single block is used to
           simulate the two switches Sw1 and Sw2.
                         Vs 60Hz
                                         Mux         x’ = Ax+Bu
                                                                       Demux
              Is 180Hz                                y = Cx+Du
                                                     State-Space                    Scope_I1
                                             Mux                           Demux
                                                     transfosat                     Scope_V2
                                             I_Sat                 U_Sat
                                                     i         v
                                                                                    Scope_V3
                                                     breaker
                            [I_Sw1, I_Sw2]                         [U_Sw1, U_Sw2]
                                                     i         v
Step_Sw1 Mux
Step_Sw2 Mux1
                                                                                                   4-43
Controlled Current Source
Description   The Controlled Current Source block provides a current source controlled by a
              Simulink signal. The positive current direction is as shown by the arrow in the
              block icon. The initial current level is set in the dialog box as a parameter.
              If the initial current is set to a nonzero value, this current will be considered as
              a DC current, and the states of the linear circuit will be initialized accordingly.
              To start the simulation in steady-state, the initial value of the Simulink signal
              must correspond to the initial current entered in the dialog box.
Dialog Box
Example       Generate a 60Hz current modulated at 5Hz with the Controlled Current
              Source.
4-44
                                               Controlled Current Source
imes(A)
Time(s)
                                                                                           4-45
Controlled Voltage Source
Description   The Controlled Voltage Source block provides a voltage source controlled by a
              Simulink signal. The first and second outputs of the block are respectively the
              positive and the negative terminals of the voltage source. The initial voltage
              level is set in the dialog box.
              If the initial voltage is set to a nonzero value, this voltage will be considered as
              a DC voltage and the states of the linear circuit will be initialized accordingly.
              To start the simulation in steady-state, the initial value of the Simulink signal
              must correspond to the initial voltage entered in the dialog box.
Dialog Box
4-46
                                               Controlled Voltage Source
                                                                                            4-47
Current Measurement
Description   The Current Measurement block is used to measure the instantaneous current
              flowing in any electrical block or connection line. The first output provides a
              Simulink signal that can be used by other Simulink blocks.
Dialog Box
Example       Four Current Measurement blocks are used to read currents in different
              branches of a circuit. The two scopes display the same current. This circuit is
              available in the psbcurrmeasure.mdl file.
4-48
                                                                  DC Voltage Source
Description   The DC Voltage Source block implements an ideal DC voltage source. The
              output and input are respectively the positive and negative source terminals.
              The voltage level is set in the dialog box. You can modify the voltage at any time
              during the simulation.
Dialog Box
Example       Simulation of the transient response of a first order RC circuit. This circuit is
              available in the psbdcvoltage.mdl file.
                                                                                                   4-49
DC Voltage Source
vc (V)
Time(s)
4-50
                                                                                                   Diode
Purpose       4Diode
              Implement a diode model
Description   The Diode is a semiconductor device that is controlled by its own voltage and
              current. When the diode is forward biased (Vak>0), it starts to conduct with a
              small forward voltage across it. It turns off when the current flow into the
              device becomes zero. When the diode is reverse biased (Vak<0), it stays in the
              off-state.
              The diode is modeled as resistor, inductor, and DC voltage source (Vf),
              connected in series with a switch. The switch is controlled by the voltage Vak
              and current Iak.
                                   Vak                                          Vak
                   A                                A                                              K
                                               K
                       Iak                               Iak                  Ron     Lon     Vf
                              Diode
                                                                      Diode            Vak
               A: anode; K: cathode;
                                                                      logic             Iak
              The Diode block also contains a series Rs-Cs snubber circuit, which is usually
              connected in parallel with the diode.The static VI characteristic of this model
              is shown in the figure below.
                                         Iak
                                                          On-state
                                                   Ron
               Off-state
                                                                     Vak
                                         Vf
                                                                                                       4-51
Diode
Dialog Box
4-52
                                                                                                Diode
Inputs and         The first input and output are the diode terminals connected respectively to the
Outputs            anode (a) and the cathode (k). The second output (m) is a Simulink
                   measurement output vector [Iak, Vak] returning the diode current and voltage.
Assumptions     The Diode block implements a macro-model of the diode. It does not take into
and Limitations account either the geometry of the device or the complex physical processes
                   underlying the state change [1]. The leakage current in the blocking state and
                   the reverse-recovery (negative) current are not considered. In most circuits, the
                   reverse current does not affect converter or other device characteristics.
                   The diode is modeled as a nonlinear element interfaced with the linear circuit,
                   as shown below.
Linear circuit
Iak Vak
                                                                                                         4-53
Diode
4-54
                                                                         Diode
                                                                              4-55
Diode
4-56
                                                                               Distributed Parameter Line
is ir
               es                                       Ish                                                                           er
                                            Z                                                  Irh                 Z
                                                                                                                                                4-57
Distributed Parameter Line
Dialog Box
4-58
                                                  Distributed Parameter Line
              The first entry in the dialog box specifies the number of phases of the model.
              The block icon dynamically changes according to the number of phases that you
              specify. When you apply the parameters or close the dialog box, the number of
              inputs and outputs is updated. The icon also displays the individual
              conductors. If you specify more than three phases, only one conductor is
              displayed.
              The second entry specifies the frequency used to compute the line parameters.
              This entry is needed for the computation of the modal impedance and
              admittance matrices.
              The third, fourth, and fifth entries are the R(ohms/km) L(H/km) and C(F/km)
              matrices. For unsymmetrical lines, you must specify the complete R L C
              matrices of the line.
              If you want to model your line as a symmetrical line (continuously transposed),
              you can also specify the sequence parameters. This is permitted for the
              following types of lines: two-phases, three-phases transposed and six-phases
              transposed (double-circuit three-phase line with zero sequence coupling only
              between the two circuits). Therefore the two- and three-phase lines require two
              dimension vector entries [R1 R0] [L1 L0] [C1 C0] while the six-phase line
              requires three-dimension vector entries [R1 R0 R0m] [L1 L0 L0m] [C1 C0
              C0m], where the subscripts 1,0, and 0m hold respectively for positive-sequence,
              zero-sequence, and mutual-zero-sequence.
              Finally, the last entry specifies the line length in Km.
Limitations   One limitation of this line model is its failure to represent accurately the
              frequency dependence of R L C parameters of real power lines. Indeed, because
              of skin effects in the conductors and ground, the R and L matrices exhibit
              strong frequency dependence, causing an attenuation of the high frequencies.
                                                                                                4-59
Distributed Parameter Line
Example Obtain the line energization voltages and current in the following circuit.
                                                   Line 300 km
                           Close at 0.005s
                                                       RLC
                      Rg                      +                      +
                                  i Line     Vin                    Vout
            Vg                                 -                      -
           The sending end current and receiving end voltage obtained with the
           distributed parameter line are compared with a 10-pi-section line. On both
           graphs, the PI line model shows high frequency oscillatory modes
           superimposed on the 200Hz characteristic frequency of travelling waves. These
           oscillations due to PI sections are not found with the distributed parameter line
           with lumped losses model.
4-60
                                                         Distributed Parameter Line
Note: Notice that the high current peak obtained with the PI line model at
the breaker closing (due to the first section capacitor charging) does not exist
with the distributed parameter line model.
200
               100
current (A)
−100
−200
              −300
                     0   0.005   0.01   0.015   0.02      0.025      0.03    0.035   0.04   0.045   0.05
                                                        time (s)
                                                                                                           4-61
Distributed Parameter Line
1.5
                                 1
             voltage (volts)
0.5
−0.5
−1
                               −1.5
                                      0       0.005   0.01   0.015   0.02       0.025    0.03     0.035   0.04   0.045   0.05
                                                                              time (s)
4-62
                                                                                     Excitation System
                    V fd                               1
                    --------- = --------------------------------------------------
                      ef        Ke + sTe + S ( Vfd )
                                                                                                    4-63
Excitation System
                                 BVfd
                S ( Vfd ) = Ae
             The last entry of the dialog box is used to specify the initial values of the
             terminal voltage and field voltage. The values used to initialize all states of the
             model allow you to start the simulation in steady-state.
Dialog Box
4-64
                                                                  Excitation System
Inputs and   The first input of the block is the desired value of the stator terminal voltage.
Outputs      The following two inputs are the vq and vd components of the terminal voltage.
             The fourth input can be used to provide additional stabilization of power
             system oscillations. All inputs are in pu. The output of the block is the field
             voltage Vf for the Synchronous Machine block (p.u).
References   [1] IEEE “Recommended Practice for Excitation System Models for Power
             System Stability Studies”. IEEE Std. 421.5-1992, August 1992
                                                                                                 4-65
Ground
Purpose       4Ground
              Provide a connection to the ground
Description   The Ground block implements a connection to the ground. For drawing facility,
              two types of Ground blocks are provided: one block with an input and one block
              with an output.
Dialog Box
Example       The following circuit shows an application of both types of Ground blocks. This
              circuit is available in the psbground.mdl file.
4-66
                                                                                                 GTO
Purpose       4GTO
              Implement a GTO-thyristor model
Description   The Gate Turn-Off (GTO) thyristor block is a semiconductor device that can be
              turned on and off via a gate signal. Like a thyristor, the GTO-thyristor can be
              turned on by a positive gate signal (G>0). However, unlike the thyristor, which
              can be turned off only at a zero crossing of current, the GTO can be turned off
              by applying a gate signal equal to zero.
              The model is simulated as a resistor Ro), inductor Lon, and DC voltage source
              (Vf) connected in series with a switch. The switch is controlled by a logical
              signal depending on the voltage Vak, current Iak, and the gate signal G.
                                                                            Vak
                              Vak
                                                                                                 K
                                              K      A
                      Iak                             Iak                     Ron   Lon     Vf
               A                          G
                                                            GTO-Thyristor                 Vak
                          GTO-thyristor
                                                     G            logic                   Iak
                                                                                                     4-67
GTO
                          Iak    On-state
                                            (Ron)
                                                               On-to-Off
                                                               if IG =0
                                        Off-to-On
                                            if G > 0
Off-state Off-state
                                                                           Vak
                                Vf
       Iak
               Imax
                                                       Itail=0.1 Imax
G Tf Tt
         1
                      0
                                                                                 t
4-68
                                                                                  GTO
Vf, Ron and Lon are the forward voltage drop while in conduction, the forward
conducting resistance, and the inductance of the device, respectively.
The GTO-thyristor block also contains a series Rs-Cs snubber circuit which is
usually connected in parallel with the device.
Due to modeling constraints, the inductance Lon cannot be set to zero. You can
specify a snubber which is purely resistive (Cs = Inf) or purely capacitive
(Rs=0). If you specify either Rs=Inf or Cs=0, the snubber is eliminated and it
disappears on the GTO-thyristor icon.
The initial current Ic is usually set to zero, so that the simulation is started
with the GTO-thyristor blocked. However, you may specify an Ic value
corresponding to a particular state of the circuit. In such a case, all states of the
linear circuit must be set accordingly. Initializing all states of a
power-electronic converter is a complex task. Therefore, this option is useful
only with simple circuits.
                                                                                        4-69
GTO
Dialog Box
Inputs and   The first input and output are the GTO-thyristor terminals connected
Outputs      respectively to anode (a) and cathode (k). The second input (g) is a Simulink
             signal applied to the gate. The second output (m) is a Simulink measurement
             output vector [Iak, Vak] returning the GTO-thyristor current and voltage.
4-70
                                                                                                  GTO
Linear Circuit
                                       Iak
                                                              Vak
Example            The following example illustrates the use of the GTO-thyristor block in a buck
                   converter topology. The basic polarized snubber circuit is connected across the
                   GTO. The snubber circuit consists of a capacitor Cs, a resistor Rs, and a diode
                   Ds. The parasitic inductance Ls of the snubber circuit is also taken into
                   consideration.
                   The parameters of the GTO are those found in the Dialog Box section, except
                   for the internal snubber, which is out of service (Rs=Inf Cs=0). The switching
                                                                                                        4-71
GTO
       frequency is 1000 Hz and the pulse width is 216 degrees (duty cycle 60%). This
       example is available in the psbbuckconv.mdl file.
Ds
GTO R= 1 Ω
                                                             L= 0.005 H
                               D           Rds=100 Ω
             U=200 V                           Cds=0.1e-6F
                                                              E= 80 V
4-72
                                                                        GTO
Run the simulation and observe the GTO voltage and current as well as the
load voltage and current.
                                                                            4-73
GTO
References   [1] Mohan N., Power Electronic, Converters, Applications and Design, John
             Wiley & Sons, Inc., New York, 1995
4-74
                                                Hydraulic Turbine and Governor
Description   The Hydraulic Turbine and Governor implements a hydraulic turbine model, a
              PID governor system, and a servo-motor. The static gain of the governor is
              equal to the inverse of the permanent droop Rp in the feedback loop. The input
              to this feedback loop can be selected to be the gate position or the electrical
              power deviation by setting the droop reference parameter in the dialog box to
              one or zero, respectively.
                                                                                                4-75
Hydraulic Turbine and Governor
           The PID regulator has a proportional gain Kp, an integral gain Ki and a
           derivative gain Kd. The high frequency gain of the PID is limited by a
           first-order low-pass filter with time constant Td.
           The gate servo-motor is modeled by a second-order system with gain Ka and
           time constant Ta. The gate’s opening is limited between gmin and gmax and its
           speed is limited between vgmin and vgmax.
           The last entry of the dialog box is used to specify the initial output power. This
           value which is used to initialize all the states of the model allows you to start
           the simulation in steady-state.
4-76
             Hydraulic Turbine and Governor
Dialog Box
                                         4-77
Hydraulic Turbine and Governor
Inputs and   The first two inputs are the desired speed and mechanical power. The third and
Outputs      fourth inputs are the machine’s actual speed and electrical power. The fifth
             input is the speed deviation. Inputs 2 and 4 can be left unconnected if you want
             to use the gate position as input to the feedback loop instead of the power
             deviation. All inputs are in pu. The outputs of the block are mechanical power
             Pm for the Synchronous Machine block and gate opening (both in pu).
4-78
                                                                                            Ideal Switch
Description   The Ideal Switch does not correspond to a particular physical device. When
              used with appropriate switching logic, it can be used to model a simplified
              semiconductor device such as a GTO or a Mosfet, or even a power circuit
              breaker with current chopping. The switch is simulated as a resistor (Ron) and
              inductor (Lon) in series with a switch controlled by a logical signal G.
V12 V12
                   1                              2   1                                            2
                                                          I12                  Ron         Lon
                 I12
                                 G                              Ideal Switch
                                                      G             logic
                               Ideal Switch
              The Ideal Switch is fully controlled by the gate signal (G>0 or G=0). It has the
              following characteristics:
              • Blocks any forward or reverse applied voltage with zero current flow when
                G=0
              • Conducts any bidirectional current with quasi zero voltage drop when G>0
              • Switches instantaneously between on and off state when triggered
              The Ideal Switch turns on when a positive signal is present at the gate input
              (G>0). It turns off when the gate signal equals zero (G=0).
                                                                                                       4-79
Ideal Switch
                                                I12
                                                        On-state
                                                                                    On-to-Off
                                                               1                    if G =0
                                                               Ron   Off-to-On
                                                                         if G > 0
               Off-state
                                                                                                V12
                               Off-to-On                             Off-state
                                   if G >0
                   On-to-Off
                   if G =0
                                             On-state
           The Ideal Switch block also contains a series Rs-Cs snubber circuit, which is
           usually connected in parallel with the Ideal Switch. You can specify a snubber
           that is purely resistive (Cs = Inf) or purely capacitive (Rs=0). If you specify
           either Rs=Inf or Cs=0, the snubber is eliminated and it disappears on the Ideal
           Switch icon.
4-80
                                                                                      Ideal Switch
Dialog Box
Inputs and          The first input (1) and output (2) are the Ideal Switch electrical connections.
Outputs             The second input (g) is a Simulink signal applied to the gate. The second output
                    (m) is a Simulink measurement output vector [I12,V12] returning the Ideal
                    Switch current and voltage.
Assumptions     It can happen that the switch is connected across a capacitor. Depending on the
and Limitations values of the capacitor, switch resistance and inductance, high frequency
                    poorly damped current and voltage oscillations can be produced when the
                    switch closes if the Ron-Lon parameters are not properly selected. This will
                                                                                                           4-81
Ideal Switch
           For example, with Ron =0.01 Ω and C= 1e-6 F, you should select Lon≅1e-10 H.
           The Ideal Switch is modeled as a nonlinear element interfaced with the linear
           circuit, as shown below.
                                  Linear circuit
               inputs              State Space             outputs
                                   A, B, C, D
I12 V12
           To avoid an algebraic loop, the Ideal Switch inductance Lon cannot be set to
           zero. Each Ideal Switch adds an extra state to the electrical circuit model. The
           Ideal Switch is modeled as a current source. It cannot be connected in series
           with an inductor, a current source or an open circuit, unless a snubber circuit
           is used.
           You must use a stiff integrator algorithm to simulate circuits containing Ideal
           Switches. ode23tb and ode15s usually give best simulation speed.
Example    An Ideal Switch is used to switch an RLC circuit on an AC source (60 Hz). The
           switch, which is initially closed, is first open at t=36 ms and then closed at
           t=100 ms.
           As the switch is used to switch a capacitor, its inductance Lon has been set to
                                                         2
           a very small value to satisfy the Lon ≤ Ron C condition. This example is
           available in the psbswitch.mdl file.
4-82
                                                           Ideal Switch
  +                       L= 0.1H
       Vs =120 V rms                C= 10e-6 F
  -    f= 60 Hz
R= 10 Ω
Run the simulation and observe the inductor current, the switch current and
the capacitor voltage. Notice the high frequency overvoltage produced by
inductive current chopping.
                                                                              4-83
Ideal Switch
References   [1] N. Mohan, Power Electronic, Converters, Applications and Design, John
             Wiley & Sons, Inc., New York, 1995.
4-84
                                                                   Linear Transformer
Description   The Linear Transformer block model shown below consists of three coupled
              windings wound on the same core.
                                                              L2   R2
                             R1      L1
                                    Lm               Rm
                                                              L3   R3
              The model takes into account the winding resistances (R1 R2 R3), the leakage
              inductances (L1 L2 L3), as well as the magnetizing characteristics of the core
              which is modeled by a linear (Rm Lm) branch.
              To comply with industry practice, you must specify the resistance and
              inductances per unit (pu) based on the transformer rated power (Pn in VA) and
              nominal voltage of the winding (Vn in Vrms). The base resistance and
              inductance are defined as follows:
                                                          2
                                           ( Vn )
                           Rbase = 1 pu = ----------------
                                               Pn
                                          Rbase
                           Lbase = 1 pu = -----------------
                                             2πf n
              For example, for the default parameters of winding one specified in the dialog
              box section:
                             720.3
                     Lbase = --------------- = 1.91H
                             2π60
                                                                                               4-85
Linear Transformer
                                                     3 2
                         ( 424.35 × 10 )
                 Rbase = ----------------------------------------- = 720.3Ω
                                                        6
                                 250 × 10
                                                                    5
               R m = 500pu × 720.3Ω = 3.6 × 10 Ω
Dialog Box
             Specify in the first entry the nominal power rating and frequency of the
             transformer. Then specify in the following three entries the parameters of each
4-86
                                                                Linear Transformer
Inputs and    Input one, output one, and output three (if it exists) are at the same
Outputs       instantaneous polarity. If you set the entry for the third winding to zero, the
              block will become a transformer with two windings and a new icon will be
              displayed:
Limitations   Because of modeling constraints the following restrictions apply: The winding
              resistances cannot be set to zero, however leakage inductances can be set to
              zero. Use values as small as necessary to simulate quasi-zero resistances.
              Similarly, the magnetizing resistance Rm must have a finite value but the
              reactive magnetizing losses can be set to zero by specifying Lm=Inf.
              Windings can be left floating (i.e, not connected by an impedance to the rest of
              the circuit). The floating winding will be connected internally to the main
              circuit through a resistor. This invisible connection does not affect voltage and
              current measurements.
                                                                                                  4-87
Linear Transformer
4-88
                                                                                             Mosfet
Purpose       4Mosfet
              Implement a Mosfet model
                                   Vds
                                                                             Vds
                  D                             S   D
                                                                                         S
                                                        Id              Rt         Lon
                                                                                   Vds
                                            G                Mosfet
                                                    G           logic
                             Mosfet                                                 Id
                 D: drain; S: source; G: gate
              The Mosfet block turns on when the drain-source voltage is positive and a
              positive signal is applied at the gate input (G >0).
                                                                                                  4-89
Mosfet
                                 Id
                                      On-state
                                                   (Rt=Ron)
                                                                On-to-Off
                                                                 if G =0
                                                    Off-to-On
                                                      if G >0
          Off-state
                                                 Off-state                  Vds
                      On-state
Rt=Rd
         With a positive current flowing through the device, the Mosfet block turns off
         when the gate input becomes zero. If the current Id is negative (Id flowing in
         the internal diode) and the gate signal is zero (G = 0), the Mosfet block turns
         off when the current Id becomes zero (Id = 0).
         Note that the on-state resistance Rt depends on the drain current direction:
         • Rt= Ron if Id > 0, where Ron represents the typical value of the forward
           conducting resistance of the Mosfet block
         • Rt= Rd if Id < 0, where Rd represents the internal diode resistance
         The Mosfet block also contains a series Rs-Cs snubber circuit, which is usually
         connected in parallel with the Mosfet block. You can specify a snubber that is
         purely resistive (Cs = Inf) or purely capacitive (Rs=0). If you specify either
         Rs=Inf or Cs=0, the snubber is eliminated and it disappears on the Mosfet icon
         The initial current Ic flowing in the Mosfet block is usually set to zero, so that
         the simulation is started with Mosfet blocked. However, you may specify an Ic
         value corresponding to a particular state of the circuit. In such a case, all states
         of the linear circuit must be set accordingly. Initializing all states of a
         power-electronic converter is a complex task. Therefore, this option is useful
         only with simple circuits.
4-90
                                                                                           Mosfet
Parameters
and Dialog Box
Inputs and       The first input and output are the Mosfet connection to drain (d) and source (s).
Outputs          The second input (g) is a logical Simulink signal applied to the gate. The second
                                                                                                     4-91
Mosfet
Assumptions     The Mosfet block implements a macro-model of the real Mosfet device. It does
and Limitations not take into account either the geometry of the device or the complex physical
                    processes [1].
                    In the Simulink representation, the Mosfet is modeled as a nonlinear element
                    interfaced with the linear circuit as shown below.
Linear circuit
Id Vds
                    To avoid an algebraic loop, the Mosfet inductance Lon cannot be set to zero.
                    Each Mosfet adds an extra state to the electrical circuit model. Since the Mosfet
                    is modeled as a current source, it cannot be connected in series with an
                    inductor, a current source, or an open circuit, unless a snubber circuit is used.
                    You must use a stiff integrator algorithm to simulate circuits containing
                    mosfets. ode23tb and ode15s usually gives best simulation speed.
Example             The following example illustrates the use of the Mosfet block in a
                    Zero-Current-Quasi-Resonant Switch converter. In such a converter, the
                    current produced by the Lr-Cr resonant circuit flows through the device, thus
                    causing it to turn on and off at zero current [1]. The switching frequency is 2
                    MHz and the pulse width is 72 degrees (duty cycle: 20%). This example is
                    available in the psbmosconv.mdl file
4-92
                                                                       Mosfet
Run the simulation and observe the capacitor voltage, the mosfet current, the
gate pulse signal, the diode current, and the state-plane trajectory (inductor
current versus capacitor voltage).
                                                                                 4-93
Mosfet
U_cr
4-94
    Mosfet
        4-95
Mosfet
References   [1] Mohan N., Power Electronic, Converters, Applications and Design, John
             Wiley & Sons, Inc., New York, 1995.
4-96
                                                                         Mutual Inductance
Description   The Mutual Inductance block implements a magnetic coupling between three
              separate windings. Specify the self resistance and inductance of each winding
              on the first three entries of the dialog box and the mutual resistance and
              inductance in the last entry.
              The electrical model for this block is given below
                                                         L2-Lm   R2-Rm
                 R1-Rm             L1-Lm
Lm
                                   Rm
                                                         L3-Lm   R3-Rm
                                           Ideal
                                           Transformer
                                           1:1:1
              If the entry for the third winding is set to zero, the block represents the
              magnetic coupling between two inductances and a new icon is displayed
Inputs and    The inputs of the Mutual Impedance block are at the same instantaneous
Outputs       polarity.
                                                                                              4-97
Mutual Inductance
Dialog Box
                  Rs > 0, Rs > Rm
                  Lm ≠ 0, Ls ≠ Lm
              The winding resistances (self resistances) must be positive and greater than
              the mutual resistance. Negative values are allowed for the self and mutual
              inductances as long as the self inductances are different from the mutual
              inductance. The mutual inductance must be different from zero but a zero
              mutual resistance is allowed.
              Windings can be left floating (i.e, not connected by an impedance to the rest of
              the circuit). The floating winding will be internally connected to the main
              circuit through a resistor. This invisible connection does not affect voltage and
              current measurements.
4-98
                                                              Mutual Inductance
Example   Three coupled windings are used to inject a third harmonic voltage into a
          circuit fed at 60 Hz.
Mutual inductance
                                                                          R = 3 Ohms
                      10 V rms
           5 V rms      60 Hz
           180 Hz       0 deg                                              L = 1.2mH
           0 deg
                                                                                       4-99
Mutual Inductance
Uload(V)
Time(s)
4-100
                                                                                        Neutral
Purpose       4Neutral
              Implement a local common node in the circuit
Description   The Neutral block implements a local common node with a specific node
              number. If the node number is set to zero, the Neutral block automatically
              makes a connection to ground. The node number is displayed on the icon. You
              can use this block to create a floating neutral or to interconnect two points
              without drawing a connection line.
              For the drawing facility, two types of neutral blocks are available in the library:
              one block with an input and one block with an output.
Dialog Box
Example       The following circuit uses three Neutral blocks. Three resistors are connected
              to a floating neutral (node 50). The phase-to-ground voltage is measured with
              the u2 block and the phase-to-neutral voltage is measured with the u1 block.
              This example is available in the psbneutral.mdl file.
                                                                                                    4-101
Neutral
4-102
                                                                Parallel RLC Branch
Description   The Parallel RLC Branch block implements a single resistor, inductor and
              capacitor or a parallel combination of these. To eliminate either the resistance,
              inductance, or capacitance of the branch, the R, L, and C values must be set
              respectively to infinity, infinity, and zero. Only existing elements will be
              displayed in the block icon.
              Negative values are allowed for resistance, inductance, and capacitance.
Dialog Box
                                                                                                  4-103
Parallel RLC Branch
                                                             2
                         V(s)           RLCs + Ls + R
               Z ( s ) = ------------ = -------------------------------------------
                          I(s )              LCs + RCs
                                                         2
           To obtain the frequency response of the impedance you have to get the
           state-space model (A B C D matrices) of the system.
4-104
                                                Parallel RLC Branch
This system is a one input (Is) and one output (Vs) system. If you own the
Control System Toolbox, you can get the transfer function Z(s) from the
state-space matrices.
  [A,B,C,D] = power2sys(’psbparalbranch’);
  freq = logspace(1,4,500);
  w = 2*pi*freq;
  [Z,phaseZ] = bode(A,B,C,D,1,w);
  subplot(2,1,1)
  loglog(freq,Z)
  grid
  title(’11th harmonic filter’)
  xlabel(’Frequency, Hz’)
  ylabel(’Impedance Z’)
  subplot(2,1,2)
  semilogx(freq,phaseZ)
  xlabel(’Frequency, Hz’)
  ylabel(’phase Z’)
  grid
                                                                             4-105
Parallel RLC Branch
See Also Parallel RLC Load, Series RLC Branch, Series RLC Load
4-106
                                                                   Parallel RLC Load
Description   The Parallel RLC Load block implements a linear load as a parallel
              combination of RLC elements.
Dialog Box    Enter the value of the nominal voltage and nominal frequency in the first two
              entries. Enter the desired active power, the inductive reactive power, and the
              capacitive reactive power in the last three entries. The inductive and capacitive
              reactive powers should be positive values. At the specified frequency, the load
              will exhibit a constant impedance and its power will be proportional to the
              square of the applied voltage. Only elements associated with nonzero powers
              will be displayed in the block icon.
                                                                                                  4-107
Parallel RLC Load
Example    Find the steady-state values of load voltage and current in the following circuit.
           This example is available in the psbparalload.mdl file.
4-108
                                                  Parallel RLC Load
Drag the Powergui block from the powerlib library into your circuit. Double
click on the Powergui icon and output the voltage and current phasors by
clicking on the Steady state button.
                                                                              4-109
Parallel RLC Load
See Also Parallel RLC Branch, Series RLC Load, Series RLC Branch
4-110
                              Permanent Magnet Synchronous Machine
                       d          1            R            Lq
                          i d = ------- v d – ------- i d + ------- pω r i q
                       dt       Ld            Ld            Ld
                       d          1          R          Ld                 λpω r
                          i q = ------v q – ------i q – ------- pω r i d – -------------
                       dt       Lq          Lq          Lq                     Lq
                           T e = 1.5p [ λi q + ( L d – L q )i d i q ]
                                                                                                4-111
Permanent Magnet Synchronous Machine
          Mechanical System
              d     1
                ω = --- ( T e – Fω r – T m )
              dt r  J
                dθ
                   = ωr
                dt
where:
4-112
                     Permanent Magnet Synchronous Machine
Dialog Box
Inputs and   The first three inputs are the electrical connections of the machine’s stator. The
Outputs      fourth input is the mechanical torque at the machine’s shaft (Simulink signal).
             This input should ordinarily be positive because the PMSM block is usually
             used in a motor mode. Nevertheless, you can apply a negative torque input if
             you choose to use the PMSM block in generating mode.
             The block outputs a vector containing the following ten variables (all currents
             flowing into machine):
                                                                                                  4-113
Permanent Magnet Synchronous Machine
Assumption   The block assumes a linear magnetic circuit with no saturation of the stator
             and rotor iron. This assumption can be made because of the large air gap
             usually found in permanent magnet synchronous machines.
Example      This example illustrates the use of the PMSM block in the motoring mode with
             a closed-loop control system built entirely in Simulink. The interfacing is done
             using Controlled Voltage Source blocks from the powerlib/Electrical Sources
             library. The complete system consists of a PWM inverter built with ideal
             switches (Simulink Relay blocks). Two control loops are used; the inner loop is
             used to regulate the motor line currents and the outer loop regulates the
             motor’s speed. The mechanical torque applied at the motor’s shaft is originally
             3 N.m (nominal) and steps to 1 N.m at t=0.025 sec. The parameters of the
             machine are those found in the Dialog Box section.
4-114
       Permanent Magnet Synchronous Machine
Run the simulation. Once the simulation is completed, observe the motor’s
torque and speed.
                                                                                  4-115
Permanent Magnet Synchronous Machine
          The torque climbs to nearly 32 N.m when the motor starts but stabilizes
          rapidly to its nominal value (3 N.m), until the step is applied, at which point
          the torque oscillates slightly before stabilizing to its new value (1 N.m). As for
          the speed, you can see that it stabilizes quite fast at start-up and is not affected
          by the load step. Now, observe the line currents.
4-116
       Permanent Magnet Synchronous Machine
As for the torque, the currents are high when the machine starts, but stabilize
quickly to their nominal value until the step is applied. Then they oscillate
before stabilizing to a lower value, corresponding to the load torque decrease.
                                                                                  4-117
PI Section Line
Description   The PI Section Line block implements a single phase transmission line with
              parameters lumped in pi sections.
              For a transmission line, the resistance, inductance and capacitance are
              uniformly distributed along the line. An approximate model of the distributed
              parameter line is obtained by cascading several identical pi sections as shown
              in the figure below.
                                 section1
                                  R         L       R   L           R   L
C/2 C C C C/2
              Unlike the distributed parameter line which has an infinite number of states,
              the pi section linear model has a finite number of states that permit a
              state-space model to be used to derive its frequency response. The number of
              sections to be used depends on the frequency range to be represented.
              A good approximation of the maximum frequency range represented by the pi
              line model is given by the following equation:
                                  Nv
                          f max = --------
                                   8l
where:
              • N = Number of pi sections
              • v = Propagation speed in km/s = 1 ⁄ LC L(H/km) C(F/km)
              • l = Line length in km
              For example, for a 100 km aerial line having a propagation speed of 300 000
              km/s, the maximum frequency range represented with a single pi section is
              approximately 375 Hz. For studying interactions between a power system and
4-118
                                                                        PI Section Line
             a control system, this simple model would be sufficient. However for switching
             surge studies involving high frequency transients in the kHz range, much
             shorter pi sections should be used. In fact, accurate results would probably only
             be obtained by using a distributed parameters line model.
Dialog Box
             Enter the resistance, inductance, and capacitance per unit length in the first
             three entries. Enter the line length and the desired number of pi sections in the
             last two entries.
Example      Obtain the line energization voltages and current in the following circuit. This
             circuit is available in the psbpiline.mdl file.
                                                                                                 4-119
PI Section Line
            The results obtained with the line modeled by one pi section of 100km and 10
            pi sections of 10km are shown below.
4-120
PI Section Line
            4-121
PI Section Line
4-122
                                                                                  Powergui
Purpose       4Powergui
              Graphical user interface for the analysis of Power System circuits
Description   The Powergui block opens a Graphical user interface that displays
              steady-state values of measured current and voltages as well as all state
              variables (inductor currents and capacitor voltages). The Powergui interface
              allows you to modify the initial states in order to start the simulation from any
              initial conditions. It also allows Load Flow computation and initialization of
              three phase networks containing machines.
              To use the Powergui interface, copy the Powergui block into your model and
              double-click on the block to open it.
Example       The graphical interface is presented here for the psbtransient.mdl circuit
              demo entitled Transient Analysis.
              If the Powergui block is not in the model, copy it from the powerlib library.
              Start the simulation to establish the state space model (this occurs
              automatically through Power2sys). Double-click on the block to open the
              following window:
                                                                                                  4-123
Powergui
           The Set State Variables window is used to set initial states before the
           simulation.
                                                                                                                    Return to values
                                                                                                                    displayed
                                                                                                                    at the window
                                                                                                                    opening
4-124
                                                                           Powergui
The Steady-State window displays the phasor values (magnitude and phase) of
sources, measured voltages and currents, state variables as well as voltages
and currents of nonlinear blocks.
                                                       Selection of frequency
                                                       corresponding
                                                       to the displayed values.
The Machine Load Flow window allows you to perform load flows and
initialize three-phase circuits containing the following three types of machines:
Simplified Synchronous Machine, Synchronous Machine, and Asynchronous
Machine. Once the load flow has been solved, initial conditions are
automatically set in the dialog boxes of the machines and you can start the
simulation in steady-state.
                                                                                             4-125
Powergui
Selection of frequency used for load flow Execute load flow Return to values displayed at window opening
4-126
                                                                                 Power2sys
Purpose       4Power2sys
              Analyze an electric circuit built with the Power System Blockset
Syntax        POWER2SYS(’simwin’);
              [A,B,C,D,x0,state_var,inputs,outputs,uss,xss,yss,freqyss,Hlin]=
                POWER2SYS(’simwin’);
              [A,B,C,D,x0,state_var,inputs,outputs,uss,xss,yss,freqyss,Hlin]=
                POWER2SYS(’simwin’,’n’);
Description   The Power2sys block is used to computes the equivalent state-space model of
              an electrical network built with the Power System Blockset. power2sys
              extracts the linear part of the simwin system and builds the corresponding
              state-space model. State variables are the inductor currents and capacitor
              voltages. Nonlinear elements are simulated by current sources (state-space
              model inputs) driven by the voltages (state-space model outputs) across the
              nonlinear elements.
                    [A,B,C,D,x0,state_var,inputs,outputs,uss,xss,yss,freqyss,
                     Hlin]=POWER2SYS(’simwin’)
                           ·
                           x = Ax + Bu
                           y = Cx + Du
                                                                                                  4-127
Power2sys
            A suffix is added to the line for blocks containing more than two inductances or
            capacitors: for example, the three winding Linear Transformer block will
            produce three state_var lines, one for each leakage inductance, with the suffix
            coil:x where x is the winding number of the transformer.
            A suffix may be added to the input for blocks containing more than one source.
            For example, the Simplified Alternator block produces two current inputs with
            suffixes AB and BC.
            outputs is a string matrix containing names of the outputs of the state-space
            system (vector y). Each line of outputs begins with a prefix U_ for voltage
            outputs or I_ for current outputs, followed by the name of the block which
            produces the output. Sign conventions are indicated by the polarities of the
            voltage measurement and current measurement blocks.
            uss, xss, and yss are complex matrices containing the steady-state values
            (phasors) of inputs, states and outputs. If voltage and current sources all
            generate the same frequency, these are column vectors. If sources with
            different frequencies are used, each column of the matrices corresponds to a
            frequency contained in the freqyss vector.
            freqyss is a column vector containing the n_freq input source frequencies
            ordered by increasing values.
            Hlin is the complex transfer impedance three-dimension array (n_output by
            n_input by n_freq) of the linear system corresponding to the frequencies
            contained in the freqyss vector. For a particular frequency, Hlin is defined by
              yss(:,ifreq) = Hlin(:,:,ifreq) x uss(:,ifreq)
4-128
                                                                          Power2sys
Example   Obtain the state-space matrices and steady-state voltages and currents for the
          following circuit.
            A =
                   1.0e+04 *
                         0       6.2500
                  -0.0083       -1.4250
            B =
                  1.0e+04 *
                        0       -6.2500
                  0.0083         1.000
            C =
                   1    120
                   0      0
D =
                                                                                            4-129
Power2sys
                     0    -120
                     0     1
               states =
               Uc_120 Ohms 16 uF
               Il_51 Ohms 12 mH
               inputs =
               U_1000V 60Hz
               I_Breaker Ron=0.01 Lon=10e-6
               outputs =
               U_Breaker Ron=0.01 Lon=10e-6
               I_Current Measurement
               xss =
                  1.0e+02 *
                  4.8392 - 5.1314i
                  0.0310 + 0.0292i
               yss =
                  1.0e+02 *
                  8.5535 - 1.6287i
                            0
4-130
                                                                            Power2sys
           There are two state variables in this circuit. Note that the breaker block is a
           nonlinear element, which is represented by a current source (second input)
           driven by the voltage across the breaker (first output).
                                                                                             4-131
Saturable Transformer
Description   The Saturable Transformer block model shown below consists of three coupled
              windings wound on the same core.
                                                   L2     R2
                             R1          L1
                                       Lsat   Rm
                                                    L3   R3
              The model takes into account the winding resistances (R1 R2 R3), the leakage
              inductances (L1 L2 L3) as well as the magnetizing characteristics of the core,
              which is modeled by a resistance Rm simulating the core active losses and a
              saturable inductance Lsat. The saturation characteristic is specified as a
              piece-wise linear characteristic.
4-132
                                                             Saturable Transformer
                 Specify in the first entry the nominal power rating and frequency of the
                 transformer.
                 Then specify in the following three entries the parameters of each winding
                 (nominal voltage in volt rms, resistance, and leakage inductance in p.u).
                 The fifth entry is used to specify the saturation characteristic. Specify a series
                 of current (pu)/flux (pu) pairs starting with (0,0).
                 Specify in the last entry the active power dissipated in the core by entering the
                 equivalent resistance Rm in pu. In the last entry you can also specify the initial
                 flux phi0(p.u). This initial flux becomes particularly important when the
                 transformer is energized. If phi0 is not specified, the initial flux will be
                 automatically adjusted so that the simulation starts in steady-state.
                                                                                                      4-133
Saturable Transformer
             To comply with industry practice, you must enter the resistance and
             inductances in per unit (pu) based on the transformer rated power (Pn in VA)
             and nominal voltage of the winding (Vn in Vrms). The base resistance and
             inductance are defined as follows:
                                                            2
                                      ( Vn )
                       Rbase = 1 pu = ----------------
                                          Pn
                                     Rbase
                      Lbase = 1 pu = -----------------
                                        2πf n
For example, for the default parameters specified in the dialog box.
                                                      3 2
                          ( 424.35 × 10 )
                  Rbase = ----------------------------------------- = 720.3Ω
                                                         6
                                  250 × 10
                                  720.3
                          Lbase = --------------- = 1.91H
                                   2π60
                    R 1 = 0.002pu × 720.3Ω = 1.44Ω
                   L 1 = 0.08pu × 1.91H = 0.1528H
                                                                        5
                 R m = 500pu × 720.3Ω = 3.6 × 10 Ω
Inputs and   Input one, output one and output three (if it exists) are at the same
Outputs      instantaneous polarity.
             If you set the entry for the third winding to zero, the blockset will consider a
             transformer with two windings and a new icon will be displayed:
4-134
                                                                Saturable Transformer
Restrictions   Because of modeling constraints the following restrictions apply: The winding
               resistances cannot be set to zero; however, leakage inductances can be set to
               zero. Use values as small as possible to simulate quasi-zero resistances.
               Similarly, the magnetizing resistance Rm must have a finite value.
               Windings can be left floating (i.e, not connected by an impedance to the rest of
               the circuit). However, the floating winding will be connected internally to the
               main circuit through a resistor. This invisible connection does not affect voltage
               and current measurements.
               Figure (a) shows the piece-wise linear saturation characteristic. The points 2,
               3, and 4 are entered as (i, phi) pair values in the dialog box Saturation
               characteristic section.
               The saturation model does not include hysteresis. Therefore, if you want to
               specify a residual flux phi0, the second point of the saturation characteristic
               should correspond to a zero current as shown on the figure (b) below.
phi phi
                                                3   4                                           4
                                                                                           3
                                          2                 residual
                                                            flux                     2
                                                                                   phi0
                                  1                                           1
                                                        i                                           i
-2
                                                                                                        4-135
Saturable Transformer
4-136
                                               Saturable Transformer
                                                                 4-137
Series RLC Branch
Description   The Series RLC Branch block implements a single resistor, inductor, or
              capacitor, or a series combination of these. To eliminate either the resistance,
              inductance, or capacitance of the branch, the R, L and C values must be set
              respectively to zero, zero, and infinity. Only existing elements will be displayed
              in the block icon.
              Negative values are allowed for resistance inductance and capacitance.
Dialog Box
4-138
                                                                                      Series RLC Branch
Example   Obtain the frequency response of a fifth-harmonic filter (tuned frequency = 300
          Hz) connected on a 60Hz power system. This example is available in
          psbseriesbranch.mdl.
                                                          2
                          V(s )          LCs + RCs + 1
                Z ( s ) = ------------ = ------------------------------------------
                           I(s)                            Cs
          To obtain the frequency response of the impedance you have to get the
          state-space model (A B C D matrices) of the system.
                                                                                                    4-139
Series RLC Branch
           This system is a one input (Vsource) and one output (Current Measurement)
           system. If you own the Control System Toolbox, you can get the transfer
           function Z(s) from the state-space matrices as follows:
             [A,B,C,D] = power2sys(’psbseriesbranch’);
             freq = logspace(1,4,500);
             w = 2*pi*freq;
             [Y,phaseY] = bode(A,B,C,D,1,w);
             % invert Y(s) to get Z(s)
             Z = 1./Y;
             phaseZ = -phaseY;
             subplot(2,1,1)
             loglog(freq,Z)
             grid
             title(’5th harmonic filter’)
             xlabel(’Frequency, Hz’)
             ylabel(’Impedance Z’)
             subplot(2,1,2)
             semilogx(freq,phaseZ)
             xlabel(’Frequency, Hz’)
             ylabel(’phase Z’)
             grid
4-140
                                                        Series RLC Branch
See Also Series RLC Load, Parallel RLC Branch, Parallel RLC Load
                                                                      4-141
Series RLC Load
Description   The Series RLC Load block implements a linear load as a series combination of
              RLC elements. Enter the value of the nominal voltage and nominal frequency
              in the first two entries. Enter the desired active power, the inductive reactive
              power and the capacitive reactive power in the last three entries. Only
              elements associated with nonzero powers will be displayed in the block icon.
              The inductive and capacitive reactive powers should be entered as positive
              values. At the specified frequency, the load will exhibit constant impedance
              and its power will be proportional to the square of the applied voltage.
Dialog Box
Example       Find the steady-state values of load voltage and current in the following circuit.
              This example is available in psbseriesload.mdl.
4-142
                                                     Series RLC Load
Use the Powergui interface to output the voltage and current phasors by
clicking on the Steady state button.
                                                                          4-143
Series RLC Load
See Also Series RLC Branch, Parallel RLC Branch, Parallel RLC Load
4-144
                                                    Simplified Synchronous Machine
Description   The Simplified Synchronous Machine block models both the electrical and
              mechanical characteristics of a simple synchronous machine.
              The electrical system for each phase consists of a voltage source in series with
              an RL impedance, which implements the internal impedance of the machine.
              The value of R can be zero but the value of L must be positive.
              The Simplified Synchronous Machine block implements the mechanical system
              described by
                                                t
                                       1
                                                ∫
                         ∆ω ( t ) = -------- ( Tm – Te ) dt – K d∆ω ( t )
                                    2H
                                                0
                             ω ( t ) = ∆ω ( t ) + ω 0
              where
                   ∆ω = Speed variation with respect to speed of operation
                   H = Constant of inertia
                   Tm = Mechanical torque
                   Te = Electromagnetic torque
                   Kd = Damping factor
                   ω(t) = Mechanical speed of rotor
                   ω0 = Speed of operation (1pu)
              Although the parameters can be entered in either SI units or per unit in the
              dialog box, the internal calculations are done in per unit (pu).
              The following block diagram illustrates how the mechanical part of the model
              is implemented. Notice that the model computes a deviation with respect to the
              speed of operation, and not to the absolute speed itself.
                                                                                                 4-145
Simplified Synchronous Machine
                    Tm (pu)     +                              1        +
                                                                   ∆ω         ω (p.u.)
                    Te (pu)      -        1/2H           1/s            +
Kd
Parameters     In the powerlib library you can choose between two Simplified Synchronous
and Dialog Box Machine blocks to specify the electrical and mechanical parameters of the
                   model.
4-146
                  Simplified Synchronous Machine
                                             4-147
Simplified Synchronous Machine
           The nominal power, frequency and voltage are used to compute nominal torque
           and convert SI units to pu.
           The moment of inertia and damping factor are used to model the mechanical
           behavior of the machine. The damping factor has been scaled to act like the
4-148
                                      Simplified Synchronous Machine
             damping factor of a second order system. This means that for no overshoot and
             minimum settling time, a damping factor of 0.9 would be used.
             The internal impedance specifies the value of resistance and reactance for each
             phase. The initial speed deviation and angle specify the initial conditions of the
             two integrators in the mechanical part of the model. Finally, initial values for
             the three line currents can also be specified, which allows the simulation to be
             started in steady-state.
             Note: These two blocks simulate exactly the same Simplified Synchronous
             machine model; the only difference is the way of entering the parameter units.
Inputs and   The first input of the Simplified Synchronous Machine block is the mechanical
Outputs      power supplied to the machine. This input can be a constant or the output of
             the Hydraulic Turbine and Governor block. The frequency of the voltage
             sources depends on the mechanical speed of the machine. The amplitude of
             these voltages is given by the second input of the block, which can be a constant
             or the output of a voltage regulator. If you use SI units, these two inputs should
             be in watts and volts phase-to-phase rms. If you use pu both inputs should be
             in pu
             The first three outputs are the electrical terminals of the stator. The last
             output of the block is a vector containing the following 12 variables:
                                                                                                  4-149
Simplified Synchronous Machine
Assumptions   The electrical system of the Simplified Synchronous Machine consists solely of
              a voltage source behind a synchronous reactance and resistance. All the other
              self and mutual inductances of the armature, field and damping windings are
              neglected. The three voltage sources and RL impedance branches are
              Y-connected (3 wires). The load may or may not be balanced.
Example       The following example uses the Simplified Synchronous Machine block. In this
              example, the Simplified Synchronous Machine representing a 1000 MVA 315
              kV equivalent source is connected to an infinite bus (three AC Voltage Source
              blocks) and is used as a synchronous generator. The R term is necessary to
              prevent series connection of the two current sources modeling the machine and
              the external inductance. The internal resistance of the machine is set to 0.02
              pu, or 1.9845 ohms. Its inductance is set in such a way that the total impedance
                                                                                  2
              is 1 pu (L=263.15 mH). The inertia of the machine is 56290 kg.m . This
              example is included in the psbsimplealt.mdl file.
4-150
                         Simplified Synchronous Machine
In this example, the machine has an initial speed deviation of 0.5%. The initial
mechanical angle and the initial currents ia, ib, ic are set to zero. The power
transfer between the machine and the bus is given by the following relation:
                                                                                   4-151
Simplified Synchronous Machine
                   V1 × V2
             P T = -------------------- × sin δ
                           X
             P T = power transfer (500 MW)
             V 1 = machine voltage (315 kV)
             V 2 = bus voltage (315 kV)
               X = total reactance (263.15 mH ) 120 x π
               δ = electrical angle difference between machine internal voltage
                       and terminal voltage
4-152
                                   Simplified Synchronous Machine
           The speed vs. time graph clearly shows that the machine is initially running at
           a speed of 1.005 pu (1809 rpm) and that speed stabilizes itself at its nominal
           value of 1800 rpm. As expected the electrical power supplied by the machine
           stabilizes at 500 MW and the electrical angle δ starts from zero and stabilizes
           at 30 degrees. The mechanical system is clearly under-damped, the damping
           factor being set to 0.3.
                                                                                             4-153
Surge Arrester
Description   The Surge Arrester block implements a highly nonlinear resistor used to
              protect power equipment against overvoltages. For applications requiring high
              power dissipation, several columns of metal-oxide discs are connected in
              parallel inside the same porcelain housing. The nonlinear V-I characteristic of
              each column of the surge arrester is modeled by a combination of three
              exponential functions of the form:
                                                       I 1 ⁄ αi
                                ----------- = K i  ---------
                                   V
                                V ref              I ref
                     V
                                                                      log(V/Vref)
                                                   α3                                                 α3
                                α2
               Vprot
                                                                                         nIref
                                                                                                 α2
                α1                                                                                         log(I/Iref)
                                                                                    α1
                                nI                                I
                                  ref
4-154
                                                                            Surge Arrester
Dialog Box
Restrictions   The Surge Arrester block is modeled as a current source driven by the voltage
               appearing across its terminals. Therefore, it cannot be connected in series with
               an inductor or another current source. As the Surge Arrester is highly
               nonlinear a stiff integrator algorithm must be used to simulate the circuit.
               ode15s and ode23tb solvers with default parameters usually give the best
               simulation speed. As this element contains no states, it will produce an
               algebraic loop because its current (input to state space model of the circuit)
               varies simultaneously with the voltage (output of state-space model). Simulink
               will signal an algebraic loop, but it usually solves the circuit without difficulty.
                                                                                                      4-155
Surge Arrester
           At fault application, the resulting overvoltage makes the MOV to conduct. The
           waveforms displayed by Umov and Imov measurements as well as the V-I
           characteristic plotted by the X-Y scope are shown below.
4-156
           Surge Arrester
Imov(A)
Time(s)
Umov(V)
Time(s)
                      4-157
Surge Arrester
Umov(V)
Imov(A)
4-158
                                                                     Synchronous Machine
                                                                                                                 +
                                                                                                R’kd
                                                                        ω φ           L’lkd
                         Rs +ωRφ-d Ll
                                                                                                              V’kd
                                           L’lkq R’kq                Rs - R +q Ll                      i’kd
                   +                                    +   +                            L’                      -
                                                                                              lfd
                       V q iq        Lmq      i’kq   V’kq       Vd    id        Lmd                        R’
                                                                                                            fd
                   -                                    -                                                        +
                                                            -                                       i’f
                                     q axis                                                            d
                                                                                                              V’fd
                                                                           d axis
                                                                                                                 -
                                                                                                                     4-159
Synchronous Machine
                                     d
                    V d = R s i d + ------ ϕ d – ω R ϕ q
                                    dt
                                      d                      ϕ d = L d i d + L md ( i′ fd + i′ kd )
                    V q = R s i q + ------ ϕ q + ω R ϕ d
                                     dt                      ϕ q = L q iq + L mq i′ kq
                                            d              ϕ′ fd = L′ fd i′ fd + L md ( i d + i′ kd )
                   V′ fd = R′ fd i′ fd + ------ ϕ′ fd
                                            dt
                                         d                 ϕ′ kd = L′ kd i′ kd + L md ( i d + i′ fd )
                  V′ kd = R′ kd i′ kd + ------ ϕ′ kd
                                        dt                 ϕ′ kq = L′ kq i′ kq + L mq iq
                                         d
                  V′ kq = R′ kq i′ kq + ------ ϕ′kq
                                        dt
Parameters   In the powerlib library, you can choose between three Synchronous Machine
and Dialog   blocks to specify the parameters of the model.
Boxes
4-160
                                            Synchronous Machine
The first line of this dialog box is where you specify the nominal parameters:
                                                                                 4-161
Synchronous Machine
          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 reality. 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
          zero. Since the transformation ratio cannot be determined in this case, you will
          have to apply the field voltage as viewed from the stator and the field current
          in the output vector will also be viewed from the stator.
          You specify the following stator parameters on the second line of the dialog box:
          • Resistance Rs, in Ω
          • Leakage inductance LI, in H
          • d axis mutual inductance Lmd, in H
          • q axis mutual inductance Lmq, in H
          • Resistance Rf’, in Ω
          • Leakage inductance LIfd’, in H
          • Inertia J, in kg.m2
          • Viscous friction coefficient F, in N.m.s.
          • Number of pairs of poles p
4-162
                                              Synchronous Machine
You enter the initial conditions (9) for the model on the sixth line:
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 viewed from the rotor. Otherwise, enter a zero
as nominal field current, and specify the initial field voltage in Volts AC rms
phase-to-phase viewed from the stator. The nominal field voltage viewed from
the stator can be easily determined by checking the “Display Vfd which
produces a nominal Vt” checkbox at the bottom of the dialog box. You can also
determine the nominal field voltage viewed from the stator with a no-load test
as follows:
Finally, you can optionally specify saturation parameters for the Synchronous
Machine to model magnetic saturation of the rotor and stator iron. Saturation
is modeled by a nonlinear function, in this case a polynomial, using points on
the no-load saturation curve. To simulate saturation, 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 also check the Simulate saturation checkbox to
simulate saturation. This checkbox allows you to enter the matrix of
parameters for simulating the saturation. In simulations where you don’t
                                                                                    4-163
Synchronous Machine
          simulate saturation, simply uncheck the box. You can later simulate saturation
          by checking the box without having to re-enter the entire matrix.
          In this case the relationship between ifd and Vt obtained is linear (no
          saturation).
          As an example, without saturation, a typical curve might be as shown.
          Here ifn is 1087A and Vn is 13800 V line-to-line, which is also 11268 V peak
          line-to-neutral.
4-164
                                            Synchronous Machine
• ifn = 1087 A
• ifd = [695.64, 774.7, 917.5, 1001.6, 1082.2, 1175.9, 1293.6, 1430.2, 1583.7] A
• Vt = [9660, 10623, 12243, 13063, 13757, 14437, 15180, 15890, 16567] V
                                                                                   4-165
Synchronous Machine
Fundamental Parameters in pu
The first line of this dialog box is where you specify the nominal parameters:
4-166
                                              Synchronous Machine
This line is identical to the first line of the fundamental parameters in SI dialog
box, except that you don’t specify a nominal field current. This value is not
required here because we don’t 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 three nominal parameters above.
The second, third and fourth line contain exactly the same parameters as in the
previous dialog box (stator, field and dampers), but they are expressed here in
pu instead of SI units.
The fifth line contains the mechanical parameters, but expressed in pu:
The sixth line contains the initial conditions, as before, but the initial line
currents and field voltage are expressed in pu instead of SI units.
The last line is where you specify the Saturation parameters, as before.
However, the parameters must now be entered in per unit using the nominal
field current, multiplied by the d axis mutual inductance, and nominal rms
line-to-line voltage as base values for the field current, and terminal voltage,
respectively.
                                                                                      4-167
Synchronous Machine
Standard Parameters in pu
          The first line of this dialog box is identical to the first line of the fundamental
          parameters in pu dialog box and contains nominal parameters.
          You specify the machine’s reactances on the second line (all in pu):
4-168
                                                           Synchronous Machine
The third line contains the machine’s time constants (all in s):
             The fourth line is where you enter the stator resistance Rs, in pu
             The last three lines are identical to the previous fundamental parameters in pu
             dialog box and consist of mechanical parameters, initial conditions and
             saturation parameters.
             Note: These three blocks simulate exactly the same Synchronous machine
             model, the only difference is the way of entering the parameter units.
Inputs and   The units of inputs and outputs will vary according to which dialog box was
Outputs      used to enter the block parameters. For the non-electrical connections, there
             are two possibilities. If the first dialog box (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 θ e , which is always in
             degrees). If the second or third dialog boxes are used, the inputs and outputs
             are in pu.
             The first input is the mechanical power at the machine’s shaft. In the
             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 block). In the
             motoring mode, this input is usually a negative constant or function.
                                                                                                   4-169
Synchronous Machine
          The second input of the block is the field voltage which can be supplied by a
          voltage regulator (see the Excitation System block) in the generating mode and
          is usually a constant in the motoring mode.
          The first three outputs are the electrical terminals of the stator. The last
          output of the block is a vector containing 16 variables. They are, in order:
          • 1-3: Stator currents (flowing out of machine) isa, isb and isc
          • 4-5: q and daxis stator currents (flowing out of machine) iq, id
          • 6-8: Field and damper winding currents (flowing into machine) ifd, ikq and ikd
          • 9-10: q and d axis mutual fluxes ϕ mq ,ϕ md
          • 11-12: q and d axis stator voltages vq,vd
          • 13: Rotor electrical angle θ e
          • 14: Rotor speed ω r
          • 15: Electrical power Pe
          • 16: Rotor speed deviation dw
Example   This example, available in the psbsyncmachine.mdl file, illustrates the use of
          the Synchronous Machine in motoring mode. The simulated system consists of
          an industrial grade synchronous motor (150 HP, 440V) connected to an infinite
          bus. After the machine reaches a stable speed, the load (mechanical power) is
          changed from 50 kW to 60 kW. The initial conditions are set in such a way that
          the simulation starts in steady-state. Open the simulink diagram by typing
          psbsyncmachine.
4-170
                                            Synchronous Machine
Run the simulation and observe the speed, power and current of the motor.
                                                                               4-171
Synchronous Machine
          Because this is a four pole machine, the nominal speed is 1800 rpm. The initial
          speed is 1800 rpm as prescribed (top graph). The load passes from 50 kW to 60
          kW at t=0.5 s. The machine then oscillates before stabilizing to 1800 rpm.
          Now, look at the electrical power (middle graph). Since we are in motoring
          mode, the machine absorbs power and Pe is negative. As expected, the power
          starts at -50 kW until the load is changed at t=0.5 seconds, at which point the
          power oscillates before settling at -60 kW.
          Finally, look at the stator current is. As expected, the current starts with the
          value corresponding to a three-phase power of 50 kW (56 A), before oscillating
          and settling to the value corresponding to a 60 kW load (68.5 A).
4-172
                                                         Synchronous Machine
References   [1] Krause, P.C., Analysis of Electric Machinery, section 12.5, McGraw-Hill,
             1986.
             [2] Kamwa, I., et al., “Experience with Computer-Aided Graphical Analysis of
             Sudden-Short-Circuit Oscillograms of Large Synchronous Machines”, Vol.10,
             IEEE Transactions on Energy Conversion, No.3, September 1995.
                                                                                            4-173
Thyristor
Purpose       4Thyristor
              Implement a thyristor model
Description   The Thyristor block is a semiconductor device that can be turned on via a gate
              signal. The thyristor is modeled as a resistor (Ron), inductor (Lon), and DC
              voltage source (Vf), connected in series with a switch. The switch is controlled
              by a logical signal depending on the voltage Vak, the current Iak and the gate
              signal (G).
                                     Vak                                                 Vak
                           A                      K
                           Iak                              A                                                   K
              The Thyristor block also contains a series Rs-Cs snubber circuit, which is
              usually connected in parallel with the thyristor.You can specify a snubber
              which is purely resistive (Cs = Inf) or purely capacitive (Rs=0). If you specify
              either Rs=Inf or Cs=0, the snubber is eliminated and it disappears on the
              thyristor icon.
              The static VI characteristic of this model is shown in the figure that follows.
                                                      Iak
                                                                On-state
                                                              Off-to-On
                                                            if G > 0
                Off-state                                                  Off-state
                                             Il
                                                                           Vak
                                                      Vf
4-174
                                                                       Thyristor
The thyristor turns on when the anode-cathode voltage is greater than Vf and
a positive pulse signal is present at the gate input (G>0). The pulse height must
be greater than zero and last long enough to allow the thyristor anode current
to become larger than the latching current Il.
The thyristor turns off when the current flowing in the device becomes zero
(Iak=0) and a negative voltage appears across the anode and cathode for at
least a period of time equal to the turn-off time Tq. If the voltage across the
device becomes positive within a period of time less than Tq, the device will
turn on automatically even if the gate signal is low (G = 0) and the anode
current is less than the latching current. Furthermore, if during turn on, the
device current amplitude stays below the latching current level specified in the
dialog box, the device turns off after the gate signal level becomes low (G = 0).
The turn-off time Tq represents the carrier recovery time: it is the time interval
between the instant the anode current has decreased to zero and the instant
when the thyristor is capable of withstanding positive voltage Vak without
turning on again.
Simplified Model and Detailed Model
To optimize simulation speed, two models of thyristors are available: the
simplified model and the detailed model. For the simplified thyristor model,
the latching current Il and recovery time Tq are assumed to be zero.
Enter the thyristor parameters Ron, Lon, and Vf and the Rs-Cs snubber
parameters in the dialog box. Due to modeling constraints explained below, the
inductance Lon cannot be set to zero.
The initial current Ic flowing in the thyristor is usually set to zero so that the
simulation is started with the thyristor blocked. However, you may specify an
Ic value corresponding to a particular state of the circuit. In such a case all
states of the linear circuit must be set accordingly. Initializing all-states of a
power-electronic converter is a complex task. Therefore, this option is useful
only with simple circuits.
For applications where the thyristor is used in general purpose rectifier
circuits fed by a voltage source at a frequency of 50 or 60 Hz, the typical
parameters values specified in the dialog box can be used.
                                                                                     4-175
Thyristor
4-176
                                Thyristor
                                      4-177
Thyristor
Inputs and          The thyristor icon consists of two inputs and two outputs. The first input and
Outputs             output are the thyristor terminals connected respectively to anode (a) and
                    cathode (k). The second input (g) is a Simulink logical signal applied to the gate
                    (G). The second output (m) is a Simulink measurement output vector [Iak, Vak]
                    returning the thyristor current and voltage.
Assumptions     The Thyristor block implements a macro-model of the real thyristor. It does not
and Limitations take into account either the geometry of the device or complex physical
                    processes that model the behavior of the device [1-2]. The forward breakover
                    voltage and the critical value of the derivative of the reapplied anode-cathode
                    voltage are not considered by the model.
                    In the Simulink representation, the thyristor is modeled as a nonlinear
                    element interfaced with the linear circuit as shown below.
Linear circuit
                                         Iak
                                                                Vak
4-178
                                                                               Thyristor
Example   Single pulse thyristor rectifier feeding a RL load. The gate pulses are obtained
          from a pulse generator synchronized on the source voltage. The circuit is
          available in the psbthyristor.mdl file. The following parameters are used:
          R=1Ω; L=10mH; Thyristor block: Ron=0.001 Ω, Lon=1e-5 H, Vf=0.8 V, IC=0 A,
          Rs=20 Ω, Cs=4e-6 F. Simulation parameters: ode15s; Relative tolerance: 1e-3;
          Absolute tolerance: 1e-3.
          The firing angle is varied by the Pulse Generator block synchronized on the
          voltage source. Run the simulation and observe the load current and voltage,
          and the thyristor current and voltage.
          Load current and voltage:
                                                                                             4-179
Thyristor
4-180
                                                                              Thyristor
                                                                                          4-181
Voltage Measurement
Description   The Voltage Measurement block is used to measure the instantaneous voltage
              between two electric nodes. The output is a Simulink signal that can be used
              by other Simulink blocks.
Dialog Box
Example       The following example uses three Voltage Measurement blocks to read
              voltages. This example is available in the psbvoltmeasure.mdl file.
4-182
                                                                          Index
A                                          D
AC Current Source 4-7                      DC Voltage Source 4-48
AC Voltage Source 4-9                      Demos library 4-3
algebraic loop                             Diode 4-50
   surge arrester model 4-152              display signals 1-6
analyze                                    Distributed Parameter Line 4-56
   power2sys function 4-124                distributed parameter line
   Powergui graphical interface 4-120         propagation speed 1-14
Asynchronous Machine 3-5, 4-11             drives
   per unit system 4-14                       DC motor 2-13
                                              variable-frequency induction motor 2-30
B
block diagrams                             E
   creating 1-3                            electric blocks
blocks                                        connecting Simulink blocks 1-6
   adding 3-10                                customizing 3-10
   creating 3-10                           electrical circuits 1-2
   nonlinear 3-5                           Electrical Sources library 4-3
   powerlib block library 1-4              Elements library 4-3, 4-4
Breaker 4-22                               examples
Bus Bar 4-25                                  buck converter 4-70
                                              circuit breaker 4-23
                                              distributed parameter line 4-59
C                                             line energization 4-117
circuit                                       modulated current source 4-43
   building a simple 1-3                      permanent magnet synchronous machine
circuit breaker 4-22                                4-112
connecting Simulink blocks 1-6                PWM inverter 4-17
Connectors library 4-3, 4-5                   single pulse rectifier 4-175
control                                       surge arresters in series compensated network
   Speed Control System 4-17                        4-152
   using the Control System Toolbox 1-13      synchronous machine in motoring mode 4-167
Control System Toolbox 1-13                   zero-current-quasi-resonant switch converter
Controlled Current Source 4-43                      4-91
Controlled Voltage Source 4-17, 4-45       Excitation System 4-62
Current Measurement 4-47
                                                                                              I-183
        Index
        F                                              M
        feedback linearization 2-25                    Machines library 4-3, 4-5
        frequency analysis 1-11, 4-104                 Measurements
                                                         Current 4-47
                                                       measurements
        G                                                voltage 4-179
        Ground 4-65                                    Measurements library 4-3, 4-6
        GTO 2-13, 4-66                                 models
                                                         limitations with nonlinear 3-5
                                                         nonlinear model library 3-5
        H                                              Mosfet 4-88
        HVDC system 2-42                                 inverter 2-31
        Hydraulic Turbine and Governor 4-74            MOV 2-11
                                                       Mutual Inductance 4-96
        I
        Ideal Switch 4-78
                                                       N
        interconnections                               Neutral 4-100
           between electric and Simulink blocks 1-3    node 4-25
        interface                                      nonlinear models
           between Simulink and electric circuit 1-6     adding 3-6
                                                         modifying 3-6
        L
        libraries
                                                       P
           Connectors 4-3                              Parallel RLC Branch 4-102
           customizing 3-6                             Parallel RLC Load 4-106
           Demos 4-3                                   per unit system 1-6
           Electrical Sources 4-3                      Permanent Magnet Synchronous Machine 4-109
           Elements 4-3                                PI Section Line 4-116
           Machines 4-3                                PI section line
           Measurements 4-3                               frequency response 1-14
           Power Electronics 4-3                       power electronics
           Powerlib Extras 4-3                            introducing 1-20
        linear and nonlinear elements 1-3                 simulation speed 3-8
        Linear Transformer 4-84                        Power Electronics library 4-3, 4-4
        load flow 1-30, 1-34                           power system 1-3
I-184
                                                                                                  Index
                                                                                                          I-185
        Index
I-186