Go to Post So, you're saying there's a correlation between hard work and success? Who woulda thunk it?! - Tom Bottiglieri [more]
Home
Go Back   Chief Delphi > Technical > Motors
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-10-2012, 17:07
MrRoboSteve MrRoboSteve is offline
Mentor
AKA: Steve Peterson
FRC #3081 (Kennedy RoboEagles)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2011
Location: Bloomington, MN
Posts: 578
MrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond repute
Bench top setup for demonstrating PID

We're building a bench top demo setup for experimenting with PID control. We'd use the Smart Dashboard to show internal state like the gain values, setpoint, and the PWM input value to the motor controller.

I'm looking for mechanical ideas on how to load a small motor with different levels of resistance in a safe way.

Does anyone have an example that they're willing to share?
  #2   Spotlight this post!  
Unread 23-10-2012, 20:12
Jon236's Avatar
Jon236 Jon236 is offline
Registered User
AKA: Jon Mittelman
FRC #2648 (Infinite Loop)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Windsor, Maine
Posts: 741
Jon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond repute
Re: Bench top setup for demonstrating PID

what is the output you will be measuring? and how will you measure it? speed or position?
__________________
Jon Mittelman

Senior Judge Advisor New England & Israel 2014-2015
Infinite Loop Mentor 2011-2015
TechnoTicks Mentor 2000-2011
Championship Chairman's Award 2009 Team236 TechnoTicks
Judge 2010-2015 Championships
Senior Judge Advisor New England District Championship 2014-2015
Judge Advisor Tel Aviv Regional 2007-2015
Judge Advisor Pine Tree Regional 2013
Maine Regional Planning Committee
New England District Planning Committee
Lead Inspector Microsoft Tel Aviv Regional 2006-2008
Judge & Lead Inspector GM/Technion Tel Aviv Regional 2006
Judge UTC Hartford Regional 2006
  #3   Spotlight this post!  
Unread 23-10-2012, 21:50
connor.worley's Avatar
connor.worley connor.worley is offline
Registered User
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Berkeley/San Diego
Posts: 601
connor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond repute
Re: Bench top setup for demonstrating PID

Inverted pendulums are pretty cool.
__________________
Team 973 (2016-???)
Team 5499 (2015-2016)
Team 254 (2014-2015)

Team 1538 (2011-2014)
2014 Driver (25W 17L 1T)
日本語でOK
  #4   Spotlight this post!  
Unread 23-10-2012, 22:17
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,091
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Bench top setup for demonstrating PID


If you are trying to control position, you could drive a speed-reduction gearbox connected to an arm with weights on the end. Physically limit the arm travel so no-one gets hurt.

If you are trying to control speed, you could:

a) drive a speed-increasing gearbox connected to a fan (make sure the fan has a shield to protect errant fingers and contain blade failures)

or

b) drive a speed-reduction gearbox connected to the shaft of a second motor, and short the second motor's leads.


Wear safety glasses.



Last edited by Ether : 23-10-2012 at 22:20.
  #5   Spotlight this post!  
Unread 23-10-2012, 23:10
MrRoboSteve MrRoboSteve is offline
Mentor
AKA: Steve Peterson
FRC #3081 (Kennedy RoboEagles)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2011
Location: Bloomington, MN
Posts: 578
MrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond repute
Re: Bench top setup for demonstrating PID

Speed control is the goal. The fan idea is a good one. Right now we're using a CIM motor with a gear reduction and wheel attached, but I'm looking to go to a smaller BaneBots motor once I work out how to connect the US Digital encoder up to it.

I'm outputting the encoder values and current Jaguar value to the Smart Dashboard to monitor things.
  #6   Spotlight this post!  
Unread 24-10-2012, 09:30
MrRoboSteve MrRoboSteve is offline
Mentor
AKA: Steve Peterson
FRC #3081 (Kennedy RoboEagles)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2011
Location: Bloomington, MN
Posts: 578
MrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond repute
Re: Bench top setup for demonstrating PID

We're starting with velocity control, using the Robodox guide as the template: http://www.chiefdelphi.com/forums/sh...d.php?t=106082

Our current setup is a CIM motor / CIMPle Box combo with the US Digital E4P encoder that came in the 2011 KOP. I'd like to replace the motor with something lower in power to make it a bit safer. Thoughts?
  #7   Spotlight this post!  
Unread 24-10-2012, 11:03
tsaksa's Avatar
tsaksa tsaksa is offline
Registered User
FRC #0997 (CHS Robotics)
Team Role: Mentor
 
