---
# System prepended metadata

title: 數位控制系統 Digital Control System
tags: [EGZH, LiuBJ, Digital Control System]

---

數位控制系統 Digital Control System
===
###### tags: `Digital Control System` `LiuBJ` `EGZH`
## Contents
[TOC]

## Chap1, 2

### Approximation of Continuous Systems

#### Forward rectangular rule
$s=\dfrac{z-1}{T}$
#### Backward rectangular rule
$s=\dfrac{z-1}{Tz}$
#### Tustin's rule
transform s-domain compensator to z-domain
$s = \dfrac{2(z-1)}{T(z+1)}$

### Analog control circuit Digital Controller
![](https://i.imgur.com/rBgrgYL.png)

### Definition of Z-transform
![](https://i.imgur.com/PHxyXE6.png)
$z = e^{sT}$

Laplace transform and z-transform are not a mirror image of each other; the s-plane is arranged in a **rectangular coordinate** system, while the z-plane uses a **polar format**.

### S plane and Z plane mapping
![](https://i.imgur.com/F0W5KpS.png)

### Inverse z-Transform
![](https://i.imgur.com/dVhuThV.png)

### Real Translation Property
$x(n)u(n) = X(z)\\
x(n-q)u(n-q) = z^{-q}X(z)$
$z^{–1}$ is a ==delay== of one period

### System Realization
![](https://i.imgur.com/0E8C6Vl.png)
#### Parallel
![](https://i.imgur.com/KY2q9Xa.png)

### Discrete time PID controller
* $Td$ is the derivative time
* $Ti$ is the integral time
* $Ts$ is the sampling period
* $Kd = \dfrac{Td}{Ts}$
* $Ki = \dfrac{Ts}{Ti}$

### PID Parameters Calculation
![](https://i.imgur.com/HVQBAlZ.png)

### Similarity Transformations
Similarity Transformations to describe the ==same system== relative to new state-variable coordinates
![](https://i.imgur.com/PqTZpFJ.png)
Eigenvalues are ==unaffected== by a similarity transformation.

### z-transform transfer function
$G(z) = \dfrac{CB}{(zI-A)} + D$
![](https://i.imgur.com/4WmQsTa.png)


---
## Chap 3

### Sampled-Data Control Systems
![](https://i.imgur.com/rXhaQJY.png)

### Residue Method
$X(s) = \dfrac{s+2}{s^3+4s^2+3s}$

poles of $X(s)$ are $0, 1, 3$
![](https://i.imgur.com/r51Wr0j.png)

### Evaluation of $E^*(s)$
* $E^*(s)$ definition expressed in infinite series
* In closed form: The star transform can be related to the Laplace transform, by
==taking the residues of the Laplace transform== of a function
#### 1. Definition
$E^*(s) = \sum_{n=0}^{\infty}e(nT)\cdot e^{-nTs}$
#### 2. Residues
$E^*(s) = \sum_{at\ poles \\ of\ E(\lambda)}[residues
\ of[E(\lambda)\cdot \dfrac{1}{1 - e^{-T(s- \lambda)}}]]$
Residue 定義：Laurent's series $\dfrac{1}{z-a}$項係數 $a_{-1}$

### Fourier transform of a Unit Pulse Train
![](https://i.imgur.com/hlrIbd2.png)

### Properties of $E^*(s)$
1. $E^*(s)$ is periodic in s with period $j\omega_s$($\omega_s$ is the sampling frequency).
2. If $E(s)$ has a pole at $s=s_1$ , then $E^*(s)$ must have poles at $s=s_1 + jm\omega_s , where\ m = 0, ±1, ±2, ...$

### Sampling Theorem
The Shannon’s sampling theorem states that reconstruction of a signal is possible when the ==sampling frequency is greater than twice the bandwidth== of the signal being sampled.
Nyquist frequency (half the sample rate) exceeds the bandwidth of the signal being sampled.

### Signals Aliasing (混疊)
When the sampling rate is lower than or equal to the
Nyquist rate, a condition defined as ==under sampling==. it is **impossible** to rebuild the original signal according to the sampling theorem.
![](https://i.imgur.com/5JRexR0.png)
<style>
.red {
  color: red;
}
.blue{
  color: blue;
}
</style>
Two different sinusoids that give the same samples. a <span class="red">high frequency</span> and an <span class="blue">alias</span>.

### First-Order Hold
Take slope into consideration
![](https://i.imgur.com/4XHTrpq.png)

### Digital-To-Analog Conversion
* **Pulse Width Modulator**
This is the simplest type of DAC. A stream of pulses is passed through a low-pass analog filter, and the width of the pulse is determined by the digital input code.
* **∆Σ DAC**
The output is a stream of pulses of equal width such that the **average density of the pulses** corresponds to the digital input value. The output stream is then passed through a low-pass filter to produce an analog voltage.
* **R-2R Ladder DAC**

### Analog-To-Digital Conversion
* Counter Ramp ADC
* ***Successive Approximation ADC***
* Single/Dual Ramp ADC (Single/Dual slope integrating)
* Flash ADC (Parallel Converter)
* ***∑ ∆ (Sigma-Delta) ADC***
#### Successive Approximation ADC 逐次逼近
![](https://i.imgur.com/PWmtjyn.png)
1. A sample and hold circuit to acquire the input voltage $(V_{IN})$.
2. An analog voltage comparator that compares $V_{IN}$ to the output of the internal DAC and outputs the result of the comparison to the Successive Approximation Register (SAR).
3. A **SAR** sub-circuit designed to supply an approximate digital code of $V_{IN}$ to the internal DAC.
4. An internal reference DAC that supplies the comparator with an analog voltage equivalent of the digital code output of the SAR for comparison with $V_{IN}$.
examples
![](https://i.imgur.com/luHpy78.png)
![](https://i.imgur.com/tIiAHsi.png)

---
## Chap 4, 5

### The meaning of $E^*(s)$
![](https://i.imgur.com/C5kxmgp.png)
$E^*(s)$ play the role of Sampler.
And its form is similar to z-transform $(z = e^{sT})$.

### The Pulse Transfer Function
Pulse Transfer Function is the transfer function between the sample input and the output at the sampling instant.
![](https://i.imgur.com/Qvs2cdE.png)
Pulse Transfer Function $G(z)$ is the transfer function between the sample input $e^*(t)$ and the output at the sampling ==instant== $c^*(t)$.

### Discrete State Equation based on Transfer Function
#### Obtaining discrete state equations based on transfer function has two disadvantages(Label each time-delay output as state variable):
* Might lose the natural, and desirable states of the system
* The difficulty in deriving the pulse transfer functions for ==high-order== systems.

### Different between $G(s) \cdot H(s)$ and $\overline {GH}(s)$
![](https://i.imgur.com/KJl20f0.png)

### Seperate state variable of Filter and Plant
![](https://i.imgur.com/nCU31Pe.png)
![](https://i.imgur.com/Ts94MPB.png)



---
## Chap 6, 7
### Specification
* Overshoot
\begin{equation}
e^{\frac{-\pi\zeta}{\omega_n\sqrt{1-\zeta^2}}}
\end{equation}
* Settling time

|percent   |time constant|
|:--------:|:-----------:|
|   ±1%    |   4.6$\tau$ |
|   ±2%    |   3.9$\tau$ |
|   ±5%    |   3$\tau$   |

\begin{equation}
e^{-t_s \over \tau}
\end{equation}

* Rise time
$0.5t_p$ for Oscillatory
$2.2\tau$ for Monotonic response

### Jury contours-lines of constant damping ratio
![](https://i.imgur.com/Q6IPbK3.png)
![](https://i.imgur.com/Ym0vwrj.png)

### Contours of constant damped natural frequency
![](https://i.imgur.com/f1SY64f.png)

### Contours of constant settling time
![](https://i.imgur.com/AF4zluW.png)

### Design Region on z-plane
* Damped natural frequency of a pair of complex s-plane poles is given by their imaginary part
* The 5% settling time of a continuous second-order system is related to the real part of the s-plane poles

### Combination of above
![](https://i.imgur.com/W9Wa3OE.png)

### Mapping the s-plane into the z-plane
* The **imaginary axis** in the s-plane maps into the **unit circle** in the z-plane
* The **left-half** of the s-plane maps into the **interior** of the unit circle in the z-plane
* The **right-half** of the s-plane maps into the **exterior** of the unit circle in the z-plane

![](https://i.imgur.com/hWZgeuI.png)
![](https://i.imgur.com/MKccaMa.png)
![](https://i.imgur.com/MYFcLu9.png)
![](https://i.imgur.com/7XdjImU.png)

### Steady-State Accuracy
#### Final value theorem of the z -transform
$\displaystyle\lim_{k\to\infty}c(kT) = [(z-1)C(z)] \mid_{z=1}$

$K_p \equiv \displaystyle\lim_{z\to1}G(z)\implies e_{ss}(kT) = {1 \over 1+K_p}$ (<span class="red">unit-step</span> input)
$K_v \equiv \displaystyle\lim_{z\to1}[{1 \over T}(z-1)G(z)]\Rightarrow e_{ss}(kT) = {1 \over k_v}$ (<span class="red">unit-ramp</span> input)

#### plant transfer function
$G(z) = {k_{dc} \over (z-1)^N} \ N$ is called the <span class="red">system type</span>

### Approximation of Continuous Systems

#### Rectangular approximation
![](https://i.imgur.com/bBVHkgo.png)
#### Trapezoidal approximation
![](https://i.imgur.com/UwGfHRw.png)

### Discrete-Time System Stability Analysis
#### Routh-Hurwitz Criterion
1. **Obtain the z-transform transfer function**
2. **Bilinear transform the z-plane to w-plane**
The bilinear transform is a first-order approximation function that is an exact mapping of the z-plane to the w-plane through the use of
\begin{equation}
z = {1+(T/2)w \over 1-(T/2)w}
\end{equation}
3. **Apply Routh-Hurwitz Criterion to determine the stability region**
\begin{equation}
1+KG(w) = 0
\end{equation}

#### Jury’s Stability Test
Jury stability test can be applied to characteristic equation in z without solving for roots, and reveal the existence of any unstable roots.
##### Stable condition:(Q is the characteristic equation)
$Q(z)=a_nz^n+a_{n-1}Z^{n-1}+a_{n-2}Z^{n-2}+...+a_0=0$
1. $Q(1) > 0$
2. $(-1)^n \cdot Q(-1) > 0$
3. $\begin{vmatrix}a_0\end{vmatrix}<a_n$
4. $\left\{ 
  \begin{array}{c}
    \begin{vmatrix}b_0\end{vmatrix}>\begin{vmatrix}b_{n-1}\end{vmatrix} \\ 
    \begin{vmatrix}c_0\end{vmatrix}>\begin{vmatrix}b_{n-2}\end{vmatrix} \\ 
    \begin{vmatrix}d_0\end{vmatrix}>\begin{vmatrix}b_{n-3}\end{vmatrix} \\
    \vdots \\
    \begin{vmatrix}m_0\end{vmatrix}>\begin{vmatrix}{m_2}\end{vmatrix}
  \end{array}
\right.$
![](https://i.imgur.com/r6Tk6a0.png)

#### Root Locus
$D(s)=1+KG(s)H(s)=0\\ \Rightarrow \underbrace{KG(s)H(s)}_\text{r∠KG(s)H(s)}=-1=1∠(2k+1)180^\circ;\ k=0,±1,±2,±3......$
by converting to polar coordinates:$\left\{ 
  \begin{array}{c}The\ Magnitude\ Equation: 1+K\cdot G(s)H (s)=0\\
  The\ Angle\ Equation:∠K\cdot G(s)H(s)=180^\circ
  \end{array}
\right.$


$\overset{Z-domain}{\implies}D(z)=1+K \overline{GH}(z)=0$
by converting to polar coordinates :$\left\{ 
  \begin{array}{c}The\ Magnitude\ Equation: 1+K\overline{GH}(z)=0\\
  The\ Angle\ Equation:∠K\cdot\overline{GH}(z)=180^\circ
  \end{array}
\right.$

![](https://i.imgur.com/8K4GVPW.png)
$\color{red}{unit\ circle\ attention!!}$

#### Bode plot
1. Obtain the z-transform
2. Bilinear transform the z-plane to w-plane
3. Apply Bode plot to determine the stability region

==$G(e^{j\omega T})$== is the true frequency response at the sampling instants

The steady-state output will follow the input with amplification $\begin{vmatrix}G(e^{j\omega T})\end{vmatrix}$ and phase-shift $\theta$ caused by transfer function $G(z)$


---
## Chap 8
### Phase-lag Compensation Design
![](https://i.imgur.com/1ORS6gM.png)

### Phase-lead Compensation Design
![](https://i.imgur.com/nDhw1yh.png)
![](https://i.imgur.com/xAUbA1Y.png)



---
## Chap 9

### Digital Controller Design via Pole-Assignment 
![](https://i.imgur.com/GCaPtkc.png)
![](https://i.imgur.com/BSyEduK.png)

###  State Estimation: Observer 
![](https://i.imgur.com/fcqNiTi.png)
![](https://i.imgur.com/OTVtnUW.png)
![](https://i.imgur.com/PVQ7o3Y.png)
![](https://i.imgur.com/fbIQzU9.png)

