MATLAB: How to enable mixed sample time in Smulink model

simulink

An outside Library (from PreScan) requests 200 Hz while my control plant model needs to run at 100 Hz. Therefore, my question is that how can I coordinate this two activities? My concern is that if I use 200Hz in Simulink, it may compromise my control plant’s fidelity.

Best Answer

You will need to speficy the sample times for the 2 subsystems so that they run at the proper rates. Do this by right-clicking on the subsystem, selecting "Block Parameters", then in the "Sample Time" box, enter in the sample rate in seconds.
To display the sample times being used in your model, from the Simulink menu, click Display -> Sample Time -> All.
For the signal lines that are shared between the 2 subsystems that are now running at different rates, you may be prompted to add Rate Transition blocks to down sample/upsample the data.