With the standard representation
$$\begin{align}
\dot{x} &= Ax + Bu \\
y &= Cx + Du
\end{align}$$
you cannot represent a non-proper transfer function. However you can add $\dot{u}$ term to do this like
$$\begin{align}
\dot{x} &= Ax + Bu \\
y &= Cx + Du + E \dot{u}
\end{align}$$
So to represent the PID controller, you can use
$$\begin{align}
\dot{x} &= K_i u \\
y &= x + K_p u + K_d \dot{u}
\end{align}$$
Well, when we have a transfer function that looks like:
$$\mathcal{T}:=\frac{\text{Y}\left(\text{s}\right)}{\text{X}\left(\text{s}\right)}=\frac{\text{G}\left(\text{s}\right)}{1+\text{G}\left(\text{s}\right)\text{H}\left(\text{s}\right)}\tag1$$
Where $\text{H}\left(\text{s}\right):=1$ because of the unity feedback and $\text{G}\left(\text{s}\right):=\text{K}\cdot\frac{1}{\text{s}-\alpha}$
We get a complete transfer function that looks like:
$$\mathcal{T}=\frac{\text{Y}\left(\text{s}\right)}{\text{X}\left(\text{s}\right)}=\frac{\text{K}\cdot\frac{1}{\text{s}-\alpha}}{1+\text{K}\cdot\frac{1}{\text{s}-\alpha}}\tag2$$
Now, for the poles and zeros:
- Poles:
$$1+\text{K}\cdot\frac{1}{\text{s}-\alpha}=0\space\Longleftrightarrow\space\text{s}=\alpha-\text{K}\tag3$$
- Zeros:
$$\text{K}\cdot\frac{1}{\text{s}-\alpha}=0\space\Longleftrightarrow\space\text{K}=0\tag4$$
For the settling-time we have that:
$$t\space_{2\text{%}}=-\frac{\ln\left(50\right)}{\lambda}\space\Longleftrightarrow\space\lambda=-\frac{\ln\left(50\right)}{t\space_{2\text{%}}}\tag5$$
We need to use:
$$\text{s}=\lambda+\omega\text{j}\tag6$$
Where $\lambda\space\wedge\space\omega\in\mathbb{R}$ and $\text{j}^2=-1$
Now, we need to solve for $\text{K}$ in the pole equation (assuming $\text{K}\ne0$):
$$1+\text{K}\cdot\frac{1}{\left(-\frac{\ln\left(50\right)}{t\space_{2\text{%}}}+\omega\text{j}\right)-\alpha}=0+0\text{j}\space\Longleftrightarrow\space\text{K}=\alpha+\frac{\ln\left(50\right)}{t\space_{2\text{%}}}\space\space\space\wedge\space\space\space\omega=0\tag7$$
Conclusion, we get a transfer function that looks like:
$$\color{red}{\mathcal{T}=\frac{\text{Y}\left(\text{s}\right)}{\text{X}\left(\text{s}\right)}=\frac{\alpha\cdot t\space_{2\text{%}}+\ln\left(50\right)}{\text{s}\cdot t\space_{2\text{%}}+\ln\left(50\right)}}\tag8$$
Best Answer
I think it is ill-advised in practice to do pole-zero cancellation. Unstable pole-zero cancellation is just plain bad (the closed loop will be unstable) but stable pole-zero cancellation is also not great for practical reasons. The cause is due to not knowing the pole $-p$ exactly, but primarily it is the side-effects of a failed cancellation that is truly the problem.
Normally, like in your problem, the cancellation is with a slow pole $-p.$ Let me demonstrate the issue. Take the plant to have the form,
$$P(s) = \frac{N_p(s)}{D_p(s)}\frac{1}{s + p},$$
where $N_p$ and $D_p$ are just polynomials that do not have roots at $-p$. We've explicitly encoded that the plant has a pole at $-p$ we wish to cancel. We don't know $p$ perfectly well so we instead introduced a zero in our controller that is $\varepsilon$ off from the true pole $-p.$ Our controller takes the form,
$$C(s) = \frac{N_c(s)}{D_c(s)}\,(s + p + \varepsilon)$$
where we take $N_c$ and $D_c$ do not have roots at $-p-\varepsilon.$ If no cancellation happens in $C(s) P(s)$ at $-p$ or $-p-\varepsilon$ then the closed-loop TF from the reference to the output is given by,
$$ \frac{Y(s)}{R(s)} = \frac{(s + p + \varepsilon) N_p(s) N_c(s)}{(s + p + \varepsilon) N_p(s) N_c(s) + (s + p) D_p(s) D_c(s)} $$
This transfer function has a zero at $\approx -p$. To see why, note that $D_p D_c$ doesn't have a root at $-p-\varepsilon$ because otherwise there would be a cancellation. That is a problem: by failing to cancel out the pole at $-p$ we have accidentally introduced it as a zero at $-p$ in our closed loop transfer function. Worse still, this zero is a slow zero because the pole itself was originally slow. So it almost certainly introduces a large overshoot for any aggressive actions taken by the controller for large errors.
Cancelling out fast poles has a similar problem in the sense that the controller ends up becoming very aggressive (it has a fast zero) and will result in poor transient dynamics as well. Moral of the story is: yes there is a theoretical justification for why one should avoid explicit pole-zero cancellations.