Question

In: Electrical Engineering

Let x[n] = cos(17?n 64 ) + 2sin(23?n 32 ) for 0 ? n ? 255,...

Let x[n] = cos(17?n 64 ) + 2sin(23?n 32 ) for 0 ? n ? 255, and 0 otherwise. The signal x[n] is passed through an LTI system with transfer function H(z) = (1? 1 2z?1)(1? 1 3z?1). Denote the signal at the output of the system by y[n]. We want to recover x[n] by passing y[n] through an inverse system.

(a) Find (analytically) an impulse response g[n] of the inverse system, G(z) = 1 H(z). (Note: the inverse system is an IIR system.)

(b) Apply a rectangular window of length M = 8, w[n] =( 1 0 ? n ? 7, 0 otherwise, to obtain an FIR ?lter r[n] = g[n]·w[n]. Please plot the frequency response of the FIR ?lter. Compare it with the frequency response of the IIR inverse system Is M = 8 an appropriate choice?

(c) Compute ˆ x[n] = r[n]?y[n]. Plot x[n], y[n], and ˆ x[n]?x[n].

Solutions

Expert Solution

clc;
close all;
clear all;
n = [0:1:255]; % number of samples
xn = cos(((17*pi)/64).*n)+2*sin(((23*pi)/32).*n); %defining signal x[n]
b1 = [1 -0.833 0.166]; %Numerator coefficients of FIR filter H(z)
a1 = 1; % denominator coefficients of FIR filter H(z)
yn = filter(b1,a1,xn); % passing x[n] signal through filter H[n] gives y[n]
b = [1 0.833 0.527 .3 .162 .085 .0441 .022]; % Numerator filter coefficients of FIR filter r[n]
a = 1; % denominator coefficients of FIR filter r[n]
xhat = filter(b,a,yn); % passing y[n] signal through filter r[n] gives xhat[n]
figure %plotting x[n] y[n] xhat[n] xhat-x
subplot(2,2,1)
plot(xn,'-bs',...
'LineWidth',2,...
'MarkerSize',2,...
'MarkerFaceColor',[0,0,1])
grid on;
ylabel('xn');
subplot(2,2,2)
plot(yn,'-bs',...
'LineWidth',2,...
'MarkerSize',2,...
'MarkerFaceColor',[0,0,1])
grid on;
ylabel('yn');
subplot(2,2,3)
plot(xhat,'-bs',...
'LineWidth',2,...
'MarkerSize',2,...
'MarkerFaceColor',[0,0,1])
grid on;
ylabel('xhat');
subplot(2,2,4)
plot(xhat-xn,'-bs',...
'LineWidth',2,...
'MarkerSize',2,...
'MarkerFaceColor',[0,0,1])
grid on;
ylabel('xhat-xn');

%end of code

output:


Related Solutions

Solve cos^2(x)-cos(x)=0 for x,
Solve cos^2(x)-cos(x)=0 for x,
The genome of an organism was analyzed and provided the following: 17%A, 23%G, 32%C, 0%T, and...
The genome of an organism was analyzed and provided the following: 17%A, 23%G, 32%C, 0%T, and 28%U. This organism is likely: A virus A virus or a bacterium A bacterium A bacterium or a eukaryote A eukaryote It cannot be calculated based on that number alone
For the given function f(x) = cos(x), let x0 = 0, x1 = 0.25, and x2...
For the given function f(x) = cos(x), let x0 = 0, x1 = 0.25, and x2 = 0.5. Construct interpolation polynomials of degree at most one and at most two to approximate f(0.15)
Prove that 1+ cos theta + cos 2theta + .... cos ntheta = 1/2 + (sin(n+1/2)theta)/2sin(theta/2)
Prove that 1+ cos theta + cos 2theta + .... cos ntheta = 1/2 + (sin(n+1/2)theta)/2sin(theta/2)
Let f(x, y) = − cos(x + y2 ) and let a be the point a...
Let f(x, y) = − cos(x + y2 ) and let a be the point a = ( π/2, 0). (a) Find the direction in which f increases most quickly at the point a. (b) Find the directional derivative Duf(a) of f at a in the direction u = (−5/13 , 12/13) . (c) Use Taylor’s formula to calculate a quadratic approximation to f at a.
Let f(x) = {(C/x^n if 1≤ x <∞; 0 elsewhere)} where n is an integer >1....
Let f(x) = {(C/x^n if 1≤ x <∞; 0 elsewhere)} where n is an integer >1. a. Find the value of the constant C (in terms of n) that makes this a probability density function. b. For what values of n does the expected value E(X) exist? Why? c. For what values of n does the variance var(X) exist? Why?
y(x)= C1e2x +C2e-x +C3Cos(x)+C4Sin(x)-4x5+10x4+20x3+30x2-450x+255 ?(0) = ? ′(0) = ? ′′(0) = ?''' (0) = 0...
y(x)= C1e2x +C2e-x +C3Cos(x)+C4Sin(x)-4x5+10x4+20x3+30x2-450x+255 ?(0) = ? ′(0) = ? ′′(0) = ?''' (0) = 0 Find the solution to the initial value problem by plugging in the initial conditions to the general solution. a. Find ? ′(?), ? ′′(?), and ? (3) (?). Make sure to calculate for both pieces of the general solution. b. Plug in initial condition and find system of coefficients. c. Solve the system of coefficients. (If you find this problem in the text, the...
Let X ~ N(190; 23). Find: (a) P(X <= 213) (b) P(148 < X < 202)...
Let X ~ N(190; 23). Find: (a) P(X <= 213) (b) P(148 < X < 202) (c) The first quartile for X (d) The third quartile for X (e) the IQR for X (f) P(|X-190|> 34
Consider a discrete-time periodic signal x [ n ]   =   cos ( 0 . 7 πn ) (1)...
Consider a discrete-time periodic signal x [ n ]   =   cos ( 0 . 7 πn ) (1) Determine the fundamental period of x[n]. (2) Suppose x[n] is obtained by sampling the continuous-time signal  x ( t )   =   cos   ( πt ), by letting the sampling period to be T s =   0 . 7 and considering the sample values at each n. Is the Nyquist sampling conditions satisfied in this case? Explain and relate this to the answer given before. (3) Under that conditions would...
Let A be an n × n matrix which is not 0 but A2 = 0....
Let A be an n × n matrix which is not 0 but A2 = 0. Let I be the identity matrix. a)Show that A is not diagonalizable. b)Show that A is not invertible. c)Show that I-A is invertible and find its inverse.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT