Discrete Transfer function problem

Discussion in 'Math' started by jag1972, Jun 6, 2016.

  1. jag1972

    Thread Starter Active Member

    Feb 25, 2010
    Hello Folks,
    Requesting some help understanding the process used here, I am okay with the maths I just do not understand this method. It intrests me for that reason. I am given a discrete transfer function and a discrete input. The question is to determine the output function in the sample domain, I would have converted the input into the Z domain and then multiplied the X(Z) by H(Z) to determine the output Y(Z), once Y(Z) is determine the inverse function by using partial fraction expansion method.
    This method is different though which is sont ntuitive to me.

    x[n] = 50 + 10cos(\frac{1}{2}\pi)n +30cos(\pi)n

    H(z)=  \frac{4}{(1-\frac{1}{2}z^{-1})(1+\frac{1}{3}z^{-1})}

    The ROC of the transfer function cuts through the prgin therefore it also has a Fourier transform.

    H(e^{j\omega})=  \frac{4}{(1-\frac{1}{2}e^{-j\omega})(1+\frac{1}{3}e^{-j\omega})}

    Eulers relationship is used to expand the exponential into cos and sin

    H(e^{j\omega})=  \frac{4}{(1-\frac{1}{2}cos(\omega) - jsin (\omega))(1+\frac{1}{3}cos(\omega) - jsin (\omega)) )}

    Omega  \omega is used from all 3 terms of x[n]. The first term is constand therefore  \omega = 0

    H(0)=  \frac{4}{(1-\frac{1}{2}cos(0) - jsin (0))(1+\frac{1}{3}cos(0) - jsin (0)) )}

    H(0)=  \frac{4}{(1-\frac{1}{2})(1+\frac{1}{3} )}

    H(0)=  6

    The second term is  \omega = \frac{1}{2}\pi

    H(\frac{1}{2}\pi)=  \frac{4}{(1-\frac{1}{2}cos(\frac{1}{2}\pi) - jsin (\frac{1}{2}\pi))(1+\frac{1}{3}cos(\frac{1}{2}\pi) - jsin (\frac{1}{2}\pi)) )}

    This results in magnitude and phase

    H(\frac{1}{2}\pi): \ magnitude =\ \frac{12\sqrt2}{5}, \ phase shift \ 8.13^\circ

    The third term is  \omega = \pi

    H(\pi)=  \frac{4}{(1-\frac{1}{2}cos(\pi) - jsin (\pi))(1+\frac{1}{3}cos(\pi) - jsin (\pi)) )}

    H(\pi)= 4

    The valuse obtained are then plugged into the discrete input and that is our y[n], dont understand this?

    y[n] = 50(6) + 24\sqrt{2} cos(\frac{1}{2}\pi + 8.13\circ)n +30(4)cos(\pi)n

    y[n] = 300 + 24\sqrt{2} cos(\frac{1}{2}\pi + 8.13\circ)n +120 cos(\pi)n
  2. MrAl

    Well-Known Member

    Jun 17, 2014

    In a word, "superposition".
    In two words, "superposition" and "orthogonality".

    Without me taking all the mystery out of this just yet, see if you can figure out why those two are so important to this discussion.:)

    Is this homework?
  3. jag1972

    Thread Starter Active Member

    Feb 25, 2010
    Thanks Mr Al,

    I don’t know, superposition is one of the conditions for linearity. Not clear what the relationship is here, can you offer further advice please.

    This is not my homework but is a problem that does not sit well with me intuitively.

  4. MrAl

    Well-Known Member

    Jun 17, 2014

    Oh ok sure, and i should mention that intuition does not work as well as pure analysis, as you probably already know though :) On the other hand, a hunch sometimes leads to a good answer.
    Since it is not homework (i felt compelled to ask first) then we should be able to talk about this.

    As you know, superposition in words just means that the total response is equal to the sum of the individual responses, assuming linearity. Mathematically this simple means:

    where r(Vn) are the individual responses to the Vn sources. So the question is, how does this apply to the current problem?

    Enter the excitation 'source', x[n], which is actually a sum of sources. Since the system is considered linear and the sources are orthogonal, this excitation can be handled as N individual sources. Thus we can find the individual responses to each source in turn, then sum the results. Now that i think about it, orthogonality may not even be necessary, just linearity, in order for superposition to work, but one thing for sure is that sines always work.

    Sometimes it helps to look at a simpler network and see how it works, then go back to the original. If we start with a low pass filter with one R and one C we can compute the transfer function. I'll use jw for j*w and jwC for j*w*C for short:
    and simplified:

    That's the response to a sinusoidal of angular frequency w, so the response to w=w1 is:

    and to w2 is:

    and to w3 is:

    and in the time domain the excitation sources would be:

    So the total response is:

    and here these are all sine responses because the excitations were all sines, but now we know (after computing the magnitude and phase shift of each one) the time domain response too, because we know they are all sines. So applying this to the known kind of response we get:

    The low pass filter acts on each frequency in turn, and the output is the superposition of each response. Since each input was a sine, the individual outputs must be sines too, and if we know the magnitude and phase shift of each individual response, we can apply that to the known type which is sine. So it's not like we are modifying the input, it's more like we are just creating the output responses based on the known input type, where sines and constants are special cases.

    Note that doing one sine input is much more clear. That one sine input creates a sine output, and we just have to compute the magnitude and phase response to know what the output will look like, and because of linearity the output must be a sine too, therefore we can write the output as if we knew the shape of the response beforehand (and we really do assume this, not so much that we steal the input to use over again).
    In the more typical way this is used, we dont even mention the sines at first. We just state the input magnitude, say 2v peak, at say 1kHz. We then use that information in the amplitude and phase shift equations for the low pass filter, and we get an output magnitude and phase shift. Let's say we get 1.1v peak and 1 rad lag phase shift. We could immediately write this as (knowing it is a sine wave):
    Vout=1.1 volts peak, 1 rad phase shift

    or we could use the assumed time domain output shape:

    so you see this is really quite simple.
    Last edited: Jun 8, 2016
  5. jag1972

    Thread Starter Active Member

    Feb 25, 2010
    Thank you very much MrAl for your time and excellent explaination. It was easiar than I thought. I was looking to tackle the problem in a more general way and not taking advantage of the constant and sine term properties.
    I wanted to take the Z transform of the input X(Z) then multiply H(Z) by X(Z) as Y(Z)=X(Z).H(Z), then take the inverse of the Z transform using partial fractions.

    Thanks again.

  6. MrAl

    Well-Known Member

    Jun 17, 2014
    Hi again,

    Ok, then what is the problem? You can still use superposition.

    You can take the z transform of each term, multiply by the H(z), sum the results, then take the inverse transform, or perhaps take the inverse transform before the sum.

    For example, for a general single cosine term and your given H(z) we get the convolution result:

    So see what you can do with that.