Digital Signal Processing

The Frequency Response of a discrete LTI system

The Discrete-Time Fourier Transform of an impulse response is called The Frequency Response (or The Transfer Function) of an LTI system.

We early stated that the Fourier Transform representation is the most useful signal representation for LTI systems (The Discrete-Time Fourier Transform). That is true due to the following reason:

RESPONSE TO A COMPLEX EXPONENTIAL ejωon

Let ejωon be the input to an LTI system represented by the impulse response h[n]:

Then:

Definition:

FREQUENCY RESPONSE: The Discrete-Time Fourier Transform of an impulse response is called The Frequency Response (or The Transfer Function) of an LTI system and is denoted by:

In consequence, if x[n] is the input to an LTI system:

The system can be represented by:

Note. This is equivalent to write:

and the output y[n] is as follows:

Hence, the output sequence is the input sequence modified by the response of the system at frequency ω0. This justifies the definition of H[e] as the frequency response because it is what the complex exponential ejωon is multiplied by to obtain the output y[n]. This is a powerful result that can be extended to a linear combination of complex exponentials using the linearity of LTI systems:

Response to sinusoidal sequences

Equation (2) is also a powerful result because of the way it facilitates a faster determination of output to any very-used signal capable of being represented by a combination of complex exponentials, such as sinusoidal sequences. Take the case of the following x[n] being an input to an LTI system h[n]:

You already know how to use Euler to represent x[n] in this case as a combination of complex exponentials. So, we can get directly to what we want to point out, the power of equations (2) and (3) to faster knowledge of the output y[n]:

In general, the frequency response  is a complex function of ω. This means that it has a magnitude and a phase. In other words, can be represented as a fasor:

In consequence:

Example 1

Determine the output y[n] of a LTI system described by its Impulse Response h[n], when the input is x[n]:

Plot amplitude and phase of the Frequency Response H[e].

Solution:

Using equation (1) we obtain the Frequency Response H[e] of the system:

To use equation 3.1, we can obtain amplitude and phase of H[e]:

In consequence:

Plotting amplitude and phase of H[e] in Matlab, we use the following script:

w=[0:1:500]*pi/500; % [0,pi] axis divided into 501 points H=exp(i*w)./(exp(i*w)-0.9*ones(1,501));
magH=abs(H); angH=angle(H);
plot(w/pi,magH);grid;
xlabel(‘Frequency in pi units’);
ylabel(‘|H[e^jω ]|’);
title (‘Magnitude of |H[e^jω ]|’);

