$conf['savedir'] = '/app/www/public/data'; notes:elen90055 [DokuWiki]

Site Tools


notes:elen90055

ELEN90055 - Control Systems

Dynamical Systems

Anything or a set of things that can change with time is a dynamical system. The system is defined by variables that can change with time (signals), such as inputs, disturbances, references or outputs. A law or rule describes how these signals interact and evolve over time for any input (and initial condition) e.g. differential or difference equations.

A continuous time signal to continuous time signal is related by a differential equation. A Laplace transform to Laplace transform is related by a transfer function. A Fourier transform to Fourier transform is related by a frequency response.

A control system seeks to make a dynamical system behave in a particular way. In a control system, an input signal is chosen specifically to try and make output signals behave in a specified way. If there are no disturbances and the input-output dynamics are “nice” (static or stably invertible) it is easy to invert the input to yield the desired output. In the real world there are unmeasured disturbances, parameter deviations and/or unstable/oscillatory dynamics. The solution is to use feedback control; by measuring the output and designing a feedback controller that changes the input to automatically compensate for these issues.

Control systems are ubiquitous and successful. This success means that it is often invisible to non-experts until something goes wrong. Control systems tend to be represented as a block diagram, from output to controller to actuators to plant (dynamics to control) to outputs. The sensors run from the plant to the controller, providing a feedback loop. Noise is added in the actuators and sensors, and disturbances in the plant.

Open and closed loop control

Open loop control has no feedback from the output to the reference (desired output) whereas closed loop has such feedback. This feedback is provided by a sensor. Open loop control is good when the application can be precisely modelled, however this is hard to do for real systems. We can draw the system with a block diagram, with squares multiplying their input and circles summing their inputs.

With an open loop system, we can be very sensitive to disturbances, but with closed loop feedback with a large controller effect, we can significantly reduce any error. The closed loop has the problem that with out any disturbance, the output error is non-zero. The problem comes in balancing the effect of disturbance and the imperfect tracking. Feedback improves the robustness of the system. If the disturbance can be measured, we can result in perfect tracking while still reducing the effect of the disturbance.

The problem with this is the effect of unknown disturbances, resulting in the need of tracking the output. Where we can measure the disturbance, we want the controller to implement the inverse operation of the plant, such that the disturbance is removed before the input. This open loop control provides perfect tracking (no disturbance and no offset). This requires the disturbance to be measured, the model to be inverted exactly, the inverse to be realisable and the model and its inverse needs to be BIBO stable. As the inverse is hard to do, we tend to want to avoid doing so. Providing feedback from the controller output mixed with the reference, with a large controller gain results in the output being approximately equal to the reference. Where we have a plant model with no disturbance $f\langle\circ\rangle$ and high gain controller $h\langle\circ\rangle$, we can use the plant model to provide feedback from the controller output $u$ to make an error value $e=r-\hat{y}=r-f\langle u\rangle$. Here, $u=h\langle r-f\langle u\rangle\rangle$, giving $r-f\langle u\rangle=h^{-1}\langle u\rangle\implies u=f^{-1}\langle r-h^{-1}\langle u\rangle\rangle$, for a high gain h, $u\approx f^{-1}\langle r\rangle\implies y\approx r$. If the plant model is exactly equal to the plant, we can take $\hat{y}$ from the output and get the same as a closed loop design, making this open loop system an alternative approximate to closed loop design. This high gain feedback responds aggressively to small errors which may destabilise the system, but feedback can make the system robust to disturbances and uncertainty.

Aims of control

Control seeks to set:

  • Stability With no disturbances and constant input, the output approach should a desired, constant equilibrium even if initial conditions change slightly
  • Transient performance Quick but graceful transition from initial state to steady state
  • Robustness Steady state behaviour doesn't change dramatically with uncertainties, disturbances or noise

An equilibrium is a point where a system is unchanging. Equilibria can be stable (returning to the same point with perturbations) , unstable (changing with perturbations) or marginally stable (indifferent to perturbations). Equilibria are “sweet spots”, so when a system starts at an equilibrium point, it can stay there forever. Nominal operating conditions should be chosen to be equilibrium points, as we want to operate near stable points. Sometimes we want to operate the plant at an unstable equilibrium point, which we try to render stable with feedback to the controller. Stability is studied with Laplace transforms. with transient performance studied in the s or frequency domain. Performance and robustness will be invested in frequency domain, with system frequency response typically needing good tracking of low frequency references and good damping of disturbances and high frequency noise.

System models

Systems map domains of input signals to output signals. We can express this a collection of system blocks, which in themselves are systems mapping signals to signals.

We can construct a system model from first principles (laws of nature), which is often followed by linearisation and model reduction (nulling small coefficients). Alternatively we can collect lots of empirical data about input-output signal values and fitting a convenient model (system identification, machine learning). All models are lacking detail, but can be useful to understand the situation. This can make simple models more useful than complex ones, as they are easier to reason about. Additionally simple models allow for easier feedback to attenuate any modelling error.

A static model is one where the relation between input and output is constant with respect to time. Differential models can vary with respect to time.

Finding equilibria

For an input-output differential model equal to 0, a signal pair is an equilibrium of the kth derivative is 0 at all times. The equilibria can be computed from the static equation $\ell(0,...,0,\bar{y},0,...,0,\bar{u})=0$. There can be an infinite number of equilibria, but the one of interest is the one requiring the least control effort.

Linearisation

Often the plant model is already linear time invariant (LTI). However sometimes there is a non-linear model, which is difficult to analyse and control. In starting simple, we try to first linearise the model around the equilibrium of interest. If disturbances are small, this will yield satisfactory designs.

