otr_logo_grey OntarioTechRacing.github.io

Control Systems


Table of Contents

1 Intro to Control Systems

Control systems constitute a system, device or set of devices, that utilizes the principle of output control via input, to command the activities of other systems or devices.Control systems are utilized in electronic, automation and engineering systems.

Recommended video: Everything You Need to Know About Control Theory


2 Open Loop and Closed Loop Control

2.1 Open Loop Control

In this control system type, the systems output is dependent on the system input, but the output has no influence on the systems control action. This system utilizes no feedback system.

Recommended video: Open-Loop Control Systems | Understanding Control Systems, Part 1

2.2 Closed Loop Control

This control system consists of an open loop forward path, along with one or more feedback loops. In this system the output is utilized in a feedback loop to influence the systems control actions,to ensure the output matches a desired input.

Recommended video: What is a Closed Loop System? | Basics of Control System


3 Feedback

Feedback involves feeding a systems output or part of the output back to the systems input side to be used as part of the systems input.

3.1 Positive Feedback

Here the feedback output is added to the desired input.

Positive feedback loop

3.2 Negative Feedback

Here the feedback output is subtracted from the desired input. Negative feedback is used to reduce the error between the input and output.

Negative feedback loop


4 Block Diagrams

4.1 Block Diagram Basics

4.1.1 Block

Blocks represent the transfer function of a component, with a single input and output.

The diagram below shows a block with input X(s), output Y(s) and transfer function G(s).

$$G(s) = \frac{Y(s)}{X(s)}$$

The output is obtained by multiplying the transfer function and input.

4.1.2 Summing Point

Represented by a circle, it receives 2 or more inputs and a single output. It is used to perform algebraic operation (summation and/or subtraction) on inputs to produce the operations result as an output. The operations on the inputs depend on their polarity.

The figures below shows a summing point and operations on inputs.

Recommended video: Basics of Block DIagrams

4.1.3 Taking-off point

This is a point on a branch from which an input/output can be passed to a summing point or one or more blocks.

4.2 Block Diagram Algebra

The multiple rules of block diagram algebra are shown below.

Recommended video: Block Diagram Algebra Rules

4.3 Block Diagram Reduction

The video provides an example on block diagram reduction.

Recommended video: Block Diagram Reduction Example


5 Transfer Functions

A transfer function represents the ratio of the laplace transform of a systems output signal and laplace transform of the systems input signal. Transfer functions can be obtained through reduction of a systems block diagram.

$$G(s) = \frac{Y(s)}{X(s)}$$

5.1 Poles and Zeros of Transfer Functions

A transfer function can be represented as:

$$G(s) = \frac{Y(s)}{X(s)} = K\frac{(s-z_1)(s-z_2)(s-z_n)} {(s-p_1)(s-p_2)( s-p_n)}$$

K is the gain factor of the transfer function.

From the equation if, s = $z_1$ or s = $z_2$ or s = $z_n$, the transfer function would become zero. Therefore, $z_1$, $z_2$ and $z_n$ are the zeros of the transfer function.

Now if, s = $p_1$ or s = $p_2$ or s = $p_n$, the transfer function would become infinite. Therefore, $p_1$, $p_2$ and $p_n$ are the roots of the transfer function.

5.2 The S-Plane

The s-plane is a complex plane with a real and imaginary axis. The position on the complex plane is defined by $re^{j\theta}$ and the angle from the positive real axis, $\theta$. Poles are mapped on the s-plane as an x, while zeros are mapped as an o.

Recommended video: Introduction to Transfer Functions

5.3 Obtaining Transfer Function from a Block Diagram

Recommended video: Transfer Function from Block Diagram Reduction Example

5.4 MATLAB Implementation

Recommended video: Transfer function model


6 Time Response Analysis

The output response of a system varying with time is the time response of the system. The time response of a system consists of a transient state and steady state. Below is a generic time response of a system with the 2 states.

Mathematically a systems response c(t) is written as:

