Go to Post that....was more far-fetched than the tennis ball I threw for my dog earlier today... - TeknicllyInsane [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
  #31   Spotlight this post!  
Unread 07-10-2013, 22:12
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,088
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: calculating position using follower wheels

Quote:
Originally Posted by flameout View Post
this is way too easy when all I need to do is change a script I already wrote.
Yeah; I had already prepared Question 6 back when everyone was using a closed-form analytical solution for Q(t). You beat me to the punch by setting up your numerical integration script.


Question 6 solution:
Spoiler for solution:
Position: ( -3.7271, -4.0749)
Distance: 60.8613
I think you are showing more decimal places than are warranted for the accuracy of your solution method. I'm differing from you in the third decimal place for X and Y. Compiled C on 8-year-old 32-bit Windows XP machine takes roughly 40ms to compute.

Can someone else weigh in with their numbers for this?


Reply With Quote
  #32   Spotlight this post!  
Unread 07-10-2013, 22:28
flameout flameout is offline
AKA Ryan Van Why
FRC #0957 (SWARM)
Team Role: Alumni
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Oregon
Posts: 168
flameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to all
Re: calculating position using follower wheels

Quote:
Originally Posted by Ether View Post
Yeah; I had already prepared Question 6 back when everyone was using a closed-form analytical solution for Q(t). You beat me to the punch by setting up your numerical integration script.
Makes sense.

Quote:
Originally Posted by Ether
Question 6 solution:
Spoiler for solution:
Position: ( -3.7271, -4.0749)
Distance: 60.8613
I think you are showing more decimal places than are warranted for the accuracy of your solution method.
I never bothered to do any accuracy analysis, so that's probably the case.

After lowering the tolerances and calculating bounds for the error (total error should be less than 1e-7), I got the following revised figures:
Spoiler for solution:
Position: (-3.7350, -4.0685)
Distance: 60.8668

New parameters and error analysis:
Relative and absolute tolerances set to 10^-12 (previously 10^-6): The error at each step should not exceed max(10^-12, |x * 10^-12|), where x is the current value of the ODE solution
Number of ODE solver steps: 1022
Maximum element of the state: 60.8668
Upper bound for error: max(10^-12, |60.8668 * 10^-12|) * 1022 = 6.2267e-08
Reply With Quote
  #33   Spotlight this post!  
Unread 07-10-2013, 23:10
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,088
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: calculating position using follower wheels

Quote:
Originally Posted by flameout View Post
After lowering the tolerances and calculating bounds for the error (total error should be less than 1e-7), I got the following revised figures...
Spoiler for solution:
Position: (-3.7350, -4.0685)
Distance: 60.8668
That matches my results out to the number of decimal places shown, except I'm getting a 6 instead of a 5 in the fourth decimal place of the Y value.


Reply With Quote
  #34   Spotlight this post!  
Unread 08-10-2013, 00:10
flameout flameout is offline
AKA Ryan Van Why
FRC #0957 (SWARM)
Team Role: Alumni
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Oregon
Posts: 168
flameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to all
Re: calculating position using follower wheels

Quote:
Originally Posted by Ether View Post
That matches my results out to the number of decimal places shown, except I'm getting a 6 instead of a 5 in the fourth decimal place of the Y value
I re-ran my script once for each of MATLAB's ODE solvers, adjusting the tolerances as necessary to get a reasonable solve time.

Every solver agreed through the fifth decimal place (for the Y value). The stiff solvers needed significantly larger error tolerances and took more steps; their predicted error was much higher.

The nonstiff solvers all agreed through the seventh decimal place.

The lowest predicted error was obtained through the ode113 solver, using a relative tolerance of 100 * epsilon and an absolute tolerance of 10^-12. According to my error estimate, all of the following digits are correct:

Spoiler for solution:
Position: (-3.73497544, -4.06852591)
Distance: 60.86682701


It was interesting going through all the solvers -- many of the stiff solvers had error estimates in excess of 10^-4. I guess this shows that the choice of solver really can have an effect on the error, and not just the solution time.
Reply With Quote
  #35   Spotlight this post!  
Unread 08-10-2013, 00:50
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,088
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: calculating position using follower wheels

Quote:
Originally Posted by flameout View Post
Every solver agreed through the fifth decimal place (for the Y value).
The rotate_CW function has some nasty behavior near zero. So I tried replacing the numerical integration of that function in the region T<0.01 with an analytic solution of a 3rd order Taylor expansion. I'm now matching your results with a time step of 1 microsecond.

Bleary-eyed, time to call it quits for the night.


Reply With Quote
  #36   Spotlight this post!  
Unread 01-11-2013, 17:53
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,088
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: calculating position using follower wheels


The large black rectangle in the attached sketch represents a top view of a robot.

The forward direction of the robot is upwards in the sketch.

The 4 red arrows represent 4 unpowered instrumented (with encoders) omni follower wheels. For each of the wheels, the arrow points in the + direction for that wheel.


Question7

Find the formula for the FWD (forward), STR (strafe right), and RCW (rotate clockwise) robot motions in terms of the X1, Y1, X2, and Y2 wheel speeds.


Attached Thumbnails
Click image for larger version

Name:	4followers.png
Views:	26
Size:	4.2 KB
ID:	15389  
Reply With Quote
  #37   Spotlight this post!  
Unread 01-11-2013, 18:39
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: calculating position using follower wheels

Spoiler for Question 7:
FWD=(Y1+Y2)/2
STR=(X1+X2)/2
RCW=(X1-X2)/L=(Y2-Y1)/W
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor

Last edited by RyanCahoon : 01-11-2013 at 19:35. Reason: had the rotation sign inverted
Reply With Quote
  #38   Spotlight this post!  
Unread 01-11-2013, 19:51
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,088
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: calculating position using follower wheels

Quote:
Originally Posted by RyanCahoon View Post
Spoiler for Question 7:
FWD=(Y1+Y2)/2
STR=(X1+X2)/2
RCW=(X1-X2)/L=(Y2-Y1)/W
Looks good to me. Anybody disagree or have questions?


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:58.

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