Go to Post there is no mechanics Barbie. - Iain McLeod [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
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 15-05-2012, 13:43
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,098
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: paper: Team 1114 Controls and Programming Overview 2012

Quote:
Originally Posted by Ether View Post
You can do curve fitting in Excel (or OpenOffice or LibreOffice) using the "trendline" function.

See this Excel spreadsheet.
If the model you want to fit is not supported by "trendline" -- for example you think y=p1+p2/(x-p3) might fit the data better than, say, a polynomial -- you can create and fit your own model using Tools|Solver as shown in this spreadsheet.


[edit1]
Hat tip to Joe Ross: In Excel, cell E1 can be coded directly as sumxmy2(B1:B20,C1:C20) instead of creating cells D1:D20 (if a least-squares fit objective function is desired).
[/edit1]]

[edit2]
Note that not only the model but also the objective function is user-configurable using the tools|solver modeling technique. For example, suppose that instead of minimizing the sum of the squares of the model errors (least squares fit) you want to find the parameters which produce the minimum maximum absolute error. This is easily accomplished by making cells D1:D20 equal to the absolute model error (for each data point), and making cell E1 equal to the maximum of cells D:D20. Then use tools|solver to minimize cell E1. Note: this does not work well (or at all) in Excel because of the algorithms used; and in OpenOffice takes several minutes (instead of seconds) but does find a solution. For the spreadsheet linked in this post, OO3.3 found the following solution for minimum maximum error: y = -0.2651 -0.419013/(x-1.3281551). Here's a graph of the solution. The solid black line is the raw data. The dashed black line is the inverted data. The solid red line is the linearization function, which uses only 2 adds and 1 divide.
[/edit2]



Last edited by Ether : 15-05-2012 at 16:49.
Reply With Quote
  #2   Spotlight this post!  
Unread 15-05-2012, 17:17
slijin's Avatar
slijin slijin is offline
Pockets
AKA: Samuel Lijin
FRC #0694 (StuyPulse)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York City
Posts: 537
slijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to behold
Re: paper: Team 1114 Controls and Programming Overview 2012

Wow, thanks for this!

Could you also post the data you used to develop your linearization code? I'd like to compare it to other data I've found around.
__________________

2010-12 CT Chairman's
2011 Galileo 5th seed
2010 NY Regional Winners
Reply With Quote
  #3   Spotlight this post!  
Unread 15-05-2012, 17:36
MichaelBick MichaelBick is offline
Registered User
FRC #1836 (MilkenKnights)
Team Role: Alumni
 
Join Date: Oct 2011
Rookie Year: 2010
Location: Los Angeles
Posts: 734
MichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant future
Re: paper: Team 1114 Controls and Programming Overview 2012

Why would you want to reduce the d constant of PID in certain circumstances for speed PID?
__________________
Team 1836 - The Milken Knights
2013 LA Regional Champions with 1717 and 973
2012 LA Regional Finalists with 294 and 973
To follow Team 1836 on Facebook, go to http://www.facebook.com/MilkenKnights
To go to our website, go to http://milkenknights.com/index.html
Reply With Quote
  #4   Spotlight this post!  
Unread 15-05-2012, 17:50
JamesTerm's Avatar
JamesTerm JamesTerm is offline
Terminator
AKA: James Killian
FRC #3481 (Bronc Botz)
Team Role: Engineer
 
Join Date: May 2011
Rookie Year: 2010
Location: San Antonio, Texas
Posts: 298
JamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to behold
Re: paper: Team 1114 Controls and Programming Overview 2012

Quote:
Originally Posted by MICHAELABICK View Post
Why would you want to reduce the d constant of PID in certain circumstances for speed PID?
I presume this was the
"Different from standard PID control. Instead of the PID calculation setting
the output, the PID calculation is an adjustment to the output
o output = output + calcPID(currentSpeed)
"
?

But if I had to guess, I know that (at least for our power wheel)... the more momentum and kinetic energy built up on higher speeds the less P is needed... but I cannot see yet how that equates to D except that if D is too high it will reverse oscillate. We too had to use a large D though. This attachment is P=4 and D=7. Where magenta is the predicted velocity, Cyan is the encoder velocity, green is the voltage, and yellow is the PID in action.

I'm still trying to master PID... I'd love to get it down to a 2 radian per second tolerance like 1114 has done! We are around 20 radians tolerance.
Reply With Quote
  #5   Spotlight this post!  
Unread 15-05-2012, 18:38
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,098
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: paper: Team 1114 Controls and Programming Overview 2012

Quote:
Originally Posted by slijin View Post
Wow, thanks for this!

Could you also post the data you used to develop your linearization code? I'd like to compare it to other data I've found around.
Your post was linked to my post, so I assume you were asking me?

If that is the case, the Victor calibration data I used came from the 1114's paper (the subject of this thread), on page 3 (the red dots). Is that what you were asking? If so, the data is in the spreadsheets in cells A1:B20.


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 23:05.

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