Institute for Medical Engineering and Mechatronics, Ulm University of Applied Sciences, Ulm, Germany.
AndroidAPS.org, Software Development, Linz, Austria.
J Diabetes Sci Technol. 2022 Jan;16(1):61-69. doi: 10.1177/19322968211032249. Epub 2021 Jul 30.
Numerical simulations, also referred to as in silico trials, are nowadays the first step toward approval of new artificial pancreas (AP) systems. One suitable tool to run such simulations is the UVA/Padova Type 1 Diabetes Metabolic Simulator (T1DMS). It was used by Toffanin et al. to provide data about safety and efficacy of AndroidAPS, one of the most wide-spread do-it-yourself AP systems. However, the setup suffered from slow simulation speed. The objective of this work is to speed up simulation by implementing the algorithm directly in MATLAB/Simulink.
Firstly, AndroidAPS is re-implemented in MATLAB and verified. Then, the function is incorporated into T1DMS. To evaluate the new setup, a scenario covering 2 days in real time is run for 30 virtual patients. The results are compared to those presented in the literature.
Unit tests and integration tests proved the equivalence of the new implementation and the original AndroidAPS code. Simulation of the scenario required approximately 15 minutes, corresponding to a speed-up factor of roughly 1000 with respect to real time. The results closely resemble those presented by Toffanin et al. Discrepancies were to be expected because a different virtual population was considered. Also, some parameters could not be extracted from and harmonized with the original setup.
The new implementation facilitates extensive in silico trials of AndroidAPS due to the significant reduction of runtime. This provides a cheap and fast means to test new versions of the algorithm before they are shared with the community.
数值模拟,也被称为计算机试验,如今是新人工胰腺(AP)系统批准的第一步。运行此类模拟的一种合适工具是 UVA/Padova 1 型糖尿病代谢模拟器(T1DMS)。Toffanin 等人曾使用它来提供关于最广泛使用的 DIY AP 系统之一 AndroidAPS 的安全性和有效性的数据。然而,该设置的模拟速度较慢。这项工作的目的是通过在 MATLAB/Simulink 中直接实现算法来加快模拟速度。
首先,在 MATLAB 中重新实现 AndroidAPS 并进行验证。然后,将该功能纳入 T1DMS。为了评估新设置,对一个涵盖 2 天实时的场景进行了 30 个虚拟患者的运行。将结果与文献中呈现的结果进行比较。
单元测试和集成测试证明了新实现与原始 AndroidAPS 代码的等效性。该场景的模拟大约需要 15 分钟,相对于实时速度的加速因子约为 1000。结果与 Toffanin 等人呈现的结果非常相似。由于考虑了不同的虚拟人群,因此存在差异是可以预期的。此外,由于原始设置无法提取和协调一些参数。
新实现由于运行时间的显著减少,促进了 AndroidAPS 的广泛计算机试验。这为在与社区共享算法的新版本之前对其进行测试提供了一种廉价且快速的手段。