Go to Post There is nothing that compares to the smell of burning flesh, especially when it is your own. - Al Skierkiewicz [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 53 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #19   Spotlight this post!  
Unread 19-11-2011, 01:19
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,083
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: Autonomous: Mixing Drive Distance PID's with Turn Angle PID's.



The Victor data from the link Joe provided:
Code:
pulse		volts
1.04		-12
1.07		-11.99
1.12		-11.7
1.27		-11.27
1.36		-10.12
1.41		-8.52
1.46		-3.8
1.48		-0.8
1.49		0
1.55		0
1.56		0.8
1.58		2.8
1.6		5.4
1.65		8.9
1.7		10.1
1.75		10.87
1.8		11.25
1.85		11.55
1.9		11.8
2		12
...normalized to +/-1:
Code:
cmd		out
-1		-1
-0.9375		-0.999166667
-0.833333333	-0.975
-0.520833333	-0.939166667
-0.333333333	-0.843333333
-0.229166667	-0.71
-0.125		-0.316666667
-0.083333333	-0.066666667
-0.0625		0
0.0625		0
0.083333333	0.066666667
0.125		0.233333333
0.166666667	0.45
0.270833333	0.741666667
0.375		0.841666667
0.479166667	0.905833333
0.583333333	0.9375
0.6875		0.9625
0.791666667	0.983333333
1		1
Swap the command and the output
(to get inverse function for linearization)
and select only the positive commands:
Code:
out		cmd
0		0.0625
0.066666667	0.083333333
0.233333333	0.125
0.45		0.166666667
0.741666667	0.270833333
0.841666667	0.375
0.905833333	0.479166667
0.9375		0.583333333
0.9625		0.6875
0.983333333	0.791666667
1		1

Fit a rational function model to the data:
Code:
(p1*x^4+p2*x^3+p3*x^2+p4*x+p5) / (x^2+p6*x+p7)
Here are the p1..p7 model parameters:
Code:
-0.43231217703332, 1.136975493080563, -1.043577770662604, 0.26894582879701, 0.069994693624, -2.151432791900253,  1.151458861241842
Attached graph shows the actual data (blue), the model (red), and the error (green). The error is multiplied by 10 to make it visible. The maximum error is 0.01 (1% of full scale).



Attached Thumbnails
Click image for larger version

Name:	rational plot.png
Views:	71
Size:	13.9 KB
ID:	11100  
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 00:51.

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