The root locus is the complex-plane plot of all values $s$ for which the *characteristic equation* holds for some positive real value of $K$:
$
1 + K G(s)=0
$
The poles of $G_{cl}$ must satisfy the characteristic equation.
This equation can be broken down into
- the **magnitude condition**: $\lvert G(s) \rvert =\frac{1}{K}$
- the **angle condition:** $\angle G(s) = \sum ^{m}_{i=1} \angle(s-z_{i}) - \sum_{i=1}^{n} \angle(s-p_{i})$
The angle condition can be rewritten as
$
\sum \phi_{i}-\sum\theta_{i} = (2n + 1)\pi
$
Which can be used to derive rules for drawing the root locus but honestly let's just use `rlocus(sys)` in Matlab.
![[Pasted image 20240927005834.png|500]]
### Controller Design
1. Compute desired closed-loop pole to satisfy steady state error requirement
2. Compute deficiency angle for the desired pole
$
\angle \psi = -180° - \angle P(s)|_{s=d}
$
3. Determine $p$ and $z$ such that $\angle C(s)|_{c=d} = \phi$ using angle condition or bisection method
4. Determine gain $K$ from magnitude condition
$
K = \frac{1}{\left\lvert \frac{s+z}{s+p} \cdot P(s)|_{s=d} \right\rvert }
$