in the raw data. After we remove the local mean from the
raw data, the oscillation associated with every movement
become more noticeable. In particular, we calculate the mean
values in a moving time window of 50 samples. Figure 7
shows the weight measurements before and after removing
the local means, where the data is collected from one of
our participants with 27 in-bed movements. We can see that
local mean removal can amplify the oscillation to improve the
movement detection.
After that, the data is filtered using a low pass filter of a 10
Hz of cutoff frequency.