| With continuous development of the society,people face multiple pressures which lead to an increase in number of the people with sleep disorders.Sleep disorders seriously affect people’s normal life,and even induce related diseases Sleep environment is one of the most important factors for the quality of sleep Therefore,changing the sleep environment is a way to improve people’s sleep quality.Based on this,a sleep environment feedback regulation system was designed for alleviating the sleep problems of insomnia patients.This paper designed and implemented a sleep environment feedback regulation system based on electrocardiogram signals(ECGs)and body movement signals.The system was a closed-loop one with pre-setted environment adjustment scheme which could automatically adjusted the sleeping environment according to the changes in the ECGs and body movement signals,and then further affected the sleep conditions as well as feeded back the ECGs and body movement signals.Accurate sleep staging is the basis for studying sleep disorders and evaluating sleep quality objectively.Therefore,this paper used The ECGs and body movement signals as an entry point,and integrated body movement and heart rate variability signals to study sleep staging algorithms.Based on the existing wrist motion recorder,this paper designed an ECG acquisition device based on the AD8232 ECGs acquisition module,and used smooth filtering and median filtering to remove ECGs noise,and improved the dynamic differential threshold method to extract R waves,further used the autoregressive model to extract the heart rate variability characteristic parameters.Based on this,a hidden markov model was added to automatically recognize and modelingthe three stages of non-rapid eye movement,fast-sleeping eye movement,and wakefulness,and the sleep-wake judgment algorithm combined with body motion signals to improve the accuracy of sleep staging rate.Finally,an Android host computer software was designed and implemented,which linked the physiological sign collection device,sleep staging algorithm and the existing environmental monitoring equipment to realize the automatic adjustment function of the sleep environment based on the ECGs and body movement signals.After the development of the sleep environment feedback regulation system,relevant clinical experiments were designed to explore the effect on patients with insomnia.The experimental results showed that the sleep environment feedback regulation system developed in this paper had the function of improving sleep quality of insomnia patients under the premise of presetting light and sleep-assisting music. |