Abstract:In order to effectively reduce the damage of obstructive sleep apnea syndrome (OSAS), a two-level non-invasive home sleep suction machine was designed.Based on STM32, the adaptive inverse control theory is used to control the motor. The difference between the input signal and the output response is taken as the error signal, and the adaptive algorithm is driven by the signal.According to the collected breathing wave shape,Kalman filter is used to predict the timing of inspiratory and exhalatory in the next cycle,and then control the motor to reach the target pressure value.In order to facilitate user experience, real-time display of upper computer waveform is added, so that users can clearly see the adjustment of breathing wave while experiencing ventilator assisted breathing. This design not only controls the time of the motor to reach the set response speed at about 100ms, but also realizes three breathing modes: CPAP mode, S mode and T mode. In CPAP mode, the ventilator continuously outputs positive airway pressure;In the S mode, the next time node of exhalation and inspiration can be estimated by the patient's breath wave shape, and the correct air pressure can be given to assist the patient's breathing.In T mode, the air pressure is controlled by the timer to assist the patient's breathing.This not only improves patient compliance and makes patients feel more comfortable, but also facilitates long-term treatment.