Go to Post remember FIRST is just an extracuricular activity in which most of the work is technichan's work...what gets you into college are good grades and a good course load...as my mom always said, "getting good grades gives you the freedom to chose to be whatever you want and go wherever you want" - abeD [more]
Home
Go Back   Chief Delphi > Other > Math and Science
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 29-09-2016, 10:43
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
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
Math Quiz 10


The XY coordinates in the attached file describe the shape of a plane curve.

There exists a coordinate system in which the shape can be perfectly* defined with a very simple equation.


Find that equation.



*for purposes of this exercise, let's say that means within 1 ppm for each coordinate

Attached Thumbnails
Click image for larger version

Name:	MQ10 XY data.png
Views:	91
Size:	4.8 KB
ID:	21090  
Attached Files
File Type: csv MQ10 XY data.csv (2.1 KB, 35 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 29-09-2016, 13:26
Caleb Sykes's Avatar
Caleb Sykes Caleb Sykes is offline
Registered User
FRC #4536 (MinuteBots)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2009
Location: St. Paul, Minnesota
Posts: 1,054
Caleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond repute
Re: Math Quiz 10

In cartesian space, the closest logarithmic fit is about y=0.22*ln(x)+0.22.

This is still not great though, it is a decent approximation for values with x<0.3, but is worse between 0.3<x<0.6. Also, the accuracy is nowhere close to 1ppm.
Reply With Quote
  #3   Spotlight this post!  
Unread 29-09-2016, 15:33
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
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: Math Quiz 10


You can fit a 4th-degree rational function that's accurate within ±0.0045, but that's not "simple" and it's not within 1 ppm.

Code:
y =  ( 0.014276438 - 0.802004924*x - 15.16719888*x^2 + 66.06068525*x^3 - 36.17009406*x^4 )  /  ( -0.017352118 + 0.530402174*x + 47.33893283*x^2 + 22.84085288*x^3 + 63.98324943*x^4 ) + 0.001
There's a better way...


Reply With Quote
  #4   Spotlight this post!  
Unread 30-09-2016, 11:13
MechEng83's Avatar
MechEng83 MechEng83 is offline
Lead Mentor/Engineer
AKA: Mr. Cool
FRC #1741 (Red Alert)
Team Role: Coach
 
Join Date: May 2011
Rookie Year: 2011
Location: Indiana
Posts: 616
MechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond repute
Re: Math Quiz 10

Ether,
are you just looking for "here's my answer" with work shown, or could we start posting "here's what I tried; here's what I've ruled out; I've got some speculation on how/what needs to be done"?

To be clear, I'm fine with either, just wanted to know what parameters should be followed for posts.

Thanks.
__________________

2016 INWLA GP| INWCH Entrepreneurship | INPMH DCA | INCMP Team Spirit | CAGE Match Winner (w/ 1747 &868), Finalist (1471 w/ 1529 & 1018), Best Fans
2015 ININD Judges Award, Proud "Phyxed Red Card" alliance partners of 1529 & 1720 | INWLA EI | INCMP GP
2014 Boilermaker Creativity | Chesapeake Finalist, Safety, GP, Entrepreneurship | IN State Championship Winner (w/ 868 & 1018) | CAGE Match Winner (w/ 1024, 5402 & 1646)
2013 Boilermaker RCA, Innovation in Controls, Finalist | Crossroads Entrepreneurship | Newton Semi-finalist
2012 Boilermaker Entrepreneurship | Queen City EI | Curie Semi-finalist
2011 Boilermaker RCA, Entrepreneurship
Red Alert Robotics
Reply With Quote
  #5   Spotlight this post!  
Unread 30-09-2016, 11:38
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
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: Math Quiz 10

Quote:
Originally Posted by MechEng83 View Post
Ether,
are you just looking for "here's my answer" with work shown, or could we start posting "here's what I tried; here's what I've ruled out; I've got some speculation on how/what needs to be done"?
Thanks for bringing that up.

The answer is: a dialog is most welcome. Please do post your thoughts and ideas.

The purpose of these quizzes is to start a conversation from which both participants and readers can gain insight. The journey is as important as the goal.


Reply With Quote
  #6   Spotlight this post!  
Unread 30-09-2016, 12:21
MechEng83's Avatar
MechEng83 MechEng83 is offline
Lead Mentor/Engineer
AKA: Mr. Cool
FRC #1741 (Red Alert)
Team Role: Coach
 
Join Date: May 2011
Rookie Year: 2011
Location: Indiana
Posts: 616
MechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond repute
Re: Math Quiz 10

Quote:
Originally Posted by Ether View Post
... a dialog is most welcome. Please do post your thoughts and ideas.

The purpose of these quizzes is to start a conversation from which both participants and readers can gain insight. The journey is as important as the goal.


Thanks.

Ok, so here's what i've got:
The problem statement says a coordinate system exists, but it doesn't state if it's Cartesian, or polar, or maybe even something else. The equation is "simple" but something simple in a polar coordinate system can be complex in a Cartesian one. It's also undetermined what the origin of said system is.

I know it's not a circle (polar, r=constant). The perpendicular bisectors of each adjacent point segment aren't close to intersecting at a single point.

I tried rotating the points to get a good fit on a parabola, which would have a relatively simple equation, assuming the origin was on the vertex. The best I got was around 142.5 degrees clockwise, but that didn't quite match up.

Also, the radius of curvature appears to be increasing from the starting point until the ending point.

Other observations:
The points are not equidistant in spacing. The minimum distance appears to be around the 5th or 6th point.
I couldn't find a rotation which places the x or y coordinate in equal spacing in Cartesian coordinates.
__________________

2016 INWLA GP| INWCH Entrepreneurship | INPMH DCA | INCMP Team Spirit | CAGE Match Winner (w/ 1747 &868), Finalist (1471 w/ 1529 & 1018), Best Fans
2015 ININD Judges Award, Proud "Phyxed Red Card" alliance partners of 1529 & 1720 | INWLA EI | INCMP GP
2014 Boilermaker Creativity | Chesapeake Finalist, Safety, GP, Entrepreneurship | IN State Championship Winner (w/ 868 & 1018) | CAGE Match Winner (w/ 1024, 5402 & 1646)
2013 Boilermaker RCA, Innovation in Controls, Finalist | Crossroads Entrepreneurship | Newton Semi-finalist
2012 Boilermaker Entrepreneurship | Queen City EI | Curie Semi-finalist
2011 Boilermaker RCA, Entrepreneurship
Red Alert Robotics
Reply With Quote
  #7   Spotlight this post!  
Unread 30-09-2016, 12:30
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
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: Math Quiz 10

Quote:
Originally Posted by MechEng83 View Post
something simple in a polar coordinate system can be complex in a Cartesian one...

It's also undetermined what the origin of said system is...

the radius of curvature appears to be increasing from the starting point until the ending point...

The points are not equidistant in spacing...

I couldn't find a rotation which places the x or y coordinate in equal spacing in Cartesian coordinates...
Excellent observations. Reps to you!

Perhaps you (or someone else) can build on those observations.


Attached Thumbnails
Click image for larger version

Name:	reps.png
Views:	40
Size:	64.4 KB
ID:	21095  

Last edited by Ether : 30-09-2016 at 12:36.
Reply With Quote
  #8   Spotlight this post!  
Unread 30-09-2016, 12:52
Caleb Sykes's Avatar
Caleb Sykes Caleb Sykes is offline
Registered User
FRC #4536 (MinuteBots)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2009
Location: St. Paul, Minnesota
Posts: 1,054
Caleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond repute
Re: Math Quiz 10

Hmm... Intriguing.
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	39
Size:	12.1 KB
ID:	21096  
Reply With Quote
  #9   Spotlight this post!  
Unread 30-09-2016, 13:02
BMiller2559 BMiller2559 is offline
New Guy
FRC #2559 (Normality Zero)
Team Role: Mentor
 
Join Date: Apr 2015
Rookie Year: 2015
Location: Harrisburg PA
Posts: 18
BMiller2559 is a glorious beacon of lightBMiller2559 is a glorious beacon of lightBMiller2559 is a glorious beacon of lightBMiller2559 is a glorious beacon of lightBMiller2559 is a glorious beacon of light
Re: Math Quiz 10

Quote:
Originally Posted by MechEng83 View Post
Thanks.

Also, the radius of curvature appears to be increasing from the starting point until the ending point.

Perhaps some sort of spiral equation?
Reply With Quote
  #10   Spotlight this post!  
Unread 30-09-2016, 13:44
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
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: Math Quiz 10

Quote:
Originally Posted by MechEng83 View Post
...the radius of curvature appears to be increasing from the starting point until the ending point.
Quote:
Originally Posted by BMiller2559 View Post
Perhaps some sort of spiral equation?
OK, so how to further explore that hypothesis?


Attached Thumbnails
Click image for larger version

Name:	hypothesis.png
Views:	21
Size:	4.2 KB
ID:	21097  

Last edited by Ether : 30-09-2016 at 15:33.
Reply With Quote
  #11   Spotlight this post!  
Unread 30-09-2016, 18:30
MechEng83's Avatar
MechEng83 MechEng83 is offline
Lead Mentor/Engineer
AKA: Mr. Cool
FRC #1741 (Red Alert)
Team Role: Coach
 
Join Date: May 2011
Rookie Year: 2011
Location: Indiana
Posts: 616
MechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond repute
Re: Math Quiz 10

I haven't had time to work this out thoroughly, but if the points are equally spaced in the theta direction of a polar coordinate system, I think you could derive the coordinate system origin.

with playing around with a spreadsheet, I think it's in the vicinity of 0.86,-0.51 and the theta interval is 0.025 radians.
as far as taking a swag at the final answer, since it's supposedly "simple" I'm going to guess r=theta.

More rigorous work will follow soon, hopefully.
__________________

2016 INWLA GP| INWCH Entrepreneurship | INPMH DCA | INCMP Team Spirit | CAGE Match Winner (w/ 1747 &868), Finalist (1471 w/ 1529 & 1018), Best Fans
2015 ININD Judges Award, Proud "Phyxed Red Card" alliance partners of 1529 & 1720 | INWLA EI | INCMP GP
2014 Boilermaker Creativity | Chesapeake Finalist, Safety, GP, Entrepreneurship | IN State Championship Winner (w/ 868 & 1018) | CAGE Match Winner (w/ 1024, 5402 & 1646)
2013 Boilermaker RCA, Innovation in Controls, Finalist | Crossroads Entrepreneurship | Newton Semi-finalist
2012 Boilermaker Entrepreneurship | Queen City EI | Curie Semi-finalist
2011 Boilermaker RCA, Entrepreneurship
Red Alert Robotics
Reply With Quote
  #12   Spotlight this post!  
Unread 01-10-2016, 00:06
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,614
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Math Quiz 10

I had the same idea as MechEng83 last night, then started with his solution this evening (also in a spreadsheet, which I cleaned up just a bit and posted). My goal was to minimize the ratio of the standard deviation of the angle with its mean. (Actually, I used the sine of the angle, much easier to calculate with a cross product.) The point kept marching up and to the right. I eventually hit paydirt.

The center point where all of the angular displacements are the same is
(1.16, -0.3)
At this point, the angular displacements are all exactly 1 degree (to within the precision of the numbers as given). Using the mathematical convention (x axis is 0 degrees and the y axis is 90 degrees), the points span the range from 139 to 199 degrees, inclusive.

While the radial function increases monotonically as the points are given, it appears to be somewhat concave down. Of the stock excel fits, polynomial (quadratic by default) is better than the others, but is not an exact match.

An explanation of the spreadsheet is in order. The top two rows were used to create the "origin" for the polar coordinate system. Each cell to the right of C1 and C2 was added with another power of 1/10 to create C1 and C2. This let me manually migrate towards a minimum value for the scaled deviation. Row3 just has the results I was trying to optimize on. Row 4 is headers for the table. Below this, columns A and B are Ether's data. Column C is the distance from the origin (not used). Columns D and E are the x and y values relative to the origin specified by (C1,C2). Column F is the distance of the point from the point (C1,C2). Column G is the change in the sine of the angle from (C1,C2) to this point and the next. Column H is the angle in degrees from (C1,C2) to Ether's point, x towards y, in the range from 0 to 360.

OBTW, I've been working MQ9 for the cube extension off and on. I think I have all of the terms integrated on scratch paper, but I'm still writing them up and checking. I definitely have the mean distance from the origin to an arbitrary point complete, but the random line has eight times as many terms to start, and several of those are quite a bit nastier than the distance from the origin.
Attached Files
File Type: xlsx MQ10-polar-origin.xlsx (28.3 KB, 5 views)
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.

Last edited by GeeTwo : 01-10-2016 at 00:28. Reason: Last two paragraphs, and removing redundancy.
Reply With Quote
  #13   Spotlight this post!  
Unread 01-10-2016, 10:49
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
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: Math Quiz 10

Quote:
Originally Posted by GeeTwo View Post

The center point where all of the angular displacements are the same is (1.16, -0.3).

At this point, the angular displacements are all exactly 1 degree.

Using the mathematical convention (x axis is 0 degrees and the y axis is 90 degrees), the points span the range from 139 to 199 degrees, inclusive.

Impressive work Gus.

Quote:
Of the stock excel fits, polynomial (quadratic by default) is better than the others, but is not an exact match.
Try rotating the polar axis and fitting the power function r = θb


Attached Thumbnails
Click image for larger version

Name:	rotated polar axis.png
Views:	14
Size:	6.5 KB
ID:	21103  

Last edited by Ether : 01-10-2016 at 11:18.
Reply With Quote
  #14   Spotlight this post!  
Unread 01-10-2016, 22:01
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
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: Math Quiz 10


Using the analysis results from Gus' last post, and the hint in post 13, the final solution step is quite straightforward.

Open a LibreOffice spreadsheet and populate columns A and B with the XY data. Label the data in column A x_data. Label the data in column B y_data.

In column C put degrees from 139 to 199 stepping by 1.

In column D put radians equivalent of column C: colD=colC/180*pi()

Initialize cell O2 to zero

Label cell P2 "_b" and initialize it to one.

Label cell L2 "_a" and put the formula = O2/180*pi()

In column E put the 2-parameter polar equation model:
r = (colD - _a)^_b

In column G put formula colE*COS(colD)+1.16
Label the data cells in this column x_model

In column H put the formula colE*SIN(colD)-0.3
Label the data cells in this column y_model

In cell M2 put the formula SUMXMY2(x_data,x_model) + SUMXMY2(x_data,x_model). This is the objective function for the Solver.

Tools | Solver
Target Cell M2
Minimum
By changing cells O2 : P2
Solve
click continue a couple of times to refine the value


Reply With Quote
  #15   Spotlight this post!  
Unread 02-10-2016, 03:38
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,614
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Math Quiz 10

When I saw θb, my mind read "theta flat" .

In any case, I found the answer a different way:
Assuming that r=θb, we know that dr/dθ = bθb-1, so that r/(dr/dθ) = θ/b. I therefore calculated the slope of r using the numbers given. The intercept of the line with r=0 is therefore (a good approximation to) θ0, and the slope is (approximately) 1/b. My spreadsheet gave a θ0 of 2.007223652 radians, or 115.0054438 degrees, and a b=0.499973651. These did not work out exactly, but a bit of tweaking found that 115 degrees and 0.5 worked "exactly".

Using the mathematical polar coordinate system centered on 1.16, -0.3 and rotated 115 degrees counterclockwise, the equation is simply:
r = √θ
Going back to calculate the original series:
D = [139..199]
θ1 = D * π / 180
θ = (D-115) * π / 180
r = √θ
x = cosθ1 + 1.16
y = sinθ1 - 0.3
An updated spreadsheet with a "double check" tab is attached. The maximum error in the reconstructed x and y is less than 10-14.
Attached Files
File Type: xlsx MQ10-polar-origin.xlsx (46.7 KB, 2 views)
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
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 07:32.

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