Go to Post Why does school have to get in the way of more important things like FIRST? When would we ever need to know about the stuff there teaching in here? - Briansmithtown [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 31 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 13-10-2014, 19:34
Jared's Avatar
Jared Jared is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Aug 2013
Rookie Year: 2012
Location: Connecticut
Posts: 602
Jared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond repute
PID Loop Simulator/Teaching Tool

I've made a simple PID simulator to help teach and explain how PID loops, and how to properly tune the gains for different systems. It is a nice way to introduce PID loops to newer programmers. The model behaves surprisingly realistically, and the output vs. time graphs look almost identical to graphs from robots.

The program simulates a CIM motor driving a 1 meter long arm with a 150:1 reduction. The mass on the end of the arm can be adjusted, and gravity can be toggled on and off, so you could simulate something not affected by gravity, like a turret. The simulation takes into account an accurate motor curve (where motor torque is a function of motor speed and applied voltage), and the angular momentum of the arm.

You can download the simulator from here:
https://drive.google.com/file/d/0Bzf...ew?usp=sharing

Or look at the source code here:
https://github.com/dicarlo236/PID-De...rc/controldemo

Reply With Quote
  #2   Spotlight this post!  
Unread 14-10-2014, 03:04
David Brinza's Avatar
David Brinza David Brinza is offline
Lead Mentor, Lead Robot Inspector
FRC #0980 (ThunderBots)
Team Role: Mentor
 
Join Date: Feb 2003
Rookie Year: 2003
Location: Glendale, CA
Posts: 1,378
David Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond repute
Re: PID Loop Simulator/Teaching Tool

Nice demo! Our students will get a crack at it this weekend.

BTW, I notice the sim crashes if the Mass is accidentally set to "0" while running and needs to be closed/restarted to work again (it cannot be reset). Other than that little quirk, you've got a slick tool for teaching PID principles.
__________________
"There's never enough time to do it right, but always time to do it over."
2003 AZ: Semifinals, Motorola Quality; SoCal: Q-finals, Xerox Creativity; IRI: Q-finals
2004 AZ: Semifinals, GM Industrial Design; SoCal: Winners, Leadership in Controls; Championship: Galileo #2 seed, Q-finals; IRI: Champions
2005 AZ: #1 Seed, Xerox Creativity; SoCal: Finalist, RadioShack Controls; SVR: Winners, Delphi "Driving Tomorrow's Technologies"; Championship: Archimedes Semifinals; IRI: Finalist
2007 LA: Finalist; San Diego: Q-finals; CalGames: Finalist || 2008 San Diego: Q-finals; LA: Winners; CalGames: Finalist || 2009 LA: Semifinals; Las Vegas: Q-finals; IRI: #1 Seed, Finalist
2010 AZ: Motorola Quality; LA: Finalist || 2011 SD: Q-finals; LA: Q-finals || 2013 LA: Xerox Creativity, WFFA, Dean's List Finalist || 2014 IE: Q-finals, LA: Finalist, Dean's List Finalist
2016 Ventura: Q-finals, WFFA, Engineering Inspiration
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 10:10.

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