Ball and Beam model Simscape Multibody

17 ビュー (過去 30 日間)
Wojciach
Wojciach 2018 年 12 月 29 日
編集済み: Alireza 2024 年 2 月 22 日
Hello :)
I'm doing a project for my studies, and I need to do a Simscape Multibody model of ball and beam which is supported in the middle. I am using R2016a version of MATLAB. I did make a model, which looked like it had good physicall behaviour, but when I tried to add PID controller nothing changed (ball is still falling). Does anyone know what I'm missing or doing wrong?
I've tried to model a system based on following equations:
,
,
,
where: θ- beam deviation angle, I-moment of inertia of beam, - moment of inertia of ball, U- torque (input), x- distance of the ball center from the middle of the beam (output), m- mass of the ball, h- height of the beam, F- friction force, r- radius of the ball.
I attach screenshots of my work and .slx file of the project.
Any help would be appreciated :)

採用された回答

Steve Miller
Steve Miller 2019 年 4 月 1 日
Hi Wojciach,
There are a few problems with see_saw.slx. The most important one is that it appears you are trying to apply the force from the ball to the beam. That is not necessary - Simscape Multibody calculates the force that the ball applies to the beam for you.
The other problem has to do with your controller. There are many strategies which I am sure you can find in a Google search. You will probably need a control strategy that includes the angle of the beam.
I have attached a version that deals with both of the issues cited above. It is not the only way to solve the problem.
--Steve
  1 件のコメント
Alireza
Alireza 2024 年 2 月 22 日
編集済み: Alireza 2024 年 2 月 22 日
Hi Steve,
Why does it only works for initial position of ball less than 0.01 m?
I get this error when I try to change the initial position of the ball; x > 0.01 m. But when I changed the the revolute joint input from motion to torque, the error solved, but I need motion as input, how can I solve it?
Caused by: Derivative of state 'untitled.Revolute_Joint1.Rz.w' in block 'untitled/Revolute Joint1' at time 0.0105 is not finite. The simulation will be stopped. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimscape Multibody についてさらに検索

製品


リリース

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by