Nyquist diagram not encircle the origin Given the function: $\frac{s-5}{s^2-4s +5}$
The function have one zero and two poles in the RHP. So according to principle of argument (or Nyquist diagram), the Nyquist plot encircle the origin N = |Z-P| = |1-2| = 1 time. But the Nyquist plot does not show that:

What am I missing here?
 A: It is not entirely clear what you are trying to do.
When you apply the argument principle, the contour must not pass through any of the poles or zeros.
In this case, $g(s)= {s-5 \over s^2-4s+5}$ has a zero at infinity and so the curve 'passes' through zero.
Since you are interested in the difference of right half plane poles & zeros, the contour can be modified to be $0 \to iR$, then $R e^{i\theta}$ for $\theta$ going from ${\pi \over 2}$ to $-{\pi \over 2}$ and then from $-iR$ back to zero, for some large $R$. If $R$ is sufficiently large, then the curve will pass to the right of
$0$.
Note that the winding number of the right half plane poles & zeros is $-1$ with
this curve, and the contour had a winding number of $+1$ around the origin, so the argument principle tells us that
$1 = \sum_{z} \eta(z, \gamma) -\sum_{p} \eta(p, \gamma) = \#\text{poles} - \#\text{zeroes}$.
However...
If you are trying to apply the Nyquist stability criterion to $g$, then
you are trying to determine the stability of the closed loop transfer function ${g \over 1+g}$ where $g$ is the open loop transfer function (assuming unity feedback). In this case, the system is stable if $1+g$ has no right half plane zeros.
So, either plot $1+g$ and count encirclements of zero, or plot $g$ and count encirclement of $-1$.
If this is what you are trying to go then the issue of passing through zero does not arise here.
