Within this guide, we consider a real signal issued from a MEMS IMU.
gmwm
packageFirst, make sure to load the gmwm
package into R.
library("gmwm")
To obtain the data, we must download and install the imudata
package.
if(!require("imudata")){ install_imudata() library("imudata") }
To load the data and display the first rows for each sensor we do:
data(imu6) head(imu6)
To use the data within the modeling paradigm, we must first cast it as type imu:
sensor = imu(imu6, gyros = 1:3, accels = 4:6, axis = c('X','Y','Z','X','Y','Z'), freq = 100)
To obtain the variance for an imu
object we use:
wv.imu = wvar(sensor)
To plot the WV (and confidence intervals) for all gyroscopes and accelerometers, we can use the following function
plot(wv.imu)
To plot the WV for each sensor type together, we can use the following:
plot(wv.imu, split = F)
Let us consider the Gyro on the axis X and, given the estimated WV from the plot, let us estimate a model which is the sum of three AR(1) processes:
# Define model TS.mod.imu = 3*AR1() # Compute GMWM estimator model.imu = gmwm(TS.mod.imu, data = imu6[,1])
Note: The gmwm.imu function only is able to handle one sensor at a time.
To see the results of the estimation, we can use the summary function as well as visualize the fit of the implied WV to the estimated WV from Gyro X (as done in the simulation example).
summary(model.imu) plot(model.imu)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.