Method for providing a value of insulin to be delivered to a diabetic patient comprising steps of: - providing data (d) representative of at least a fraction (1-α) of a foreseen meal ( m̂ ( k + i)) that the patient will consume; - providing, by a block representative of conventional therapy or open loop rule that the patient is subject to, a reference insulin value (u o) based on the data (d) representative of at least a fraction (1-α) of a foreseen meal that the patient will consume; - providing, by a further block (R') representative of conventional therapy or open loop rule that the patient is subject to, an insulin variation value (u c) for the compensation of a part of the foreseen meal based on data (d') representative of a further fraction (α) of the foreseen meal ( m̂ ( k + i)) that the patient will consume at time (k+i); - providing, by a first computing node, input data ( ỹ) representative of the reference glycemic level based on data (y r) representative of a reference glycemic value in the absence of meals and on data ( ŷ) representative of a foreseen variation in the expected glycemic level, said data ( ŷ) representative of a foreseen variation in the expected glycemic level being provided by making use of an empirical model block based on the data (d') representative of a further fraction (α) of the foreseen meal ( m̂ ( k + i)) that the patient will consume and the insulin variation value (u c); - providing, by a second computing node, data representative of the difference between the input data ( ỹ), representative of a reference glycemic level, and feedback data (y CGM) representative of the glycemic level detected in the patient at a previous time (k); - providing, by a control module, based on the data representative of the difference between the input data ( ỹ), representative of the reference glycemic level, the feedback data (y CGM), representative of the glycemic level detected in the patient, the data (d) representative of at least a fraction (1-α) of the foreseen meal ( m̂ ( k + i)) that the patient will consume and the reference insulin value (u o), data (u MPC) representative of a further insulin variation value; - providing, by a third computing node, a value of insulin (i) to be delivered to the patient based on the data (u MPC) representative of the further insulin variation value, the insulin variation value (u c) and data (u b) representative of a basal insulin value. - providing data (d) representative of at least a fraction (1-α) of a foreseen meal ( m̂ ( k + i)) that the patient will consume; - providing, by a block representative of conventional therapy or open loop rule that the patient is subject to, a reference insulin value (u o) based on the data (d) representative of at least a fraction (1-α) of a foreseen meal that the patient will consume; - providing, by a further block (R') representative of conventional therapy or open loop rule that the patient is subject to, an insulin variation value (u c) for the compensation of a part of the foreseen meal based on data (d') representative of a further fraction (α) of the foreseen meal ( m̂ ( k + i)) that the patient will consume at time (k+i); - providing, by a first computing node, input data ( ỹ) representative of the reference glycemic level based on data (y r) representative of a reference glycemic value in the absence of meals and on data ( ŷ) representative of a foreseen variation in the expected glycemic level, said data ( ŷ) representative of a foreseen variation in the expected glycemic level being provided by making use of an empirical model block based on the data (d') representative of a further fraction (α) of the foreseen meal ( m̂ ( k + i)) that the patient will consume and the insulin variation value (u c); - providing, by a second computing node, data representative of the difference between the input data ( ỹ), representative of a reference glycemic level, and feedback data (y CGM) representative of the glycemic level detected in the patient at a previous time (k); - providing, by a control module, based on the data representative of the difference between the input data ( ỹ), representative of the reference glycemic level, the feedback data (y CGM), representative of the glycemic level detected in the patient, the data (d) representative of at least a fraction (1-α) of the foreseen meal ( m̂ ( k + i)) that the patient will consume and the reference insulin value (u o), data (u MPC) representative of a further insulin variation value; - providing, by a third computing node, a value of insulin (i) to be delivered to the patient based on the data (u MPC) representative of the further insulin variation value, the insulin variation value (u c) and data (u b) representative of a basal insulin value.