## 2 Materials and Methods
### WSA Units Hardware  
Each unit of the WSA for tracking the movements of human segments (IMU unit) contains the following electrical modules:  
1. microcontroller for data-acquisition control and system processing,
2. IMU sensors,
3. power supply,
4. radio module for wireless data transmission. Figure 2 shows the block diagram of a single IMU unit. The hardware design of the master and remote units IMU is electrically identical, and their operating mode is configured by a firmware setting. The 4 \(\times\) 2.5-mm devices are housed in a wearable 3D-printed plastic case that can be easily attached to clothing or human-body parts with elastic straps (see Figure 2c). The IMU size is 40 mm \(\times\) 25 mm with weight of 5 g, production cost with all elements is around 75 EUR each in 100 pc. batch. Same size and weight is for 240 mAh Li-Po battery, cost in range of 6 EUR. The housing is dedicated custom design 3D printed with FDM technology. The IMU unit includes:  
1. The STM32L476 RG microcontroller (STMicroelectronics, Geneva, Switzerland) is a 80-MHz low-power ARM Cortex M4 processor with a 1-MB flash memory, where the 60-byte initialization data structure is stored. The service port to the chip is provided via an integrated full-speed USB-OTG 2.0 configured as a communication-class device. For the reliable operation of time-demanding tasks, two independent hardware timers are initialized. One is used for driving the precise 100-kHz sampling and communication loop and the other for timeline synchronization with the master. When operating in master mode only the loop timer is functional. To ensure a stable clock reference, an external 16-MHz \(\pm\) 10 ppm crystal (Seiko Epson Corporation, Nagano, Japan) is integrated. The microcontroller communicates with the IMU sensor and the radio module via two separate SPI buses, while communication with the power-management chip goes via the I2C bus. 2. The MPU-9250 inertial sensor (Invensense, San Jose, CA, USA) is a multi-chip module consisting of two dies integrated into a single chip. One chip contains a 3-axis gyroscope and a 3-axis accelerometer. The other chip contains an AK8963 3-axis  
Figure 2: (**a**) IMU unit schematic diagram with microcontroller, IMU sensor, radio module, smart charger and power supply, and LiPo battery (**b**) Rendering and photograph of the device (**c**) Special 3D-printed IMU unit case. magnetometer. The gyroscope, accelerometer, and magnetometer provide 16-bit digital outputs over the SPI bus. The measurement range is user programmable from \(\pm\)250 \({}^{\circ}\)/s to \(\pm\)2000 \({}^{\circ}\)/s, \(\pm\)2 g to \(\pm\)16 g, and \(\pm\)4800 \(\upmu\)T, respectively. In the WSA the sensors were configured to measure the angular velocity to within \(\pm\)2000 \({}^{\circ}\)/s, the acceleration to within a scale range of \(\pm\)8 g, and a magnetic field to within \(\pm\)4800 \(\upmu\)T. A range of other IMU chips can be selected, as required [35]. 3. The battery is Li-Po type with a capacity of 240 mAh. It is equipped with a 10-k\(\Omega\) negative-temperature-coefficient (NTC) thermistor and a protection circuit that effectively prevents overcharge, over discharge, overcurrent, and short circuit. In addition, an ADP5350 power-management unit (Analogue Devices, Norwood, MA, USA) combines a high-performance buck regulator for the Li-Po battery charging and three low-dropout regulators (LDOs). The operating parameters are programmable via the I2C bus. In the IMU unit the ADP5350 controls the charging of the battery provided by the USB type-B connector. Three LDO outputs provide 3.0-V power supply for the radio module, 3.3-V power supply for the inertial sensor, and 3.0-V power supply for the microcontroller and the rest of the circuit. The charge current is set to 150 mA. 4. The DWM1000 radio module (DecaWave, Dublin, Ireland) is a IEEE 802.15.4-2011-compliant UWB radio module with an integrated PCB antenna.