Skip to content

Commit

Permalink
Changed the plot_gains function some.
Browse files Browse the repository at this point in the history
  • Loading branch information
moorepants committed Dec 29, 2011
1 parent c6c010e commit 15fe52f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
1 change: 1 addition & 0 deletions gains/BenchmarkSteerGains.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ speed,kDelta,kPhiDot,kPhi,kPsi,kY
4.800,44.6406,-0.0529,13.2253,0.1720,0.1001
5.000,46.5457,-0.0522,12.6611,0.1480,0.0767
8.000,74.9880,-0.0400,9.3510,0.4340,0.0600
8.340,78.2238,-0.0388,9.2493,0.4676,0.0571
12.000,115.3790,-0.0290,9.2800,0.8550,0.0400
1 change: 0 additions & 1 deletion gains/RigidJasonSteerGains.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ speed,kDelta,kPhiDot,kPhi,kPsi,kY
3.636,34.8024,-0.0761,13.9754,0.1000,0.1390
3.712,35.6191,-0.0757,13.5977,0.1029,0.1362
3.788,36.4436,-0.0754,13.2236,0.1059,0.1336
3.807,37.5000,-0.0800,47.2000,0.0951,0.7475
3.850,37.1241,-0.0751,12.9317,0.1083,0.1314
3.852,37.1407,-0.0751,12.9256,0.1084,0.1314
3.864,37.2730,-0.0750,12.8769,0.1088,0.1310
Expand Down
24 changes: 18 additions & 6 deletions plot_gains.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,21 @@ function plot_gains(pathToGainFile)

[numSpeeds, numCols] = size(data.data);

for i=2:numCols
subplot(numCols - 1, 1, i - 1)
plot(data.data(:, 1), data.data(:, i), '.')
ylabel(data.colheaders{i})
xlabel('Speed [m/s]')
end
figure()
subplot(2, 1, 1)
hold all
plot(data.data(:, 1), data.data(:, 2), '-')
plot(data.data(:, 1), data.data(:, 4), '-')
hold off
ylabel('Gain')
legend('k_\delta', 'k_\phi')

subplot(2, 1, 2)
hold all
plot(data.data(:, 1), data.data(:, 3), '-')
plot(data.data(:, 1), data.data(:, 5), '-')
plot(data.data(:, 1), data.data(:, 6), '-')
hold off
legend('$\dot{\phi}$', 'k_\psi', 'k_{y_d}', 'Interpreter', 'latex')
ylabel('Gain')
xlabel('Speed [m/s]')

0 comments on commit 15fe52f

Please sign in to comment.