Skip to content

mathworks/Simscape_Electrical_Support_Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simscape™ Electrical™ Support Library for Power Systems Engineers

Version 1.1.0

Open in MATLAB Online

Introduction

Simscape Electrical (formerly SimPowerSystems™) is modeling software for simulating power electronics and power systems. Simscape native technology provides a superior environment for overall modeling and simulation of power systems and power electronics, specifically in accuracy, flexibility, usability, and performance. For example:

  • Run-time parameter tuning to avoid model recompilation when changing model parameters.
  • Enhanced solver options that provide performance at scale for linear and switched-linear systems for both desktop and real-time simulation.
  • Optimized equation construction for increased numerical robustness.
  • Single-line representation of three-phase systems for faster model construction and improved model layout.
  • Access to various levels of model fidelity, such as switched-linear and non-linear semiconductor switches.
  • Full integration with other MathWorks tools, including Simulink Control Design, Simulink Real-Time, and Simulink Fault Analyzer for non-intrusive fault modeling, and systematic fault injection.

The MathWorks Simscape Electrical Team has developed a support library for Simscape Electrical that provides Power Systems Engineers with a focused entry point to Simscape native technology. The library also contains links to relevant Simscape Electrical shipping libraries for ease of navigation. For each assembled component, you can view the mask code for further detail on parameterizations and use of the Simulink API to interact with Simscape components. The Support Library comes with a number of examples that are described later in this document. The library organizes different component classifications as 8 sub-libraries, as shown below.

Screenshot of the Simscape Electrical Support Library for Power Systems Engineers

The Electromechanical Machines sub-library is shown below. The assemblies are contained within the blue area and the links to Simscape Electrical shipping libraries are contained within the yellow area.

Screenshot of the Electromechanical Machines sub-library

The image below shows the Round Rotor Standard (PU) assembly.

Screenshot of the Round Rotor Standard (PU) assembly

Each assembly has a parameter mask which exposes relevant parameters. Where applicable, there is also a check-box option to set all mask parameters as run-time, meaning the model will not recompile if any of the mask parameters change when using Fast Restart mode, or when the model is compiled as a MEX file.

The support library comes with six sub-directories under examples.

examples/1.component_tests contains test harnesses for a number of components within the Support Library.

examples/2.motor_drive contains a PMSM driven by an MMC converter. Each cell of the MMC has an ideal voltage source to simplify the control system. There are 96 individual switches in the MMC. open a0_README.mlx for further instructions. This example also considers the performance advantage of using simplified diode models that fix forward voltage at 0V.

examples/3.power_system contains power systems examples that uses MATPOWER to run a load flow and then programmatically builds and simulates an EMT model. 30-, 57- and 118-bus examples are provided. Navigate to the workflows directory and open a0_README.mlx for further instructions. MATPOWER is a MATLAB Community Toolbox available at the following link https://www.mathworks.com/matlabcentral/fileexchange/72085-matpower.

examples/4.switch_fidelity contains a power electronic switch model fidelity example that describes 5 different model fidelities for a half-bridge topology. Open model_fidelity_considerations_for_switching_devices.mlx for more information.

examples/5. visualize contains models and MATLAB scripts that visualize power system and power electronic operation. Each sub-directory has MATLAB live scripts that work through the examples.

examples/6. SLRT contains a 57 bus power system modeled as two segments that can be run in real-time by using Simulink Real-Time to deploy the model to Speedgoat hardware.

Tool Requirements

Supported MATLAB Version: R2025b and newer releases

Required: MATLAB®, Simulink®, Simscape™, Simscape™ Electrical™

How to Use

Open SupportLibraryForSSE_R2025b.prj in MATLAB. The support library is called ee_lib_for_power_systems.slx and can be found in the support_library directory.

The examples directory contains the examples.

How to Use in MATLAB Online

You can try this in MATLAB Online. In MATLAB Online, from the HOME tab in the toolstrip, select Add-Ons > Get Add-Ons to open the Add-On Explorer. Then search for the submission name, navigate to the submission page, click Add button, and select Save to MATLAB Drive.

License

See LICENSE.txt.

Copyright (C) 2025, The MathWorks, Inc.

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages