How to draw a 3D phase plane using three differential equations with 5 parameters

8 views (last 30 days)
Woojin on 29 Jan 2023
I'm working on a glucose insulin regulation system, which is represented as a system of differential equations as shown in the image below.
I want to plot a 3D phase plane to show that a global stable equilibrium occurs at (0, 0, 0), but I am clueless in how to do so.
I watched this video that shows how to draw a 2D phase plane for fixed parameters, so I have a very slight idea in translating that to this model, where the parameters are not fixed.
The result is supposed to look something like this, where all the trajectories converge to (0, 0, 0). Can you please help me write a code for this problem or suggest resources that (1) teaches 3D phase plane plotting in Matlab and (2) for different parameters? Thank you!
Note: The initial conditions are given by (0, 0, 0), which is the fixed point of the system.

Sulaymon Eshkabilov on 29 Jan 2023
First of all, you need to have the param values for alpha, beta, tau, gamma, delta and initial conditions for D1, D2, h. This exercise can be solved in a few different ways using Runge-Kutta, Adams-Moulton, or MATLAB's builtin solvers such as ode23, ode45, ode113 which are also based on Runge-Kutta, Adams and other methods.
This code shows how to simulate such exercises:
ICs=[1, 2, 3];
t=0:.001:25;
tau=1.0;
Alpha = 1.5;
Beta=1.3;
Gamma= 2.0;
Delta=2.5;
% dD1/dt=-D1/tau;
% dD2/dt=- D1/tau-Alpha*D2-Beta*h;
% dh/dt=gamma*D2-Delta*h;
SYS = @(t, X)([-X(1)/tau;
-X(1)/tau-Alpha*X(2)-Beta*X(3);
-Gamma*X(2)-Delta*X(3)]);
[time, fOUT]=ode45(SYS, t, ICs, [ ]);
plot3(fOUT(:,1), fOUT(:,2), fOUT(:,3)), grid on
xlabel('D_1(t)'), ylabel('D_2(t)'), zlabel('h(t)')
title('Solution'), axis tight
figure; comet3(fOUT(:,1), fOUT(:,2), fOUT(:,3))% WATCH Animations