| People spend about one third of their life in the state of sleep,sleep is very important for human health,good sleep can effectively restore the body in the daytime work and study consumption.Long-term poor sleep will lead to a variety of diseases,the rationality of mattress design determines the comfort of human sleep,will directly affect the quality of sleep.Due to different body shapes and contours,traditional mattresses don’t fit the curves of the human body well,which can lead to poor sleep quality.Therefore,it is of great significance to design a smart mattress control system that can adjust the support of different areas of the human body.The supporting performance of the mattress can be improved by replacing the part of the traditional mattress that contacts the human body with the air bag that adjusts the support height.In this paper,the traditional PID control and fuzzy control are combined.According to the current system state(deviation e and deviation rate ec),the fuzzy control adaptively adjusts the parameters of the traditional PID control algorithm,which is applied to the designed intelligent mattress system.The smart mattress control system adopts modular design.According to the functions to be realized,the smart mattress system is divided into main control module,air pressure acquisition module,multi-channel drive module,air pump and valve,air bag group and power module.Both the main control module and the air pressure acquisition module are designed with STM32 chip.The two modules are designed with the same chip,and the design method of isomeric multi-processor is adopted.The two processors work separately to enhance the data processing ability.The hardware part,controller part and software part of the smart mattress are designed respectively.In order to verify the control effect of the controller,four experiments are designed:Experiment 1: air bag inflation and air release experiment;Experiment 2: Comparison of traditional PID and fuzzy PID data;Experiment 3: Pressure difference of different parts of human body;Experiment 4: Control effect verification experiment.The fourth experiment is to simulate the movement of the user going to bed and getting out of bed,and record the change curve of the air pressure value in the air bag.The experimental results show that fuzzy PID has smaller overshoot and lower static error than traditional PID.Human shoulder and back and buttocks on the mattress pressure is the largest,and the greater the initial conditions of air pressure,the smaller the pressure difference,and verify that the selected pressure sensor can meet the needs of the control system;Under the action of the control algorithm,when the human body goes to bed and gets off the bed,the shoulder and the back and the buttocks have the greatest impact on the air pressure of the air bag,which can be restored to the algorithm’s target value in about 4seconds.In summary,the fuzzy PID controller designed in this paper can meet the requirements of the project. |