SimPowerSystems    
Powergui

Graphical user interface for the analysis of circuits and systems

Library

powerlib

Description

The Powergui block provides useful graphical user interface (GUI) tools for the analysis of SimPowerSystems models. Copy the Powergui block into the top level of your model and double-click the block to open the interface.

What the Powergui Block Does

The Powergui block allows you to choose one of three methods to solve your circuit:

  1. Continuous method, which uses a variable step solver from Simulink
  2. Discretization of the electrical system for a solution at fixed time steps
  3. Phasor solution method

The Powergui block also allows you to

Dialog Boxes and Parameters

Simulation Type

Phasor simulation
If selected, SimPowerSystems performs a phasor simulation of the model, at the frequency specified by the Frequency parameter.
Frequency (Hz)
Specify the frequency used by SimPowerSystems to perform the phasor simulation of the model. The Frequency field is gray if Phasor simulation is not selected.
Discretize electrical model
If selected, SimPowerSystems performs a discretization of the model. The sample time is specified by the Sample time parameter.
Sample time(s)
Specify the sample time used to discretize the electrical circuit. Set the Sample time parameter to a value greater than 0. The icon displays the value of the sample time. If sample time is specified as 0, discretization is not performed, and the continuous solution method is used. The Sample time field is gray if the Discretize electrical model parameter is not selected.
Continuous
If selected, SimPowerSystems performs a continuous solution of the model.
Show messages during simulation
If selected, the command line echo messages of SimPowerSystems are enabled during the analysis and simulation of the model.

Analysis Tools

Steady-State Voltages and Currents
Open a window that displays the steady-steady-state voltages and currents of the model.
Initial States Setting
Open a window that allows you to display and modify initial voltages and currents of the model.
Load Flow and Machine Initialization
Open a window to perform load flow and machine initialization.
Use LTI Viewer
Open a window to use the LTI Viewer of the Control System Toolbox.
Impedance vs Frequency Measurement
Open a window that allows you to display the impedance versus frequency measurements performed by the Impedance Measurement blocks of the model.
FFT Analysis
Open a window to use the FFT analysis tool.
Generate Report
Open a window and generate a report of the steady-state calculations.
Hysteresis Design Tool
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).

Steady-State Voltages and Currents GUI

Steady state values
Display measurements of steady-state voltages and currents in the model.
Units
Set the Units parameter to Peak values to display the peak values of the selected values. Set the Units parameter to RMS to display the root-mean-square (RMS) values of the selected values.
Frequency
Allows you to choose the frequency, in hertz (Hz), that you want for display of the voltage and current phasors. The Frequency parameter lists all the different frequencies of the electrical sources of the model.
States
If selected, the window displays the steady-state phasors of the capacitor voltages and inductor currents of the circuit. The default is unselected.
Measurements
If selected, the window displays the steady-state voltage and current phasors of the measurement blocks of the circuit. The default is selected.
Sources
If selected, the window displays the steady-state voltage and current phasors of the electrical sources of the circuit. The default is unselected.
Nonlinear elements
If selected, the window displays the steady-state voltages and currents of the nonlinear blocks of the circuit. The default is unselected.
Format
In the pull-down menu, choose the format in which you want your measurements displayed. The floating point option is displayed in mantissa-exponent form with five significant figures. The best of option displays with four significant figures and uses mantissa-exponent form only for numbers larger than 9999. The final option is displayed in plain numbers with two figures to the right of the decimal point. The default is floating point.
Reload Steady State Values
Recompute and redisplay the steady-state measurements.

Initial States Setting GUI

Initial state values for simulation
Display names of model state variables and their initial values.
Set selected state
Enter a value here to set the initial value of the variable selected in the Initial state values for simulation list.
Reset all states
If To Steady State is selected, sets all initial state values to steady-state values. If To Zero is selected, sets all variables to zero.
Reload states
If From File is selected, allows you to choose a previously saved file storing the model's states. If From Diagram is selected, sets all initial state values to their current values (either steady state values or last modified values).
Apply
Apply the chosen settings to the simulation.
Revert
Reapply the model's original settings from when this GUI was opened.
Save Initial States
Save the model's initial state settings in a file.
Format
In the pull-down menu, choose the format in which you want your measurements displayed. The floating point option is displayed in mantissa-exponent form with five significant figures. The best of option displays with four significant figures and uses mantissa-exponent form only for numbers larger than 9999. The final option is displayed in plain numbers with two figures to the right of the decimal point. The default is floating point.
Sort values by
Select order of displayed initial state values. Selecting Default order displays the value by block order in the diagram. Selecting State number displays the values according to the states' ordering in the state-space model. Selecting Type displays the values grouped by capacitors and inductors. The default is Default order.

Sign Conventions for Voltages and Currents

