Introduction to digital control

In class activities

Author
Published

October 8, 2023

Modified

October 7, 2024

Activities

  1. Given Transform : \[ F(s) = \frac{1}{s(s + a)}, \quad a > 0 \]

    find \(\lim_{n \to \infty} F(nT)\).

First find the time domain function \(f(t)\).

  1. Inverse Laplace Transform :

    The inverse Laplace transform of \(F(s)\) will give the time-domain function \(f(t)\). We can use partial fraction decomposition to find it:

    \[ F(s) = \frac{1}{s(s + a)} = \frac{A}{s} + \frac{B}{s + a} \]

    Solving for \(A\) and \(B\):

    \[ \frac{1}{s(s + a)} = \frac{A(s + a) + Bs}{s(s + a)} \]

    \[ 1 = A(s + a) + Bs \]

    Setting \(s = 0\):

    \[ 1 = Aa \implies A = \frac{1}{a} \]

    Setting \(s = -a\):

    \[ 1 = B(-a) \implies B = -\frac{1}{a} \]

    Therefore,

    \[ F(s) = \frac{1}{a} \left( \frac{1}{s} - \frac{1}{s + a} \right) \]

  2. Inverse Laplace Transform in Time-Domain :

Using standard Laplace transform pairs:

\[ f(t) = \frac{1}{a} \left( 1 - e^{-at} \right) \]

  1. Sampling the Function :

We are interested in finding \(\lim_{n \to \infty} F(nT)\), which implies evaluating the limit of \(f(t)\) at discrete points \(t = nT\):

\[ F(nT) = \frac{1}{a} \left( 1 - e^{-anT} \right) \]

  1. Taking the Limit :

\[ \lim_{n \to \infty} F(nT) = \frac{1}{a} \left( 1 - \lim_{n \to \infty} e^{-anT} \right) \]

Since \(a > 0\), as \(n \to \infty\), \(e^{-anT} \to 0\).

Therefore, the limit becomes:

\[ \lim_{n \to \infty} F(nT) = \frac{1}{a} (1 - 0) = \frac{1}{a} \]

  1. z-transform:

    Sample \(f(t)\) at intervals of \(T\).

\[ f(nT) = \frac{1}{a} \left( 1 - e^{-anT} \right) \]

The z-transform of a discrete-time sequence \(f(nT)\) is given by:

\[ F(z) = \sum_{n=0}^{\infty} f(nT) z^{-n} \]

Substitute the expression for \(f(nT)\):

\[ F(z) = \sum_{n=0}^{\infty} \frac{1}{a} \left( 1 - e^{-anT} \right) z^{-n} \]

Separate the summation:

\[ F(z) = \frac{1}{a} \left( \sum_{n=0}^{\infty} z^{-n} - e^{-aT} \sum_{n=0}^{\infty} \left( e^{-aT} z^{-1} \right)^n \right) \]

Each summation is a geometric series:

  • For the first summation:

\[ \sum_{n=0}^{\infty} z^{-n} = \frac{1}{1 - z^{-1}} \]

  • For the second summation:

\[ \sum_{n=0}^{\infty} \left( e^{-aT} z^{-1} \right)^n = \frac{1}{1 - e^{-aT} z^{-1}} \]

\[ \therefore F(z) = \frac{1}{a} \left( \frac{1}{1 - z^{-1}} - \frac{e^{-aT}}{1 - e^{-aT} z^{-1}} \right) \]

  1. Consider the transfer function below \[ G(s) = \frac{18}{(s + 5) (s + 3)} \tag{1}\]

The zero hold transfer function is given by \[ G_{ZOH} = \frac{1 - e^{-sT_s}}{s} \tag{2}\]

determine the discrete transfer function using c2d command for different Ts. Plot the responses.

The code is given in mlx file.

  1. Consider a continuous process

\[ G(s) = \frac{2 (1-s) }{(3s + 1)(s+1)} \tag{3}\]

convert G(s) to discrete transfer function and plot the step response. Try different hold functions.

The code is given in mlx file.

  1. For the transfer function

\[ G(s) = \frac{1}{s + 1} \tag{4}\]

plot the effect of sample time on response.

The code is given in mlx file.

  1. Design a feedback control system around the first-order plant

\[ G(s) = \frac{1}{0.2s + 1} \tag{5}\]

with the requirements that

  1. the steady-state error is maximum 2% for a ramp input and
  2. the phase margin is greater than 48 degrees.

Use controller transfer function and check phase margin. \[ G(s) = \frac{500s + 50}{100 s^2 + s} \tag{6}\]

To design a feedback control system for the first-order plant:

  • Steady-State Error for a Ramp Input

The system’s steady-state error for a ramp input is determined by the type and the system gain \(K_v\). A unity feedback system with a proportional controller can be considered:

The type of system is determined by the number of poles at the origin (s=0). This system is Type 0 because there is no pole at the origin in G(s).

\(K_v\), the velocity error constant is given by:

\[ K_v = \lim_{s \to 0} s G_{open}(s) \]

The steady-state error for a ramp input is:

\[ e_{ss} = \frac{1}{K_v} \]

To satisfy \(e_{ss} < 0.02\), \(K_v > 50\).

Given \(G(s) = \frac{1}{0.2s + 1}\), if we use a proportional controller with gain \(K\):

\[ K_v = \lim_{s \to 0} s \cdot \frac{K}{0.2s + 1} = \frac{K}{0.2} \]

To achieve \(K_v > 50\):

\[ \frac{K}{0.2} > 50 \implies K > 10 \]

Hence, the proportional gain \(K\) must be greater than 10.

  1. Convert the controller from Equation 6 to discrete form using different sample times. Plot the Bode plot for the continuous and discrete controller and discuss the differences.

  2. Design and compare continous and digital controller for the following transfer function

\[ G(s) = \frac{2 exp(-s)}{4s + 1} \tag{7}\]

Citation

BibTeX citation:
@online{utikar2023,
  author = {Utikar, Ranjeet},
  title = {Introduction to Digital Control},
  date = {2023-10-08},
  url = {https://amc.smilelab.dev//content/notes/10-digital_control/in-class-activities.html},
  langid = {en}
}
For attribution, please cite this work as:
Utikar, Ranjeet. 2023. “Introduction to Digital Control.” October 8, 2023. https://amc.smilelab.dev//content/notes/10-digital_control/in-class-activities.html.