<< Chapter < Page Chapter >> Page >

------------------------------------------------------------------------------------------------------------------------------------------------------------

state_vecs = zeros(3,length(t)); % Initialize matrix for position, % velocity and acceleration statestrans_mat = [1 dt (1/2)*(dt^2); 0 1 dt; 0 0 1]; % Initialize state% derivation matrix prv_states = zeros(3,length(t)); % Matrix for previous statesprv_states(3,:) = Acc_t; % Set acceleration vector in previous states for i=1:length(t)-1state_vecs(1,i) = trans_mat(1,:)*prv_states(:,i); % Derive position state_vecs(2,i) = trans_mat(2,:)*prv_states(:,i); % Derive velocitystate_vecs(3,i) = trans_mat(3,:)*prv_states(:,i); % Derive acceleration prv_states(1,i+1) = state_vecs(1,i); % Use current states to derive% future values prv_states(2,i+1) = state_vecs(2,i);end s_comp = state_vecs(1,:); % Position vectorv_comp = state_vecs(2,:); % Velocity vector a_comp = state_vecs(3,:); % Acceleration vectorfigure; plot(t,s_comp) % Show plot of computed positiontitle('Computed Position') figure;plot(t,v_comp) % Show plot of computed velocity title('Computed Velocity')figure; plot(t,a_comp) % Show plot of computed accelerationtitle('Computed Acceleration') [apogee,t_index]= max(s_comp); % Determine and display actual apogee disp('Actual Apogee occurs at t =')disp(t(t_index))

------------------------------------------------------------------------------------------------------------------------------------------------------------

A plot of simulated position
A plot of simulated velocity
A plot of simulated acceleration

Using the var() command in MATLAB, we determined that the measured data from the rocket launch got corrupted with Gaussian noise with mean=0 and different variances for position, velocity, and acceleration.

State Variance
Position 5.985
Velocity 2
Acceleration 0.0346

In addition, we introduced A/D quantization from our sensors into the position, velocity, and acceleration states. Specifically, the sensors introduced a time quantization of 50ms and an amplitude quantization in increments of three (see [link] , [link] [link] ):

------------------------------------------------------------------------------------------------------------------------------------------------------------

% Measurement noise % Position corrupted with Gaussian noise with standard deviation = 5.985s_n = state_vecs(1,:)+(5.985.*randn(1,length(t))); % Velocity corrupted with Gaussian noise with standard deviation = 2v_n = state_vecs(2,:)+(2.*randn(1,length(t))); % Position corrupted with Gaussian noise with standard deviation = 0.0346a_n = state_vecs(3,:)+(0.0346.*randn(1,length(t))); figure;plot(t,s_n) % Plot noisy position title('Noisy Position')figure; plot(t,v_n) % Plot noisy velocitytitle('Noisy Velocity') figure;plot(t,a_n) % Plot noisy acceleration title('Noisy Acceleration')%Quantization %Time Quantized to 0.05 seconds%Amplitude quantization is 3 meters t_q = t(1:50:end);s_n_q = floor(s_n(1,1:50:end)./3).*3; v_n_q = floor(v_n(1,1:50:end)./3).*3;a_n_q = floor(a_n(1,1:50:end)./3).*3; figure;plot(t_q,s_n_q) % Plot noisy and quantized position title('Noisy and Quantized Position')figure; plot(t_q,v_n_q) % Plot noisy and quantized velocitytitle('Noisy and Quantized Velocity') figure;plot(t_q,a_n_q) % Plot noisy and quantized acceleration title('Noisy and Quantized Acceleration')

------------------------------------------------------------------------------------------------------------------------------------------------------------

A plot of Noisy and Quantized position
A plot of Noisy and Quantized velocity
A plot of Noisy and Quantized acceleration

Conclusion

Once corrupted with noise and quantized, the simulation provides an accurate approximation of our measured data, and allows for multiple simulated, random, and parameterized rocket tests (see [link] ):

A comparison of measured data and simulated data

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Digital detection of rocket apogee. OpenStax CNX. Dec 18, 2013 Download for free at http://cnx.org/content/col11599/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Digital detection of rocket apogee' conversation and receive update notifications?

Ask