Sie sind auf Seite 1von 9

MATLAB SimPower System Tutorial by Engr.

Saima Ali

SimPower System Tutorial


By: Saima Ali, Lecturer EE Department __________________________________________________________________ Task 1:
Analysis of steady-state operation of a linear electrical circuit

This example illustrates use of the Powergui and Impedance Measurement blocks to analyze the steady-state operation of a linear electrical circuit. This linear system consists of 3 states (2 inductor currents and 1 capacitor voltage), 2 inputs (Vs, Is) and 2 outputs (Current and Voltage Measurement). An Impedance Measurement block is used to compute the impedance versus frequency of the circuit.

Demonstration:
1. Use the Powergui block to find the steady-state 60Hz and 300 Hz components of voltage and current phasors. The values of the 3 states (phasors and initial values) can be also obtained from the powergui block. 2. Open the scope and start the simulation from the Simulation/Start menu. Notice that the simulation starts in steady-state. 3. Using the Powergui block, select Impedance vs. Frequency Measurement. A new window opens. 4. The measurement will be performed for the specified frequency range vector [0: 2:1000] (0 to 1000 Hz by steps of 2 Hz). Click on the Display button. The impedance is displayed in a graphic window. Notice the series resonance at 300 Hz corresponding to the tuned frequency of the filter.

Task 2:
IEEE HERTZ COMSATS Inst. Of Info Technology, Abbottabad (www.hertz.ciit.net.pk)

MATLAB SimPower System Tutorial by Engr. Saima Ali

Transient Analysis of a Linear Circuit:

Circuit Description:
This circuit is a simplified model of a 230 kV three-phase power system. Only one phase of the transmission system is represented. The equivalent source is modeled by a voltage source (230 kV rms/sqrt(3) or 187.8 kV peak, 60 Hz) in series with its internal impedance (Rs Ls) corresponding to a 3-phase 2000 MVA short circuit level and X/R = 10. (X = 230e3^2/2000e6 = 26.45 ohms or L = 0.0702 H, R = X/10 = 2.645 ohms). The source feeds a RL load through a 150 km transmission line. The line distributed parameters (R = 0.035ohm/km, L = 0.92 mH/km, C = 12.9 nF/km) are modeled by a single pi section (RL1 branch 5.2 ohm; 138 mH and two shunt capacitances C1 and C2 of 0.967 uF). The load (75 MW - 20 MVAR per phase) is modeled by a parallel RLC load block. A circuit breaker is used to switch the load at the receiving end of the transmission line. The breaker which is initially closed is opened at t = 2 cycles, then it is reclosed at t = 7 cycles. Current and Voltage Measurement blocks provide signals for visualization purpose.

Demonstration:
1. Simulation using a continuous solver Start the simulation and observe line voltage and load current transients during load switching and note that the simulation starts in steady-state. Use the zoom buttons of the oscilloscope to observe the transient voltage at breaker reclosing.

2. Using the Powergui to obtain steady-state phasors and set initial states
Open the Powergui block and select "Steady State Voltage and Currents" to measure the steady-state voltage and current phasors. Using the Powergui select now "Initial States Setting" to obtain the initial state values (voltage across capacitors and current in inductances). Now, reset all the initial states to zero by clicking the "to zero" button and then "Apply" to confirm changes. Restart the simulation and observe transients at simulation starting. Using the same Powergui window, you can also set selected states to specific values.

3. Discretizing your circuit and simulating at fixed steps


The Powergui block can also be used to discretize your circuit and simulate it at fixed steps. Open the Powergui. Select Discretize electrical model" and specify a sample time of 50e-6 s. The state-space model will now be discretized using trapezoidal fixed step integration. The precision of results is now imposed by the sample time. IEEE HERTZ COMSATS Inst. Of Info Technology, Abbottabad (www.hertz.ciit.net.pk)

MATLAB SimPower System Tutorial by Engr. Saima Ali 3 Restart the simulation and compare simulation results with the continuous integration method. Vary the sample time of the discrete system and note the impact on precision of fast transients.

