pid for dynamic malaria
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Can the pid controller be set to malaria dynamics?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/495833/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/495838/image.png)
7 commentaires
Walter Roberson
le 24 Jan 2021
You appear to have functions named u1 and u2 and u3 that each take t as a parameter, but you have not posted the code for those functions.
Réponses (1)
Sam Chak
le 20 Août 2022
Hi @af af
Not sure what are PID controllers for the Malaria dynamics. However, by the mathematical manipulation, you can probably propose
as shown below to keep the disease spread under control.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1102785/image.png)
tspan = [0 10];
y0 = zeros(1, 7);
[T, Y] = ode45(@malariaSEIRS, tspan, y0);
plot(T, Y), grid, xlabel('Days')
legend('S_h', 'E_h', 'I_h', 'R_h', 'S_v', 'E_v', 'I_v', 'location', 'East')
Y(end, :)
function dydt = malariaSEIRS(t, y)
dydt = zeros(7, 1);
% parameters
phi = 0.502;
epsilon = 0.2;
beta = 0.8333;
landa = 0.09;
muh = 0.00004;
muv = 0.1429;
k = 0.7902;
a1 = 1/17;
a2 = 1/18;
lambdah = 0.2;
lambdav = 1000;
tau = 0.01 - 0.7;
psi = 0.05;
b = 0.005;
p = 0.25;
Sh = 1100;
Eh = 200;
Ih = 400;
Rh = 0;
Sv = 800;
Ev = 250;
Iv = 80;
Nh = Sh + Eh + Ih + Rh;
% Nv = Sv + Ev + Iv;
betam = beta*epsilon*phi*Iv/Nh;
landav = landa*epsilon*phi*Ih/Nh;
% states
Sh = y(1);
Eh = y(2);
Ih = y(3);
Rh = y(4);
Sv = y(5);
Ev = y(6);
Iv = y(7);
% u1, u2, u3
k3 = 1; % adjust this parameter
u3 = ((k3 - muv)*Iv + a2*Ev)/p;
u2 = 0;
k1 = 1; % adjust this parameter
u1 = (- (k1 - p*u3 - muv - 1*landav)*Sv - lambdav)/landav;
% Malaria dynamics
dydt(1) = lambdah + (k*Rh) - (1 - u1)*betam*Sh - muh*Sh;
dydt(2) = (1 - u1)*betam*Sh - (a1 + muh)*Eh;
dydt(3) = a1*Eh - (b + tau*u2)*Ih - (psi + muh)*Ih;
dydt(4) = (b + tau*u2)*Ih - (k + muh)*Rh;
dydt(5) = lambdav - (1 - u1)*landav*Sv - p*u3*Sv - muv*Sv;
dydt(6) = (1 - u1)*landav*Sv - p*u3*Ev - (a2 + muv)*Ev;
dydt(7) = a2*Ev - p*u3*Iv - muv*Iv;
end
0 commentaires
Voir également
Catégories
En savoir plus sur PID Controller Tuning dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!