The present invention provides a closed loop control method to control an artificial pancreas and the artificial pancreas using this method, comprising constructing an autoregressive model by initiatively introducing the insulin absorption lag factor, calculating an amount of insulin to be delivered at the current time using the autoregressive model and a PID controller respectively, and tuning the parameters of the autoregressive model and the PID controller respectively using the average of the calculation results in order to provide a more accurate prediction of glucose trends and a more desirable amount of insulin delivery.