To linearise a function near a point, we use is Taylor series: $$y=f(x)=f(a)+\frac{f'(a)}{1!}(x-a)+\frac{f''(a)}{2!}(x-a)^2+...$$ We only use the first two terms, ignoring all higher order terms. If $f(a)\neq 0$, this is an affine approximation, but if $f(a)=0$, $f(x)\approx f'(a)\delta_x$. The smaller the derivative and the small the deviation from the taken point, the better the linearisation as an approx.

Laplace transforms

Laplace transforms make time derivatives, integrals and convolutions into algebraic operations in s-domain. Different functions in time domain yield different functions in s-domain, so no loss of information from the transform. Leads to crucial concepts of transfer functions such as poles and zeros.

Complex numbers consist of real and imaginary parts, and can be expressed in Cartesian or polar form. They can be thought of as points in the complex plane, similar to vectors. Addition of complex numbers is easier in Cartesian form, whereas multiplication is easier in polar form. $$z_1+z_2=\mathcal{R}(z_1)+\mathcal{R}(z_2)+j(\mathcal{I}(z_1)+\mathcal{I}(z_2))$$ $$z_1\cdot z_2=|z_1||z_2|e^{j(\angle z_1+\angle z_2)}$$ $$e^z=e^{\mathcal{R}(z)}e^{j\mathcal{I}(z)}(\cos(\angle z)+j\sin(\angle z))$$

The Laplace transform is: $$\mathcal{L}[y(t)]=Y(s)=\int_{0-}^\infty e^{-st}y(t)dt$$ The inverse Laplace transform is: $$\mathcal{L}^{-1}[y(s)]=y(t)=\frac{1}{2\pi j}\int_{\sigma-j\infty}^{\sigma+j\infty}e^{st}Y(s)ds$$ The region of convergence is $\mathcal{R}\{s\}\geq\sigma$, for which: $$|y(t)|<ke^{\sigma t};\forall t\geq0$$ Where $\sigma\in\mathbb{R},k<\infty$. If the limit exists, we can use the final value theorem to find the value at a limit. Any strictly proper transfer function can be expressed with different poles as a partial fraction, which using tables can easily be found in time domain. Any residues are computed with the limit approaching the constant on the denominator. If the pole is complex, the residues occur in complex conjugate pairs. The complex component of the pole gives the frequency while the real gives the exponential growth. The residue complex component gives the phase offset and its magnitude is a scalar multiple. For repeated poles, we add fractions with poles of every multiplicity less than and equal to that pole's.

For the limits, the Laplace transform has the following: $$\lim_{t\to\infty}y(t)=\lim_{s\to0_+}sY(s)$$ $$\lim_{t\to0_+}y(t)=\lim_{s\to\infty}sY(s)$$

The transfer function is the ratio of the transform of the input to the output. In LTI systems, this characterises the system. Block diagrams allow us to express a transformation from an input to an output. Cascaded blocks are the equivalent of multiplication. There is also summation of parallel blocks. The unity feedback is a cascade of blocks fed-back and subtracted from the input, resulting in: $$\frac{Y(s)}{U(s)}=\frac{G(s)\cdot C(s)}{1+G(s)\cdot C(s)}$$ A general feedback connection does not cascade in the feedforward but has a block on the feedback, which is subtracted from the input, resulting in: $$\frac{Y(s)}{U(s)}=\frac{G(s)}{1+H(s)\cdot G(s)}$$ For multiple inputs, we find the transfer function in the usual manner treating the other inputs as 0.

Impulse response

The impulse repsonse is the output for a unit impulse $\delta(t)$ input. The transform of the impulse is $1$, producing the transfer function as the output.

Step response

An impulse is infinitely large for an infinitely short period of time. This is rarely encountered. The step function is an instant transition from one value to another, which is much more common (turning on a switch). $$u(t)=\begin{cases}0,&t<0\\1,&t>0\end{cases}$$ It has a transform $U(s)=1/s$. The step response is the integral of the impulse response, and conversely the impulse response is the derivative of the step response.

Poles and zeros

It is important to know how the poles and zeros affect the system. Step response design specifications can be related to the poles and zeros. Introducing an integrator ($1/s$) into the controller can send it to $\infty$ as $s\to0$, making $CG\to\infty$ and $\frac{CG}{1+CG}\to 1$. Any poles or zeros can be real or complex. The zeros are where the magnitude of the response are 0 and the poles are where the magnitude approaches $\infty$. Complex conjugate stable poles cause decreasing oscillations, whereas unstable poles cause constant or increasing oscillations.

An impulse response of a real rational transfer function with strictly positive relative degree (strictly proper) is a linear combination of terms of the form:

  • $e^{\alpha t}$ for each isolated real pole $s=\alpha$, $t^ne^{\alpha t}$ for each $n$ repeat
  • $e^{\sigma t}\cos(\omega t+\phi)$ for each conjugate pair of complex poles $s=\sigma\pm j\omega$
  • $e^{\sigma t}t^n\cos(\omega t+\phi)$ for each $n$ repeated complex conjugate pair $s=\sigma\pm j\omega$

Each term is a mode of the system. The growth rate $\sigma$, frequency $\omega$ and powers $n$ depend only each corresponding pole. The linear coefficients in front of each node and the phase also depend on other poles and zeros.

In an unstable response, the fast terms dominate, whereas in a stable response the slow terms dominate.

Second order systems

A generic second order system is: $$\ddot{y}(t)+2\psi\omega_n\dot{y}(t)+\omega_n^2y(t)=\omega_n^2u(t)\stackrel{\mathcal{L}}{\iff}G(s)=\frac{Y(s)}{U(s)}=\frac{\omega_n^2}{s^2+2\psi\omega_ns+\omega_n^2}$$ If $0<\psi<1$ (underdamped), then the poles are: $$\frac{-2\psi\omega_n\pm\sqrt{(2\psi\omega_n)^2-4\omega_n^2}}{2}=\underbrace{-\Psi\omega_2}_\sigma\pm j\underbrace{\omega_n\sqrt{1-\Psi^2}}_\omega$$ Where $\omega_n$ is the natural frequency and $\psi$ is the damping factor. The numerator in the transfer function is such that there is unity gain. In the complex plane, the poles lie on the circle of radius $\omega_n$ and have angle from the negative real axis of $\psi$. As the damping increases, the amplitude of the oscillations decreases and the frequency of oscillation decreases The position on the imaginary axis determines the frequency of oscillation and the position on the real axis determines the damping or growth, with faster being further from 0. On the imaginary axis, the pole is marginally stable, to the right is unstable and to the left is stable.

For a step response, of interest are the undershoot $-M_u$, overshoot $M_p$ and setting time $t_s$. The setting time is determined by the amount of time for the response to get to and remain in a given amount of the final result. The rise time $t_r$ is the time required to go from the initial value to a given fraction of the final value.

The canonical form in time domain is: $$y(t)=1-\frac{\zeta}{\sqrt{1-\zeta^2}}e^{-\sigma t}\sin(\omega_dt)-e^{-\sigma t}\cos(\omega_dt)$$ To set the settling time within 1% the final value, $\sigma\geq\ln{\frac{1}{0.01}}\approx\frac{4.6}{t_s}$, this represents a vertical partition in the complex plane. The rise time is $\omega_n\geq\frac{1.8}{t_r}$, this represents a circle in the complex plane. For the overshoot, $\zeta\geq\zeta(M_p)$, this represents a angled portion of the complex plane. Combined these restrict the position in the complex plane where the poles are allowed to be located.

In higher order systems, the presence of two complex conjugate dominant poles determine the design of the system as an approximation of a second order system. Dominant requires the other poles to be far from the constraints. We can even use a first order approximation, but this sacrifices degrees of freedom. The rise and settling times are the same in a first order system, but are different in a second order. Higher order systems also have superior noise rejection properties. Sometimes a step response spec will be unachievable as it will clash with another spec, requiring a trade off to be made.

Zeros

When the zero is negative there is overshoot in the response. When the zero is positive there us undershoot in the response. Slower zeros have bigger impacts.

There is a trade off between undershoot and settling time. With an unstable zero ($c>0$): $$M_u\geq\frac{1-\delta}{e^{ct_s}-1}\approx\frac{1}{ct_s}$$ The approximation holds for small $ct_s$ and $\delta$. With a slow, stable zero and a dominant pole with real part $-p<0$, assuming $\eta=\left|\frac{c}{p}\right|<<1$ and the unit step response satisfies $$|1-y(t)|<Ke^{-pt},t\geq t_s,K>0$$ Then the step response has overshoot: $$M_p\geq\frac{1}{e^{ct_s}-1}\left(1-\frac{K\eta}{1-\eta}\right)$$ The smaller the settling time, the larger the overshoot.

Stability and the Routh-Hurwitz Criterion

Stability is often the goal of a control system as time goes on. A system is stable if the output converges to zero for any initial conditions. It is unstable if the output diverges for some initial conditions. It is marginally stable if the output stays bounded from all initial conditions and may converge to zero for some initial conditions.

A stable system has all poles strictly in the left half of the plane. A marginally stable system has non-repeated poles on the imaginary axis and other poles in the left half of the plane. An unstable system has poles strictly in the right half of the plane or repeated poles on the imaginary axis.

Bounded Input Bounded Output (BIBO) stability is stability on a subset of inputs and outputs. Formally, for any $\bar{u}>0$, there exists a finite $\bar{y}>0$ such that for any input $u$ with $u(t)\leq\bar{u}$, $|y(t)|\leq\bar{y}$ for all $t\geq 0$. This is that bounded inputs produce bounded outputs. BIBO stability holds iff the impulse response is absolutely integrable. $$\int_0^\infty |g(t)|dt<0$$ A rational transfer function is BIBO stable iff its poles are in the left half of the plane and its transfer function is proper. If there are no pole-zero cancellations and the transfer function is proper, BIBO stability is the same as stability with respect to initial conditions. A monic polynomial with roots having negative real parts is necessarily BIBO stable. That is, all the coefficients of the polynomial as strictly positive.

If all coefficients in the characteristic polynomial are positive, the Routh-Hurwitz criterion check whether there are any poles with positive/zero real part. For such a polynomial, we construct a Routh array: $$\begin{array}{c|ccc}s^n&\gamma_{0,1}:=a_n&\gamma_{0,2}:=a_{n-2}&...\\s^{n-1}&\gamma_{1,1}:=a_{n-1}&\gamma_{1,2}:=a_{n-3}&...\\s^{n-2}&\gamma_{2,1}&\gamma_{2,2}&...\\\vdots&\vdots&\vdots&\vdots\\s^0&\gamma_{n,1}&\gamma_{n,2}&...\end{array}$$ $$\gamma_{k,j}:=-\frac{1}{\gamma_{k-1,1}}\begin{vmatrix}\gamma_{k-2,1}&\gamma_{k-2,j+1}\\\gamma_{k-1,1}&\gamma_{k-1,j+1}\end{vmatrix}$$ A polynomial with positive coefficients have all roots with strictly negative real parts iff all elements in the first column of the Routh array do not change their sign.

Frequency response

Frequency domain analysis is important in achieving appropriate performance and robustness of a closed loop system. The frequency response can be experimentally obtained. Nyquist and Bode plots are essential tools in control systems design. The system response consists of:

  • Impulse response Response to a short, sharp shock
  • Step response Response to a suddenly changed input
  • Frequenct response Characterises the steady state output for an input of a particular sinusoid

Sinusoids are the eigenvectors for LTI systems, where one fed into a system produces another as the output. There can be a transient term produced, but that tends to 0 as $t\to\infty$. The steady state output for a stable system is: $$y_{ss}(t)=\underbrace{G(j\omega)}_{\text{frequency response}}e^{j\omega t}$$ The steady state output is periodic but scaled in magnitude by $|G(j\omega)|$ and shifted in phase by $\angle G(j\omega)$.

We can formally define a frequency response for an unstable system if there are no poles in the positive real part. We just set $s=j\omega$ in the transfer function.

A Nyquist plot is a plot of the frequency response in the complex plane. The curve is parameterised by frequency. Bode plots tend to be more convenient as the value of $G$ for particular $\omega$ isn't shown.

Bode Plots

The Bode plot is a log-log plot of the magnitude and phase of the $H(j\omega)$ against the frequency. Often the magnitude is plotted in decibels ($20\log H(j\omega)$), and the phase is plotted in degrees. Plotting the log allows us to add different signal's plots linearly. A filter has a gradient of 20dB/decade per order in the region it filters.

A differentiator has $G(j\omega)=j\omega$, its magnitude plot increases linearly at 20dB/decade while its phase is constant $90^\circ$. An integrator has $G(j\omega)=\frac{1}{j\omega}==-\frac{j}{\omega}$, its magnitude plot decreases linearly at 20dB/decade and its phase is constant $-90^\circ$. A response of $G(j\omega)=j\omega+1$ has a magnitude response that is $\sqrt{1+\omega^2}$ and a phase of $\tan^{-1}\omega$, here $\omega=1$ is the corner frequency (3dB change) as that is where the response changes. For reciprocal relationships, the magnitude and phase just change sign. $$20\log\left|\frac{1}{G(j\omega)}\right|=-20\log|G(j\omega)|$$ $$\angle\frac{1}{G(j\omega)}=-\angle G(j\omega)$$

Second order diagrams have a slope of 40dB/decade. Resonant peaks can cause peaks in the magnitude plot, where the magnitude abnormally increases. The phase plot shifts $180^\circ$ over all frequencies. The amount of damping affects the slope of the phase curve. Dividing allows for the subtraction of the denominator's plot from the numerator's, whereas multiplication allows for the summation of each term. This allows for the plotting of any rational transfer function.

Sensitivity transfer functions

A control system typically has a number of inputs, being reference inputs and disturbances. We want the output to be sensitive to the reference, but not the disturbance. The effects of references and disturbances on signals in the loop can be captured by a gang of four sensitivity transfer functions. Example disturbances can include low frequency, large amplitude input disturbance and high frequency, small amplitude measurement noise. It can be useful to understand the transfer function for the controller output, as this helps with efficient control. It is desirable for the input to the plant to be small and relatively constant.

For a nominal plant $G_0(s)=\frac{B_0(s)}{A_0(s)}$ and controller $C(s)=\frac{P(s)}{L(s)}$, there are 4 sensitivity functions

  • Complimentary sensitivity $T_0(s)=\frac{G_0(s)C(s)}{1+G_0(s)C(s)}$
  • Output sensitivity $S_0(s)=\frac{1}{1+G_0(s)C(s)}$
  • Input-disturbance sensitivity $S_{i0}(s)=\frac{G_0(s)}{1+G_0(s)C(s)}$
  • Control sensitivity $S_{u0}=\frac{C(s)}{1+G_0(s)C(s)}$

Ideally we want the complimentary sensitivity to be 1 and the rest to be 0. The sensitivities are algebraically related: $$S_0(s)+T_0(s)=1$$ $$S_{i0}=G_0(s)S_0(s)=T_0(s)/C(s)$$ $$S_{u0}(s)=S_0(s)C(s)=T_0(s)/G_0(s)$$ $C(s)$ is the only degree of freedom in shaping the two transfer functions, $T_0(s)$ and $S_0(s)$. If we shape one transfer function, it fixes the other, leading to a trade-off between good tracking and good disturbance rejection.

As a result of this tradeoff, we can add a second degree of freedom by adding a stable reference filter $H(s)$ to the input before it is fed into the loop. This allows us to set $C(s)$ to reduce disturbance.

Root Locus

The root locus is the region in the complex plane for the roots of the equation: $$1+KF(s)=0;K(s)=\frac{M(s)}{D(s)}=\frac{\prod_{k=1}^m(s-\beta_k)}{\prod_{k=1}^n(s-\alpha_k)}$$ A point $s_0$ in the complex plane on the root locus needs to satisfy: $$1+KF(s_0)=0\iff KF(s_0)=-1$$ This implied that the magnitude and phase conditions hold. $$|KF(s_0)|=1$$ $$\angle KF(s_0)=(2l+1)\pi;l\in\mathbb{Z}$$ Since K is positive, the phase only depends on the poles and zeros of $F(s)$, i.e for $s_0$ on the root locus. $$(2l+1)\pi=\angle F(s_0)=\sum_{k=1}^m\angle(s_0-\beta_k)-\sum_{k=1}^n\angle(s_0-\alpha_k)$$ The root locus is parameterised with gain $K>0$. We can set $K$ for a specific point with: $$K=\frac{1}{|F(s_0)|}$$ Open loop poles are points where the branches of the locus start from (small $K$). Open loop zeros are points were some branches of the root locus converge to (large $K$).

A root locus will have $L$ branches, where $L$ is the maximum number of poles/zeros of $F(s)$. If $F(s)$ is proper, the $L$ is the number of poles. For small values of $K$, the root locus contains points close to the poles of $F(s)$. The zeros of the characteristic polynomial are the poles of the transfer function. As such, we can say that branches “emanate from” open loop poles (poles as “sources”). $$1+KF(s)=\frac{D(s)+KM(s)}{D(s)}=0\stackrel{K=0}{\iff}D(s)=0$$ For large values of $K$, the root locus is close to the zeros of $F(s)$. We can say that zeros are limits of branches as $K$ grows to infinity (zeros as “sinks”). $$1+KF(s)=K\frac{\frac{1}{K}D(s)+M(s)}{D(s)}=0\stackrel{K\to\infty}{\iff}M(s)=0$$

We can quickly determine which parts of the real axis belong to the root locus because of the phase condition: $$\angle KF(s_0)=(2l+1)\pi$$ A point on the real axis is a part of the root locus iff it is to the left of an odd number of poles and zeros.

If the number of poles is greater than the number of zeros, i.e. $F(s)$ is strictly proper, then the root locus has asymptotes. These intersect the real axis at: $$\sigma=\frac{\overbrace{\sum_{k=1}^n\alpha_k}^{poles}-\overbrace{\sum_{k=1}^m\beta_k}^{zeros}}{n-m}$$ It is real because the poles are zeros occur in conjugate pairs. The angles at the intersection are: $$\eta_k=\frac{(2k-1)\pi}{n-m},;k=1,...,n-m$$ The number of distinct asymptotes depends on the relative degree.

For a repeated root, the value at the root is 0 and the derivative at that point is 0. For repeated roots in $M(s)$, this causes: $$D(s)+KM(s)=0\implies K=-\frac{\frac{dD}{ds}}{\frac{dM}{ds}}$$ $$D(s)-\frac{\frac{dD}{ds}}{\frac{dM}{ds}}M(s)=0\iff D(s)\frac{dM(s)}{ds}-M(s)\frac{dD(s)}{ds}=0$$ This lets us find $K$ as: $$\frac{dK}{ds}=-\frac{\frac{dD}{ds}M(s)-D(s)\frac{dM}{ds}}{M(s)^2}=0$$

With the Routh array as a function of K, we can find the purely imaginary poles. This is done by finding the values of K for which some elements in the first column are equal to zero. For these values of K, we can find the purely imaginary poles of the closed loop, their intersections with the imaginary axis.

To find the arrival and departure angles, we can apply the phase condition to a test point with a pole or zero for which we want to compute the arrival/departure angle. $$\angle(s_0-\beta_1)-\angle(s_0-\alpha_2)+...=(2l+1)\pi;l\in\mathbb{Z}$$

Nyquist stability criterion

Moving around a contour $F(s)$ in the s-plane, the angle from a zero inside the contour to $F(s)$ changes by $-2\pi$ rad. For a zero outside the contour, moving around the contour causes there to be no change in the angle of $F(s)$. For two zeros, the phase change can be $-4\pi$ for both enclosed, $-2\pi$ for only one enclosed or $0$ for none enclosed. When moving from the s-plane to the F-plane, each enclosed zero cause a counter-clockwise wrap around the origin. Poles have a similar effect, but in the opposite direction to a zero. That is, the phase change is $2\pi$. For a rational function, as $s$ traverses a given contour $\mathcal{C}_s$, the change in phase as $F(s)$ traverses $\mathcal{C}_F$ is: $$\angle F(s)=\sum_{i=1}^m\angle(s-c_i)-\sum_{j=1}^n\angle(s-p_i)$$ This is, the number of counterclockwise encirclements of the origin by $F(s)$ as $s$ travels clockwise along the contour is equal to the number of zeros less the number of poles. This is Cauchy's argument principle. $$N=Z-P$$ Where $N$ is the number of counterclockwise encirclements of the origin of the contour, $Z$ is the number of zeros and $P$ is the number of poles.

Given a transfer function: $$T_0(s)=\frac{\Lambda_0(s)}{1+\Lambda_0(s)},\Lambda_0(s)=C(s)G_0(s)$$ The closed loop poles are the zeros of $F(s)=1+\Lambda_0(s)$ and the open loop poles are the poles of $\Lambda_0(s)$, being the poles of $F(s)$. Assuming the transfer function is strictly proper, such that: $$\lim_{|s|\to\infty}F(s)=1$$ We use the Nyquist D contour, encompassing the whole right half of the plane, being the values for which $\mathcal{R}(s)>0$. This path is given by a vertical path on the imaginary axis and a clockwise semicircle in the s-plane. In the F plane, the whole semicircular arc maps to the single point $(1,j0)$, so only the mapping of the path on the imaginary axis needs to be mapped. The plot in the F plane needs to be symmetrical about the real axis. The convention is to plot the open loop transfer function $\Lambda_0(s)$ plane instead of the F plane. Given the number of unstable poles of $\Lambda_0(s)$, the plot of the open loop frequency response gives us the number of clockwise encirclements of the critical point $(-1,0)$, this then gives the number of closed loop poles from the Cauchy argument principle.

The Nyquist stability criteria states that the closed loop system is stable iff the Nyquist plot of $\Lambda_0(s)$ encircles the point $(-1,0)$ in the counterclockwise direction as $s$ traverses the D contour in the clockwise direction. This is an alternative to the root-locus and Routh-Hurwitz criterion. It can deal with systems with non-rational transfer functions and unstable open loop transfer functions. To see how changing the gain affects the stability of the system: $$1+K\Lambda_0(s)=0$$ We then check the encirclements of the new critical point $\left(-\frac{1}{K},j0\right)$.

Adding in a delay can only be visualised in a Nyquist plot. The delay causes a spiral in F domain, and as such, the function will become stable and unstable as the gain changes. The larger the delay, the slower varying the spiral.

When there are poles on the imaginary axis, we need to create infinitesimally small exclusions of those poles when creating the Nyquist contour. This creates a divergent Nyquist plot which can be closed by completing the loop from $\infty$ to $-\infty$ on the imaginary axis while passing through $\infty$ or $-\infty$ on the real axis. The infinitesimal bump translates to a $180^\circ$ shift in the Nyquist plot with an asymptote. The arc connecting the contour is clockwise.

A pole a the origin has a vertical connection between $\omega=0^+$ and $0^-$, so any gain value is stable, as the critical point will never be encircled. A purely imaginary pole ($\lambda_0=\frac{1}{1-\omega^2}$)has a Nyquist plot that passes through the critical point and is marginally/critically stable. The plot starts at $(1,0j)$ at $\omega=0$, moving to $(+ \infty,0j)$ as $\omega\to 1^-$, where it jumps to $(-\infty,0j)$ at $\omega=1^+$, where it goes to 0 as $\omega\to\infty$. From $\omega\to-\infty$, the plot moves from 0 to $(-\infty,0j)$ as $\omega\to-1^-$, then jumps to $(+\infty,0j)$ at $\omega=-1^+$, where it returns to $(1,0j)$ as $\omega\to0$.

Margins

As the Nyquist plot passes close to the critical point, the output has sustained oscillations. It makes sense then to measure how far the Nyquist plot is from the critical point:

  • Gain margin Real valued increase in DC gain needed for the plot to cross the critical point
  • Phase margin Angle Nyquist plot must be rotated clockwise to cross the critical point
  • Sensitivity peak 1/radius of circle around the critical point that just touches the Nyquist plot

$>30^\circ$ is a good phase margin, $>15dB$ is a good gain margin and $<4$ is s good sensitivity peak.

The phase margin is the angle to the point on the Nyquist plot where $|\Lambda_0(j\omega)|=1$, so the that the Nyquist plot could be rotated to intersect the critical point. The gain margin is where the Nyquist plot intersects the negative real axis ($-180^\circ$), and is the distance to that point from the origin. It measures the extra gain that the system could tolerate before hitting the critical point. The sensitivity peak is the minimum distance to the Nyquist plot from the critical point. $$\frac{1}{\eta}=\frac{1}{\min_\omega|1+\Lambda_0(j\omega)|}=\max_\omega|S_0(j\omega)|$$ The phase and gain margin are used together as a design guide, and the sensitivity peak alone can be used.

The phase margin and sensitivity function are related by: $$|1+\Lambda_0(j\omega_c)|=2\sin\left(\frac{\phi}{2}\right)$$ $$\frac{1}{2\sin\left(\frac{\phi}{2}\right)}=|S_0(j\omega_c)|\leq\max_\omega|S_0(j\omega)|=SP$$ $$\frac{1}{SP}\leq 2\sin\left(\frac{\phi}{2}\right)$$ As the sensitivity peak falls (Nyquist plot approaches the critical point), the phase margin increases.

The gain margin and sensitivity peak are related by: $$1-\eta>|a|\implies-20\log(1-\eta)\leq-20\log|a|=GM$$ So the larger $\eta$, the greater the gain margin must be.

The gain margin can be seen in the bode plot as the displacement in the negative direction from 0 on the magnitude plot when the phase is 0. The phase margin is the distance from $-180^\circ$ when the magnitude is 0. The gain margin can be infinite if the only intersection with the real axis is at the origin. The phase margin may be $360^\circ$ if no rotation of the Nyquist plot will intersect the critical point.

A small sensitivity peak guarantees good gain and phase margins, the converse is not true. Where there are multiple phase crossovers, we find the gain margin for the greatest crossover frequency that is closest to the critical point. Likewise, for multiple gain crossovers, we find the phase margin for the crossover closest to the critical point.

Robustness to model uncertainty

The sensitivity function describes how disturbances and model uncertainty affects the system. As all models are approximate, there will be some level of uncertainty inherent in the system, and it can be useful to understand how the model deviates from the real system. Robustness analysis needs to characterise the amount of mismatch that does not destroy stability/performance. For LTI modelling errors, we consider:

  • Additive modelling error model $R=R_0+R_\epsilon$
  • Multiplicative modelling error model $R=R_0(1+R_\Delta)$

We can note that $R_\epsilon=R_0R_\Delta$. Often the multiplicative form is useful when working with transfer functions. The modelling errors can have different frequency response characteristics to the modelled transfer function.

At low frequencies the additive modelling error peaks, making it more useful. At high frequencies the multiplicative error saturates, so it is more useful.

The small gain theorem allows us to analyse systems where the model isn't perfect. Suppose $C(s)$ internally stabilises $G_0(s)$, we state the conditions when $C(s)$ stabilises the true plant. We assume that $\Lambda_0=G_0C$ and $\Lambda=GC$ have the same number of RHP poles. The small gain theorem states that the actual system is internally stable if the following equations are true: $$|G_\epsilon(j\omega)|\frac{|C(j\omega)|}{|1+\Lambda_0(j\omega)|}<1$$ $$|G_\Delta(j\omega)|\frac{|\Lambda_0(j\omega)|}{|1+\Lambda_0(j\omega)|}<1\equiv|G_\Delta T_0|<1$$ That is the real system's Nyquist plot lies within a distance of $|G_\Delta\Lambda_0|$ of the model's Nyquist plot, so does not encircle the critical point.

The small gain theorem only provides a sufficient condition, not a necessary one, so a violation may not mean the system is unstable. It is hard to obtain a less conservative criterion in general since we may only have a frequency dependent bound on the magnitude error $|G_\Delta(j\omega)|$ without any phase information.

The modelling error can also be applied to the sensitivity functions. $$G_\Delta(s)=\frac{G(s)-G_0(s)}{G_0(s)}$$ The actual sensitivity functions are given by; $$S(s)=S_0(s)S_\Delta(s)$$ $$T(s)=T_0(s)(1+G_\Delta(s))S_\Delta(s)$$ $$S_i(s)=S_{i0}(s)(1+G_\Delta(s))S_\Delta(s)$$ $$S_u(s)=S_{u0}(s)S_\Delta(s)$$ Where the error sensitivity is: $$S_\Delta(s)=\frac{1}{1+T_0(s)G_\Delta(s)}$$ We want $S_\Delta(s)\approx1$ over all frequencies of interest. This is roughly true if $|T_0(j\omega)G_\Delta(j\omega)|<<1$. The model uncertainty limits the closed loop bandwidth.

Frequency based controller design

In designing, we should consider all 4 sensitivity functions, but this can be cumbersome. Under certain conditions these functions can be approximated with the open loop gain. We can place bounds on the sensitivity functions: $$\frac{1}{|\Lambda_0(j\omega)|+1}\leq|S_0(j\omega)|\leq\frac{1}{|\Lambda_0(j\omega)|-1}$$ $$\frac{|\Lambda_0(j\omega)|}{|\Lambda_0(j\omega)|+1}\leq|T_0(j\omega)|\leq\frac{|\Lambda_0(j\omega)|}{|\Lambda_0(j\omega)|-1}$$ $$\frac{1}{|C(j\omega)|}\frac{|\Lambda_0(j\omega)|}{|\Lambda_0(j\omega)|+1}\leq|S_{i0}(j\omega)|\leq\frac{1}{|C(j\omega)|}\frac{|\Lambda_0(j\omega)|}{|\Lambda_0(j\omega)|-1}$$ $$\frac{1}{|G_0(j\omega)|}\frac{|\Lambda_0(j\omega)|}{|\Lambda_0(j\omega)|+1}\leq|S_{u0}(j\omega)|\leq\frac{1}{|G_0(j\omega)|}\frac{|\Lambda_0(j\omega)|}{|\Lambda_0(j\omega)|-1}$$ For frequencies where $|\Lambda_0(j\omega)|>>1$: $$|S_0(j\omega)|<<1,|T_0(j\omega)|\approx 1,|S_{i0}(j\omega)\approx\frac{1}{|C(j\omega)|},|S_{u0}(j\omega)\approx\frac{1}{|G_0(j\omega)|}$$ Similarly for frequencies where $|\Lambda_0(j\omega)|<<1$: $$|S_0(j\omega)|\approx1,|T_0(j\omega)|<<1,|S_{i0}(j\omega)\approx|G_0(j\omega)|,|S_{u0}(j\omega)\approx|C(j\omega)|$$ Around the crossover frequency $|\Lambda_0(j\omega)|\approx 0$, the sensitivity functions can do anything. The steady state error is equal to the DC value of the sensitivity function. $$e_{ss}=S_0(0)$$ The low frequency region affects the tracking and steady state value. The region around the crossover affects transients and stability. The high frequency region affects robustness and disturbance rejection.

In the low frequency region, in order to have 0 steady state error, the gain needs to be above a slope of $-20\text{dB/decade}$. In order to have good tracking, the gain needs to be larger than some $M>>1$.

The crossover frequency affects how close the Nyquist plot of the open loop gain gets to the critical point. The smaller the PM or GM, the stronger the oscillations in the transient response. The rise time and crossover frequency are related. $$\omega_c=\omega_n\sqrt{\sqrt{1+4\psi^4}-2\psi^2}$$ $$M_f=\pi-\angle\Lambda(j\omega_c)=\arctan\frac{2\psi}{\sqrt{\sqrt{1+4\psi^4}-2\psi^2}}$$ $\omega_c$ is the crossover frequency, $\omega_n\geq\frac{1.8}{t_r}$ is related to the rise time and $M_f$ is the phase margin and $\psi$ is the damping ratio. The phase margin is inversely related to the overshoot $M_p$. Unless the open-loop is exactly $\omega_n^2/(s(s+2\psi\omega_n))$, these formulas are approximate. The approximations are good provided the open-loop has only one cross-over, the slope is $-20$ to $-40\text{dB/decade}$ around the cross-over and the phase is between $-90$ and $-180^\circ$.

In order to have good disturbance/noise rejection, we need the open loop gain to be small for all high frequencies.

Frequency domain compensation

Basic compensators

The basic elements that can be used in compensation are:

  • Lead control (PD special case)
  • Lag control (PI special case)
  • Lead-lag control (PID special case)

Lag compensator

A lag compensator has a transfer function given by: $$C(s)=\frac{K(\tau_zs+1)}{(\tau_ps+1)}$$ Where $0<\tau_z<\tau_p$, $C(0)=K$ and $C(\infty)=K\frac{\tau_z}{\tau_p}$. $C(s)$ has a real pole and zero, both of which are stable and the pole is closer to the origin than the zero. It is a lag compenstator because the phase is negative. A lag compensator increases the low frequency gain. This improves the steady state error but reduces the phase margin.

A PI compensator is a special case of a lag compensator. $$C(s)=\frac{K(\tau_zs+1)}{s}$$ Where $0<\tau_z$, $C(0)=\infty$ and $C(\infty)=K\tau_z$.

A lag compensator is advantageous as most plants have an excess of phase at low frequencies. If we chose the corner frequencies of the lag compensator to be small, we can improve the DC gain without affecting the PM too much. If the compensator has too large a peak phase, it can move the gain margin and cause instability. Alternatively the lag compensator can be used to reduce the gain at high frequencies, improving the phase margin as the gain crossover frequency is reduced. This doesn't change the phase crossover frequency, improving the gain margin.

We can rewrite the controller as: $$C(s)=\alpha\frac{Ts+1}{\alpha Ts+1},\alpha>1$$ This reduces the number of parameters that can be changed. When designing the compensator, we generally want the pole to be a decade less than the crossover frequency.

The closed loop bandwidth is the frequency at which we still have good tracking. $$20\log_{10}|T(j\omega)|\geq 3dB,\forall\omega\in[0,\omega_{BW}]$$ It is typically assumed that $\omega_{BW}\in[\omega_c,2\omega_c]$, due to the second order approximation of the transfer function.

Lead compensator

A lead compensator has a transfer function given by: $$C(s)=\frac{K(\tau_zs+1)}{(\tau_ps+1)}$$ Where $0<\tau_p<\tau_z$, $C(0)=K$ and $C(\infty)=K\frac{\tau_z}{\tau_p}$. This is the same as the lead compensator except the zero is closer to the origin than the pole. It is a lead compensator because the phase is positive. The phase peak is at $\omega=\frac{1}{\sqrt{\tau_p\tau_z}}$ and has a value of $\phi_{\max}=\arcsin\frac{\tau_z-\tau_p}{\tau_z+\tau_p}$.

We can rewrite the controller as: $$C(s)=K\frac{Ts+1}{\alpha Ts+1}$$ Where $\tau_z=T$, $\tau_p=\alpha T=\alpha\tau_z$ and $\alpha\in(0,1)$. This gives: $$\omega_\max=\frac{1}{T\sqrt{\alpha}}$$ $$\alpha=\frac{1-\sin\phi_\max}{1+\sin\phi_\max}$$

Applying a compensator can shift the crossover frequency, so multiple iterations may be required when finding the controller. The lead compensator can be used to increase the phase at the crossover frequency, increasing the PM.

Lead-lag compenstator

Lead-lag compensation combines both a lead and lag compensator. Its transfer function is given by: $$C(s)=\frac{K(\tau_{z2}s+1)}{(\tau_{p2}s+1)}\frac{(\tau_{z1}s+1)}{(\tau_{p1}s+1)}$$ Where $0<\underbrace{\tau_{p1}<\tau_{z1}}_{\text{lead}}<\underbrace{\tau_{z2}<\tau_{p2}}_{\text{lag}}$.

This is a cascade of a lead and lag compensators, although other combinations are possible. The lag effect comes first, then the lead.

PID control is a special case where $\tau_{p2}\to\infty$ and $\tau_{p1}\to0$. $$C(s)=\frac{K(\tau_{z2}s+1)(\tau_{z1}s+1)}{s}=\underbrace{K(\tau_{z1}+\tau_{z2})}_{P}+\underbrace{\frac{K}{s}}_{I}+\underbrace{K\tau_{z2}\tau_{z1}s}_{D}$$ PID controllers are not strictly proper, so often a fast pole is introduced to make it proper (e.g. $\frac{1}{1+\epsilon s},\epsilon\approx0$)

To simplify the controller, we introduce $\beta$, where $\log\beta$ is the rise and fall spacing of the magnitude. This fixes the high frequency gain to be the same as the DC gain. The controller becomes: $$C(s)=K_c\frac{(T_1s+1)(T_2s+1)}{(\frac{T_1}{\beta}s+1)(\beta T_2s+1)},\beta>1$$

We define $K_v$ as the steady state output to a ramp input. $$K_v=\lim_{s\to0}sC(s)G_0(s)$$ For reference inputs, the steady state error is the reciprocal of $K_v$. $$\epsilon_{ss}=\frac{1}{K_v}$$ A lag and lead lag controller create a dominant real slow pole, which leads to a small tail in the step response.

If a plant has a pole or zero that are undesirable (e.g. slow), we can use a pre-compensator to cancel it and then a lead/lag compensator can be used to achieve the performance specifications. Do not cancel an unstable pole or zero as this would lose internal stability.

Comparison

Lead compensator achieve specs largely by virtue of their phase responses, adding positive phase in the mid-freq region to boost PM. Lag compensators achieve specs by their magnitude responses, amplification at low frequencies and attenuation at high. Lead-lag compensators can combine benefits of both schemes.

Lead pros:

  • Higher crossover frequency
    • Higher bandwidth
    • Faster system, reduction in settling and rise time

Lead cons:

  • Higher bandwidth may not be desirable if measurement noise is present, or if there are high frequency modelling uncertainties
  • Increases control signal amplitude and control sensitivity function, causing larger control signals
    • Increased power consumption
    • Increased cost
    • Actuator saturation and non-linear effects

Lag pros:

  • Can improve DC gain and reduce steady state errors
  • May improve PM by reducing the gain at higher frequencies
  • High frequency noise may be attenuated without reducing DC gain

Lag cons:

  • Typically yields lower crossover frequency, lower bandwidth and slower response
  • Zero-pole pair are close to zero which typically induces a very long tail in the transient response

Lead-lag pros:

  • If both improvement in steady state and in transient response are required, we can use a lead-lag compensator to exploit the advantages of both compensators

A large number of practical problems can be solved using these compensators. More complex problems sometimes require compensators with different zero-pole configurations. Some problems are more easily tackled using optimal control techniques.

Fundamental limitations

There are fundamental limits to what we can achieve by compensation. One important constraint is that reducing sensitivity at low frequencies causes large sensitivity at high frequencies. The Bode sensitivity integral provides this constraint. Given an open-loop transfer function with no poles on the imaginary axis or in the RHP and supposing that the relative degree of the open-loop is $\geq 2$, then: $$\int_0^\infty \ln|S_0(j\omega)|d\omega=0$$ Meaning that reducing the sensitivity at one frequency increases sensitivity at another. This also holds when there are open-loop poles on the imaginary axis. It becomes a positive integral when there are open-loop RHP poles. A peaking of sensitivity occurs when there is an upper bound on the loop-gain cross-over.

The internal model principle states that to track/reject a set of signals, the controller must contain a model of those signals. That is, the controller must be able to predict those signals. In order to achieve asymptotically perfect reference tracking and disturbance rejection, the controller must take the form of: $$C(s)=\frac{B(s)}{A(s)\Gamma(s)}$$ Where $\Gamma(s)$ is the characteristic polynomial of the disturbance. If we know the reference and disturbance characteristics and can generate their characteristic polynomials, then we only need to find $A(s)$ and $B(s)$ so that the closed loop system is internally stable.

notes/elen90055.txt · Last modified: 2023/05/30 22:32 by 127.0.0.1