The workflow of the project is shown below in the block diagram. There are three major steps, FOG detection, classification and prediction.
FOG detection algorithm used in this project is a signal modeling based detection using zero-velocity update (ZuPT) developed by Prateek Gundannavar Vijay. The details of the algorithm can be found in  in reference.
The first step in classification is to extract features from IMU collection. Table 1 shows the full set of features. The selection is based on previous FOG literature.
|Time domain||Cycle length (s)||Total time of episode/ number of strides|
|Average contact time (s)||The average time of zero velocity vector of each stride|
|Average stride length (m)||The average distance of each stride|
|Average velocity (m/s)||Average foot speed (sum of x, y, z velocity vector)|
|Yaw angle amplitude (degree)||The maximum yaw angle change with the sign representing change direction|
|Roll, pitch angular velocity (degree/s)||Average velocity of roll and pitch angle in the episode|
|x, y, z direction acceleration (m/s^2)||Average acceleration in x, y, z direction|
|Frequency domain||Freezing Index FI||Energy ratio between 3-8Hz and 0.5-3Hz of z direction accelerometer reading|
|Non-linear||Zero velocity entropy||The entropy of the zero velocity sequence|
Then random forests classification is used to classify FOG instances into three categories: initiation freeze, walking freeze and turning freeze.
Two approaches are taken, a feature space approach and a time series approach. Both approaches use a sliding window with 2 second duration and 0.5 seconds overlapping. Within each time window, the feature space method extracts the same set of features as discussed above and the label is assigned based on whether or not FOG occurs in the next window. The time series approach directly input the accelerometer and gyroscope reading as input to predict near future performance.