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 CenterFile Exchange에서 Simscape Multibody에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by