How to implement a kalman filter for an Infrared sensor.

10 views (last 30 days)
Hello,
I'm working with a Qbot a differential drive robot, Quanser Control Software in Simulink and the Control System toolbox.
My goal is to use the Qbot to test some motion planning and location algorithms and in order to that the robot provides me of:
  • 5 Sharp GP2Y0A02YK Infrared sensor
  • 3 MaxSonar-EZ0 Ultrasonic sensor
  • 1 Magnetometer
  • 1 Logitech Quickcam Pro 9000 USB camera
In order to implement data fusion and probabilistic methods for location I want to develop a Kalman filter for my IR and sonar Sensors so I carried out an experiment to get samples from IR, having as a result a 3x611 matrix (IRDATA) where I have time, distance and volts. Using the following code I achieve a mathematical model (polynomial interpolation) for the sensor:
if true
load IRDATA
dists = data(2, :);
volts = data(3, :);
n = length(dists);
maxvolts = max(volts);
id = find(volts == maxvolts);
dists = dists(id(1):n);
volts = volts(id(1):n);
C = polyfit(volts, dists, 4);
plot(dists, volts, 'b'), hold on
xlabel('Distance (cm)'),ylabel('IR Output (volts)')
title('Characteristic curve of IR sensor');
Dists = polyval(C, volts);
plot(Dists, volts, 'r'), hold off
end
How can I use those data to develop a Kalman filter or any other method to improve my sensor's reliability?
Ps: by the way I apologize for my English which is not my native language.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!