Data segmentation for Accelerometer time series data
6 次查看(过去 30 天)
显示 更早的评论
I have time series data collected from a cellphone accelerometer sampled at 500Hz. The data is collected from the phone of a wheelchair user as he goes over a platform of a certain thickness. The abrupt change in height causes spikes in the data stream which is the event. Each sample has two events, the user going up the platform and when he comes down the platform. What would be a good way to filter noise and perform data segmentation?
10 个评论
回答(2 个)
Philipp Doblhofer
2017-12-29
Hello,
one simple option is to set a threshold value for the signal power of your data. To reduce the noise level you can apply for example a moving average filter.
close all
clc
data=csvread('acc', 26, 0);
% Width of the moving average window (filter)
window_width = 50;
% Threshold level for the signal energy
threshold = 0.005;
% Remove constant offset from data and normalize
data(:,3) = data(:,3) - mean(data(:,3));
data(:,3) = data(:,3)/max(data(:,3));
% Calculate signal power
signal_power = data(:,3).^2;
% filtered data
filtered_signal_power = movmean(signal_power, window_width);
% event detection
event = filtered_signal_power > threshold;
plot(data(:,3))
hold on
plot(event)
0 个评论
Chris Turnes
2018-2-2
For the segmentation, if you have R2017b, the new ischange function should help to separate the events.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Time Series Events 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!