Models
The method of least squares is a standard approach to the approximate solution of overdetermined systems, i.e., sets of equations in which there are more equations than unknowns. "Least squares" means that the overall solution minimizes the sum of the squares of the errors made in the results of every single equation.
we can then see that in that case the least square estimate (or estimator, in the context of a random sample),
is given by
For a derivation of this estimate see Linear least squares (mathematics).
Simulated Cut Acceleration (Flapping Freq= 5.6 Hz)
clear
clc
% For 1/2 throttle in Shigeoka MS thesis, at 5.6hz
t=[0:.0001:.5];
% a(t) = sum cos(wi*t+phi), i = 0 to n
% first 5 n values are listed here:
a= 594.2*cos(2*pi*0.*t+0)+...
230.9*cos(2*pi*5.6.*t+1.7)+...
511.1*cos(2*pi*11.3.*t+2.9)+...
25*cos(2*pi*16.9.*t+2.4)+...
25*cos(2*pi*22.5.*t-2);...
% Next 5 n values are unknown?
%Digitized plot of cut accel for
%flap freq at 5.6 hz
figure(1)
plot(t,a/500 -0.9)
grid on
ylabel('acceleration(m/s^2)')
xlabel('Time(sec)')
%%
%%%%Digitized filtered Acceleration data from Shigeoka
%%%% MS thesis page 7, 4/4/13, for 3/4 throttle or max throttle
t=[0:0.001:0.8]
a=[2.001 2.008 2.016 2.022 2.028 2.035 2.041 2.075 2.086 2.095 2.101 2.109 2.206 2.305 2.404 2.506 3.003 3.012......
3.026 3.036 3.044 3.052 3.061 3.076 3.083 3.099 3.106 3.205 3.320 3.460 3.520 3.620 3.760 3.809 3.999 4.009 4.018 4.065.......
4.098 4.223 4.451 4.852 4.876 4.898 4.903 4.926 4.998 5.003 5.016 5.026 5.046 5.086 5.120 5.223 5.445 5.652 .......
5.785 5.785 5.652 5.543 5.431 5.321 5.211 5.101 5.009 4.456 4.362 4.121 4.002 3.678 3.654 3.541 3.210 3.001 2.987 2.951 ........
2.765 2.542 2.321 2.123 2.002 1.998 1.956 1.845 1.122 1.026 1.001 0.998 0.956 0.945 0.932 0.921 0.910 0.887...
2.1 2.01 2.001 2.2 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 2.333 2.345 2.366...
2.37 2.38 2.39 2.40 2.44 2.45 2.46 2.47 2.48 2.49 2.6 2.7 2.8 2.9 3.0 3.001 3.002 3.01 3.02 3.003...
2.999 2.98 2.987 2.900 2.80 2.7 2.6 2.5 2.4 2.3 2.2 0 0.9 0.8 0.7 0.8 -1 -1.1 -1.111 -1.2...
-1.22 -1.23 -1.24 -1.25 -1 .9 -.8 .7 .5 .4 .3 .2 0 0 0.1 0.2 0.3 0.444 0.45 0.46...
0.47 0.48 0.49 0.50 0.51 0.53 0.54 0.55 0.56 .7 .81 .8 .9 .99 1 0.6 0.5 0.4 0.33 0.2222 0.1...
0 0.1 0.112 0.52 0.789 0.89 0.900 0.912 0.913 1.00 1.2 1.11 1.23 1.4 1.32 1.5 1.55 1.56 1.57...
1.58 2.5 1.543 1.2 1.1 1.0 1.01 .99 0.823 0.7 0.4 0.3 0.2 0.1 -.9 -.8 -.803 -.805 -.0800 -.79...
0.15 .3 .45 .6 .9 1.25 1.5 1.8 2.3 2.5 2.8 3.0 3.1 3.11 3.12 3.13 3.2 3.3 3.44 3.5 3.6...
3.6 3.5 3.3 2.9 2.8 2.7 2.6 2.59 2.58 2.3 2 1.9 1.4 1.2 1 -.9 -.8 -.5 -.51 -.50...
-.50 -.50 -.52 -.4 -.2 -.1 0 1 1.1 1.2 1.3 1.4 1.5 1.6 2 2.1 2.5 3 3.4 3.5 3.6...
3.6 3.7 3.8 3.9 4 4.1 4.11 4.12 4.13 4.14 4.2 4.23 4.4 4.5 4.6 4.7 4.8 4.9 4.9 4.9...
4.9 4.8 4.7 4.6 4.5 4.4 4.3 4.2 4.1 4.0 3.9 3.8 3.7 3.7 3.7 3.7 3.7 3.8 3.8 3.8...
3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3 2.8 2.6 2.4 2.2 2 1.5 1.2 1 .5 0 -.9 -.8 -.8 -.8...
-.8 -.7 -.5 -.4 -.32 -.2 0 .1 .12 .13 .14 .15 .16 2.0 2.1 2.2 2.44 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.5 3.6 3.7 3.8 3.9 4.0...
4.0 4.0 4.0 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.9 2.8 2.4 2.3 2.2 2.1...
2.1 2.0 1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2 1.1 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1...
0.9 0.8 0 -.1 -.2 -.3 -.5 -.5 -.5 -.5 -.4 -.2 -.1 0 0 0 0 0.9 1 1.1 1.2 1.3...
1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2 1.11 1.1 1 0.9 0.8 0.7 0.6 0.5 .4 .3 .2 0.1 0.1...
-.1 -.5 -.6 -.7 -.8 -.9 -1 -2 -2 -2 - -1 0 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.7...
1.7 1.8 1.8 1.9 1.9 1.91 1.92 1.93 1.94 1.95 1.96 1.97 1.9 2 2.1 2.22 2.3 2.4...
2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.33 3.4 3.5 3.6 3.7 4.0 4.0 4.0 4.0 3.9 3.9...
3.9 3.8 3.7 3.6 3.55 3.5 3.4 3.3 3.2 3.1 3.0 2.9 2.8 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 2.3]
figure(2)
plot(t,a)
xlabel('Time (seconds)','fontsize',12,'fontweight','b','color','r');
ylabel('Filtered Acceleration (m/s^2)','fontsize',12,'fontweight','b','color','r');
suptitle('Shigeoka Simulated filtered Acceleration for 3/4 max throttle');
%%
%%%%Digitized Cut Acceleration Plot from Shigeoka
%%%% MS thesis page 12, 4/4/13
t=[0:0.005:0.5]
a=[-1.2 -1.1 -0.9 0 0.3 0.9 0.8 0.75 0.5 0.5...
.5 0.6 0.75 1 1.5 1.6 1.5 1.4 1.3 1 ...
1 0.5 0.4 0.2 1.5 2.3 2.2 2.1 2.0 1.6...
1.6 1.2 1.5 1.2 0.5 -.5 -1 -.5 0 0.3...
0.3 .5 .2 0.2 0.5 1.3 1.2 1.1 0.8 0.5...
0.5 0 0.1 0.3 0.4 0.5 0.3 0.2 0.1 0.2...
0 -0.1 -.5 -1 -.9 -.5 -0.2 -0.1 0 0.1 ...
0.1 0.2 0.4 0.5 0.4 0.3 0.1 0.1 0 0 ...
0.1 0.2 0.3 0.4 0.5 1 1.5 1 0.9 0 ...
0 0.4 0.5 0.6 1 1.2 2 1.9 1.5 1 ...
1.2 ]
figure(3)
plot(t,a)
xlabel('Time (seconds)','fontsize',12,'fontweight','b','color','r');
ylabel('Cut Acceleration (m/s^2)','fontsize',12,'fontweight','b','color','r');
suptitle('Shigeoka Simulated cut Acceleration for flapping freq of 5.6 hz');
Throttle Data
Delta = 0.001
t=[0:0.001:0.8]
a=[2.001 2.008 2.016 2.022 2.028 2.035 2.041 2.075 2.086 2.095 2.101 2.109 2.206 2.305 2.404 2.506 3.003 3.012......
3.026 3.036 3.044 3.052 3.061 3.076 3.083 3.099 3.106 3.205 3.320 3.460 3.520 3.620 3.760 3.809 3.999 4.009 4.018 4.065.......
4.098 4.223 4.451 4.852 4.876 4.898 4.903 4.926 4.998 5.003 5.016 5.026 5.046 5.086 5.120 5.223 5.445 5.652 .......
5.785 5.785 5.652 5.543 5.431 5.321 5.211 5.101 5.009 4.456 4.362 4.121 4.002 3.678 3.654 3.541 3.210 3.001 2.987 2.951 ........
2.765 2.542 2.321 2.123 2.002 1.998 1.956 1.845 1.122 1.026 1.001 0.998 0.956 0.945 0.932 0.921 0.910 0.887...
2.1 2.01 2.001 2.2 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 2.333 2.345 2.366...
2.37 2.38 2.39 2.40 2.44 2.45 2.46 2.47 2.48 2.49 2.6 2.7 2.8 2.9 3.0 3.001 3.002 3.01 3.02 3.003...
2.999 2.98 2.987 2.900 2.80 2.7 2.6 2.5 2.4 2.3 2.2 0 0.9 0.8 0.7 0.8 -1 -1.1 -1.111 -1.2...
-1.22 -1.23 -1.24 -1.25 -1 .9 -.8 .7 .5 .4 .3 .2 0 0 0.1 0.2 0.3 0.444 0.45 0.46...
0.47 0.48 0.49 0.50 0.51 0.53 0.54 0.55 0.56 .7 .81 .8 .9 .99 1 0.6 0.5 0.4 0.33 0.2222 0.1...
0 0.1 0.112 0.52 0.789 0.89 0.900 0.912 0.913 1.00 1.2 1.11 1.23 1.4 1.32 1.5 1.55 1.56 1.57...
1.58 2.5 1.543 1.2 1.1 1.0 1.01 .99 0.823 0.7 0.4 0.3 0.2 0.1 -.9 -.8 -.803 -.805 -.0800 -.79...
0.15 .3 .45 .6 .9 1.25 1.5 1.8 2.3 2.5 2.8 3.0 3.1 3.11 3.12 3.13 3.2 3.3 3.44 3.5 3.6...
3.6 3.5 3.3 2.9 2.8 2.7 2.6 2.59 2.58 2.3 2 1.9 1.4 1.2 1 -.9 -.8 -.5 -.51 -.50...
-.50 -.50 -.52 -.4 -.2 -.1 0 1 1.1 1.2 1.3 1.4 1.5 1.6 2 2.1 2.5 3 3.4 3.5 3.6...
3.6 3.7 3.8 3.9 4 4.1 4.11 4.12 4.13 4.14 4.2 4.23 4.4 4.5 4.6 4.7 4.8 4.9 4.9 4.9...
4.9 4.8 4.7 4.6 4.5 4.4 4.3 4.2 4.1 4.0 3.9 3.8 3.7 3.7 3.7 3.7 3.7 3.8 3.8 3.8...
3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3 2.8 2.6 2.4 2.2 2 1.5 1.2 1 .5 0 -.9 -.8 -.8 -.8...
-.8 -.7 -.5 -.4 -.32 -.2 0 .1 .12 .13 .14 .15 .16 2.0 2.1 2.2 2.44 2.24 2.5 2.5...
2.5 2.44 2.43 2.42 2.40 2.41 2.40 2.39 2.38 2.37 2.36 2.365 2.34 2.33 2.22 2.21 2.2 2.2...
2.2 2.1 2.0 1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2 1.1 1.0 0.7 0.6 0.5 0.4 0.3 0.2...
0.2 0.2 0.2 0.3 0.4 0.8 1 1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0.8 0 -.1 -.2 -.3 -.5 -.5 -.5 -.5 -.4 -.2 -.1 0 0 0 0 0.9 1 1.1 1.2 1.3...
1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2 1.11 1.1 1 0.9 0.8 0.7 0.6 0.5 .4 .3 .2 0.1 0.1...
-.1 -.5 -.6 -.7 -.8 -.9 -1 -2 -2 -2 - -1 0 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.7...
1.7 1.8 1.8 1.9 1.9 1.91 1.92 1.93 1.94 1.95 1.96 1.97 1.9 2 2.1 2.22 2.3 2.4...
2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.33 3.4 3.5 3.6 3.7 4.0 4.0 4.0 4.0 3.9 3.9...
3.9 3.8 3.7 3.6 3.55 3.5 3.4 3.3 3.2 3.1 3.0 2.9 2.8 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 2.3]
plot(t,a)
plot(t,a)
%%
delt= 0.001;
t=[0:0.001:0.8] % 801 points
a=[2.001 2.008 2.016 2.022 2.028 2.035 2.041 2.075 2.086 2.095 2.101 2.109 2.206 2.305 2.404 2.506 3.003 3.012......
3.026 3.036 3.044 3.052 3.061 3.076 3.083 3.099 3.106 3.205 3.320 3.460 3.520 3.620 3.760 3.809 3.999 4.009 4.018 4.065.......
4.098 4.223 4.451 4.852 4.876 4.898 4.903 4.926 4.998 5.003 5.016 5.026 5.046 5.086 5.120 5.223 5.445 5.652 .......
5.785 5.785 5.652 5.543 5.431 5.321 5.211 5.101 5.009 4.456 4.362 4.121 4.002 3.678 3.654 3.541 3.210 3.001 2.987 2.951 ........
2.765 2.542 2.321 2.123 2.002 1.998 1.956 1.845 1.122 1.026 1.001 0.998 0.956 0.945 0.932 0.921 0.910 0.887...
2.1 2.01 2.001 2.2 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 2.333 2.345 2.366...
2.37 2.38 2.39 2.40 2.44 2.45 2.46 2.47 2.48 2.49 2.6 2.7 2.8 2.9 3.0 3.001 3.002 3.01 3.02 3.003...
2.999 2.98 2.987 2.900 2.80 2.7 2.6 2.5 2.4 2.3 2.2 0 0.9 0.8 0.7 0.8 -1 -1.1 -1.111 -1.2...
-1.22 -1.23 -1.24 -1.25 -1 .9 -.8 .7 .5 .4 .3 .2 0 0 0.1 0.2 0.3 0.444 0.45 0.46...
0.47 0.48 0.49 0.50 0.51 0.53 0.54 0.55 0.56 .7 .81 .8 .9 .99 1 0.6 0.5 0.4 0.33 0.2222 0.1...
0 0.1 0.112 0.52 0.789 0.89 0.900 0.912 0.913 1.00 1.2 1.11 1.23 1.4 1.32 1.5 1.55 1.56 1.57...
1.58 2.5 1.543 1.2 1.1 1.0 1.01 .99 0.823 0.7 0.4 0.3 0.2 0.1 -.9 -.8 -.803 -.805 -.0800 -.79...
0.15 .3 .45 .6 .9 1.25 1.5 1.8 2.3 2.5 2.8 3.0 3.1 3.11 3.12 3.13 3.2 3.3 3.44 3.5 3.6...
3.6 3.5 3.3 2.9 2.8 2.7 2.6 2.59 2.58 2.3 2 1.9 1.4 1.2 1 -.9 -.8 -.5 -.51 -.50...
-.50 -.50 -.52 -.4 -.2 -.1 0 1 1.1 1.2 1.3 1.4 1.5 1.6 2 2.1 2.5 3 3.4 3.5 3.6...
3.6 3.7 3.8 3.9 4 4.1 4.11 4.12 4.13 4.14 4.2 4.23 4.4 4.5 4.6 4.7 4.8 4.9 4.9 4.9...
4.9 4.8 4.7 4.6 4.5 4.4 4.3 4.2 4.1 4.0 3.9 3.8 3.7 3.7 3.7 3.7 3.7 3.8 3.8 3.8...
3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3 2.8 2.6 2.4 2.2 2 1.5 1.2 1 .5 0 -.9 -.8 -.8 -.8...
-.8 -.7 -.5 -.4 -.32 -.2 0 .1 .12 .13 .14 .15 .16 2.0 2.1 2.2 2.44 2.24 2.5 2.5...
2.5 2.44 2.43 2.42 2.40 2.41 2.40 2.39 2.38 2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6 3.5 3.4 3.3 3.2 3.1 3.0 2.9 2.8 2.4 2.3 2.2 2.1...
2.1 2.0 1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2 1.1 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1...
0.9 0.8 0 -.1 -.2 -.3 -.5 -.5 -.5 -.5 -.4 -.2 -.1 0 0 0 0 0.9 1 1.1 1.2 1.3...
1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2 1.11 1.1 1 0.9 0.8 0.7 0.6 0.5 .4 .3 .2 0.1 0.1...
-.1 -.5 -.6 -.7 -.8 -.9 -1 -2 -2 -2 - -1 0 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.7...
1.7 1.8 1.8 1.9 1.9 1.91 1.92 1.93 1.94 1.95 1.96 1.97 1.9 2 2.1 2.22 2.3 2.4...
2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.33 3.4 3.5 3.6 3.7 4.0 4.0 4.0 4.0 3.9 3.9...
3.9 3.8 3.7 3.6 3.55 3.5 3.4 3.3 3.2 3.1 3.0 2.9 2.8 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 2.3]% 801 points
V=delt*cumtrapz(a); % V is the velocity of the data
d=delt*cumtrapz(V);% d is displacement of the data
plot(t,a,t,V,t,d)
xlabel('Time (seconds)','fontsize',12,'fontweight','b','color','r');
ylabel('Acceleration (m/s^2), Velocity (m/s), Displacement (m)','fontsize',12,'fontweight','b','color','r');
hleg1 = legend('Acceleration','Velocity','Displacement');
title ('Filtered Acceleration Data for 3/4 or max throttle')
%%
%delt=0.001
V=delt*cumtrapz(a); % V is the velocity of the data
d=delt*cumtrapz(V);% d is displacement of the data
plot(t,a)
xlabel('Time (seconds)','fontsize',12,'fontweight','b','color','r');
ylabel('Acceleration (m/s^2)','fontsize',12,'fontweight','b','color','r');
hleg1 = legend('Acceleration');
title ('Filtered Acceleration Data for 3/4 or max throttle')
%%
plot(t,V)
xlabel('Time (seconds)','fontsize',12,'fontweight','b','color','r');
ylabel('Velocity (m/s)','fontsize',12,'fontweight','b','color','r');
hleg1 = legend('Velocity');
title ('Filtered Velocity Data for 3/4 or max throttle')
%%
plot(t,d)
xlabel('Time (seconds)','fontsize',12,'fontweight','b','color','r');
ylabel('Position (m)','fontsize',12,'fontweight','b','color','r');
hleg1 = legend('Displacement');
title ('Filtered Position Data for 3/4 or max throttle')
Z = TRAPZ(t,a)% Integrate to get vvec
D = TRAPZ(Z)% Integrate to get xvec
%TRAPZ Trapezoidal numerical integration.
%Z = TRAPZ(X,Y) computes the integral of Y with respect to X using
%the trapezoidal method. X and Y must be vectors of the same
%length, or X must be a column vector and Y an array whose first
%non-singleton dimension is length(X). TRAPZ operates along this
%dimension.
t=[0:0.001:0.1]
a=[2.001 2.008 2.016 2.022 2.028 2.035 2.041 2.050 2.059 2.066 2.075 2.086 2.095 2.101 2.109 2.206 2.305 2.404 2.506 3.003 3.012......
3.026 3.036 3.044 3.052 3.061 3.076 3.083 3.099 3.106 3.205 3.320 3.460 3.520 3.620 3.760 3.809 3.999 4.009 4.018 4.065.......
4.098 4.223 4.451 4.852 4.876 4.898 4.903 4.926 4.956 4.987 4.998 5.003 5.016 5.026 5.046 5.086 5.120 5.223 5.445 5.652 .......
5.785 5.785 5.652 5.543 5.431 5.321 5.211 5.101 5.009 4.456 4.362 4.121 4.002 3.678 3.654 3.541 3.210 3.001 2.987 2.951 ........
2.765 2.542 2.321 2.123 2.002 1.998 1.956 1.845 1.654 1.321 1.122 1.026 1.001 0.998 0.956 0.945 0.932 0.921 0.910 0.887]
plot(t,a)
t=[0.1:0.001:.2];
a=[2.1 2.01 2.001 2.2 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 2.333 2.345 2.366...
2.37 2.38 2.39 2.40 2.44 2.45 2.46 2.47 2.48 2.49 2.6 2.7 2.8 2.9 3.0 3.001 3.002 3.01 3.02 3.003...
2.999 2.98 2.987 2.900 2.80 2.7 2.6 2.5 2.4 2.3 2.2 0 0.9 0.8 0.7 0.8 -1 -1.1 -1.111 -1.2...
-1.22 -1.23 -1.24 -1.25 -1 .9 -.8 .7 .5 .4 .3 .2 0 0 0.1 0.2 0.3 0.444 0.45 0.46...
0.47 0.48 0.49 0.50 0.51 0.53 0.54 0.55 0.56 .7 .81 .8 .9 .99 1 0.6 0.5 0.4 0.33 0.2222 0.1]
plot(t,a)
t=[0.2:0.001:.3];
a=[0 0.1 0.112 0.52 0.789 0.89 0.900 0.912 0.913 1.00 1.2 1.11 1.23 1.4 1.32 1.5 1.55 1.56 1.57...
1.58 2.5 1.543 1.2 1.1 1.0 1.01 .99 0.823 0.7 0.4 0.3 0.2 0.1 -.9 -.8 -.803 -.805 -.0800 -.79...
0.15 .3 .45 .6 .9 1.25 1.5 1.8 2.3 2.5 2.8 3.0 3.1 3.11 3.12 3.13 3.2 3.3 3.44 3.5 3.6...
3.6 3.5 3.3 2.9 2.8 2.7 2.6 2.59 2.58 2.3 2 1.9 1.4 1.2 1 -.9 -.8 -.5 -.51 -.50...
-.50 -.50 -.52 -.4 -.2 -.1 0 1 1.1 1.2 1.3 1.4 1.5 1.6 2 2.1 2.5 3 3.4 3.5 3.6]
plot(t,a)
t=[0.3:0.001:.4];
a=[3.6 3.7 3.8 3.9 4 4.1 4.11 4.12 4.13 4.14 4.2 4.23 4.4 4.5 4.6 4.7 4.8 4.9 4.9 4.9...
4.9 4.8 4.7 4.6 4.5 4.4 4.3 4.2 4.1 4.0 3.9 3.8 3.7 3.7 3.7 3.7 3.7 3.8 3.8 3.8...
3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3 2.8 2.6 2.4 2.2 2 1.5 1.2 1 .5 0 -.9 -.8 -.8 -.8...
-.8 -.7 -.5 -.4 -.32 -.2 0 .1 .12 .13 .14 .15 .16 2.0 2.1 2.2 2.44 2.24 2.5 2.5...
2.5 2.44 2.43 2.42 2.40 2.41 2.40 2.39 2.38 2.37 2.36 2.365 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2.8 2.9 3.0 3.4 3.5 3.6 3.7 3.8 3.9 4.0...
4.0 4.0 4.0 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.9 2.8 2.4 2.3 2.2 2.1...
2.1 2.0 1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2 1.1 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1...
0.9 0.8 0 -.1 -.2 -.3 -.5 -.5 -.5 -.5 -.4 -.2 -.1 0 0 0 0 0.9 1 1.1 1.2 1.3]
plot(t,a)
t=[0.7:0.001:.8];
a=[1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2 1.11 1.1 1 0.9 0.8 0.7 0.6 0.5 .4 .3 .2 0.1 0.1...
-.1 -.5 -.6 -.7 -.8 -.9 -1 -2 -2 -2 - -1 0 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.7...
1.7 1.8 1.8 1.9 1.9 1.91 1.92 1.93 1.94 1.95 1.96 1.97 1.9 2 2.1 2.22 2.3 2.4...
2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.33 3.4 3.5 3.6 3.7 4.0 4.0 4.0 4.0 3.9 3.9...
3.9 3.8 3.7 3.6 3.55 3.5 3.4 3.3 3.2 3.1 3.0 2.9 2.8 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 2.3]
plot(t,a)
pg 158/159
http://www.mathworks.com/help/toolbox/simulink/slref/mux.html
Combine several input signals into vector
Signal Routing
The Mux block combines its inputs into a single vector output. An input can be a scalar or vector signal. All inputs must be of the same data type and numeric type. The elements of the vector output signal take their order from the top to bottom, or left to right, input port signals. See How to Rotate a Block for a description of the port order for various block orientations. To avoid adding clutter to a model, Simulink hides the name of a Mux block when you copy it from the Simulink library to a model. See Mux Signals for information about creating and decomposing vectors.
X Thrust Simulation
3DOF Simulink Model : X, Y, Theta,
Derived EOM for flapping MAV using Lagrange equations
http://etd.fcla.edu/UF/UFE0021668/regisford_s.pdf
Simulink – Modeling Dynamic Systems
http://faculty.uml.edu/pavitabile/22.457/UMICH_Simulink_Tutorial.pdf
(For modeling damping coefficient)
http://prism2.mem.drexel.edu/~billgreen/mem351/lecture05/mem351Lab-MatlabSimulink.pdf