Code covered by the BSD License  

Highlights from
Introduction to Unscented Kalman Filtering

image thumbnail

Introduction to Unscented Kalman Filtering



04 Aug 2009 (Updated )

Unscented Kalman filtering tutorial: Simulink and tilt sensor case study.

% Error variance analysis for 1 simulation run
% An example for Rapid STM32 Blockset 
% Application Note AN1 Developing a Tilt Sensor System Using Rapid STM32 Blockset
% Copyright 2009 Krisada Sangpetchsong
% Visit for further information

% Import data from saved work space data

time = error_variance.time;
true_roll_error_deg = error_variance.signals(1).values(:,1);
theoretical_roll_error_deg = error_variance.signals(1).values(:,2);
true_pitch_error_deg = error_variance.signals(2).values(:,1);
theoretical_pitch_error_deg = error_variance.signals(2).values(:,2);

% Compute actual error standard deviation
actual_roll_std_deg = std(true_roll_error_deg);
actual_pitch_std_deg = std(true_pitch_error_deg);

% Plot results
ylabel('Roll Errors (deg)'), xlabel('time (sec)')
legend('Actual errors','\surd(P_{11})')
text(0.05,0.2,['Actual roll error std = ' num2str(actual_roll_std_deg) 'deg'],'unit','normalized')

ylabel('Pitch Errors (deg)'), xlabel('time (sec)')
legend('Actual errors','\surd(P_{22})')
text(0.05,0.2,['Actual pitch error std = ' num2str(actual_pitch_std_deg) 'deg'],'unit','normalized')

Contact us