Go to Post I don't know if the WPILibrary has a FluxCapacitor.vi in it. - DavidGitz [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

 
 
 
Thread Tools Rating: Thread Rating: 7 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #17   Spotlight this post!  
Unread 05-03-2015, 10:26
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,122
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: OPR

Quote:
Originally Posted by Spoam View Post
Adding on to this, if anyone truly wants to do the math themselves it's worth mentioning that you'll end up with an over-determined system and a non-invertible matrix. Because of this, |Ax-b|=0 probably doesn't exist (every robot would have to contribute the exact same amount of points every match for that to happen) and you have to settle for minimizing |Ax-b| instead. This is done via a formula called linear least squares, which is essentially just left-multiplying both sides by the pseudo-inverse of A, to pseudo-solve it, if you will.
It's important to note that in your (excellent) discussion above, [A] is a non-square binary matrix (each element is either 1 or 0) with 2M rows and T columns, where M is the number of matches and T is the number of teams... and [b] is a 2M by 1 column vector of alliance scores. So [A][x]≈[b] is indeed an overdetermined system which has no exact solution.

But if you look carefully at the way saikiranra defined the matrix [A] and the column vector [b], you'll see that his [A] is actually [N]=[AT][A] and his [b] is actually [d]=[AT][b].

[N] will be a square symmetric positive definite matrix, and [N][x]=[d] will have an exact solution because it's already in the Normalized Equations form. The exact solution to [N][x]=[d] will be the least-squares approximate solution to [A][x]≈[b] (to within computer floating-point rounding error).

Quote:
you have to settle for minimizing |Ax-b| instead. This is done via a formula called linear least squares...
It is also important to note that least squares is not the only criterion for minimizing the residual vector ε=[A][x]-[b]. For example, you could choose to minimize the L1 norm of ε (least absolute deviation) instead of minimizing the L2 norm (least squares).

Quote:
which is essentially just left-multiplying both sides by the pseudo-inverse of A, to pseudo-solve it, if you will.
That is conceptually true, but it is far faster (computationally) to form the system [N][x]=[d] and solve it that way.


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 15:25.

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