简体   繁体   中英

Simulink model for discrete system of difference equations

I have spent many hours trying to figure Simulink out. I have included my best attempt and the output graph. I have created a system of difference equations that simulate how the flu spreads in a population with 3 compartments (Susceptible, Infectious, Recovered (dead or alive included here). The equations are correct. Where I am failing is building it correctly. I do not think my three variables are supposed to reach the extremes. I believe my infectious was just supposed to be a small bell curve, and the other two shouldn't go from 100% to 0%. My question is: How can I correctly model this system? I have tried many variations to make it work.

My equations:

s_k+1 = sk - b*tau*i_k*s_k 
i_k+1 = i_k - a*tau*i_k + b*tau*s_k*i_k
r_k+1 = r_k + a*tau*i_k

s_o = 7899990/7900000
i_o = 10/7900000
r_o = 0

Here tau = 1, and a and b are arbitrary and can change (values should be around a=`1/3 and b = 1/2 (and I adjust accordingly after). It is a closed system, nothing is entering or leaving (population stays the same when totaled)

最佳模型和输出图的屏幕截图

As you already saw in the comments your model involves too many states. I have set up a correct model of your difference equations.

感染模型


Parameters

tau = 1
a = 0.8
b = 2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM