INFO-F-305 - TP 2¶

Dessin qualitiatif - Portrait de phase I¶

Jacopo De Stefani - jdestefa@ulb.ac.be¶

Système linéaire, regulier, à dimensions finies - Th 5.1¶

$\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 du système (c-à-d $\mathbf{U}(t) = 0$ $\forall t$), et on se concentre sur l'état, avec $\mathbf{A}(t)$ constante, on obtient:

$\dot{\mathbf{X}}(t) = \mathbf{A}\mathbf{X}(t)$

Rappels Théoriques - Système du second ordre¶

$\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}$

Equation caractéristique¶

$\det(A-\lambda I) = \lambda^{2}-\tau\lambda+\Delta=0$

$\lambda_{1,2} = \frac{\tau \pm \sqrt{\tau^2 - 4 \Delta}}{2}$

où:

  • $\tau=a_{11}+a_{22}=tr(A)$
  • $\Delta=a_{11}a_{22}-a_{12}a_{21}=\det(A)$

Cas 1 - Racines réelles et distinctes - $\lambda_1,\lambda_2$¶

Solution générale - Théoreme 5.11¶

$\mathbf{X}(t) = C_1 \mathbf{X}^{(1)}(t) + C_2 \mathbf{X}^{(2)}(t) $

Solution particulières¶

$\mathbf{X}^{(1)}(t) = e^{\lambda_1 t} \mathbf{v_1} $

$\mathbf{X}^{(2)}(t) = e^{\lambda_2 t} \mathbf{v_2} $

Exemple¶

$\mathbf{\dot{x}}=\begin{bmatrix}1 & 3\\ 3 & 1\end{bmatrix}\mathbf{x}$

In [1]:
A = [1 3; 3 1]
[v, lambda] = eig(A)
A =

   1   3
   3   1

v =

  -0.70711   0.70711
   0.70711   0.70711

lambda =

Diagonal Matrix

  -2   0
   0   4

Cas 2 - Racines réelles et multiples - $\lambda=\lambda_1=\lambda_2$¶

Solution générale - Théoreme 5.11¶

$\mathbf{X}(t) = C_1 \mathbf{X}^{(1)}(t) + C_2 \mathbf{X}^{(2)}(t) $

Solution particulières¶

$\mathbf{X}^{(1)}(t) = e^{\lambda t} \mathbf{v_1} $

$\mathbf{X}^{(2)}(t) = e^{\lambda t} (\mathbf{v_2} + t\mathbf{v_1}) $

Exemple¶

$\mathbf{\dot{x}}=\begin{bmatrix}3 & -4\\ 1 & -1\end{bmatrix}\mathbf{x}$

In [2]:
A = [3 -4; 1 -1]
[v, lambda] = eig(A)
A =

   3  -4
   1  -1

v =

   0.89443   0.89443
   0.44721   0.44721

lambda =

Diagonal Matrix

   1   0
   0   1

Cas 3 - Racines complexes et conjuguées - $\lambda_{1,2} = \alpha \pm i\beta$¶

Solution générale - Théoreme 5.11¶

$\mathbf{X}(t) = C_1 \mathbf{X}^{(1)}(t) + C_2 \mathbf{X}^{(2)}(t) $

Solution particulières - $\mathbf{v_{1,2}} = \mathbf{u} + i \mathbf{v}$¶

$\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}) $

Exemple¶

$\mathbf{\dot{x}}=\begin{bmatrix}0 & 4\\ -1 & 0\end{bmatrix}\mathbf{x}$

In [3]:
A = [0 4; -1 0]
[v, lambda] = eig(A)
A =

   0   4
  -1   0

v =

   0.89443 + 0.00000i   0.89443 - 0.00000i
   0.00000 + 0.44721i   0.00000 - 0.44721i

lambda =

Diagonal Matrix

   0.0000 + 2.0000i                  0
                  0   0.0000 - 2.0000i

Mouvement et trajectoire¶

Mouvement¶

Ensemble des paires $\{(t,x(t))\}$ pour un système $\mathbf{X}(t)=\varphi(t,t_0,\mathbf{X_{t_0}},u(\cdot))$

Trajectoire¶

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))$

Calcul d'une trajectoire¶

  1. Calcul équation solution générale de $\dot{\mathbf{X}}(t) = \mathbf{A}\mathbf{X}(t)$
  2. Détermination $c_1$ et $c_2$ dans la solution générale en fonction de $\mathbf{X}(0)$
  3. Calcul de la trajectoire pour différent valeurs de $t$

Stabilité¶

Stabilité asymptotique¶

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.

Stabilité simple¶

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.

Instabilité¶

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é.

Stabilité et valeurs propres¶

Stabilité asymptotique - Th 5.3¶

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.

Stabilité simple - Th 5.4¶

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.

Instabilité - Th 5.5¶

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.

Points d'équilibre¶

Definition¶

Un point d’équilibre est un point où la trajectoire coincide avec la condition initiale.

  • Si $\det(\mathbf{A}) \neq 0$ alors le seul état d’équilibre est (0, 0) sinon il en existe aussi d’autres.

Noeud stable¶

Si les valeurs propres de $\mathbf{A}$ sont réelles et négatives.

Noeud instable¶

Si les valeurs propres de $\mathbf{A}$ sont réelles et positives.

Selle¶

Si les valeurs propres de $\mathbf{A}$ sont réelles et ayant signe discorde.

Exercice 1 - Noeud stable¶

