Create new Simscape Power Systems model populated by required and commonly used blocks
power_new creates a new Simscape™ Power Systems™ model,
with the Powergui block already on the model canvas
and the Simulink® solver set to
the relative tolerance set to
The function also opens the power_new_palette library that contains commonly used Simscape Power Systems, Simulink, and Simscape blocks.
To help you fine-tune your model settings, the Simscape Power Systems ST Assistant block is also added to the canvas.
Use the Simscape Power Systems ST 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.
Select if your model contains at least one GTO, IGBT, MOSFET, or ideal switch device.
Select if your model contains at least one diode, thyristor, or breaker device.
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.
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.
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.
Select if the model contains Simscape blocks. For models containing Simscape blocks, the ode23t solver is set for the model.
Select if your model contains Simulink blocks to control your Simscape Power Systems model. The assistant block will create a sample time variable, Ts_control.
To create a generic Simscape Power Systems model, type:
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 Simscape Power Systems ST Assistant block.
The software also opens the power_new_palette library that contains
commonly used Simscape Power Systems, Simulink, and Simscape blocks.
This library contains a link to the
powerlib Simscape Power Systems library,
fl_lib Foundation Library of Simscape,
and to the Commonly Used blocks library of Simulink (by clicking
the Simulink Utilities title).
In the Simscape Power Systems ST 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
After using power_new, continue developing your model by copying the blocks, as needed, and adding other blocks from the Simscape Power Systems 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 Simscape Power Systems 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.