Join Date: Jul 2011
Rookie Year: 2011
Location: Corvallis Oregon
Posts: 203
tsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond repute
Re: Bench top setup for demonstrating PID

You might try having one DC motor drive another one. Permanent magnet DC motors act as generators when driven like this, though you may need to add some gearing depending on what target RPM you want to control. If you vary the electrical load on the generator it will translate into a varying mechanical load on the motor. Add a few switches and some lamps and you should have a simple variable load simulator. Depending on your application you may want to add some type of flywheel to add rotational inertia as well.
__________________
This is the zeroth day of the rest of your life.
  #8   Spotlight this post!  
Unread 24-10-2012, 11:08
rsisk's Avatar
rsisk rsisk is offline
The GURU Channel
AKA: Richard Sisk
FRC #2493 (Robokong)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Riverside, CA
Posts: 2,749
rsisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond repute
Send a message via MSN to rsisk
Re: Bench top setup for demonstrating PID

I would love to see a picture when you get it all done
__________________
Quote:
The views expressed are mine and should not be construed to represent the views of anyone else.
  #9   Spotlight this post!  
Unread 24-10-2012, 11:45
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Bench top setup for demonstrating PID

A 'pure' PID controller can act as a velocity controller if both of the inputs (setpoint and process variable) are velocity. In this case, D will be unused, I will act as P, and P will act as D. The issues come when the PID class has additional logic to handle the I term, such as resetting the integral when the error zero-crosses, capping the integral, etc. - I've heard the Jaguars reset I under some conditions, although I've never verified this.

Every time I have worked with a speed controller, attempting to adapt a position controller has always failed to meet the design requirements, and I design a better controller to handle it (usually incorporating some application-specific limiting of the integral term). Adding a Feed Forward term also helped with response time and oscillation.

Basically, what I'm saying is, don't be afraid to write your own PID math and not use the per-existing class.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #10   Spotlight this post!  
Unread 24-10-2012, 12:09
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,091
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Bench top setup for demonstrating PID

Quote:
Originally Posted by apalrd View Post
A 'pure' PID controller can act as a velocity controller if both of the inputs (setpoint and process variable) are velocity. In this case, D will be unused, I will act as P, and P will act as D. The issues come when the PID class has additional logic to handle the I term, such as resetting the integral when the error zero-crosses, capping the integral, etc. - I've heard the Jaguars reset I under some conditions, although I've never verified this.

Every time I have worked with a speed controller, attempting to adapt a position controller has always failed to meet the design requirements, and I design a better controller to handle it (usually incorporating some application-specific limiting of the integral term). Adding a Feed Forward term also helped with response time and oscillation.

Basically, what I'm saying is, don't be afraid to write your own PID math and not use the per-existing class.
Here are some other options:

http://www.chiefdelphi.com/forums/sh...90&postcount=5


  #11   Spotlight this post!  
Unread 24-10-2012, 12:12
MrRoboSteve MrRoboSteve is offline
Mentor
AKA: Steve Peterson
FRC #3081 (Kennedy RoboEagles)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2011
Location: Bloomington, MN
Posts: 578
MrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond repute
Re: Bench top setup for demonstrating PID

The Robodox paper proposes implementing a PIDSource subclass (RPMSource) that wraps an RPM value, which is the wired to the WPILib PIDController. On each turn of the Execute() crank in our command, we take the elapsed time and change in encoder count to calculate an RPM value, which is fed into the RPMSource instance.

apalard -- it does look like we're not too far from doing all of the calculations ourselves, so we will probably give that a try if the build-in controller fails us. One item that hasn't been obvious is how far back in time to accumulate errors.
  #12   Spotlight this post!  
Unread 24-10-2012, 14:51
droswell's Avatar
droswell droswell is offline
Registered User
FRC #2370 (iBots)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2009
Location: Rutland, VT
Posts: 72
droswell is a splendid one to beholddroswell is a splendid one to beholddroswell is a splendid one to beholddroswell is a splendid one to beholddroswell is a splendid one to beholddroswell is a splendid one to beholddroswell is a splendid one to behold
Re: Bench top setup for demonstrating PID

We're just finished building ours. We used a Victor + Globe motor with a VEX encoder (http://www.vexrobotics.com/276-2156.html) as feedback.

Still haven't figured out a great way to provide consistent, measurable resistance yet. But the globe is so slow we can at least test the PID loop by using our fingers to resist the position.
Closed Thread


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

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