Creating a New Simscape Model

Simscape™ models require certain blocks to be present in the model configuration, such as a Solver block, or domain-specific reference blocks. Other blocks, although not required, are highly likely to be needed, such as Simulink-PS Converter and PS-Simulink Converter blocks. An easy way to start a new Simscape model is by using the ssc_new command.

When you type ssc_new at the MATLAB® Command prompt, the software opens the main Simscape library and creates a new model prepopulated with certain blocks, as shown in the following illustration.

By default, the model name is not specified, the model contains a Solver Configuration block with the default solver set to ode23t, a Simulink-PS Converter block, and a PS-Simulink Converter block connected to a Scope block.

You can use the ssc_new command arguments to specify the model name, add a domain-specific reference block, and change the default solver. See the ssc_new command reference page for details. For example, typing


creates the following model.

After using ssc_new, continue developing your model by copying the blocks, as needed, and adding other blocks from the Simscape libraries.

For electrical models, you can also use the Creating A New Circuit example as a template for a new model. This example also opens an Electrical Starter Palette, which contains links to the most often used electrical components. Open the example by typing ssc_new_elecssc_new_elec in the MATLAB Command Window and use File > Save As to save it under the desired model name. Then delete the unwanted components and add new ones from the Electrical Starter Palette and from Simscape libraries.

Was this topic helpful?