Part 13 - Discretization

Introduction

In this part we’ll see how all of this theory will actually be represented when we need to use a computer for calculations.

Implementation

When we want to implement discrete controllers and systems we need to sample.

Sampling is when we sample points from our signal with a certain time period.

We call our sampling period for:

h=1fsh = \dfrac{1}{f_s}

Where fsf_s is the so-called sampling frequency.

To represent a system in a computer we need to sample our signals.

So e(t)e(t) becomes e(kh)e(kh) and y(t)y(t) becomes y(kh)y(kh)

We will usually encounter differential equations.

These equations that describe G(s)G(s) can be approximated as:

y˙(t)=y(t+h)y(t)h\dot{y}(t) \approx = \dfrac{y(t + h) - y(t)}{h} y¨(t)=(y˙)˙=y˙(t+h)y˙(t)h=y(t+2h)y(t+h)hy(t+h)y(t)hh=y(t+2h)2y(t+h)y(t)h2\ddot{y}(t) = \dot{(\dot{y})} = \dfrac{\dot{y}(t +h) - \dot{y}(t)}{h} = \dfrac{\dfrac{y(t + 2h) - y(t + h)}{h} - \dfrac{y(t + h) - y(t)}{h}}{h} = \dfrac{y(t + 2h) - 2y(t + h) - y(t)}{h^2}
Example 1y˙(t)+ay(t)=au(t)  t=kh, k=0,1,\dot{y}(t) + ay(t) = a \cdot u(t) \ | \ t=kh,\ k = 0, 1, \ldotsy(kh+h)y(kh)h+ay(kh)=au(kh)\dfrac{y(kh + h) - y(kh)}{h} + ay(kh) = a \cdot u(kh)y(kh+h)=(1ah)y(kh)+au(kh)y(kh + h) = (1 - ah)y(kh) + a \cdot u(kh)

Z-transform

We won’t that much in depth about it:

Definition 1 (Z-transform)Y(z)=Z{y(kh)}=k=0y(kh)zkY(z) = \mathcal{Z}\{y(kh)\} = \sum_{k = 0}^{\infty} y(kh) \cdot z^{-k}
Example 2y(kh)=eakhy(kh) = e^{-akh}Y(z)=k=0eakhzk=k=0(eakz1)k=11eahz1=zzeah\begin{align*} Y(z) & = \sum_{k = 0}^{\infty} e^{-akh} \cdot z^{-k} \newline & = \sum_{k = 0}^{\infty} (e^{-ak} \cdot z^{-1})^k \newline & = \dfrac{1}{1 - e^{-ah} \cdot z^{-1}} \newline & = \boxed{\dfrac{z}{z - e^{-ah}}} \end{align*}
Theorem 1 (Delay Theorem)Z{y(khlh)}=zlY(z)\mathcal{Z}\{y(kh - lh)\} = z^{-l} \cdot Y(z)

Controller design based on analog G(s)G(s) and F(s)F(s)

The discretization of Ld(z)=Fd(z)Gd(z)L_d(z) = F_d(z) G_d(z)

Sensitivity function, Sd(z)=11+Ld(z)S_d(z) = \dfrac{1}{1 + L_d(z)} Inverse sensitivity function, Sd(z)=Ld(z)1+Ld(z)S_d(z) = \dfrac{L_d(z)}{1 + L_d(z)}