Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Encoder Servo Motor problem

Status
Not open for further replies.

FMradio

Member level 3
Joined
Nov 24, 2009
Messages
58
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Heaven
Activity points
1,672
Hey guys!
I am working on a servo motor drive so far its working great but now I am facing a problem related to PID parameter values
Servo loop time = 5ms
Encoder PPR = 1000
Motor RPM (max) = 4200
Kp = 5, Ki = 1, Kd = 3 (signed int16)
Motor (signed int16)

Here is my Servo Controlling Algorithm
Servo loop:
Error = reference position – encoder position
If(Error > 1023) Error = 1023
Else if(Error <-1023) Error = 1023
Motor = PID (Error);
If(Motor > 1023) Motor = 1023
Else if(Motor <-1023) Motor = 1023
Goto Servo loop;

Now my Problem is that I can’t increase the range of my PID parameters values, I have seen in a Ready Made Servo drive it takes in the PID values up to 16bits more flexible better for precise tuning & It can take a small servo loop time up to 125u seconds , here in my case lets assume
Error = 1023; (maxium)
in PID
P = Error x Kp; // 1023 x 5 = 5115
I = summation f(Error) x Ki; // it will grow with time “Servo loop time”
D = difference of Errors x Kd
Motor = P + I + D // it will saturated

Here if I reduce my servo loop time then the integrator will sum up the error more quickly right and I can’t go below Ki=1 (minimum), & if I make Ki > 1 Motor starts oscillating. “Stuck”
& if I increase Kp then P=32 will exceed 32000 again it will saturated (signed int16)
Similarly with Kd,
I am not using any floating variables in order to minimize the computation cost,

now whats the solution??
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top