|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
hey there. we're having some issues with out PID speed controller. we are working on setting the appropriate P value, and things are just not working. does anyone have any ball park estimates for the values?
|
|
#2
|
||||
|
||||
|
Re: PID drive paramiters?
Not working how?
Quote:
|
|
#3
|
||||
|
||||
|
Re: PID drive paramiters?
we are trying to control a drive motor using an encoder and a jaguar. it is not working in that, we have the motor set point on and off every so many seconds. we range the P up and up and up, looking for any change. it does not change until the P value is at 10*10^4, then it stops the motor, and it will not turn on again until we are at a P value of 1. we are using a single cim motor, up on blocks.
thanks in advance, don't hesitate if you need more info. ^_^ Last edited by techkid86 : 03-02-2012 at 22:31. |
|
#4
|
||||
|
||||
|
Re: PID drive paramiters?
Quote:
what's the motor connected to? is the encoder signal going to the Jag or the DS? what PID are you using? what value of setpoint are you using? how did you scale the value of the encoder? what does this mean: "we range the up and up and up"? you get the idea. Last edited by Ether : 03-02-2012 at 22:36. |
|
#5
|
||||
|
||||
|
Re: PID drive paramiters?
does the motor operate properly open loop?
yes it does what's the motor connected to? black Jag PWM is the encoder signal going to the Jag or the DS? Digital Sidecar what PID are you using? PIDController what value of setpoint are you using? every few seconds, it alternates between 0, and 0.3 how did you scale the value of the encoder? what ever the default is. that there could be the problem, but i am unsure. i could post the code if you want. what does this mean: "we range the up and up and up"? sorry, i fixed that later. we ranged the P value up and up. nothing seemed to change. we are further trouble shooting my getting the exact Jag value. tell me if you need anything else ^_^ thanks again. |
|
#6
|
||||
|
||||
|
Re: PID drive paramiters?
what's the business end of the motor connected to?
Quote:
Quote:
Quote:
Quote:
|
|
#7
|
||||
|
||||
|
Re: PID drive paramiters?
what's the business end of the motor connected to?
the motor is connected to a gear box, where it interacts with the wheel. the encoder and wheel are in a 1:1 ratio, but the motor spindle to encoder is not. i'll find out what it is if you need it. are you getting a proper signal from the encoder? e.g. if you run the motor open loop and just read the encoder value, does it change linearly with the open-loop voltage supplied to the motor? we thoroughly tested the encoder before hand, and all funtions seemed to work fine. I assume you mean from from WPIlib? yes 0 and .3 what? fraction of 100% command? yes. as the jags take an input value of -1-1, i assumed that that was the what the setpoint was supposed to be in. you need to scale the encoder signal so that it corresponds to the setpoint. otherwise the PID cannot form a proper error signal. ok, how would i find out what that is? I assume that that is the SetDistancePerPulse function? anything else? |
|
#8
|
||||
|
||||
|
Re: PID drive paramiters?
Quote:
SetDistancePerPulse() so that a call to GetRate() returns +1 when the speed is what you expect to get when setpoint is +1. As for tuning a speed PID, read this thread: http://www.chiefdelphi.com/forums/sh...90#post1115090 Last edited by Ether : 04-02-2012 at 10:35. |
|
#9
|
||||
|
||||
|
Re: PID drive paramiters?
do you know what that might be? ive spent the morning trying to figure out what that number is. the GetRate() is DistancePerPulse/GetPeriod();
is there something i can do that would make this relitivly easy? |
|
#10
|
||||
|
||||
|
Re: PID drive paramiters?
Quote:
(and explain how you got that) tell me your encoder part number |
|
#11
|
||||
|
||||
|
Re: PID drive paramiters?
hey. thank you so much. i found the correct number for that now. it was 1/2000 which was the reciprical of the max speed. now we have the issue in which the P value seems to be a scaler for the jaguar, as opposed to a proportional controler. as we increse P, the target speed seems to incress. any ideas?
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|