Software in loop simulation for adc and epwm in simulink without any physical dsp

4 visualizaciones (últimos 30 días)
Much like Plecs has the TI adc and epwm features which can interact with the simulation models, I want something like that for matlab. I want the adc and epwms for a hyper-realistic simulation. I do not want to use simulink models for code geenration. I want them to validate simulations with the epwm and adc modules behaving as close as possible ot the actual firmware implementation.

Respuestas (1)

Abhas
Abhas el 26 de Jun. de 2025
Hi @Rahul,
For hyper-realistic software-in-the-loop (SIL) simulation of ADC and ePWM behavior in Simulink without using actual hardware or generating firmware-ready code, the C2000 Microcontroller Blockset is the most direct and reliable solution. It has many uses as mentioned below:
  • Provides peripheral blocks like ADC, ePWM, Digital I/O, Hardware Interrupt, etc., that accurately model TI C2000 behavior in Simulink.
  • Supports ADC–PWM synchronization with examples showing interrupt-driven interaction and callback behavior.
  • Works entirely in Simulink (SIL) mode—no hardware or firmware generation needed.
To set it up follow the below steps in detail:
  • Install and enable the C2000 Microcontroller Blockset in your Simulink library.
  • Drag in ADC and ePWM blocks from the TI C2000 library.
  • Configure interrupts using the "C28x Hardware Interrupt" and ADC "Interrupt blocks" to model nested priority behavior or trip logic.
  • Connect ADC and ePWM blocks to your control logic; simulation will reflect timing and sampling behavior closely.
You may refer to the below documentation links to know more about the same:
  1. https://www.mathworks.com/help/ti-c2000/ref/epwmtype14.html
  2. https://www.mathworks.com/products/ti-c2000-microcontroller.html
I hope this helps!

Etiquetas

Productos


Versión

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by