In Simulink, how can I execute a subsystem once every 5 seconds?

4 views (last 30 days)
In Simulink, how can I execute a subsystem once every 5 seconds? While the rest of the simulation will need smaller time steps, I would like one subsystem to only execute once every 5 seconds and then hold that output value of the subsystem for the remainder of the 5 second period.
I tried to do this using triggered subsystems. However, I got an error because my subsystem has continuous blocks (Fourier blocks). Basically, I just want my Simulink model to do a Fourier analysis of voltages/currents in my model once every 5 seconds and not continually recompute this with every small time step that is needed for simulation of the electrical system.

Answers (0)

Community Treasure Hunt

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

Start Hunting!