Clinical decision-making tool

A wearable sensor system with IMU fusion algorithms addresses the limitations of subjective clinical assessments by providing objective, real-time joint motion analysis, enhancing rehabilitation protocols and surgical outcomes for shoulder surgery.

WO2026120047A1PCT designated stage Publication Date: 2026-06-11J & M TECH LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
J & M TECH LTD
Filing Date
2025-12-03
Publication Date
2026-06-11

AI Technical Summary

Technical Problem

Current methods for assessing joint function after shoulder surgery, such as clinical assessments and questionnaires, are subjective, infrequent, and poorly correlated with daily activities, leading to suboptimal rehabilitation outcomes and a lack of understanding of how shoulder activity affects tissue healing, particularly in the critical post-surgery period.

Method used

A wearable sensor system using a single IMU with sensor fusion algorithms provides real-time joint motion data, combining accelerometer, gyroscope, and magnetometer data to objectively assess joint motion and detect early complications, with machine learning algorithms to analyze movement quality and patient compliance.

🎯Benefits of technology

The system offers objective, real-time monitoring of joint motion, enabling personalized rehabilitation protocols, early detection of complications, and improved surgical outcomes by quantifying soft tissue healing and muscle function, reducing the subjectivity of conventional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure EP2025085413_11062026_PF_FP_ABST
    Figure EP2025085413_11062026_PF_FP_ABST
Patent Text Reader

Abstract

A system for providing real-time joint motion data to assess the capability of a joint, the system comprises a single wearable sensor for providing real-time joint motion data, the sensor comprises a MCU and an IMU, the microcontroller unit (MCU) interrogates the inertial measurement unit (IMU) using a serial data communications protocol and receives raw data in digital format from the IMU at a generally fixed sample rate, in which that digital data (acceleration, angular velocity and magnetic field strength) is processed by a sensor fusion algorithm and the output from that algorithm is a quaternion vector.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CLINICAL DECISION-MAKING TOOL

[0002] This application claims the benefit of priority from UK patent application numbers 2417724.8, 2502545.3, 2504971.9 and 2505434.7, the contents of which are hereby incorporated by reference.

[0003] The present invention relates generally to a wearable sensor and particularly, although not exclusively, to the use of a single sensor solution for acquiring data and applying it to clinical analysis and decision making, including pre-operative planning, interoperative analysis, and post-operative rehabilitation in relation to joints (including shoulders, hips and knees).

[0004] Conventional shoulder surgery, for example, typically relies on clinical assessments to assess joint function after soft tissue repair or joint replacement. Currently, there is no way to know if patients are advancing too quickly with all their shoulder activity, i.e. rehabilitation exercises and activities of daily living (ADLs) and potentially compromising tissue healing, if they are not doing enough activity to mechanically load the repair tissues in a way that enhances healing or they have an underlying pathology such as frozen shoulder or rotator cuff pain. Traditionally, post-shoulder surgery patients are monitored using a practitioner-dependent combination of periodic office assessments, self-reported questionnaires, goniometry for ROM, and functional tests such as the Timed Up and Go.

[0005] However, these are problematic given their subjectivity, infrequency and poor correlation with actual daily activities performed by patients[1]. Consequently, understanding how shoulder activity or pathology affects repair tissue healing longitudinally, particularly during the critical healing period of the first 12 weeks after surgery, would provide the following benefits:- (a) careful observation to identify complications early, (b) rehabilitation to achieve pre-arranged milestones, (c) regular contact with care providers, and (d) patient motivation and compliance with postoperative orders. This would support a more personalized program of rehabilitation, which would account for passive muscle tensioning achieved during surgery, and the prescribed level of activity that would stimulate healing following either soft tissue repair and joint replacement surgery.

[0006] In the case of joint replacement surgery, there are commercially available pre-operative 3D planning software that assist with implant component sizing and placement in the boney tissue. However, specific details on the condition of the surrounding soft tissues, e.g. muscle length, moment arm, force-generating capacity are not accounted for during implant trialing, which is known to contribute towards sub-optimal outcomes in selected patients. For example, healing of the rotator cuff repair tissues after surgery is a significant clinical problem with 20%–76%[2-7]of rotator cuff repairs failing and 42%–78%[8-10]of these failures occurring within the first 12 weeks after surgery. Patient demographic factors that are thought to have a negative effect on repair tissue healing and clinical outcomes include patient age, size and chronicity of the rotator cuff tear, muscle atrophy, fatty degeneration, the optimum level of activity that promotes healing after surgery size, and the physical therapists' biases[11-12]. Similarly, changes in muscle function after reverse shoulder replacement surgery (RSA) have been indicated as a potential cause for acromial stress fractures, with an incidence rate of up to 10%

[0013] . Theoretically, since the shoulder center of rotation is being distalized and medialized after an RTSA, there is increased tension on the deltoid muscle origin, which can in turn increase strain and cause a stress reaction / fracture of the acromion. Consequently, the ability to quantify percentage of fatty infiltration of the rotator cuff and deltoid muscles to discern if and how functional the muscles are before surgery, could potentially aid in the decisionmaking process and refine the rehabilitation protocol after surgery. For example, if a RTSA is the optimum choice in a patient with an intact but potentially non-functioning rotator cuff.

[0007] Detailed segmented anatomical structures of the soft tissues (Figure 1) require additional imaging and exposure to ionizing radiation from MRI and cost to an already over-stretched healthcare system. Dual-energy CT (DECT) has the potential to enhance the visual acuity of soft tissue structures to visualize both osseus and soft tissue anatomy from a single imaging mode at no additional with comparable radiation dose to the patient compared to single-energy CT. However, this novel imaging technique is not used routinely in clinical practise.

[0008] Figure 1 Automatic segmentation of CT scan data highlighting the key muscle and ligament groups in the shoulder to assist with setting the optimum passive tension after prosthesis placement

[0009] The effects of surgical and nonsurgical clinical interventions of the shoulder are frequently evaluated in terms of subjective patient-reported outcomes, i.e., questionnaires or imaging-based structural healing outcomes. The conventional physical examination includes inspection, palpation, active and passive movements supported with several analogue scales and tests, which are used to evaluate shoulder function, e.g., the Constant-Murley score (CMS), the Simple Shoulder test (SST), the Visual Analogue Scale (VAS) and the Disability of the Arm, Shoulder, and Hand (DASH) score. However, despite their easy-to-use and wide application in clinical settings, these scores have a ceiling effect, are intrinsically subjective, and prone to inaccuracy in approaching diagnosis, follow-up and treatment of the pathologies. Furthermore, the optimal approach to post-operative rehabilitation is unknown with few institutions able to adapt their rehabilitation protocol based upon prosthesis type or surgical approach despite the common assertion that different approaches are necessary. Additionally, it is not known whether early rehabilitation promotes more rapid recovery and return to normal activities of daily living.

[0010] A goniometer has been a standard tool to assess the ROM of the shoulder joint in the physiotherapeutic or orthopedic room. However, the most significant limitation of this device is that the accuracy of the results often depend upon the physician’s skills and experience and their engagement. Wearables sensors have the potential to evaluate shoulder movement objectively following shoulder surgery providing a unique insight into functional recovery outside of the clinic. The data from the accelerometer are used to determine the deviation of the motion sensor from the horizontal and vertical axes, compensating for the drift error in axes perpendicular to the axis of the gravity vector. On the other hand, the gyroscope data positively minimize the measuring device’s latency. Thus, the combination of an accelerometer and a gyroscope allows for measuring more dynamic motion. However, they are typically used to measure joint angles and provide no additional insight related to movement quality. Furthermore, detection of early-onset complications such as frozen shoulder, stiff shoulder, bursitis and subacromial impingement, which can comprise patient recovery, requires face-to face consultation and detailed examinations. Dedicated accelerometer-derived measures, both in the time or frequency domain, can be developed with machine learning algorithms to assess movement quality longitudinally, e.g., velocity, amplitude and frequency and filter patients who are either trending to normalcy, non-compliant or at risk of complication.

[0011] References

[0012] [1] Patterson, Joseph T., Hao-Hua Wu, Christopher C. Chung, Ilya Bendich, Jeffrey J. Barry, and Stefano A. Bini. 2020. “Wearable Activity Sensors and Early Pain after Total Joint Arthroplasty.” Arthroplasty Today 6 (1): 68-70

[0013] [2] Rhee YG, Cho NS, Yoo JH. Clinical outcome and repair integrity after rotator cuff repair in patients older than 70 years versus patients younger than 70 years. Arthroscopy. 2014;30:546-554.

[0014] [3] Rodeo SA, Delos D, Williams RJ, Adler RS, Pearle A, Warren RF. The effect of platelet-rich fibrin matrix on rotator cuff tendon healing: a prospective, randomized clinical study. Am J Sports Med. 2012;40: 1234-1241

[0015] [4] Chung SW, Kim JY, Kim MH, Kim SH, Oh JH. Arthroscopic repair of massive rotator cuff tears: outcome and analysis of factors associated with healing failure or poor postoperative function. Am

[0016] J Sports Med. 2013;41:1674-1683.

[0017] [5] Kluger R, Bock P, Mittlbock M, Krampla W, Engel A. Long-term survivorship of rotator cuff repairs using ultrasound and magnetic resonance imaging analysis. Am J Sports Med. 2011;39:2071 -2081

[0018] [6] Tashjian RZ, Hollins AM, Kim HM, et al. Factors affecting healing rates after arthroscopic double-row rotator cuff repair. Am J Sports Med. 2010;38:2435-2442.

[0019] [7] Wu XL, Briggs L, Murrell GA. Intraoperative determinants of rotator cuff repair integrity: an analysis of 500 consecutive repairs. Am J Sports Med. 2012;40:2771-2776.

[0020] [8] Barth J, Andrieu K, Fotiadis E, Hannink G, Barthelemy R, Saffarini M. Critical period and risk factors for retear following arthroscopic repair of the rotator cuff. Knee Surg Sports Traumatol Arthrosc. 2017; 25:2196-2204.

[0021] [9] lannotti JP, Deutsch A, Green A, et al. Time to failure after rotator cuff repair: a prospective imaging study. J Bone Joint Surg Am. 2013; 95:965-971.

[0022]

[0010] Miller BS, Downie BK, Kohen RB, et al. When do rotator cuff repairs fail? Serial ultrasound examination after arthroscopic repair of large and massive rotator cuff tears. Am J Sports Med. 2011;39: 2064-2070.

[0023]

[0011] Gladstone JN, Bishop JY, Lo IK, Flatow EL. Fatty infiltration and atrophy of the rotator cuff do not improve after rotator cuff repair and correlate with poor functional outcome. Am J Sports Med. 2007; 35:719-728.

[0024]

[0012] lannotti JP. Full-thickness rotator cuff tears: factors affecting surgical outcome. J Am Acad Orthop Surg. 1994;2:87-95.

[0025]

[0013] Kazemi, Acromial stress fracture after anatomic shoulder arthroplasty: a case report, JSES Rev Rep Tech. 2024 May; 4(2): 266-271.

[0026] There are number of commercially available 3D planning software’s tailored for shoulder joint replacement surgery: Table 1. They provide a validated method for automatic segmentation and 3D reconstruction of the boney tissue, humeral and glenoid-sided planning, and deformity correction using reference points, axes, and planes for reference coordinates, and ROM / impingement assessment at specific locations. However, these software platforms lack functional referencing of implant component position, which is known to be more accurate than morphologic “local anatomy” referencing. A target zone for both glenoid and humeral sided implant position that maximizes impingement free range of motion accounting for scapular position in the body plane and scapulothoracic motion is unknown. There is also a lack of information related to patient’s native joint offsets, ADL’s, comorbidities, and other patient-specific parameters, e.g. muscle atrophy, cuff integrity, and bone density. Moreover, the optimum passive force created by ligaments and muscles around the joint after surgery is unknown and is crucial for optimum surgical outcome. Table 1 Current generation pre-operative planning software tools tailored for shoulder replacement surgery; PSI -patient-specific instrumentation.

[0027] The present invention seeks to provide improvements in or relating to clinical diagnosis and decision making.

[0028] Aspect and embodiments of the present invention may provide or relate to systems, methods, algorithms and sensors. An aspect provides a system for providing real-time joint motion data to assess the capability of a joint, the system comprises a single wearable sensor for providing real-time joint motion data, the sensor comprises a MCU and an IMU, the microcontroller unit (MCU) interrogates the inertial measurement unit (IMU) using a serial data communications protocol and receives raw data in digital format from the IMU at a generally fixed sample rate, in which that digital data (acceleration, angular velocity and magnetic field strength) is processed by a sensor fusion algorithm and the output from that algorithm is a quaternion vector.

[0029] A library / sensor fusion algorithm may acquire data from an accelerometer, gyroscope (6-axis fusion) and magnetometer (9-axis fusion) and provides real-time motion-sensor data fusion.

[0030] Raw output from a sensor fusion algorithm may be a vector with variable magnitude and orientation defined by 4 quaternion values, in which the vector is normalised to unify length.

[0031] Quaternion rotations may be applied to the data to bring the frame of the sensor as close as possible to a normal orientation it is expected to adopt.

[0032] The rotations may be performed mathematically and may be: 90deg roll followed by -90deg yaw, which is achieved by +90deg rotation about the Z axis.

[0033] The rotations may be: a 90deg rotation about the y-axis followed by a 90deg rotation about the z-axis.

[0034] In some embodiments the system may function based on a user adopting a default pose, and the output normalised quaternion at this instant may represent the offset of the sensor data stream from what is called the ‘identity pose’ which is represented in quaternion notation as (1,0,0,0). This offset may be captured at the instant when the user is standing or sitting in a default pose and then this offset (by matrix algebra) may subsequently be subtracted from the stream of quaternion data so that each sample is then represented as a deviation from the identity pose.

[0035] Offset quaternion data may be converted into Euler angles, for example expressed in radian units.

[0036] Euler angles may be assigned to an avatar to animate a limb.

[0037] Euler angles may be assigned to an avatar to animate an arm as follows:

[0038] o X = y - 1.95

[0039] o Y = -x

[0040] o Z = z - 1.4

[0041] where X, Y, Z is the orientation vector for the avatar arm and x,y,z is the orientation vector for the sensor where X is arm rotation, Y is abduction and Z is forward flexion.

[0042] A numerical algorithm may be used to determine the angle of ‘tilt’ in the orientation of the sensor around an arm. The algorithm may rely upon the capture of a short vector of data samples from the sensor during a gesture which is controlled to be correct forward flexion movement.

[0043] This vector of data samples may then iteratively offset about each of the two axes that are expected to be uninvolved in forward flexion to find the offset angle at which the resulting offset vector of data shows the smallest movement on the two ‘uninvolved’ axes, and in which the offset angles that are obtained by this algorithm are referred to as ‘tilt’ angles. If these tilt angles have been determined by the firmware then they may be applied as quaternion offset to the normalised and rotated quaternion data immediately prior to determining the offset from identity at the initial pose.

[0044] If these tilt angles have not been determined then in some embodiments no offset is applied to the normalised and rotated quaternion data apart from the offset from identity at the instant of the initial pose. Also provides is a method for compensating the effects of spatial offset in 9-axis IMU sensors, comprising a mathematical formulation for transforming gyroscope, magnetometer, and accelerometer measurements between rigidly attached frames, the method accounts not only for orientation differences but also for translational effects, such as Coriolis and centrifugal acceleration, in which synthetic IMU data is generated from known rotational motion, and angular acceleration is estimated using a Kalman filter with Rauch-Tung-Striebel smoothing, whereby the full compensation method improves accuracy over naive rotation-only methods, particularly for accelerometer data.

[0045] Also provided is a sensor system to provide real-time joint motion data to assess the capability of a joint, the system comprises a wearable sensor for providing real-time joint motion data, the sensor is stand-alone whereby only one sensor is needed to measure multiplanar movement at a single joint, the sensor comprises a combination of a tri-axial accelerometer, a tri-axial goniometer and a tri-axial magnetometer, the sensor continuously reports its orientation about its own internal tri-axial frame, and the sensor comprises firmware to interpret raw signals from these constituent components in order to derive angular orientation data for the sensor about each of three mutually orthogonal axes, characterised in that orientation data is determined relative to an arbitrary cartesian coordinate frame of reference so that at any time the orientation of the sensor may be defined as lying parallel to any particular axis of the frame of reference, and thereby having an angular offset of zero, such that all subsequent measurements of orientation are defined relative to that reference orientation, whereby the sensor can be fitted to a limb in any orientation and the wearer can be instructed to perform a gesture using the limb, and the sensor may then be zeroed using the gesture, such that all subsequent measurements are defined relative to that reference.

[0046] Aspects and embodiments of the present invention may provide or relate to one or more of the following.

[0047] A. Design, Hardware & Battery-Life:

[0048] I. Sensor Design:

[0049] o Tailored for patient anatomy, comfort, compliance, repeatability, cost and application

[0050] o Single sensor hardware (one IMU per segment)

[0051] o 9-axis IMU

[0052] o 6+3 axis IMU architecture (separate magnetometer)

[0053] o Other biochemical sensors, e.g. temperature, blood oxygen level, pH, hear rate, respiration rate o Sensor fusion algorithms to combined data from multiple sensors

[0054] II. Sensor Placement:

[0055] o Shoulder: IMU securely attached to distal third of lateral upper arm with a self-adhering strap approximately 8 cm above lateral epicondylar of the humerus bone, and dorsal wrist o Hip: Approximately 8cm above knee joint

[0056] o Knee: Proximal tibia

[0057] III. Strapping Requirements:

[0058] o Elastic in single plane

[0059] o Anti-slip internal surface for enhanced grip on skin surface to reduce motion artefact

[0060] o Single band + stopper (separate vs integrated)

[0061] o Anti-toggle features

[0062] IV. Soft Sensors / Textile-Based Sensors:

[0063] o Silicone gel vs rigid ABS plastic

[0064] V. Sensor Miniaturization:

[0065] o Rigid plastic casing to house flex rigid PCB’s + standard battery (indirect contact with skin) o Elastoplast (direct contact with skin)

[0066] o Reduced size of sensor hardware using a micro-solid state battery

[0067] VI. Power Efficiency and Energy Acquisition:

[0068] o LiPo vs lithium ion vs micro-solid state battery

[0069] o Self-powered sensors

[0070] o Lithium battery - under normal use, 1 week

[0071] ■ Reduced number of charging cycles

[0072] ■ Pre-defined / Controlled Sensor “Off” states

[0073] • Switched on by a simple shake of the device while the app is open. If the device is shaken while the app is closed then it will turn on briefly butthen switch off again. This ensures that the device does not switch on accidentally and stay on and thereby drain the battery.

[0074] • Connecting via charger. This off-state is intended for shipping because it leaves the device fully switched off with virtually zero current drain and it cannot be switched on due to the vibration during shipping. We have assumed that it would not be an inconvenience for a user to need to connect to a charger on first arrival to switch the device on after shipping.

[0075] • Closing the app and set the device on a shelf - after a short interval the device will automatically switch off. The device should be able to stay in this “off state” for over 3 months without draining the battery.

[0076] • Use a command within the app to switch the device off - in this case it will be fully switched off for shipping. In this case the device should be able to survive indefinitely without draining the battery.

[0077] B. Application:

[0078] I. Therapeutic:

[0079] ■ Orthopaedics

[0080] • Shoulder, hip (ball and socket) (compatible with sitting and standing poses) o Glenoid morphology pre-op - does degree of retroversion / posterior erosion lead to a different pattern of motion restriction and recovery post-op? - inform where a custom implant rather than "off the shelf implant might be better. o Does degree of lateralisation pre- to post-op influence degree of functional recovery

[0081] o Provide a proxy for patients who fall outside of younger patients 40 - 50 with rotator cuff pathology (rTSA) and older patients with diseased joints (aTSA) o Track movement deficit relative to contra-lateral limb with patients on waiting list for surgery (triage)

[0082] o Bio-haptics - More target rehab and early deltoid activation - based upon shoulder pre-op function (optimised outcomes) via biofeedback from avatar coach

[0083] • Scapulothoracic movement vs simple ball-joint movement

[0084] • Knee (hinge-joint) - sitting pose only (femur remains parallel with the floor and capture forward flexion)

[0085] ■ Neurology:

[0086] • Parkinson tremors

[0087] ■ Rheumatology:

[0088] ■ Other MS ailments:

[0089] o Elite sports:

[0090] ■ Composite movement (comparison with contra-lateral arm)

[0091] o Veterinary:

[0092] ■ Tailored equine rehab

[0093] • Limb velocity

[0094] II. Data Collection - Research Purposes:

[0095] III. Intra-Operative Guidance / Biomechanical Software Planner Validation

[0096] ■ With and without gesture (latter supported sterility measures)

[0097] ■ Feeding the planner proper data that involves scapula movement

[0098] ■ Passive ROM assessment both during after surgical closure

[0099] ■ Simulated ADL’s

[0100] ■ Confirmation of implant component size vs bony anatomy

[0101] ■ Perfect feedback to develop accurate predictions of range, impingement and lift-off based upon component placement relative to patient anatomy

[0102] ■ Effect of either distalizing, medializing, laterializing implant, centre of rotation

[0103] ■ Risk of bony and implant impingement, identifying potential impingement point during ROM

[0104] ■ Isolating effect of scapula motion

[0105] C. Measurements / Mode:

[0106] I. Data

[0107] ■ Demographic data, range, PROMs, function (movement quality indices)

[0108] o L / R arm data capture

[0109] o Metadata

[0110] o ID, Sex, Age, Weight, Height, Session Timestamp, Shoulder Procedure (CSSD code) o Sensor Location

[0111] o Motion Arcs

[0112] o Post-operative Intervention

[0113] o Calibration data (sensor lying flat and stationary on a hard surface)

[0114] o Dominant hand

[0115] o (Optional) Perceived general fatigue level (e.g. on scale 1-5 or 1-10)

[0116] o Other identified conditions (if might affect measurement - e.g. back pain, or any pain in general, scoliosis, any condition that might cause body tilt, conditions that might cause involuntary movements etc.)

[0117] o Movement duration features

[0118] ■ Duration - delayed by pathology / pain

