FYI, I found the paper which I programmed the AP project back in 2011. The paper was from 2010, but I thought it was from 2008. Anyways, it was a good choice to program it back then. A lot of it is similar, conceptually with the differential equations, at least. A robust sliding mode controller with internal model for closed-loop artificial pancreas, is the paper name.