Design a PID Controller

744 Views Asked by At

I need to design a prefilter and PID controller for a plant whose transfer function is given by

$$G(s)=\frac{3}{s(s^2+4s+5)}$$

subject to the following performance requirements:

  1. An acceleration error constant of $K_a=2$.

  2. Phase margin equal to $45$ degrees.

  3. A bandwidth greater than $2.8\ \text{rad}/s$.

I only have an idea about how to use the acceleration error constant to calculate the $K_i$ to be $3.3333$ based on the theory of steady-state error, but I do not know how to use it for the other two requirements.

1

There are 1 best solutions below

3
On

The issue of compensation is quite broad, there are several techniques to address it. Here we will stick to the basic concepts of closed loop stability.

Calling

$$ G(s) = \frac{3}{s(s^2+4s+5)}\\ PID(s) = \frac{K_i}{s}+s K_d + K_p $$

we have the stability conditions

$$ \left|G(j\omega_c)PID(j\omega_c)\right| = 1\\ \angle G(j\omega_c)PID(j\omega_c) = -\pi+\phi $$

where $\omega_c$ defines practically the bandwidth and $\phi$ the phase margin

Considering also the steady state acceleration error as

$$ \lim_{s\to 0}s \left(1-\frac{G\cdot PID}{1+G\cdot PID}\right)\frac{1}{s^3} = \frac{5}{3K_i} $$

we have three conditions and three parameters to determine or

$$ \frac{9 \left(K_d^2 \omega _c^4+\omega _c^2 \left(K_p^2-2 K_d K_i\right)+K_i^2\right)}{\omega _c^4 \left(\omega _c^4+6 \omega _c^2+25\right)}=1\\ \frac{\omega _c \left(\omega _c^2 (K_p-4 K_d)+4 K_i-5 K_p\right)}{K_d \omega _c^4+5 K_i-\omega _c^2 (5 K_d+K_i-4 K_p)}=-\tan\phi\\ \frac{5}{3K_i}= \frac{1}{K_a} $$

now with $\phi = \frac{\pi}{4}, \omega_c = 3, K_a = 2$ solving for $K_p,K_d, K_i$ we obtain

$$ K_p = 5.66, K_d = 4.14, K_i = 3.33 $$

Follows the close loop response showing in in red $G(s)$ and in blue $PID(s)G(s)$

enter image description here

The overshoot issue can be handled with a proper prefilter and we leave it to the reader.