Respiration simulation system and control method
Technical Field
The invention relates to a respiration simulation system, in particular to a respiration simulation system based on an embedded control board and a control method.
Background
In the development and test of an on-board molecular sieve oxygen system, a breathing simulation system (also called a breathing simulator) is a device specially used for simulating breathing, and in order to achieve a sufficiently real pilot breathing simulation effect, the breathing simulation system should meet the following requirements as much as possible:
1. the method needs a breathing simulation function under the requirements of specific breathing frequency (0-60 times/min), tidal volume (0-1.5L), lung ventilation volume (0-60L/min), breathing peak value and the like, and can realize the editing and verification of any breathing curve (S-shaped, T-shaped, triangular and the like);
2. in the simulated breath test process, the system needs to acquire the gas flow of a breathing circuit and the pressure of the face and the mouth during breathing in real time, and generates a curve capable of analyzing the breath characteristics by using the breathing gas flow and pressure data to be used for test analysis;
3. the respiration simulation system needs to be provided with a synchronous interface, and the function of simulating the simultaneous respiration of multiple persons can be realized through the synchronous interface so as to better verify the characteristics of oxygen consumption, oxygen regulation and the like of the airborne molecular sieve oxygen system;
4. during test verification, a head model of the breathing simulation system is required to be tightly combined with the oxygen mask, so that air leakage is avoided, and the breathing characteristics of a pilot are simulated more truly.
At present, a product for simulating breath of a user on the market is mainly designed for the field of medical teaching, has single functional indexes, single composition structure and the like, and cannot meet most of requirements of development and test of an airborne molecular sieve oxygen system.
The traditional respiration simulation system usually realizes motion control based on a PC structure, namely, the device cannot realize the requirements of portability, miniaturization and low power consumption based on a combination mode of an industrial personal computer and a motion control card; in addition, the industrial personal computer is usually based on a Windows operating system, in the implementation process of the breathing simulator, firstly, the motion control adopts position accurate control (the control precision is in micron order), meanwhile, the gas instantaneous flow of the breathing pipeline (the reaction speed is 2ms) needs to be collected, and based on the control position precision and the time precision, software under the Windows operating system cannot achieve accurate control and real-time control.
In addition, in the process of testing an oxygen mask and an oxygen generator of a molecular sieve oxygen system for high-altitude life safety of an aircraft pilot, not only the respiratory characteristics of a single crew member during breathing need to be simulated, but also the instantaneous air supply flow, pressure and the like of a plurality of crew members during breathing need to be simulated, so that the characteristic of the function of the plurality of crew members during breathing needs to be simulated in a real-time synchronous mode; the traditional respiration simulation system can only simulate the respiration characteristics of a single person and cannot meet the requirement of simulating the simultaneous respiration of a plurality of persons.
Moreover, most of the head molds of the traditional breathing simulation system are made of photosensitive resin materials, the hardness of the head molds is over 90, and the head molds cannot be really close to human face skin, so that the oxygen masks of pilots are not tightly attached to each other and leak air when being worn.
Disclosure of Invention
The present invention is directed to provide a breath simulation system and a control method based on the digital motion control principle and micro-electromechanical integration.
The invention realizes the purpose through the following technical scheme:
a respiration simulation system comprises a head die and a respirator worn on the head die, and further comprises a power supply unit, a main control board, a touch screen, a motion control board, a driver, a servo motor, a high-speed sliding table, a low-friction cylinder, a zero switch, a flow sensor, a first pressure sensor and a differential pressure sensor, wherein the power supply unit comprises the main control board, the touch screen, the motion control board and the driver for supplying power, the main control board is provided with a synchronous signal interface used for being connected with external control equipment, the main control board is respectively in communication connection with the touch screen and the motion control board, the control output end of the motion control board is connected with the control input end of the driver, the output end of the driver is connected with the input end of the servo motor, the power output end of the servo motor is connected with the power input end of the high-speed sliding table, the slide block of the high-speed sliding table is connected with the piston rod of the low-friction cylinder through a connecting rod, the air tap of the low-friction cylinder is connected with the breathing mask through an air pipe, the zero position switch is arranged near the tail end of the high-speed sliding table and used for detecting whether the sliding block is in a zero position or not, the flow sensor is arranged on an air pipe between the low-friction cylinder and the breathing mask, the first pressure sensor and the differential pressure sensor are respectively arranged at the interface of the breathing mask and are respectively used for detecting the oral cavity air pressure and the breathing pressure difference in the breathing mask, the signal output end of the zero-position switch is connected with the signal input end of the motion control panel, and the signal output end of the flow sensor, the signal output end of the first pressure sensor and the signal output end of the differential pressure sensor are respectively connected with the signal input end of the main control panel.
Furthermore, in order to improve the operation safety, the respiration simulation system further comprises a first limit switch and a second limit switch, wherein the first limit switch and the second limit switch are respectively installed at two ends of the low-friction cylinder and used for detecting the motion limit position of the piston rod of the low-friction cylinder, and the signal output end of the first limit switch and the signal output end of the second limit switch are respectively connected with the signal input end of the motion control plate.
Preferably, in order to use a magnetic ring in a piston rod of the low-friction cylinder as a detection target, the first limit switch and the second limit switch are both magnetic switches.
Further, in order to realize emergency shutdown when necessary, the respiration simulation system further comprises an emergency stop switch, and the emergency stop switch is connected to the power input end of the driver in series.
Furthermore, in order to automatically and timely exhaust to protect the low-friction cylinder when the air pipe is blocked, the breathing simulation system further comprises a four-way joint, a second pressure sensor and an electromagnetic valve, the four-way joint is installed on the air pipe between the low-friction cylinder and the breathing mask, the second pressure sensor and the electromagnetic valve are respectively installed on the other two branch pipes of the four-way joint, the signal output end of the second pressure sensor is respectively connected with the signal input end of the main control board, and the control input end of the electromagnetic valve is connected with the control output end of the main control board.
Specifically, the power supply unit includes a filter and an AC-DC power supply circuit, an input end of the filter is connected to an AC power supply, an output end of the filter is connected to an input end of the AC-DC power supply circuit and a power supply input end of the driver, respectively, and an output end of the AC-DC power supply circuit is connected to power supply input ends of the main control board, the touch screen, and the motion control board, respectively.
Preferably, in order to realize close fitting between the head die and the breathing mask to prevent air leakage, a silica gel layer is arranged on the surface of the position, which is used for being in contact with the breathing mask, of the head die.
A method of controlling a breathing simulation system, comprising the steps of:
step 1, setting the following parameters through a touch screen and a main control panel: respiratory frequency, respiratory tidal volume, lung flux, settings including but not limited to the following respiratory operating states: setting a breathing speed curve, namely a speed curve simulating breathing movement, for normal breathing, deep breathing and rapid breathing; the tidal volume of breath is the total volume of gas of a single breath;
step 2, when breathing of different people is simulated, different breathing frequencies, breathing tidal volumes and lung fluxes are selected through the touch screen, the main control board calculates the running distance of a piston rod of the low-friction cylinder according to a breathing speed curve, the running time of the servo motor is calculated according to the running distance, a PWM pulse number signal is sent to the servo motor through the motion control board, the main control board determines the rotation direction of the servo motor according to the breathing or inhaling state and controls the servo motor through the motion control board, and breathing simulation is achieved;
in the step 2, the current speed is set as V1The next moment is V2The micro distance of movement is L, the acceleration ACCThe calculation formula of (2) is as follows:
ACC=(V2 2-V1 2)/2L
the main control board will V1、V2、ACCAnd the real-time data of the L is transmitted to the motion control panel, and the output enabling state of the motion control panel is set, so that the motion control of the servo motor is realized, and the respiration simulation is realized.
The invention has the beneficial effects that:
the invention is based on the digital motion control and micro-electro-mechanical integrated control principle, can set a breathing speed curve by collecting data such as oral cavity air pressure, breathing pressure difference and the like in a breathing mask in real time, realizes parameter presetting, data calculation and accurate control by a touch screen, a main control board and a motion control board, accurately generates gas required for breathing by a servo motor, a high-speed sliding table and a low-friction cylinder, finally realizes real simulated breathing effect under different states by the breathing mask worn on a head model, can monitor instantaneous breathing gas volume and accumulated breathing gas volume in real time, and can synchronously control a slave machine to simulate breathing according to the same breathing frequency and tidal volume after a plurality of systems are networked, thereby achieving the function of simulating the simultaneous breathing of a plurality of people, verifying the peak value of the simultaneous breathing of the plurality of people, better verifying the oxygen consumption, oxygen regulation and other characteristics of an airborne molecular sieve oxygen system, the device is particularly suitable for simulating the breathing characteristics of human bodies of pilots in different physical states, and is used for testing and verifying the conformity of the functions and the performances of the molecular sieve oxygen system; the respiration simulation system can be integrated on an integrated device, has small volume, is convenient to carry and use and popularize; the control method takes the setting of the respiration speed curve and the calculation of the accurate control signal according to the respiration speed curve as the core, can realize the enough real human body respiration simulation, and reflects the real respiration process under different body states.
Drawings
FIG. 1 is a schematic block diagram of the whole breathing simulation system of the present invention;
FIG. 2 is a block diagram of a main control board and a direct connection component of the breath simulation system according to the present invention;
fig. 3 is a block diagram of the motion control board and the direct connection component of the respiration simulation system according to the present invention.
Detailed Description
The invention will be further described with reference to the accompanying drawings in which:
as shown in fig. 1, the respiration simulation system of the present invention includes a head mold (not shown in the figure), a respiration mask worn on the head mold, a power supply unit, a main control panel, a touch screen, a motion control panel, a driver, a servo motor, a high-speed sliding table, a low-friction cylinder, a zero-position switch, a flow sensor, a first pressure sensor, a differential pressure sensor, a first limit switch, a second limit switch, an emergency stop switch, a four-way joint, a second pressure sensor, and an electromagnetic valve, wherein a silica gel layer is disposed on a surface of a position on the head mold for contacting the respiration mask, or a silica gel layer is disposed on a surface of the whole head mold, the power supply unit includes a filter and an AC-DC power supply circuit, an input end of the filter is connected with an AC power supply, i.e. 220AC power supply, and an output end of the filter is connected with an input end of, the output end of the AC-DC power circuit is respectively connected with the main control board, the touch screen and the power input end of the motion control board, the output end of the filter is connected with the power input end of the driver in series, the main control board is provided with a synchronous signal interface for being connected with external control equipment, the main control board is respectively in communication connection with the touch screen and the motion control board, the control output end of the motion control board is connected with the control input end of the driver, the output end of the driver is connected with the input end of the servo motor, the power output end of the servo motor is connected with the power input end of the high-speed sliding table, the sliding block of the high-speed sliding table is connected with the piston rod of the low-friction cylinder through a connecting rod, and the air tap of the low-friction cylinder is connected with the breathing mask through an air, zero-position switch install in near the end of high-speed slip table is used for detecting whether the slider is in the zero-position, first limit switch with second limit switch install respectively in the both ends of low friction cylinder are used for detecting the piston rod motion extreme position of low friction cylinder, first limit switch with second limit switch is magnetic switch, four-way joint with flow sensor install gradually in the low friction cylinder with on the trachea between the respirator, second pressure sensor with the solenoid valve install respectively in on two other lateral branches of four-way joint, first pressure sensor with differential pressure sensor install respectively in the kneck of respirator and be used for detecting respectively oral cavity atmospheric pressure and breathing pressure difference in the respirator, zero-position switch's signal output part, zero-position switch, The signal output end of the first limit switch and the signal output end of the second limit switch are respectively connected with the signal input end of the motion control board, the signal output end of the flow sensor, the signal output end of the first pressure sensor, the signal output end of the second pressure sensor and the signal output end of the differential pressure sensor are respectively connected with the signal input end of the main control board, and the control input end of the electromagnetic valve is connected with the control output end of the main control board.
In order to realize high-precision control, the following components are specifically selected:
as shown in fig. 2, the main control board adopts a nxpa Cortex-a9 microprocessor, the processor is a 4-core, carries 1GDDR3 and 8GB eMMC ROM, the processor supports embedded linux4.1.25, and the human-computer interaction adopts QT5.6 development design; the processor SPI bus is connected with an ADS8698 integrated circuit to expand 8 18-bit AD acquisition channels for acquiring signals such as respiratory flow, respiratory oral pressure and the like; the pin of the processor is connected with the ULN2003 driving circuit to control the relay to act, so that the electromagnetic valve is opened to exhaust after overpressure is realized; a 7-inch touch screen is connected with an onboard LCD interface to realize a human-computer interface; external synchronous respiration simulation is realized through an Ethernet port; the connection with the operation control panel is realized through an RS232 bus. The NXP ARM Cortex-A9 microprocessor is a core element of the main control board. When the breathing control device works, an operator sets breathing parameters through a touch screen (or a synchronous interface), the NXPARM Cortex-A9 microprocessor generates breathing curve data according to the parameters and a breathing algorithm, the data are transmitted to the motion control panel through the RS232 interface when breathing is started, and the motion control panel is converted into a motion track according to the breathing curve data to drive the actuating mechanism to reciprocate.
As shown in fig. 3, the motion control board adopts an STM32F407 embedded microprocessor, the motion control software and algorithm are developed by Keil uVision5, and can be downloaded to FLASH of the STM32F407 for running, so that microsecond-level control time can be achieved, and the requirement of the system on real-time control is well met; in order to achieve the effect of being closer to the real breathing of a person, S-shaped acceleration and deceleration control of a servo motor is required to be achieved, a motion part adopts an MCX314A motion control chip, which is a special DSP integrated circuit for 4-axis motion control proposed by NOVA of Japan and can be used for position, speed and interpolation control of a stepping motor or pulse type servo drive, particularly, accurate control of S-shaped acceleration and deceleration of the servo motor can be well achieved by adopting MCX314A interpolation control, signals generated by the MCX314A motion control chip are transmitted to a driver through a DS26LS31 chip to achieve control of the servo motor, and meanwhile, a pin of the MCX314A integrated circuit and a high-speed optical coupling circuit are adopted to achieve access of a limit switch and a zero switch. The motion control software is solidified into FLASH in the embedded microprocessor, when the embedded microprocessor works, the microprocessor receives breathing curve data from the main control board through RS232, the embedded software generates motion data such as motion speed, motion length, acceleration and the like according to the breathing curve data, the motion data are continuously and continuously exchanged to the MCX314A motion control chip by the real-time task of the software to control the motion of the servo motor, and the low-friction cylinder faithfully executes a motion track under the drive of the servo motor and the high-speed sliding table and can simulate any breathing curve. Signals of the first limit switch, the second limit switch and the zero position switch are collected by the embedded processor in real time in the movement process, and the execution action or the protection action of response is completed according to the signal state.
The touch screen is used for man-machine interaction, the driver is used for driving the servo motor, and the touch screen, the driver, the zero position switch, the flow sensor, the first pressure sensor, the differential pressure sensor, the first limit switch, the second limit switch, the emergency stop switch, the four-way joint, the second pressure sensor and the electromagnetic valve are all conventional elements in the prior art.
The servo motor is required to have larger loading capacity or have the lowest load, so the loose A6 series MSMF022L1V1 servo motor is selected.
The high-speed sliding table is made of LEFS32NYB-100N of SMC company, the precision of the high-speed sliding table is +/-0.02 mm, the stroke of the high-speed sliding table is 100mm, the lead of a screw rod is 8mm, and the rated torque of the high-speed sliding table is 0.64 Nm.
Low friction cylinder: the cylinder diameter is 160mm, the stroke is 100mm, the volume of the cylinder is 2L, the speed of the cylinder is 100mm/s, the rotating speed of a corresponding servo motor is 750r/min, the thin cylinder is adopted to reduce the weight and the volume, a sealing ring is designed on the piston rod and is provided with a guide groove, the sealing ring is made of fluoroplastic rubber, a lubricating medium is made of food-grade 7805 lubricating grease, and a magnetic ring is designed on the piston rod so as to facilitate an external magnetic switch to detect the left limit position and the right limit position of the piston rod.
As shown in fig. 1, the basic working principle of the respiration simulation system of the present invention is as follows:
the working personnel interact with the main control board through the touch screen, the main control board and the motion control board send driving signals to the driver, the driver drives the servo motor to operate and drives the sliding block of the high-speed sliding table to reciprocate, so that the piston rod of the low-friction cylinder is driven to reciprocate, generated gas is sent out from the gas nozzle and sent into the breathing mask through the gas pipe, and the simulation of real breathing is realized through controlling the gas flow, time and direction; the zero position switch, the flow sensor, the first pressure sensor, the differential pressure sensor, the first limit switch, the second limit switch and the second pressure sensor send collected signals to the main control board or the motion control board, so that real-time automatic high-precision control is realized; the emergency stop switch is used for emergency stop under specific conditions to ensure safety; the electromagnetic valve is used for automatically opening and exhausting when the air pipe is blocked, and the low-friction air cylinder is prevented from being damaged.
With reference to fig. 1, a preferred control method of the respiration simulation system of the present invention includes the following steps:
step 1, setting the following parameters through a touch screen and a main control panel: respiratory frequency, respiratory tidal volume, lung flux, settings including but not limited to the following respiratory operating states: setting a breathing speed curve, namely a speed curve simulating breathing movement, for normal breathing, deep breathing and rapid breathing; the tidal volume of breath is the total volume of gas of a single breath;
step 2, when breathing of different people is simulated, different breathing frequencies, breathing tidal volumes and lung fluxes are selected through the touch screen, the main control board calculates the running distance of a piston rod of the low-friction cylinder according to a breathing speed curve, the running time of the servo motor is calculated according to the running distance, a PWM pulse number signal is sent to the servo motor through the motion control board, the main control board determines the rotation direction of the servo motor according to the breathing or inhaling state and controls the servo motor through the motion control board, and breathing simulation is achieved;
in the step 2, the current speed is set as V1The next moment is V2Acceleration A in units of speed m/s, micro-distance of movement L and distance mCCThe calculation formula of (2) is as follows:
ACC=(V2 2-V1 2)/2L
the main control board will V1、V2、ACCAnd the real-time data of the L is transmitted to the motion control panel, and the output enabling state of the motion control panel is set, so that the motion control of the servo motor is realized, and the respiration simulation is realized.
The above embodiments are only preferred embodiments of the present invention, and are not intended to limit the technical solutions of the present invention, so long as the technical solutions can be realized on the basis of the above embodiments without creative efforts, which should be considered to fall within the protection scope of the patent of the present invention.