The design of a linear control system of blood sugar level is considered. Currently, the trend of using individual portable regulatory systems to maintain optimal blood sugar levels prevails. We analyze differences in the quality of life of a patient with diabetes and a healthy person and control and normalize the blood sugar level of the patient. A review of mathematical models of diabetes mellitus is presented, and the choice of a mathematical model for the development of an automatic control system for an insulin pump is justified. The linearization of the existing nonlinear model was performed, and the adequacy of the linearized model was verified and confirmed. The choice of the PID controller and the CHR method of its adjustment is justified. The model of the patient with the controller is constructed, and the algorithm of automatic adjustment of parameters of the PID controller is developed and implemented. The directions of continuing work on the problem of regulation in the system under study are proposed. © 2022, The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.