MATLAB: Introduce Different sample rates in simulink

discrete sample ratesimulink

I have a complex discrete system in Simulink with different systems and subsystems. It consists on a co-simulation with MSC.ADAMS so I have to introduce a communication interval for these two software to interchange information. My doubt is that I want my control system to have a different sample rate. Is it enough to insert my wished value in the first blocks of the control system and from then on this is the sample rate? or is there a more elegant way to do it? I can imagine a block to change the sample rate and the input signal and output signal of the control system.
It is the same as when yo import data from different sensors and each of them collects data at diferent frequencies. You can interpolate this data or work with the different frequencies. can't you?
So the main question is: How to deal with different frequencies of the subsystems? which is the most proper way?
Thank you very much in advance.

Best Answer

Simulink determines update rate for signals and systems mostly through propagation. If you want to specify different rate among different systems, you can use the Rate Transition block (in library Simulink>Signal Attributes) between them. You can also visualize the sample rate by clicking menu (in your model) Format>Port/Signal Displays>Sample Time Colors