Documentation

powergui

Environment block for Simscape Power Systems Specialized Technology models

Library

Fundamental Blocks (powerlib)

Description

The powergui block allows you to choose one of these methods to solve your circuit:

  • Continuous, which uses a variable-step solver from Simulink®

  • Discretization of the electrical system for a solution at fixed time steps

  • Phasor solution

The powergui block also opens tools for steady-state and simulation results analysis and for advanced parameter design.

You need the powergui block to simulate any Simulink model containing Simscape™ Power Systems™ Specialized Technology blocks. It stores the equivalent Simulink circuit that represents the state-space equations of the model.

When using one powergui block in a model:

  • Place the powergui block in the top-level diagram for optimal performance.

  • Make sure that the block uses the name powergui.

The powergui block becomes disabled during model update. To ensure proper model execution, do not restore the library link for the powergui block.

You can use multiple powergui blocks in a system that contains two or more independent electrical circuits that you want to simulate with different powergui solvers. For example, this system simulates the upper electrical circuit in discrete mode and the bottom circuit in continuous mode. The purpose is to compare simulation performance of the two methods.

To do so, put each circuit in two different subsystem, and then add a powergui block inside every subsystem.

When you use more than one powergui block in a model:

  • Do not place a powergui block in the top-level diagram.

  • Place every independent model in a different subsystem.

  • Place a single powergui block in the top level diagram of every subsystem.

Parameters

Solver

The configuration of the Solver tab depends on the option that you select from the Simulation type list.

Simulation type

Select Continuous ( default) to perform a continuous solution of the model.

Select Discrete to perform a discretization of the model. You specify the sample time in the Sample time parameter.

Select Phasor to perform phasor simulation of the model, at the frequency specified by the Phasor frequency parameter.

Sample time (s)

Specify the sample time used to discretize the electrical circuit. This parameter is visible only when the Simulation type parameter is set to Discrete.

Set the Sample time parameter t to a value greater than 0. The powergui block displays the value of the sample time. The default value is 50e-6 s.

Phasor frequency (Hz)

Specify the frequency for performing the phasor simulation of the model. This parameter is enabled only when you set Simulation type to Phasor. The powergui block displays the value of the phasor frequency. The default value is 60 Hz.

Tools

Steady-State

Open the Steady-State Voltages and Currents Tool dialog box to display the steady-state voltages and currents of the model. For more information, see power_steadystate.

Initial State

Open the Initial States Setting Tool dialog box to display and modify initial capacitor voltages and inductor currents of the model. For more information, see power_initstates.

Machine Initialization

Open the Machine Initialization Tool dialog box to initialize three-phase networks containing three-phase machines so that the simulation starts in steady state. The Machine Initialization tool offers simplified load flow features but can still initialize machine initial currents of your models. For more information, see power_loadflow.

Impedance Measurement

Open the Impedance vs Frequency Measurement Tool dialog box to display the impedance versus frequency defined by the Impedance Measurement blocks. For more information, see power_zmeter.

FFT Analysis

Open the FFT Analysis Tool dialog box to perform Fourier analysis of signals stored in a structure with time format. For more information, see power_fftscope.

See Performing Harmonic Analysis Using the FFT Tool for an example that uses the FFT Analysis tool .

Use Linear System Analyzer

Open a window to generate the state-space model of your system (if you have Control System Toolbox™ software installed) and open the Linear System Analyzer interface for time and frequency domain responses. For more information, see power_ltiview.

Hysteresis Design

Open a window to design a hysteresis characteristic for the saturable core of the Saturable Transformer block and the Three-Phase Transformer blocks (two- and three-windings). For more information, see power_hysteresis.

RLC Line Parameters

Open a window to compute RLC parameters of an overhead transmission line from conductor characteristics and tower geometry. For more information, see power_lineparam.

Generate Report

Open the Generate Report Tool dialog box to generate a report of steady-state variables, initial states, and machine load flow for a model. For more information, see power_report.

Customize SPS blocks

Open power_customize to create custom Simscape Power Systems Specialized Technology blocks.

Load Flow

Open the Load Flow Tool dialog box to perform load flow and initialize three-phase networks and machines so that the simulation starts in steady state.

