How can I solve this triangular linear system?

73 Views Asked by At

I am trying to create a model for simulating the dynamics of a rope by treating it like several connected pendulums. The goal is to solve the following system for $\vec\alpha$, which is a vector of all the angular accelerations $\alpha$ of all the rope segments. The system is:

$$C\vec\alpha = S\vec\omega - \frac{g}{L}\vec s$$

Where $\vec\alpha$ is the vector of unknowns, $\vec\omega$ is a vector of known angular velocities and $\frac{g}{L}$ is a constant. $C$ and $S$ are $m \times m$ matrices and $\vec s$ is a vector. They're defined as follows:

$$ C = \begin{pmatrix} 1& 0& 0& \cdots& 0\\ \cos(\theta_1-\theta_2)& 1& 0& \cdots& 0\\ \cos(\theta_1-\theta_3)& \cos(\theta_2-\theta_3)& 1& \cdots& 0\\ \vdots& \vdots& \vdots& \ddots& \vdots&\\ \cos(\theta_1-\theta_m)& \cos(\theta_2-\theta_m)& cos(\theta_3-\theta_m)& \cdots& 1 \end{pmatrix}$$

$S$ is the same as $C$, except every instance of $\cos$ is replaced with $\sin$.

$$ \vec s = \begin{pmatrix} \sin(\theta_1)\\ \sin(\theta_2)\\ \vdots\\ \sin(\theta_m)\\ \end{pmatrix}$$

Additionally, $\theta_n$ is a known angle for all integers $n$ in $[1,m]$.

The objective is to solve the given linear system for $\vec\alpha$. The obvious way to do so is to left-multiply by the inverse of $C$. Am I right in assuming this would yield the following?

$$ \vec \alpha = C^{-1}S\vec\omega-\frac{g}{L}C^{-1}S$$

I'm quite confident this is correct, but if it breaks some rule of matrix multiplication I've overlooked please tell me. Either way, I would like help with finding the inverse of $C$. Additionally, if possible, I would like help finding $C^{-1}S$ and $C^{-1}\vec s$. Any help is appreciated.

1

There are 1 best solutions below

0
On BEST ANSWER

This is correct. However it would be much easier just doing substitution instead of using the inverse of a matrix.

Assume the right hand side vector is $(a_1, \dots, a_m)$. To do substitution, notice that the equations are:

$$\alpha_1=a_1\\ \cos (\theta_1-\theta_2)\alpha_1+\alpha_2=a_2\\ \cos (\theta_1-\theta_3)\alpha_1+\cos(\theta_2-\theta_3)\alpha_2+\alpha_3=a_3\\ \dots \dots$$

The first equation gives you the value of $\alpha_1$. Plugging this into the second equation gives you the value of $\alpha_2$. Plugging these two into the third equation gives you the value of $\alpha_3$. Proceeding like this, you can solve the whole system.