4. Using the phasor simulation method


You will now use a third simulation technique. The "phasor simulation" method consists to replace the circuit state-space model by a set of algebraic equations evaluated at a fixed frequency and to replace sinusoidal voltage and current sources by phasors (complex numbers). This method allows a fast computation of voltage and current phasors at a selected frequency, disregarding fast transients. It is particularly efficient to study electromechanical transients of generators and motors involving low frequency oscillation modes. Open the Powergui block and select "Phasor simulation". Restart the simulation. Observe that the magnitude of 60 Hz voltage and current is now displayed on the scope. If you double click on the voltage or current measurement block you can choose to output phasor signals in four different formats: Complex, Real/Imag, Magnitude/Angle (in degrees), or just Magnitude (default value). Notice that you cannot send a complex signal to an oscilloscope.

Task 3:
Transformer Modeling with Simulink/ SimPowerSystems:
The Simulink / SimPowerSystems libraries include single-phase and three-phase transformer blocks. In this section we will model a single-phase transformer circuit; we will model a three-phase transformer circuit.

Circuit Diagram

Demonstration:
We begin the creation of our model by performing the following steps: 1. At the MATLAB command prompt we enter powerlib and the SimPowerSystems library blocks window appears as shown in Figure 3.1. 2. At the upper left corner we click File>New>Model and the window shown in Figure 3.2 appears. 3. From the powerlib library in Figure 3.1, we drag the following blocks into the blank window in Figure 3.2

IEEE HERTZ COMSATS Inst. Of Info Technology, Abbottabad (www.hertz.ciit.net.pk)

MATLAB SimPower System Tutorial by Engr. Saima Ali

Figure 3.1. The powerlib library

Figure 3.2

a. powergui
b. Electrical Sources: Choose AC Voltage Source c. Elements: Choose Parallel RLC Load, Ground (copy 4 times), Linear Transformer d. Measurements: Current Measurement, Voltage Measurement e. From the Simulink Commonly Used Blocks: Scope (copy once) When all the blocks are dragged, the new model window will appears as shown in Figure 3.3. Next, we perform the following steps: a. We double-click the Linear Transformer block and on the Block Parameters window we uncheck the Three windings transformer option. The transformer now appears as a two winding transformer. b. We double-click the Parallel RLC Load and on the Block Parameters window we set the Capacitive reactive power Qc to zero. The block now is reduced to a parallel RL block. We rotate this block with Format>Rotate Block>Counterclockwise. c. We interconnect the blocks and we rename them as shown in the model in Figure 3.4. d. The parallel 40 KW / 30 KVAR load is assumed to be a pf = 0.8 lagging load.

Figure 3.3. The blocks for the model

IEEE HERTZ COMSATS Inst. Of Info Technology, Abbottabad (www.hertz.ciit.net.pk)

MATLAB SimPower System Tutorial by Engr. Saima Ali

Figure 3.4

By default, the calculations are performed using the pu method but the parameters will automatically be converted if we change from pu to SI or vice versa. The Block Parameters for the transformer block are in pu values are shown in Figure 3.5.

Figure 3.5. The Block Parameters dialog box for the transformer of the model in Figure 3.4

Before we issue the Simulation Start command for the model in Figure 3.4, we click Simulation>Configuration Parameters>Solver, and we select the ode23b(stiff/TRBDF2) parameter. After the simulation command is executed the Scope 1 and Scope 2 blocks display the waveforms in Figures 3.6 and 3.7 respectively, noting that amplitudes are in peak values, i.e., Peak = RMS 2 .

IEEE HERTZ COMSATS Inst. Of Info Technology, Abbottabad (www.hertz.ciit.net.pk)

MATLAB SimPower System Tutorial by Engr. Saima Ali

Figure 3.6. Waveform for the primary winding current

Figure 3.7. Waveform for the voltage across the load