The Load Flow tool uses the Newton-Raphson method to provide robust and faster convergence solution compared to the Machine Initialization tool.

The Load Flow tool offers most of the functionality of other tools available in the power utility industry. For more information, see power_loadflow.

Max iterations

Defines the maximum number of iterations the Load flow tool iterates until the P and Q powers mismatch at each bus is lower than the PQ tolerance parameter value (in pu/Pbase). The power mismatch is defined as the difference between the net power injected into the bus by generators and loads and the power transmitted on all links leaving that bus. For example, if the base power is 100 MVA and PQ tolerance is set to 1e-4, the maximum power mismatch at all buses does not exceed 0.1 MW or 0.1 Mvar. The default value is 50.

Frequency (Hz)

Specify the frequency used by the Load Flow tool to compute the normalized Ybus network admittance matrix of the model and to perform the load flow calculations. The default value is 60 Hz.

Base power (VA)

Specify the base power used by the Load Flow tool to compute the normalized Ybus network admittance matrix in pu/Pbase and bus base voltages of the model, at the frequency specified by the Load flow frequency parameter.

To avoid a badly conditioned Ybus matrix, select the base power value in the range of nominal powers and loads of the model. 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 base power is better adapted. The default value is 100e6 VA.

PQ tolerance (pu)

Defines the tolerance between P and Q when the Load flow tool stops to iterate. The default value is 0.0001.

Voltage units

Determine the voltage units (V, kV) used by the Load Flow tool to display voltages. The default is kV.

Power units

Determine the power units (W, kW, MW) used by the Load Flow tool to display powers. The default is MW.

Preferences

The load flow parameters are for model initialization only. They do not have an impact on simulation performance.

Disable Simscape Power Systems ST warnings

When this check box is selected, the Simscape Power Systems warnings do not display during model analysis and simulation. By default, this option is not selected.

Display Simscape Power Systems ST compilation messages

Select to enable the command-line echo messages during model analysis. By default, this option is not selected.

Use TLC file when in Accelerator Simulation Mode and for code generation

Select to use TLC state-space S-functions (sfun_spssw_contc.tlc and sfun_spssw_discc.tlc) in Accelerator mode and for code generation.

Clear this box if you notice a slowdown in performance when using Accelerator mode, compared to previous releases. This slowdown occurs if you have the LCC compiler installed as the default compiler for building external interface (mex). By default, this option is not selected.

Disable ideal switching

Select this option to model switching devices as current sources. By default, this option is not selected, which corresponds to the recommended setting for most of your applications.

Modeling switches, such as circuit breakers or power electronic devices, as current sources implies that the on-state switch resistance Ron cannot be zero. In this modeling method, the switches cannot be connected in a series with an inductive circuit or with another switch or current source.

When this option is enabled, you must add a circuit (R or RC snubber) in parallel with the switches in your model so that their off-state impedance has a finite value. If your real circuit does not use snubbers, or if you want to simulate ideal switches with no snubber, you must at least use resistive snubbers with a high resistance value to introduce a negligible leakage current. The drawback of introducing such high-impedance snubbers is that the large difference between the on-state and the off-state switch impedance produces a stiff state-space model.

Disable snubbers in switching devices

Select to disable the snubber devices of the power electronic and breaker blocks in your model. This parameter is enabled only when the Simulation type parameter is set to Continuous and the Disable ideal switching option is cleared. By default, this option is cleared.

Disable Ron resistance in switching devices

Select to disable the internal resistance of switches and power electronic devices and to force the value to zero ohms. This parameter is enabled only when the Simulation type parameter is set to Continuous and the Disable ideal switching option is cleared. By default, this option is cleared.

Disable forward voltage in switching devices (Vf=0)

Select to disable the internal forward voltage of power electronic devices and to force the value to zero volts. This parameter is enabled only if the Simulation type parameter is set to Continuous and if the Disable ideal switching option is cleared. By default, this option is cleared.

Display circuit differential equations

Select to display the differential equations of the model in the Diagnostic Viewer when the simulation starts. This parameter is enabled only when the Simulation type parameter is set to Continuous and the Disable ideal switching option is cleared. By default, this option is cleared.

