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

Site Tools


notes:elen90055

This is an old revision of the document!


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 criterion

notes/elen90055.1631233530.txt.gz · Last modified: 2023/05/30 22:32 (external edit)