$ \mathbf{A} = \begin{bmatrix} -2 & 1 \\ 1 & -2 \end{bmatrix} $

  1. Calculer valeurs propres
  2. Calculer vecteurs propres
  3. Dessiner les droites correspondants aux vecteurs propres et le sense des trajectoires associés
  4. Dessiner les vecteurs vitesse pour les points suivants (en normalisant leurs tailles):
    • $(1,1),(-1,-1)$ et $(-1,1),(1,-1)$
    • $(0,1),(1,0),(0,-1),(-1,0),(-0.5,-1)$
In [4]:
# 1. et 2. - Calcul valeur propres et vecteurs propres
A = [-2 1; 1 -2]
[V,L] = eig(A)
A =

  -2   1
   1  -2

V =

   0.70711   0.70711
  -0.70711   0.70711

L =

Diagonal Matrix

  -3   0
   0  -1

In [5]:
#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")
In [6]:
# 4.a Dessiner les vecteurs vitesse pour les points suivants (en normalisant leurs tailles) $(1,1),(-1,-1)$ et $(-1,1),(1,-1)$
point_sequence = [[1,1];[-1,-1];[-1,1];[1,-1]]'; #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 =

   3
  -3

velocity_vec =

  -3
   3

In [7]:
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");
In [8]:
# 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];[1,0];[0,-1];[-1,0];[-0.5,-1]]'; #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
  -2

velocity_vec =

  -2
   1

velocity_vec =

  -1
   2

velocity_vec =

   2
  -1

velocity_vec =

   0.00000
   1.50000

In [9]:
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");
In [10]:
# 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);
In [11]:
# Vector field plot
hold on;
quiver(x1,x2,x1p./arrow,x2p./arrow,0.5);
# Line plot
plot(line_range,line_1,"linewidth",10,"color","k");
plot(line_range,line_2,"linewidth",10,"color","k");
grid on;
axis tight;

Exercice 2 - Noeud instable¶

$ \mathbf{A} = \begin{bmatrix} 2 & 1 \\ 2 & 3 \end{bmatrix} $

  1. Calculer valeurs propres
  2. Calculer vecteurs propres
  3. Dessiner les droites correspondants aux vecteurs propres et les sense des trajectoires associés
  4. Dessiner les vecteurs vitesse pour les points suivants (en normalisant leurs tailles):
    • $(0.5,1),(-0.5,-1)$ et $(-1,1),(1,-1)$
    • $(0,1),(1,0),(0,-1),(-1,0),(-0.5,-1)$
In [12]:
# 1. et 2. - Calcul valeur propres et vecteurs propres
A = [2 1; 2 3]
[V,L] = eig(A)
A =

   2   1
   2   3

V =

  -0.70711  -0.44721
   0.70711  -0.89443

L =

Diagonal Matrix

   1   0
   0   4

In [13]:
#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")
In [14]:
#4.a Dessinez les vecteurs vitesse pour les points suivants (en normalisant leurs tailles) $(0.5,1),(-0.5,-1)$ et $(-1,1),(1,-1)$
point_sequence = [[0.5,1];[-0.5,-1];[-1,1];[1,-1]]'; #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
   4

velocity_vec =

  -2
  -4

velocity_vec =

  -1
   1

velocity_vec =

   1
  -1

In [15]:
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");
In [16]:
# 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];[1,0];[0,-1];[-1,0];[-0.5,-1]]'; #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
   3

velocity_vec =

   2
   2

velocity_vec =

  -1
  -3

velocity_vec =

  -2
  -2

velocity_vec =

  -2
  -4

In [17]:
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");
In [18]:
# 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);
In [19]:
# Vector field plot
hold on;
quiver(x1,x2,x1p./arrow,x2p./arrow,0.5);
# Line plot
plot(line_range,line_1,"linewidth",10,"color","k");
plot(line_range,line_2,"linewidth",10,"color","k");
grid on;
axis tight;

Exercice 3 - Selle¶

$ \mathbf{A} = \begin{bmatrix} 5 & 9 \\ 6 & 2 \end{bmatrix} $

  1. Calculer valeurs propres
  2. Calculer vecteurs propres
  3. Dessiner les droites correspondants aux vecteurs propres et les sense des trajectoires associés
  4. Dessiner les vecteurs vitesses pour les points suivants (en normalisant leurs tailles):
    • $(1,\frac{2}{3}),(-1,-\frac{2}{3})$ et $(-1,1),(1,-1)$
    • $(0,1),(1,0),(0,-1),(-1,0),(-0.5,-1)$
In [20]:
# 1. et 2. - Calcul valeur propres et vecteurs propres
A = [5 9; 6 2]
[V,L] = eig(A)
A =

   5   9
   6   2

V =

   0.83205  -0.70711
   0.55470   0.70711

L =

Diagonal Matrix

   11    0
    0   -4

In [21]:
#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")
In [22]:
# 4.a Dessinez les vecteurs vitesses pour les points suivants (en normalisant leurs tailles) $(1,2/3),(-1,-2/3)$ et $(-1,1),(1,-1)$
point_sequence = [[1,2/3];[-1,-2/3];[-1,1];[1,-1]]'; #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 =

   11.0000
    7.3333

velocity_vec =

  -11.0000
   -7.3333

velocity_vec =

   4
  -4

velocity_vec =

  -4
   4

In [23]:
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");
In [24]:
# 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];[1,0];[0,-1];[-1,0];[-0.5,-1]]'; #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 =

   9
   2

velocity_vec =

   5
   6

velocity_vec =

  -9
  -2

velocity_vec =

  -5
  -6

velocity_vec =

  -11.5000
   -5.0000

In [25]:
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");
In [26]:
# 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);
In [27]:
# Vector field plot
hold on;
quiver(x1,x2,x1p./arrow,x2p./arrow,0.5);
# Line plot
plot(line_range,line_1,"linewidth",10,"color","k");
plot(line_range,line_2,"linewidth",10,"color","k");
grid on;
axis tight;