16 Examples of index reduction
16.1 Example 1
Consider the following linear DAE:
\begin{aligned} x_1^\prime + x_2 & = 0, \\ x_1 & = 1, \end{aligned}
That written in matrix form become:
\bm{E} \bm{x}^\prime + \bm{A} \bm{x} = \bm{f}(t),
with the following matrices and vectors:
\bm{E} = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \quad \bm{A} = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}, \quad \bm{f}(t) = \begin{bmatrix} 0 \\ 1 \end{bmatrix}.
First reduction
Step 1: Check if \bm{E} is singular
We compute:
\det(\bm{E}) = 0
Since \bm{E} is singular, the system is a DAE.
Step 2: Decompose the system
The basis for the null space of \bm{E}^T is: \bm{Q}_a =\begin{bmatrix}0 \\1\end{bmatrix}.
The complementary vector is: \bm{Q}_d =\begin{bmatrix} 1 \\ 0 \end{bmatrix}.
We construct the matrix \bm{Q} =\begin{bmatrix}1 & 0 \\0 & 1\end{bmatrix}.
Multiplying the system by \bm{Q}^T, we get the new matrices:
\begin{aligned} \bm{E}_d &= \bm{Q}_d^T \bm{E} &=& \begin{bmatrix} 1 & 0 \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} &=& \begin{bmatrix} 1 & 0 \end{bmatrix}, \\ \bm{A}_d & = \bm{Q}_d^T\bm{A} &=& \begin{bmatrix} 1 & 0 \end{bmatrix} \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} &=& \begin{bmatrix} 0 & 1 \end{bmatrix}, \\ \bm{f}_d(t) & = \bm{Q}_d^T \bm{f}(t) &=& \begin{bmatrix} 1 & 0 \end{bmatrix} \begin{bmatrix} 0 \\ 1 \end{bmatrix} &=& \begin{bmatrix} 0 \end{bmatrix}, \\ \bm{A}_a & = \bm{Q}_a^T \bm{A} &=& \begin{bmatrix} 0 & 1 \end{bmatrix} \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} &=& \begin{bmatrix} 1 & 0 \end{bmatrix}, \\ \bm{f}_a(t) & = \bm{Q}_a^T \bm{f}(t) &=& \begin{bmatrix} 0 & 1 \end{bmatrix} \begin{bmatrix} 0 \\ 1 \end{bmatrix} &=& \begin{bmatrix} 1 \end{bmatrix}. \end{aligned}
Step 3: Solve the system
The system becomes:
Differential part: x_1^\prime + x_2 = 0.
Algebraic part: x_1 = 1.
Differentiating the algebraic constraint x_1 = 1:
x_1^\prime = 0.
At this point the DAE become:
\widetilde{\bm{E}} \bm{x}^\prime + \widetilde{\bm{A}} \bm{x} = \widetilde{\bm{f}}(t)
with the following matrices and vectors:
\widetilde{\bm{E}} = \begin{bmatrix} 1 & 0 \\ 1 & 0 \end{bmatrix}, \quad \widetilde{\bm{A}} = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, \quad \widetilde{\bm{f}}(t) = \begin{bmatrix} 0 \\ 0 \end{bmatrix}.
Second Reduction
Now reapply the algorithm:
Step 1: Check if \widetilde{\bm{E}} is singular
We compute:
\det(\widetilde{\bm{E}}) = 0
Since \widetilde{\bm{E}} is singular, the system is still a DAE.
Step 2: Decompose the system
The basis for the null space of \widetilde{\bm{E}}^T is: \widetilde{\bm{Q}}_a =\begin{bmatrix} 1 \\ -1 \end{bmatrix}.
The complementary vector is: \widetilde{\bm{Q}}_d =\begin{bmatrix} 1 \\ 1 \end{bmatrix}.
We construct the matrix \widetilde{\bm{Q}} =\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}.
Multiplying the system by \widetilde{\bm{Q}}^T, we get the new matrices:
\begin{aligned} \widetilde{\bm{E}}_d &= \widetilde{\bm{Q}}_d^T \widetilde{\bm{E}} &=& \begin{bmatrix} 1 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 1 & 0 \end{bmatrix} &=& \begin{bmatrix} 2 & 0 \end{bmatrix}, \\ \widetilde{\bm{A}}_d &= \widetilde{\bm{Q}}_d^T \widetilde{\bm{A}} &=& \begin{bmatrix} 1 & 1 \end{bmatrix} \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} &=& \begin{bmatrix} 0 & 1 \end{bmatrix}, \\ \widetilde{\bm{f}}_d(t) &= \widetilde{\bm{Q}}_d^T \widetilde{\bm{f}(}t) &=& \begin{bmatrix} 1 & 1 \end{bmatrix} \begin{bmatrix} 0 \\ 0 \end{bmatrix} &=& \begin{bmatrix} 0 \end{bmatrix}, \\ \widetilde{\bm{A}}_a &= \widetilde{\bm{Q}}_a^T\widetilde{\bm{A}} &=& \begin{bmatrix} 1 & -1 \end{bmatrix} \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} &=& \begin{bmatrix} 0 & 1 \end{bmatrix}, \\ \widetilde{\bm{f}}_a(t) &= \widetilde{\bm{Q}}_a^T \widetilde{\bm{f}}(t) &=& \begin{bmatrix} 1 & -1 \end{bmatrix} \begin{bmatrix} 0 \\ 0 \end{bmatrix} &=& \begin{bmatrix} 0 \end{bmatrix}. \end{aligned}
Step 3: Solve the system
The system becomes:
Differential part: 2x_1^\prime + x_2 = 0.
Algebraic part: x_2 = 0.
Differentiating the algebraic constraint x_2 = 0:
x_2^\prime = 0.
At this point the DAE become:
\widetilde{\widetilde{\bm{E}}} \bm{x}^\prime + \widetilde{\widetilde{\bm{A}}} \bm{x} = \widetilde{\widetilde{\bm{f}}}(t)
with the following matrices and vectors:
\widetilde{\widetilde{\bm{E}} } = \begin{bmatrix} 2 & 0 \\ 0 & 1 \end{bmatrix}, \quad \widetilde{\widetilde{\bm{A}}} = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, \quad \widetilde{\widetilde{\bm{f}}}(t) = \begin{bmatrix} 0 \\ 0 \end{bmatrix}.
Now reapply the algorithm. At the step 1 \det( \widetilde{\widetilde{\bm{E}}} )=2\neq 0 so now we have an ODE:
\begin{aligned} 2x_1^\prime + x_2 &= 0, \\ x_2^\prime &= 0. \end{aligned}
we have done two derivation, thus the index of original DAE is 2.
Avoiding explicit construction of \bm{Q}_a and \bm{Q}_d
The separation of differential and algebraic part is equivalent to the reduction to echelon form (see Section 8.2).
16.2 Example 2
Consider the DAE
\left\{ \begin{aligned} x'(t) &= z(t)\\ z'(t) &= y(t)-t \\ x'(t) &= z(t)+x(t)+t+1 \end{aligned} \right.
define
\bm{E} = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \end{pmatrix}, \quad \bm{A} = \begin{pmatrix} 0 & 0 & -1 \\ 0 & -1 & 0 \\ -1 & 0 & -1 \end{pmatrix}, \quad \bm{f}(t) = \begin{pmatrix} 0 \\ -t \\ t+1 \end{pmatrix}
so that the DAE can be written as
\bm{E}\,\bm{x}^\prime(t) + \bm{A}\,\bm{x}(t) = \bm{f}(t)
The table
\bm{T} = \left[\begin{array}{c|c|c} \bm{E} & \bm{A} & \bm{f}(t) \end{array} \right] = \left[ \begin{array}{rrr|rrr|c} 1 & 0 & 0 & 0 & 0 & -1 & 0 \\ 0 & 0 & 1 & 0 & -1 & 0 & -t \\ 1 & 0 & 0 & -1 & 0 & -1 & t+1 \end{array} \right]
is used to memorize the operation done on the DAE. Let \textrm{index}\leftarrow 0.
Multiply table \bm{T} on the left by \bm{L}_1 where
\bm{L}_1 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ -1 & 0 & 1 \end{pmatrix}
so that
\bm{T}_1 = \bm{L}_1\bm{T} = \left[ \begin{array}{rrr|rrr|c} 1 & 0 & 0 & 0 & 0 & -1 & 0 \\ 0 & 0 & 1 & 0 & -1 & 0 & -t \\ \hline \color{red}0 & \color{red}0 & \color{red}0 & \color{red}-1 & \color{red}0 & \color{red}0 & \color{red}t+1 \end{array} \right]
The last row contain the algebraic equation
\color{blue} -x(t) = t+1
First block now is in echelon form. Apply derivation of the last row (reduce index by one). Let \textrm{index}\leftarrow 1.
\bm{T}_2 = \left[ \begin{array}{rrr|rrr|c} 1 & 0 & 0 & 0 & 0 & -1 & 0 \\ 0 & 0 & 1 & 0 & -1 & 0 & -t \\ \hline \color{red}-1 & \color{red}0 & \color{red}0 & \color{red}0 & \color{red}0 & \color{red}0 & \color{red}1 \end{array} \right]
Multiply table \bm{T}_2 on the left by \bm{L}_2 where
\bm{L}_2 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 1 & 0 & 1 \end{pmatrix}
so that
\bm{T}_3 = \bm{L}_2\bm{T}_2 = \left[ \begin{array}{rrr|rrr|c} 1 & 0 & 0 & 0 & 0 & -1 & 0 \\ 0 & 0 & 1 & 0 & -1 & 0 & -t \\ \hline \color{red} 0 & \color{red}0 & \color{red}0 & \color{red}0 & \color{red}0 & \color{red}-1 & \color{red}1 \end{array} \right]
The last row contain the algebraic equation
\color{blue} -z(t) = 1
First block again is in echelon form. Apply derivation of the last row (reduce index by one). Let \textrm{index}\leftarrow 2.
\bm{T}_4 = \left[ \begin{array}{rrr|rrr|c} 1 & 0 & 0 & 0 & 0 & -1 & 0 \\ 0 & 0 & 1 & 0 & -1 & 0 & -t \\ \hline \color{red}0 & \color{red}0 & \color{red}-1 & \color{red} 0 & \color{red}0 & \color{red}0 & \color{red}0 \end{array} \right]
Multiply table \bm{T}_4 on the left by \bm{L}_4 where
\bm{L}_4 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 1 & 1 \end{pmatrix}
so that
\bm{T}_5 = \bm{L}_4\bm{T}_4 = \left[ \begin{array}{rrr|rrr|c} 1 & 0 & 0 & 0 & 0 & -1 & 0 \\ 0 & 0 & 1 & 0 & -1 & 0 & -t \\ \hline \color{red}0 & \color{red}0 & \color{red}0 & \color{red} 0 & \color{red}-1 & \color{red}0 & \color{red}-t \end{array} \right]
The last row contain the algebraic equation
\color{blue} -y(t) = -t
First block again is in echelon form. Apply derivation of the last row (reduce index by one). Let \textrm{index}\leftarrow 3.
\bm{T}_6 = \left[ \begin{array}{rrr|rrr|c} 1 & 0 & 0 & 0 & 0 & -1 & 0 \\ 0 & 0 & 1 & 0 & -1 & 0 & -t \\ \hline \color{red} 0 & \color{red}-1 & \color{red}0 & \color{red}0 & \color{red}0 & \color{red}0 & \color{red}-1 \end{array} \right]
Exchange last two rows and multily by -1 second row
\bm{P}_6 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 0 & -1 \\ 0 & 1 & 0 \end{pmatrix}
multilying \bm{T}_6 by \bm{P}_6:
\bm{P}_6\bm{T}_6 = \left[ \begin{array}{rrr|rrr|c} 1 & 0 & 0 & 0 & 0 & -1 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 & -1 & 0 & -t \end{array} \right]
The ODE after index reduction \left\{ \begin{aligned} x'(t) &= z(t)\\ y'(t) &= 1 \\ z'(t) &= y(t)-t \end{aligned} \right.
The algebraic (hidden) constraints
\begin{aligned} -x(t) & = t+1 \\ -z(t) & = 1 \\ -y(t) & = -t \end{aligned} \implies \left\{ \begin{aligned} x(t) & = -t-1 \\ z(t) & = -1 \\ y(t) & = t \end{aligned} \right.
The differential index is 3
Notice that the hiddent constaints determine the complete solution and the initial condition of the ODE (x(0),y(0),z(0))=(-1,-1,0).
16.3 Example 3
Consider the DAE
\left\{ \begin{aligned} x'(t) &= z(t)\\ x'(t) &= y(t)-\sin t \\ x'(t) &= z(t)+y(t)+ \cos t \end{aligned} \right.
define
\bm{E} = \begin{pmatrix} 1 & 0 & 0 \\ 1 & 0 & 0 \\ 1 & 0 & 0 \end{pmatrix}, \quad \bm{A} = \begin{pmatrix} 0 & 0 & -1 \\ 0 & -1 & 0 \\ 0 & -1 & -1 \end{pmatrix}, \quad \bm{f}(t) = \begin{pmatrix} 0 \\ -\sin t \\ \cos t \end{pmatrix}
so that the DAE can be written as
\bm{E}\,\bm{x}^\prime(t) + \bm{A}\,\bm{x}(t) = \bm{f}(t)
The table
\bm{T} = \left[\begin{array}{c|c|c} \bm{E} & \bm{A} & \bm{f}(t) \end{array} \right] = \left[ \begin{array}{rrr|rrr|c} 1 & 0 & 0 & 0 & 0 & -1 & 0 \\ 1 & 0 & 0 & 0 & -1 & 0 & -\sin t \\ 1 & 0 & 0 & 0 & -1 & -1 & \cos t \end{array} \right]
is used to memorize the operation done on the DAE. Let \textrm{index}\leftarrow 0.
Multiply table \bm{T} on the left by \bm{L}_1 where
\bm{L}_1 = \begin{pmatrix} 1 & 0 & 0 \\ -1 & 1 & 0 \\ -1 & 0 & 1 \end{pmatrix}
so that
\bm{T}_1 = \bm{L}_1\bm{T} = \left[ \begin{array}{rrr|rrr|c} 1 & 0 & 0 & 0 & 0 & -1 & 0 \\ \hline \color{red}0 & \color{red}0 & \color{red}0 & \color{red}0 & \color{red}-1 & \color{red}+1 & \color{red}-\sin t \\ \color{red}0 & \color{red}0 & \color{red}0 & \color{red}0 & \color{red}-1 & \color{red} 0 & \color{red}\cos t \end{array} \right]
The last two rows contains the algebraic equations
\color{blue} -y(t)+z(t) = -\sin t, \qquad -y(t)=\cos(t)
First block now is in echelon form. Apply derivation of the last rows (reduce index by one). Let \textrm{index}\leftarrow 1.
\bm{T}_2 = \left[ \begin{array}{rrr|rrr|c} 1 & 0 & 0 & 0 & 0 & -1 & 0 \\ \hline \color{red}0 & \color{red}-1 & \color{red}+1 & \color{red}0 & \color{red}0 & \color{red}0 & \color{red}-\cos t \\ \color{red}0 & \color{red}-1& \color{red} 0 & \color{red}0 & \color{red}0 & \color{red}0 & \color{red}-\sin t \end{array} \right]
Multiply table \bm{T}_2 on the left by \bm{L}_2 where
\bm{L}_2 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & -1 & 1 \end{pmatrix}
so that
\bm{T}_3 = \bm{L}_2\bm{T}_2 = \left[ \begin{array}{rrr|rrr|c} 1 & 0 & 0 & 0 & 0 & -1 & 0 \\ 0 & -1 & +1 & 0 & 0 & 0 & -\cos t \\ 0 & 0 & -1 & 0 & 0 & 0 & \cos t-\sin t \end{array} \right]
The ODE after index reduction
\begin{aligned} x'(t) & = z(t) \\ -y'(t)+z'(t) & = -\cos t \\ -z'(t) & = \cos t - \sin t \end{aligned} \implies \left\{ \begin{aligned} x'(t) & = z(t) \\ y'(t) & = \sin t \\ z'(t) & = \sin t - \cos t \end{aligned} \right.
The algebraic (hidden) constraints
\begin{aligned} -y(t)+z(t) &= -\sin t, \\ -y(t) &= \cos t \end{aligned} \implies \left\{ \begin{aligned} y(t) & = -\cos t \\ z(t) & = \cos t - \sin t \end{aligned} \right.
The differential index is 2
Notice that the hiddent constaints determine part of complete solution and the initial condition of the ODE (x(0),y(0),z(0))=(\textrm{free},-1,0). Thus, only z(0) must be set to determine the solution.