Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Optimizing Speed Controllers (http://www.chiefdelphi.com/forums/showthread.php?t=100073)

4DFudge 13-01-2012 17:12

Optimizing Speed Controllers
 
So, my team is trying to use the inputs on the speed controllers (and possibly the sidecars) more effectively, to improve our overall robot. One of mentors brought up using CAN bus however I'm not exactly sure how I would go about setting this up(if this is actually more efficient than the connection of every jag being connected to a different input on the digital sidecar). So I was just wondering if other teams had used other inputs that improved their robot's preformance.

Also I have read the datasheet for the digital sidecar and it seems as though the connections are pretty clear cut but I just wanted to make sure there aren't more creative uses.

Thanks

flameout 13-01-2012 18:56

Re: Optimizing Speed Controllers
 
Quote:

Originally Posted by 4DFudge (Post 1104687)
So, my team is trying to use the inputs on the speed controllers (and possibly the sidecars) more effectively, to improve our overall robot. One of mentors brought up using CAN bus however I'm not exactly sure how I would go about setting this up(if this is actually more efficient than the connection of every jag being connected to a different input on the digital sidecar). So I was just wondering if other teams had used other inputs that improved their robot's preformance.

Also I have read the datasheet for the digital sidecar and it seems as though the connections are pretty clear cut but I just wanted to make sure there aren't more creative uses.

Thanks

We did some testing last year (using Java), and determined that CAN is in fact slower than PWM (in terms of update rate). Therefore, unless you are using the built-in closed-loop control features (control of current, velocity, and position as well as exact voltage are possible), I do not see any competitive advantage to CAN

However, PWM cables are known to be a bit unreliable, so CAN is an improvement in reliability.

There's a guide (or two) on the forums for setting it up. I suggest looking in the "CAN" subforum.

Fyi, we found last year that Java's CAN driver averages 180-200 commands per second (depending on the command). The Jaguar's PWM is updated at 200 Hz, and the Victor's is at 100 Hz. The internal PID algorithm in the Jaguar runs at 1000 Hz -- so if you need closed-loop control, then CAN might be a better option for some of your Jaguars.

Good luck with whatever you choose to go with.

biojae 13-01-2012 23:41

Re: Optimizing Speed Controllers
 
Quote:

Originally Posted by flameout (Post 1104787)

Fyi, we found last year that Java's CAN driver averages 180-200 commands per second (depending on the command). The Jaguar's PWM is updated at 200 Hz, and the Victor's is at 100 Hz. The internal PID algorithm in the Jaguar runs at 1000 Hz -- so if you need closed-loop control, then CAN might be a better option for some of your Jaguars.

Which method of CAN was that: 2CAN or serial?

flameout 13-01-2012 23:45

Re: Optimizing Speed Controllers
 
Quote:

Originally Posted by biojae (Post 1105008)
Which method of CAN was that: 2CAN or serial?

Serial. However, according to a thread here (CD) (I'll go try to find it), the serial bandwidth is far higher than is necessary for 200 commands/s. Therefore, I don't think it will matter which type is used, but I am still waiting to see if things have improved this year and if the 2CAN makes any difference.

EDIT: It's at http://www.chiefdelphi.com/forums/sh...ad.php?t=86259.

4DFudge 14-01-2012 09:35

Re: Optimizing Speed Controllers
 
Quote:

Originally Posted by flameout (Post 1104787)
We did some testing last year (using Java), and determined that CAN is in fact slower than PWM (in terms of update rate). Therefore, unless you are using the built-in closed-loop control features (control of current, velocity, and position as well as exact voltage are possible), I do not see any competitive advantage to CAN.


Which type of jaguars did you test with? I know they're both similar but I'm not sure if there are any specific differences having to do with CAN.
Also my mentor said he heard there were more capabilities ,like using limit switches?

flameout 14-01-2012 10:04

Re: Optimizing Speed Controllers
 
Quote:

Originally Posted by 4DFudge (Post 1105164)
Which type of jaguars did you test with? I know they're both similar but I'm not sure if there are any specific differences having to do with CAN.
Also my mentor said he heard there were more capabilities ,like using limit switches?

I used both black and tan jaguars. The main differences are that black jaguars can run at a higher voltage, black jaguars can act as a serial-to-can bridge, and black jaguars aren't as prone to failing if students pull the terminal screws out all the way.

Limit switches work whether or not you're using CAN -- check the manual, though, to make sure there aren't rules limiting their use when using PWM.

The jaguars are capable of built-in PID control for position and speed, using a relative encoder or potentiometer for feedback. They can also output a given voltage (rather than duty cycle) and have current control capabilities.

Good luck.

Ether 14-01-2012 10:14

Re: Optimizing Speed Controllers
 
Quote:

Originally Posted by flameout (Post 1105180)
They can also output a given voltage (rather than duty cycle)

The output is always a "duty cycle" (PWM).

Perhaps what you meant is the difference between voltage mode and %Vbus mode, explained here:

http://www.chiefdelphi.com/forums/sh...4&postcount=19

flameout 14-01-2012 10:45

Re: Optimizing Speed Controllers
 
Quote:

Originally Posted by Ether (Post 1105187)
The output is always a "duty cycle" (PWM).

Perhaps what you meant is the difference between voltage mode and %Vbus mode...

Sorry I wasn't clear... that's what I meant.

To those not familiar with motor controllers (and the Jaguars in particular), the %Vbus (EDIT: Correction below) mode changes the duty cycle as a function of the Jaguar's input voltage so as to produce an output that simulates the specified voltage. The formula is as follows:

Code:

duty cycle = Target voltage
              Input voltage

The result of this formula should be scaled to [-1,1]. If scaling is required, then the requested voltage is not achievable unless the voltage of the Jaguar's power supply is increased. If percentage is required, multiply by 100%.

With brushed DC motors (I'm sure there are other motor types as well, but BLDC (EDIT: correction below) motors are all that FRC teams need to be concerned with), changing the duty cycle this way has exactly the same effect on the motor's outputs as giving it exactly the specified voltage would.

EDIT: As highlighted below by Ether, the Jaguar's voltage-control mode is it's "voltage" mode, not "%Vbus" mode.

Also, when I said "BLDC", I should have said "brushed DC".

Ether 14-01-2012 10:57

Re: Optimizing Speed Controllers
 

Quote:

Originally Posted by flameout (Post 1105215)
the %Vbus mode changes the duty cycle as a function of the Jaguar's input voltage so as to produce an output that simulates the specified voltage. The formula is as follows:

Code:

duty cycle = Target voltage
              Input voltage


Assuming that by "Input voltage" you meant Vbus voltage, then I believe that what you have described above is the voltage mode, not the %Vbus mode. Someone please correct me if I'm wrong.

The %Vbus mode simply takes the command and interprets it as a % PWM.

Quote:

With brushed DC motors (I'm sure there are other motor types as well, but BLDC motors are all that FRC teams need to be concerned with)
"BLDC" is an acronym for brushless DC.



flameout 14-01-2012 12:02

Re: Optimizing Speed Controllers
 
Quote:

Originally Posted by Ether (Post 1105219)
The %Vbus mode simply takes the command and interprets it as a % PWM.

You're probably correct...

Quote:

"BLDC" is an acronym for brushless DC.
I knew that! :p

I'll try not to make any more careless mistakes in this thread :rolleyes:


All times are GMT -5. The time now is 09:55.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi