• Home
  • Product
    • DSIM 2026a
    • DSIM Features
    • Release Review
    • Get DSIM
  • Try DSIM
  • Application
    • User Cases
    • Simulation Cases
  • Solution
    • SST Solution
  • Resources
    • Technical Resources
    • Q&A
  • Events
    • Webinar
    • Research Support Program
    • Teaching Support Program
  • About Us
    • Contact Us

DSIM -- Power Electronics Simulation

  • Log in
  • Register
Quit
Contact us
简体中文 (CN)

Co-simulation with MATLAB/Simulink

The Cosim Module provides interface for co-simulation between DSIM and MATLAB/Simulink starting from DSIM 2024a. With the Cosim Module, the power loop and switching signal generation can be implemented in DSIM, while the rest of the control system can be implemented in MATLAB/Simulink. One can therefore make full use of DSIM’s capability in power simulation and MATLAB/Simulink’s capability in control simulation in a complementary way.

Get Started

Before running co-simulation between DSIM and MATLAB/Simulink, you need to complete the initial co-simulation settings in DSIM. By clicking the Tools >> Co-Sim Setup button, a "Cosim_Engine" block can be automatically created in MATLAB/Simulink library.

After finishing initialization, to place a "Cosim_Engine" block in a MATLAB/Simulink schematic in the MATLAB/Simulink Library Browser, go to S-function DSIM Interface, and select the "Cosim_Engine" block.

To select the DSIM schematic associated with the "Cosim_Engine" block in MATLAB/Simulink, double click on the "Cosim_Engine" block, and click on "Browser" to find the DSIM schematic file. Then click on "Ok". To show the DSIM schematic automatically in the DSIM environment, please click on "Show Schematic".

Modeling for Co-simulation:

● DSIM modeling:  

For the power circuit, the boxed section in the diagram is modeled similarly to DSIM. (Currently, co-simulation does not support AC Sweep and Lookup Table elements.)

For switching signal generation, to revise the implemented control part in DSIM (as shown in the boxed section below), use the Library >> Control >> Cosim In Link Node/Out Link Node modules as data input and output ports for co-simulation.

In Link Node represents DSIM's data input (from MATLAB/Simulink), and Out Link Node represents DSIM's data output (to MATLAB). Double-click on each port to open the properties and edit the port names. After modeling in DSIM, proceed to MATLAB/Simulink modeling.

● MATLAB/Simulink modeling:

In MATLAB/Simulink, model the remaining part of the DSIM control circuit, represented by the boxed section in the following image.

Start by adding the "Cosim_Engine" block in Simulink, which can be found in Library >> S-function DSIM Interface >> Cosim_Engine, or search for cosim_engine directly.

Double-click to open the module properties, and use the "Browser" button to select the ".dsimsch" file built previously in DSIM.

Clicking on "Show Schematic" allows the user to open the loaded file in DSIM. Clicking "OK" to read the ports and displays them in the "Cosim_Engine" block.

Based on the loaded ports, model the remaining control circuit in Simulink.

 

 

The co-simulation can be run by clicking the "Run" in MATLAB/Simulink. If there are voltage, current and other probes in DSIM, DSIMViewer will automatically open to display the relevant waveforms after the simulation is finished. The simulation waveform of the above DSIM modeling part is shown in the figure below:

 

Features

  • Switching Transient Model Simulation
  • Loss Calculation
  • C Block
  • DLL Block
  • AC Sweep Frequency Analysis
  • Script
  • Co-simulation with MATLAB/Simulink
  • DSIM API(MATLAB)
  • DSIM API( C/C++)
  • DSIM API(Python)
Product
  • DSIM 2026a
  • DSIM Features
  • Release Review
  • Get DSIM
  • Contact Us
About Us
Copyright © DSIM- Power Electronic Simulation
Application
  • Simulation Cases
  • User Cases
  • SST Solution
Solution
Events
  • Webinar
  • Research Support Program
  • Teaching Support Program
  • Technical Resources
  • Q&A
Resources
 本网站由阿里云提供云计算及安全服务
本网站支持 IPv6
 本网站由阿里云提供云计算及安全服务
本网站支持 IPv6
 本网站由阿里云提供云计算及安全服务
本网站支持 IPv6
 本网站由阿里云提供云计算及安全服务
本网站支持 IPv6