Build and Simulate A Simple Circuit
Build and Simulate A Simple Circuit
Introduction
Simscape™ Electrical™ Specialized Power Systems allows you to build and simulate electrical circuits
containing linear and nonlinear elements.
The circuit in the figure represents an equivalent power system feeding a 300-km transmission line. The
line is compensated by a shunt inductor at its receiving end. A circuit breaker allows energizing and de-
energizing of the line. To simplify matters, only one of the three phases is represented. The parameters
shown in the figure are typical of a 735-kV power system.
Circuit to Be Modeled
Building the Electrical Circuit with the Simscape Electrical Specialized Power Systems Library
The graphical user interface uses Simulink functionality to interconnect various electrical components.
The electrical components are grouped in the Simscape Electrical Specialized Power Systems library.
1. To open the Simscape Electrical Specialized Power Systems main library, at the
MATLAB command prompt, enter:
®
simscapepowersystems_ST
2. Open a new blank model to contain your first circuit and save it as circuit1.
3. Add the AC Voltage Source block from the Simscape > Electrical > Specialized Power
Systems > Fundamental Blocks > Electrical Sources library.
4. Set the Amplitude, Phase, and Frequency parameters of the AC Voltage Source block
according to the values shown in Circuit to Be Modeled.
The amplitude to be specified for a sinusoidal source is its peak value (424.4e3*sqrt(2) volts,
in this case).
5. Change the name of this block from AC Voltage Source to Vs.
6. Add the Parallel RLC Branch block from the Simscape > Electrical > Specialized Power
Systems > Fundamental Blocks > Elements library, set its parameters as shown in Circuit to
Be Modeled, and name it Z_eq.
7. The resistance Rs_eq of the circuit can be obtained from the Parallel RLC Branch block.
Duplicate the Parallel RLC Branch block, which is already in your circuit1 window. Select R
for the Branch Type parameter and set the R parameter according to Circuit to Be Modeled.
Once the dialog box is closed, notice that the L and C components have disappeared so that
the icon now shows a single resistor.
8. Name this block Rs_eq.
9. Resize the various components and interconnect blocks by dragging lines from outputs to
inputs of appropriate blocks.
10. Add a PI Section Line block from the Simscape > Electrical > Specialized Power
Systems > Fundamental Blocks > Elements library. You add the circuit breaker later
in Simulating Transients.
The model of a line with uniformly distributed R, L, and C parameters normally consists of a
delay equal to the wave propagation time along the line. This model cannot be simulated as a
linear system because a delay corresponds to an infinite number of states. However, a good
approximation of the line with a finite number of states can be obtained by cascading several
PI circuits, each representing a small section of the line.
A PI section consists of a series R-L 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 Simscape > Electrical > Specialized Power Systems > Fundamental
Blocks > Elements library into the circuit1 window, set its parameters as shown in Circuit to
Be Modeled, and specify one line section.
11. The shunt reactor is modeled by a resistor in series with an inductor. You could use a Series
RLC Branch block to model the shunt reactor, but then you would have to calculate and
specify the R and L values manually based on the quality factor and reactive power specified
in Circuit to Be Modeled.
Therefore, you might find it more convenient to use a Series RLC Load block that allows you
to specify directly the active and reactive powers absorbed by the shunt reactor.
Add a Series RLC Load block from the Simscape > Electrical > Specialized Power
Systems > Fundamental Blocks > Elements library. Name this block 110 Mvar. Set its
parameters as follows:
Vn 424.4e3 V
fn 60 Hz
P 110e6/300 W (quality factor = 300)
QL 110e6 vars
Qc 0
As no reactive capacitive power is specified, the capacitor disappears on the block icon when
the dialog box is closed. Interconnect the new blocks as shown.
12. Add a Voltage Measurement block from the Simscape > Electrical > Specialized Power
Systems > Fundamental Blocks > Measurements library. Name it U1. Connect its positive
input to the node B1 and its negative input to a new Ground block.
13. To observe the voltage measured by U1, a display system is needed.
Add a Scope block into 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).
The voltage is normalized 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
K= 3 G2
1424.4×10 ×
14. Add a Gain block and set its gain as above. Connect its output to the Scope block and
connect the output of the Voltage Measurement block to the Gain block. Duplicate this
voltage measurement system at the node B2, as shown below.
15. Add a powergui block from the Simscape > Electrical > Specialized Power
Systems > Fundamental Blocks library. The purpose of this block is discussed in Using the
Powergui Block to Simulate Simscape Electrical Specialized Power Systems Models.
16. Start the simulation.
17. Open the Scope blocks and observe the voltages at nodes B1 and B2.
18. While the simulation is running, open the Vs block dialog box and modify the amplitude.
Observe the effect on the two scopes. You can also modify the frequency and the phase.
You can zoom in on the waveforms in the scope windows by drawing a box around the region
of interest with the left mouse button.
Interfacing the Electrical Circuit with Other Simulink Blocks
The Voltage Measurement block acts as an interface between the Simscape Electrical Specialized
Power Systems blocks and the Simulink blocks. For the system shown above, you implemented such an
interface from the electrical system to the Simulink system. The Voltage Measurement block converts
the measured voltages into Simulink signals.
Similarly, the Current Measurement block from the Simscape > Electrical > Specialized Power
Systems > Fundamental Blocks > Measurements library can be used to convert any measured current
into a Simulink signal.
You can also interface from Simulink blocks to the electrical system. For example, you can use
the Controlled Voltage Source block to inject a voltage in an electrical circuit, as shown in the following
figure.