$$c(t) = c_{tr}(t) + c_{ss}(t)$$

6.1 Transient State Response

This state encompasses a systems output response until it reaches a steady state. For large values of time t, the transient response will be zero.

6.2 Steady State Response

This state refers to the steady section of a systems response where the transient response reaches a zero value, as t approaches infinity.

6.3 Standard Test Signal

6.3.1 Unit Impulse Signal

Mathematically a unit impulse, $\delta$ is defined as:

$$\delta = 0;~t\neq0$$

6.3.2 Unit Step Signal

Mathematically a unit step signal, u(t) is defined as:

$$u(t) = 1;~t\geq0$$

$$~~~~~= 0;~t<0$$

6.3.3 Unit Ramp Signal

Mathematically a unit step signal, r(t) is defined as:

$$r(t) = t;~t\geq0$$

$$~~~~~= 0;~t<0$$


7 Response of A First Order System

From the first order system above, the transfer function is:

$$\frac{C(s)}{R(s)} = \frac{G(s)}{1 + G(s)}$$

Substituting the value of G(s):

$${C(s)} = \frac{1}{sT + 1}{R(s)}$$

For the time response of the output, the inverse laplace transform of the transfer function is performed.

The table below shows the time domain responses to various signals. The constant values of the responses are the steady state components, while the transient components posses exponents.

Signal Response, c(t)
Unit impulse $$c(t) = \frac{1}{T}e^{\frac{-1}{T}}u(t)$$
Unit Step $$c(t) = (1-e^{\frac{-1}{T}})u(t)$$
Unit Ramp $$c(t) = (t-T-Te^{\frac{-1}{T}})u(t)$$

Unit Impulse Response

Unit Step Response

Unit Ramp Response


8 Response of A Second Order System

From the second order system above, the transfer function is:

$$C(s) = (\frac{w_n^2}{s^2+2\zeta w_n s+w_n^2})R(s)$$

For the time response of the output, the inverse laplace transform of the transfer function is performed.

The table below shows the time domain responses to a unit step signal, under different ranges of $\zeta$.