[0119] ■ Termination - delayed by pain avoidance or control issues

[0120] ■ Duration ratio - deviation suggestive of compensation or pathology o Movement quality features

[0121] ■ SpAL

[0122] ■ Entropy

[0123] ■ Flatness

[0124] ■ Centroid

[0125] ■ FFT Band_0 (0-3Hz) (3-8Hz) (8Hz+)

[0126] ■ LDJa

[0127] ■ LDJv

[0128] ■ APL

[0129] ■ Composite Score

[0130] ■ Period

[0131] ■ Amplitude

[0132] ■ Max power

[0133] ■ Spectral Spread

[0134] o Biomechanical features

[0135] ■ ROM - movement range limitation

[0136] ■ Average movement intensity - movement vigor / speed

[0137] II. Calibration:

[0138] ■ Correction of sensor drift

[0139] ■ Use of the magnetometer to identify system’s orientation relative to Earth’s adequate calibration

[0140] ■ Reliability of joint angle estimation dependent upon magnetometer data and adequate calibration

[0141] ■ Sensor fusion algorithms that exclude magnetometers

[0142] III. Free-style, Non-Prescribed Movements:

[0143] ■ Any custom movement tailored towards patient need, e.g. strengthening exercises

[0144] ■ Robotic arm tracking for validation purposes

[0145] IV. Core Exercises:

[0146] ■ FF, ABD, ER

[0147] V. ADL’s:

[0148] ■ Eating apple, combing hair, hand behind back, overhead reach, opening and closing a door

[0149] D. Software and Data Processing:

[0150] I. Motion Artefact and Cumulative Drift Reduction Techniques:

[0151] o Function of soldering quality and PCB design

[0152] o Measuring and tracking drift via firmware

[0153] o Advanced signal processing (refined Kalman filters to eliminate reliance on magnetometer inputs avoiding magnetic disturbances) and machine learning (data-driven correction) to enhance data reliability (to model and remove complex noise patterns that are hard tro address with traditional methods)

[0154] o Automated parameter optimisation to optimize the operational parameters of highly sensitive magnetometer, e.g. optically pumped magnetometers (OPM’s) to improve performance and sensitivity o Adaptive filtering generates a synthetic noise reference signal internally from the corrupted signal itself removing motion artefact

[0155] o Multi-sensor fusion

[0156] o Innovative hardware designs

[0157] II. Advanced Algorithms:

[0158] o Tailored for therapeutic and elite sports

[0159] o Comparators and simple trends (not calibrated) Quantifying absolute changes (assuming optical MOCAP and robotic validation and control of sensor drift)

[0160] ■ Motion of the upper arm relative to the trunk - ideal ROM and trajectory measure given that it captures movement at the shoulder joint

[0161] ■ Motion of the sensor itself

[0162] ■ Tracking sensor orientation (comparing sensor data to mocap’s sensor movement) and translating perfectly to tracking the orientation / motion of the arm relative to the shoulder joint (comparing sensor data to mocap’s upper arm segment movement)

[0163] Robustness to interoperability (different operators)

[0164] Robustness to repeated placement on the arm

[0165] Robustness to sensor generation (sensor fusion algorithm)

[0166] First-fit gesture:

[0167] Skipped gesture (intra-operative passive ROM assessment when patient is anaesthetized) Skipped: Non-therapeutic application where an avatar-centric biofeedback is not required

[0168] ■ When the gesture is excluded the sensor assumes that it is placed in the perfect alignment position and it makes no initial compensation

[0169] ■ This approach is dependent entirely upon the patient placing the sensor in the exact correct location

[0170] Included: Therapeutic application: More accurate biofeedback

[0171] ■ Informs the sensor at what angle it is positioned on the arm relative to the long axis and axis around circumference.

[0172] ■ Informs the sensor of the location of the axis between the shoulder-blades. Ordinarily this is the axis for forward flexion

[0173] ■ Correction for arm rotation during abduction so that the avatar will follow full arm abduction all the way to pointing straight up

[0174] ■ Execution of gesture

[0175] Ideal position of phone relative to the trunk of the body

[0176] ■ Ideal gesture (patient & pathology-friendly)

[0177] Pronounced forward-flexion act (standing or sitting)

[0178] When performing the calibration gesture, people tend to lean toward the phone or do the gesture to the side to press the button on screen. This throws off the calibration and consequently the avatar tracking. Additionally, they perform the gesture toward the phone, which isn’t always perfectly aligned in front of their arm. This introduces an internal / external rotation component because the arm rotates slightly inward or outward (rather than staying in the plane of movement) as people angle their arm toward wherever the phone is positioned.

[0179] Forearm rotation axis controls rotation

[0180] Abduction starting position - When the calibration gesture is done correctly, the avatar tracks abduction well if the starting position is hand against the body. However, if the hand starts in a palm-forward position, the avatar doesn’t display the movement correctly. This happens because the axis of rotation differs from what the avatar expects based on calibration. The axis the avatar is using for display doesn’t match the actual axis the sensor is rotating around. If we want palm-forward to be a valid starting position, we need to either change the display axis or, as previously suggested, display total displacement angle instead.

[0181] Switch the calibration gesture to a small, restricted flexion movement with a bent arm to guide the patient towards a simple plane of movement. This movement is more restricted and the thigh makes it harder to rotate the arm. Also, with the arm down, the phone is no longer the visual target people orient toward.

[0182] Recording the gesture on a countdown or discarding the last part of the recording so we don’t capture the moment when people lean toward the phone to press the button. Simple pendulum swing (0-30°) keeping thumb pointing upwards

[0183] Minimal gesture (a small angle of forward flexion) may be prone to arm rotation so that the resulting correction offset is slightly in error

[0184] Standing against the back wall and the knuckles and against the side wall and then simply sweep arms in a small arc in the plane of the side wall. They would then return to the location for the exercise once this alternative gesture was complete.

[0185] Avoiding the need to touch the phone repeatedly which affects the gesture calibration Algorithm - records the last gesture and searches for least movement in other planes. Looks at the moment in the other planes - mathematically corrects the position of the sensor relative to the perfect position ■ Identifying quaternion reference frames (gravity removal)

[0186] Compare the quaternion outputs from the two different generation sensors and see how each relates to their respective accelerometer data. - repurpose existing trained Al models on new sensor platforms

[0187] III. Data Aggregation & Reduction Techniques:

[0188] o Local calculation of Euler angles (Phone App)

[0189] o Statistical analysis / data reduction techniques

[0190] IV. Biomarker and Condition Detection:

[0191] o Frozen shoulder related pain

[0192] o Rotator cuff related pain

[0193] o OA related pain

[0194] o AC related pain

[0195] o Joint instability

[0196] o JR perspective

[0197] ■ Superior approach - subscapularis preserving vs deltopectoral approach procedures

[0198] ■ Internal range and power

[0199] V. Predictive Health Protocols:

[0200] o Feature extraction algorithm

[0201] ■ Movement segmentation and exercise classification models

[0202] o Cloud environment set-up

[0203] o Statistical analyses of population-wide trends

[0204] VI. Data Integration and Connectivity:

[0205] o Cloud environment set-up

[0206] o Remote firmware update capability

[0207] E. User Experience and Security:

[0208] o Intuitive User Interface

[0209] ■ Biofeedback

[0210] - Audible cues

[0211] - Avatar model animated by quaternion inputs

[0212] - Sensor fusion to stabilize quaternion orientation data

[0213] o Security and privacy

[0214] o Strong authentication, data encryption for data at rest and in transit, and regular firmware updates.

[0215] o Application-specific Design

[0216] o Insurance-related monitoring programs

[0217] F. Sensor and Control Stimulation:

[0218] o PENS / TENS

[0219] o Drug-delivery patches

[0220] Some embodiments of the invention described herein relate to a set of prognostic and diagnostic methods, which are relevant for use in shoulder patients with either complex joint instability, trauma, joint replacement, frozen shoulder or rotator cuff pain using a wearable post-operative sensor, combined with deep learning for assisting a surgeon during pre-operative planning and post-operative recovery.

[0221] In the context of pre-operative predictive analytics related to expected movement quality for a given clinically-prescribed motion arc, e.g. Forward Flexion, Abduction, External Rotation, which accounts for muscle function and pain to aid in humeral and scapula-centric joint replacement surgery or rotator cuff repair, the proposed architecture is trained from input data related to patient demographics, pre-operative segmented muscular anatomy and bone morphology to help minimize restrictions imposed after surgery related to cementless implant fixation or recovering soft tissues.

[0222] In the context of automatic movement quality and range detection, the architecture of some embodiments comprises real-time automatic segmentation, feature extraction related to time sequenced temporal and frequency domain-related changes, data labelling, movement index score to enable supervised rehabilitation, which is not limited to one direction of motion.

[0223] In the context of recognition of home-based composite shoulder stretch exercises to promote recovery, e.g. forward wall walking stretch, cane stretch for shoulder flexion and cane stretch for shoulder internal rotation, the proposed architecture uses a convolutional approach with 64 filters and a kernel size of 5, performs local feature extraction. The output layer uses the Softmax function, which is commonly used in multiclass classification tasks to compute the probabilities of each class outcome and facilitate decision-making based on the highest probability class.

[0224] In the context of recognition of involuntary activities of daily living (ADL’s) tasks, e.g. overhead reach and behind back, the architecture of some embodiments uses a convolutional approach with 64 filters and a kernel size of 5, performs local feature extraction. The output layer uses the Softmax function, which is commonly used in multiclass classification tasks to compute the probabilities of each class outcome and facilitate decision-making based on the highest probability class.

[0225] In the context of healing prediction, recovery curves / healing indices may be generated using a combination of patient and surgical variables and IMU-data collected from the injured or recovering limb and the contralateral limb to help decompose the signals acquired from the IMU that can detect and track quality of movement longitudinally through progressive approximation to the healthy contralateral limb. The sensor may also supported by predictive analytics that is used to identify and classify: (a) pathological events, e.g. frozen shoulder, rotator cuff pain, bursitis, stiff shoulder, sub-acromial impingement and inadequate prosthetic component sizing / position, (b) compliance / patient activity levels, and (c) movement repetition, e.g. forward flexion, abduction and external rotation.

[0226] In the context of timed delivery of therapeutic intervention, pattern recognition algorithms may used to optimally deliver / monitor trigger point injections of local anesthetic and steroid to an inflamed area to relieve pain, therapeutic electrical nerve stimulation devices, e.g. PES, PEMF, and TENS, or thermotherapy or drug-eluting reservoir to enable controlled delivery of a medicant, or synchronous diagnostic imaging, e.g. ultrasound, or 3D scanning devices.

[0227] The use of additional sensors such as ambient light sensor, barometer (air pressure sensor), and thermometer (temperature sensor), may be useful for user environment recognition. For example, determining if the user is indoor or outdoor, or if the user is moving upstairs or downstairs in a building.

[0228] Some aspects and embodiments provide a patient assessment system.

[0229] Some aspects and embodiments are based on (limb) kinematics, and comprise means for deducing / quantifying / objectifying movement smoothness.

[0230] Aspects and embodiments of the present invention may comprise, consist of or include one or more of the following features / benefits:

[0231] Movement smoothness.

[0232] Temporal and / or spectral features.

[0233] Objective movement quality.

[0234] Deduce disturbances in rhythm.

[0235] Find most reliable proxies to discriminate between different conditions.

[0236] Aids diagnosis.

[0237] Look for trends.

[0238] Generate surgical procedure.

[0239] Correlate with pain score index.

[0240] Range of motion data.

[0241] Pain score data. Digital tools to predict outcome.

[0242] Deep learning model is more precise, as based on more functional data.

[0243] Train model.

[0244] Range of movement by itself is not discriminatory.

[0245] Single sensor.

[0246] Arm-worn.

[0247] Shoulder-based.

[0248] Algorithm.

[0249] Compensatory.

[0250] Movement proxies.

[0251] Determine different profiles.

[0252] Characteristic of different shoulder conditions.

[0253] Assess trauma.

[0254] Biohaptics.

[0255] Use as a proxy e.g. use data as a proxy for movement smoothness, diagnosis, rehabilitation programme. Anatomics and reversals.

[0256] Pre-operative assessment.

[0257] Pre-operative planning aid.

[0258] Combine data with bone planning and soft tissue planning. Functional impact.

[0259] Translation / rotation deficit from session to session.

[0260] Segment different movements; classify the different movements.

[0261] Extract proxies.

[0262] Aggregate data to make a decision on patient progress.

[0263] Feature extraction.

[0264] Extracted features: movement duration features; biomechanical features; movement quality features. Look for specific rhythmic disturbances.

[0265] How this sensor and deep learning can understand about surgical technique and impacts on ADL.

[0266] Hardware and software that provide a better outcome for patients.

[0267] Self-learning model.

[0268] Guidance for surgeons. Can be done independently in a home setting. Algorithms are used so data is not contaminated when comparing results from different sessions.

[0269] Movement smoothness useful for neurological disorders e.g. MS, tremors, Parkinsons, and / or orthopedics and / or sports medicine.

[0270] Wearable.

[0271] Movement quality if a better surrogate of joint function than range of motion - digitise benefits.

[0272] Personalize patient treatment by identifying factors that drive the outcome predictions, including modifiable factors such as the patient losing weight, quitting smoking, and completing pre-habilitation.

[0273] Predict+ aggregates the outcomes and complications within the database so that surgeons and patients can compare their personalized predictions with the clinical experience of patients of similar age and gender after anatomic and reverse shoulder replacement.

[0274] Activities of Daily Living Simulation - patient-specific estimation of post-operative range of motion that better reflects the patient’s actual mobility.

[0275] Enhanced criteria for predicting outcomes:

[0276] Step 1: Auto-segmentation of soft and hard tissues.

[0277] Step 2: Biomechanical simulation.

[0278] Step 3: Soft tissue tensioning (humeral height, version, glenoid height, diameter, offset) vs load vector - correlate muscle length data from the musculoskeletal model to actual tension / tightness data.

[0279] Step 4: “validate” x-ray-based kinematics predictions.

[0280] Step 5: Deep learning based on range and function - pre-op patient-specific kinematics and inform CORIOGRAPH ADLs.

[0281] Step 6 - Enhanced patient criteria for predicting outcomes after shoulder replacement surgery.

[0282] Leveraging Al's ability to process and optimize large, complex data sets, surgeons can select patients who need surgery, create patient-specific surgical plans, predict clinical outcomes and implant survival, and identify patients at high risk for complication.

[0283] Choosing the surgical strategy that will result in the best clinical outcome is an unsolved problem for shoulder surgeons. For example, whether to do a total or reverse shoulder arthroplasty, whether to choose a medialized or lateralized glenoid and humeral implant, the optimal glenoid version, inclination, and humeral retroversion for each patient, and optimal joint tension are still controversial topics.

[0284] Enhanced criteria for predicting outcomes.

[0285] Musculoskeletal shoulder simulation of moment arms and joint reaction forces after medialization of the supraspinatus footprint in rotator cuff repair.

[0286] Some embodiments provide or relate to Al-based shoulder surgical pre-operative planning and rehabilitation.

[0287] Some embodiments provide a single wearable inertial measurement unit for monitoring shoulder MSK health.

[0288] Shoulder musculoskeletal (MSK) disorders such as rotator cuff tears, frozen shoulders and osteoarthritis are a major cause of chronic pain and disability. Wearable inertial measurement unit (IMU) sensors can provide objective valuable insights into the cause, progression and treatment of these pathologies. However, the use of two IMUs often results in low patient compliance due to the discomfort of wearing multiple sensors and the complexity of the setup. In this regard, a single IMU solution supported by an Al-based feature extraction pipeline to serve as a simple and efficient solution for monitoring shoulder MSK health.

[0289] Embodiments of the present invention, using a single IMU, can be used to assess the impact and treatment of shoulder MSK conditions such as osteoarthritis, rotator cuff tears and frozen shoulder.

[0290] Sensor data was collected at a sampling rate of 56Hz from both upper arms of healthy volunteers (n=50) and patients with rotator cuff tears (RTC) (n=30), frozen shoulder (FS) (n=16) and osteoarthritis (OA) (n=8) pre- and postintervention. A feature extraction and data aggregation pipeline was hosted in a secure HIPPA-compliant cloud environment. A YOLO (You Only Look Once)-inspired deep learning model with a segmentation accuracy of 94% was used to classify movements into forward flexion (FF), abduction (ABD) and external rotation (ER). A recurrent neural network with a model accuracy of 98% was trained to classify individual movement repetitions. Movement quality was h httttppss:: / / / / wwwwww..sstt..ccoomm / / erens / eoumrbcee / dedne / du-sseorftw maarneu / xa-l / cuumbe2-2m2e0-mqse1tt.ihntqm-sl?taerctemdp-w=titt9h4-m70oti qolnf lxin-ske fnesbo2r-0f1u9si&ornt=-liubmra&ryid-=inU-M2220

[0291] initially assessed by analysing changes in wavelength (WAV), range (ROM), amplitude (AMP) and spectral arc length (SAL).

[0292] Healthy volunteers showed consistent movement quality across FF, ABD, and ER, with short cycle times (WAV = 0.8-3.2 s), full ROM (FF / ABD = 100-185°, ER = 26-99.7°), and stable SAL values (~3.3-6.6). In RTC patients, the pathological arm displayed slower movement, reduced ROM and AMP, and greater SAL variability compared to the contralateral arm. After anaesthetic injection, FF and ABD performance improved towards contralateral values, particularly in ROM (FF increased from 89° to 149°, ABD increased from 19° to 61 °). FS patients showed marked ROM restriction (FF: 14-139°, ABD: 4-154°, ER: 9-53°) and reduced velocity in the affected arm, with some improvement post-injection (FF increased to 92°, ABD increased to 93°, ER increased to 35°). SAL variability decreased after intervention. In OA, the affected arm demonstrated prolonged WAV (up to 7.8 s), reduced ROM (FF: 78°, ABD: 30°, ER: 17°), and higher SAL variability, particularly in severe cases. For these patients, joint replacement (TJR) improved ROM across all movements (FF increased to 133-192°, ABD to 114-188°, and ER to 27-99°) and reduced SAL variability. Overall, patients with OA and RTC’s exhibited decreased AMP and ROM, alongside increased WAV and SAL during core exercises. Pain-relief injections for FS and ROT patients resulted in transient improvements in ROM and movement quality, while TJR and RCR surgery led to more sustained improvements in both ROM and functional performance during follow-up.

[0293] The present invention confirms the feasibility of using a wearable sensor for determining the severity of shoulder MSK’s and the effectiveness of treatment.

[0294] In some embodiments a microcontroller unit (MCU) interrogates an inertial measurement unit (IMU) using a serial data communications protocol and receives raw data in digital format from the IMU at a fixed sample rate (which may be one of the settings built into the IMU).

[0295] That digital data (acceleration, angular velocity and magnetic field strength) is processed by a sensor fusion algorithm and the output from that algorithm is the quaternion vector.

[0296] A sensor fusion algorithm is a process that combines data from multiple sensors to create a more accurate, reliable, and comprehensive understanding of a system or environment than any single sensor could provide alone.

[0297] The MotionFX is a middleware library component of the X-CUBE-MEMS1 software and runs on STM32. It provides real-time motion-sensor data fusion.

[0298] The STM32 MCU is a 32-bit microcontroller produced by STMicroelectronics that is based on the ARM Cortex-M processor. The MCU combines high performance with low power consumption, digital signal processing, and a wide range of peripherals.

[0299] xcubemems1-expansion-for-stm32cube-stmicroelectronics.pdf

[0300] The library acquires data from the accelerometer, gyroscope (6-axis fusion) and magnetometer (9-axis fusion) and provides real-time motion-sensor data fusion.

[0301] The MotionFX filtering and predictive software uses advanced algorithms to intelligently integrate outputs from multiple MEMS sensors, regardless of environmental conditions, for an optimum performance.

[0302] Some embodiments use XYZ sequence for calculation of Euler angles.

[0303] How to offset quaternion data - used in the firmware algorithm created.

[0304] The Firmware Algorithm

[0305] We start with the raw output from the sensor fusion algorithm which is a vector with variable magnitude and orientation defined by 4 quaternion values.

[0306] • First we normalise this vector to unity length - this is essential otherwise we cannot easily apply a quaternion offset

[0307] • Then we apply a couple of quaternion rotations to the data - simply to bring the frame of the sensor as close as possible to the normal orientation we expect it to adopt in our use-case

[0308] o We could alternatively have physically rotated the IMU within the sensor enclosure to achieve the same goal; however, that would have resulted in an oddly shaped sensor and also it would not have matched the layout of the known working specimen PCB.

[0309] • Then we ask the user to adopt the default pose. The output normalised quaternion at this instant represents the offset of the sensor data stream from what is called the ‘identity pose’ which is represented in quaternion notation as (1,0,0,0)

[0310] • We capture this offset at the instant when the user is standing or sitting in the default pose and we subsequently subtract this offset (by matrix algebra) from the stream of quaternion data so that each sample is then represented as a deviation from the identity pose

[0311] • We then convert this offset quaternion data into Euler angles expressed in radian units. The resulting Euler angles are valid for only a limited range of movement without experiencing gimbal lock, but the range is adequate for the range of each of the exercises.

[0312] • We then assign these Euler angles to the avatar to animate its arm as follows: o X = y - 1.95

[0313] o Y = -x

[0314] o Z = z - 1.4

[0315] • In the above expressions, (X, Y, Z) is the orientation vector for the avatar arm and (x,y,z) is the orientation vector for the sensor where X is arm rotation, Y is abduction and Z is forward flexion

[0316] • In addition to the steps outlined above we created a numerical algorithm to determine the angle of ‘tilt’ in the orientation of the sensor around the arm

[0317] o Specifically this means what is the angle between the plane of the sensor and the sagittal plane when the arm is moving correctly in the forward flexion movement; and also what is the angle between the plane of the sensor and the frontal plane when the arm is moving correctly in the forward flexion movement (this angle represents the angle by which the sensor angular position deviates from the preferred position which is that the plane of the sensor is parallel to the sagittal plane). o This algorithm relies upon the capture of a short vector ofdata samples from the sensor during a gesture which is controlled to be correct forward flexion movement.

