MATLAB Answers

Designing a PID controller for a pendulum

6 views (last 30 days)
MoHa Efi
MoHa Efi on 16 Mar 2015
Answered: Arkadiy Turevskiy on 17 Mar 2015
we have the following system:
  • (4.545 s) / (s^3 + 0.1818 s^2 - 31.21 s - 4.459)
we have a upside down pendulum, and we need to design a PID controller which can hold it up straight. such that the following conditions occurs:
.
% setteling time: <5 Sec
% overshoot: 20 degree
% risetime: <0.5 Sec
.
any tips??
i, first, put Ti = Inf and Td = 0;
then found the value for Kp = Kcritical according to Routh Table: Kp = Kcr = 159.4546249
but when I want to calculate Natural Frequency (Omega), i get three answers which have imaginary parts:
.
0.0000 + 7.3625i
2.9609 - 3.5903i
-2.9609 - 3.5903i
.
I'm guessing I am not using the correct method
  1 Comment
Arkadiy Turevskiy
Arkadiy Turevskiy on 17 Mar 2015
You could tune the PID controller with PID Tuner app, unless you are trying to stcik with your method specifically.
>>s=tf('s');
>> sys=(4.545*s) / (s^3 + 0.1818*s^2 - 31.21*s - 4.459)
sys =
4.545 s
----------------------------------
s^3 + 0.1818 s^2 - 31.21 s - 4.459
Continuous-time transfer function.
>> pidTuner(sys)
Then playing a little bit with sliders you could get to something like this:

Sign in to comment.

Answers (1)

Arkadiy Turevskiy
Arkadiy Turevskiy on 17 Mar 2015
You could tune the PID controller with PID Tuner app, unless you are trying to stcik with your method specifically.
>>s=tf('s');
>> sys=(4.545*s) / (s^3 + 0.1818*s^2 - 31.21*s - 4.459)
sys =
4.545 s
----------------------------------
s^3 + 0.1818 s^2 - 31.21 s - 4.459
Continuous-time transfer function.
>> pidTuner(sys)
Then playing a little bit with sliders you could get to something like this:

Community Treasure Hunt

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

Start Hunting!