w=[0:1:500]pi/500; % [0,pi] axis divided into 501 points H=exp(iw)./(exp(iw)-0.9ones(1,501));
magH=abs(H); angH=angle(H);
plot(w/pi,angH);grid;
xlabel(‘Frequency in pi units’);
ylabel(‘<H[e^jω’);
title (‘Angle of H[e^jω ]’);

Response to Arbitrary Sequences

Finally, Equation (2) can be applied to any arbitrary absolutely summable sequence. Suppose an arbitrary sequence x[n] and its DTFT X[e]. Take any system described by its Transfer Function H[e], then the response y[n]  of this system to the input x[n]  can be obtain by applying the IDTFT (inverse discrete-time Fourier transform) to Y[e], where Y[e]  is:

Therefore, any LTI system can be represented in the frequency domain by the following diagram:

The consequences of equation (5) is Monumental in Engineering !!! And from there, we get to Laplace Transform in continuous time and Z-Transform in discrete time.

The Z-Transform is a powerful tool that will allow us to avoid integral operations which is needed to determine the IDTFT of Y[e].  That is, we can obtain y[n] in a simpler algebraic way.

Next: The Z-Transform

Previous: The Discrete-Time Fourier Transform

De la Transformada de Laplace y la Transformada de Fourier

A menudo se argumenta que la Transformada de Laplace es una herramienta excesivamente teórica y poco intuitiva, ya que implica una integración en el plano complejo y convierte una señal de variable real (el tiempo continuo) en una transformada de variable compleja (la variable s). Es decir, para representar la misma información es necesario utilizar dos variables en el dominio de Laplace, la parte real de s y la parte imaginaria de s, en lugar de solo una, tal y como se hace en el dominio temporal. A primera vista, no hay una razón evidente que justifique la necesidad de utilizar dos variables y ello hace que surjan alternativas para comprimir la redundancia que contiene la Transformada de Laplace y volverla a reducir a una sola dimensión. Una de estas alternativas se basa en la función exponencial est, que, como ya sabemos, presenta la propiedad de ser una autofunción de los sistemas LIT analógicos. Es decir, al excitar la entrada de un sistema analógico LIT de respuesta impulsional ℎ(𝑡) con la señal 𝑥(𝑡)= est, el sistema presenta una señal 𝑦(𝑡) a su salida dada por:

Dónde H(s)  es la función de transferencia del sistema. El resultado anterior muestra cómo la señal exponencial que hay en la entrada vuelve a aparecer en la salida acompañada de un factor de escala, dado por la función de transferencia, el cual resume el comportamiento del sistema en función de la variable compleja s.

De entre todas las posibles señales exponenciales, hay una de ellas que es de especial interés para nosotros y que no es otra que la señal exponencial compleja: esto es, e jωt, en donde se ha llevado a cambio el cambio de variable s=𝒋ω . Este cambio es interesante porque la señal exponencial compleja tiene un significado físico más tangible, al poder ser interpretada como un fasor en el plano complejo rotando a una velocidad angular constante ω, cuya proyección en los ejes real e imaginario da lugar a las funciones cos(ω𝒕) y sen(ω𝒕), respectivamente. Estas señales co/sinusoidales son fácilmente generables en un laboratorio y corresponden, haciendo un símil acústico, a tonos de frecuencia pura.

Esto hace que, de todo el plano complejo definido por la variable de Laplace s, en la práctica nos interese restringirnos al caso s=𝒋ω. Esta particularización no solo hace más intuitivo el análisis en el dominio transformado a partir del uso de exponenciales complejas, sino que, además, reduce la Transformada de Laplace a una nueva transformada de una sola variable, ω.

Source:

  • Digital Signal Processing Using Matlab, 3erd ed
  • Fundamentos_de_Señales_y_Sistemas_usando la Web y Matlab
  • Oppenheim – Señales y Sistemas
  • Análisis de Sistemas Lineales Asistido con Scilab – Un Enfoque desde la Ingeniería Eléctrica.

You can also be interested in:

Literature review by:

Prof. Larry Francis Obando – Technical Specialist – Educational Content Writer

Exercises are solved!!

WhatsApp:  +34633129287  Inmediate Attention!!

Twitter: @dademuch

Copywriting, Content Marketing, Tesis, Monografías, Paper Académicos, White Papers (Español – Inglés)

Escuela de Ingeniería Electrónica de la Universidad Simón Bolívar, USB Valle de Sartenejas.

Escuela de Ingeniería Eléctrica de la Universidad Central de Venezuela, UCV Caracas.

Escuela de Turismo de la Universidad Simón Bolívar, Núcleo Litoral.

Contacto: España. +34633129287

Caracas, Valladolid, Quito, Guayaquil, Jaén, Villafranca de Ordizia. 

WhatsApp:  +34633129287   

Twitter: @dademuch

FACEBOOK: DademuchConnection

email: dademuchconnection@gmail.com

Digital Signal Processing

Convolution in Discrete-Time – Matlab

The output y[n] of a particular LTI-system can be obtained by:

The previous equation is called Convolution between discrete-time signals x[n] and h[n].

By convention, the convolution between x[n] and h[n] is expressed as follows:

Example 1. 

Let the following rectangular pulse x[n] be an input to an LTI system with impulse response h[n]:

Determine the output y[n] of the system.

Solution:

In Elementary sequences we have designed a function stepseq for plotting the unit step function in discrete time, or any combination as example 1. Next Script allows plotting x[n].

n=[0:40];
x=stepseq(0,0,40)-stepseq(10,0,40);
stem(n,x)
xlabel(‘n’); ylabel(‘x[n]’)

Figure 1. Input sequence x[n], example 1.

Next Script allows plotting h[n].

n=[0:40];
h=(0.9).^n;
stem(n,h)
xlabel(‘n’); ylabel(‘h[n]’)

Figure 2. Impulse response h[n] for system in example 1.

Now, we use conv Matlab function to determine y[n]:

y=conv(x,h);
n=[0:80];
stem(n,y);
xlabel(‘n’); ylabel(‘y[n]’)

Figure 3. Output sequence y[n]=x[n]*h[n] for example 1.

Another approach is by using the filter function (see Solving discrete-time differential equations):

n=[0:40];
x=stepseq(0,0,40)-stepseq(10,0,40);
h=(0.9).^n;
y=filter(h,1,x);
stem(n,y)
xlabel(‘n’); ylabel(‘y[n]’)
grid

What yields:

Figure 4. Output sequence y[n]=x[n]*h[n] for example 1.

There is a difference in the outputs of these two implementations that should be noted. As you can see in Figure 3, the output sequence from conv(x,h) function has a longer length than both x[n] and h[n] sequences. On the other hand, the output sequence from the filter(h,1,x) function in Figure 4 has exactly the same length as the input x[n] sequence. In practice, the use of the filter function is encouraged.

Watch out: The filter function can be used to compute the convolution indirectly. That was possible because of the impulse response in example 1 was a one-side exponential sequence for wich we could determine a difference equation representation. Not all infinite-lenght impulse responses can be converted into difference equations.

Analytical Convolution

We can do the convolution of x[n] and h[n] Analytically:

Applying the given equation for convolution:

We now use an expression for the sum of any finite number of terms of a geometric series (The Geometric Series in DSP), and that is given by:

So, we can express equation (1) as follows:

Equation (3) is almost a geometric series sum as equation (2) except that the terms u(n-k) takes different values depending on n and k. There are three possible conditions under u(n-k) which can be evaluated:

Case 1. n<0. Then u(n-k)=0 for 0 k 9. In consequence:

Case 2. In this case the nonzero values of and do not overlap. So, for 0n<9 then u(n-k)=1 for 0kn. In consequence:

Applying formula of equation (2):

Case 3. In this case the impulse response h[n] partially overlap the input x[n]. So, for 9 n. Then u(n-k)=1 for 0 k 9. In consequence:

In this last case h[n] completely overlaps the input x[n].

Graphical method

We can also use a graphical method as in the following example.

Example 2

The input signal x[n] to an LTI system with impulse response h[n]:

Determine graphically y[n] through:

La imagen tiene un atributo ALT vacío; su nombre de archivo es null-63.png

Solution:

Sequences x[k] and h[n-k], and the convolution of both signals can be seen as follows:

We can also use convolution properties as follows.

Example 3
Convolution Properties.

Other interesting properties are:

With an input x[n], the response of a LTI system y[n] is:

The impulse response h[n] of the system is:

Determine x[n]. Choose the right answer from:

Solution:

Considering:

We express the impulse response in terms of displaced Dirac deltas:

If we select:

Then:

So right answer is letter a). Demonstration: Using the previous equation, Let´s plot y[n] in Matlab.

