Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

matlab/wheelPLL.m File Reference

Go to the source code of this file.

Functions

 encDot (2:rows,:)
 fvtool (h2, 1)%filter encDot b
 figure (i+cols *2) hold off
 plot (encData(:, i), encDot(:, i),'-r')
 results (i, j)
end figure (i) hold off
 plot (2 *pi *[1:steps]/steps, results(i,:))
 figure (9)
 plot (encData(:, 1), encDot(:, 1),'-r')
 plot (encData(:, 1), y,'-b')
 plot (encData(:, 1), encDot(:, 1)-y,'-k')
 plot ([1:rows], encDot(:, 1).*y,'-k')
 results2 (i, j)
end figure (i+cols) hold off
 plot (amplitudeMax *[1:steps]/steps, results2(i,:))

Variables

 function [phases, amplitudes]
 fl
 br
bl returns phases of wheels
and amplitudes of wheels such 
that
make sure cols are data for
each 
encoder [rows, cols]
 n = 100
 f = [0, 0.03, 0.12, 1]
 a = [0,1,0]
 up = [ 0.01, 1.1, 0.1]
 lo = [-0.01, 0.9, -0.1]
 h1 = fircls(n,f,a,up,lo)
 h2 = fir1(n,f)
for i
 x = filter(h2,1,encData(:,i))
hold on
end make a avg of each row
of data 
encAvg = sum(encData,2) / cols
for each cols(each encoder amplitudes ) = ones(cols,1)
 results = zeros(cols,steps)
 results2 = zeros(cols,steps)
 y = encDot(:,i) - cos(2*pi*encData(:,i)/ticksPerRevolution + phase)
 end [value, index] = min(results')
 phases = 2*pi * index/steps
hold off


Function Documentation

encDot 2:rows  ,
 

end figure i cols  ) 
 

figure  ) 
 

end figure i   ) 
 

figure i+cols *  2  ) 
 

fvtool h2  ,
 

plot amplitudeMax */  steps[1:steps],
results2(i,:) 
 

plot encDot(:, 1).*  y,
'-k' 
 

plot encData(:, 1)  ,
encDot(:, 1)-  y,
'-k' 
 

plot encData(:, 1)  ,
,
'-b' 
 

plot encData(:, 1)  ,
encDot(:, 1)  ,
'-r' 
 

plot 2 *pi */  steps[1:steps],
results(i,:) 
 

plot encData(:, i ,
encDot(:, i ,
'-r' 
 

results i  ,
 

results2 i  ,
 


Variable Documentation

a = [0,1,0]
 

Definition at line 29 of file wheelPLL.m.

Referenced by main().

for each cols (each encoder amplitudes) = ones(cols,1)
 

Definition at line 65 of file wheelPLL.m.

br
 

Definition at line 1 of file wheelPLL.m.

end make a avg of each row of data encAvg = sum(encData,2) / cols
 

Definition at line 57 of file wheelPLL.m.

make sure cols are data for each encoder[rows, cols]
 

Initial value:

 size(encData)

if rows < cols 
    encData = encData'

Definition at line 15 of file wheelPLL.m.

end[value, index] = min(results')
 

Definition at line 80 of file wheelPLL.m.

f = [0, 0.03, 0.12, 1]
 

Definition at line 28 of file wheelPLL.m.

Referenced by Joystick::display(), display(), main(), fhwInterface::setAdjustedSCPower(), hwInterface::setAdjustedSCPower(), and setAdjustedSCPower().

fl
 

Definition at line 1 of file wheelPLL.m.

function[phases, amplitudes]
 

Initial value:

 wheelPLL(encData,steps,amplitudeMax)
% function [frP,flP,brP,blP] = trucksim(fr,fl,br,bl)
%
% determines phase and amplitudes on fr

Definition at line 1 of file wheelPLL.m.

h1 = fircls(n,f,a,up,lo)
 

Definition at line 32 of file wheelPLL.m.

h2 = fir1(n,f)
 

Definition at line 37 of file wheelPLL.m.

for i
 

Initial value:

 [1:cols]
    encDot(:,i) = filter(h1,1,encDot(:,i))

Definition at line 42 of file wheelPLL.m.

lo = [-0.01, 0.9, -0.1]
 

Definition at line 31 of file wheelPLL.m.

n = 100
 

Definition at line 27 of file wheelPLL.m.

Referenced by main().

hold off
 

Definition at line 84 of file wheelPLL.m.

hold on
 

Definition at line 48 of file wheelPLL.m.

phases = 2*pi * index/steps
 

Definition at line 81 of file wheelPLL.m.

results = zeros(cols,steps)
 

Definition at line 66 of file wheelPLL.m.

results2 = zeros(cols,steps)
 

Definition at line 67 of file wheelPLL.m.

bl returns phases of wheels and amplitudes of wheels such that
 

Definition at line 1 of file wheelPLL.m.

up = [ 0.01, 1.1, 0.1]
 

Definition at line 30 of file wheelPLL.m.

x = filter(h2,1,encData(:,i))
 

Definition at line 44 of file wheelPLL.m.

Referenced by GuiClientFrame::OnSocket().

y = encDot(:,i) - cos(2*pi*encData(:,i)/ticksPerRevolution + phase)
 

Definition at line 72 of file wheelPLL.m.


Generated on Fri Sep 1 14:25:55 2006 for Raptor by  doxygen 1.4.4