Go Down

Topic: Position Control of Robot with varying speed (Read 362 times) previous topic - next topic

supreeth128

Hello All,

I am trying to implement a DC motor position control application with varying speed.

I tried modifying a geared motor using a 1000PPR encoder as a feedback device and PID algorithm.

The motor rotates 0 - 180 degree as expected according to the serial commands. But I am not able to control the speed of the motor for each move(for instance I want to move the motor from 0 - 180 degree in one speed and 0 - 90 degree in another speed according to another command). Because the motor pwm is calculated using P, I and D parameters I am not able to achieve varying speed for a particular error.

Is there any suggestion for implementing this?

Which algorithm is best for this?

I was able to get 1 degree precision with PID position control. Can I achieve the same efficiency in the new control method?

Any help would be greatly appreciated

PaulS

Quote
I am not able to achieve varying speed for a particular error.
What, exactly, are your inputs? What, exactly, is your output?

If the inputs are the current position and the desired position, what do you think the output is telling you?
The art of getting good answers lies in asking good questions.

supreeth128

Hello,

Sorry for the late reply.

A geared motor is modified to rotate 0 - 180 degree using PID algorithm, arduino UNO and pololu VNH5019 motor driver IC. A target position command is sent from from serial monitor(0 - 180) and I read the current position of the shaft using a 1000PPR incremental encoder(Which is mapped to 0 - 180). The PID algorithm calculates the error according to the Kp, Ki and Kd values chosen then a corresponding pwm and direction signal is generated for the motor driver.

In this method if the error is smaller (5 degrees for instance) then the pwm signal thus generated will be having smaller duty cycle. If the error is bigger(180 degree for instance) then the motor first accelerates towards a value and then reduce it's speed as it approaches the desired angle.

I would like to implement a position control system with 2 parameters. one is obviously position and the other one is speed at which it should reach the desired angle. Because I have seen in some position control applications(linear actuators for instance) implemented using position and velocity parameters.


Which algorithm is best suited for this purpose?

MarkT

Hello All,

I am trying to implement a DC motor position control application with varying speed.

I tried modifying a geared motor using a 1000PPR encoder as a feedback device and PID algorithm.

The motor rotates 0 - 180 degree as expected according to the serial commands. But I am not able to control the speed of the motor for each move(for instance I want to move the motor from 0 - 180 degree in one speed and 0 - 90 degree in another speed according to another command). Because the motor pwm is calculated using P, I and D parameters I am not able to achieve varying speed for a particular error.

Is there any suggestion for implementing this?

Which algorithm is best for this?

I was able to get 1 degree precision with PID position control. Can I achieve the same efficiency in the new control method?

Any help would be greatly appreciated
You need the PID loop's error input to be the difference of actual position from the position profile, not the
final position.  The position profile is a graph of position against time that you feed to the loop to keep it
on course and on speed throughout the movement.

What you are doing at the moment is giving a step-change in control input, and the loop will do its best
to follow this (ie rapidly slewing to final destination as fast as the system and PID coefficients allow).
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up