3

Let's say that I have the following continuous system:

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

I could convert it to a discrete system using for example the Tustin approximation https://en.wikipedia.org/wiki/Bilinear_transform

So I replace s with:

$$s \rightarrow{} \frac{2(1-z^{-1})}{T_e(1+z^{-1})} $$

Hence I get the approx. discrete transfer function:

$$G(z)= \frac{2}{1+\frac{2(1-z^{-1})}{T_e(1+z^{-1})}}$$

Now my question is, how can I compute its frequency response ?

In the end, I would like to be able to compare the discrete approx. freqe. response with the freq. response of the continuous original transfer function.

james
  • 278
  • 1
  • 8
  • 1
    Compute it as you would so with any other discrete transfer function. What tools do you have available? In matlab, use *bode* function. – Vicente Cunha Jun 12 '18 at 10:59

2 Answers2

5

If you want to evaluate a continues time transfer function at a specific frequency $\omega$ in rad/s you substitute $s$ with $j\,\omega$. For a discrete time transfer function you substitute $z$ with $e^{T_e\,j\,\omega}$.

In order to see why you have to substitute $z$ with $e^{T_e\,j\,\omega}$ you can consider the transfer function $z^{-1}$, which is a delay of $T_e$. So the response to $\sin(\omega\,t)$ would be $\sin(\omega\,(t-T_e))$ which is equivalent to $\sin(\omega\,t-\omega\,T_e)$. The frequency response function should therefore have a constant magnitude of one (or 0 dB), since the output sine wave always has the same amplitude as the input sine wave and the amount of phase shift the output has relative to the input is $-\omega\,T_e$. It can be shown that both the amplitude and phase are captured by $e^{-T_e\,j\,\omega}$, where the minus sign is because we are considering $z^{-1}$ instead of $z$.

fibonatic
  • 1,633
  • 8
  • 10
  • Thank you very much for your answer ! Can you explain why one can substitute z with $e^{T_e\,j\,\omega}$ ? This is not clear to me. – james Jun 12 '18 at 19:14
  • @james I have updated my answer. – fibonatic Jun 13 '18 at 01:43
  • Thank you very much ! I almost understand it now. The only part which I still struggle with is the sentence: "therefore the frequency response function should have a constant magnitude of one (or 0 dB) and a phase that drops off linearly in frequency". Would you mind to explain how you come to that conclusion ? Thanks a lot ! – james Jun 13 '18 at 06:27
2

In matlab, using c2d (link) and bode (link) functions:

s = tf('s');
G_c = 2/(1+s);
Ts = 1;
G_d = c2d(G_c,Ts,'Tustin');
bode(G_c), hold on, bode(G_d)

enter image description here

  • Thanks for your answer ! I was actually interested in what to do mathematically, but your answer is very nice, because this would have been my next step. :) – james Jun 12 '18 at 19:16