Documentation |
On this page… |
---|
In this section you
Learn how to simulate a three-phase power system containing electrical machines and other three-phase models
Perform a load flow study and initialize machines to start simulation in steady state by using the Machine Initialization and Load Flow tools of the Powergui
Simulate the power system and observe its dynamic performance by using both the standard solution technique using a continuous solver and the phasor simulation method
You now use three types of machines of the Electrical Machines library: simplified synchronous machine, detailed synchronous machine, and asynchronous machine. You interconnect these machines with linear and nonlinear elements such as transformers, loads, and breakers to study the transient stability of an uninterruptible power supply using a diesel generator.
The two-machine system shown in this single line diagram is this section's main example:
Diesel Generator and Asynchronous Motor on Distribution Network
This system consists of a plant (bus B2), simulated by a 1 MW resistive load and a motor load (ASM) fed at 2400 V from a distribution 25 kV network through a 6 MVA, 25/2.4 kV transformer, and from an emergency synchronous generator/diesel engine unit (SM).
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 is in standby, delivering no active power. The synchronous machine therefore operates as a synchronous condenser generating only the reactive power required to regulate the 2400 V bus B2 voltage at 1.0 pu. At t = 0.1 s, a three-phase to ground fault occurs on the 25 kV system, causing the opening of the 25 kV circuit breaker at t = 0.2 s, 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 react to maintain the voltage and speed at a constant value.
This system is modeled in the power_machinespower_machines example, shown in the following illustration.
Power System of Diesel Generator and Asynchronous Motor on Distribution Network
The SM parameters as well as the diesel engine and governor models were taken from reference [1].
If you simulate this system for the first time, you normally do not know what the initial conditions are for the SM and ASM to start in steady state.
These initial conditions are
SM block: 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 block: Initial values of slip, rotor angle, magnitudes and phases of currents in stator windings
Open the dialog box of the Synchronous Machine and Asynchronous Machine blocks. All initial conditions should be set at 0, except for the initial SM field voltage and ASM slip, which are set at 1 pu. Open the three scopes monitoring the SM and ASM signals as well as the bus B2 voltage. Start the simulation and observe the first 100 ms before fault is applied.
As the simulation starts, note that the three ASM currents start from zero and contain a slowly decaying DC component. The machine speeds take a much longer time to stabilize because of the inertia of the motor/load and diesel/generator systems. In our 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 manually, even for a simple system. In the next section you learn how to use the Machine Initialization tool of the Powergui block to initialize the machines.
Double-click the Powergui block and click the Machine Initialization button. A new window appears. The upper-right window displays a list of the machines appearing in your system.
Select SM 3.125 MVA in the machine list. The Bus Type parameter should already be initialized as P & V generator, indicating that the machine is controlling its active power and terminal voltage. For more info on the meaning of the Bus type parameter see Load Flow Tool.
Check that the desired Terminal Voltage UAB is initialized at the nominal machine voltage (2400 Vrms).
Set the Active Power to zero. The synchronous machine therefore absorbs or generates reactive power only to keep terminal voltage at 1 pu.
Select ASM 2250 HP in the machine list. The only parameter that needs to be set is the Mechanical power developed by the motor. Enter 2000*746 (2000 HP).
Click the Compute and Apply button. The three phasors of line-to-line machine voltages, as well as currents, are updated as shown on the next figure. Values are displayed both in SI units (volts RMS or amperes RMS) and in pu.
The Machine info section displays the SM active and reactive powers, mechanical power, and field voltage, the ASM active and reactive powers absorbed by the motor, slip, and torque.
Close the Machine Initialization tool.
Open the SM and ASM block dialogs and see that the initial conditions have been updated. Note that the ASM torque value (7964 N.m) has been entered in the Constant block connected at the ASM torque input.
Open the Governor & Diesel Engine subsystem, which is inside the Diesel Engine Speed and Voltage Control subsystem. The states of the Governor & Diesel Engine have also been initialized according to the values calculated by the Machine Initialization tool. Notice that the initial mechanical power has been automatically set to 0.0002701 pu.
Open the Excitation block and note that the initial terminal voltage and field voltage have been set respectively to 1.0 pu and 1.427 pu.
The Machine Initialization tool also initializes the Constant blocks connected at the reference inputs (wref and vref) of the Governor and Excitation blocks, as well as the Constant block connected at the load torque input (Tm) of the Asynchronous Machine block.
Start the simulation. Open the three scopes displaying the internal signals of synchronous and asynchronous machines and phase A voltage. The simulation starts in steady state.
The Load Flow tool of the Powergui block uses the Newton-Raphson method and comes with a graphical user interfaces that allows you to display load flow solution at all buses. For more information, see the power_loadflow reference page.
To solve a load flow, you need to determine the following four quantities at each bus:
The net three-phase active power P and reactive power Q injected into the bus
The voltage magnitude V and angle Vangle of bus positive-sequence voltage
It is important that you understand the three bus types that are used by the Load Flow tool to solve a load flow. Before solving the load flow, two of the above quantities are known at every bus and the other two are to be determined. Therefore, the following bus types are used:
PV bus—For this type of bus, P and V are specified. This is the generation bus where a synchronous machine is connected. Active power P generated by the machine and machine terminal voltage V are imposed. The load flow solution returns the machine reactive power Q, required to maintain the reference voltage magnitude V, and the reference voltage angle Vangle.
PQ bus—At this bus, specified active power P and reactive power Q are either injected into the bus (generation PQ bus) or absorbed by a load connected at that bus. The load flow solution returns bus voltage magnitude V and angle Vangle.
Swing bus—This bus imposes voltage magnitude V and angle Vangle. The load flow solution returns the active power P and reactive power Q, generated or absorbed at that bus in order to balance generated power, loads, and losses. At least one bus in the model must be defined as a swing bus, but usually a single swing bus is required unless you have isolated networks. Normally, you select one synchronous machine or voltage source as a swing bus.
To perform a load flow analysis and initialize your machine blocks so that your model starts in steady state, you need to perform the following four steps:
Define the model buses using Load Flow Bus blocks.
Specify the load flow parameters of the load flow blocks.
Solve the load flow and, eventually, interactively modify the load flow parameters until a satisfactory solution is obtained.
Save the load flow parameters and machine initial conditions in the model.
The load flow blocks and the Load Flow Bus block are described in the next sections.
Load flow blocks are SimPowerSystems™ blocks where active power (P) and reactive power (Q) can be specified to solve the load flow. They are:
Asynchronous Machine
Simplified Synchronous Machine
Synchronous Machine
Three-Phase Dynamic Load
Three-Phase Parallel RLC Load
Three-Phase Series RLC Load
Three-Phase Programmable Voltage Source
Three-Phase Source
You specify P and Q in the Load Flow tab of the block dialog boxes.
Load Flow Parameters of Three-Phase Sources and Synchronous Machines. The three-phase sources and synchronous machine blocks allow control of their generated or absorbed powers P and Q and their terminal voltage. You can specify the generator bus type as swing, PV, or PQ.
Load Flow Parameters of Asynchronous Machine Blocks. The Asynchronous Machine block requires specification of the mechanical power Pmec at the machine shaft.
Load Flow Parameters of the RLC Load Blocks. The Three Phase RLC Load blocks can be specified as constant impedance or constant PQ power.
Load Flow Parameters of Dynamic Load Blocks. The Three-Phase Dynamic Load block dialog does not have a Load Flow tab. The load is always considered as constant PQ load. P and Q are the initial active and reactive power Po, Qo that you specify by using the Active and reactive power at initial voltage parameter.
Use the Load Flow Bus block to define the buses in your model. You connect a Load Flow Bus block to phase A, B, or C of every load flow block in the model. When several load flow blocks are connected together at the same nodes, only one Load Flow Bus block is required to identify the bus.
In the Command window, type power_LFnetwork_5bus to access a model containing five Load Flow Bus blocks and six load flow blocks.
The Load Flow Bus blocks are shown in orange and the load flow blocks are shown in yellow.
The Load Flow Bus blocks are used to specify the bus base voltages. They are also used to specify the voltage at PV buses or the voltage and angle of the swing buses. Once the load flow is solved, the Load Flow Bus block displays the bus voltage magnitude and phase angle as block annotations.
The bus type (PV, PQ, or swing) is determined by the load flow blocks connected to the bus. If you have several load flow blocks with different types (specified in the Generator type parameter or in the Load type parameter) connected to the same bus, the Load Flow tool determines the resulting bus type.
In the power_LFnetwork_5bus example, the bus types are determined as follows:
Bus | Load Flow Blocks | Resulting Bus Type |
---|---|---|
B120 | 120 kV Three-Phase Source | swing |
B13.8 | 13.8 kV 150 MVA Synchronous Machine 3 MW 2 Mvar RLC Load | PV |
B25_1 | 10 MW, 3 Mvar Dynamic Load | PQ |
B25_2 | No load flow block | PQ |
B575 | Asynchronous generator 9 MW | PQ |
Some restrictions apply when you connect several source blocks and synchronous machines at the same bus:
Two swing generators cannot be connected in parallel.
A swing generator cannot be connected in parallel with a PV ideal voltage source.
When a swing voltage source with RL impedance is connected to a PV generator, the swing bus is automatically moved to the ideal voltage source connection node, behind the RL source impedance.
Only one PV generator with finite Q limits can be connected at a generation bus. However, you may have other PQ generators and loads connected on the same bus.
For more information on how to use the Load Flow Bus block in your model, see the Load Flow Bus block reference page.
Once you have entered the load flow parameters in the Load Flow Bus blocks and in the various load flow blocks, open the load flow tool by clicking the Load Flow button of the Powergui block. The tool displays a summary of the load flow data of the model. The table below shows the data found in the power_LFnetwork_5bus model.
Note that the table contains seven lines, whereas there are only six load flow blocks in the model. This is because the bus B25_2 is not connected to any load flow block. Line 5 is added in the table for that particular bus, so that you can see all buses listed together with their bus voltages. This bus will be considered in the load flow analysis as a PQ bus with zero P and Q.
The first column identifies the block type. The second column displays the bus type of the load flow blocks. The following four columns give the bus identification label, the bus base voltage, the reference voltage (in pu of base voltage) and the voltage angle of the load flow bus where the block is connected. The following columns are the P and Q values specified in the Load Flow tab of the blocks.
The last five columns display the current load flow solution, as well as the full block name of the load flow block. For now, the load flow has not yet been performed and the columns display zero values.
The four parameters below the table are used to build the Ybus network admittance matrix and to solve the load flow. The base power is used to specify units of the normalized Ybus matrix in pu/Pbase and bus base voltages. The power_LFnetwork_5bus model contains five buses; consequently, the Ybus matrix will be a 5x5 complex matrix evaluated at the frequency specified by the Frequency (Hz) parameter.
The load flow algorithm uses an iterative solution based on the Newton-Raphson method. The Max iterations parameter defines the maximum number of iterations. The load flow algorithm will iterate until the P and Q mismatch at each bus is lower than the PQ tolerance parameter (in pu/Pbase). The power mismatch is defined as the difference between the net power injected into the bus by generators and PQ loads and the power transmitted on all links leaving that bus.
To avoid a badly conditioned Ybus matrix, you should select the Base power parameter value in the range of nominal powers and loads connected to the network. For a transmission network with voltages ranging from 120 kV to 765 kV, a 100 MVA base is usually selected. For a distribution network or for a small plant consisting of generators, motors, and loads having a nominal power in the range of hundreds of kilowatts, a 1 MVA power base is better adapted.
To solve the load flow, click the Compute button. The load flow solution is then displayed in the last five columns of the table.
To display the load flow report showing power flowing at each bus, click the Report button. You can also save this report in a file by specifying the file name at the prompt.
The report starts with displaying the summary of active and reactive powers, showing total PQ sharing between generators (SM and Vsrc type blocks), PQ loads (PQ type RLC loads and DYN loads), shunt constant Z loads (Z type RLC loads and magnetizing branches of transformers) and asynchronous machine loads (ASM):
The Load Flow converged in 2 iterations ! SUMMARY for subnetwork No 1 Total generation : P= 5.61 MW Q= 25.51 Mvar Total PQ load : P= 13.00 MW Q= 5.00 Mvar Total Zshunt load : P= 0.68 MW Q= -0.51 Mvar Total ASM load : P= -8.90 MW Q= 4.38 Mvar Total losses : P= 0.83 MW Q= 16.64 Mvar
The Total losses line represents the difference between generation and loads (PQ type + Z type +ASM). It therefore represents series losses. After this summary, a voltage and power report is presented for each bus:
1 : B120 V= 1.020 pu/120kV 0.00 deg ; Swing bus Generation : P= -114.39 MW Q= 62.76 Mvar PQ_load : P= 0.00 MW Q= 0.00 Mvar Z_shunt : P= 0.25 MW Q= 0.23 Mvar --> B13.8 : P= -116.47 MW Q= 53.89 Mvar --> B25_1 : P= 1.84 MW Q= 8.63 Mvar 2 : B13.8 V= 0.980 pu/13.8kV -23.81 deg Generation : P= 120.00 MW Q= -37.25 Mvar PQ_load : P= 3.00 MW Q= 2.00 Mvar Z_shunt : P= 0.17 MW Q= 0.17 Mvar --> B120 : P= 116.83 MW Q= -39.42 Mvar 3 : B25_1 V= 0.998 pu/25kV -30.22 deg Generation : P= 0.00 MW Q= 0.00 Mvar PQ_load : P= 10.00 MW Q= 3.00 Mvar Z_shunt : P= 0.25 MW Q= 0.21 Mvar --> B120 : P= -1.83 MW Q= -8.44 Mvar --> B25_2 : P= -8.41 MW Q= 5.23 Mvar 4 : B25_2 V= 0.967 pu/25kV -20.85 deg Generation : P= 0.00 MW Q= 0.00 Mvar PQ_load : P= -0.00 MW Q= -0.00 Mvar Z_shunt : P= 0.01 MW Q= -0.03 Mvar --> B25_1 : P= 8.87 MW Q= -3.67 Mvar --> B575 : P= -8.88 MW Q= 3.70 Mvar 5 : B575 V= 0.953 pu/0.575kV -18.51 deg Generation : P= 0.00 MW Q= 0.00 Mvar PQ_load : P= -0.00 MW Q= -0.00 Mvar Z_shunt : P= 0.01 MW Q= -1.09 Mvar --> ASM : P= -8.90 MW Q= 4.38 Mvar --> B25_2 : P= 8.89 MW Q= -3.29 Mvar
For every bus, the bus voltage and angle are listed on the first line. The next 3 lines give the PQ generated at the bus (all SM and voltage sources), the PQ absorbed by the PQ type loads, and the PQ absorbed by the Z type loads.
The last lines, preceded by an arrow (-->), list the PQ transferred to neighbor buses connected through lines, series impedances, and transformers, as well power absorbed by ASM.
When performing a load flow analysis, you may need to iterate on P, Q, V values until you find satisfactory voltages at all buses. This may require, for example, changing generated power, load powers, or reactive shunt compensation.
To change the load flow setup, you need to edit the parameters of the load flow blocks and of the Load Flow Bus blocks. Then click the Update button to refresh the load flow data displayed by the table. The previous load flow solution is then deleted from the table. Click the Compute button to obtain a new load flow solution corresponding to the changes you made.
Once you have obtained a satisfactory load flow, you need to update the model initial conditions according to the load flow solution. Click the Apply button to initialize the machine blocks of the model, as well as the initial conditions of regulators connected to the machines.
Open the Three-Phase Parallel RLC Load block connected at the B13.8 bus. As the Load type specified in the Load Flow tab is constant PQ, the nominal voltage of this block has been changed to the corresponding bus voltage of 0.98 pu. The Nominal phase-phase voltage parameter is set to (13800)*0.98.
Open the Three-Phase Dynamic Load block connected at the B25_1bus. The Initial positive-sequence voltage Vo is set to [0.998241 pu -30.2228 deg].
Note that the voltage magnitudes and angles obtained at each bus have been written as block annotations under the Load Flow Bus blocks.
Open the scope and start the simulation.
The Three-Phase Fault block has been programmed to apply a six-cycle fault at B120 bus.
Observe waveforms of SM active power, SM and ASM speeds, and PQ of DYN load, and notice that simulation starts in steady state.
As an alternative to using the Load Flow tool interface to perform a load flow you can use the tool at the command line, by typing:
LF = power_loadflow('-v2','power_LFnetwork_5bus','solve') LF = model: 'power_LFnetwork_5bus' frequency: 60 basePower: 100000000 tolerance: 0.0001 bus: [1x7 struct] sm: [1x1 struct] asm: [1x1 struct] vsrc: [1x1 struct] pqload: [1x1 struct] rlcload: [1x2 struct] H: [15x15 double] Ybus0: [5x5 double] Ybus1: [5x5 double] status: 'ok' error: ''
The power_loadflow function returns the solution in the LF structure, and the model is automatically initialized to start in steady state. You can obtain a detailed load flow report by typing:
LF = power_loadflow('-v2','power_LFnetwork_5bus','solve','report');
The function prompts you to save the report in a file that is displayed in the MATLAB editor.
For more information on how to use the power_loadflow function in your code and for detailed information on the LF structure, see the power_loadflow reference page.
Up to now, you have simulated a relatively simple power system consisting of a maximum of three machines. If you increase complexity of your network by adding extra lines, loads, transformers, and machines, the required simulation time becomes longer and longer. Moreover, if you are interested in slow electromechanical oscillation modes (typically between 0.02 Hz and 2 Hz on large systems) you might have to simulate for several tens of seconds, implying simulation times of minutes and even hours. The conventional continuous or discrete solution method is therefore not practical for stability studies involving low-frequency oscillation modes. To allow such studies, you have to use the phasor technique (see Introducing the Phasor Simulation Method).
For a stability study, we are not interested in the fast oscillation modes resulting from the interaction of linear R, L, C elements and distributed parameter lines. These oscillation modes, which are usually located above the fundamental frequency of 50 Hz or 60 Hz, do not interfere with the slow machine modes and regulator time constants. In the phasor solution method, these fast modes are ignored by replacing the network's differential equations by a set of algebraic equations. The state-space model of the network is therefore replaced by a transfer function evaluated at the fundamental frequency and relating inputs (current injected by machines into the network) and outputs (voltages at machine terminals). The phasor solution method uses a reduced state-space model consisting of slow states of machines, turbines, and regulators, thus dramatically reducing the required simulation time. Continuous variable-step solvers are very efficient in solving this type of problem. Recommended solver is ode23tb with a maximum time step of one cycle of the fundamental frequency (1/60 s or 1/50 s).
Now apply the phasor solution method to the two-machine system you have just simulated with the conventional method. Open the power_machinespower_machines example.
Double-click the Powergui, click Configure Parameters, and in the Powergui block parameters dialog box set Simulation type to Phasor. You must also specify the fundamental frequency used to solve the algebraic network equations. A default value of 60 Hz should already be entered in the Phasor frequency field. Close the Powergui and notice that the word Phasors now appears on the Powergui icon, indicating that this new method can be used to simulate your circuit. To start the simulation in steady state, you must first repeat the machine initialization procedure explained in the previous section, Machine Initialization Tool.
In the Configuration Parameters dialog box, specify a Max step size of 1/60 s (one cycle) and start the simulation.
Observe that simulation is now much faster. The results compare well with those obtained in the previous simulation. A comparison of synchronous machine and asynchronous machine signals is shown below.
Comparison of Results for Continuous and Phasor Simulation Methods
The phasor solution method is illustrated on more complex networks presented as the following examples:
Transient stability of two machines with power system stabilizers (PSS) and a static var compensator (SVC) (power_svc_psspower_svc_pss model)
Performance of three power system stabilizers for interarea oscillations (power_PSSpower_PSS model)
The first example illustrates the impact of PSS and use of a SVC to stabilize a two-machine system. The second example compares the performance of three different types of power system stabilizers on a four-machine, two-area system.
The phasor solution method is also used for FACTS models available in the factslib library. See the case studies Improve Transient Stability Using SVC and PSS and Control Power Flow Using UPFC and PST.