[0318] o This vector ofdata samples is then iteratively offset about each of the two axes that are expected to be uninvolved in forward flexion to find the offset angle at which the resulting offset vector of data shows the smallest movement on the two ‘uninvolved’ axes.

[0319] o The offset angles that are obtained by this algorithm are referred to as ‘tilt’ angles.

[0320] o If these angles have been determined by the firmware then they are applied as quaternion offset to the normalised and rotated quaternion data immediately prior to determining the offset from identity at the initial pose.

[0321] o If these angles have not been determined then no offset is applied to the normalised and rotated quaternion data apart from the offset from identity at the instant of the initial pose.

[0322] The axes conversions from the output of sensor fusion may be as follows.

[0323] The conventional definition of the three axes and their rotations is that used for aircraft: Figure 84.

[0324] Positive rotation is shown by the orange arrow on each axis.

[0325] In the case of some embodiments the sensor enclosure shown in Figure 85 might be considered as sitting coplanar with the plane formed by the axis through the aircraft wings and the long axis through the aircraft body, with the nose to the left so that yaw occurs about the X axis, roll occurs about the Y axis, and pitch occurs about the Z axis. However, the RHR sensor fusion means that positive Z-axis rotation actually corresponds to negative pitch.

[0326] The two rotations that are performed mathematically are 90deg roll followed by -90deg yaw (which actually is achieved by +90deg rotation about Z for the reason explained above).

[0327] These two rotations mean that the external movements of the arm are expressed on the axes preferred for animation of the avatar rather than those that are constrained by the orientation of the PCB within the enclosure.

[0328] Embodiments of the present invention may incorporate, use or be based on one or more of the following:

[0329] The Complexity of Accelerometer Data Conversion in IMU Systems

[0330] 1 Introduction

[0331] A 9-axis Inertial Measurement Unit (IMU) consists of a 3-axis gyroscope, a 3-axis accelerometer, and a 3-axis magnetometer, which collectively provide motion and orientation data of the attached object. Although these sensors are mounted on the same rigid body, their location and orientation affect the recorded measurements. This variation in attachment pose, commonly referred to as pose offset, introduces discrepancies in sensor readings, particularly for accelerometers.

[0332] 2 Representing Orientation

[0333] When working with motion data, we need a way to describe how an object is oriented in space. This is done using either a rotation matrix or a unit quaternion. Both are mathematical tools that define how an object rotates relative to a fixed reference point — similar to how a compass tells you which way you’re facing relative to North.

[0334] To represent the orientation of a moving object (like a sensor, robot, or drone), we define its rotation with respect to a reference frame. We use: • Rotation matrix: Denoted asARB e SO3, a structured 3x3 matrix.

[0335] • Quaternion: Denoted as ^q / ; G SU2, a more compact representation that avoids some common mathematical pitfalls like ’’gimbal lock.”

[0336] These describe the orientation of frame B relative to frame A.

[0337] Now, if we need to switch to a new reference frame (e.g., converting data from a drone’s local perspective to a global map), we apply a transformation:

[0338] CRB =CRAARB

[0339] C

[0340]

[0341] QB =c<iA " °cq*

[0342] A

[0343] whereCRA andcqA represent the orientation of reference frame A relative to the new frame C. The quaternion multiphcation (denoted by ° ) ensures the correct transformation. The quaternion conjugation (denoted by (•)*) helps adjust for the new frame’s perspective. These transformations ensure that orientation data remains consistent and meaningful no matter which reference frame we choose.

[0344] 3 Dealing with Orientation Sensor

[0345] An ideal orientation sensor measures the true orientation of the attached object with respect to its initial cahbrated reference frame C. Let A and B denote two different coordinate frames rigidly attached to the object. If the orientation offset is known, denoted byAqe, the transformation in (1) can be applied directly to convert betweencqA and ' q / ;. This transformation is valid as long as the calibrated frames C remains the same for both cases. If the orientation offset is known, an orientation measurement can be converted from one reference frame to another using (1).

[0346] 4 Dealing with Gyroscope

[0347] A gyroscope measures angular velocity, which tells us how fast an object is rotating in space. One key property of angular velocity is that it remains constant across a rigid body — meaning every part of the object experiences the same rotation.

[0348] Because of this, when transforming gyroscope measurements from one frame to another, we can use the same rotation-based transformation as we do for orientation, without requiring any extra corrections.

[0349] Mathematically, if a gyroscope measures angular velocity ''g in reference frame A, we can transform it into frame B as follows:

[0350] Bg =BRAAg

[0351] (

[0352]

[0353] 0,Bg) =BqA0(0,Ag) °Bq*A

[0354] whereBRA is the rotation matrix from frame A to frame B.BqA is the quaternion describing the same rotation. The quaternion transformation involves quaternion multiphcation (0) and conjugation ((•)*), which ensures correct frame conversion.

[0355] This means that gyroscope data can be directly transformed using the same equations as orientation, making it straightforward to track angular motion in different frames.

[0356] 5 Dealing with Magnetometer

[0357] A magnetometer measures the Earth’s magnetic field, which remains uniform across a rigid body. This means that no matter where the sensor is placed on an object, it will detect the same magnetic field direction (assuming no local interference).

[0358] Since the magnetic field is consistent across the body, we can transform magnetometer readings between different reference frames using the same standard rotation-based transformation as we use for orientation and angular velocity. Mathematically, if the magnetometer measures the magnetic fieldAm in reference frame A, the equivalent measurement in frame B is given by:

[0359] ill =BRA in (0,Bm) =BQA ° (0,Am) °Bq*

[0360] Because of this property, magnetometer readings can be seamlessly converted between different coordinate frames without requiring additional corrections, making them an essential tool for orientation estimation and navigation systems.

[0361] 6 Dealing with Accelerometer

[0362] A common misconception about accelerometers stems from their name. Rather than measuring an object’s true acceleration, an accelerometer measures specific force, which is acceleration relative to a free-falling body.

[0363] Unlike Earth’s magnetic field or angular velocity, which remain consistent across a rigid body, specific force varies depending on the sensor’s location within the hody.

[0364] 6.1 Why Accelerometer Conversion is More Complex

[0365] Imagine a simple case: a disc rotating at varying speeds. If you place an accelerometer at the top (Location A in Figure 1) and another at the bottom (Location B in Figure 1), they will record different accelerations. The acceleration depends on distance from the rotation axis: The further from the center, the greater the acceleration. In the case of generic 3D rotation, acceleration at each point can differ significantly in both magnitude and direction.

[0366] Figure 86: A rotating rigid disc with two attached accelerometers: one at Location A and another at Location B Thus, a simple frame transformation using a rotation matrix or quaternion is not sufficient to correctly convert accelerometer readings. While such transformations adjust the sensor’s orientation, they do not account for differences in acceleration that arise from variations in position within the rigid body. The transformation equation is:

[0367] Sf B =SRA "^f A +BRG(G»B -GaA>

[0368] whereBf B is the specific force measured at location B in frame B.Af A is the specific force measured at location A in frame A.BRA is the rotation matrix from frame A to frame B.BRG is the rotation matrix from the global frame G to frame B.Ga;< andG& A are the absolute accelerations of locations B and A in the global frame.

[0369] From the equation, it can be seen that bothGan andaaA affect the computation for "f

[0370] 6.2 Challenges and Possible Solutions

[0371] This challenge can be mitigated if the specific force is measured while the rigid body is static. In this case:

[0372] • The hnear acceleration will be zero La;, =aaA = 0).

[0373] • The accelerometer will only measure gravity, which remains constant for the entire rigid body.

[0374] However, this assumption also imphes that angular velocity is zero, rendering gyroscope measurements ineffective. In general motion, global linear accelerations can be computed from relative position, angular velocity, and angular acceleration However, accurately estimating angular acceleration is particularly challenging. To address this, a kinematic motion model combined with nonlinear optimization can be used to estimate the required transformations.

[0375] 7 Conclusion

[0376] Unlike magnetometers and gyroscopes, which can be converted using simple transformations, accelerometer conversion is inherently more complex. The variations in acceleration across different locations on a rigid body mean that a simple frame transformation is not enough. Instead, additional corrections must be incorporated to account for differences in acceleration, particularly in dynamic motion scenarios.

[0377] This highhghts why simple conversion techniques can lead to inaccurate motion tracking, emphasizing the need for more advanced sensor fusion techniques.

[0378] The following table summarizes the conversion formulas for different types of measurement in different cases.

[0379] Sensors / Cases Static General

[0380] GyroscopeBg = o g R g

[0381] Magnetometer in =BRA in in =BRA in

[0382]

