discrete time simulations sampling rate question
显示 更早的评论
Hello,
I was hoping to get some help regarding inputting discrete time signals into Simulink. I've attached the structure used to input the signal and the simple model I used to see if the signal is being input properly.
I've left the .time structure variable empty as recommended in documentation Load Data to Test a Discrete Algorithm.
The signal it self was sampled every 5 seconds.
What I don't really understand is how to properly configure the solver for discrete simulations. Following Recommended Settings for Discrete Simulattions I set the step size as Auto and it doesn't work. When I choose a step size of 0.05 the signal is displayed but what I want to know is why if I choose 5 seconds as step size which is the sample time of the signal why that doesn't work also and the step size has to be so small.
Any help much appreciated.
Thanks!
采纳的回答
更多回答(2 个)
Siriniharika Katukam
2019-10-30
0 个投票
Hi
There is a difference between the sample time of signal and the step size you set for Simulink solver.
Step size determines the time steps when the computation happens. Signal sample time is the time step at which the signal is sampled
https://www.mathworks.com/help/simulink/ug/what-is-sample-time.htmlthis link might be helpful.
Moreover, the sample time of signal is not mentioned anywhere in your data.
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!