Damping ratio, $\zeta$ Response, c(t) Response Type
$\zeta = 0$ $$c(t) = (1-\cos{w_n t})u(t)$$ Undamped
$\zeta = 1$ $$c(t) = (1-e^{-w_n t}-w_n te^{-w_n t})u(t)$$ Critically Damped
$0<\zeta<1$ $$c(t) = (1- (\frac{e^{-\zeta w_n t}}{\sqrt{1-\zeta^2}})(\sin{w_d t + \theta})u(t)$$ Underdamped
$\zeta > 1$ $$c(t) = (1+(\frac{1}{2(\zeta+\zeta^2-1)})e^-(\zeta w_n+ w_d)t-(\frac{1}{2(\zeta-\zeta^2+1)})e^-(\zeta w_n-w_d)t)$$ Overdamped

$$w_d = w_n \sqrt{1 - \zeta^2}$$


9 Time Domain Specifications of a 2nd Order System

Response of a 2nd order underdamped system.

9.1 Delay Time

Delay time $t_d$, is the required time for an underdamped system response to reach half of its final value, from it zero instance.

9.2 Rise Time

This is the time $t_r$, taken for an underdamped system response to rise from 0% to 100% of its final value. For an overdamped system response, it is the time to rise from 0% to 100% of its final value.

The quantity is defined mathematically below:

$$t_r = \frac{\pi - \tan^{-1}(\frac{\sqrt{1-\zeta^2}}{\zeta})}{w_n \sqrt{1-\zeta^2}}$$

9.3 Peak Time

Peak time $t_p$ is the time taken for a response to reach its maximum value for the first time.

The quantity is defined mathematically below:

$$t_P = \frac{\pi}{w_d}$$

9.4 Peak Overshoot

Overshoot $M_p$ is the deviation of the systems response from the final steady state response at peak time.

The quantity is defined mathematically below:

$$M_p = (e^-(\frac{\zeta \pi}{\sqrt{1-\zeta^2}}))$$

The percentage of peak overshoot can be found from the above equation.

9.5 Settling Time

This is the time $t_s$ taken for a response to reach its steady state final value and remain within a specific tolerance range of the value.

For a 2% tolerance range, the quantity is defined mathematically below as:

$$t_s = \frac{4}{\zeta w_n} = 4\tau$$

Recommended video: Time Domain Specifications


10 Steady State Error

This refers to the discrepancy between a control systems output from the desired steady state response.

The quantity is defined mathematically below as:

$$e_{ss} = \lim_{x\to\infty} e(t) = \lim_{s\to 0} sE(s)$$

Recommended video: Steady State Error


11 Stability

For a stable system produces a bounded output for a given bounded input.

11.1 Types of Stability

The classification of systems based on stability is given below.

Recommended video: Introduction to Stability


12 Frequency Response

Frequency response is the response of a system for a given sinusoidal input.

For an input signal $r(t) = A\sin(\omega_0 t)$ and open loop transfer function $G(s) = G(j\omega)$, with magnitude and phase $G(j\omega_0)|\angle G( j\omega_0)|$ the output signal is:

$$c(t) = A|G(j\omega_0)|\sin(\omega_0 t+\angle G(j\omega_0))$$


13 Frequency Domain Specifications

For the 2nd order transfer function:

$$T(S) = \frac{C(s)}{R(s)} = (\frac{w_n^2}{s^2+2\zeta w_n s + w_n^2})$$

The magnitude of T(s), with $s = j\omega$:

$$M = |T(j\omega)| = \frac{1}{\sqrt{(1-(\frac{\omega}{\omega_n})^2)^2+(2\zeta \frac{\omega}{\omega_n})^2}}$$

The phase of T(s), with $s = j\omega$:

$$\angle T(j\omega) = -\tan^{-1}(\frac{\frac{2\zeta\omega}{\omega_n}} {1 - ( \frac{\omega}{\omega_n})^2})$$

13.1 Resonant Frequency

Resonant frequency, $\omega_r$, is the frequency when the magnitude of the frequency response reaches its peak value for the first time.

It is mathematically defined as:

$$\omega_r = \omega_n\sqrt{1-2\zeta^2}$$

13.2 Peak Resonance

Peak resonance, $M_r$ is the maximum magnitude of $T(j\omega$).

It is mathematically defined as:

$$M_r = \frac{1}{2\zeta\sqrt{1-\zeta^2}}$$

13.3 Bandwidth

Bandwidth, $\omega_b$, is the frequency range over which, the magnitude of $T( j\omega$) drops to 70.7% of its zero frequency value.

$$\omega_b = \omega_n\sqrt{1-2\zeta^2 + \sqrt{2-4\zeta^2+4\zeta^4}}$$


14 Control System Plots

14.1 Bode Plot

Bode Plots describe the change in magnitude and phase as a function of frequency.

The magnitude of an open loop transfer function in dB is:

$$M = 20\log(|G(j\omega)H(j\omega)|)$$

The phase angle of an open loop transfer function in degrees is:

$$\phi = \angle G(j\omega)H(j\omega)$$

Recommended video: Introduction to Bode Plots

Recommended video: Bode Plot Solved Example

14.1.1 Stability Analysis with Bode Plots

14.1.1.1 Cross Over Frequency
Stability Criteria Stability
$\omega_pc > \omega_gc$ Stable system
$\omega_pc = \omega_gc$ Marginally Stable system
$\omega_pc < \omega_gc$ Unstable system
14.1.1.2 Gain and Phase Margin

It is mathematically defined as:

$$GM = 20\log(\frac{1}{M_pc}) = 10\log(M_pc)$$

$$PM = 180^\circ + \phi_gc$$

where $\phi_gc$, is the phase angle at the gain cross over frequency.

Stability Criteria Stability
$GM > 0$
and $PM > 0$
Stable system
$GM = 0$
and $PM = 0$
Marginally Stable system
$GM < 0$
and/or $PM < 0$
Unstable system

Recommended video: How to find cross over frequencies, Gain and Phase Margin from Bode Plot

14.1.2 MATLAB Implementation

Recommended video: Bode plot of frequency response, or magnitude and phase data

14.2 Nyquist Plot

14.2.1 Nyquist Stability Criterion

The criterion states that if P poles and Z zeros are encircled by an enclosed path in the s plane, the corresponding G(s)H(s) plane must encircle the origin P-Z times. The encirclement number, N, is given by:

$$N = P - Z$$

The Nyquist Stability Criterion states that N of the point (-1,0) must equal P-Z of the close loop transfer function.

Recommended video: Nyquist plot intro 1

Recommended video: Nyquist plot intro 2

14.2.2 Stability Analysis with Nyquist Plots

14.2.1.1 Cross Over Frequency
Stability Criteria Stability
$\omega_pc > \omega_gc$ Stable system
$\omega_pc = \omega_gc$ Marginally Stable system
$\omega_pc < \omega_gc$ Unstable system
14.2.1.2 Gain and Phase Margin

It is mathematically defined as:

$$GM = \frac{1}{M_pc}$$

$$PM = 180^\circ + \phi_{gc}$$

where $\phi_gc$, is the phase angle at the gain cross over frequency.

Stability Criteria Stability
$GM > 1$
and $PM > 0$
Stable system
$GM = 1$
and $PM = 0$
Marginally Stable system
$GM < 1$
and/or $PM < 0$
Unstable system

Recommended video: How to find cross over frequencies, Gain and Phase Margin from Nyquist Plot

14.2.3 MATLAB Implementation

Recommended video: Nyquist plot of frequency response


15 State Space

The state space model of a linear time invariant system is represented as:

  1. State Equation: $$\dot {X} = AX + BU$$

  2. Output Equation: $$Y = CX + DU$$

Applying laplace transform to the state space model defined above, the transfer function of a system in state space is defined as:

$$\frac{Y(s)}{U(s)} = C(sI-A)^{-1}$$

15.1 State Transition Matrix

If the matrix satisfies the following linear homogenous equation:

$$\dot x(t) = \frac{dx(t)}{dt} = Ax(t)$$

The state transition matrix $\phi (t)$ is:

$$\frac{d\phi (t)}{dt} = A\phi (t)$$

The condition following will be met:

$$x(t) = \phi (t)x(0)$$

Taking laplace of the linear homogenous equation:

$$x(t) = \phi (t)x(0) = L^{-1}[(sI - A)^{-1} x(0)]$$

Properties of State Transition Matrix:

15.2 Controllability and Observability

$$Q_0 = [B AB A^2B .... A^{n-1}B]$$

If the determinant of $Q_0$, $|Q_0|$ is unequal to 0, then the system is controllable.

$$Q_0 = [C^T A^T C^T .... (A^T)^{n-1}C^T]$$

If the determinant of $Q_0$, $|Q_0|$ is unequal to 0, then the system is observable.

Recommended videos:

  1. Introduction to State-Space Equations | State Space, Part 1
  2. What is Pole Placement (Full State Feedback) | State Space, Part 2
  3. A Conceptual Approach to Controllability and Observability | State Space, Part 3
  4. What Is Linear Quadratic Regulator (LQR) Optimal Control? | State Space, Part 4
  5. State Space Models, Part 1: Creation and Analysis
  6. State Space Models, Part 2: Control Design

16 code implementations

Recommended video: 4 Ways to Implement a Transfer Function in Code | Control Systems in Practice


17 Applications & Design

Recommended videos: PID Controller Implementation in Software - Phil's Lab #6 Introduction - Control System Design 1/6 - Phil's Lab #7 Modelling of Dynamical Systems - Control System Design 2/6 - Phil's Lab #8 System Identification with Matlab - Control System Design 3/6 - Phil's Lab #9