implementation of two different time domain
Show older comments
Problem:
- two different time domain where I have sample and hold and, unit delay, and Ccaller code which automatically use a specific time domain and not the one from the "system";
- for "sample and hold" is quite easy: exist a triggerable sample and hold, but not for unit delay and if I place an "m-function" or a Ccaller with a specific time samplig it is synchronized to the system time.
- I am not talking about creating two different sampling time, but creating two "countinuos time" with nested a sampling time.
- In the matter of fact I would like to recrated the "local" time of two different processors with slidly different clock.
Any ideas?
Thanks in advance
4 Comments
Yifeng Tang
on 25 Aug 2025
Make a subsystem atomic can allow you to specify a fixed sampling time that can be different from that used by the global solver.
Model Reference also allows use of a local solver that can be using a different sampling time.
Just some ideas without understanding your use case too well.
I noticed you put "Simscape" in the Products list. Is that accurate? There may be additonal step that needs to be taken if there is a Simscape network in your model.
Davide
on 25 Aug 2025
Davide
on 25 Aug 2025
Yifeng Tang
on 26 Aug 2025
Indeed, fluid systems (hydraulic, thermal liquid, gas, etc.) usually operates at much lower frequencies than power electronics, or they only need to be simulated at such lower frequencies. If you are able to separate the model into two separate Simscape networks, two local solvers at different time steps should work fine.
Accepted Answer
More Answers (0)
Categories
Find more on Simscape Electrical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!