Controlling a Servo using PID control.

13 vues (au cours des 30 derniers jours)
Robert
Robert le 15 Avr 2013
Commenté : Steve le 9 Nov 2014
Hi Guys,
Wonder if you could help me.
I am learning about Simulink and the Arduino. I am trying to use PID feedback control with PWM but I'm not sure that makes sense due to the results.
I have a continuous servo that reads a value from 0 to 180 and a pot as an analog in and they work fine together and it is calibrated nicely.
Now I am trying to improve the response time mimicking an experiment that I did at Uni to control a servo using PID control.
So I have my input value going into a sum through a PID controller to the servo with the input signal going to a scope. From the servo read, the signal goes into the sum as a minus, and that signal also goes to the scope.
But trying to tune the PID controller, the signal just goes from high to low as PWM of 5Hz.
I am clearly missing something here.
Sample rate is set to 0.01
P = 1 I = 0 D = 0
Let me know what other info I need to give. D
  3 commentaires
Gaurav Pipersaniya
Gaurav Pipersaniya le 27 Mai 2013
can you tell me how can i do this project. actually i have to do project on pid controller similar to yours using simulink so if u can help in detail?
Steve
Steve le 9 Nov 2014
Do you have a mathematical model for the servo you were using(assuming it was a hobby servo) ?
Did you get through Gaurav Pipersaniya ?

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by