The impulse response h[n] and option a) for input x[n] can be plotting in Matlab using:

n=[-3:10];
h=stepseq(0,-3,10)-stepseq(4,-3,10);
stem(n,h)
xlabel(‘n’); ylabel(‘h[n]’)

Figure 5. Impulse response h[n] for system in example 3.

n=[-3:10];
x=stepseq(-3,-3,10)-stepseq(1,-3,10);
stem(n,x)
xlabel(‘n’); ylabel(‘x[n]’)

Figure 6. Input signal x[n] for system in example 3.

Now, y[n] can be plotting by using:

n=[-3:10];
h=stepseq(0,-3,10)-stepseq(4,-3,10);
x=stepseq(-3,-3,10)-stepseq(1,-3,10);
x1=stepseq(-2,-3,10)-stepseq(2,-3,10);
x2=stepseq(-1,-3,10)-stepseq(3,-3,10);
x3=stepseq(0,-3,10)-stepseq(4,-3,10);
y=x+x1+x2+x3;
stem(n,y)

Figure 7. Output sequence y[n] for example 3.

Which we would also have been able to get by using:

La imagen tiene un atributo ALT vacío; su nombre de archivo es null-64.png

n=[-3:10];;
h=stepseq(0,-3,10)-stepseq(4,-3,10);
x=stepseq(-3,-3,10)-stepseq(1,-3,10);
y=conv(h,x);
n=[0:26];
stem(n,y)
xlabel(‘n’); ylabel(‘y[n]’)

Figure 8. Output sequence y[n]=x[n]*h[n] for example 3.

NEXT:

Source:

  • Digital Signal Processing Using Matlab, 3erd ed
  • Fundamentos_de_Señales_y_Sistemas_usando la Web y Matlab
  • Oppenheim – Señales y Sistemas
  • Análisis de Sistemas Lineales Asistido con Scilab – Un Enfoque desde la Ingeniería Eléctrica.

Literature review by:

Prof. Larry Francis Obando – Technical Specialist – Educational Content Writer

Exercises are solved!!

WhatsApp:  +34633129287  Inmediate Attention!!

Twitter: @dademuch

Copywriting, Content Marketing, Tesis, Monografías, Paper Académicos, White Papers (Español – Inglés)

Escuela de Ingeniería Electrónica de la Universidad Simón Bolívar, USB Valle de Sartenejas.

Escuela de Ingeniería Eléctrica de la Universidad Central de Venezuela, UCV Caracas.

Escuela de Turismo de la Universidad Simón Bolívar, Núcleo Litoral.

Contacto: España. +34633129287

Caracas, Quito, Guayaquil, Jaén. 

WhatsApp:  +34633129287   

Twitter: @dademuch

FACEBOOK: DademuchConnection

email: dademuchconnection@gmail.com