Contents

power_new

Create new SimPowerSystems model populated by required and commonly used blocks

Syntax

power_new

Description

power_new creates a new SimPowerSystems™ model, with the Powergui block already on the model canvas and the Simulink® solver set to ode23tb with the relative tolerance set to 1e-4.

The function also opens the power_new_palette library that contains commonly used SimPowerSystems, Simulink, and Simscape™ blocks.

To help you fine-tune your model settings, the SimPowerSystems Assistant block is also added to the canvas.

SimPower-
Systems Assistant Block

Use the SimPowerSystems Assistant block to optimize Simulink and Powergui settings depending on your application. In the block mask, select the items that best describe your model. The block automatically sets the optimal solver type (continuous or discrete) of the Powergui block, computes the optimal sample time (if the model is discrete), and selects the appropriate Simulink solver settings.

When you click Apply or OK, a summary of the settings performed by the block is displayed in the model pre-load function. The required simulation variables are assigned in the base workspace.

Alternatively, you can ignore this block and delete it from your model, or keep it for future use once you know more about your model.

The model will contain GTOs, IGBTs, MOSFETs, and/or Ideal switches

Select if your model contains at least one GTO, IGBT, MOSFET, or ideal switch device.

The model will contain Diodes, Thyristors, and/or Breakers

Select if your model contains at least one diode, thyristor, or breaker device.

Maximum switching frequency (Hz)

Specify the maximum switching frequency of the switching circuit. This parameter is enabled only when the The model will contain GTOs, IGBTs, MOSFETs, and/or Ideal switches parameter is selected, indicating that the sample time Ts, to discretize the electrical model, is calculated using this frequency.

Nominal frequency (Hz)

Specify the nominal frequency of the system. This parameter is enabled only when the The model will contain Diodes, Thyristors, and/or Breakers parameter is selected and the The model will contain GTOs, IGBTs, MOSFETs, and/or Ideal switches parameter is not selected, indicating that the sample time Ts, to discretize the electrical model, is calculated using this frequency.

The model will contain more than 6 switching devices

Select if your model contains more than 6 switching devices, regardless of their type. This parameter is enabled when the The model will contain Diodes, Thyristors, and/or Breakers parameter or the The model will contain GTOs, IGBTs, MOSFETs, and/or Ideal switches parameter is selected.

The model will contain Simscape blocks

Select if the model contains Simscape blocks. For models containing Simscape blocks, the ode23t solver is set for the model.

The model will contain control systems blocks

Select if your model contains Simulink blocks to control your SimPowerSystems model. The Assistant block will create a sample time variable, Ts_control.

Example

To create a generic SimPowerSystems model, type:

power_new

The software creates a new, untitled model with the default solver set to ode23tb. The new model contains a Powergui block set to continuous mode and the SimPowerSystems Assistant block.

The software also opens the power_new_palette library that contains commonly used SimPowerSystems, Simulink, and Simscape blocks. This library contains a link to the powerlib SimPowerSystems library, to the fl_lib Foundation Library of Simscape, and to the Commonly Used blocks library of Simulink (by clicking the Simulink Utilities title).

In the SimPowerSystems assistant block, the model contains more than 6 IGBTs, has a maximum switching frequency of 20e3 Hz, and contains Simscape blocks. After clicking OK, the Powergui block is discretized to a sample time of 2e-7 sec, the Simscape Solver Configuration block is added to the canvas, and the Simulink solver is changed to ode23t.

After using power_new, continue developing your model by copying the blocks, as needed, and adding other blocks from the SimPowerSystems libraries. In the preceding example two IGBT bridges to the model (12 switching devices) are added, and a Voltage-Current Simscape Interface block that allows the connection of Simscape electrical blocks to the SimPowerSystems model. In the Model pre-load function (File/Model properties/Callbacks/PreLoadFcn) a summary of the recommended settings is displayed when you click OK, or Apply.

The Ts sample time value used by the model is assigned in the base workspace and is defined automatically the next time that you open your model.

Was this topic helpful?