Running PLECS blockset model with a smaller time step than the Simulink fixed time step

Hi everyone,

I am designing a power converter control loop. To do so, I am running the electric part (power converter) in PLECS, and the control loop in Simulink, using the PLECS blockset.

I wish to run the control loop (Simulink) at a fixed time step of 1e-4s, and the electric part (PLECS) at a much smaller time step (1e-6). However, it seems that this is not possible when using blockset.

Is there any way of running the PLECS model at a smaller time step than the simulink model?

Thanks!

PLECS Blockset uses the Simulink solver. If you are using one of Simulink’s fixed-step solvers then the entire model is solved at the same time step.

Generally the best approach would be to use a variable step solver to model any physical system (PLECS part) and to place any discrete controls inside of an atomic subsystem. Then the discrete controls will execute at the fixed rate you specify, while the variable step solver will handle the continous system (electric circuit).

See the Mathwork’s write-up on Sample Time in Systems. You can assign the sample time for an atomic subsystem by right clicking the block and opening the Block Parameters window.

If you used a fixed step solver, the overall approach is the same to specify the controls to run at a slower rate than the solver’s base time step.