Discrete solver

Set to Tustin/Backward Euler (TBE) to simulate the electrical model using a combination of Tustin and Backward Euler methods.

Set to Tustin to discretize the electrical model using the Tustin method. If you use this solver, you need to specify Rs and Cs snubber values to avoid numerical oscillations when the firing pulses are blocked (bridge operating as a rectifier). In this condition, you must use appropriate values of Rs and Cs. You can use the following formulas to compute approximate values of Rs and Cs:

Rs > 2*Ts/Cs

Cs < Pn/(1000*2*pi*f*Vn^2

where

  • Pn is the nominal power of single-phase or three-phase converter, in VA.

  • Vn is the nominal line-to-line AC voltage, in Vrms.

  • f is the fundamental frequency, in Hz.

  • Ts is the sample time, in s.

These values are derived from the following two criteria:

  • The snubber leakage current at fundamental frequency is less than 0.1% of nominal current when power electronic devices are not conducting.

  • The RC time constant of snubbers is larger than two times the sample time Ts.

Note

The Rs and Cs values that guarantee numerical stability of the discretized bridge can be different from the actual values used in the physical circuit.

Set to Backward Euler to discretize the electrical model using the Backward Euler method.

The default and recommended method is the Tustin/Backward Euler (TBE) method. This parameter is enabled only if you set the Simulation Type parameter to Discrete.

Interpolate switching events

This parameter is enabled only when Discrete solver is set to Tustin. Select to increase simulation speed by enabling the solver to interpolate in discrete models using power electronics. When this option is selected, the solver captures gate transitions of power electronic devices occurring between two sample times, allowing larger sample times (typically 20×) than you use with the standard solvers. For example, simulating a 5 kHz PWM converter with Tustin (no interpolation) or Tustin/Backward Euler normally requires a 1.0 µs sample time (sampling frequency = 200 × PWM frequency) to obtain a good resolution on pulse generation and guarantee accurate results. With interpolation enabled, using a sample time as large as 20 µs executes faster while preserving model accuracy.

When you select this option:

  • Use a continuous pulse generator to guarantee the best accuracy on pulse generation (specify sample time = 0 in pulse-generation blocks).

  • In Simulink Model Configuration Parameters, select a continuous, variable-step solver (ode45 or ode23tb with default settings). The continuous solver is required by the interpolation solver to compute the gate signals time delays with respect to discrete sample times. The solver uses these pulse delays to interpolate between sample times and produce accurate results.

See the power_buck example model to see how interpolation increases accuracy and simulation speed.

Use time-stamped gate signals

This option is enabled when the Interpolate switching events option is selected. The interpolation method computes model outputs at fixed sample times while taking into account switching events that occur between two sample times. The method receives pulses at fixed time steps and computes the time delays of gate signals arriving within each time step. Computing the time delays enables the method to capture the evolution of states at different switching times.

When Use time-stamped gate signals is cleared, the interpolation method computes the time delays of gate signal.

When Use time-stamped gate signals is selected, the block does not compute the time delays of gate signals. You then need to directly provide time-stamped gate signals to the switching devices in your model. See the power_buck example for more information on the concept of time-stamped gate signals in Simscape Power Systems switching devices.

The Use time-stamped gate signals parameter is enabled only when you set Simulation type to Discrete, set Solver type to Tustin, and select the Interpolate option. By default, this option is cleared.

Store switching topologies

Select to increase simulation speed by enabling the solver to store and reuse matrix computation results. This parameter is enabled only when you set Simulation type to Continuous or Discrete. By default, this option is not selected.

Buffer Size (MBytes)

Specify the buffer size for saving state-space matrix computations. This parameter is enabled only when you set Simulation type to Discrete, set Solver type to Tustin, and select the Store switching topologies options. The default value is 100 MB.

Start simulation with initial electrical states from

If you select blocks, initial state values defined in blocks are used for the simulation.

If you select steady, force all initial electrical state values to steady-state values.

If you select zero, force all initial electrical state values to zero.

The default is blocks.

Introduced before R2006a

Was this topic helpful?