How can I use a constant time step for certain subsystems inside a variable time step simulation
6 ビュー (過去 30 日間)
古いコメントを表示
Hello!
I am simulating a controlled robot arm with several degrees of freedom. The arm appears to behave as a stiff differential equation, so I want to use ODE 15s as the solver for the simulation. However, since the control law being tested will eventually be implemented on a microcomputer with a fixed timestep, I would like to still be able to run the control block at a fixed frequency (say, at 100Hz).
Is this possible to do? Thanks in advance!
Jeff
0 件のコメント
回答 (1 件)
Steve Miller
2019 年 4 月 2 日
You can configure the model such that the portion of your model representing the algorithm on the microcontroller is evaluated at 100Hz if you use discrete blocks (and/or Rate Transition blocks) and set the sample time accordingly. Your Simscape Multibody model will be evaluated using ode15s. It will update at a minimum rate of 100Hz (max step size of 0.01), as it cannot take steps larger than the sample time of your controller.
--Steve
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Multibody Modeling についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!