Ball and Beam model Simscape Multibody

18 次查看(过去 30 天)
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 个)

Community Treasure Hunt

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

Start Hunting!

Translated by