Unlike Simulink signal lines and input and output ports, the Physical Modeling connection lines and terminal ports of SimPowerSystems lack intrinsic directionality. The voltage and current polarities are determined, not by line direction, but instead by block orientation. To find out a block orientation, first click on the block to select it. Then enter the following command:

The following table indicates the polarities of the currents and voltages for single-phase and three-phase RLC elements (branches or loads), surge arresters, and single-phase and three-phase breakers. The table also indicates the polarities of their state variables (inductor currents and capacitor voltages).

Block
Orientation 

Positive Current
Direction 

Measured
Voltage 

right

left --> right

Vleft - Vright

left

right --> left

Vright - Vleft

down

top --> bottom

Vtop - Vbottom

up

bottom --> top

Vbottom - Vtop

The natural orientation of the blocks (that is, their orientation in the Element library) is right for horizontal blocks and down for vertical blocks.

For single-phase transformers (linear or saturable), with the winding connectors appearing on the left and right sides, the winding voltages are the voltages of the top connector with respect to the bottom connector whatever the block orientation (right or left). The winding currents are the currents entering the top connector. For three-phase transformers, the voltage polarities and positive current directions are indicated by the signal labels used in the Multimeter block.

Load Flow and Machine Initialization GUI

Machine load flow
Displays load flow characteristics of the machine selected in the Machines field.
Machines
Display the names of the Simplified Synchronous Machines, the Synchronous Machines, the Asynchronous Machine, and the Three-Phase Dynamic Load blocks of your model. Select a machine or a load in the list box in order to set its parameters for the load flow.
Bus type
If Bus type is set to P&V Generator, you can set the desired terminal voltage and active power of the machine. If Bus type is set to PQ generator, you can set the desired active and reactive powers. If Bus type is set to Swing Bus, you can set the desired terminal voltage, enter an active power guess, and specify the phase of the UAN terminal voltage of the machine.
If you select an Asynchronous Machine block machine, you only have to enter the desired mechanical power delivered by the machine. If you select a Three-Phase Dynamic Load block, you have to specify the active and reactive powers consumed by the load.
Terminal voltage UAB
Specify the terminal line-to-line voltage of the selected machine.
Active power
Specify the active power of the selected machine or load.
Active power guess
Specify active power guess to start iterations when the specified machine bus type is Swing Bus.
Reactive power
Specify the reactive power of the selected machine or load.
Phase of UAN voltage
This parameter is activated only when the bus type is Swing Bus.
Specify the phase of the phase-to-neutral voltage of phase A of the selected machine.
Mechanical power
In motor mode, specify the mechanical power developed by the squirrel cage induction machine. In generator mode, specify the mechanical power absorbed by the machine as a negative number.
Load flow frequency
Specify the frequency to be used in the load flow calculations (normally 60 Hz or 50 Hz).
Load flow initial condition
Normally, you should keep the default setting Auto to let the load flow automatically adjust the initial conditions before starting iterations. If you select Start from previous solution, the load flow starts with initial conditions corresponding to the previous solution. Try this option if the load flow fails to converge after a change has been made to the power and voltage settings of the machines or to the circuit parameters.
Update Circuit & Measurements
Update the list of machines, voltage and current phasors, as well as the powers in the load flow window if you have made a change in your model while the load flow window is open. The new voltages and powers displayed in the load flow window are computed by using the machine currents obtained from the last load flow (the three currents stored in the Initial conditions parameter of the machine blocks).
Execute Load Flow
Executes the load flow calculations for the given load flow parameters.

Use LTI Viewer GUI

System inputs
Lists the inputs of the state-space model of your circuit. Select the inputs to be used by the LTI Viewer.
System outputs
Lists the outputs of the state-space model of your circuit. Select the outputs to be used by the LTI Viewer.
Open New LTI Viewer
Generate the state-space model of the circuit and opens the LTI viewer for the selected system inputs and outputs.

Impedance vs Frequency Measurement GUI

Measurement
Lists the Impedance Measurement blocks of the model. Select the blocks for which you want to obtain the frequency response. Use the CTRL key to select several impedances to be displayed on the same plot.

Axis

Range (Hz)
Specify the frequency vector, in hertz (Hz). You can specify in that field any valid MATLAB expression defining a vector of frequencies; for example, 0:2:1000 or linspace(0,1000,500). The default is logspace(0,3,50).
Logarithmic Impedance/Linear Impedance
Choose logarithmic or linear scale for the vertical impedance scale.
Logarithmic Frequency/Linear Frequency
Choose logarithmic or linear scale for the horizontal frequency scales.
Grid
If selected, a grid is displayed for the two plots. Default is unselected.
Save data when updated
If selected, data are saved in a variable in the workspace. The name of the variable is defined by the Workspace variable name parameter. The complex impedances are saved in an array together with the corresponding frequencies. Frequency is saved in column 1 and impedances are saved in the next columns. Default is unselected.
Display/Save or Update
Click to initially display the impedance versus frequency measurement and, if the Save data when updated check box is selected, save the data to your workspace.
Click to start the impedance versus frequency measurement again and display results after multiple runs of your model.

