What is Powergui Block in Matlab

powergui

Environment block for Simscape Electrical Specialized Power Systems models

  • Library:
  • Simscape / Electrical / Specialized Power Systems

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

  • Continuous or discrete 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 ™ Electrical ™ Specialized Power Systems 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 is named.

grade

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 system compares the simulation performance of the two methods.

To do so, put each circuit in a different subsystem, and then add a powergui block inside each 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.

grade

Do not include commented-out powergui blocks in your model. Doing so will prevent the model from simulating.

Parameters

expand all

Solver

- Simulation type
(default) | | |

Simulation type for the model:

  • - Perform a continuous solution of the model.

  • - Perform a discretization of the model using the sample time specified by the Sample time (s) parameter.

  • - Perform continuous phasor simulation of the model at the frequency specified by the Frequency (Hz) parameter.

  • - Perform a phasor simulation at fixed time steps specified by theSample time (s) parameters, and at the frequency specified by the Frequency (Hz) parameter. The solver uses simplified machine models that produce simulation results similar to transient stability software.

- Sample time for discretization
(default) | positive scalar

Sample time used to discretize the electrical circuit, in see The powergui block displays the value of the sample time.

Dependencies

To enable this parameter, set Simulation type to or.

- Frequency for phasor simulation
(default) | positive scalar

Frequency, in Hz, for performing the phasor simulation of the model. The powergui block displays the value of the phasor frequency.

Dependencies

To enable this parameter, set Simulation type to or.

Tools

- Display steady-state voltages and currents
button

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.

- Display and modify initial capacitor voltages and inductor currents
button

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.

- Initialize three-phase networks containing three-phase machines
button

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.

- Display the impedance versus frequency
button

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

- Perform Fourier analysis of signals
button

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

For an example that uses the FFT Analysis tool, see Performing Harmonic Analysis Using the FFT Tool.

- Time and frequency domain responses
button

Open the Linear System Analyzer dialog box to generate the state-space model of your system (if you have a Control System Toolbox ™ license) or to view time and frequency domain responses. For more information, see.

- Design hysteresis characteristic for the saturable core
button

Open the Hysteresis Design Tool to design a hysteresis characteristic for the saturable core of the Saturable Transformer block and the Three-Phase Transformer blocks (Two Windings and Three Windings). For more information, see.

- Compute RLC parameters of an overhead transmission line
button

Open the Compute RLC Line Parameters Tool to compute the RLC parameters of an overhead transmission line from the conductor characteristics and tower geometry. For more information, see.

- Generate report of steady-state variables, initial states, and machine load flow
button

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.

- Create custom blocks
button

Open the power_customize dialog box to create custom Simscape Electrical Specialized Power Systems blocks. For more information, see.

- Perform load flow and initialize three-phase networks and machines
button

Open the Load Flow Tool dialog box to perform load flow analysis 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 a 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.

- Maximum iterations used by the Load Flow Tool
(default) | positive integrity

Maximum number of times 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 andPQ tolerance is set to, the maximum power mismatch at all buses does not exceed 0.1 MW or 0.1 Mvar.

- Frequency for load flow computations
(default) | positive scalar

Frequency, in Hz, used by the Load Flow Tool to compute the normalized Ybus network admittance matrix of the model and to perform the load flow calculations.

- Base power used by the Load Flow Tool
(default) | positive scalar

Base power, in VA, 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 theFrequency (Hz) parameter for load flow computations.

To avoid a badly conditioned Ybus matrix, select a 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 that have a nominal power in the range of hundreds of kilowatts, a 1 MVA base power is better adapted.

- Tolerance between P and Q
(default) | positive scalar

Tolerance between P and Q when the load flow tool stops to iterate.

- Voltage units used by the Load Flow Tool
(default) |

Voltage units used by the Load Flow Tool to display voltages.

- Power units used by the Load Flow Tool
(default) | |

Power units used by the Load Flow Tool to display powers.

Preferences

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

- Disable warnings during analysis and simulation
(default) |

Control display of Simscape Electrical Specialized Power Systems warnings during model analysis and simulation.

- Display echo messages during analysis
(default) |

Control display of the command-line echo messages during model analysis.

- Use TLC state-space S-functions
(default) |

Select to use TLC state-space S-functions (and) in accelerator mode and for code generation.

Clear this checkbox if you notice a slowdown in performance when using accelerator mode when compared to previous releases. This slowdown occurs if you have the LCC compiler installed as the default compiler for building the external interface ().

Dependencies

To enable this parameter, set Simulation type to.

- Control model switching devices as current sources
(default) |

Select 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 the switches' 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.

Dependencies

To enable this parameter, set Simulation type to.

