$\begin{cases} \dot{\mathbf{X}}(t) & = \mathbf{A}(t)\mathbf{X}(t) + \mathbf{B}(t)\mathbf{U}(t) \\ \mathbf{Y}(t) & = \mathbf{C}(t)\mathbf{X}(t) \\ \end{cases}$
où $\mathbf{A}(\cdot),\mathbf{B}(\cdot),\mathbf{C}(\cdot)$ sont des matrices continues en $T$.
Si on considère le mouvement libre (c-à-d $\mathbf{U}(t) = 0$ $\forall t$), et on se concentre sur l'état, avec $\mathbf{A}(t)$ constante:
$\dot{\mathbf{X}}(t) = \mathbf{A}\mathbf{X}(t)$
$\dot{\mathbf{X}}(t) = \mathbf{A}\mathbf{X}(t)$
$\begin{bmatrix}\dot{x_{1}}\\ \dot{x_{2}}\end{bmatrix}=\begin{bmatrix}a_{11} & a_{12}\\ a_{21} & a_{22}\end{bmatrix}\begin{bmatrix}x_{1}\\ x_{2}\end{bmatrix}$
$\det(A-\lambda I) = \lambda^{2}-\tau\lambda+\Delta=0$
$\lambda_{1,2} = \frac{\tau \pm \sqrt{\tau^2 - 4 \Delta}}{2}$
où:
Ensemble des paires $\{(t,x(t))\}$ pour un système $\mathbf{X}(t)=\varphi(t,t_0,\mathbf{X_{t_0}},u(\cdot))$
Ensemble des valeurs $\{x(t)\}$ pour $t\geq t_0$ pour un système $\mathbf{X}(t)=\varphi(t,t_0,\mathbf{X_{t_0}},u(\cdot))$
Si le mouvement libre du système (c-à-d en absence d'entrée $\mathbf{U}(t)$) tends vers l'origine pour chaque valeur de la condition initiale.
Si le mouvement libre du système (c-à-d en absence d'entrée $\mathbf{U}(t)$) est limité pour chaque valeur de la condition initiale.
S'il existe au moins une condition initiale telle que le mouvement libre du système (c-à-d en absence d'entrée $\mathbf{U}(t)$) ne soit pas limité.
Un système $\dot{\mathbf{X}}(t) = \mathbf{A}\mathbf{X}(t)$ est asymptotiquement stable si la partie réelle de tous les valeurs propres de A est negative.
Un système $\dot{\mathbf{X}}(t) = \mathbf{A}\mathbf{X}(t)$ est (simplement) stable si la partie réelle de tous les valeurs propres de A est negative ou nulle et celles ayant partie réelle nulle ont une multiplicité égale à 1.
Un système $\dot{\mathbf{X}}(t) = \mathbf{A}\mathbf{X}(t)$ est instable s'il existe soit une valeur propre de A avec partie réelle positive soit une valeur propre ayant partie réelle nulle et une multiplicité supérieure à 1.
Un point d’équilibre est un point où la trajectoire coincide avec la condition initiale.
$\mathbf{X}(t) = C_1 \mathbf{X}^{(1)}(t) + C_2 \mathbf{X}^{(2)}(t) $
$\mathbf{X}^{(1)}(t) = e^{\lambda_1 t} \mathbf{v_1} $
$\mathbf{X}^{(2)}(t) = e^{\lambda_2 t} \mathbf{v_2} $
$\mathbf{\dot{x}}=\begin{bmatrix}1 & 3\\ 3 & 1\end{bmatrix}\mathbf{x}$
pkg load symbolic
A = [1 3;3 1]
syms x1(t) x2(t);
ode_sys = [diff(x1(t),t) == A(1,1)*x1(t) + A(1,2)*x2(t); diff(x2(t),t) == A(2,1)*x1(t) + A(2,2)*x2(t)]
solutions = dsolve(ode_sys);
solutions{1}
solutions{2}
A = 1 3 3 1 ode_sys = (sym 2x1 matrix) [d ] [--(x1(t)) = x1(t) + 3*x2(t)] [dt ] [ ] [d ] [--(x2(t)) = 3*x1(t) + x2(t)] [dt ] ans = (sym) 4*t -2*t x1(t) = 3*C1*e + 3*C2*e ans = (sym) 4*t -2*t x2(t) = 3*C1*e - 3*C2*e
Si les valeurs propres de $\mathbf{A}$ sont réelles et négatives.
Si les valeurs propres de $\mathbf{A}$ sont réelles et positive.
Si les valeurs propres de $\mathbf{A}$ sont réelles et ayant signe discorde.
Considérons le cas où $\det(A) = \lambda_1\lambda_2 = 0$ et la valeur propre $\lambda_2 \neq 0$.
Tous les états qui appartiennent à la droite $a_{11}x_1 + a_{12}x_2 = 0$ sont des états d’équilibre. Aussi, toutes les trajectoires sont des droites parallèles à la droite $v_2$.
Deux configurations sont possibles:
$\mathbf{X}(t) = C_1 \mathbf{X}^{(1)}(t) + C_2 \mathbf{X}^{(2)}(t) $
$\mathbf{X}^{(1)}(t) = e^{\lambda t} \mathbf{v_1} $
$\mathbf{X}^{(2)}(t) = e^{\lambda t} (\mathbf{v_2} + t\mathbf{v_1}) $
$\mathbf{\dot{x}}=\begin{bmatrix}3 & -4\\ 1 & -1\end{bmatrix}\mathbf{x}$
pkg load symbolic
A = [3 -4;1 -1]
syms x1(t) x2(t);
ode_sys = [diff(x1(t),t) == A(1,1)*x1(t) + A(1,2)*x2(t); diff(x2(t),t) == A(2,1)*x1(t) + A(2,2)*x2(t)]
solutions = dsolve(ode_sys);
solutions{1}
solutions{2}
A = 3 -4 1 -1 ode_sys = (sym 2x1 matrix) [d ] [--(x1(t)) = 3*x1(t) - 4*x2(t)] [dt ] [ ] [ d ] [ --(x2(t)) = x1(t) - x2(t) ] [ dt ] ans = (sym) t x1(t) = (-4*C1 + C2*(-4*t - 2))*e ans = (sym) t x2(t) = (-2*C1 - 2*C2*t)*e
$\mathbf{X}(t) = C_1 \mathbf{X}^{(1)}(t) + C_2 \mathbf{X}^{(2)}(t) $
$\mathbf{X}^{(1)}(t) = e^{\alpha t} (\cos(\beta t)\mathbf{u} - \sin(\beta t)\mathbf{v} ) $
$\mathbf{X}^{(2)}(t) = e^{\alpha t} (\sin(\beta t)\mathbf{u} + \cos(\beta t)\mathbf{v}) $
$\mathbf{\dot{x}}=\begin{bmatrix}0 & 4\\ -1 & 0\end{bmatrix}\mathbf{x}$
pkg load symbolic
A = [0 4;-1 0]
syms x1(t) x2(t);
ode_sys = [diff(x1(t),t) == A(1,1)*x1(t) + A(1,2)*x2(t); diff(x2(t),t) == A(2,1)*x1(t) + A(2,2)*x2(t)]
solutions = dsolve(ode_sys);
solutions{1}
solutions{2}
A = 0 4 -1 0 ode_sys = (sym 2x1 matrix) [d ] [--(x1(t)) = 4*x2(t)] [dt ] [ ] [d ] [--(x2(t)) = -x1(t) ] [dt ] ans = (sym) x1(t) = 4*C1*cos(2*t) + 4*C2*sin(2*t) ans = (sym) x2(t) = -2*C1*sin(2*t) + 2*C2*cos(2*t)
$ \mathbf{A} = \begin{bmatrix} 0 & 1 \\ 0 & 1 \end{bmatrix} $
# 1. Calcul valeur propres et vecteurs propres
A = [0 1; 0 1]
[V,L] = eig(A)
A = 0 1 0 1 V = 1.00000 0.70711 0.00000 0.70711 L = Diagonal Matrix 0 0 0 1
printf("Tr(A) = %d\n",trace(A));
printf("det(A) = %d\n",det(A));
printf("Tr(A) > 4*det(A)? = %d\n",(trace(A) > 4*det(A)));
Tr(A) = 1 det(A) = 0 Tr(A) > 4*det(A)? = 1
#3. Dessiner les droites correspondants aux vecteurs propres et le sense des trajectoires associés
line_range = -1.5:.1:1.5;
line_1 = (V(2,1)/V(1,1)) * line_range;
line_2 = (V(2,2)/V(1,2)) * line_range;
hold on;
plot(line_range,line_1,"linewidth",10);
plot(line_range,line_2,"linewidth",10);
quiver([0;0],[0;0],V(1,:),V(2,:),"linewidth",10,"color","k")
# 4.b Dessiner les vecteurs vitesse pour les points suivants (en normalisant leurs tailles) $(0,1),(1,0),(0,-1),(-1,0),(-0.5,-1)$
point_sequence = [[0,1];[0,-1];[1,0];[-1,0]]'; #cbind like
velocity_sequence = [];
for point_vec = point_sequence # Column-wise iteration
velocity_vec = A*point_vec
velocity_norm = velocity_vec/norm(velocity_vec);
velocity_sequence = [velocity_sequence,velocity_norm];
endfor
velocity_vec = 1 1 velocity_vec = -1 -1 velocity_vec = 0 0 warning: division by zero velocity_vec = 0 0 warning: division by zero
quiver(point_sequence(1,:),point_sequence(2,:),velocity_sequence(1,:),velocity_sequence(2,:),0.2,"linewidth",5,"color","k");
hold on;
plot(point_sequence(1,:),point_sequence(2,:),"ok")
plot(line_range,line_1,"linestyle",":","color","k");
plot(line_range,line_2,"linestyle",":","color","k");
# Define grid for plotting
x1range=-1.5:.1:1.5;
x2range=-1.5:.1:1.5;
[x1,x2] = meshgrid(x1range, x2range);
# Define the system to plot (based on matrix A)
x1p = A(1,1)*x1+A(1,2)*x2;
x2p = A(2,1)*x1+A(2,2)*x2;
#Normalize values for plotting
arrow=sqrt(x1p.^2+x2p.^2);
# Vector field plot
hold on;
quiver(x1,x2,x1p./arrow,x2p./arrow,0.5);
# Trajectory plot
#sys_str = sprintf('[%d*x(1)+%d*x(2);%d*x(1)+%d*x(2)]',A(1,1),A(1,2),A(2,1),A(2,2))
#sys_ode = inline(sys_str,'t','x')
#for x_0=0:0.1:1
# [ts,ys] = ode45(sys_ode,[0,10],[0;x_0]);
# plot(ys(:,1),ys(:,2))
#end
grid on;
axis tight;
pkg load symbolic
syms x1(t) x2(t);
ode_sys = [diff(x1(t),t) == A(1,1)*x1(t) + A(1,2)*x2(t); diff(x2(t),t) == A(2,1)*x1(t) + A(2,2)*x2(t)]
solutions = dsolve(ode_sys);
solutions{1}
solutions{2}
ode_sys = (sym 2x1 matrix) [d ] [--(x1(t)) = x2(t)] [dt ] [ ] [d ] [--(x2(t)) = x2(t)] [dt ] ans = (sym) t x1(t) = C1*e + C2 ans = (sym) t x2(t) = C1*e
$ \mathbf{A} = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} $
# 1. - Calcul valeur propres et vecteurs propres
A = [0 -1; 1 0]
[V,L] = eig(A)
A = 0 -1 1 0 V = 0.70711 + 0.00000i 0.70711 - 0.00000i 0.00000 - 0.70711i 0.00000 + 0.70711i L = Diagonal Matrix 0 + 1i 0 0 0 - 1i
printf("Tr(A) = %d\n",trace(A));
printf("det(A) = %d\n",det(A));
printf("Tr(A) > 4*det(A)? = %d\n",(trace(A) > 4*det(A)));
Tr(A) = 0 det(A) = 1 Tr(A) > 4*det(A)? = 0
#3. Dessiner les droites correspondants aux vecteurs propres et le sense des trajectoires associés
line_range = -1.5:.1:1.5;
line_1 = (V(2,1)/V(1,1)) * line_range;
line_2 = (V(2,2)/V(1,2)) * line_range;
hold on;
plot(line_range,line_1,"linewidth",10);
plot(line_range,line_2,"linewidth",10);
quiver([0;0],[0;0],V(1,:),V(2,:),"linewidth",10,"color","k")
# 4.b Dessiner les vecteurs vitesse pour les points suivants (en normalisant leurs tailles) $(0,1),(1,0),(0,-1),(-1,0),(-0.5,-1)$
point_sequence = [[0,1];[0,-1];[1,0];[-1,0]]'; #cbind like
velocity_sequence = [];
for point_vec = point_sequence # Column-wise iteration
velocity_vec = A*point_vec
velocity_norm = velocity_vec/norm(velocity_vec);
velocity_sequence = [velocity_sequence,velocity_norm];
endfor
velocity_vec = -1 0 velocity_vec = 1 0 velocity_vec = 0 1 velocity_vec = 0 -1
hold on;
quiver(point_sequence(1,:),point_sequence(2,:),velocity_sequence(1,:),velocity_sequence(2,:),0.2,"linewidth",5,"color","k");
plot(point_sequence(1,:),point_sequence(2,:),"ok");
plot(line_range,line_1,"linestyle",":","color","k");
plot(line_range,line_2,"linestyle",":","color","k");
# Define grid for plotting
x1range=-3:.1:3;
x2range=-3:.1:3;
[x1,x2] = meshgrid(x1range, x2range);
# Define the system to plot (based on matrix A)
x1p = A(1,1)*x1+A(1,2)*x2;
x2p = A(2,1)*x1+A(2,2)*x2;
#Normalize values for plotting
arrow=sqrt(x1p.^2+x2p.^2);
# Vector field plot
hold on;
quiver(x1,x2,x1p./arrow,x2p./arrow,0.5);
# Trajectory plot
sys_str = sprintf('[%d*x(1)+%d*x(2);%d*x(1)+%d*x(2)]',A(1,1),A(1,2),A(2,1),A(2,2));
sys_ode = inline(sys_str,'t','x');
for x_0=0:0.1:1
[ts,ys] = ode45(sys_ode,[0,10],[0;x_0]);
plot(ys(:,1),ys(:,2))
end
grid on;
axis tight;
pkg load symbolic
syms x1(t) x2(t);
ode_sys = [diff(x1(t),t) == A(1,1)*x1(t) + A(1,2)*x2(t); diff(x2(t),t) == A(2,1)*x1(t) + A(2,2)*x2(t)]
solutions = dsolve(ode_sys);
solutions{1}
solutions{2}
ode_sys = (sym 2x1 matrix) [d ] [--(x1(t)) = -x2(t)] [dt ] [ ] [d ] [--(x2(t)) = x1(t) ] [dt ] ans = (sym) x1(t) = -C1*cos(t) - C2*sin(t) ans = (sym) x2(t) = -C1*sin(t) + C2*cos(t)
$ \mathbf{A} = \begin{bmatrix} \frac{1}{3} & -2 \\ 3 & -1 \end{bmatrix} $
# 1. - Calcul valeur propres et vecteurs propres
A = [1/3 -2; 3 -1]
[V,L] = eig(A)
A = 0.33333 -2.00000 3.00000 -1.00000 V = 0.17213 + 0.60858i 0.17213 - 0.60858i 0.77460 + 0.00000i 0.77460 - 0.00000i L = Diagonal Matrix -0.3333 + 2.3570i 0 0 -0.3333 - 2.3570i
printf("Tr(A) = %d\n",trace(A));
printf("det(A) = %d\n",det(A));
printf("Tr(A) > 4*det(A)? = %d\n",(trace(A) > 4*det(A)));
Tr(A) = -0.666667 det(A) = 5.66667 Tr(A) > 4*det(A)? = 0
#3. Dessiner les droites correspondants aux vecteurs propres et le sense des trajectoires associés
line_range = -1.5:.1:1.5;
line_1 = (V(2,1)/V(1,1)) * line_range;
line_2 = (V(2,2)/V(1,2)) * line_range;
hold on;
plot(line_range,line_1,"linewidth",10);
plot(line_range,line_2,"linewidth",10);
quiver([0;0],[0;0],V(1,:),V(2,:),"linewidth",10,"color","k")
# 4.b Dessiner les vecteurs vitesses pour les points suivants (en normalisant leurs tailles) $(0,1),(1,0),(0,-1),(-1,0),(-0.5,-1)$
point_sequence = [[0,1];[0,-1];[1,0];[-1,0]]'; #cbind like
velocity_sequence = [];
for point_vec = point_sequence # Column-wise iteration
velocity_vec = A*point_vec
velocity_norm = velocity_vec/norm(velocity_vec);
velocity_sequence = [velocity_sequence,velocity_norm];
endfor
velocity_vec = -2 -1 velocity_vec = 2 1 velocity_vec = 0.33333 3.00000 velocity_vec = -0.33333 -3.00000
quiver(point_sequence(1,:),point_sequence(2,:),velocity_sequence(1,:),velocity_sequence(2,:),0.2,"linewidth",5,"color","k");
hold on;
plot(point_sequence(1,:),point_sequence(2,:),"ok")
plot(line_range,line_1,"linestyle",":","color","k");
plot(line_range,line_2,"linestyle",":","color","k");
# Define grid for plotting
x1range=-1.5:.1:1.5;
x2range=-1.5:.1:1.5;
[x1,x2] = meshgrid(x1range, x2range);
# Define the system to plot (based on matrix A)
x1p = A(1,1)*x1+A(1,2)*x2;
x2p = A(2,1)*x1+A(2,2)*x2;
#Normalize values for plotting
arrow=sqrt(x1p.^2+x2p.^2);
# Vector field plot
hold on;
quiver(x1,x2,x1p./arrow,x2p./arrow,0.5);
# Trajectory plot
sys_str = sprintf('[%d*x(1)+%d*x(2);%d*x(1)+%d*x(2)]',A(1,1),A(1,2),A(2,1),A(2,2))
sys_ode = inline(sys_str,'t','x')
for x_0=0:0.1:1
[ts,ys] = ode45(sys_ode,[0,10],[0;x_0]);
plot(ys(:,1),ys(:,2))
end
grid on;
axis tight;
sys_str = [0.333333*x(1)+-2*x(2);3*x(1)+-1*x(2)] sys_ode = f(t, x) = [0.333333*x(1)+-2*x(2);3*x(1)+-1*x(2)]
pkg load symbolic
syms x1(t) x2(t);
ode_sys = [diff(x1(t),t) == A(1,1)*x1(t) + A(1,2)*x2(t); diff(x2(t),t) == A(2,1)*x1(t) + A(2,2)*x2(t)]
solutions = dsolve(ode_sys);
solutions{1}
solutions{2}
warning: passing floating-point values to sym is dangerous, see "help sym" warning: called from double_to_sym_heuristic at line 50 column 7 sym at line 379 column 13 mtimes at line 65 column 5 ode_sys = (sym 2x1 matrix) [d x1(t) ] [--(x1(t)) = ----- - 2*x2(t)] [dt 3 ] [ ] [d ] [--(x2(t)) = 3*x1(t) - x2(t)] [dt ] ans = (sym) -t / / ___ \ / ___ \\ --- | |5*\/ 2 *t| |5*\/ 2 *t|| 3 x1(t) = |- 2*C1*cos|---------| - 2*C2*sin|---------||*e \ \ 3 / \ 3 // ans = (sym) / / / ___ \ / ___ \\ / / __ | | ___ |5*\/ 2 *t| |5*\/ 2 *t|| | |5*\/ 2 | | 5*\/ 2 *sin|---------| 2*cos|---------|| | 2*sin|------ | | \ 3 / \ 3 /| | \ 3 x2(t) = |C1*|- ---------------------- - ----------------| + C2*|- ------------ \ \ 3 3 / \ 3 _ \ / ___ \\\ *t| ___ |5*\/ 2 *t||| -t ---| 5*\/ 2 *cos|---------||| --- / \ 3 /|| 3 ---- + ----------------------||*e 3 //