The SimPowerSystems/Measurements library includes the Multimeter block which is now added to the model and the new model is shown in Figure 3.8. We double click the Multimeter block and we observe that the left pane in the dialog box in Figure 3.9 displays 6 Available Measurements and as Ub (Parallel RLC Load), Uw1 and Uw2 (Primary and Secondary Winding Voltages), Iw1 and Iw2 (Primary and Secondary Winding Currents), and Imag (Magnetization Current). The last 5 measurement are displayed because in the Block Parameters dialog box for the Linear Transformer block in Figure 3.5, in the Measurements parameter we selected the All voltages and currents option.

IEEE HERTZ COMSATS Inst. Of Info Technology, Abbottabad (www.hertz.ciit.net.pk)

MATLAB SimPower System Tutorial by Engr. Saima Ali

Figure 3.8. The model for Example 9.13 with the added Multimeter block

In the Multimeter dialog box in Figure 3.9, the Available Measurements in the left pane were highlighted to be selected, and were copied to the Selected Measurements pane on the right side by clicking the >> icon. The dialog box was then updated by clicking the Update button, and with the Plot selected measurements parameter selected, the Simulation Start command was issued producing the plots of the selected measurements shown in Figure 3.10, and we observed that the number inside the Multimeter block was changed to . As we have seen, with the use of the Multimeter block it was not necessary to use the Scope 1and Scope 2 blocks since the primary current and the load voltage waveforms are also shown in Figure 3.10.

Figure 3.9. The Multimeter block dialog box

IEEE HERTZ COMSATS Inst. Of Info Technology, Abbottabad (www.hertz.ciit.net.pk)

MATLAB SimPower System Tutorial by Engr. Saima Ali

Figure 3.10. Waveforms for the six measurements provided by the Measurements block in Figure 3.8

Task 4:
Time Domain and Frequency Domain Testing of a Single Phase Line:

Circuit Description:
A 200 km line is connected on a 1 kV, 60 Hz infinite source. The line is deenergized and then reenergized after 2 cycles. The simulation is performed simultaneously with two different line models: - Distributed parameter line - PI section line consisting of two 100 km sections. Currents at the sending end and voltages at the receiving end are compared for the two line models. Impedance Measurement blocks are connected at the open end of both lines in order to compare their frequency responses.

IEEE HERTZ COMSATS Inst. Of Info Technology, Abbottabad (www.hertz.ciit.net.pk)

MATLAB SimPower System Tutorial by Engr. Saima Ali

Demonstration
1. Steady-state

Open the Powergui block and select 'Steady-State Voltages and Currents' to display the voltage and current phasors. Observe that the values obtained with the two models are the same.
2. Time domain comparison

Open the two scopes and start the simulation. Observe the difference in current and voltage waveforms at breaker opening and reclosing. Note the sharp edges of the distributed parameter model (in yellow). These voltage and current steps which are due to travelling wave reflections at line ends are filtered by the PI model.
3. Frequency domain comparison

Open the Powergui block and select Impedance vs Frequency Measurement'. A new window appears, listing the two Impedance Measurement blocks Z_Dist and Z_PI connected to your circuit. Note also that parameters are set to compute impedance in the 0:2000 Hz frequency range by steps of 2 Hz. Using the 'CTRL' key, select both Z_Dist and Z_PI in the upper right window. Then, click on the Display button. The two impedances are computed and displayed on the same graph. Note that the distributed parameter line shows a succession of poles and zeros equally spaced, every 486 Hz. The first pole occurs a 243 Hz , corresponding to frequency f = 1 / (4*T), where : T = travelling time = length*sqrt(L*C) = 200*sqrt(2.137e-3*12.37e-9) = 1.028 ms The PI section line only shows two poles because it consists of two PI sections. Impedance comparison shows that a two-PI line gives a good approximation of the distributed line for the 0-350 Hz frequency range.

IEEE HERTZ COMSATS Inst. Of Info Technology, Abbottabad (www.hertz.ciit.net.pk)

Das könnte Ihnen auch gefallen