- Control snubber devices of power electronic and breaker blocks
(default) |

Select to disable the snubber devices of the power electronic and breaker blocks in your model.

Dependencies

To enable this parameter, set Simulation type to and clear Disable ideal switching.

- Control internal resistance of switches and power electronic devices
(default) |

Select to disable the internal resistance of switches and power electronic devices and to force the value to zero ohms.

Dependencies

To enable this parameter, set Simulation type to and clear Disable ideal switching.

- Control internal forward voltage of power electronic devices
(default) |

Select to disable the internal forward voltage of power electronic devices and to force the value to zero volts.

Dependencies

To enable this parameter, set Simulation type to and clear Disable ideal switching.

- Display differential equations in Diagnostic Viewer
(default) |

Select to display the differential equations of the model in the Diagnostic Viewer when the simulation starts.

Dependencies

To enable this parameter, set Simulation type to and clear Disable ideal switching.

- Set descretization method automatically
(default) |

Select to automatically set the discretization method to in models that contain at least one of the following blocks:

  • Asynchronous machine

  • Permanent Magnet Synchronous Machine

  • Simplified Synchronous Machine

  • Synchronous machine

  • Surge arrester

  • Variable resistor

  • Variable inductor

  • Variable capacitor

  • Nonlinear Resistor

  • Nonlinear Inductor

  • Variable-Ratio Transformer

  • Any transformer blocks that are modeling saturation

If your model contains none of these blocks, the discretization method is automatically set to.

Dependencies

To enable this parameter, set Simulation type to.

- Discrete solver to use to simulate model
(default) | |

Set to simulate the model using a combination of the Tustin and Backward Euler methods.

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

Rs > 2* Ts / Cs

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

where:

  • Pn is the nominal power of the 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 these criteria:

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

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

grade

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

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

Dependencies

To enable this parameter, set Simulation type to and clearAutomatically handle Discrete solver and Advanced tab solver settings of blocks.

- Increase simulation speed
(default) |

Select to increase simulation speed by enabling the solver to interpolate in discrete models using power electronics. When 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 = in pulse-generation blocks.)

  • In the Configuration Parameters dialog box, select a continuous, variable-step solver (or 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.

To see how interpolation increases accuracy and simulation speed, see the power_buck example model.

Dependencies

To enable this parameter, set Simulation type to, clearAutomatically handle Discrete solver and Advanced tab solver settings of blocks, and set Discrete solver to.

- Capture evolution of states at different switching times
(default) |

When 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 the 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 cleared, the interpolation method computes the time delays of the gate signal.

When 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. For more information on the concept of time-stamped gate signals in Simscape Electrical Specialized Power Systems switching devices, see the power_buck example.

Dependencies

To enable this parameter, set Simulation type to, clearAutomatically handle Discrete solver and Advanced tab solver settings of blocks, set Discrete solver to, and select Interpolate switching events.

- Increase simulation speed
(default) |

Select to increase simulation speed by enabling the solver to store and reuse matrix computation results.

Dependencies

To enable this parameter, set Simulation type to or and clearAutomatically handle Discrete solver and Advanced tab solver settings of blocks.

- Buffer size for saving computations
(default) | positive scalar

Buffer size for saving state-space matrix computations.

Dependencies

To enable this parameter, set Simulation type to or, clearAutomatically handle Discrete solver and Advanced tab solver settings of blocks, and select Store switching topologies.

- Initial state value
(default) | |

If you select:

  • - Initial state values ​​defined in blocks are used for the simulation

  • - Forces all initial electrical state values ​​to steady-state values

  • - Forces all initial electrical state values ​​to zero

- Maximum solver error
(default) | positive scalar

Largest acceptable solver error.

Dependencies

To enable this parameter, set Simulation type to and expand Solver details for nonlinear elements.

- Iteration limit
(default) | positive scalar

Maximum number of iterations. Iterations stop when theSolver tolerance is achieved, or when theMaximum number of iterations is reached. A solution is usually found within 1 to 3 iterations. An error message is returned and simulation stops if a solution is not found when the maximum number of iterations is exceeded.

Dependencies

To enable this parameter, set Simulation type to and expand Solver details for nonlinear elements.

- Limit maximum number of iterations
(default) |

Select to limit the maximum number of iterations. This parameter is used for real-time applications. Usually, limiting the number of iterations to 2 produces acceptable results.

Dependencies

To enable this parameter, set Simulation type to and expand Solver details for nonlinear elements.

Extended capabilities

C / C ++ code generation
Generate C and C ++ code using Simulink® Coder ™.

You clicked a link that corresponds to this MATLAB command:

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.

Select web site

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.