In this section you
Learn how to create an electrical subsystem
Simulate transients with a circuit breaker
Compare time domain simulation results with different line models
Learn how to discretize a circuit and compare results thus obtained with results from a continuous, variable time step algorithm
One of the main uses of SimPowerSystems™ software is to simulate transients in electrical circuits. This can be done with either mechanical switches (circuit breakers) or switches using power electronic devices.
Open the power_gui example model.
Insert a circuit breaker into your circuit to simulate a line energization by opening the Fundamental Blocks/Elements library. Copy the Breaker block into the power_gui example.
Open the Breaker block dialog box and set its parameters as follows:
Insert the circuit breaker in series with the sending end of the line, then rearrange the circuit as shown in the figure.
Right-click the two lines that connect to the Scope 1 block and select Properties. In the dialog box, select Log signal data for the two signals and click OK. From the Simulation Data Inspector menu , select Send Logged Workspace Data to Data Inspector.
Open the PI section Line dialog box and make sure the number of sections is set to 1. Start the simulation.
Open the PI section Line dialog
box and change the number of sections from
Start the simulation.
Delete the PI section line model and replace it with
a single-phase Distributed Parameter Line block.
Set the number of phases to
1 and use the same
R, L, C, and length parameters as for the PI section line. Start the
You can now compare the three waveforms obtained with the three line models. Open the Simulation Data Inspector. Select the Ub1 and Ub2 signals of Run 1, the Ub2 signals of Run 2, and Run 3.
A zoom on these waveforms is shown in the next figure. As expected from the frequency analysis performed during Analyze a Simple Circuit, the single PI 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 in the figure the propagation time delay of 1.03 ms associated with the distributed parameter line.
Receiving End Voltage Obtained with Three Different Line Models
An important product feature is its ability to simulate either with continuous, variable step integration algorithms or with discrete solvers. For small systems, variable time step algorithms are usually faster than fixed step methods, because the number of integration steps is lower. For large systems that contain many states or many nonlinear blocks such as power electronic switches, however, it is advantageous to discretize the electrical system.
When you discretize your system, the precision of the simulation is controlled by the time step. If you use too large a time step, the precision might not be sufficient. The only way to know if it is acceptable is to repeat the simulation with different time steps and find a compromise for the largest acceptable time step. Usually time steps of 20 µs to 50 µs give good results for simulation of switching transients on 50 Hz or 60 Hz power systems or on systems using line-commutated power electronic devices such as diodes and thyristors. You must reduce the time step for systems using forced-commutated power electronic switches. These devices, the insulated-gate bipolar transistor (IGBT), the field-effect transistor (FET), and the gate-turnoff thyristor (GTO) are operating at high switching frequencies.
For example, simulating a pulse-width-modulated (PWM) inverter operating at 8 kHz would require a time step of at most 1 µs.
Open the power_3level example. In the Powergui block,
note that the Simulation type is set to
the sample time is set to 1e-6 s by the Ts variable
defined in the Model Properties. Run a first simulation.
To perform a continuous simulation, open the Powergui
block parameters dialog box and set Simulation
ideal switching devices. Select the
variable-step solver in the Configuration Parameters
dialog box. Simulate the model.
In the Powergui block, set Simulation
Discrete. In the command
window, specify Ts = 20e-6. Run the simulation.
Open the Simulation Data Inspector and compare the differences on the high-frequency transients.
The 1 µs compares reasonably well with the continuous simulation. However, increasing the time step to 20 µs produces appreciable errors. The µs time step would therefore be acceptable for this circuit, while obtaining a gain on simulation speed.