|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Closed Loop Speed Control
I want to make a closed loop speed control VI to get a very accurate speed for the motors to run. I know how to calculate the speed using encoders but is there a different way to tell the victor what speed to set the motor to? I feel that the Set Motor Speed VI is not very accurate.
Last edited by kgzak : 28-03-2010 at 20:16. |
|
#2
|
|||
|
|||
|
Re: Closed Loop Speed Control
Presumably, you are using the Motor Set Speed VI, which in spite of its name, sets the percentage of time that the motor is given full current. In order to control the speed of the motor, you'll want to use some form of control to close the loop -- as the topic correctly states.
If you are having trouble getting the basic I/O, there is LV example called Motor with Encoder that you can compare to. If the control is the difficult part, I'd add a PID VI to the loop and use the measured encoder speed, the target speed, and the PID coefficients to tune the controller. Greg McKaskle |
|
#3
|
||||
|
||||
|
Re: Closed Loop Speed Control
Quote:
If you want closed-loop speed control, you can run the encoder signal to the cRIO and create your own PID control or use a library function. Or, use the Jaguars instead of the Victors. The Jags have built-in closed-loop speed control if you command them via CAN bus and feed the encoder signal directly to them. Which raises the question: has there been a clear ruling from GDC whether or not this is permissible? ~ |
|
#4
|
|||
|
|||
|
Re: Closed Loop Speed Control
Quote:
Summarized, the rules are: 1) If you drive a Jaguar with PWM, pretend it is a victor (no fancy inputs). 2) If you drive a Jaguar with CAN, don't plug in PWM, but have fun with everything else. |
|
#5
|
|||||
|
|||||
|
Re: Closed Loop Speed Control
Quote:
Quote:
|
|
#6
|
|||||
|
|||||
|
Re: Closed Loop Speed Control
What you want is a PID loop. Search the term here in Chief Delphi, particularly in the White Papers section.
What a PID loop does is look at the motor's speed, compare it to what you have told it you want as the motor's speed, and increases (or decreases) the motor speed so they match. You wrote "Very Accurate" but what exactly do you mean? +/- 100 RPM? +/1 1 RPM? As you might guess, these are both pretty accurate, but one takes a lot more effort than the other. Also, if your load is fairly constant, it is a lot easier than if your load varies widely. You can get tighter control of the motor by making your loop run faster. If you run the loop at 100 times per second, you can maintain better control than if you run it once per second, for example. If you read the papers and still don't understand, just ask. We love explaining PID. |
|
#7
|
||||
|
||||
|
Re: Closed Loop Speed Control
I know what a PID is I have already written code to tell how far the robot should go in autonomous. (If you watch a video of us during Grand Valley you'll see that we move back and fourth because we over shot our specified distance) Thanks for the help though. I understand victors now though.
|
|
#8
|
||||
|
||||
|
Re: Closed Loop Speed Control
Quote:
~ |
|
#9
|
||||
|
||||
|
Re: Closed Loop Speed Control
Quote:
~ |
|
#10
|
|||||
|
|||||
|
Re: Closed Loop Speed Control
Rule R60-L
Quote:
Quote:
Last edited by Mark McLeod : 29-03-2010 at 15:35. |
|
#11
|
||||
|
||||
|
Re: Closed Loop Speed Control
Quote:
Quote:
"You may use the limit switch inputs to the Jaguar speed controllers IF you are controlling the Jaguar via a CAN-bus connection." "You can not use external limit switch inputs to the Jaguars if you are controlling them via PWM inputs." I can find nothing in the Jag literature that says you can not use the limit switch inputs when commanding via PWM. Did the GDC really mean "can not" or did they intend to communicate "shall not" or "are not permitted to" ? Does anyone know if the limit switch inputs on the Jags work when the Jag is being commanded via PWM? And if so, has there been a clarification from GDC as to whether they intended to prohibit such use? ~ |
|
#12
|
|||
|
|||
|
Re: Closed Loop Speed Control
Quote:
The limit switches do work with PWM mode, it is simply not allowed. |
|
#13
|
||||
|
||||
|
Re: Closed Loop Speed Control
Quote:
May I ask, without any sense of disrespect whatsoever, how do you know this? I kind of get the impression that your word on certain matters is authoritative (you seem to be quite knowledgeable about cRIO hardware for example), but being somewhat new around here, I do not know from whence that authority arises. ~ |
|
#14
|
|||
|
|||
|
Re: Closed Loop Speed Control
Quote:
I designed the kit of parts electronics that are encased in blue plastic (PD, DSC, and the breakouts) as well as some of the kit sensor boards (2009 and 2010 Gyro and Accelerometer). I also did a bit of the architectural legwork before the project really kicked off in earnest. This puts me at a disadvantage, because sometimes I know what it was supposed to do 3-4 years ago, and not what it actually does now. Also, I don't touch software. |
|
#15
|
|||||
|
|||||
|
Re: Closed Loop Speed Control
You can test the Jaguar limit inputs for yourself (I did) under PWM control.
Simply pull out the jumpers one at at time test Jaguar motion and replace. It's one of the fault conditions we have people check for when their Jags don't work in one direction or another. I have no official standing as does Eric however. I just tinker a lot and visit a bunch of teams who's purpose in life often seems to be to break things in interesting and unique ways... Last edited by Mark McLeod : 29-03-2010 at 20:40. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| closed-loop torque (current) wheel control for mecanum | Ether | Programming | 3 | 07-02-2010 00:54 |
| Radio Packet loss + closed loop control system = lunging robot | Dave K. | Control System | 5 | 20-02-2007 06:09 |
| CPU loop speed | Windward | Programming | 6 | 07-02-2007 15:22 |
| PID control loops - closed loop feedback | KenWittlief | Technical Discussion | 56 | 26-04-2004 21:27 |
| How Can You Make A Closed Loop System???? | GRR_340 | Pneumatics | 6 | 21-03-2002 12:27 |