artificial pancreas control using fuzzy logic video -凯发k8网页登录
design an artificial pancreas nonlinear control system in simulink® using fuzzy logic. design a complex fuzzy logic controller by combining two smaller interconnected fuzzy systems in a fuzzy tree. automatically tune the membership function parameters and rules of a fuzzy inference system. use simulink to model the fuzzy logic controller, insulin pump, glucose production from a meal, and blood glucose changes in the patient. validate the fuzzy logic controller by simulating various meal scenarios. deploy the fuzzy logic controller by automatically generating c/c code.
hi, everyone. this video shows how to design a fuzzy inference system tree controller to regulate blood glucose of a type i diabetic patient using an artificial insulin infusion system. the artificial insulin infusion system is called artificial pancreas, which has three main components.
glucose monitoring sensor takes blood glucose sample every five minutes. controller produces a corrective insulin dose to regulate the blood glucose level in the normal range, which is 80 to 100 milligrams per deciliter. insulin pump injects the corrective insulin doses to the patient's body.
the blue line in this plot shows that carbohydrate-based meals without corrective insulin doses may lead to hypoglycemic condition with very high blood glucose levels. the high glucose intake requires short acting high insulin doses, whereas the fasting level low glucose requires long acting, low insulin doses.
moreover, when the blood glucose level is very low in hypoglycemic condition, the controller needs to stop the insulin doses. this natural context specific insulin dose control is more suitable for a rule-based non-linear control like fuzzy controller.
the fuzzy controller is enabled every five minutes with a new sample. it uses three inputs-- blood glucose level, exchange rate, and acceleration rate. the controller uses a tree of two connected fuzzy inference system to incrementally add the inputs. it also reduces the total number of rules.
defining fuzzy rules without experience is a difficult task. an alternative option is to tune rules using cost minimization. fuzzy logic toolbox provides tunefis function to tunable parameters with cost optimization. to optimize the rules, get the tunable settings from the fuzzy systems, and update the rule settings to optimize only the rule consequence.
create an option set for the tuning process with genetic algorithm. create a cost function to evaluate each candidate rule-based generated in the tuning process. first, the cost function calculates errors in the observed blood glucose from a nominal glucose level. next, the negative errors below a minimum glucose levels are set to a high error value. then the cost is calculated as the root mean square of the error values. next run tunefis function to optimize the rules.
this blood shows the optimization results with the tuned rule bases. the glucose level is now regulated below 160 milligram per deciliter, and it settles close to 90 milligram per deciliter up to the third meal. the controller generates a short acting, high insulin dose at each meal time and the long acting reduced insulin dose during the fasting period.
you can further improve the controller performance by tuning the membership function parameters of the fuzzy inference system. use a local optimization method, such as pattern search, and run tunefis again to optimize the membership function parameters.
this plot shows the optimization results with the tuned membership functions, which improve the controller performance and reduce the minimum cost of value. you can now simulate the model with different mealtime and carbohydrate intake values to validate the controller performance.
for example, change the second mealtime to 360 minute, which is the sixth hour of the day, and change the corresponding carbohydrate intake to 50 grams, then run the model. the final glucose level after the third meal is still below 100 milligrams per deciliter. once the model is ready, you can generate code and deploy to a target device. this concludes the demo. thank you for listening.
featured product
fuzzy logic toolbox
up next:
related videos:
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 mathworks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- (español)
- (english)
- (english)
欧洲
- (english)
- (english)
- (deutsch)
- (español)
- (english)
- (français)
- (english)
- (italiano)
- (english)
- (english)
- (english)
- (deutsch)
- (english)
- (english)
- switzerland
- (english)
亚太
- (english)
- (english)
- (english)
- 中国
- (日本語)
- (한국어)