Code covered by the BSD License  

Highlights from
Simultaneous Plant and Control Design of an Active Automotive Suspension Using Direct Transcription

image thumbnail

Simultaneous Plant and Control Design of an Active Automotive Suspension Using Direct Transcription

by

 

A toolbox for using Direct Transcription to perform combined plant and control design.

calc_zdot(x, z, v)
function out = calc_zdot(x, z, v)
% Calculate dz/dt from z-t data.
n = length(x);
t = zeros(length(x),1);
zdot = zeros(length(x)-1, 1);
for i=2:n
    dist = sqrt((z(i) - z(i-1))^2 + (x(i)-x(i-1))^2);
    t(i) = t(i-1) + dist/v;
    zdot(i-1) = (z(i) - z(i-1))/(t(i) - t(i-1));
end

out = struct('t', t, 'u', zdot);

end

Contact us