

In epochs of significant fluctuations in human health, medical equipment has garnered unprecedented attention, with mechanical ventilators being a focal point of numerous studies. Previous research has typically focused on controlling two critical parameters: volume and pressure. In actuality, the mechanical ventilator’s controller must continuously monitor and address the intricate dynamics of the respiratory, which comprises airflow, pressure, and volume, to operate the two double-acting piston pumps in real time to meet the patients experiencing disease. To surmount this obstacle, this paper puts forward designing a PID controller based on a root locus to modulate the output airflow and ensure the tidal volume remains within a 15% error margin of the actual value. Specifically, simulations were conducted with the parameters of a 70-kilogram male patient in scenarios such as normal lungs, COPD, and ARDS. From there, the result of these scenarios are solid evidence to demonstrate that the airflow follows the square wave signal accurately, and the relative error of the tidal volume is maintained within a 5% error margin. Moreover, this approach markedly improves the transient response and steady-state error of the output airflow compared to the initial system.