Go to Post I guess instead of focusing on the stuff we wish we could have changed, we should focus on all of the wonderful stuff we accomplished instead! - Winged Wonder [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 30-01-2016, 11:51
Cecil's Avatar
Cecil Cecil is offline
Registered User
AKA: Alex Hummel
FRC #2010 (Lightning Bots)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Champion
Posts: 343
Cecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to behold
Lightweight Shooter PID Tuning

We are currently having a few problems getting our flywheels to keep at a constant RPM. We have tried both a Bang-Bang controller, the Talon SRX's built in speed PID, and even the standard LabVIEW PID controller. I'm thinking that our wheels are too light, but would like a second opinion on this.

Current setup:

775 Pro Motor
3:1 Versaplanetary Gearbox
Versaplanetary Integrated Encoder installed after the 3:1 stage (between the stage and output shaft)
Andymark 4" plaction wheel with hex hub direct driven off the gearbox

The encoder gets a clean signal in (verified by using just the joystick to drive the motor). When we use the CTRE speed example, the flywheel oscillates back and forth. We also tried using the LabVIEW PID with a high output of 1 and a low output of 0. We got better results with that, as it did not constantly kick back and forth. When trying the bang-bang controller, the motor would overshoot the desired RPM almost instantly, then stop outputting altogether until it dropped back below that RPM, effectively pulsing the motor over and over.

We were able to get closest with the LabVIEW PID function, but it would still pulse constantly. High P numbers would get it to take off too fast and pulse at a slower rate. Low P numbers (very low, like .00001) would even out the pulses to a point, but eventually would not even drive the motor due to it being too low.

Any help, whitepapers we should look at, etc. would be greatly appreciated. We are at the point where we would almost just scale the voltage instead of the speed control. Should we add weight inside the wheel to give it a bit more momentum?
__________________
I'm right 90% of the time, so why worry about the other 3%?
Reply With Quote
  #2   Spotlight this post!  
Unread 30-01-2016, 12:41
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 521
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
Re: Lightweight Shooter PID Tuning

What are the complete values for Kf,Kp,Ki,Kd ?

Oscillating suggests too large of a p-gain, which might be overcompensating for a weak f-gain.
Reply With Quote
  #3   Spotlight this post!  
Unread 30-01-2016, 12:51
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 521
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
Re: Lightweight Shooter PID Tuning

The LV loop works better likely because you set the min output to '0', which means you are likely overshooting the RPM.

You can do the same thing with Talon SRX by using the "TALON - CONFIG PEAK OUTPUT".vi and setting in the "Reverse Peak Output" to '0'.

Try freshly calculating the F-gain (zero P, I, and D) and start with that (no load).

Then test at various RPMs to see what your error is like. Then start increasing P until the closed-loop begins to oscillate (then back off).
Reply With Quote
  #4   Spotlight this post!  
Unread 30-01-2016, 13:03
Cecil's Avatar
Cecil Cecil is offline
Registered User
AKA: Alex Hummel
FRC #2010 (Lightning Bots)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Champion
Posts: 343
Cecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to behold
Re: Lightweight Shooter PID Tuning

So this is going to sound really dumb, but I think I have it figured out now. Instead of selecting true on the "Reverse Sensor Output", I had selected true on "Reverse Closed-Loop Output" instead. Now, with values of 0.1 for P and 0.05 for F, it is within 20 RPM of the target.

Thank you for your replies!
__________________
I'm right 90% of the time, so why worry about the other 3%?
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:54.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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