Simulating an inverted pendulum

24 ビュー (過去 30 日間)
James Rhodes
James Rhodes 2020 年 8 月 31 日
コメント済み: James Rhodes 2020 年 10 月 2 日
Hi all,
I'm currently trying to see whether its possible to stabilise a physical inverted pendulum (3d printed) in realtime using matlab and simulink. Originally the project would have a way of changing the inverted pendulum's physical angle, however due to circumstances most will need to be done in simulation. I've created an angle detection program which computes the angle, and the time the angle was recorded at 30cycles/s. I'm wanting to use a PID controller to help control the system. Am I able to do the following process?:
physical inverted pendulum>webcam records>matlab computes time and angle>send time/angle data to simulink>PID to stabilise the pendulum>represent this on simulink inverted pendulum simulation
Or will i need to close the physical loop:
physical inverted pendulum>webcam records>matlab computes time and angle>send time/angle data to simulink>PID to stabilise the pendulum>send signal to driver board motor>change physical inverted pendulum angle
Here is a photo to show what the program records:
A = angle/timestamp recordings,
B = webcam info of real-world inverted pendulum
Any help would be greatly appreciated!
Thanks,
James

採用された回答

Nitin Kapgate
Nitin Kapgate 2020 年 9 月 16 日
Here is an example illustrating the implementation of the model of a 2-dimensional inverted pendulum controlled by a PID Controller in Simulink.
To open the 'vrpend' Simulink model, use the following command in your MATLAB command window
vrpend
  1 件のコメント
James Rhodes
James Rhodes 2020 年 10 月 2 日
this helped me lots, thanks

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

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by