Go to Post Winning is important. Learning is important. Inspiring students is important. Teaching Students is important. Figuring out how to do all of these at the same time, in my opinion, is the meaning of FIRST. - Justin Montois [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 44 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 20-02-2013, 13:02
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: Running multiple PID loops on the drivetrain

Quote:
Originally Posted by F22Rapture View Post
Is it possible to use more than one PID controller for a subsystem like the drivetrain? Example: An encoder PID loop to drive to a distance setpoint, while a gyro PID loop keeps the robot going straight.

You could also substitute encoder with Ultrasonic sensor, etc.

If you can't run them simultaneously, is there a way to switch between PID controllers to, say, drive forward 5 meters distance (via encoder), then turn 90 degrees (via gyro), then drive forward again, etc?
Yes. Feed the output of the PIDs into Arcade Drive. Use the output of the angle control PID as the joystick input that makes the robot turn, and use the output of the distance PID as the joystick input that makes the robot drive forward.
__________________
-
An ounce of perception is worth a pound of obscure.
Reply With Quote
 


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 10:07.

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