Diabetes is one of the most important diseases that researchers have focused on in scientific research since the time, because of the seriousness of this disease if it is not properly dealt with, especially with the emergence of some global epidemics such as Corona Virus (COVID 19), as the pancreas is the organ responsible for regulating sugar in the blood by secreting the insulin enzyme, insulin is widely used to control blood sugar. Therefore, it is important that the required insulin value is constant and controlled. The aim of this study is to control the blood glucose value that is achieved as a desired value and to maintain it as a constant value using a proportional, integral, and derivative control unit (FOPID) fractional order of the control parameters. In this research, the new control unit is applied to Bergman's mathematical model as a non-linear and simple model that simulates the mechanism of the interaction of glucose and insulin in the blood, and based on this, a closed control loop was designed to regulate the level of blood sugar to be an automatic control of blood glucose using the measured data from Special sensor. The contribution in this scientific paper is to define the (FOPID) parameters according to the closed loop responses of the system, and these parameters were adjusted using new meta-heuristic algorithms including the Invasive Weed Optimization (IWO), the PSO Particle Swarm optimization, the Genetic Algorithm (GA), The bat optimization algorithm (BA) and (ACO). As a result, the results of the five modern algorithms were compared based on several criteria to find out which one was better using MATLAB / SIMULINK simulation. It was found that the IWO algorithm performs better than PSO. The simulation results of the closed-loop system of this controller at the time of settling, overshoot and control inputs indicate very positive results compared to previous results. In addition, a new method has been proposed which is to design a pump in the form of a valve to control insulin pumping by controlling it with the fuzzy logic control unit, which in turn, we obtained better results, compared to the results of other previous studies.