Method and system for real-time motion abnormality detection
Patent Information
- Authority / Receiving Office
- EP · EP
- Patent Type
- Applications
- Current Assignee / Owner
- TALLINN UNIVERSITY OF TECHNOLOGY
- Filing Date
- 2024-06-13
- Publication Date
- 2026-04-22
AI Technical Summary
Existing real-time machine learning methods fail to detect human motion deviations, such as gait abnormalities, with the required latency for corrective measures like electrical or haptic feedback during ongoing activities, as they typically provide feedback only after the end of a motion period rather than in real-time.
The development of real-time machine learning algorithms, including tslearn Support Vector Machines Anomaly Detection (RTtsSVM-AD), One Class Support Vector Machines Anomaly Detection (RTOCSVM-AD), and Signal Shape Tracking Anomaly Detection (SST-AD), which classify periodic time series patterns during ongoing signal periods, enabling real-time detection of gait abnormalities and triggering corrective feedback.
These algorithms achieve significant F1 scores, precision, and recall percentages for detecting gait abnormalities during the swing phase of a step, with SST-AD demonstrating the highest F1 scores, effectively enabling real-time correction and feedback during ongoing activities.
Smart Images

Figure IB2024055807_19122024_PF_FP_ABST
Abstract
Description
[0001] Method and system for real-time motion abnormality detection TECHNICAL FIELD The invention relates to methods and systems for areal-time motion abnormality detection, such methods and devices particularly suitable for real-time human motion abnormality detection. BACKGROUND ART Micromechanical inertial motion sensors (IMUs) are widely used for motion detection and classification. Such sensors are present in smart watches, smartphones, industrial motion and vibration sensors. Wearable consumer devices like smart watches are used for classification of activities such walking, running, and cycling. The same devices can be used for counting repetitions of motions like walking steps. Professional wearable sensors are used for medical examination purposes. For example, CentrePoint Insight Watch from Actigraph LLC is used for generic physical activity assessment1; Opal wearables from APDM Wearable Technologies, Inc. are used for clinical assessment of human gait and balance. Physiology platform is used for analysis of mobility disorders and collecting gait2. Among all the activities of daily living the loss of mobility is the one on which physically disabled people place the most value.3Additionally, deviations from the optimal gait pattern will cause an elevated risk of falling and injuries4,5. Injuries to healthy people can be caused by incorrectly performed workout activities. To avoid that proper training injury prevention programs and equipment use recommendations shall be followed6. 3Chiou, II, Burnett CN. Values of activities of daily living. A survey of stroke patients and their home therapists. Phys Ther 1985; 65:901–6.4W. Pirker and R. Katzenschlager, “Gait disorders in adults and the elderly,” Wiener Klinische Wochenschrift, vol.129, no.3, pp.81–95, 2017.5A. Kuusik, K. Gross-Paju, H. Maamagi, and E. Reilent, “Comparative ¨ study of four instrumented mobility analysis tests on neurological disease patients,” in 201411th International Conference on Wearable and Implantable Body Sensor Networks Workshops. IEEE, 2014, pp.33–376Emery, Carolyn A., and Kati Pasanen. "Current trends in sport injury prevention." Best Practice & Research Clinical Rheumatology 33, no.1 (2019): 3-15. Functional Electrical Stimulation (FES) has been widely used for gait correction7, 8and rehabilitation of functions of upper and lower extremities9 10. FES devices are widely used in presence of foot drop syndrome caused by a variety of neuromuscular and autoimmune diseases. Modern foot drop treatment devices by companies like Accelerated Care Plus11, Bioventus12incorporate micromechanical sensors to detect heel strike and toe off events. Alternatively, use of real-time haptic biofeedback is proposed for the rehabilitative exercising13. KR101965269B1 discloses an electrical stimulation for knee rehabilitation exercising14. There is a time variability of the responses of muscles (e.g., muscle fatigue, habituation, etc.)15. Therefore, instrumented rehabilitation, gait support, and training assistance, especially using FES, require real-time recognition of varying deviations from the normal motion pattern. There are known solutions to assess deviations of precise well-defined motions, i.e., golf swing US20050261073A116and US20100144455A117and provide pattern deviation information only after the end of motion. Gait pattern deviations of partially disabled people are large, gait depends on specific environmental conditions, and the stimulation must be performed during an ongoing step. Therefore, every person has their own normal (or target) gait, which should be7P. M. Kluding, K. Dunning, M. W. O’Dell, S. S. Wu, J. Ginosian, J. Feld, and K. McBride, “Foot drop stimulation versus ankle foot orthosis after stroke: 30-week outcomes,” Stroke, vol.44, no.6, pp.1660–1669, 2013.8L. Miller, A. McFadyen, A. C. Lord, R. Hunter, L. Paul, D. Rafferty, R. Bowers, and P. Mattison, “Functional electrical stimulation for foot drop in multiple sclerosis: a systematic review and meta-analysis of the effect on gait speed,” Archives of Physical Medicine and Rehabilitation, vol.98, no.7, pp.1435–1452, 2017.9Peckham, P. Hunter, and Jayme S. Knutson. "Functional electrical stimulation for neuromuscular applications." Annu. Rev. Biomed. Eng.7 (2005): 327-360.10Ragnarsson, K. T. "Functional electrical stimulation after spinal cord injury: current use, therapeutic effects and future directions." Spinal cord 46, no.4 (2008): 255-274.11https: / / acplus.com / 12https: / / www.bioventus.com / 13Shull, Peter B., Haisheng Xia, Jesse M. Charlton, and Michael A. Hunt. "Wearable real- time haptic biofeedback foot progression angle gait modification to assess short-term retention and cognitive demand." IEEE Transactions on Neural Systems and Rehabilitation Engineering 29 (2021): 1858-1865.14https: / / patents.google.com / patent / KR101965269B1 / en?oq=KR101965269B115Popović, Dejan B. "Advances in functional electrical stimulation (FES)." Journal of Electromyography and Kinesiology 24, no.6 (2014): 795-802.16https: / / patents.google.com / patent / US20050261073A1 / en?oq=US20050261073A117https: / / patents.google.com / patent / US20100144455A1 / en?oq=US20100144455A1 used as a reference investigating gait deviations. Real-time step deviation detection and correction can be considered as one of the most demanding human motion monitoring applications exceeding the complexity and reliability demands of workout and rehabilitation tasks. A person’s gait can be described by a set of parameters such as step length, duration of individual step phases, and muscle forces18. IMUs are widely used sensing elements inside of wearable devices for real-time gait assessment and support19. US 2016 / 100801A1 discloses a shoe attached gait analysis device based on accelerometer and a gyroscope20. EP3468450B1 proposes a method to observe gait deviations registered by an IMU device21after a plurality of strides of the foot. According to human kinematics, an average swing phase of a step lasts 300- 400 ms22, the time of full contraction of the muscle caused by external electrical stimulation takes 100-200 ms23, the detection time of step pattern deviations should be under 100 ms for appropriate reaction. Considering that the incoming micromechanical motion sensor signal must be processed, FES actuation initiated, a motion abnormality detection time of 50-70ms should be achieved. Similar reaction time should be appropriate for real time deviations detection for sports and rehabilitation exercising. Non-real time machine learning (ML) methods are used for exercising injury prediction24. Existing real-time ML algorithms are used for identification of a person by gait25, for reliably18M. Murray, “Gait as a total pattern of movement,” American journal of physical medicine, vol.46, no.1, p.290—333, February 1967. [Online]. Available: http: / / europepmc.org / abstract / MED / 533688619M. Zago, M. Tarabini, M. Delfino Spiga, C. Ferrario, F. Bertozzi, C. Sforza, and M. Galli, “Machine-learning based determination of gait events from foot-mounted inertial units,” Sensors, vol.21, no.3, 2021. [Online]. Available: https: / / www.mdpi.com / 1424- 8220 / 21 / 3 / 83920https: / / patents.google.com / patent / US2016010080121https: / / patents.google.com / patent / EP3468450B122J. H. Hollman, E. M. McDade, and R. C. Petersen, “Normative spatiotemporal gait parameters in older adults,” Gait & Posture, vol.34, no.1, pp.111–118, 2011. [Online]. Available: https: / / www.sciencedirect.com / science / article / pii / S096663621100101923M. H. Cameron, Physical agents in rehabilitation: from research to practice, 4th ed. St. Louis, Mo., Elsevier / Saunders, 2013.24Van Eetvelde, Hans, Luciana D. Mendonça, Christophe Ley, Romain Seil, and Thomas Tischer. "Machine learning methods in sport injury prediction and prevention: a systematic review." Journal of experimental orthopaedics 8 (2021): 1-15. detecting of gait events like heel-strike and toe-off for healthy persons as well as for stroke and other diseases patients26. Real-time algorithms for classification of gait terrain and walking modes, such as overground walking, stair ascend or descend and others, are widely studied27.28, Support Vector Machines (SVM)-based methods are the most widely used for automated gait analysis, followed by Convolutional Neural Networks (CNN). Notably, existing machine learning solutions based on real-time streaming IMU data cannot detect human movement deviations, such as stride or undetermined periodic exercise motion deviations, during ongoing periodic activity with an expected latency of less than 100 ms required for corrective measures like electrical, haptic or audiovisual feedback. Existing machine learning based methods can classify the motion pattern as correct or incorrect after the end of period of an observed signal. That disadvantage significantly reduces feasibility of using machine learning for real-time, in period, streaming signal outlier detection and correction, for example muscle activation, providing haptic or audiovisual feedback within the ongoing period. DISCLOSURE OF INVENTION Present invention describes a method to improve real-time performance of machine learning methods applicable for detecting deviations in periodic time series signals such as human gait, repetitive workout and rehabilitation exercises. The method classifies periodic time series patterns, such as motion signals captured by IMU devices during an ongoing signal period. Proposed method is applied to and tested with three real-time streaming signal anomaly detection algorithms: real-time tslearn Support Vector Machines Anomaly Detection (RTtsSVM-AD) algorithm, the real-time One Class Support Vector Machines Anomaly Detection (RTOCSVM-AD) algorithm, and original Signal Shape Tracking Anomaly Detection (SST-AD). Other algorithms such as LSTM, matrix profile and 1D CNN could be used. Essentially, ”real-time anomaly detection” refers to the ability of an algorithm to detect26F.-C. Wang, Y.-C. Li, T.-Y. Kuo, S.-F. Chen, and C.-H. Lin, “Real-time detection of gait events by recurrent neural networks,” IEEE Access, vol.9, pp.134849–134857, 2021.27R. Moura Coelho, J. Gouveia, M. A. Botto, H. I. Krebs, and J. Martins, “Real-time walking gait terrain classification from foot-mounted inertial measurement unit using convolutional long short-term memory neural network,” Expert Systems with Applications, vol.203, p. 117306, 2022. [Online]. Available: https: / / www.sciencedirect.com / science / article / pii / S095741742200669828A. Saboor, T. Kask, A. Kuusik, M. M. Alam, Y. Le Moullec, I. K. Niazi, A. Zoha, and R. Ahmad, “Latest research trends in gait analysis using 14 wearable sensors and machine learning: A systematic review,” IEEE Access, vol.8, pp.167830–167864, 2020. abnormalities during the ongoing signal period, for example within the swing phase of an ongoing step. Algorithms’ reaction time latency is represented via an ”earliness” measure, which is time from the beginning of periodic signal, in the specific illustrative case – beginning of a step. The developed ML implementations are applied to real-time detection of frequent gait deviations subject to FES treatment. During an experimental study twenty-two healthy volunteers simulated eight different human gait deviations, motion data were recorded with an IMU placed on the forefoot. F1 score, recall, precision in percents, and earliness in seconds were calculated. The achieved results demonstrate that the proposed algorithms can detect gait abnormalities in real-time during the swing phase of an ongoing step. The best mean F1 scores for each algorithm were as follows: SST-AD 95.8±5.9% for Hyperkinetic gait type; RTOCSVM-AD 64.5±9.8% for Hyperkinetic gait type; RTtsSVM-AD 58.1±9.7% for Steppage gait type. BRIEF DESCRIPTION OF DRAWINGS Embodiments of the present invention will now be described, by way of example, with reference to the accompanying drawings in which: Fig 1 is a block diagram disclosing a training mode of the proposed methods. Algorithm specific part 102 comprises training procedures 102a, described individually for each algorithm, resulting in the model (102b) and the threshold (102c) for optimal alarming. The method comprises step 100 - inputting data chunks 100, step 101 - collecting N periods (array or list of periods: 1 or M dimensional each); step 103 – splitting input data into periods and returning collection of periods; step 104 – providing labels for the Periods’ annotating phase. Fig 2 is a process diagram of the method of detecting motion abnormalities, i.e., deviations in real-time from streaming data representing the motion. Step 200 – repeating loop, which iterate on the each obtained data chunk; Step 201 – receiving input data chunks representing the motion consecutively in real time; Step 202 – collecting a new Frame of data, synchronous with the Period, from the input data chunks (described in details in Fig 3); Step 203 – algorithm specific prediction block, which uses pretrained model 203b and returns the score S (probability, distance or other comparable measure that indicates that, the input data chunk is from abnormal signal); Step 204 – comparing the obtained score with the threshold 203c, determined from the pretrained model; Step 205 – checking if the threshold exceeded and if so, generating an Anomaly alarm in Step 206. Fig 3 discloses Step 202 of Fig 2 in further details. Step 202 further comprises Step 300 – receiving input data chunks consecutively in real time; Step 301 – getting new Chunk C0; Step 302 – synchronizing the received data and the period (detects the beginning of the period, period’s beginning is defined for the application; for example, in the case of the human gate, the period’s beginning is selected for the heel off foot swing phase); Step 303 – checking if the period has started; Step 304 – assembling new Frame from the incoming Data Chunks so that the new Frame is synchronous with the detected period; Step 305 – determining if the new Frame is complete and ready, Step 306 – outputting the Frame to Step 203a; Fig 4 is a diagram describing assembling of the new Frame synchronous with the Period from chunks stream.400 – abstract representation of the ongoing Period, used in the figure to show the span of the Period; 401 – the stream of chunks; 402 – the Frames (overlapped Frames); 403 – the buffer which collects content for the new Frame, all the Frames are synchronous with the Period and the first Frame (F-2on in 402 exactly coincides with the Period beginning time instance); 404 – the new Frame, just created from the circular buffer (403) snapshot; 405 – the Period beginning time instance; 406 – the Period ending time instance; Fig 5 is a diagram illustrating a method that prepares a non-complete set of Frames (non- complete Period; in a more general case, a non-complete vector of features) to be used with classifiers that require a full set of features (Frames in our application) as input for classification. This solution enables the use of well-known classifiers, such as SVM, but is not limited to it, with streaming data (the stream is formed from the Frames). In Fig 5, 500 - New streaming Frames (from 306); 501 - Set of already available Period Frames (504) for the current Period in the context of real-time streaming Frames; 502 - Set of Model Frames 505 and already available Period Frames 504 for the current Period, where the available Period Frames replace the Model Frames with corresponding indexes (indexes from the beginning of the Period); 503 - Earliness measure if an Anomaly is detected at the Period Frame F0 ; 504 - The Period Frames, where the most recent is F0; 505 - The Model Frames Mq, which are saved Frames corresponding to the normal Period; 506 - The time instance of the beginning of the Period; 507 - The time instance of the detected Anomaly at the Frame F0 (if an Anomaly is detected in this Period); 508 - When the most recent Period Frame F0 replaces the corresponding Model Frame, the Model Period 502 is resampled, normalized, and sent for classification (e.g., to an SVM classifier); 509 - The time instance of the end of the Period. Fig 6 illustrates the time domain method described in Fig 5 using the example of human Step waveforms. The human Step waveforms are presented as the magnitude of three axes gyroscope data. In the top-right part (B), the Model Period is shown, representing the Model Step for the human gait application. In the top-left part (A), the Input Period Data Frames are displayed. In the bottom part (C), the Model Period is shown with partly replaced Model Frames with input Period Frames. Earliness is depicted for the case when an Abnormality is detected. Fig 7 illustrates the estimation of the location of the Model Frame within the localization set of Model Frames for the SST-AD algorithm. In Fig 7, 700 is the Current Frame (Period Frame) that has just arrived from the input.701 - the Model Frames subset (localization window), which consist of four Frames with indexes {j-1.. j+2}, forming the localization set of Model Frames. The number of Model Frames in the localization window can vary depending on the application. For example, for human gait anomaly detection, the localization window size can also be set to 5.702 - The Distance values between the Current Frame and all Model Frames within the localization window. The method of calculating Distance can vary depending on the application. For example, for human gait abnormality detection, the Distance is calculated using the Euclidean norm and averaged across all available gyroscope axes (equation 11). 703 - The search for the Model Frame within the localization window that has the minimum Distance with the Current Period Frame. The result is the index of the found Frame (equation 10). Fig 8 shows examples of the human gait Steps, normal and Abnormal as well. Shown are 8 different types of Anomalies. Fig 9 represents F1 score in % of SST-AD, RTOCSVM-AD, and RTtsSVM-AD algorithms for real-time motion pattern deviation detection for eight gait types. Fig 10 represents Recall in % of SST-AD, RTOCSVM-AD, and RTtsSVM-AD algorithms for real-time motion pattern deviation detection for eight gait types. Fig 11 represents Precision in % of SST-AD, RTOCSVM-AD, and RTtsSVM-AD algorithms for real-time motion pattern deviation detection for eight gait types. Fig 12 represents Earliness in s of SST-AD, RTOCSVM-AD, and RTtsSVM-AD algorithms for real-time motion pattern deviation detection for eight gait types, starting from the beginning of step. Fig 13 depicts an example device implementation for abnormality detection. A sensor device (e.g., a motion sensor) 1301 provides streaming Input Data 1302 to a microprocessor device 1303, which includes an abnormality detection algorithm implemented in firmware 1306. The recorded reference Model Data is stored in Model memory 1305. If the abnormality detection algorithm 1306 detects significant differences between the Input Data and Model Data, the Anomaly Alarm 1307 is triggered, and a functional electric stimulator device or another type of output actuator 1308 is activated. Streaming Input Data 1302 can be delivered to the microprocessor device 1303 from sensor device (e.g., a motion sensor) 1301 using different channels, e.g. wired, wireless (WiFi, BlueTooth etc). EXAMPLES FOR CARRYING OUT THE INVENTION In this description: Algorithm – proposed here the method and algorithm. Sensor – measurement unit which produces the Signal (digital Signal), for example IMU sensor, vibration sensor, PPG sensor, etc. Sample of Data – one dimensional (1D) or multi-dimensional (nD) vector (set) of numbers measured (registered) at one time instance from the Sensor. For the motion (IMU) sensor data, the vector could be accelerometer data vector (3D, three numbers: X, Y, Z), gyroscope data vector (3D, three numbers: X, Y, Z) or both together (6D, six numbers: aX, aY, aZ, gX, gY, gZ). Signal – one dimensional (1D) or multi-dimensional (nD) Samples of numeric data obtained from a sensor and presented as list (array) of the Samples. Input Data (Data) – more general name for the Signal, used as synonym for the Signal here. Data chunk – piece (subarray) of Input Data (Signal), used for delivering the part of the measured Data to the Algorithm. Length (size) of Chunks can be from one Sample to reasonable predefined number of Samples (in the application the Chunk size is chosen to be close to time interval 50ms). Definition of the Chunks length (size) is chosen from the criteria of the communication channel between the Sensor and the Algorithm, but as small as possible for latency reduction. Frame – piece (subarray) of the Data used inside the Algorithm for the anomaly detection. Frame size is defined by the Algorithm specification. Frames are constructed from the content of Data Chunks. Period – repetitive part of the Signal, which repeats several times and describes circular (periodic) nature of the measured (registered) process (e.g., step, motion, heartbeat, vibration cicrle, etc). Periodic Signal - a Signal, which has circular components (Periods): e.g. motion signals (Step and other circular motion); e.g. biological, e.g. Spirography, Electroencephalography (EEG); Electrocardiography (ECG); Electromyography (EMG); Electrooculography (EOG); Electrogastrography (EGG); or Electrodermal activity (EDA) Model – set of parameters, rules, coefficients (stored in memory or as a file, which can be loaded into Algorithm scope) unique for the Algorithm and needed by the Algorithm to perform the Anomaly detection from the Data. Labels – list of labels for the Periods annotated by persons. Used in Algorithm training process and for evaluation metrics calculation. Score – numeric value returned by the prediction method of the Algorithm, which shows an estimate of Abnormality of the Signal (at the current time instance). The Score value is in the range [0, 1]. Threshold – the hyperparameter of the Algorithm, defined on the training phase to maximize the Algorithm’s anomaly prediction accuracy. This is the numeric value in the range [0, 1], the Score values, which are greater than the Threshold are defined as Abnormality occurrence and Anomaly alarm is generated. Earliness – the measure of time needed to detect the Abnormality in the Period. Thus, it is time from the beginning of the Period till the time instance when the Anomaly is detected. Anomaly (Abnormality) - deviation in the Signal from the typical pattern, with larger than typical Signal fluctuations. E.g. wrong, not correct motion, heartbeat, vibration circle, which is reflected in the Signal deviation. Circular buffer – implementation of the FIFO buffer, with possibility to get whole content of the buffer. Step – for the concrete application example it is the human gait step starting from heel off phase (for one leg). In the application the Step is presented as digital 3D gyroscope data Signal. Distance – numeric distance measure between two vectors (e.g. in the Algorithms used the Euclidian distance measure) The invention can be used for gait correction using functional electrical stimulation (FES) of muscles of lower extremities if the deviation from a normal step pattern characteristic for a particular person occurs. Normal step reference Model is constructed from sensor data, preferably validated by a domain expert, e.g., a physiotherapist or a clinician. Step Model is divided into Model Frames, the optimal number of Frames is 5-20 for gait support. During the runtime machine learning algorithms such as SST-AD, RTOCSVM-AD, and RTtsSVM-AD, neural networks are executed after every incoming streaming Data Frame. Therefore, gait deviations are discovered after every new Data Frame is received, i.e., 5-20 times during each step taken by the individual. The invention is used for training or rehabilitation exercising improvements providing haptic, audiovisual or any other feedback to human during the ongoing exercise if deviation from normal motion pattern occurs. Motion reference Model is constructed from sensor data validated by a domain expert: physiotherapist or coach. Motion Model is divided into Model Frames, the optimal duration of Motion Frame is 50 – 100 ms. During the runtime machine learning algorithms such as SST-AD, RTOCSVM-AD, and RTtsSVM-AD, neural networks are executed after every incoming streaming Data Frame. Therefore motion pattern deviations are discovered after every new Data Frame or in every 50 – 100 milliseconds. During experiments the classification dataset was divided into training and test datasets with the ratio of 70:30% for RTtsSVM-AD, 60:20:20% for RTOCSVM-AD. For SST-AD, the training data was composed from collection of normal steps from gait recordings of all the gait types, excluding the gait type, which is being estimated. Algorithm operation contains training mode and prediction mode. • Collecting volunteers’ walking motion data, with simulated gait deviations, using an industry- standard wearable motion sensor (Shimmer3 IMUs (Dublin, Ireland)
[0033] ) according to the clinical trial protocol approved by Estonian National Institute for Health Development, permission No.818. • Creating an algorithms common tools framework, which contains common functionality parts used by all the proposed algorithms. • Implementing three novel real-time anomaly detection algorithms: real-time tslearn support vector machines anomaly detection (RTtsSVM-AD), real-time one class support vector machines anomaly detection (RTOCSVM-AD) and signal shape tracking anomaly detection (SST-AD) algorithms, which can detect gait abnormalities during the swing phase of a step. METHODS To evaluate the performance of the algorithms, simulated gait deviation data was collected from 22 healthy subjects of different genders, ages, heights and weights (Table I). TABLE I: Subjects’ Information Used in This Study (Mean ± Standard Deviation) No. of subjects Age (years) Height (cm) Mass (kg) 15 (Male) 32.1±11.1 177.7±5.5 76.8±15.1 7 (Female) 26.3±5.5 169.5±6.2 62.7±8.9 A. Gait types The most frequent gait abnormalities treatable with FES, were chosen: Ataxic
[0034] , Diplegic
[0035] , Hemiplegic
[0036] ,
[0037] , Hyperkinetic
[0038] ,
[0039] , Parkinsonian
[0040] , Slap
[0041] , Steppage
[0042] and Trendelenburg (lurch)
[0043] gait types
[0044] . B. Data Acquisition During the data collection process, normal and simulated abnormal steps were mixed according to the following procedure: 1. Normal gait steps + one abnormal step 2. Normal gait steps + one abnormal step + normal gait steps 3. Normal gait steps + f · abnormal steps + normal gait steps + f · abnormal steps, where f ∈ N. Each recording contains deviations of one specific disability type. Recordings of normal steps were used as Model data for algorithms training. Simulations were recreating actual patients’ video recordings of gait deviations and instructions from a professional physiotherapist. One wearable sensor was used for lower limb motion data capture. It was placed on forefoot, the most widely used placement of inertial sensors for gait cycle monitoring
[0045] . Only overground walking in straight line was performed. For the proposed algorithms, the initial 3D vector of gyroscope angular velocities was extended with 4th dimension (2), which is magnitude Mag (1) of 3D gyroscope vector. Mag = √(X2+ Y2+ Z2) (1) G4 = {X, Y, Z, Mag} (2) where X, Y and Z are vectors of gyroscope angular velocities around sensor axes, X = [x0, x1, ..., xi, ... , xn]T, Y = [y0, y1, ... , yi, ... , yn]Tand Z = [z0, z1, ... , zi, ... , zn]T, sample index ^^ ∈ ℕ and Mag is the gyroscope vector magnitude (1) calculated from angular velocities using the L2 norm. C. Data Annotation Data annotation was carried out semi-automatically: each recording was segmented into individual steps algorithmically, after that label for each step was assessed and adjusted if needed. Each step was annotated either as normal or abnormal step. Annotation was done by definitive differences between step shapes and with video recordings of data collection process for reference. The total number of gait recordings collected for this study is presented in Table II. Each subject simulated a different set of gait types. Hyperkinetic, Slap and Trendelenburg gait types were collected by only two subjects, so results for these gait types are presented only as a proof of concept. TABLE II. Labeled data collected Gait type Total number of recordings for all subjects Ataxic 32 Diplegic 25 Hemiplegic 17 Hyperkinetic 6 Parkinsonian 29 Slap 8 Steppage 32 Trendelenburg 6 D. Anomaly Classification Measure As seen in Section ”Methods-B”, the data collection procedure creates imbalanced datasets, with the number of normal steps usually 1.5 to 2 times largerthan the number of abnormal steps. This is likely to happen in real life. This means that accuracy cannot be used as a performance analysis metric since, depending on the number of normal or abnormal cases, it does not adjust the score, but calculates the number of correct predictions over all predictions
[0046] ,
[0026] . In this paper, for the algorithms’ evaluation following parameters were calculated: 1. F1 score; 2. Recall; 3. Precision; 4. Real-time factor (RTF) – time of processing, which shows how fast the algorithm can process a signal on the selected computing platform; RTF = processing time [s] / duration of the signal [s] (3) 5. Earliness – In contrast to the RTF, which estimates computational speed of an algorithm, the earliness is defined as the time between the beginning of a step and the moment in time when the step was classified as abnormal and is subject to FES correction. The minimal achievable earliness depends on the gait deviation type. This measure is introduced, because the concrete moment when anomaly is starting to occur can fluctuate, depending on the gait type. ALGORITHMS COMMON TOOLS FRAMEWORK Framework has two operation modes: training mode and prediction mode. a) Training mode: The flow diagram of this mode is shown in Fig.1. The input time series data is divided into individual labeled steps using the step detector. After that, the collection of labeled steps is used in training method of an algorithm. The training procedure is algorithm specific and will be described individually for each algorithm. b) Prediction mode: The flow diagram of this mode is shown in Fig.2a. Here, the input data is arriving continuously by a series of packages or chunks (hereinafter the term chunks is used for the sequential pieces of the input data) into frame collection unit, where the newest frame is collected into a buffer in real-time. This procedure, in more detail, is shown in Fig.2b and Fig. 2c. The size of each chunk is selected small enough for real-time operation (for reasonable latency of anomaly alarming) and large enough for more efficient processing and data transferring through communication channels. Collected frames are synchronous with the ongoing step, which means that the first frame collecting procedure is started only then, when the step beginning is detected by the step detector. Each freshly collected frame F0 is applied to the instep anomaly detector (Fig. 2a, yellow box). In-step anomaly detector uses algorithm specific model and threshold value. In-step anomaly detector returns a prediction score which is compared with the optimal threshold. This prediction process is repeated for every collected frame of every step. B. Step detector The input data for the step detector is each data sample. To operate, each sample in every input chunk is assessed separately. This is done for better synchronization of the step model with the streaming step data. Input for the step detector is gyroscope vector magnitude calculated by (1). The full algorithm for the step detection is shown in Algorithm 1: Input samples are collected to the buffer, in a form of sliding window, and the maximum value of this buffer is compared to the threshold. The function Detect_Step() from the Algorithm 1 is applied to every sample from the input chunk (Fig.2). Output variables step; step_start; step_end are used for the construction of the frames Description of detection algorithm: C. Frames synchronization to step’s beginning Frame synchronization algorithm constructs synchronous frames to motion beginning from the snapshot of a circular buffer, which is constantly updated by incoming data in a form of Frames. This algorithm corresponds to the block ”Collect frame F0 from chunks’ data” in Fig. 3. Thus, if a new step is detected in the ”Step Detector” block, or the current step continues, then samples (from the current chunk) are appended to the circular buffer of length P (Fig.2c). This is done to synchronize frames with the model of a normal step. The step model is synchronous also with the step beginning, to increase quality of the abnormality detection. In Fig. 2c step start corresponds to the moment when a new step is detected. The circular buffer is receiving the newest samples available from the newest chunk C0 available in the detected step. Snapshots of circular buffer are named as ”Frame Fk”(Fig.2c). Frames are made from the fully filled circular buffer, by copying its content to the new array, after every N new samples. In the proposed solution, the N and P are related as (4) The shortest possible interval L for anomaly detection, in this case, is L = max(N, M) (5) D. Generating an alarm For every Frame, each anomaly detection algorithm is returning a score value S. If the S exceeds the threshold value, an alarm signal is generated: (6) The threshold is configured for algorithm’s testing purposes. The selection of optimal threshold value is performed in prediction mode, after scores have been obtained. The optimal threshold is selected individually for every subject and gait type. REAL-TIME TSLEARN SUPPORT VECTOR MACHINES ANOMALY DETECTION ALGORITHM TEST ALGORITHMS IMPLEMENTATION The first tested real-time anomaly detection algorithm RTtsSVM-AD is implementation of SVM using Global Alignment Kernel (GAK)
[0047] , with addition of continuous classification of streaming data. Algorithm works as follows: by cumulatively replacing the Model Frames with new incoming Data Frames, from the IMU sensor, for example, the RTtsSVM-AD algorithm does perform the classification after every incoming Data Frame. A. Preparation of Datasets for RTtsSVM-AD algorithm Each gait recording is processed individually, which is performed by subject and by gait type. To evaluate one gait recording, all the rest of gait recordings are combined into a classification dataset, which is used to train the classifier. Classification dataset is divided into training and test datasets with ratio of 70:30% respectively. Then each step in these datasets is resampled to constant length, which is equal to the length of the longest step in the dataset, and normalized using min-max normalization. B. The training mode of RTtsSVM-AD algorithm During the training mode, it is important to estimate classifier parameters, which impact classification quality. For RTtsSVM-AD algorithm hyperparameter must be estimated. This hyperparameter is used by the GAK, which is making it possible for SVM classifier to classify time series data with different duration of data samples
[0047] . Main goals of training mode for RTtsSVM-AD algorithm are to choose the best parameters, train the classifiers, estimate the waveform of the reference step (or model step) and find optimal threshold values for achieved score values. Multiple classifiers can have similar performance and can be used simultaneously. Every classifier has a unique value of hyperparameter, which can lead to different classification probabilities. This can result in better classification performance. To be able to choose the best parameters, the training procedure for the current algorithm has two parts: classifiers optimization and model step optimization. 1) Classifiers optimization: Optimization of hyperparameter is performed by training multiple classifiers with known values of on training dataset. The test dataset is used to estimate performance of each classifier. Optimization completes if at least one criterion from the following list has been met: • If F1 score on test dataset for a given value is 100%; • If for three different values, F1 score is the same; • If all given values have been tested. 2) Creation of model step: Classifiers with the best F1 scores are chosen. Each normal step from the test dataset, that was also classified correctly, is used to create the model step. To be able to use this model step in real-time prediction mode, we used raw steps data, before resampling and normalization was performed. The model step is calculated as an average waveform from an ensemble of given normal raw steps data. After the training phase is completed, a set of classifiers and corresponding model steps are used in prediction mode. C. Prediction mode of RTtsSVM-AD algorithm In this mode real-time anomaly detection is performed. For this, every ongoing motion is assessed by anomaly detector frame by frame. The incoming Data Frame n of a motion is replacing the corresponding Model Frame n. Then probability of classification of whole periodic motion to abnormal class is obtained. This continues until the end of a repetitive motion and will be repeated. Score (S) is the resulting anomaly detection value, which is calculated as the average of all scores acquired from all classifiers used in real-time classification. where K is the number of classifiers used in in-step anomaly detection, S is averaged score value, sk is scoring value from the kthclassifier. This S will be compared with the selected threshold indicating the presence of potential anomaly. REAL-TIME ONE CLASS SUPPORT VECTOR MACHINES ANOMALY DETECTION ALGORITHM The second tested algorithm is RTOCSVM-AD that is modification of One Class SVM
[0049] . The proposed algorithm is similar to the RTtsSVM-AD in the concept but differs in training and prediction routines. The difference is that classification dataset is divided into training, testing and validation datasets, with ratio of 60:20:20% respectively. Validation dataset is required to convert regular unsupervised One Class SVM into supervised RTOCSVM-AD algorithm. Linear classification kernel is used for this algorithm. There is a computational reason: each measurement sample (repetitive motion may contain several hundred of samples) is considered as a feature. This means, that linear kernel should be capable of separating one class (core) from all the others. The main hyperparameter for this kernel is (nu), which is ”an upper bound on the fraction of training errors and a lower bound of the fraction of support vectors”
[0049] . C. The training mode of RTOCSVM-AD algorithm All classifiers with different hyperparameter values are estimated. The main goal of training mode for RTOCSVM-AD algorithm is identical to the previous algorithm: choose the best classifiers, develop waveform of the reference Model of the motion and find optimal threshold values for achieved score values. Similarly to previous algorithm, multiple classifiers may have similar performance, and can be used simultaneously. Every classifier has a unique value of hyperparameter, which can lead to different classification probabilities. This can result in better classification performance. The training procedure for choosing the best parameters for the current algorithm has two parts: classifiers optimization and motion Model creation. Classifiers optimization is done in three phases (Fig.4): a) Collecting of performance results for all hyperparameter options: In this phase all classifiers with different hyperparameter are estimated. Here, classification is unsupervised – some steps are classified as core and some as outliers. Each classifier is trained on the training dataset. Obtained classification performance is estimated with testing dataset. To estimate real-time performance, a model step is created from test dataset. For this average waveform of normal steps ensemble is calculated from steps that were classified correctly. Next, validation dataset is used for estimation of performance. Estimation is performed in online fashion, where each step from the validation dataset is classified frame wise. During this, the algorithm is collecting the number of a frame corresponding to the detection of outlier for each classifier. If the outlier was not detected (for example for a normal step), then the last frame number of a step is collected. In summary, for every hyperparameter and for every step in the validation dataset, the number of a frame, when each classifier is detecting an outlier, is collected. b) Selection of the subset with best performing classifiers: In this phase best performing classifiers are chosen. This is done in two stages: choosing the best parameters for normal steps classification and choosing cross correlation of these parameters for abnormal steps classification. Results for all the normal steps from validation dataset are estimated at the beginning. The best hyperparameters for normal steps are when detection of abnormality is happening as late as possible or is not happening (this is the number of the final frame in a step). These hyperparameters are used to filter out results for abnormal steps classification. Then those filtered abnormal step classification results are estimated as well. The best performing hyperparameters for abnormal steps are those which detect abnormality as soon as possible. Overall, the best hyperparameters and corresponding classifiers are those, for which simultaneously anomaly is detected as late as possible for normal steps and as soon as possible for abnormal steps. Several classifiers can have similar performance and could be used simultaneously, which should improve the quality of real-time abnormality detection. c) Calculation of scaling value for scores scaling: To estimate performance of RTOCSVM-AD algorithm raw score values should be scaled. Usage of linear kernel results in raw score values which are larger than one (hundreds - thousands). To estimate performance with threshold scores should be scaled. For this scaling value dk is chosen for each classifier as maximum score obtained from classification of test dataset (8). where skrawis classification score for each step in test dataset, k is kthclassifier. Model steps for corresponding classifiers are created in the same way as for the previous algorithm. After the training phase is completed, a set of classifiers, corresponding model steps and scaling values are used in prediction mode. D. Prediction mode of RTOCSVM-AD algorithm As by previous algorithm real-time anomaly detection scoring is performed after every incoming Data Frame. The only difference is that raw score from each classifier is scaled according to formula (9).. where sk is score for a kthclassifier, skrawis raw score from the kthclassifier and dk is corresponding scaling value from (8). For example, smaller raw scores correspond to outliers, which we are looking for. Final score is calculated in the same way as for previous algorithm by averaging scores from all k classifiers (7). SIGNAL SHAPE TRACKING ANOMALY DETECTION ALGORITHM Third evaluated periodic streaming signal anomaly detection SST-AD algorithm is based on the continuous Eucleidian distance calculation between incoming Data Frames and the Model Frames and their order. The main assumption of the proposed algorithm is thata repetitive motion waveform could be split into sufficiently short frames in a way that cross similarities of following frames are negligible, difference between incoming data frames and reference Model frames can be calculated and abnormalities detected. B. The training mode of SST-AD algorithm In a training mode for SST-AD algorithm an average correct motion pattern is developed (Model pattern). The proposed algorithm has two modes to estimate the model. The first mode is prefitted mode, which estimates model step off-line, before the in-step anomaly detection. The second mode is adaptive mode, which estimates step model during the real-time operation from the streaming data. These modes could be used together as a combination. For example, prefit the model off- line and then continuously update it in real-time from the streaming data. a) Prefitted mode for model estimation: Firstly, the training dataset is divided into individual steps, using step detector algorithm. After that, the collection of the steps is filtered by an outlier detector, removing abnormal steps from the collection. Model pattern may be developed in supervised manner, i.e. physiotherapist, clinician or any other domain specialist selects the most accurate motion signals used as motion Model. Model can be developed in an unsupervised manner, for example, using the Principal Component Analysis Based (PCA) outlier detector. Time series reference Model could be an average of several correct motions. After filtering out outliers, the average normal step is calculated from the remaining normal steps ensemble (averages are calculated separately for every axis). b) Adaptive mode for model estimation: The model step is constructed similarly to the prefitted mode. The main difference is the following – the collection of steps is implemented as a circular buffer. First, newly detected steps are compared to already collected steps (history steps collection of size H) for their outlier status. Each incoming step is fully collected and filtered by the outlier detector, as in the prefitted model construction. If the step is classified as normal, it is appended to the circular buffer. Steps are detected by the step detector from the incoming data . If a new step is classified as an outlier, then it is discarded. c) Combined mode for model estimation: Combined mode for the model step construction is using the outlier detector and model step from the prefitted mode and circular buffer from adaptive mode. The prefitted model step is used as a history step, and newly collected steps are filtered by the outlier detector. For real-time performance estimation, combined mode is working as adaptive mode, and the model step and circular buffer are updated every time, when normal step is obtained. C. Prediction mode of SST-AD algorithm In this mode real-time anomaly detection is performed comparing incoming Data Frame with respective Model Frame. For this, every ongoing step is assessed by in-step anomaly detector frame by frame Current Data Frame is composed of the input streaming data and synchronized with a dedicated detector functional unit. Detector could be a step detector, exercise start detector, heartbeat detector. The length of the Data frame is equal to the length of the Model Frame. To obtain the Model Frames, motion Model (2) is sliced into indexed frames Fjmodelof length P with shift N (4), where j = {0, …, q}, are indexes of Model Frames. The main motion anomaly detection procedure starts from the detection of the beginning or a specific instance of the motion. The specific instance could be end of stationary condition, maximum or zero gradient of the motion, Then, if the first frame is collected, the current Model Index is set to zero j = 0 and distances between the current Data Frame (first frame in this case) and three Model Frames with indexes {j, j + 1, j + 2} are calculated (10). For next frames calculation of distances is performed between the current Data Frame and four Model Frames with indexes {j – 1, j, j + 1, j + 2}. For comparison, the amount of frames is chosen according to experimental results so that anomaly detection happens as soon as possible and is sufficiently precise. Distances d{X,Y,Z,Mag}to each axis, of four-dimensional model (2), are calculated individually, as Euclidean distances between the model frame and the current streaming frame. In (10) final distance Djis calculated as average of individual distances to four axes (11). After that, the index jqminwith the smallest distance between the model frame and the current streaming frame (10) is compared to the index j of the current model frame Fjmodeland a score value is calculated as is shown in (12) This score S will be compared with the selected threshold, which will result in alarm signal (6), if the threshold has been passed, finalizing the anomaly detection. PERFORMANCE EVALUATION Results for all the algorithms, RTtsSVM-AD, RTOCSVMAD and SST-AD, are presented in this section. This section is organized as follows: evaluation setup, where all the parameters used in this evaluation are described, and description of results. TABLE III: Parameters and quantitative values for all variables and notations Parameter (eq nr.) RTtsSVM RTocSVM SST-AD M Frame collection 12 12 12 eq () buffer_length [samples] 51 51 51 eq () Step detector threshold [samples] 100 100 100 step_min_length [samples] 256 256 256 100..1000, step 100 gamma - - 5..100, step 10 Synchronization of α 0 0 0.5 frames with the step β 1 1 2 beginning N 12 12 12 P 12 12 24 M 12 12 12 0.1..1.0, step nu (ν) - - 0.1 Outlier detector PCA n comp - - 3 parameters n selected - - 1 History steps buffer size H - - 10 The number of frames was optimized for SST-AD algorithm and the best results were obtained with five frames and H =10. Actions with first and second collected incoming frames are described in section “Prediction mode of SST-AD algorithm”, and starting from third frame, distances are calculated for model frames with indexes {j – 1, j, j + 1, j + 2}. B. Results Achieved results for all the algorithms are described here. a) F1 scores: In Fig. 9 it could be observed that SSTAD algorithm is outperforming other algorithms in consistency and is achieving highest F1 scores. The only weaknesses were Slap and Trendelenburg gait types, where RTOCSVM-AD and RTtsSVM-AD algorithms performed similarly or outperformed it. For Slap gait type RTtsSVM-AD and RTOCSVMAD algorithms performed similarly. For Trendelenburg gait type RTOCSVM-AD algorithm performed the best, and two other algorithms performed similarly. RTtsSVM-AD algorithm outperformed RTOCSVM-AD algorithm for Parkinsonian, Slap and Steppage gait types. For other gait types RTOCSVMAD algorithm outperformed RTtsSVM-AD algorithm. Results for RTtsSVM-AD algorithm are following. The algorithm can detect abnormalities in real-time for some gait types. Best results were obtained for Steppage, Slap, Parkinsonian and Hemiplegic gait types with mean F1 scores of 58.19.7%, 55.410.3%, 55.226.9% and 53,121.2% respectively. F1 scores for the rest of the gait types were 42.724.0, 49.516.6%, 37.023.1% and 42.58.6% for Ataxic, Diplegic, Hyperkinetic and Trendelenburg gait types respectively. However, for these gait types for some subjects the algorithm was able to detect abnormalities during the ongoing step in real-time operation, as can be seen from the standard deviation. Results for RTOCSVM-AD algorithm could be observed next. This algorithm can detect abnormalities in real-time for all gait types, except for Trendelenburg gait type. The best results were obtained for Hyperkinetic, Ataxic, Hemiplegic gait types with mean F1 scores of 64.59.8%, 59.917.7% and 54.414.5% respectively. Results for Diplegic, Parkinsonian, Slap and Steppage gait types were 51.713.7%, 54.219.8%, 52.612.2% and 52.69.6% respectively. Results for Trendelenburg gait type was 49.312.2%. For some subjects the algorithm was able to detect abnormalities in real-time. Finally, results for SST-AD algorithm could be observed. As well as for previous algorithms, SST-AD algorithm was able to detect abnormalities for all gait types during an ongoing step in real-time, except for Trendelenburg gait type. Best results were obtained for Hyperkinetic, Parkinsonian and Steppage gait types with mean F1 scores of 95.85.9%, 90.711.8% and 90.411.2% respectively. The algorithm performed well for Diplegic, Hemiplegic and Ataxic gait types as well, with mean F1 scores of 88.813.1%, 85.312.5% and 84.514.9% respectively. Results for Slap and Trendelenburg gait types were 64.97.6% and 45.69.3% respectively. b) Recall: In Fig.10 it could be observed that recall was high for most of the gait types and for every algorithm. Exceptions are low scores for Slap and Trendelenburg gait types for SST-AD algorithm and for Hemiplegic gait type for RTOCSVM-AD algorithm. The most consistent recall was for SST-AD algorithm. For RTtsSVM-AD algorithm recall is high for most of the gait types, with a mean recall score over 84%, where the lowest score was 76.1% for Diplegic gait type. For RTOCSVM-AD algorithm recall is also high for most of the gait types, with mean recall score over 81%, where the lowest score was 70.8% for Hemiplegic gait type. For SSTAD algorithm recall is also high for most of the gait types, with mean recall score over 86%, with the lowest score of 73.8% for Trendelenburg gait type. c) Precision: In Fig. 11 it could be observed that highest precision was obtained by SST-AD algorithm for most of the gait types. This excludes Slap and Trendelenburg gait types, which explains low F1 scores for them. RTtsSVM-AD and RTOCSVM-AD algorithms both had low precision, which was the main reason for low F1 scores. RTtsSVM-AD algorithm has a high number of false positives, where normal steps were classified as abnormal, with all the precision results lower than 47%. For SST-AD algorithm precision is high, with mean value over 78%, with the lowest scores of 33.4% and 57.5% for Trendelenburg and Slap gait types respectively. This means that SST-AD algorithm has small number of false positives for all gait types, excluding Slap and Trendelenburg gait types. d) Earliness: In Fig. 12 results for earliness could be seen. SST-AD algorithm had most consistent earliness values for most of the gait types. RTtsSVM-AD algorithm was detecting abnormalities earliest for Ataxic gait type, however detection was not consistent as can be seen from F1 scores. RTOCSVM-AD algorithm had similar performance to the SST-AD algorithm, but a fraction slower. For Steppage gait type SST-AD algorithm was able to detect abnormality earlier, than other algorithms, in 0.4 seconds, and RTOCSVMAD algorithms was close behind with detection time of 0.5 seconds. Time of detection for other gait types was mostly lower than one second for all algorithms, which corresponds to abnormality occurrence in most of the presented gait types during swing phase of a step. This shows that all the algorithms were able to detect abnormalities during swing phase of ongoing step. Most inconsistent detection times were for Ataxic, Diplegic and Parkinsonian gait types, which can be caused by multiple abnormal gait steps in a row. e) RTF: The value of RTF represents how much time algorithms needs on described platform to assess one second of streaming data. In table III it could be seen that on average RTF was 9.136.54 for RTtsSVM-AD algorithm, which means that, to assess one second of streaming data, algorithm requires about nine seconds of computation time. This is due to expensive five- fold cross validation for probability calculation in prediction mode of RTtsSVM-AD algorithm. For RTOCSVM-AD algorithm real-time factor was on average 0.16. RTF for SST-AD was around 0.09, which means that SST-AD and RTOCSVM-AD algorithms do not require high computational power and can run in real-time on low power embedded computers or microcontrollers.ACKNOWLEDGMENT This work has been supported by Estonian Research Council, via research grant No PRG424 and by the Center of Excellence (TK) project TAR16013 (EXCITE). This study was co-funded by the European Union and Estonian Research Council via project TEM-TAXXX. REFERENCES [1] J. Bertolote, “Neurological disorders affect millions globally: Who report,” World Neurology, vol.22, no.1, p.1, 2007. [2] V. L. Feigin, A. A. Abajobir, K. H. Abate, F. Abd-Allah, A. M. Abdulle, S. F. Abera, G. Y. Abyu, M. B. Ahmed, A. N. Aichour, I. Aichour et al., “Global, regional, and national burden of neurological disorders during 1990–2015: a systematic analysis for the global burden of disease study 2015,” The Lancet Neurology, vol.16, no.11, pp.877–897, 2017. [3] P. M. Kluding, K. Dunning, M. W. O’Dell, S. S. Wu, J. Ginosian, J. Feld, and K. McBride, “Foot drop stimulation versus ankle foot orthosis after stroke: 30-week outcomes,” Stroke, vol. 44, no.6, pp.1660–1669, 2013. [4] L. Miller, A. McFadyen, A. C. Lord, R. Hunter, L. Paul, D. Rafferty, R. Bowers, and P. Mattison, “Functional electrical stimulation for foot drop in multiple sclerosis: a systematic review and meta-analysis of the effect on gait speed,” Archives of Physical Medicine and Rehabilitation, vol.98, no.7, pp.1435–1452, 2017. [5] R. Li, C. Song, D. Wang, F. Meng, Y. Wang, and Q. Tang, “A Novel Approach for Gait Recognition Based on CCLSTM-CNN Method,” in 2021 13th International Conference on Intelligent Human-Machine Systems and Cybernetics (IHMSC). Hangzhou, China: IEEE, Aug. 2021, pp.25–28. [Online]. Available: https: / / ieeexplore.ieee.org / document / 9556108 / [6] F.-C. Wang, Y.-C. Li, T.-Y. Kuo, S.-F. Chen, and C.-H. Lin, “Real-time detection of gait events by recurrent neural networks,” IEEE Access, vol.9, pp.134849–134857, 2021. [7] L. Ahrens, J. Ahrens, and H. D. Schotten, “A machine-learning phase classification scheme for anomaly detection in signals with periodic characteristics,” EURASIP Journal on Advances in Signal Processing, vol. 2019, no. 1, p. 27, May 2019. [Online]. Available: https: / / doi.org / 10.1186 / s13634-019-0619-3
Claims
CLAIMS 1. A method for a real-time motion abnormality detection of an individual in a system comprising a motion sensor attachable to a body of the individual and a microprocessor device for receiving and processing a signal from the motion sensor, the method comprising: providing a Reference Model representing a normal motion for the individual; receiving a periodic non-sinusoidal motion signal stream from the motion sensor; dividing said motion signal stream into distinct Frames; comparing said Frames against corresponding parts of the Reference Model, deducing abnormalities in said motion signal, if said Frame does not match with the Reference Model, and triggering an abnormality alarm in response to said deducing abnormalities.
2. The method according to claim 1, wherein said motion sensor is an inertial motion sensor, attached to a forefoot of the individual.
3. The method according to claims 1 to 2, wherein said motion signal represents human gait, repetitive workout routine, or rehabilitation exercises.
4. The method according to claims 1 to 3, comprising substituting said Frame into said Reference Model, thereby creating a modified Reference Model and comparing said Modified Reference Model with the Reference Model and deducing abnormalities if said Modified Reference Model is different from the Reference Model.
5. The method according to claims 1 to 4, comprising storing said frames in a circular buffer.
6. The method according to claims 1 to 5, wherein for determining deviations from the Reference Model, using machine learning methods such as SVM, NN, LCTM, 1D- CNN or Matrix Profiles.
7. The method according to claim 2, wherein the running Data Frame is replaced in the Reference Model and one copy of an abnormality detection classification algorithm is executed.
8. The method according to claims 1 to 3, comprising receiving at least two subsequent Frames and comparing said two subsequent Frames with corresponding parts of said Reference Model.
9. The method according to claims 1 to 3 and 8, where, for the purpose of detecting abnormalities in the buffer content, the Euclidean distance between the content of each new Data Frame and the Model Frames j-1, j, j+1, j+2 are compared.
10. The method according to claims 1 to 9, wherein the duration of the Frames is selected from 50 to 100ms.
11. The method according to claim 10, wherein the anomaly detection is executed after the next frame is received.
12. The method according to claims 1 to 3, wherein the Frames are synchronized with the beginning of the period of the periodic signal where the first Frame of the period exactly coincides with the period’s beginning time instance and following consecutive frames are forming the stream of the Frames with predefined overlapping factor.
13. The method according to claim 12, wherein only a limited number of consecutive frames are distinguishable from each other.
14. The method according to claim 13, comprising tracking the, evolution of the Period’s phases from limited number of local frames around the location of a Current Period’s Frame.
15. The method according to claim 14, wherein a final distance Dj between the current Frame and localized Frames is calculated as an average of individual distances to four axes.
16. The method according to claim 15, wherein an index with a smallest distance between the localized model Frame and the current streaming Frame is compared to the index of the current model Frame.
17. The method according to claim 16, the score value is calculated as a scaled difference between the smallest distance index and the index of the current model frame.
18. A system for a real-time motion abnormality detection, the device comprising a motion sensor, attached to the body of an individual and connected to an input of a microprocessor device, said microprocessor device having an Anomaly Alarm device at its output, said system configured to carry out any of the methods according to claims 1 to 17.