Create new time vector for downsampled signal using a higher resolution signal

Hey all,
I have data from 2 seperate speed sensors on a vehicle. Both speed vectors should be identical. However there has been significant data loss on one sensor and so the number of readings from that sensor is typically 1/3 rd of the other.Also, the time vector from the faulty sensor is completely useless as for several reasons a randomly variable error has been applied to each time reading!! I now need to rebuild the time vector for this data. luckily I do have the identical speed data at a higher sampling rate and so I hope to use this data to rebuild the time vector for the bad data.
To reiterate: - I have 2 identical signals - 1 has 10 Hz data and a correct time vector - the other has 3Hz data and NO time vector - My question is how can I reconstruct the missing timevector by comparing the faulty data with the 'good' data? - Oh and I also have to maintain the same sampling rate on the bad data since I have to tie this data to several other variables logged in parallel
My idea was to overlay the two speeds without time to find the best fit possible. I could then look for the values where the data matched up closely(which should be quite a few indeed).I could then rebuild the missing time vector by comparing these values with the time values from the good data.
Any help would be highly appreciated! I do hope I could post some of the data but I am not allowed to do so. I will try to approximate the data below.
if true
% code
Good_speed_vector = [1:.5:100];
Good_speed_vector_time = [1:100];
bad_speed_vector = [1:2:100]; % less than the sample rate of the good data
% overlay the two sets of data to match the 'shapes' of the curves
plot(Good_speed_vector,'*')
hold on
plot(bad_speed_vector,'r*')
recalculated_time = ?
end
Regards, Andre

Answers (0)

Products

Asked:

on 31 May 2013

Community Treasure Hunt

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

Start Hunting!