Strange accelerations measurements in Simscape Multibody, using the Transform Sensor block

The acceleration stems from an inverted pendulum actuated with sinusoidal motion, and is in the translational x direction. That frame being measured has its z-axis in the rotational direction and sits on top of the pendulum. The reference frame is the global one, with x-axis directed in the same direction as the measured frame... The pendulum swings back and forth with an amplitude of 15 deg and unity radian frequency. I would expect sinusoidal-looking acceleration...
The modeling is done using Simscape Multibody and the motion is sensed using a Transform Sensor. The plot shown is from a simulation using the variable-step auto(ode45) solver. Another simulation using the ode23s solver gives a totally different response, although not at all sinusoidal.
BTW, the pendulum represents a non-inertial base which to append an electro-mechanical system.
The model can be found at https://www.dropbox.com/s/7udnhog2i0fvkba/forum.slx?dl=0
Ronny

3 件のコメント

Sebastian Castro
Sebastian Castro 2018 年 1 月 28 日
One thing to note for those looking at the graphs: The first one has 5 seconds between axis ticks and the second one has 1 second. Either way, they're still different.
Nicolas Schmit
Nicolas Schmit 2018 年 1 月 29 日
Post your model on MATLAB answers.
Ronny Landsverk
Ronny Landsverk 2018 年 1 月 29 日
I tried posting the slx model, but was not allowed. Should have read the prompted message more carefully...

サインインしてコメントする。

 採用された回答

Birdman
Birdman 2018 年 1 月 29 日

0 投票

It seems that your problem is with the solver. You set it to variable-step, which you allow Simulink to increase the step size until Simulink can, therefore you see unintended deviations from your desired signal. After a few experimental run for the model, fixed-step solver->ode5 will surely do it for you, with a 0.001 step size. Run the attached model.

3 件のコメント

Ronny Landsverk
Ronny Landsverk 2018 年 1 月 29 日
I appreciate your comment, but this particular model, i.e. the pendulum, is just to have a moving base for a larger model. For so-called physical simulation Mathworks recommends using the ode15s or the ode23t variable-step solvers globally, and if necessary switch to a local solver via the configuration block (trapezoidal or backward euler). Otherwise, they recommend the ode14x. Thank you for your tip on ode5 fixed-step. I will surely try it out on the full-scale model to see how it performs
Birdman
Birdman 2018 年 1 月 29 日
編集済み: Birdman 2018 年 1 月 29 日
But variable step solvers will increase the step size if they can and the thing is: that might not be what you want even in complex models. Therefore you need to identify your requirements and if a fixed step solver with 0.001 is enough for you, you should use it.
Ronny Landsverk
Ronny Landsverk 2018 年 1 月 29 日
Ok, I'll accept your answer. I still hope staff-members will comment because even though there is a somewhat large acceleration initially - because the motion is not ramped up smoothly, the model is still so simple that I think it is strange to get this response from the variable-step solvers.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by