[0383] AccelerometerGf B =BRA / lf A +i:R<;('’a;;-GHA> Frame Transformation for sensors in IMU

[0384] This table illustrates that gyroscope and magnetometer measurements follow straightforward transformations, while accelerometer readings require additional motion data for accurate conversion in dynamic conditions.

[0385] Offset Compensation in 9-Axis IMU Sensors

[0386] The impact of sensor offset on 9-axis IMU measurements, covering its effects on frame transformation. It provides a structured approach to offset compensation, presenting a mathematical framework for gyroscopes, magnetometers, and accelerometers. Additionally, the complexities of measurement transformation between different sensor placements are discussed, with a focus on practical implementation challenges.

[0387] 1 Introduction

[0388] A 9-axis Inertial Measurement Unit (IMU) consists of a 3-axis gyroscope, a 3-axis accelerometer, and a 3-axis magnetometer, which collectively provide motion and orientation data of the attached object. While these sensors are mounted on the same body, their attachment location and orientation affect the recorded measurements. This variation in attachment pose, commonly referred to as pose offset or simply offset, introduces discrepancies in sensor readings. This document explores the following topics:

[0389] • The effect of pose offset on ideal orientation measurements

[0390] • Offset compensation for ideal orientation measurements

[0391] • The impact of pose offset on gyroscope, magnetometer, and accelerometer readings

[0392] • Offset compensation techniques for IMU sensor data

[0393] 2 Dealing with Ideal Orientation

[0394] To analyze the motion of a rigid body in 3D space, a body-attached coordinate frame, or “body frame”, should be assigned and attached to the body. The orientation of the body is then defined as the orientation of the body frame.

[0395] 2.1 Representing Orientation

[0396] The orientation of a frame can be mathematically represented as either a “rotation matrix” or, more compactly, a “unit quaternion”. Regardless of the representation, orientation must be expressed with respect to a reference coordinate frame or “reference frame”. LetARB G SO3 andAqn G S h denote the orientation of a body frame B with respect to a reference frame A, in rotation matrix and quaternion form, respectively. (See Appendix B for the conversion between these representations.) If an orientation needs to be expressed with respect to a new coordinate

[0397] frame C, a frame transformation can be apphed as follows:

[0398] KB - KB KBB r(1)

[0399]

[0400] BqB =CQA ° ° q A

[0401] where °RA andcqA represent the orientation of reference frame A with respect to the new frame C, ° denotes quaternion multiplication, and ( ■ )* denotes quaternion conjugation. (See Appendix A for the definitions.)

[0402] 2.2 Offset Compensation for Ideal Orientation

[0403] An ideal orientation sensor measures the true orientation of the attached object with respect to its initial cahbrated reference frame C. Let A and B denote two different coordinate frames rigidly attached to the object. If the orientation offset is known, denoted byAqn, the transformation in (1) can be applied directly to convert betweencqA andcqn. This transformation is valid as long as the calibrated frames C remains the same for both cases.

[0404] 2.3 Summary on Ideal Orientation

[0405] If the orientation offset is known, an orientation measurement can be converted from one reference frame to another using (1).

[0406] 3 Dealing with 9-axis IMU

[0407] In practice, no sensor directly measures orientation. One common approach is to use a 9-axis IMU, consisting of a gyroscope, magnetometer, and accelerometer, along with a sensor fusion algorithm to estimate orientation trajectories. Each sensor provides three-channel outputs, which can be treated as 3D vectors expressed in the sensor frame, which is identical to the body frame.

[0408] 3.1 Frame Transformation on Vector

[0409] A vector of 3 element, also known as “3D vector” represents spatial quantities such as coordinate axes, angular velocities, and forces. LetAv G R3denote a 3D vector in reference frame A. To express this vector in another reference frame B, the frame transformation can also be applied as follows:

[0410] Bv =BRAAV

[0411] ( / 0, B X) =Bq^ ° ( / 0,Av s) °Bq*(2) whereBRA andBq<i are the orientation of frame A with respect to frame B. (0, v) is an imaginary quaternion with v as its imaginary components. (See Appendix A for the definition of quaternion.)

[0412] 3.2 Angular Velocity and Gyroscope Model

[0413] Angular velocity describes the rotational rate of a body relative to a frame. LetAa>c,s G R3denotes the “relative angular velocity” of frame B relative to frame C, expressed in reference frame A. This follows the addition property:

[0414] A(OC, D =A< OC, B +A< OB, D- (3) If frame B and frame D are attached to the same rigid body, thenAO> B, D is zero, meaning all frames on the same rigid body experience the same angular velocity, which results in (OC, D =A(OC, B. Since an angular velocity is a 3D vector, its reference frame can be transformed by using (2).

[0415] A 3-axis gyroscope measures the angular velocity in the sensor frame. The mathematical model of the gyroscope measurement, denoted byAg G R3, is given by [1]:

[0416] As =A< OG, A + bg + ng(4) whereA(OG, A G R3is the ideal measured angular velocity of the sensor frame A relative to the global inertial coordinate frame G expressed in the body frame itself, bf / G R3is a constant bias, and ngis the noise of the gyroscope. After bias and noise calibration, the gyroscope measurement simplifies toAO> G, A.

[0417] If a second gyroscope is placed at a new coordinate frame B on the same rigid body, it will experience the same angular velocity mo, A. The reference frame is transformed to frame B as:

[0418] Ba> G, B =B'R~AAO^G, B

[0419] =B'R~A(A(OG, A +A(OA, B)

[0420] =

[0421]

[0422] B^AAaiG, A

[0423] In other words, the angular velocity of frame b can be transformed back to the coordinate frame A as follows:

[0424] Aa> G, A =BO> G, B

[0425] (

[0426]

[0427] 0,A< OG, A) =Aqs ° (0,B(OG, B) OAq*B

[0428] Thus, the gyroscope measurement transformation follows:

[0429] Ag =ARBBg

[0430] (

[0431]

[0432] 0,3g) =Aqe o (0,Bg) o / iq-B

[0433] 3.3 Magnetic North and Magnetometer Model

[0434] At most locations on Earth (excluding the poles), the geomagnetic field points north. Choosing a global inertial frame G with its x-axis aligned to magnetic north, the magnetic field vector, denoted byGd G R3is:

[0435] Gd = A 0 0] T

[0436] where A G R+is the magnetic field intensity, typically between 0.22 to 0.67 Gauss. This vector represents the direction of global x-axis, whose reference frame can be transformed to magnetometer’ s sensor frame. Given an orientation offset between an arbitrary coordinate frame A and the global inertial frame, the magnetic field vector can be expressed as follows:

[0437] d =ARGGd = °RT GdA

[0438] (5)

[0439]

[0440] (0, M) =Gq* o (0,Gd) oGqA AA 3-axis magnetometer measures the magnetic field in the sensor frame. The relationship between the measure- ment, denoted byAm G R3, and the orientation of the sensor frame with respect to the global inertial frame, denoted byGRA, can be expressed as follows:

[0441] in = SmAd + bm+ nm(6) where Smis the scahng factor and misahgnment matrix due to soft iron effect, bmis the hard-fron bias, and nmis the additional noise from the sensor. In an ideal case where the scaling and bias are compensated,Am is simply ^d. If another magnetometer is attached a new coordinate frame B on the same rigid body, the magnetic north remains the same. Its reference frame is transformed to frame B as:

[0442] Bd =SRAAd

[0443] The magnetic north measured in frame B can be transformed back to the one in frame A as:

[0444] Ad = BBd

[0445] Hence, it can be concluded that the ideal magnetometer measurement in frame B can be converted to another frame A as follows:

[0446] ill =ARB ill

[0447] (

[0448]

[0449] 0,Am) = O (0,Bm) oB

[0450] This is the same transformation that is apphed to the gyroscope measurement.

[0451] 3.4 Specific force and Accelerometer Model

[0452] One common misconception about accelerometers stems from their name. Rather than measuring an object’s true acceleration, an accelerometer measures specific force, which is the acceleration relative to a free-falling body. The specific force of a chosen frame A with respect to the global inertial frame G, denoted by 'T / ; E R3, is modeled as:

[0453] Gf / \ =Ga.A~ go

[0454] whereaaA E R3is the global linear acceleration of frame A with respect to the global inertial frame and go E R3is a constant gravitational acceleration, whose values are typically 0 0L—9.8065 m / s2. The reference frame of this vector can also be transformed to the chosen frame A as follows:

[0455] Af A =3R °f A =ARo(aaA - go) (7) An accelerometer measures specific force of a body with respect to the body itself. This aligns with the expression for The true measurement of an accelerometer can be modelled as follows:

[0456] Af A = Sa '''Ro(Oa,'l— go) + ba + Ila (8) where S is the scaling factor and misalignment matrix due to manufacturing error, b is the accelerometer bias, and n is the additional noise from the sensor. If calibrated correctly, the measurement model in (8) is simplified to (7). If another body frame is chosen as frame B, the frame will experience the following specific force:

[0457] / !f / ; =BRG(G8B - go)

[0458] With some algebraic manipulation, the specific force in frame B can be expressed in terms of the specific force in frame A as follows:

[0459] Bfs =BRAARG(GHA -G& A +Gas- go)

[0460] =BRA / ’R<-;(',a,-1— go) +BRAARG(-aaA +Gas)

[0461] (9) =BR / . +BR^aB- ^ f

[0462] —BRAAf A + (Bas —BaA> Therefore, the specific force in frame B can be transformed to frame A as:

[0463] 'TA = - (BaB-!ia4l (10) Note that specific force in frame B cannot be directly transformed to frame A using simple multiplication. The transformation requires additional information about the relative acceleration between two frames, given by (BaB— "a A). This dependency makes the transformation non-trivial, as it depends on the relative motion and locations of frames A and frame B. This problem can be mitigated if the specific force is measured when the frame is staticGae =G& A = O.

[0464] Under this assumption, the transformation simplifies to:

[0465] AfA=ARsBfs

[0466] However, this assumption also implies that angular velocity is zero, rendering gyroscope measurements ineffective. In general, global linear accelerations can be computed from relative position, angular velocity, and angular acceleration. However, accurately estimating angular acceleration is particularly challenging. To address this, a kinematic motion model combined with nonhnear optimization can be used to estimate the required transformations. This highlights that accelerometer measurements cannot be converted as straightforwardly as gyroscope or magnetometer measurements.

[0467] 3.5 Computing Relative Acceleration

[0468] Based the kinematics of rigid body, the hnear acceleration can be computed as

[0469] \ d B ) % =Bas +B(o GB x (B<f> GB xBdBA+ OJGB xBd BA (11)

[0470]

[0471] dt By manipulating and rearranging some terms, the relative acceleration in frame B can be obtained as:

[0472] \ B )

[0473] BaB- B& A= B(O x(Bm G BXBRA 1 + ^G. B X BRA A^ (12)

[0474]

[0475] dt

[0476] where A S is the constant positional offset between A and B, expressed in frame A, which should be known. To compute this, the time derivative ofBWG, B need to be identified. A naive method is to find different between consecutive data points and dividing the difference by the time difference. This amplifies the noise in the calculation. A more suitable approach is to used discrete -time Kalman filter to estimate the angular velocity and its time -derivative simultaneously.

[0477] 3.6 Estimating Time-Derivative of Angular Velocity using Kalman Filter

[0478] A discrete-time Kalman filter is an optimal model-based state estimator that estimates states of interest using the process model and measurement model. To properly implement a Kalman filter, both models must be fully defined.

[0479] 3.6.1 Kinematics Model

[0480] To estimate the time-derivative of angular velocityBWG, B, a set of state is assigned to the angular velocity itself, denoted as m G R3, and another set of states is assigned to the time-derivative of the angular velocity, denoted as a G R3. The collection of both set of states constitutes a full estimated state x = <oTcfT TG R6.

[0481] In our case, it can be assumed that the uncontrolled moments cause a constant jerk of r] that is normally distributed with zero-mean and covariance of SQ. This leads to the following kinematics model

[0482] w|fc + 1] = wlfcl + Ata[Jc] +

[0483] 2

[0484]

[0485] (13) a[Jc + 1] = a[Jc] + At» [Jc],

[0486] where At is the time-step of discretization. The kinematics model can be compactly written as follows:

[0487] x[Jc + 1] = Fx[Jc] + G;;| fc| (14) where:

[0488] i. h

[0489]

[0490] Ail3 3.6.2 Process Model

[0491] Although this model accurately captures the nature of the kinematics, the uncertainty can be fully determined. The best estimated prediction is when the uncertainty is at the average. The kinematics model becomes the following prediction model:

[0492] x[k] = Fx[k]

[0493] (15)

[0494]

[0495] P[k] = FP[k]FT+ GSo GT

[0496] where x is the predicted state, x is the estimated state, P G R6x6is the predicted state covariance, and P G R6x6is the estimated state covariance.

[0497] In practice, Sis a tunable parameter. And the initial state and state covariance (x [0], P [0]) should be initialized properly.

[0498] 3.6.3 Measurement Model

[0499] Since we are estimating the time- derivative of the angular velocity based on the measured angular velocity, we can use the angular velocity from gyroscope as the measurement. This directly relates to the first half of the full state m. Hence, the measurement model can be expressed as:

[0500] Bg[ k] = w| k] + ng[k], (16) where ng~ N (o, £ / ,) G R3is the zero-mean Gaussian noise. This model can be expressed in full states as follows:

[0501] z[k] = Hx[k] + ng[k], (17) where z[k] =Bg[k] and ■ [ j

[0502] H = I3O3 3

[0503] Given a predicted state x, the predicted measurement can be determined when the uncertainty is assumed to be at the average.

[0504] z[k] = Hx[k] (18)

[0505]

[0506] S[k] = HP[k]HT+ where S is the predicted measurement covariance.

[0507] 3.6.4 Prediction and Update

[0508] Given an arbitrary state and its corresponding covariance, a measurement and its uncertainty can be predicted using (15) and (18). However, this is merely a blind prediction into the future based on known models. To compensate for error in prediction, the predicted measurement must be compared to the actual measurement to generate a residual error. Kalman filter uses this residual along with Kalman gain to update for the optimal estimated states, which will be use in the next iteration. The update step of the Kalman filter can be expressed as follows:

[0509] K[k] = P[k]HTS[k]-1

[0510] x[k + 1] = x[k] + K[k](z[k] — z[k]) P[k + 1] = P[k] - K[k]HP[k] (19) where K is the optimal Kalman gain, which is needed to be recomputed at each iteration.

[0511] The combination of the prediction model and update allows both angular velocity and its time-derivative to be estimated. Once the derivative is computed, the conversion of accelerometer data can be computed using (??) and (9).

[0512] 1.1 Summary on Accelerometer Data Conversion

[0513] The process for converting accelerometer data can be summarized in Figure 1.

[0514] Figure 87: An Overall Process for Converting Accelerometer Data.

[0515] 4 Summary

[0516] In an Inertial Measurement Unit (IMU), different sensors provide measurements relative to their attached reference frame. However, when a sensor is relocated to a different coordinate frame on the same rigid body, its measurements must be transformed accordingly. The transformation depends on whether the system is in a static condition or undergoing general motion.

[0517] • Gyroscope: In a static condition, angular velocity is zero, making gyroscope measurements irrelevant. Under general motion, gyroscope measurements transform using the rotation matrix between frames.

[0518] • Since the Earth’s magnetic field remains constant across the rigid body, magnetometer readings transform using the same rotation matrix in both static and general cases.

[0519] • Unhke other sensors, accelerometer measurements depend on relative acceleration. Under static conditions, transformation follows a simple rotation operation. However, under general motion, the transformation also requires the relative linear acceleration between the two frames, making it significantly more complex. A discrete-time Kalman Filter can be used to determined the time-derivative of the angular velocity, which can be used to compute the relative acceleration.

[0520] The following table summarizes the conversion formulas for different types of measurement in different cases.

[0521] Sensors / Cases Static General

[0522] GyroscopeAg = oAg =ARBBg

[0523] Magnetometer ill =ARB ill ill =ARB ill

[0524]

[0525] AccelerometerA£A =A-RB ^BAf A = - (Bas - BaA)]

[0526] Table 1: Frame Transformation for sensors in IMU

[0527] This table illustrates that gyroscope and magnetometer measurements follow straightforward transformations, while accelerometer readings require additional motion data for accurate conversion in dynamic conditions.

[0528] A Unit Quaternion: Definitions and Properties

[0529] A quaternion is a mathematical entity that consists of a real scalar part, w, and a three-dimensional imaginary vector part, v, which can be compactly expressed as a tuple:

[0530] q = (w, v), (20) A unit quaternion is a quaternion whose norm is equal to one:

[0531] ||q|| = √w² + ||v||² = 1. (21) The inverse of a unit quaternion is equal to its conjugate, q*, which is given by:

[0532] q* = (w, — v). (22) Given two quaternions p = (,wP, Vp) and q = (wq. v?), their product is defined as:

[0533] p o q = (wpwq- vp· vq, wpvq+ wqvp+ vp× vq), (23) where (■ ) is the dot product and X is the cross product. Note that quaternion multiphcation is non-commutative, meaning: p q q p

[0534] Unit quaternions provide a compact and efficient representation of four-dimensional algebraic structures, making them computationally advantageous over rotation matrices in various apphcations.

[0535] B Rotation Matrix and Quaternion Conversion

[0536] A rotation matrix and a unit quaternion are both used to represent orientations in three-dimensional space. While a rotation matrix is a 3 X 3 orthonormal matrix, a unit quaternion provides a compact, singularity-free alternative. This section presents the conversions between these two representations.

[0537] B.i Quaternion to Rotation Matrix

[0538] Given a unit quaternion q = (w, v), where v = (t7%, vy, Vz), the corresponding rotation matrix R G SO3 is given by:

[0539] 1 - 2(t£ + 2( vxvy- ww) 2(VxVz + WVy) R = ' 2{vxVy + ww) 1 — 2(IT? + ITS) 2(VyVz - wvi) '. (24)

[0540] 1 - 2( 172 +

[0541]

[0542] 2( 17x172 - WVy) 2( VyVz + WVx) This transformation ensures that the resulting matrix is orthogonal and has a determinant of one, preserving rigid body rotations.

[0543] B.2 Rotation Matrix to Quaternion

[0544] To convert a given rotation matrix R to a unit quaternion q, we compute:

[0545] w = “ 1 + 1? + 1? + 1?, (25) 2 11 22 33

[0546] | U;2—-U+ V = • R13 — l?3i -. (26)

[0547]

[0548] 4W1?21 - 1?12 If w is close to zero, alternative formulas can be used to prevent numerical instability.

[0549] B.2.1 Computational Cost of Quaternion vs. Rotation Matrix

[0550] When multiple rotations are composed, quaternion multiphcation is more efficient than matrix multiphcation.

[0551] A quaternion multiphcation:

[0552] q ' = qi o q

[0553] requires 12 multiplications and 8 additions. On the other hand, combining two rotation matrices requires a full matrix-matrix multiplication:

[0554] R = R1R2

[0555] which involves 27 multiplications and 18 additions.

[0556] Thus, quaternions are significantly more efficient for chaining multiple rotations, making them preferable in apphcations such as robotics, real-time graphics, and sensor fusion.

[0557] References

[0558] [1] D. H. Titterton and J. L. Weston, Strapdown inertial navigation technology D. H. Titterton; John L. Weston.

[0559] Institution of Electrical Engineers, 2009.

[0560] Implementation of Offset Compensation in 9-Axis IMU Sensors

[0561] MATLAB Implementation of Offset Compensation in 9- Axis IMU Sensors A practical and simulation-backed framework for compensating the effects of spa- tial offset in 9-axis IMU sensors. A mathematical formulation is developed for transforming gyroscope, magnetometer, and accelerometer measurements between rigidly attached frames. The proposed method accounts not only for orientation differences but also for translational effects such as Coriolis and cen- trifugal acceleration. To support implementation, synthetic IMU data is generated from known rotational motion, and angular acceleration is estimated using a Kalman filter with Rauch-Tung-Striebel smoothing. Comparative analysis shows that the full compensation model significantly improves accuracy over na' ive rotation-only methods, particularly for accelerometer data. The algorithm is implemented and verified in MATLAB, providing a reliable and efficient solution for sensor fusion in robotics and motion tracking applications.

[0562] 1 Motivation

[0563] In many robotics and sensing applications, it is common to mount inertial measurement units (IMUs) at different locations on the same rigid body. A 9-axis IMU typically provides raw data from a gyroscope, magnetometer, and accelerometer. While the rigid body may undergo the same motion globally, the sensor readings will vary depending on the specific placement of the IMU due to rotational and translational offsets. These discrepancies arise from the sensor’s position and orientation relative to the reference frame of interest.

[0564] The objective of this project is to implement an algorithm that compensates for these offsets. Specifically, given the relative pose between two sensor locations rigidly attached to the same moving body, we aim to transform the raw measurements collected at one location to match those as if they were collected at the reference location. This requires modeling the kinematic relationships between multiple points on a rigid body and deriving consistent transformations for all three sensor modalities.

[0565] 2 System Description

[0566] We consider a moving rigid body observed from a fixed inertial frame, denoted as the global inertial frame G. This global frame serves as the reference for quantities such as gravity and magnetic north, which are assumed to be known and expressed in G. The gravitational acceleration vector is denotedGgo G R, and the direction of magnetic north is represented byGd.

[0567] To generalize the offset compensation approach across arbitrary pairs of coordinate frames, a designated end- effector frame E is rigidly attached to the moving body. Its global position and orientation are given byGpG,E∈ R3andGRB G SO3 are position and orientation of frame E, respectively. While this frame provides a common reference for internal calibration, it will be shown that its absolute pose in the global frame is not necessary for performing

[0568] offset compensation — only relative information between frames is required.

[0569] Each 9-axis IMU provides three primary sensor measurements: angular velocity from the gyroscope, specific force from the accelerometer, and magnetic field direction from the magnetometer. These measurements are inherently frame-dependent and must be modeled accordingly to enable cross-frame compensation. The model of all three sensors are expressed as follows:

[0570] g = RB(UG, E r m = R RGd (!)

[0571] 1fl=B-RJl(BfE +ESLE,i) where E

[0572] f ~EG, E ^ X p G,£?+BW G, E X (Bto G, E X P G, E) ~GR-£Ggo OJBdt ( / Ja'jB(A1G, E ^ xBP E, i+ B<^ G, E X G, E XEPBii)

[0573]

[0574] EPE,i e R,3andBRi G SO3 are the relative position and orientation of frame i with respect to frame E, respectively. These expressions fully characterize the frame-dependent nature of IMU measurements and form the

[0575] basis for transforming sensor data across locations on a rigid body. While not required for implementation, they are essential for synthesizing measurements in simulation, enabling forward modeling from known trajectories for testing and validation.

[0576] 3 Methodology

[0577] The goal of the offset compensation algorithm is to convert raw IMU measurements taken from a sensor at frame B to equivalent measurements as if they were taken at frame A, the designated reference frame. Both frames are rigidly attached to the same moving body, and their spatial relationship is known a priori. The compensation relies solely on relative pose information and does not require knowledge of the global orientation or position of the body. LetAR / ; G SO3 be the orientation offset from frame A to frame B, and let be the position offset from frame A

[0578] to frame B, expressed in frame A. These quantities are assumed to be known and constant, as the relative mounting configuration between the two sensor frames does not change over time.

[0579] he angular velocity of the body, as ideally measured by the gyroscope in frame B is given byB(HJG, B. Given the raw IMU measurements from frame B, the corresponding measurements in frame A are computed as:

[0580] Ag =ARBBg ill =ARB ill

[0581] (2)

[0582]

[0583] TA - KB IB - »AB where

[0584] d (R ) (

[0585] fia'V: J,WG, B XARApAB + G, B XBU)G, B XARApA, B

[0586] at

[0587]

[0588] B

[0589] To estimate the time-derivative of angular velocityB(»}G, B, a Kalman filter and Rauch-Tung-Streibel Smoother are utilized which are considered the Best Linear Unbiased Estimators (BLUE). Given a measurement from the gyro, the constant-jerk kinematics model is chosen as follows:

[0590] x[k + 1] = Fx[k] +Gw[k]

[0591] z[k] = Hx[k] + v[k],

[0592] where

[0593] F=1 At

[0594]

[0595] x G R6is a state vector representing both angular velocityB(Ggid its time-derive: x =

[0596]

[0597] G, B G, B At G R,+is the sample time. w[k] G R3~ N (o, SQ) is the zero-mean Gaussian process noise with covariance matrix of SQ, and v[k] G R3~ N (o, Sj?) is the zero-mean Gaussian measurement noise with covariance matrix of SB. ® is a kronecker product. The corresponding estimation algorithm is presented as follows:

[0598] Forward Pass with Kalman Filter for the estimated x:

[0599] x[0] =x0P[0] = P0

[0600] x[k] = Fx[k]

[0601] P[fc] = FP[fc]FT+ G1T

[0602] z[k] = Hx[k] S[k] = HP[k]HT+ Σ_R K[k] = P[k]HTS[k]-1 x[k + 1] = x[k] + K[k](z[k] - z[k])

[0603] P[k + 1] = P[k] - K[k]HP[k] Striebel smoother for the estimated x:

[0604] x[N] =x[N]

[0605] P[N] = P[N]

[0606] N[k - 1] = P[k - 1]FP[k]-1

[0607] x[k - 1] = x[k - 1] + N[k - 1](x[k] - x[k])

[0608]

[0609] P[k - 1] = P[k - 1] + N[k - 1](P[k] - P[k])N[k - 1]T

[0610] Note that the adjustable parameters are: x [0], P [0], S<?, and ST?.

[0611] The resulting smoothed angular velocity and its derivatives provide a more stable estimate of angular acceleration, which is then used in the offset compensation for the accelerometer as follows:.

[0612]

[0613] 4 Implementation

[0614] This section describes the implementation of the proposed offset compensation algorithm in MATLAB, including the generation of synthetic IMU data and the use of the derived compensation formulas.

[0615] 4.1 Measurement Synthesis

[0616] To validate the algorithm, synthetic IMU measurements are generated based on a known trajectory. The motion of the rigid body is defined using time-varying roll-pitch-yaw angles r(t) = r (f) r (t) r (t), each modeled as a x y z

[0617] sinusoidal signal:

[0618] ru(t) = Aucos(2πfut + φu)

[0619] where u G {x,y,z}, and Au, u, <pu are the amplitude, frequency, and phase shift of the respective component.

[0620] The first and second time derivatives of the angles are computed analytically:

[0621] d

[0622] d / dt(ru(t)) = -2πfuAusin(2πfut + φu)

[0623] d

[0624]

[0625] 2a

[0626] d² / dt²(ru(t)) = -4π²fuAucos(2πfut + φu)

[0627] dt- The roll-pitch -yaw angles and their derivatives are implemented as follows:

[0628] % Define simulation parameters and time vector

[0629] dt = 0.1; % sample time

[0630] tmax = 10; % maximum duration

[0631] t = 0: dt: tmax; % synthesized time-stamp

[0632] N = numel ( t ); % number of sample

[0633] % Define frequency and phase parameters for synthetic rotation signals

[0634] A = [ pi; pi; pi ]; % [A x; A y; A z]

[0635] f_n = [0. 3; 0. 25; 0. 5 ]; % [f z]

[0636] phi = [pi / 2;pi / 4;0]; % [phi x;phi y;phi z]

[0637] % Generate synthetic ro tation angles (r),

[0638] % fi rs t derivative (dr), and second derivati ve (ddr)r = zeros (3, N);

[0639] r = zeros (3, N); dr

[0640] = zeros (3, N);

[0641] ddr = zeros (3, N);

[0642] for u = 1:3

[0643] r(u,: ) = A(u)*cos(2*pi*f n (u)* t+phi (u ) );

[0644] dr(u,: ) = -2*pi* f n (u)*A(u)*sin (2*pi* f n (u)* t+phi (u ) );

[0645] ddr(u,: ) = -4*pi"2* f n (u) -2*A(u)* cos (2*pi*f n (u) * t+phi (u ) );

[0646] end

[0647]

[0648] The global orientation of the end-effector frame E is then computed as follows:

[0649] GRE(t) = Rotz(rz(t))Roty(ry(t))Rotx(rx(t))

[0650] The corresponding angular velocity of frame E, expressed in frame E, is obtained through differential kinematics:P

[0651] wd

[0652] (t) = B(r(t))- (r(f))

[0653] -B (ME®* =B<r(0)— (r(t)) + - (B) (r(t))- (r(f))

[0654]

[0655] dt dt dt where

[0656] □ □

[0657] 0 - sm(nXf))

[0658]

[0659] B(r(t)) = °0 cos(rft)) sin(rXO) cosCn / f))1-1

[0660] 0 — sin(r O) cos(r O)cos(ry(0) These intrinsic properties are implemented as follows:

[0661] R = zeros ( 3, 3, N); % Rotation matrices

[0662] B = zeros (3,3, N); % Jacobian matrices for angular velocity

[0663] dB = zeros ( 3, 3, N ); % Derivative of Jacobian matrices

[0664] w = zeros (3, N); % Angular velocity vectors

[0665] dw = zeros (3, N); % Time-derivative of angular velocity vectors

[0666] % Define IMU placement and gravity

[0667] p = [0; 0; 0 ]; % IMU position vector in body frame

[0668] d = [l; 0;0]; % Reference direction for magnetometer

[0669] g = [0; 0; -9.80665] % Gravity vector in inerti al frame

[0670] % Compute true orientation and motion values

[0671] for i = 1: N

[0672] % Roll -Pitch -Yaw angle ro tation

[0673] R(:,:, i ) = rot3D ( r(3, i ), 'z ' )* rot3D ( r(2, i ), 'y ' )* rot3D ( r (1, i ), 'x' );

[0674] % Jacobian Matrix

[0675] B(:,:, i ) = [1 0 -sin ( r(2, i ));

[0676] 0 cos(r(l, i )) sin ( r (1, i )) * cos ( r (2, i ) );

[0677] 0 -sin ( r (1, i )) cos( r (1, i )) * cos( r (2, i ) ) ];

[0678] % Time-derivative Jacobian Matrix

[0679] dB 23 = cos ( r (1, i )) * cos ( r ( 2, i )) * dr (1, i )-sin ( r ( 1, i )) * sin ( r ( 2, i )) * dr (2, i );

[0680] dB 33 = -sin ( r (1, i )) * cos ( r (2, i )) * dr (1, i )-cos ( r (1, i )) * sin ( r (2, i )) * dr (2, i ); dB (:

[0681] 0 0 -cos ( r (2, i )) * dr (2, i );

[0682] 0 -sin ( r (1, i )) * dr (1, i ) dB 23;

[0683] 0 -cos ( r (1, i )) * dr (1, i ) dB 33 ];

[0684] % Angular velocity in body frame

[0685] % Angular acceleration in body frame

[0686] dw(:, i ) = B(:,:, i )*ddr (:, i )+dB(:,:, i )* dr (:

[0687]

[0688] By substituting the orientation of frame paRE t), the angular velocity of frame E U)G, E(t), and the time- derivative of the angular velocity -dEU)G, E( ) into thg sensor models (1), we obtain the synthetic IMU measure- ments at each sensor frame. The global pose of frame A is arbitrarily chosen for simulation, but the relative pose between frame A and frame B is fixed and known. The measurement synthesis is implemented as follows: % Stati c offs e t in orie ntation and positi o n

[0689] % Arbitary chosen pose for A

[0690] r A = [ 0; 0; 0 ];

[0691] R A = rot3D ( r A (3), ' z ' ) 0 rot3D ( r A (2 ), 'y ' )* rot3D ( r A ( l), ' x ' ); p A = [ 1; 0; 0. 5 ];

[0692] % Fixed unknown offs e t

[0693] r AB = [ pi / 3; -pi / 6; pi / 4 ];

[0694]

[0695] R AB = rot3D (r AB (3), ' z ' )* rot3D (r AB (2), 'y ' )* rot3D (r AB ( 1), ' x ' ); p AB = [0; 0. 3536; - 0.8536 ];

[0696] % Corresponding pose for B

[0697] R B = R A*R AB;

[0698] p B = p A+R A*p AB

[0699] % Generate sy nthe ti c IMU measurements in frames A and B

[0700] % Ini ti a lize s torage

[0701] g A = zeros (3, N); g B = zeros (3, N); % Gyroscope readings

[0702] m A = zeros ( 3, N); m B = zeros ( 3, N); % Magnetometer readings

[0703] f A = zeros ( 3, N); f B = zeros ( 3, N); % Accelerometer readings

[0704] f = zeros ( 3, N); % Sp e cifi c force in i n e rti a l frame

[0705] for i = 1: N

[0706] % Gyroscope: Angular ve lo ci ty in sensor frame

[0707] g A (:, i ) = R A' *w(:, i );

[0708]

[0709] g B (:, i ) = R B' *w(:, i );

[0710] % Magnetometer: Transformed refe rence d i re cti o n

[0711] m A(:, i ) = R A' ER(:, i )*d;

[0712] m B(:, i ) = R B' 0R(:,:, i )*d;

[0713] % Accelerometer: Include ce ntrifug al and Euler forces

[0714] a A = cross (dw (:, i ), p A)+cross (w(:, i ), cross (w(:, i ), p A ) );

[0715] a B = cross (dw(:, i ), p B)+cross (w(:, i ), cross (w(:, i ), p B ) );

[0716] % Total spe cifi c force at frame E

[0717] f (:, i ) = cross (dw( i ), p)+cross (w( i ), cross (w( i ), p))-R(:, i ) ' 0 g;

[0718] % Spe cifi c force at each frame

[0719] f A (:, i ) = R A' 0 ( f (:, i )+a A );

[0720] f B (:, i ) = R B' l2 ( f (:, i )+a B );

[0721] end 4.2 Verification of the Compensation Algorithm

[0722] The synthesized measurement can be used for verifying the mapping relationship in (2). The compensated mea- surement from frame B to frame A is tested against the synthesize measurement of frame A. The verification is implemented as follows:

[0723] % Ve rifies that IMU data in A can be perfectly reconstructed from B

[0724] flag = true;

[0725] tolerance = 1e-8;

[0726] for i = 1: N

[0727] % Gyroscope comparison

[0728] flag = flag && all (abs(g A(:, i )— R AB*g B (: 7 i ))< to lera nee );

[0729] % Magnetometer comparison

[0730] flag = flag && all (abs(m A(:, i )-R AB*m B(: 7 i ))< to lera nee );

[0731] % Accelerometer comparison with offset correction

[0732] % Record angular velocity and acceleration in B’s frame

[0733] w B = R B'*w(:,i);

[0734] dw B = R B'*dw(:,i);

[0735] a BAB = cross (dw B, R AB' * p AB)+cross (w B, cross (w B, R AB'*p AB));

[0736] flag = flag && all (abs(f A (:, i )-R AB*( f B (:, i )-a B AB))< to lera nee );

[0737] end

[0738] flag % Should be true (1) if valid ation passed I

[0739]

[0740] The preliminary result shows that (2) can compensate for the pose offset with given ideal angular velocity and its time-derivative. However, in the real scenario, these quantities may not b e readily available. 4.3 The Algorithm

[0741] Using (3) and (4), the angular velocity and its derivative are estimated with the following implementation:

[0742] % Estimate angular v e l o ci ty and accele ration from B’ s gyro

[0743] Q = diag ( [0.01, 0.02, 0. 03 ] ); % Process noise covariance

[0744] R = diag([0.000003, 0.000002, 0.00000 1 ] ); % Measurement noise covariance

[0745] F = kron ( [ 1 dt; 0 1 ], eye ( 3 ) ); % State transiti o n matrix (6x6)

[0746] G = kron ( [ dt^2 / 2; dt ], eye ( 3 ) ); % Input matrix (6x3)

[0747] H = kron (

[0010] , eye (3 ) ); % Observation matrix (3x6)

[0748] % Ini ti a lize Kalman fi l te r

[0749] x e st = zeros (6, N); % State estimate: [w; dw]

[0750] P est = zeros ( 6, 6, N); % Estimate covariance

[0751] x pred = zeros ( 6, N); P pred

[0752] = zeros (6, 6, N);

[0753] x e st (:, 1 ) = [ [ 0; 0; 0 ]; [ 0; 0; 0 ] ];

[0754] P est (:,:, 1 ) = eye ( 6 );

[0755] % Kalman fi l te r loop

[0756] for i = 2: N

[0757] x pred (:, i ) = F * x e st (:, i - 1 );

[0758] P pred (:,:, i ) = F * P est (:,:, i -1) * F’ + G * Q * G’; y pred = H

[0759] * x pred (:, i );

[0760] S = H * P pred (:,:, i ) * H’ + R;

[0761] K = P pred (:,:, i ) * H’ / S;

[0762] x e st (:, i ) = x pred (:, i ) + K * ( g B (:, i ) - y pred );

[0763] P est (:,:, i ) = P pred (:,:, i ) - K * H * P pred (:,:, i );

[0764] end

[0765] % Apply Rauch-Tung-St ri e b e l (RTS) Smoother for refi ned estimate

[0766] x smooth = zeros (6, N);

[0767] P smooth = zeros (6, 6, N);

[0768] x smooth (:, N) = x e st (:, N);

[0769] P smooth (:,:, N) = P est (:,:, N);

[0770] for i = N-1: -1: 1

[0771] dx = ( x smooth (:, i +l) - x pred (:, i + 1 ));

[0772] dP = ( P smooth (:,:, i +1) - P pred (:,:, i + 1 ));

[0773] N p = P est (:,:, i ) * F ’ / P pred (:,:, i +1 ); x smooth (:

[0774] , i ) = x e st (:, i ) + N p * dx;

[0775] P smooth (:,:, i ) = P est (:,:, i ) + N p * dP * N p ’;

[0776] end

[0777] w est = x smooth ( 1: 3,: ); % Estimated angular ve lo city

[0778] dw est = x smooth ( 4: 6,: ); % Estimated angular acce leratio n

[0779] Finally, the algorithm is applied to the measurement at frame B and compared to the measurement at frame A. The algorithm and data visualization %% Apply estimated motion for measurement conversion

[0780] % Convert B-frame measurements to A-frame using es timates

[0781] g A con = zeros ( 3, N); m A con

[0782] = zeros ( 3, N); f A con =

[0783] zeros ( 3, N);

[0784] f A nai ve = zeros (3, N);

[0785] for i = 1: N

[0786] g A con (:, i ) = R AB*g B (:, i );

[0787] m A con (:, i ) = R AB *m B (:, i );

[0788] c e nt ri fu g a l = cross ( dw est

[0789]

[0790] (:, i ), R AB’ * p AB );

[0791] c o r i o l i s = cross ( w est (:, i ), cross ( w est (:, i ), R AB’ * p AB ) ); a B AB = c e n t r i f u g a l+c o r i o l i s;

[0792] f A con (:, i ) = R AB*( f B (:, i )-a B AB );

[0793] f A nai ve (:, i ) = R AB* f B (:, i );

[0794] end

[0795] %% Data Vis u aliz ati o n

[0796] % Plot and compare o rigi n a l vs converted data for v a li d ati o n

[0797] f g = figure ( 1 ); f m = figure ( 2 ); f f = figure ( 3 );

[0798] set (0, ’ Current Figure ’, f g ) fp = f

[0799] g. Po s i ti on;

[0800] f g. Po sitio n = [ fp ( 1: 2 ) 960 7 20 ];

[0801] s g t i 1 1 e ( ’ Gyro, Measurement, at, frame, A ’ )

[0802] set (0, ’ Current Figure ’, f m ) fp = f

[0803] m. Po si t io n;

[0804] f m. Po s it io n = [ fp ( 1: 2 ) 960 720 ];

[0805] s g t i 1 1 e ( ’ Magnetometer, Measurement, at, frame, A ’ )

[0806] set (0, ’ Current Figure ’, f f )

[0807] s g t i 1 1 e ( ’ Accelerometer, Measurement, at, frame, A ’ ) fp = f f

[0808] . Po s i ti o n;

[0809] f f. Po siti on = [ fp ( 1: 2 ) 960 7 20 ];

[0810] xyz = ’ xyz ’;

[0811] for i = 1: 3

[0812] set (0, ’ Current Figure ’, f g )

[0813] ax g = subplot ( 3, 1, i ); hold ( ax g, ’ on ’ )

[0814] plot ( ax g, t, g A ( i,: ), ’ r — ’, ’ LineWidth ’, 2 ); plot ( ax g, t, g A con ( i,: ), ’ b ’ ); grid ( ax g, ’ on ’ ); xlabel ( ax g, ’ $$t [ s ] $$ ’, ’ I nt erp re ter ’, ’ l ate x ’ ) ylabel ( ax g, sprintf ( ’ $$g {A,% c } $$ ’, xyz ( i ) ), ’ I nt erp re t er ’, ’ l ate x ’ ) legend ( ’ Measured, at, A ’, ’ Compenstated, from, frame, B ’ )

[0815] set (0, ’ Current Figure ’, f m )

[0816] ax m = subplot ( 3, 1, i ); hold ( ax m, ’ on ’ )

[0817] plot ( ax m, t, m A( i,: ), ’ r — ’, ’ LineWidth ’, 2 ); plot ( ax m, t, m A con ( i,: ), ’ b ’ ); grid ( ax m, ’ on ’ ); xlabel ( ax m, ’ $ $t [ s ] $$ ’, ’ I nterp re ter ’, ’ l ate x ’ ) ylabel ( ax m, sprintf ( ’ $$m {A,% c } $$ ’, xyz ( i ) ), ’ I nt erpret er ’, ’ l ate x ’ ) legend ( ’ Measured, at, A ’, ’ Compenstated, from, frame, B ’ )

[0818] set (0, ’ Current Figure ’, f f )

[0819] ax f = subplot ( 3, 1, i ); hold ( ax f, ’ on ’ )

[0820] plot ( ax f, t, f A ( i,: ), ’ r — ’, ’ L ineWidth ’, 2 ); plot ( ax f, t, f A con ( i,: ), ’ b ’ ); plot ( ax f, t, f A c l i e nt ( i,: ), ’m’ );

[0821] grid ( ax f, ’ on ’ ); xlabel ( ax f, ’ $$t [ s ] $$ ’, ’ I nterpre ter ’, ’ l a te x ’ ) ylabel ( ax f, sprintf ( ’ $ $ f {A,% c }$$ ’, xyz ( i ) ), ’ Int erp r et er ’, ’ l ate x ’ ) legend ( ’ Measured, at, A ’, ’ Compenstated, from, frame, B ’, ’ Rotated, Only ’ ) end 9 5 Result

[0822] The compensated gyro and magnetometer measurements at frame B are plotted and compared to the measurements at frame A. The results in Fig 88 and Fig 89 show that the compensated signals closely match the measurements at frame A, with minimal error. This confirms that the rotational compensation alone is sufficient for these sensors, as they are unaffected by translational motion.

[0823] i[Sj

[0824] Figure 88: Gyro Measurement vs. Time Figure 89: Magnetometer Measurement vs. Time In addition to the proposed compensation method, a naive baseline approach for the accelerometer measurement is implemented for comparison. This baseline simply rotates the accelerometer measurements from frame B into frame A without accounting for the relative acceleration induced by the sensor’s spatial offset. Mathematically, it assumes:

[0825] Ap A-JJ Bp

[0826] t A ~ KB I B,

[0827] which neglects Coriolis and centrifugal effects.

[0828] Figure 90: Accelerometer Measurement vs. Time

[0829] As shown in Figure 90, the compensated measurement obtained from the full model more closely matches the ground truth accelerometer measurement at frame A, whereas the na'ive approach introduces noticeable errors, especially under dynamic motion. This highlights the importance of accounting for rotationally induced acceleration when transforming sensor data between locations on a rigid body.

[0830] 6 Conclusion

[0831] This report presents a complete framework for compensating sensor offset in 9-axis IMU measurements across dif- ferent rigidly attached frames. By leveraging the kinematic relationships of a rigid body, the algorithm enables the transformation of raw measurements from an arbitrary sensor location to a designated reference frame, accounting for both rotational and translational offsets.

[0832] Through simulation, we validated the effectiveness of the proposed method. The compensated gyroscope and magnetometer readings matched the reference frame measurements with high accuracy using rotation alone, while the accelerometer required full compensation — including Coriolis and centrifugal terms — to achieve similar accuracy. The comparison against a na 'ive rotation-only baseline further highlights the necessity of these corrections in dynamic conditions.

[0833] The algorithm was implemented in MATLAB and verified using synthetic data generated from sinusoidal rota- tional motion. The use of Kalman filtering and RTS smoothing provided reliable estimates of angular acceleration, a critical component for accurate accelerometer compensation.

[0834] function R = rot3D (ang, ax)

[0835] c = cos (ang ); s = sin (ang );

[0836] if lower (ax) == 'x'

[0837] R = [ 1 0 0; 0 c -s; 0 s c ];

[0838] el seif lower (ax ) == 'y'

[0839] R = [c 0 s; 0 1 0; -s 0 c ];

[0840] el seif lower (ax) == ' z '

[0841] R = [c -s 0; s c 0; 0 0 1 ];

[0842] error (' Invalid, axis only,x,,y,, or, z, allowed ' );

[0843] end

[0844] end

[0845]

[0846] A Appendix: 3D Rotation about standard axes

[0847] A 3D rotation about a principal axis (X, Y, or Z) can be represented by a rotation matrix in SO3. Given an angle 0 G the corresponding rotation matrices are defined as follows:

[0848] Rotation about the X-axis:

[0849]

[0850] Rob(0) = cos 0 — sin 0^

[0851]

[0852] 0 sin 0 cos 0 Rotation about the Y-axis: > > cos 0 0 sin 0 Rotj / (0) = □ 0 I 0D— sin 0 0 cos 0 Rotation about the Z-axis:

[0853]

[0854] P12799PC01

[0855] cos 0 — sin 0 0

[0856] Rotz(0) = sin 0 Qos 0 0 >

[0857] 0 0 1

[0858] Each of these matrices performs a right-handed (counter-clockwise) rotation about the corresponding axis when applied to a vector in 3D space. A function rot3D can be implemented as follows:

[0859] Cross-Generation Quaternion Convention Alignment for Orientation Sensor A method for converting orientation data from a generation 2 (Gen2) sensor into the convention used by a generation 1 (Genl) sensor. Although both sensors output quaternions, they use different chirality and body-attached coordinate frames, which cause mismatches under identical physical motion. A conversion procedure is presented that includes chirality correction, empirical frame-offset identification, and quaternionbased transformation. Using data provided by Marturion Ltd, a fixed rotational offset was identified that successfully aligns Gen2 output with Genl convention. Validation confirms consistent orientation after conversion. This approach enables compatibility between sensor generations while preserving downstream model integrity.

[0860] 1. Introduction

[0861] This document defines the method used to convert orientation data from a second-generation sensor (Gen2) into the convention used by a first-generation sensor (Genl).

[0862] Although both sensors output orientation using quaternions, they differ in:

[0863] • Quaternion chirality,

[0864] • Body-attached coordinate frames.

[0865] Because body-attached frames differ, a frame offset necessarily exists between the two systems.

[0866] Additionally, chirality mismatch reverses rotation direction. These effects must be corrected to make the orientation data comparable.

[0867] This embodiment presents:

[0868] • The adopted target convention,

[0869] • An empirical method for determining frame offset,

[0870] • The conversion algorithm,

[0871] • Derived offset values for the current dataset.

[0872] 2. Target Convention (Genl)

[0873] 2.1 Chirality

[0874] The sensors use opposite conventions:

[0875] • Genl uses a left-handed quaternion system

[0876] • Gen2 uses a right-handed quaternion system

[0877] Since the system may require compatibility with Genl, all output data is expressed in Genl convention. Conversion is achieved via quaternion conjugation:

[0878] q = (w, x, y, z) — > (w, -x, -y, -z) P12799PC01

[0879] This converts right-handed rotations into left-handed equivalents.

[0880] 2.2 Body-Attached Coordinate Frames

[0881] The body-attached coordinate frames for Genl and Gen2 are defined by internal sensor design and differ between generations.

[0882] Different body-attached coordinate frames necessarily imply a constant rigid rotation between coordinate systems. This is referred to as the frame offset.

[0883] Because the axis definitions are undocumented, the mapping must be determined experimentally.

[0884] 3. Determining Frame Offset

[0885] 3.1 Multi-Axis Calibration Procedure

[0886] The frame offset is identified empirically by rotating the sensors about each of the three orthogonal physical axes.

[0887] The experiment must be performed separately for:

[0888] • X-axis rotation

[0889] • Y-axis rotation

[0890] • Z-axis rotation

[0891] For each axis:

[0892] 1. Rotate the sensor slowly and smoothly about a single axis only.

[0893] 2. Pause at known increments: 0°, 90°, 180°, and 270°.

[0894] 3. Record quaternion output at each step.

[0895] 4. Convert to rotation matrices.

[0896] 5. Extract body axes expressed in world coordinates.

[0897] 6. Compare Gen2 and Genl data.

[0898] Repeating this experiment for all three axes uniquely determines:

[0899] • Axis permutations

[0900] • Sign inversions

[0901] • Constant rotational offset

[0902] 4. Formal Conversion Procedure (Gen2 — > Genl)

[0903] This section defines the standardized method for converting Gen2 orientation data into the coordinate convention used by Genl.

[0904] 4.1 Chirality Transformation

[0905] Gen2 quaternions are expressed in a right-handed convention, whereas Genl uses a left-handed convention.

[0906] Each Gen2 quaternion must therefore be transformed via conjugation:

[0907] q2L = (w, -x, -y, -z) P12799PC01

[0908] This operation converts the representation into the Genl chirality while preserving the physical orientation.

[0909] 4.2 Identification of Frame Offset

[0910] After chirality alignment, any remaining disagreement between Gen2 and Genl must correspond to a constant rigid rotation between their body-attached coordinate frames.

[0911] This offset is determined empirically by comparing orientation outputs from both sensors while performing identical physical motions.

[0912] The procedure is:

[0913] 1. Perform controlled rotations about each of the three orthogonal axes.

[0914] 2. Observe corresponding orientations reported by both sensors.

[0915] 3. Express Gen2 and Genl body-attached unit axes in the world frame.

[0916] 4. Construct a rotation matrix whose columns correspond to the mapped axes.

[0917] The resulting matrix represents the rotation from the Gen2 coordinate frame into the Genl coordinate frame: R_offset e SO(3)

[0918] This matrix defines the unique rigid rotation aligning Gen2’s body frame with Gen1's body frame.

[0919] The corresponding quaternion offset is then obtained through:

[0920] q_offset = rotm2quat(R_offset)

[0921] This quaternion represents the constant transformation between sensor frames.

[0922] 4.3 Frame Offset Compensation

[0923] Let q_offset be the constant quaternion derived from the rotation matrix.

[0924] The reference orientation is defined as:

[0925] q_ref = q2L(0) ⊗ q_offset

[0926] Each measurement shall then be converted using:

[0927] q_gen1 = conj(q_ref) ⊗ ( q2L⊗ q_offset )

[0928] This operation:

[0929] • Applies the frame transform,

[0930] • Removes initial bias,

[0931] • Aligns all subsequent measurements.

[0932] 5. Measured Orientation Offset

[0933] Using a dataset, the orientation offset between Gen2 and Genl body-attached coordinate frames was empirically identified using the axis-rotation procedure described in Section 3.

[0934] From the observed alignment between corresponding axes, the relative rotation from the Gen2 coordinate frame to the Genl coordinate frame was determined to be:

[0935] R_offset =[ 001;-1 00;0 -1 0] P12799PC01

[0936] This matrix represents a fixed rigid-body rotation that maps Gen2’s body-attached coordinate frame into the Genl coordinate frame after chirality conversion.

[0937] The corresponding quaternion representation, expressed in scalar-first form (w, x, y, z), is:

[0938] q_offset = (0.5, -0.5, 0.5, -0.5)

[0939] This quaternion was used in the conversion algorithm defined in Section 4.

[0940] Conclusion:

[0941] Gen2 and Genl sensors differ in chirality and body-attached coordinate frames, making their outputs incompatible without conversion. This paper presents a practical method to correct chirality, identify frame offset, and convert Gen2 data into the Genl convention. Using the dataset, a constant offset was extracted and verified. Applying this conversion ensures consistency and preserves compatibility with existing Genlbased systems.

[0942] Some aspects and embodiments include or provide a Deep Learning Platform - Feature Extraction, Automatic Pattern Recognition & Classification.

[0943] Different aspects and embodiments of the invention may be used separately or together.

[0944] Further particular and preferred aspects of the present invention are set out in the accompanying independent and dependent claims. Features of the dependent claims may be combined with the features of the independent claims as appropriate, and in combination other than those explicitly set out in the claims. Each aspect can be carried out independently of the other aspects or in combination with one or more of the other aspects.

[0945] The present invention will now be more particularly described, by way of example, with reference to the accompanying drawings.

[0946] The example embodiments are described in sufficient detail to enable those of ordinary skill in the art to embody and implement the systems and processes herein described. It is important to understand that embodiments can be provided in many alternative forms and should not be construed as limited to the examples set forth herein.

[0947] Accordingly, while embodiments can be modified in various ways and take on various alternative forms, specific embodiments thereof are shown in the drawings and described in detail below as examples. There is no intent to limit to the particular forms disclosed. On the contrary, all modifications, equivalents, and alternatives falling within the scope of the appended claims should be included. Elements of the example embodiments are consistently denoted by the same reference numerals throughout the drawings and detailed description where appropriate.

[0948] Unless otherwise defined, all terms (including technical and scientific terms) used herein are to be interpreted as is customary in the art. It will be further understood that terms in common usage should also be interpreted as is customary in the relevant art and not in an idealised or overly formal sense unless expressly so defined herein.

[0949] In the following description, all orientational terms, such as upper, lower, radially and axially, are used in relation to the drawings and should not be interpreted as limiting on the invention.

[0950] A. Sensor Hardware: The integrated USB charging puck and combined 6-axis (LSM6DSO32TR) + 3-axis IMU (LIS3MDLTR) arrangement (dimensions: 45 x 45 x 11.2 mm) allows the strap to be fitted through the slots on either side of the “sensor unit” and then run under the watch directly against the skin. This integrated unit is comparable with Samsung Galaxy Watch: 45.7mm x 41.9mm x 12.7 mm and Apple Watch Series 8: 41mm x 35 x 10.7 mm. The sensor garment is available in three sizes: small (7” - 11.4”), medium (9”- 15”) and large (12” - 19.7”) arm circumference with affixed width of 30 mm. The strap is designed to compress the sensor down onto the skin minimizing unwanted side to side movement. It is also tensionable to ensure that the garment does not move during sessions. The IMU is securely attached to distal third of lateral upper arm with P12799PC01

[0951] a strap (e.g. self-adhering and / or high friction and / or elastic) approximately 8 cm above lateral epicondylar of the humerus bone, and dorsal wrist, Figure 3. Angular measurements of the shoulder are collected for calibration, clinically prescribed motion arcs (abduction, flexion, extension, external rotation, internal rotation) and ADL’s. The sensor is worn three times a day for approximately 10 mins in total and the same location of the sensor is confirmed by marking the skin with a marker using landmarks on the sensor for consistency. The I MU device samples at 100 Hz and data from the unit is transmitted to the app using Bluetooth Low Energy (BLE) to calculate movement range and quality of movement in various planes of movement. The data is stored in the device’s flash memory, which is a passive process and will communicate the data to a handheld smart device (iOS or Android). A streaming mode is also used to provide real time feedback for users to conduct a range of motion tests and for conducting guided set and rep schemes for exercises provided by the care provider.

[0952] Figure 2 Optimal placement of IMU on upper shoulder with a self-adhering strap approximately 8 cm above lateral epicondylar of the humerus bone, and dorsal wrist

[0953] Data from the application is immediately uploaded to a database hosted on a secure cloud server. The data is reported to the patient using a patient mobile application as well as to a healthcare provider mobile application and a web application. Additional features of the application are a series of surveys relevant to the specialists, the ability to upload wound photos, the ability to rate their pain, and a HIPAA compliant telemedicine feature to allow the patient to communicate with their provider.

[0954] B. Sensor App: The accompanying sensor app assists in the development of a platform for delivering selfmanagement interventions. Wireless telecommunication is used to synchronize with the Doctor App, send information regarding each patient’s progress with clinically prescribed motion arcs, home-based composite exercises and ADL’s, enable physicians to remotely supervise rehabilitation, and provide instant feedback to patients. The platform supports the delivery of text message reminders (pop-ups) from care-providers to mobile phones increasing the compliance of shoulder patients towards their personalized shoulder exercise regimen, and also assign personal home-based exercises based on their training performance, thus increasing their motivation. A deep learning architecture is required in tandem to process the sensor data collected and stored in the cloud each day and help sort and filter at-risk patients that require immediate intervention from those who are trending towards normalcy based upon their movement quality.

[0955] IMU Pre-Processing Steps: The IMU axis analogue to digital conversion refers to the process of transforming the continuous, analog voltage signals produced by an inertial measurement unit (IMU) sensor's gyroscope and accelerometer into discrete digital values that can be read and processed by a microcontroller, typically using an on-chip Analog-to-Digital Converter (ADC) within the IMU or a separate ADC circuit.

[0956] Accelerometer (g):

[0957] • ax, ay, az: Accelerometer data (acceleration along the x, y, and z axes)

[0958] • Raw ADC Value — > Divide by accelerometer sensitivity — > g

[0959] • 16bit Analogue: + / -4g = 8190 LSB / g (0.37mV per count) I Reference Voltage = 1.8V

[0960] • Each ADC step from the accelerometer represents 0.00012207g.

[0961] • Accel Sensitivity Factor = 0.225 V / g

[0962] Gyroscope (DPS or Degrees / Second):

[0963] • gx, gy, gz: Gyroscope data (angular velocity around the x, y, and z axes)

[0964] • Raw ADC Value — > Divide by gyroscope sensitivity — > Degrees Per Second (DPS)

[0965] • Each ADC step from the gyro represents 0.061036dps

[0966] • Ful Scale Range 1 Gbit ADC: ±2000dps (4000dps total range).

[0967] • Sensitivity = 0.00045 V / deg / s

[0968] Magnetometer (uT):

[0969] • mx, my, mz: Magnetometer data (magnetic field strength along the x, y, and z axes)

[0970] • Raw ADC Value — > Multiply by magnetometer sensitivity (4912 / 32768) — > Microtesla (uT)

[0971] The software supports onboard sensor fusion as part of the algorithm, which uses raw acceleration and angular velocity data to calculate orientation, either as quaternions or Euler angles, in almost real-time. P12799PC01

[0972] Euler Angles

[0973] • qx, qy, qz, qw: Quaternion data (orientation)

[0974] • ex, ey, ez: Euler angles (orientation)

[0975] C. Sampling Rate: The sampling rate is optimally selected at 100 Hz, which provides a balance between computational time, BLE data packet size and extraction of movement-related temporal and frequency-based features. This sampling rate is sufficient for most types of human motion tracking, and is commonly used for human gait analysis studies which are similar to the example use case. The power spectra highlighted in Figure 3 demonstrates that most of the energy is below ~15 Hz and above 30-40 Hz. Moreover, the power is not only 1010 times smaller but also contains no features (i.e. smooth), corresponding to a measurement frequency of 80+ Hz being required.

[0976] Figure 3 Power spectra analysis used to determine the optimum sampling frequency for the sensor.

[0977] D. Gravity Removal: For motion tracking, it is important to get the actual movement (acceleration) of the device without the constant influence of gravity. Gravity affects mostly the z-axis, but due to imperfections in sensor alignment, it might also slightly influence the x- and y- axis. This can be done with either a high-pass filter, or subtracting gravity acceleration from accelerometer measurements using the orientation of the device during each recorded measurement (quaternions or Euler angles)

[0978] E. Noise Removal: The primary objective of noise removal is to normalise the signals so that they are more reliable and accurate when extracting features that are significant for training machine learning models via noise reduction strategies (introduced by sensor movement for example) and separation (segmentation / classification) of prescribed exercises / ADL’s. Strategies available to remove signal-induced noise include the following:- (a) removal of gravity component on accelerometer using orientation data or high-pass filter, (b) removal of drift and low-frequency noise with high-pass filter (if high-pass filter was not used already for gravity removal), (c) removal high-frequency noise (smooth out signal) with one of: low-pass, Wavelet, moving-average median, or Savitzky-Golay filter and (d) application of Gabor transform for identifying intensity spikes along time, to trim out recorded shoulder movement before and after the actual exercise F. Sensor Calibration: The IMU calibration set-up ensure that the device is working by measuring the offset for each axis, and aligned properly with respect to the upper arm as intended by the manufacturer. The calibration software status category (e.g., “good”, “acceptable”, and “not calibrated”) is streamed to the app and the user rotates the IMU in different orientations until the calibration status indicates high accuracy. The following tests can be carried out to ensure that the device is working correctly; static test on flat surface, horizontal and side-to-side movement on flat surface, horizontal and side-to-side and up and down movement and arm placement by side (abduction @ 90°), Figures 4( a-d ) respectively. For the static test, we would expect the sensor to not be subject to forces other than gravitation (Z-axis), which we can assume is the direction of the gravitation force vector, Figure 4(a). For horizontal and side to side movement on a flat surface, we would expect non-gravitational forces to be acting in the X and Y axis, Figure 4(b). For horizontal, side to side and up and down movement on a flat surface, we would also expect non-gravitational forces to be acting in the X and Y axis, Figure 4(c). For an arm placed at 90 degrees in abduction we would expect the gravity axis to shift from Z to Y axis, Figure 4(d).

[0979] Figure 4 Sensor calibration tests to ensure that the device is operating optimally (a) static test on flat surface, (b) horizontal and side-to-side movement on flat surface, (c) horizontal and side-to-side and up and down movement and (d) arm placement by side (abduction @ 90°)

[0980] F. Deep Learning Model Inputs:

[0981] I. Meta Data in the form of general information (patient demographics), dominant arm, measurement, set of movements, can be added side by side with the acquisition of IMU data, Table 2.

[0982] Table 2 Meta data categorized into general (patient demographics), arm, measurement and per movement set.

[0983] ii Patient Demographic Parameters: pre-operative patient demographic parameters relevant to patients with either osteoarthritis or soft tissue trauma are summarized in T able 3. P12799PC01

[0984] Table 3 Patient demographic parameters relevant to patients with either osteoarthritis or soft tissue trauma undergoing surgical intervention

[0985] iii Shoulder Muscle Morphology Parameters: pre-operative muscle morphology parameters relevant to patients with osteoarthritis or soft tissue trauma are summarized in Table 4.

[0986] Table 4 Shoulder muscle morphology parameters relevant to patients with either osteoarthritis or soft tissue trauma undergoing surgical intervention

[0987] iv Shoulder Glenoid and Scapula Morphology Parameters: pre-operative bone morphology parameters relevant to patients with osteoarthritis only are summarized in Table 5.

[0988] Table 5 Shoulder glenoid and scapula morphological parameters relevant to patients with either osteoarthritis or soft tissue trauma undergoing surgical intervention.

[0989] v. Intra-Operative Soft Tissue Balancing Parameters: intra-operative soft tissue balancing parameters relevant to patients with osteoarthritis only are summarized in Table 6.

[0990] Table 6 Intra-Operative soft tissue balancing parameters relevant to patients with either osteoarthritis or soft tissue trauma undergoing surgical intervention

[0991] G. Wavelet Transform - Automatic Feature Extraction: The wavelet transform is a powerful tool for analyzing time-varying signals, offering both time and frequency resolution of movement quality in terms of duration (period), smoothness (amplitude), intensity (average speed), regularity, etc. The result of the wavelet transform is a time-frequency representation of the signal, showing how different frequency components evolve over time. Although Fourier transform decomposes a signal into its constituent frequencies, it does not provide any information about when those frequencies occur. Sample time domain signals extracted from the wearable sensor are given below in Figures 5-6.

[0992] Figure 5 Extracted time domain wavelets obtained from a wearable sensor attached to a right shoulder highlighting disturbance of rhythm / kinematic smoothness particularly in mid arc range 80-100 degrees of forward flexion; (a) normal movement (expressed in terms of angular velocity and Euler angles measured in Z-axis) and (b) rotator cuff pathology.

[0993] Figure 6 Extracted time domain wavelets obtained from a wearable sensor attached to a right shoulder highlighting large variation and jerky forward flexion motions observed during simulated frozen shoulder pain with deceleration towards end of range due to pain; (a) normal movement (expressed in terms of angular velocity and Euler angles measured in Z-axis) and (b) frozen shoulder pathology.

[0994] Movement smoothness is a measure of movement quality, and intuitively, it should be an intrinsic property of a movement and not depend on the kinematic variables (position, velocity, acceleration, etc.) selected to quantify it. A list of time and frequency domain-dependent IMU wavelet features are given below in Tables 7-8.

[0995] Table 7 Time domain features relevant to quantifying and stratifying kinematic smoothness.

[0996] Table 8 Frequency domain features relevant to quantifying and stratifying kinematic smoothness.

[0997] In order to extract movement indices of interest from the collected wavelets, data labelling is required, which is a process of annotating wavelet signals by assigning one or more meaningful labels. Conventional methods employ manually labelled data, while most loT devices produce limited unlabeled IMU data, e.g. Euler Angle data. Supervised learning (SL) techniques require labelled data in order to train the models. In the existing approaches, a subject matter expert (SME) is often needed for labelling data, and subsequently, the SL techniques are applied. The knowledge and experience of SMEs can constrain manual labelling accuracy. Also, this process for labelling large data sets is usually time and cost-intensive, and often unscalable. Therefore, there is a need for an automated labelling technique that can provide an efficient method for loT data labelling in lesser time and with accuracy at par with conventional manual labelling techniques. Wavelet analysis has indicated which axes are relevant during clinically prescribed motion, e.g. forward flexion, abduction, external rotation. Potentially, there are 27 axes of data (3 movements x 3 tri-axial sensors). Through experimental analysis, The ACC Y-Axis, Gyro Z-axis and Euler Z-axis provide useful data relating to movement quality and range for patients with either rotator cuff pain, frozen shoulder and joint instability, which correlates P12799PC01

[0998] with standard visual assessments, Tables 9-11. Processed Y-axis accelerometer, Z-axis gyroscope and Z-axis Euler angle data obtained from two subject matter experts during forward flexion, abduction and external rotation are summarized in Tables 12-19. The two subject matter experts created normal and simulated frozen shoulder and rotator cuff pain at various degrees of severity to demonstrate changes in movement quality (mean wavelength, mean amplitude and average speed per replicate) and range (Euler / Joint Angle) respectively.

[0999] • Normal ranges for mean wavelength, mean amplitude and average speed per replicate) and range (Euler / Joint Angle) during forward flexion were 1-2 s, 0.8 - 1.0 g, 120 - 250 ° / s, 70 - 100 ° / s and 130 - 155° respectively.

[1000] • Normal ranges for mean wavelength, mean amplitude and average speed per replicate) and range (Euler / Joint Angle) during abduction were 1-2 s, 0.8 - 1.0 g, 125 - 170 ° / s, 70 - 100 ° / s and 121 -168° respectively.

[1001] • Normal ranges for mean wavelength, mean amplitude and average speed per replicate) and range (Euler / Joint Angle) during external rotation were 0.8 - 1.6 s, 0.2 - 0.4 g, 40 - 70 ° / s, 5 - 20° / s and 48 - 68° respectively.

[1002] In all simulated tests, frozen shoulder resulted in a significant increase in mean wavelength, decrease in mean amplitude and average speed per replicate and a decrease in Euler angle for both test subjects during forward flexion, abduction and external rotation respectively, Tables 12-17. Similarly, rotator cuff pain also resulted in a significant increase in mean wavelength, decrease in mean amplitude and average speed per replicate and a decrease in Euler angle for both test subjects during forward flexion and abduction, Tables 18-19 Processed IMU data obtained from patients with unilateral rotator cuff pain assessed during forward flexion and abduction are summarized in Tables 20-21 respectively. In many cases, movement quality and range were compared before and after a trigger point injection to alleviate the symptoms of pain and also to the contralateral limb.

[1003] • During forward flexion assessment, mean amplitudes, wavelength, average speed per replicate and joint angle recorded from the painful limbs ranged between 39.1 - 212.6 ° / s, 1.5 - 3.8 s, 15.4 - 73.9 ° / s and 89.3 - 191.3° respectively. The corresponding values obtained from the same arm after trigger point injection to alleviate pain were as follows; 57.8 - 187.3 ° / s, 1.4 - 3 s, 26.9 - 93.7 ° / s and 83.9 - 168.1° respectively.

[1004] • The corresponding values obtained from the contra-lateral limbs were as follows; 45.3 - 152.1 ° / s, 1.7 - 3.1 s, 44.5 - 71.7 ° / s and 107.1 - 156° respectively. During abduction assessment, mean amplitudes, wavelength, average speed per replicate and joint angle recorded from the painful limbs ranged between 32.4 - 165.1 ° / s, 1.3 - 4.6 s, 14.8 - 71.5 ° / s and 79.3 - 181.2° respectively.

[1005] • The corresponding values obtained from the same arm after trigger point injection to alleviate pain were as follows; 32.4 - 188.7 ° / s, 1.4 – 3.1 s, 14.9 – 104.2 ° / s and 108.8 - 172.8° respectively. The corresponding values obtained from the contra-lateral limbs were as follows; 37.1 - 144.5 ° / s, 1.8 - 2.3 s, 29.7 - 78.4 ° / s and 83.7 - 190.5° respectively.

[1006] Processed IMU data obtained from patients with unilateral frozen shoulder assessed during forward flexion, abduction and external rotation are summarized in Tables 22-24 respectively. In many cases, movement quality and range were compared with the contralateral limb.

[1007] • During forward flexion assessment, mean amplitudes, wavelength, average speed per replicate and joint angle recorded from the frozen shoulder ranged between 0.45 - 0.67 g, 1.5 - 2.3 s, 40 - 70 ° / s and 72 - 116° respectively. The corresponding values obtained from the contra-lateral limbs were as follows; 0.9 g, 1.6, 80° / s and 129° respectively.

[1008] • During abduction assessment, mean amplitudes, wavelength, average speed per replicate and joint angle recorded from the frozen shoulder ranged between 0.4 - 0.7 g (82 - 84 ° / s), 1.4 - 2.0 s, 36 - 41 ° / s and 60 - 86° respectively. The corresponding values obtained from the contra-lateral limbs were as follows; 115-136 ° / s, 1.8 - 2.0 s, 94° / s and 143-155° respectively. P12799PC01

[1009] • During external assessment, mean amplitudes, wavelength, average speed per replicate and joint angle recorded from the frozen shoulder ranged between 0.08 - 0.12 g (19 - 70 ° / s), 1.3 - 1.7 s, 7 - 9 ° / s and 14 - 53° respectively. The corresponding values obtained from the contra-lateral limbs were as follows; 0.06 g, 1.4 s, 10.5 s, 94° / s and 57° respectively.

[1010] Processed IMU data obtained from patients with joint instability also demonstrate a marked reduction in movement quality.

[1011] • During forward flexion assessment, mean amplitudes, wavelength, average speed per replicate and joint angle recorded from an unstable joint ranged between 2.6 - 3 s, 69.5 - 120 ° / s, 23.3 - 59s ° / s, and 153-155° respectively.

[1012] • During abduction assessment, mean amplitudes, wavelength, average speed per replicate and joint angle recorded from an unstable joint ranged between 2.3 - 2.8 s, 57 - 122 ° / s, 28 - 68 s ° / s, and 153- 155° respectively.

[1013] Processed IMU data obtained from patients after joint replacement surgery also demonstrate a marked reduction in movement quality.

[1014] • During forward flexion assessment, mean amplitudes, wavelength, average speed per replicate and joint angle recorded from an unstable joint ranged between 1.8 s, 59.5 ° / s, 34.8 ° / s, and 24.5° respectively.

[1015] • During abduction assessment, mean amplitudes, wavelength, average speed per replicate and joint angle recorded from an unstable joint ranged between 1.6 s, 22.9 ° / s, 14.8° / s, and 62° respectively. A multi-layer neural network for automated segmentation, data labelling, feature extraction and analysis of movement related indices, e.g. duration, smoothness, intensity and regularity from raw time series 9-axis IMU data is illustrated in Figure 8. The performance in terms of feature extraction accuracy and computational efficiency of the model are improved using a signal-processing algorithm. The extracted labelled features are obtained from the left and right upper limbs and compared to population percentiles to determine whether the patient is demonstrating normal recovery or requires intervention from a care provider. An alert is sent to the care-provider to update them on the level of post-operative recovery achieved by the patient.

[1016] Table 9 IMU tri-axes sensitive to changes in peak interval and magnitude for patients suspected of either frozen shoulder, rotator cuff pain or joint instability during forward flexion.

[1017] Table 10 IMU tri-axes sensitive to changes in peak interval and magnitude for patients suspected of either frozen shoulder, rotator cuff pain or joint instability during abduction.

[1018] Table 11 IMU tri-axes sensitive to changes in peak interval and magnitude for patients suspected of either frozen shoulder, rotator cuff pain or joint instability during external rotation.

[1019] Table 12 Processed Y-axis accelerometer data highlighting changes in movement quality (mean wavelength and amplitude) and range (Euler Angle) assessed during forward flexion for two subject matter experts with normal and simulated frozen shoulder at various degrees of severity.

[1020] Table 13 Processed Z-axis gyroscope data highlighting changes in movement quality (mean wavelength and amplitude, average speed per replicate) and range (Euler Angle) assessed during forward flexion for two subject matter experts with normal and simulated frozen shoulder at various degrees of severity.

[1021] Table 14 Processed Y-axis accelerometer data highlighting changes in movement quality (mean wavelength and amplitude) and range (Euler Angle) assessed during abduction for two subject matter experts with normal and simulated frozen shoulder at various degrees of severity.

[1022] Table 15 Processed Z-axis gyroscope data highlighting changes in movement quality (mean wavelength and amplitude, average speed per replicate) and range (Euler Angle) assessed during abduction for two subject matter experts with normal and simulated frozen shoulder at various degrees of severity. P12799PC01

[1023] Table 16 Processed Y-axis accelerometer data highlighting changes in movement quality (mean wavelength and amplitude, average speed per replicate) and range (Euler Angle) assessed during external rotation for two subject matter experts with normal and frozen shoulder at various degrees of severity.

[1024] Table 17 Processed Y-axis accelerometer data highlighting changes in movement quality (mean wavelength and amplitude, average speed per replicate) and range (Euler Angle) assessed during external rotation for two subject matter experts with normal and frozen shoulder at various degrees of severity.

[1025] Table 18 Processed Z-axis gyroscope data highlighting changes in movement quality (mean wavelength and amplitude, average speed per replicate) and range (Euler Angle) assessed during abduction for two subject matter experts with normal and simulated rotator cuff pain at various degrees of severity.

[1026] Table 19 Processed Z-axis gyroscope data highlighting changes in movement quality (mean wavelength and amplitude, average speed per replicate) and range (Euler Angle) assessed during abduction for two subject matter experts with normal and simulated rotator cuff pain at various degrees of severity.

[1027] Table 20 Processed Z-axis gyroscope data highlighting changes in movement quality (mean wavelength and amplitude, average speed per replicate) and range (Euler Angle) assessed during forward flexion for patients with normal contralateral and shoulders with rotator cuff pain before and after a trigger point injection.

[1028] Table 21 Processed Z-axis gyroscope data highlighting changes in movement quality (mean wavelength and amplitude, average speed per replicate) and range (Euler Angle) assessed during forward flexion for patients with normal contralateral and shoulders with rotator cuff pain before and after a trigger point injection.

[1029] Table 22 Processed Y-axis accelerometer and Z-axis gyroscope data highlighting changes in movement quality (mean wavelength and amplitude, average speed per replicate) and range (Euler Angle) assessed during forward flexion for patients with normal contralateral and shoulders with frozen shoulder.

[1030] Table 23 Processed Y-axis accelerometer and Z-axis gyroscope data highlighting changes in movement quality (mean wavelength and amplitude, average speed per replicate) and range (Euler Angle) assessed during abduction for patients with normal contralateral and shoulders with frozen shoulder

[1031] Table 24 Processed Y-axis accelerometer and Z-axis gyroscope data highlighting changes in movement quality (mean wavelength and amplitude, average speed per replicate) and range (Euler Angle) assessed during external rotation for patients with normal contralateral and shoulders with frozen shoulder.

[1032] Figure 7 Deep learning architecture proposed for automated segmentation, data labelling, feature extraction and analysis of movement related indices, e.g. duration, smoothness, intensity and regularity from raw time series 9-axis I MU data

[1033] H. ADL Movement Recognition Algorithms

[1034] Activities of daily life (ADL’s) are fundamental tasks that enable individuals to function with a minimum of autonomy and maintain their quality of life. Precise evaluation of ADL, especially in clinical and rehabilitation contexts, is crucial for understanding individuals’ functional status and designing effective intervention. Shoulder movement is important for performing involuntary ADLs, including household chores, preparing meals, and recreational activities. The basic shoulder joint motions include abduction, adduction, flexion, extension, internal rotation, and external rotation; these motions are required for activities of daily life (ADL), including drinking, backward and forward movement of the upper arm, abduction, and lifting of the arm, Table 25. The movement patterns most used during assessment are scapula-humeral elevation in the sagittal and frontal plane and rotations at different elevation angles.

[1035] Table 25 Common involuntary ADL’s associated with shoulder movement

[1036] However, validly, and reliably demonstrating its use as a control and evaluation tool for ADL performance, in gestures such as eating, combing hair, dressing, sitting, or standing, still appears as an unresolved research challenge. Traditionally, the assessment of ADL has been based on direct observation and subjective evaluation by therapists, which entails biases, errors, and lack of precision in the results. Wearable sensors provide real-time information on kinematic aspects of human movement through continuous, dynamic, and P12799PC01

[1037] minimally invasive monitoring. It allows for a more accurate and objective assessment of the functionality of key joint complexes, identifying specific areas of weakness or limitation in movement during ADL and providing quantitative data on the person’s progress over time. On the other hand, it favours the motivation of patients, by being able to visualize their evolution, thus improving treatment adherence. The use of artificial intelligence (Al) techniques has been gaining popularity, by helping to improve the process of assessing and supervising different body movements using inertial sensors. Raw I MU time series data acquired from two volunteers carrying out during five voluntary ADL’s is shown in Figures 9-13. Al algorithms can process the data captured by inertial sensors and perform sophisticated analyses to detect patterns, identify alterations in movement, and provide relevant clinical information, Figure 8. This facilitates a more complete and accurate evaluation of the joint movement of the shoulder

[1038] A wearable inertial sensor combined with deep learning is therefore an effective tool to identify and classify various daily activities related to the shoulder region brining the following advantages:- • minimal sensorization (one sensor per segment)

[1039] • non-invasive and practically imperceptible to the user, which does not affect their daily routine and promotes acceptance and adherence to continuous monitoring, thus improving the reliability of the data collected. Moreover, it facilitates the integration of technology into the individual’s daily life at a low cost.

[1040] • Direct inertial data approach: Our study focuses on the direct use of accelerometer and gyroscope data without requiring additional conversion for model training.

[1041] • Broad scope and versatility covering a wide range of activities, showcasing its versatility and adaptability.

[1042] Figure 8 Deep learning architecture for ADL pattern recognition and inference

[1043] Figure 9 Raw IMU time series data acquired from two volunteers reaching a shelf above head; (a-b) accelerometer and (c-d) gyroscope data (n = 5 replicates per ADL).

[1044] Figure 10 Raw IMU time series data acquired from two volunteers when washing middle of back / undoing bra strap; (a-b) accelerometer and (c-d) gyroscope data (n = 5 replicates per ADL)

[1045] Figure 11 Raw IMU time series data acquired from two volunteers when combing hair; (a-b) accelerometer and (c-d) gyroscope data (n = 5 replicates per ADL)

[1046] Figure 12 Raw IMU time series data acquired from two volunteers when opening and closing doors; (a-b) accelerometer and (c-d) gyroscope data (n = 5 replicates per ADL)

[1047] Figure 13 Raw IMU time series data acquired from two volunteers when picking up apple form table; (a-b) accelerometer and (c-d) gyroscope data (n = 5 replicates per ADL)

[1048] 5. Alternative embodiments of the invention

[1049] Although the embodiments described earlier are specific to shoulder surgery and rehabilitation, it can be adapted to joint replacements of the upper and lower limbs.

[1050] 6. Advantages of the invention with the prior art

[1051] Conventional wearable sensors developed for real-time tracking rehabilitation after joint replacement surgery, e.g TracPatch, Motion Sense and MUVR capture range of motion and activity monitoring (step counts) data. The proposed wearable sensor captures metrics associated with movement quality, e.g. smoothness of discrete movements, e.g. duration, smoothness, intensity, regularity, etc. in addition to range of movement. Figure 14: Competitive Landscape

[1052] Commercially available two-sensor solutions

[1053] Longitudinal data relating to range, step counts, heart rate, PROMs

[1054] No “Movement Qualify”

[1055] • Temporal features: amplitude, speed, period, skewness, symmetry

[1056] • Spectral features: centroid, flatness, entropy, dominant frequencies P12799PC01

[1057] Better surrogate for assessing ADL and correlating with SPADI (Shoulder Pain and Disability Index) - ADL-related pain score

[1058] Figure 15: Example Sensor Overview

[1059] Single wearable sensor “Smart Watch” 6+3 Axis I MU

[1060] Bridges gap between remote and in- person assessment

[1061] Clinician - improvements in intervention

[1062] S+N: Digitize benefits of intervention

[1063] Collects Range, PROMs + Function (Movement Quality) data

[1064] Deep learning-based software Measurements

[1065] • Calibration

[1066] • PT-prescribed strengthening exercises

[1067] • Core exercises (FF, ABD, ER)

[1068] • ADL’s

[1069] Figure 16: Rl. SHOULDER: Reverse Shoulder Patient Data Aggregation

[1070] Figure 17: Rl. SHOULDER: Rotator Cuff Patient Data Aggregation

[1071] Figure 18: Calibration Algorithms

[1072] Compute joint angle from a single sensor at any distance along forearm from joint center of rotation and at any axis of rotation (2DOF)

[1073] Static gesture / posture to inform app of the angular offset at start of a session using quaternion analysis (rotational compensation)

[1074] Normalization of raw sensor output data (alignment of sensor axes with anatomical axes for any given rotation)

[1075] Extracted Features

[1076] Extracted per individual movement repetition.

[1077] Structured breakdown helps in identifying movement impairments by analysing differences in movement duration, biomechanics, and quality across healthy and pathological conditions.

[1078] Movement Duration Features

[1079] Movement duration - delayed by pathology / pain

[1080] Movement termination phase duration - delayed by pain avoidance or control issues Movement phase duration ratio - deviation suggestive of compensation or pathology Biomechanical Features

[1081] ROM - movement range limitation

[1082] Average movement intensity - movement vigor / speed

[1083] Movement Quality Features

[1084] Jerk / velocity - movement smoothness

[1085] Jerk / Acceleration - movement smoothness

[1086] Speed Arc length - movement smoothness

[1087] Figure 19: Sensor Orientation Calibration

[1088] Aligning sensor’s axes to a predefined frame of reference.

[1089] Why do we need it: When putting the sensor on at home people can put it on upside down or rotated to the back of the upper arm.

[1090] This may vary from session to session and patient to patient, making within- (and across-) patient comparisons challenging.

[1091] Figure 20: Aligning Sensor Axes

[1092] With first-fit calibration, we find a quaternion that rotates initial sensor orientation at the recording start to that established at the initial fit (at the clinician’s).

[1093] This quaternion should be used to rotate the axes of all the sensors. P12799PC01

[1094] GRAVITY REMOVAL: When accelerometer and orientation data is not aligned, the gravity removal is inaccurate.

[1095] CONSISTENT FEATURE VALUES: If sensor orientation varies between sessions, so do accelerometer and gyroscope readings

[1096] Without correcting for it, any features extracted from the magnitude of those signals will fluctuate not due to progress / regress but due to changing orientation of the sensor.

[1097] E.g. sensor mounted to back of arm, any jerk that is normally observable on z-axis may now be decomposed into z- and x components

[1098] Figure 21: Removing Gravity

[1099] Based on quaternionjt] and accelerometerjt] estimate what was the quaternion describing sensor’s initial position (q nit)

[1100] 2. Rotate gravity vector [0, 0, 1] in global frame by q_init, and subsequently by quaternion[t] (gravity[t]) 3. Subtract gravity[t] from accelerometer[t]

[1101] Figure 22: Anatomical Calibration

[1102] Based on accelerometer reading at rest, we get the orientation of the anatomical y-axis.

[1103] Based on gyroscope readings during the small rotation around the z-axis (flexion), we get the orientation of the anatomical z-axis.

[1104] Using cross-product we compute the orientation of the anatomical x-axis.

[1105] We gather all of those axes into rotation matrix and transform it into a quaternion We rotate all the sensor readings by this quaternion.

[1106] Figure 23: First-Fit Calibration - Quaternion Data Analysis

[1107] ALL sensor readings comparable between sessions.

[1108] Compensation for linear displacement along the limb and angular rotation about the limb axis.

[1109] Orientation data corrected for in the recordings.

[1110] Data Acquisition Protocol

[1111] Sampling Rate: 100Hz

[1112] 3 Core Exercises (5 replicates each) (~30-60s) L / R arm data capture

[1113] Metadata

[1114] • ID, Sex, Age, Weight, Height, Session Timestamp, Shoulder Procedure (CSSD code)

[1115] • Sensor Location

[1116] • Motion Arcs

[1117] • Post-operative Intervention

[1118] • Calibration data (sensor lying flat and stationary on a hard surface)

[1119] • Dominant hand

[1120] • (Optional) Perceived general fatigue level (e.g. on scale 1-5 or 1-10)

[1121] • Other identified conditions (if might affect measurement - e.g. back pain, or any pain in general, scoliosis, any condition that might cause body tilt, conditions that might cause involuntary movements etc.)

[1122] Figure 24: Data Acquisition - Sensor Calibration

[1123] Figure 25: Data Acquisition - Sensor Calibration

[1124] Figure 26: Movement Segmentation & Feature Extraction Tool

[1125] Segment recordings into individual movements and extract features per movement repetition.

[1126] Time domain and spectral features in different ranges of motion.

[1127] IMU-Based Movement analysis.

[1128] Automatic movement segmentation of IMU sensor data, extracting relevant features and visualising healthy vs pathological movement patterns. This tool helps users quickly analyse, compare and interpret IMU signals (e.g. accelerometer, gyroscope and Euler angles) across different movement types.

[1129] Example Use: P12799PC01

[1130] Upload data: upload one CSV for a healthy arm and another CSV for an arm with pathology.

[1131] Segmentation & Feature Extraction: the programme automatically segments the data and computes multiple features (duration, range of motion, etc).

[1132] Visualisation: explore segmented IMU signals and compare extracted features in easy-to-read charts. Make observations: select features to plot to analyse differences between healthy and arm with pathology.

[1133] Time Lapsed Wavelet Feature Extraction

[1134] Kinematic Smoothness / Range of Movement

[1135] Time Domain Features

[1136] • Wavelet Features:

[1137] o Amplitude / Extent of Movement: max, min, mean,

[1138] STD, IQR, period

[1139] o Rate of Movement / Frequency: No., timing of peaks, phase shifts, deceleration, average speed

[1140] o Movement:

[1141] ► Duration.

[1142] ► Total trajectory during exercise:

[1143] ► Integrate acceleration to find displacements.

[1144] ► Total displacement in each component (x,y,z)

[1145] o Skewness

[1146] ► +ve skew: sharp sudden accelerations.

[1147] ► -ve skew: sharp sudden decelerations.

[1148] ► Zero skew: balanced smooth motion

[1149] o Range-Specific Wavelet Features: 0-45, 45-90, 90+°

[1150] o Kurtosis / Asymmetry:

[1151] ► High: sudden jerky movements.

[1152] ► Low: very controlled careful movement.

[1153] ► Normal: balanced smooth movement

[1154] o Spectral Energy and Power - Whether energy being expended at low or high frequency (shaking?)

[1155] Frequency Domain Features

[1156] • Power Spectra (Spectral Density)

[1157] o Spectral features in different frequency ranges: 0-3, 3-8, 8+ degrees

[1158] o Corner Frequency

[1159] o Spectral Centroid, Flatness, Moments

[1160] o Entropy

[1161] o Dominant Frequencies

[1162] o Symmetry

[1163] • Fourier Transform

[1164] o Dominant coefficients (amplitude and phase)

[1165] o and - Measure of how “lopsided” and “extreme” the motion

[1166] o (3dB) corner frequency (fc)

[1167] Figure 27: Episodic Data Patient Demographics

[1168] Data collected in clinical setting

[1169] Figure 28: Core Exercises - Normal Data (n=2)

[1170] Figure 29: Core Exercise- Dummy Pathological Data (n=2)

[1171] Figure 30: FF Patient Data - Initial Assessment

[1172] Frozen shoulder and OA - genuine stiffness which would remain even if examined under anaesthetic. RC pain, range shouldn’t be restricted but patients won’t push through painful arc if it is too sore. If anaesthetised movement would be full. P12799PC01

[1173] Figure 31: ABD Patient Data - Initial Assessment

[1174] Figure 32: Cuff Patient FF - Before / After Anaesthetic Injection

[1175] With RC pain, range shouldn’t be restricted but patients won’t push through painful arc if it is too sore. If anaesthetised movement would be full.

[1176] Range is not a good diagnostic tool for RC problems perse.

[1177] If, however, range improves after subacromial injection then this is very informative.

[1178] Injection works well in some patients immediately after treatment.

[1179] Figure 33: Cuff Patient FF - Temporal Effect of Injection

[1180] Figure 34: Cuff Patient ABD - Before / After Anaesthetic Injection

[1181] Range is not sensitive enough to detect functional changes in rotator cuff-activated movement.

[1182] Intramuscular injection works well in some patients immediately after treatment.

[1183] Figure 35: Cuff Patient ABD - Temporal Effect of Injection

[1184] Figure 36: Activities of Daily Living (ADL’s)

[1185] Involuntary Movements - Unique Wavelet Pattern

[1186] Shoulder Pain and Disability Index (SPADI)

[1187] Patient completed questionnaire with 13 items assessing pain level and extent of difficulty with ADLs requiring the use of the upper extremities.

[1188] Pain subscale has 5-items and the Disability subscale has 8-items.

[1189] A score of 0 indicates best 100 indicates worst. A higher score shows more disability. Relevant to following patients

[1190] • Shoulder Pain

[1191] • Rotator Cuff Disease

[1192] • Osteoarthritis

[1193] • Rheumatoid Arthritis

[1194] • Frozen Shoulder

[1195] • Shoulder Arthroplasty

[1196] Figure 37: Involuntary Movement Segmentation & Classification

[1197] Figure 38: ADL Movement Classification: P0034

[1198] Figure 39: ADL Movement Classification: P0014

[1199] Figure 40: ADL - RC Pain Patient Data (n=2)

[1200] Figure 41: ADL - RC Pain Patient Data (n=2)

[1201] Figure 42: ADL - Opening / Closing Door “Normal Range”

[1202] Figure 43: ADL - Eating Apple “Normal Range”

[1203] Figure 44: ADL - Reaching Above Shelf “Normal Range”

[1204] Figure 45: ADL - Washing Middle of Back “Normal Range”

[1205] Figure 46: ADL - Combing Hair “Normal Range”

[1206] Figure 47: Frequency Domain: ABD Data

[1207] Acceleration: (Normal / RC) increased centroid (1.11 -> 1.31) and decreased entropy (1.82 -> 1.72).

[1208] RC patients use more jerky compensatory movements.

[1209] Centroid / Entropy: (Normal / FS) (1.11 -> 0.75) (1.82 -> 1.13). FS movements are slower and more rigid. FFT Low bands distribution.

[1210] Normal: 96.5%; Rotator Cuff: 97.3%; FS 99.2 %. P12799PC01

[1211] Increasing concentration in low frequencies may align with pathology severity.

[1212] Figure 48: Frequency Domain: FF Data

[1213] RC patient shows notable patterns in movements suggesting compensatory mechanisms are more prominent in FF.

[1214] Higher centroid (1.27) compared to normal (0.66) Higher entropy (1.82) compared to normal (1.32).

[1215] Significantly more energy in mid frequency band (7.2%) compared to normal (1.3%).

[1216] In forward flexion (acc), rotator cuff patient shows significantly lower energy in low freq bands.

[1217] Figure 49: Frequency Domain ER Data

[1218] Frozen shoulder shows higher centroid (1.28) than normal (0.72). This could potentially be due to compensatory movements.

[1219] Spectral spread increases dramatically in both pathological conditions (normal:0.64, Rotator Cuff: 1.17, Frozen Shoulder: 1.59). This suggests more variable frequency content in pathological movements, in result of compensatory patterns.

[1220] Both pathologies show reduced energy in lower frequency band (97% - rotator Cuff, 92.8% - frozen shoulder) compared to normal at around (99.4%).

[1221] Figure 50 & 51: perspective and sectional view of a wearable sensor 10 formed in accordance with an embodiment of the present invention.

[1222] Figure 52: PCB schematic diagram.

[1223] Figures 53 to 83: flow-charts for the firmware, app software, and web-dashboard.

[1224] The invention is not limited to the embodiments described and is capable of numerous variations, modifications, and alternatives, all of which fall within the scope of the inventive concept. Feature Equinox Blueprint TrueSight Signature TruMatch Match Point VIP Myshoulder Archer 3D Space 3D e (Stryker) (Stryker) One (ZB) (Depuy) System (DJO) (Arthrex) (Medacta) (Catalyst Ortho(Lima) (Exactec Science) h)

[1225] Auto-segmentation X z X Z X X X X Z Z Glenoid-side planning Z z Z Z Z Z Z Z z Z Humeral-side planning Z z X X X X X Z z X Predictive analytics Z X X X X X X X X X Complete implant

[1226] templating (bone

[1227] Multi-planar manipulation, ream Partial Partial Partial Z Partial Partial Partial Partial Partial osteotomy depth, screw

[1228] angles / length)

[1229] Muscle- related

[1230] considerations

[1231] (length, moment arm,

[1232] force-generating x x x x x x x x x x capacity, passive

[1233] tensioning)

[1234] ROM / Impingement Z Z Z? Z?? Z

[1235] estimation x x Immersive 3D virtual

[1236] l x Z

[1237] p an x X x X X x X X Surgical guidance

[1238] CAS PSI PSI PSI PSI PSI PSI PSI PSI CAS

[1239] technology

[1240] 3D Virtual Plan Tracked

[1241] by OTS x x x X x X X x X x

[1242]

[1243] aTSA and rTSA planning Z aTSA only rTSA rTSA only Z Z Z Z Z Z

[1244] Table 1 General • Patient unique id (internal, GDPR compliant, for identifying returning (required): patient, character Scramble or Character Substitution generator or csv file number)

[1245] • Sex

[1246] • Age

[1247] • Weight (Kg / lbs / Pounds)

[1248] • Height (feet / inches / cm),

[1249] • Date of measurement / session

[1250] • Shoulder procedure (CSSD code)

[1251] • Sensor location on arm (predetermined on lateral aspect of arm)

[1252] • Distance from distal edge of sensor garnet to lateral epidcondyle (predetermined at 8cm in neutral position)

[1253] • Motion arcs selected (Forward Flexion, External Rotation, Abduction) • Post-operative intervention

[1254] • Number of replicates per motion arc

[1255] • Calibration data (sensor lying flat and stationary on a hard surface) • Dominant hand

[1256] • (Optional) Perceived general fatigue level (e.g. on scale 1-5 or 1-10) • Other identified conditions (if might affect measurement - e.g. back pain, or any pain in general, scoliosis, any condition that might cause body tilt, conditions that might cause involuntary movements etc.)

[1257] Per Arm • Side

[1258] (required): • if is dominant

[1259] • is the one currently in treatment (vs. measured for comparison)

[1260] • identified condition (also for the comparison arm)

[1261] • Idle pain level

[1262] • (optional) Perceived arm fatigue level

[1263] Per • Side

[1264] Measureme • if is post injection

[1265] nt • (optional) if fatigue arises throughout measurement

[1266] • (optional) order of exercises (should be always the same and possibly redundant, because of the data gathered per set of movements) Per • Which in order

[1267] Movement • Type of movement (Forward flexion, Abduction-adduction, External Set rotation)

[1268] • Was properly performed

[1269] • Movement causes pain

[1270]

[1271] • Number of movements (should always be the same)

[1272] Table 2 Patient Demographic Features Units Range Selected Value Age Yrs 16-100

[1273] Weight lbs 80 - 500

[1274] Height Inches 48 - 96

[1275] Ethnicity - White

[1276] Asian

[1277] Black

[1278] American Indian

[1279] Native Hawaiian

[1280] Pacific Islander

[1281] Surgery Type Joint Instability

[1282] Rotator Cuff Repair

[1283] Frozen Shoulder

[1284] Joint Replacement Surgery Trauma

[1285] Surgery Side - Left / Right

[1286]

[1287] Comorbidities - Diabetes, heart disease etc.

[1288] Table 3 Muscle Morphologic Features

[1289] Rotator Cuff

[1290] Supraspinatus Infraspinatus Teres Subscapula ris Teres Major Deltoid Minor

[1291] 1. Level of Atrophy: Occupation ratio

[1292] • Grade 1: 0.6-1.0, normal to

[1293] slight atrophy

[1294] • Grade 2: 0.4-0.6 - moderate

[1295] atrophy

[1296] Grade 3: <0.4 - severe atrophy

[1297] 2. Cuff Tear Size: Cofield Classification

[1298] Grade 1: Small < 1cm

[1299] • Grade 2: Medium 1-3 cm

[1300] • Grade 3: Large 3-5 cm

[1301] • Grade 4: Massive >5cm

[1302] 3. Cuff Tear Shape: Ellman and Gartsman Classification

[1303] Crescent

[1304] Reverse L

[1305] • Trapezoidal

[1306] • Massive Tear

[1307] 4. Degree of Fatty Infiltration

[1308] • Grade 0: Normal muscle with

[1309] no fatty streaks

[1310] Grade l: Some fatty streaks

[1311] Grade 2: <50% fatty muscle atrophy

[1312] Grade 3: 50% fatty muscle atrophy:

[1313] • Grade 4: >50% fatty muscle

[1314] atrophy

[1315] 5. Muscle Body Dimensions

[1316] Muscle Fibre A-P Length Range: 20 - 30 mm Range: 12.6 - 18.9 Range: Range: 20 - 40 mm Range: 30 -60 Range: 160 - cm 25 - 57 mm 170 mm mm

[1317] • Muscle Fibre Medio-lateral Range: 20 - 35 mm Range: 20 - 30 mm Range: Range: 15 - 25 mm Range: 2 - 10 Range: 160 - Width 15 - 25 mm 170 mm mm

[1318]

[1319] Table 4 Bone Morphologic Humerus Scapula Features

[1320] Normal Range: Value: Normal Range: Value: 1. Neck-Shaft Angle 125 to 150°

[1321] 2. Version Angle -30 to +30°

[1322] 3. Head Diameter 30 to 60 mm

[1323] 4. Glenoid Inclination 0 to 10°

[1324] 5. Glenoid Version -4 to 4°

[1325] 6. Scapula Neck Length - 15 - 20 mm

[1326] A

[1327] 7. Scapula Neck Length - 5 - 11 mm

[1328] P

[1329] 8. Glenoid SI Length 30-40 mm

[1330] 9. Glenoid Width 20 - 30 mm

[1331]

[1332] 10. Radius of Curvature 20 - 30 mm

[1333] Table 5 Passive Intra-Operative Anatomical Total Shoulders Reverse Total Shoulders Tensioning

[1334] Anatomical Total Shoulder Normal Value: Normal Value: Arthroplasty Range: Range:

[1335] • >50% posterior and Normal Value: Normal Range Value: inferior translation of Range:

[1336] head trial

[1337] • 60° external rotation Normal Value: Normal Range Value:

[1338] Range:

[1339] • up to 25% anterior Normal Value: Normal Range Value: translation of head Range:

[1340]

[1341] trial

[1342] Table 6 Kinematic Smoothness / Range of Movement - Time Domain IMU Wavelet Features o Amplitude / Extent of Movement: max, min, mean, STD, IQR, period

[1343] o Rate of Movement / Frequency: No., timing of peaks, phase shifts, deceleration, av speed

[1344] o Movement:

[1345] > Duration.

[1346] > Total trajectory during exercise:

[1347] > Integrate acceleration to find displacements.

[1348] > Total displacement in each component (x,y,z) and overall.

[1349] o Skewness

[1350] > +ve skew: sharp sudden accelerations.

[1351] > -ve skew: sharp sudden decelerations.

[1352] > Zero skew: balanced smooth motion

[1353] o Range-Specific Wavelet Features: 0-45, 45-90, 90+ degrees

[1354] o Kurtosis / Asymmetry:

[1355] > High: sudden jerky movements.

[1356] > Low: very controlled careful movement.

[1357] > Normal: balanced smooth movement

[1358] o Spectral Energy and Power - Whether energy being expended at low or high frequency

[1359]

[1360] Table 7 Kinematic Smoothness / Range of Movement - Frequency Domain Features o Power Spectra (Spectral Density)

[1361] > Spectral features in different frequency ranges: 0-3, 3-8, 8+ degrees > Corner Frequency

[1362] > Spectral Centroid, Flatness, Moments

[1363] > Entropy

[1364] > Dominant Frequencies

[1365] > Symmetry

[1366] o FourierTransform

[1367] > Dominant coefficients (amplitude and phase)

[1368] > and - Measure of how "lopsided" and "extreme" the motion

[1369] > (3dB) corner frequency (fc)

[1370]

[1371] Table 8 9-Axis IMU Assessment

[1372] Pathology ACC Y-Axis Gyro Z-axis Euler Z-axis Visual Movement Quality / kinematic Smoothness Mean Mean Mean Mean Average Range (°)

[1373] Period (s) Amplitude Period (s) Amplitude Speed (7S)

[1374] (g) (%)

[1375] Frozen Increased Reduced Increased Reduced Reduced Reduced Decelerate towards end of range Shoulder due to pain

[1376] Rotator Cuff No change No change Increased Reduced Reduced Mildly Reduced Disturbance of rhythm / kinematic Pain smoothness particularly in mid arc range 80-100 degrees of FF Joint Increased Reduced Increased Reduced Reduced No Change Not detectable

[1377] 1 nstability / Di

[1378] slocation

[1379] Joint Reduced

[1380]

[1381] Replacement

[1382] Table 9 9-Axis IMU Assessment

[1383] Pathology ACC Y-Axis Gyro Z-axis Euler Z-axis Visual Movement Quality / kinematic Smoothness Mean Mean Mean Mean Average Range (°)

[1384] Period (s) Amplitude Period (s) Amplitude Speed (7S)

[1385] (g) (%)

[1386] Frozen Increased Reduced Increased Reduced Reduced Reduced Decreased (pathognomonic) Shoulder

[1387] Rotator Cuff No change No change Increased Reduced Reduced Reduced No change

[1388] Pain

[1389] Joint Increased Reduced Increased Reduced Reduced No change Not detectable

[1390] Instability

[1391] / Dislocation

[1392] Joint No change Reduced No Reduced Reduced Reduced

[1393]

[1394] Replacement Change

[1395] Table 10 9-Axis IMU Assessment

[1396] Pathology ACC Y-Axis Gyro Z-axis Euler Z-axis Visual Movement Quality / kinematic Smoothness Mean Mean Mean Mean Average Range (°)

[1397] Period (s) Amplitude Period (s) Amplitude Speed (7S)

[1398] (g) (%)

[1399] Frozen Increased Reduced Increased Reduced Reduced Reduced Decelerate towards end of range Shoulder due to pain

[1400] Rotator Cuff No change No change No change No change No change No change No change

[1401] Pain

[1402] Joint Increased Reduced Increased Reduced Reduced No change Not detectable

[1403] Instability /

[1404] Dislocation

[1405] Joint No Reduced No Reduced Reduced Reduced

[1406]

[1407] Replacement Change Change

[1408] Table 11 IMU Mean Wavelength Mean Amplitude MEAN ROM- Subject Motion Arc State Side Replicates SD SD SD Axis (s) (g) Euler-Z (°) GJ FF Y 10 2.16 0.25 0.04 153.3

[1409] GJ FF Mild FS Y Right 10 2.47 0.36 0.57 0.03 86.2 4.2

[1410] 10 278 0.27 0.04 6.2 DJ Y 10 2.14 002 2.4

[1411] 293 20.5 Norm.il Y 0.93 0.06

[1412] Y 0.22 0.20

[1413] Y ■ 1.08 ■ 0.92

[1414] Norm.il ■ 0.89 0.05

[1415] 1.18 0.35 0.88 0.04 132.6 5.4 ■ 1.32 0.01

[1416] Norm.il ■ 1.22 ■ 0.03

[1417] 0.91 0.13 0.87 0.07 'l.u 1.15 0.21 0.85 0.05 113.7 6.7 GJ FF Mild FS Y Left 5 1.21 007 0.55 002 88.2 3 7 GJ FF Mild FS Y Right 5 2.13 0 13 0.65 005 97.7 8.2

[1418]

[1419] Table 12 Mean

[1420] IMU Mean Av Speed MEAN ROM- Subject Motion Arc State Side Replicates SD Amplitude SD SD SD Axis Wavelength (s) (%) Euler-Z (°) (° / s)

[1421] GJ FF Z Right 10 2.12 0.19 143.2 22.3 70.3 12.2 153.3 10.9 GJ FF Mild FS z Right 10 2.78 029 72.3 15 42.3 10.1 86.2 4.2 GJ z Right 10 2.77 0.3 71.1 6.2 DJ FF 10 2.10.■ ■ 2.4 DJ ■ 289 0.36 27 7 11 1 20 5

[1422] FF Norm.il ■ 0.95 0.05 212.2

[1423] FF 0.22 13.2 138.5 FF Normal ■ 257. 1 128.0 FF 0.07 218.3 18.3 131.1

[1424] 1.21 0.31 224.6 30.2

[1425] 0.88 0.12 241.9 10.2

[1426] FF 1.22 ■. 211.0 3.1 Norm.il 1.82 0.03 26.1

[1427] 1.14 0.23 214.5 28.9

[1428] GJ FF Mild FS z Left 5 1.2 0.09 152.3 9.7 88.2 3.7 GJ FF Mild FS z Right 5 2.1 0.07 48.6 6.07 97.7 8.2

[1429]

[1430] Table 13 IMU Mean Time Mean Amplitude MEAN ROM- Test Subject Motion Arc State Axis Side Replicates Period (s) SD (g) SD Euler-Z (°) SD GJ ABD 0.2 0.92 0.03 166.3 3.3 GJ ABD Mild FS Y Right 10 2.4 0.1 0.42 0.04 64.0 7

[1431] ■ Y 2 Ob 0.19 0.34 0.02 42.7

[1432] DJ ABD Y 021 0.93 158.3

[1433] DJ ■. 2.23 002 34.3

[1434] ABD 0.04 0.77 0.01 110.3

[1435] ABD ■. 1.29 0.04 0.02 119.2

[1436] ABD '. ■ 0.90 ■ 151.2 2.2 ABD 1.23 ■ 0.87 0.01

[1437] 1.22 0.08 0.90 0.04 157.1 9.7 ABD Y • 0.01 121.3 1.3 ABD Nornul ■ ■ ■ 0.01 125.2

[1438] ABD Y ■ 1.01 0.95 126

[1439] 1.16 0.18 0.93 0.03 124.2 2.5 GJ ABD Mild FS Y Left 5 1.33 023 0.48 005 57.8 9.0 GJ ABD Mild FS Y Right 5 1.54 0 11 0.62 005 85.5 19.0

[1440]

[1441] Table 14 Test Mean Mean Av Speed MEAN ROM- Motion Arc State IMU Axis Side Replicates SD SD SD SD Subject Wavelength (s) Amplitude (° / s) (%) EulerZ (°)

[1442] ABD Norm.il Z Right 10 1.72 0.14 150.3 19.2 73.4 16.7 166.3 3.3 GJ ABD Mild FS z Right 10 2.40 0.11 39.7 10.5 19.8 12.2 64.0 7 ABD liiliillllil z 10 2.10 0.12 22.3 3.2 9.4 1.2 42.7 9.1 DJ ABD Norm.il z 1.90 137.1 83.5 158.3 DJ ■ ■ ■ z 2.20 MIB Mllll 34.3

[1443] ABD Norm.il ■ 182.6 110.3 ABD 1.25 119.2 ABD ■ 212.1.■ 2.2 ABD ■ 1.25 ■ 207.1 22.9

[1444] 1.20 0.09 206.2 36.6 157.1 9.7 ABD z ■ 002 222.7 121.3 1.3 ABD 1.34. 125.2 ABD Norm.il z 1.13 190.8 MBil 126

[1445] 1.16 0.17 201.5 18.3 124.2 2.5 GJ ABD Mild FS z Left 5 1.27 0.18 71.6 14.0 57.8 90 GJ ABD Mild FS z Right 5 1.49 005 72.3 24.4 85.5 190

[1446]

[1447] Table 15 IMU Mean Time MEAN ROM- Test Subject Motion Arc State Side Replicates SD Mean Amplitude (g) SD SD Axis Period (s) Eulcr-X (°) Normal 1.39 0.17 0.18 0.03 68.2 8.2 GJ ER Mild FS Y Right 10 2 85 025 008 001 44 6 5.3

[1448] Severe FS 2.37 ■ 24.4

[1449] DJ 10 0.2 0.08 2.6

[1450] 26 02

[1451] ■ 0.75 0.1 0.21 0.05 ■5.6 Y Right 0.93 0.0b 0.2 57.2 ■1.3 Y ■ 0.22 0.05

[1452] 0.0b 0.2 0.03 27

[1453] 0.99 0.08 0.21 0.01

[1454] Y ■ 0.2 0.03 ■1.3 Y 1.03 ■ 0.28 ■

[1455] ER Y ■ 0.83 0.31 0.03

[1456] 0.95 0.11 0.27 0.07 64.1 3.0 GJ ER Mild FS Y Left 5 1.23 022 007 0 19.9 1.3 GJ ER Mild FS Y Right 5 1 18 005 0.11 005 264 74

[1457]

[1458] Table 16 IMU Mean Time Mean Amp Av Speed MEAN ROM- Subject Motion Arc State Side Replicates SD SD SD SD Axis Period (s) (Deg / s) (%) Euler-X(°) GJ ER Y ■ 10 1.39 0.03 108.2 13.1 7.7 3.2 68.2 8.2 GJ ER Mild FS Y Right 10 2.86 026 41 3 15 4 44 6 5.3

[1459] 232.32 1.32 24 4 ■ DJ Nornul 2.6 DJ 2.55

[1460] 0.79 0.08 3.6 Nornul 0.98 ■ ■ 57.2 4.3 Nornul Y. ■

[1461] Y 139.3 20.9 27

[1462] 1.0 0.1 147.4 45.9

[1463] Nornul 0.83 ■ 209.6 20.7 4.3 Nornul ■ ■.■

[1464] ■ 1.03 ■ 12.9

[1465] 0.97 0.12 173.7 35.5 64.1 3.0 GJ ER Mild FS Y Left 5 1.25 006 49.1 4 5 19.9 1.3 GJ ER Mild FS Y Right 5 1.18 0.13 55.3 11.6 26.4 7.4

[1466] 0.2b 27.2 12 1

[1467]

[1468] Table 17 Mean

[1469] Test Motion IMU Mean Av Speed MEAN ROM- State Side Replicates SD Amplitude SD SD SD Subject Arc Axis Wavelength (s) (%) Euler-Z (°)

[1470] (%)

[1471] GJ FF 10 2.12 0.19 113.2 22.3 70.3 12.2 153.3

[1472] GJ FF Mild RCP z Right 10 2.69 0.3 110.9 12.1 125.8 2 9

[1473] Sovi-re RCP ■

[1474] DJ Norm.il 2.10 0.2 13b.5 2.1

[1475]

[1476] DJ 0.2 10.2 135 5 -1.3

[1477] Table 18

[1478] Mean

[1479] Test IMU Mean Av Speed MEAN ROM- Motion Arc State Side Replicates SD Amplitude SD SD SD Subject Axis Wavelength (s) (%) EulerZ(°)

[1480] (%)

[1481] GJ ABD Z ■ 10 1.72 0.14 150.3 19.2 73.4 16.7 166.3 3.3 GJ ABD Mild RCP z Right 10 2.70 0 27 109 6 12.8 54 4 6.1 135 7 2 9 GJ ■ 10 3 60 87.2 153.3 b.7 DJ ABD 10 137.1 ■ DJ ABD.3.75 87.3 6 3

[1482]

[1483] Table 19 MEAN Mean Av

[1484] Capture Motion IMU Mean X ROM- Test Subject Patient ID Age Sex State Side Reps SD AMP SD Speed SD SD Date Arc Axis (S) Euler-Z (%) (7s)

[1485] (°)

[1486] III

[1487] ■I

[1488] ||j|

[1489]

[1490] Table 20 MEAN Mean Av

[1491] Capture Motion IMU Mean ROM- Test Subject Patient ID Age Sex State Side Reps SD AMP SD Speed SD SD Date Arc Axis Ms) Euler-Z (%) (7s)

[1492] (°)

[1493] IBIM

[1494]

[1495] MEAN

[1496] Mean Av

[1497] Capture Motion IMU Mean ROM- Test Subject ID Age Sex State Side Reps SD AMP SD Speed SD SD Date Arc Axis Ms) Euler-Z (° / s) (7s)

[1498] (°) ■

[1499] z

[1500] z

[1501]

[1502] Table 20 cont.d Mean Av MEAN IMU Mean

[1503] TestSubject Capture Date Age Sex Motion Arc State Side Reps SD AMP SD Speed SD ROM- Euler- SD Axis Ms)

[1504] (%) (7s) Z (°)

[1505] _ _

[1506] _ _

[1507]

[1508] MEAN

[1509] Mean Av

[1510] Capture Motion IMU Mean ROM- Test Subject ID Age Sex State Side Reps SD AMP SD Speed SD SD Date Arc Axis Ms) Euler-Z (O / S) (7s)

[1511] (°)

[1512]

[1513] Table 21 Mean Mean MEAN Capture Motion IMU ROM- Test Subject Date ID Age Sex Arc State Axis Side Replicates Waveleng SD Amplitude SD Euler-Z SD th (s) (g) (°) Femal

[1514] 1 16 / 7 51 FF Ijll 0.25 0.22 2.9 e

[1515] Frozen

[1516] Y 2.2 2 19 / 8 - - FF

[1517] Y 0.01 0.93 129.3 6.2 2024-11- llj 0.03 3.3 01T091549.228Z

[1518] 3 1 / 11 52 Male FF

[1519] 2024-11- ■ * * *

[1520]

[1521] 01T091313.281Z

[1522] MEAN

[1523] Test Captur Motion IMU Mean Mean Av ROM- Subject e Date Age Sex Arc State Axis Side Replicates Wavelength SD Amplitude SD Speed SD Euler-Z SD (s) (%) (7s)

[1524] (°) ■llllilllM 2.2 2 19 / 8 - - FF

[1525] 0.22 151.3 129.3 o.2

[1526] 3.3 3 1 / 11 52 Male FF

[1527]

[1528]

[1529] Table 22 Mean Mean MEAN Capture IMU Time Am ROM- Test Subject Age Sex Motion Ar plitude Date c State Axis Side Replicates Period SD SD Euler-Z SD (s) (g)

[1530] (°) Femal FS - 1 16 / 7 51 ABD Y Right 5 1.79 0.15 0.44 0.04 59.6 3.1 e Recovering

[1531] 2.0-1 862 4.3.3 2 19 / 8 - - ABD

[1532] 0.08 0.93 0.02 143.0 Shoulder

[1533] 0.44

[1534] 3 1 / 11 52 Male ABD

[1535] Normal * *

[1536]

[1537] MEAN

[1538] Mean Mean Av ROM- Test Subject Capture Age Sex Motion Arc State IMU Side Replicates Wavelength SD Amplitude SD Speed SD SD Date Axis Eulerz (s) (%) (7s)

[1539] (°) ■.35.5 8o.2 4.3 2 19 / 8 - - ABD

[1540] ■ 2.01 13o. O 17.3 113 5.7 111 * * ■ 3 1 / 11 52 Male ABD

[1541] ■ lllll Normal

[1542] 4 1 / 11 - - ABD ||| 115.3 11.3 155.3 3.1

[1543]

[1544] Table 23 Mean MEAN Mean

[1545] Capture Motion IMU Time ROM- Test Subject Age Sex State Side Replicates SD Amplitude SD SD Date Arc Axis Period Euler-X (s) (g)

[1546] (°) 1 16 / 7 51 Female ER ■li ■■■ 73

[1547] ||j|| 2.5 2 19 / 8 - - ER

[1548] Normal

[1549] 0.06 0.02

[1550] ||||| 128 0.02

[1551] 3 01 / 11 52 Male ER

[1552]

[1553] Shoulder

[1554] Mean MEAN Mean Av

[1555] Test Capture Motion IMU Time ROM- Age Sex State Side Replicates SD Amp SD Speed SD SD Subject Date Arc Axis Period Euler-X (Deg / s)

[1556] (s) (%) (°) 1 16 / 7 51 Female ER

[1557] 8.2

[1558] 2 19 / 8 - - ER

[1559] 3 01 / 11 52 Male ER

[1560] Nornidi

[1561]

[1562] Table 24 Task of Daily Living Humeral Motion

[1563] Reaching a shelf above Flexion and abduction of the shoulder

[1564] your head " Overhead Reach": positioning the arm in 90° abduction and maximum external rotation (braced arm position).

[1565] Washing middle of back Extension and Internal rotation

[1566] or unhooking your bra " Behind Back" - Positioning of the arm in combined extension and requires reaching behind internal rotation (opposing the tip of the thumb to a mark placed on your back the ipsilateral posterosuperior iliac spine).

[1567] Combing your hair Forward flexion and adduction

[1568] Opening and closing Horizontal abduction and adduction of the shoulder

[1569] doors

[1570] Hand to mouth pick up Flexion, Abduction and IR

[1571] apple from table "being (similar to the position we fuse the joint in (20 deg Ff 30 deg Abd able to feed oneself and 40 degrees IR).

[1572] without adaptations."

[1573] Not repetitive movement

[1574] as people don't put food

[1575] down on table every

[1576]

[1577] time between bites.

[1578] Table 25

Claims

P12799PC01CLAIMS1. A system for providing real-time joint motion data to assess the capability of a joint, the system comprises a single wearable sensor for providing real-time joint motion data, the sensor comprises a MCU and an IMU, the microcontroller unit (MCU) interrogates the inertial measurement unit (IMU) using a serial data communications protocol and receives raw data in digital format from the IMU at a generally fixed sample rate, in which that digital data (acceleration, angular velocity and magnetic field strength) is processed by a sensor fusion algorithm and the output from that algorithm is a quaternion vector.

2. A system according to claim 1, in which a library acquires data from an accelerometer, gyroscope (6-axis fusion) and magnetometer (9-axis fusion) and provides real-time motion-sensor data fusion.

3. A system as claimed in claim 1 or claim 2, in which raw output from a sensor fusion algorithm is a vector with variable magnitude and orientation defined by 4 quaternion values, in which the vector is normalised to unify length.

4. A system as claimed in claim 3, in which quaternion rotations are applied to the data to bring the frame of the sensor as close as possible to a normal orientation it is expected to adopt.

5. A system as claimed in claim 4, in which the rotations that we perform mathematically are 90deg roll followed by -90deg yaw, which is achieved by +90deg rotation about the Z axis.

6. A system as claimed in claim 5, in which the rotations are a 90deg rotation about the y-axis followed by a 90deg rotation about the z-axis.

7. A system as claimed in any preceding claim, in which a user adopts a default pose, and in which the output normalised quaternion at this instant represents the offset of the sensor data stream from what is called the ‘identity pose’ which is represented in quaternion notation as (1,0, 0,0), in which this offset is captured at the instant when the user is standing or sitting in a default pose and then this offset (by matrix algebra) is subsequently subtracted from the stream of quaternion data so that each sample is then represented as a deviation from the identity pose.

8. A system as claimed in claim 7, in which this offset quaternion data is then converted into Euler angles expressed in radian units.

9. A system as claimed in claim 8, in which these Euler angles are then assigned to an avatar to animate a limb.

10. A system as claimed in claim 9, in which Euler angles are assigned to an avatar to animate an arm as follows:o X = y - 1.95o Y = -xo Z = z - 1.4where X, Y, Z is the orientation vector for the avatar arm and x,y,z is the orientation vector for the sensor where X is arm rotation, Y is abduction and Z is forward flexion.

11. A system as claimed in any preceding claim in which a numerical algorithm is used to determine the angle of ‘tilt’ in the orientation of the sensor around an arm.

12. A system as claimed in claim 11, in which the algorithm relies upon the capture of a short vector of data samples from the sensor during a gesture which is controlled to be correct forward flexion movement.

13. A system as claimed in claim 12, in which this vector of data samples is then iteratively offset about each of the two axes that are expected to be uninvolved in forward flexion to find the offset angle at which the resulting offset vector of data shows the smallest movement on the two ‘uninvolved’ axes, and in which the offset angles that are obtained by this algorithm are referred to as ‘tilt’ angles.P12799PC0114. A system as claimed in claim 13, in which if these tilt angles have been determined by the firmware then they are applied as quaternion offset to the normalised and rotated quaternion data immediately prior to determining the offset from identity at the initial pose.

15. Asystem as claimed in claim 13, in which if these tilt angles have not been determined then no offset is applied to the normalised and rotated quaternion data apart from the offset from identity at the instant of the initial pose.

16. A method for compensating the effects of spatial offset in 9-axis IMU sensors, comprising a mathematical formulation for transforming gyroscope, magnetometer, and accelerometer measurements between rigidly attached frames, the method accounts not only for orientation differences but also for translational effects, such as Coriolis and centrifugal acceleration, in which synthetic IMU data is generated from known rotational motion, and angular acceleration is estimated using a Kalman filter with Rauch-Tung-Striebel smoothing, whereby the full compensation method improves accuracy over naive rotation-only methods, particularly for accelerometer data.

17. A sensor system to provide real-time joint motion data to assess the capability of a joint, the system comprises a wearable sensor for providing real-time joint motion data, the sensor is stand-alone whereby only one sensor is needed to measure multiplanar movement at a single joint, the sensor comprises a combination of a tri-axial accelerometer, a tri-axial goniometer and a tri-axial magnetometer, the sensor continuously reports its orientation about its own internal tri-axial frame, and the sensor comprises firmware to interpret raw signals from these constituent components in order to derive angular orientation data for the sensor about each of three mutually orthogonal axes, characterised in that orientation data is determined relative to an arbitrary cartesian coordinate frame of reference so that at any time the orientation of the sensor may be defined as lying parallel to any particular axis of the frame of reference, and thereby having an angular offset of zero, such that all subsequent measurements of orientation are defined relative to that reference orientation, whereby the sensor can be fitted to a limb in any orientation and the wearer can be instructed to perform a gesture using the limb, and the sensor may then be zeroed using the gesture, such that all subsequent measurements are defined relative to that reference.