I am a bit confused on how to sketch a bode plot for an unstable system? (being a/all pole(s) lies on RHP).
I tried plotting it in matlab, but it doesn't resemble the output i was expecting using "the rule of thumb" - rule (poles => -20dB/decade and zero => +20dB/decade).
so i was wondering if the method differs for a stable system and unstable system??
$\endgroup$ 11 Answer
$\begingroup$You can construct the Bode plot of an unstable system in the sense that you can plot $\log|G(j\omega)|$ and $\arg G(j\omega)$, but, since the system is unstable, these quantities might not be informative (with some exceptions).
Let me be more specific.
Theorem 1. Let $G$ be the transfer function of a BIBO-stable linear dynamical system which is excited with a sinusoidal input, \begin{equation}\label{eq:freq:sin_input} u(t) = A\sin(\omega t). \end{equation} Then, at large times, the system response can be approximated by \begin{equation} x_{\infty}(t) = A R_{\infty} \sin(\omega t + \phi_0), \end{equation} with \begin{align} R_{\infty} {}={}& |G(j\omega)|, \\ \phi_0 {}={}& \arg G(j\omega). \end{align}
Proof. You can find a sketch of the proof here.
As you see, the theorem states explicitly that the system must be known to be BIBO-stable for $|G(j\omega)|$ and $\phi_0$ to be its amplitude ratio and phase lag respectively.
As a counterexample take $G(s) = \frac{1}{s-1}$ where $|G(j\omega)|$ is not, as one could expect, infinite.
The above theorem can be extended to the case of systems with a pole at zero (which are not BIBO stable):
Theorem 2. Suppose that a dynamical system has the transfer function \begin{equation}\label{eq:thm_freq_resp_zero_pole:system} G(s) = \frac{H(s)}{s}, \end{equation} where $H$ has all its poles in the open left complex plane. If the system is excited with a sinusoidal input of the form $u(t) = A\sin(\omega t)$, $A,\omega>0$, then at large times, the output can be approximated by \begin{equation} x_{\infty}(t) {}={} \tfrac{A}{\omega}H(0) {}+{} AR_{\infty} \sin(\omega t + \phi_0), \end{equation}with \begin{align} R_{\infty} {}={}& |G(j\omega)| \\ \phi_0 {}={}& \arg G(j\omega). \end{align}
Proof. Use the partial fractions expansion of $H(s)/s$.
Note that the above theorem does not apply if you have a double pole at zero.
Another exception is the case where the system has simple pairs of complex conjugate poles on the imaginary axis, $\pm j b$, $b>0$, and $b\neq \omega$. Then, the system response is a sum of two frequencies ($\omega$ and $b$). This can be extended to the case where the system has $N$ such pairs, $\pm j b_\nu$, all different from one another and $\omega \neq b_{\nu}$ for all $\nu$. The pertinent result is a bit lengthy, so I'll skip it.
$\endgroup$