FFT Analysis GUI

Structure
Lists the structures with time variables that are present in your workspace. These structures are generated by the Scope or To Workspace blocks in your model. Use the pull-down menu to select the variable you want to analyze.
Input
Select the input signal of the selected structure with time variables specified in the Structure field. Structures with time variables with multiple inputs can be generated by a Scope block having multiple input ports.
Signal Number
Specify the index of the selected input signal specified by the Input parameter. For example, the Signal Number parameter allows you to select the phase A signal of a three-phase signal connected to input 2 of a Scope block.
Start time(s)
Specify the start times for the FFT analysis.
Number of cycles
Specify the number of cycles for the FFT analysis.
Display FFT window/Display entire signal
In the pulldown menu, select Display entire signal to display the entire selected signal in the upper plot. Select Display FFT window to display only the portion of the signal where the FFT analysis is performed.
Fundamental frequency
Specify the fundamental frequency, in hertz (Hz), for the FFT analysis.
Max Frequency
Specify the maximum frequency, in hertz (Hz), for the FFT analysis.
Frequency axis
In the pull-down menu, select Hertz to display the spectrum frequency axis in hertz. Select Harmonic order to display the spectrum frequency axis in harmonic order relative to the fundamental frequency.
Display style
In the pull-down menu, select Bar (relative to Fund. or DC) to display the spectrum as a bar graph relative to the fundamental frequency. Select Bar (relative to specified base) to display the spectrum as a bar graph relative to the base defined by the Base value parameter.
Select List (relative to Fund. or DC) to display the spectrum as a list in % relative to the fundamental or DC component. Select List (relative to specified base) to display the spectrum as a list in % relative to the base value defined by the Base value parameter.
Base value
Enter a base value for the display of harmonics.
Display
Display the FFT analysis results for the selected measurement.

Generate Report GUI

Items to include in the report
In the check boxes, select any combination of measurements to include in the generated report, Steady state, Initial states, and Machine load flow. The default is unselected for all three.
Frequency to include in the report
Select the frequency or frequencies to include in the generated report, 60 Hz or All. The default is 60 Hz.
Units
Set the Units parameter to Peak values to display the peak values of the selected values. Set the Units parameter to RMS to display the root-mean-square (RMS) values of the selected values.
Format
In the pull-down menu, choose the format in which you want your measurements displayed. The floating point option is displayed in mantissa-exponent form with five significant figures. The best of option is displayed with four significant figures and uses mantissa-exponent form only for numbers larger than 9999. The final option is displayed in plain numbers with two figures to the right of the decimal point. The default is floating point.
Create Report
Generate a report and save it to a file.

Hysteresis Design Tool GUI

To learn more about hysteresis modeling, see the Saturable Transformer block reference pages.

Segments
In the pull-down menu, specify the number of linear segments used to define the right side of the hysteresis loop. The left side of the loop is the symmetric image of the right side.
Remanent flux Fr
Specify the remanent flux point of the hysteresis characteristic (flux at zero current).
Saturation Flux Fs
Specify the saturation flux point where the hysteresis loop becomes a single-valued saturation curve.
Saturation current Is
Specify the saturation current point where the hysteresis loop becomes a single-valued saturation curve. The saturation region is defined by the Saturation region currents parameter.
Coercive current Ic
Specify the coercive current point of the hysteresis characteristic.
dF/dl at coercive current
Set the slope of the flux at the coercive current point (current at zero flux).
Saturation region currents
Specify the vector of current values that define the saturation characteristic. The number of specified points must be the same as for the Saturation region fluxes parameter. You only need to specify the positive part of the characteristic.
Saturation region fluxes
Specify the vector of flux values that define the saturation characteristic. The number of specified points must be the same as for the Saturation region currents parameter. You only need to specify the positive part of the characteristic.
Transfo Nominal Parameters
Specify the nominal parameters (nominal power in VA, nominal voltage of winding 1 in volts RMS, and nominal frequency in Hz) used in the conversion of the hysteresis parameters.
Parameter units
Convert the fluxes and currents that define the hysteresis characteristic from SI to p.u. or from p.u. to SI.
Zoom around the hysteresis
If selected, zoom the plot around the hysteresis curve. The default is selected.

Example

Open the demos of SimPowerSystems and double-click the Powergui block contained in the model. For each demo, you can use the tools of the Powergui to look at the initial values and steady-state values of the inductor currents and capacitor voltages. For demos containing machines, you can edit and perform a machine load flow analysis.

See Also

Multimeter, Saturable Transformer


  PI Section Line PWM Generator 

Learn more about the latest releases of MathWorks products:

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS