The use of inertial measurement units (IMUs) is a low-cost alternative for measuring joint angles. This study aims to present a low-cost open-source measurement system for joint angle estimation. The system is modular and has hardware and software. The hardware was developed using a low-cost IMU and microcontroller. The IMU data analysis software was developed in Python and has three fusion filters: Complementary Filter, Kalman Filter, and Madgwick Filter. Three experiments were performed for the proof of concept of the system. First, we evaluated the knee joint of Lokomat, with a predefined average range of motion (ROM) of 60. In the second, we evaluated our system in a real scenario, evaluating the knee of a healthy adult individual during gait. In the third experiment, we evaluated the software using data from gold standard devices, comparing the results of our software with Ground Truth. In the evaluation of the Lokomat, our system achieved an average ROM of 58.28, and during evaluation in a real scenario it achieved an average ROM of 44.62. In comparing our software with Ground Truth, we achieved a root-mean-square error of 0.04 and a mean average percentage error of 2.95%. These results encourage the use of this system in other scenarios.
Here we developed an open-source Python-based library called Python rodent Analysis and Tracking (PyRAT). Our library analyzes tracking data to classify distinct behaviors, estimate traveled distance, speed and area occupancy. To classify and cluster behaviors, we used two unsupervised algorithms: hierarchical agglomerative clustering and t-distributed stochastic neighbor embedding (t-SNE). Finally, we built algorithms that associate the detected behaviors with synchronized neural data and facilitate the visualization of this association in the pixel space. PyRAT is fully available on GitHub: https://github.com/pyratlib/pyrat.
25 November 2024 in Biomedical Physics & Engineering Express
Objective. This study proposes a closed-loop brain-machine interface (BMI) based on spinal cord stimulation to inhibit epileptic seizures, applying a semi-supervised machine learning approach that learns from Local Field Potential (LFP) patterns acquired on the pre-ictal (preceding the seizure) condition. Approach. LFP epochs from the hippocampus and motor cortex are band-pass filtered from 1 to 13 Hz, to obtain the time-frequency representation using the continuous Wavelet transform, and successively calculate the phase lock values (PLV). As a novelty, the Z-score-based PLV normalization using both modified k-means and Davies-Bouldin's measure for clustering is proposed here. Consequently, a generic seizure's detector is calibrated for detecting seizures on the normalized PLV, and enables the spinal cord stimulation for periods of 30 s in a closed-loop, while the BMI system detects seizure events. To calibrate the proposed BMI, a dataset with LFP signals recorded on five Wistar rats during basal state and epileptic crisis was used. The epileptic crisis was induced by injecting pentylenetetrazol (PTZ). Afterwards, two experiments without/with our BMI were carried out, inducing epileptic crisis by PTZ in Wistar rats. Main results. Stronger seizure events of high LFP amplitudes and long time periods were observed in the rat, when the BMI system was not used. In contrast, short-time seizure events of relative low intensity were observed in the rat, using the proposed BMI. The proposed system detected on unseen data the synchronized seizure activity in the hippocampus and motor cortex, provided stimulation appropriately, and consequently decreased seizure symptoms. Significance. Low-frequency LFP signals from the hippocampus and motor cortex, and cord spinal stimulation can be used to develop accurate closed-loop BMIs for early epileptic seizures inhibition, as an alternative treatment.