Question

Realize signal processing systems described by the difference equation: y1(n)=1/2 [x(n)+x(n-1)] and y2(n)=1/2 [x(n)-x(n-1)] using Matlab. Assuming same input signal x(n)=sin(ωn) for various values of...

Realize signal processing systems described by the difference equation: y1(n)=1/2 [x(n)+x(n-1)] and y2(n)=1/2 [x(n)-x(n-1)] using Matlab. Assuming same input signal x(n)=sin(ωn) for various values of ω ={0,/6, ,3/2, 1.9/2} applied to both systems find the following: Obtain stem plots of y1(n) and y2(n) in each case. (15 Marks) Critically analyze y1(n) and y2(n) in terms of type of filter, maximum gain and cut off frequency. (Hint : The system can be tested by computing frequency response of the system).

0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB code is given below.

clc;
close all;
clear all;

% define w
w = [0 pi/6 3*pi/2 1.9*pi/2];

% define n
n = 1 : 50;

% define x1 and x2 and compute y1 and y2 using for loop for
% different values of w

for k = 1:length(w)
  
% define x1 and x2
x1 = sin(w(k)*n);
x2 = cos(w(k)*n);
  
% now compute y1 and y2
y1 = 0.5*([zeros(1,length(x1)+1) x1]+[fliplr(x1) zeros(1,length(x1)+1)]);
y2 = 0.5*([zeros(1,length(x1)+1) x1]-[fliplr(x1) zeros(1,length(x1)+1)]);
  
% now plot the signals
figure;
subplot(211);

stem(-max(n):max(n),y1,'fill'); grid on;
xlabel('n');ylabel('Amplitude');title(['y1[n] for w = ',num2str(w(k))]);
  

subplot(212);
stem(-max(n):max(n),y2,'fill'); grid on;
xlabel('n');ylabel('Amplitude');title(['y2[n] for w = ',num2str(w(k))]);
end

The plots are given below

yi [n] for w = 0 0.5 -0.5ト 50 40 30 -20 -10 0 10 2030 40 50 y2[n] for w = 0 0.5 0.5 50 40 30 20 1010 20 30 0 50y1In] for w 0.5236 0.5 0.5 50 40 30 20 1010 20 30 40 50 y2[n] for w 0.5236 0.5 -0.5 50 40 30 20 10 10 20 30 0 50y1[n] for w 4.7124 0.5 0.5* 50 40 32010 0 10 20 304 50 y2[n] for w4.7124 0.5 -0.5 50 40 30 20 10 0 10 20 30 50y1In] for w 2.9845 0.5 0.5 50 40 30 20 1010 20 30 40 50 y2[n] for w 2.9845 -0.5 50 40 30 20 1010 20 30 0 50

from the above fiures it is observed that y1[n] is symmeric about y axis which means that y1[n] is an even part of the signal x1. likewise y2[n] is anti-symmeric about y axis which means that y2[n] is an odd part of the signal x1

Add a comment
Know the answer?
Add Answer to:
Realize signal processing systems described by the difference equation: y1(n)=1/2 [x(n)+x(n-1)] and y2(n)=1/2 [x(n)-x(n-1)] using Matlab. Assuming same input signal x(n)=sin(ωn) for various values of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Realize the system which generates the output y1(n)-1/2 [x(n)+x(-n)] and y2(n)-1/2 [x(n)-x(-n)] using matlab. By generating signals xl(n)-sin(on) and x2(n)-cos(on) for various values of o-[0,/6,...

    Realize the system which generates the output y1(n)-1/2 [x(n)+x(-n)] and y2(n)-1/2 [x(n)-x(-n)] using matlab. By generating signals xl(n)-sin(on) and x2(n)-cos(on) for various values of o-[0,/6, ,3Tt/2, 1.9T/2) obtain 3. a) Output yl(n) and y2(n) b) Critically analyze the system outputs y 1 (n) and y2(n) and find out the type of filter obtained. Realize the system which generates the output y1(n)-1/2 [x(n)+x(-n)] and y2(n)-1/2 [x(n)-x(-n)] using matlab. By generating signals xl(n)-sin(on) and x2(n)-cos(on) for various values of o-[0,/6, ,3Tt/2, 1.9T/2)...

  • Need help With my Digital Signal Processing homework (Problem 2) d. Realize the block diagram of...

    Need help With my Digital Signal Processing homework (Problem 2) d. Realize the block diagram of the system in Direct Form I and Dir (Canonical Form) Question 2: Find the overal impulse response of following system? y1(n) a utn) u(n-1) X(n) yín) an u(n) 8(n-2) Y2(n) Question 3: A digital reverberation processor has frequency response: - 0.5 +eja8 H(@)

  • If the input to the system described by the difference equation y(n+1) (1/2)x(n+) -x(n) is a)...

    If the input to the system described by the difference equation y(n+1) (1/2)x(n+) -x(n) is a) Does it matter what are the initial conditions for nc0 in order to find y(n) for n20? Explain your b) x(n) -u(n) answer. (3 points). Determine the transfer function H(z) and the Frequency Response (H(est) (10 points). Find the amplitude lH(epT)I and the phase He*') as a function of co. Evaluate both for normalized frequency ω T=z/4. ( 10 points) c) Find the steady...

  • please write code in MATLAB as well 5. (12 points) Create the following signal in Matlab:...

    please write code in MATLAB as well 5. (12 points) Create the following signal in Matlab: x[n] = u(n) - u[n-6] a. Mathematically compute yi[n] = x[n] * x[n] where * means convolution. Now use the conv command to perform the convolution. Graph x[n) and the resulting y(n), both over the interval Osns 20. How many non-zero terms does y(n) have? Does your computational result agree with the Matlab result? b. Repeat a. but this time with yz[n] = x[n]*h[n)...

  • For the causal filter below y(n) x(n) -20 eja 1-0.8e10 Write the difference equation(show the equation...

    For the causal filter below y(n) x(n) -20 eja 1-0.8e10 Write the difference equation(show the equation clearly and define coefficients) Give and plot the frequency response magnitude (show the equation clearly) Compute and plot the impulse response using MATLAB d a. b. c. Use MATLAB to determine steady state response due to x(n)-u(n) Write a MATLAB program to compute and plot the frequency response of the overall system. Give plots in dB and the program e. For the causal filter...

  • For the causal filter below y(n) x(n) -20 eja 1-0.8e10 Write the difference equation(show the equation...

    For the causal filter below y(n) x(n) -20 eja 1-0.8e10 Write the difference equation(show the equation clearly and define coefficients) Give and plot the frequency response magnitude (show the equation clearly) Compute and plot the impulse response using MATLAB d a. b. c. Use MATLAB to determine steady state response due to x(n)-u(n) Write a MATLAB program to compute and plot the frequency response of the overall system. Give plots in dB and the program e. For the causal filter...

  • For the causal filter below x(п) y(n) -2j0 1 -0.8e 2j0 Write the difference equation(show the...

    For the causal filter below x(п) y(n) -2j0 1 -0.8e 2j0 Write the difference equation(show the equation clearly and define coefficients) а. b. Give and plot the frequency response magnitude (show the equation clearly) Compute and plot the impulse response using MATLAB Use MATLAB to determine steady state response due to x(n)=u(n) c. d. Write a MATLAB program to compute and plot the frequency response of the overall system. Give plots in dB and the program e. For the causal...

  • Styles Paragraph 6. Given the difference equation y(n)-x(n-1)-0.75y(n-1)-0.125(n-2) a. Use MATLAB function filterl) and filticl) to...

    Styles Paragraph 6. Given the difference equation y(n)-x(n-1)-0.75y(n-1)-0.125(n-2) a. Use MATLAB function filterl) and filticl) to calculate the system response y(n)for n 0, 1, 2, 3, 4 with the input of x(n (0.5) u(n)and initial conditions x(-1)--1, y(-2) -2, and y(-1)-1 b. Use MATLAB function filter!) to calculate the system response y(n) for n-0, 1, 2, 3,4 with the input of x(n) (0.5)"u(n)and zero initial conditions x(-1)-0, (-2)-0, and y(-1)-0 Design a 5-tap FIR low pass filter with a cutoff...

  • Hi This is linear systems and digital signal processing. Please answer this question with clean h...

    Hi This is linear systems and digital signal processing. Please answer this question with clean handwriting. Label the answer n 29 Question 11 of 23 s Moving to another question will save this response. Question 11 1 points Save Answer Consider a fiter characterized by the following impulse response: h-[1.2,-1, 1] Which of the following statements are true about thie the sampling frequency in this application is 8192 Hz. (You may use MATLAB to help you analyze this filter) 1....

  • consider the signal using matlab Problem 2: Consider a signal: x[n] 3cos(n7/3) + 2sin(nt/4)+ cos(n7/5) Using...

    consider the signal using matlab Problem 2: Consider a signal: x[n] 3cos(n7/3) + 2sin(nt/4)+ cos(n7/5) Using Matlab, (1) Plot this signal in time domain. Can you identify the various frequencies in this signal? Use n 0:1:1000 (2) Plot this signal in frequency domain using the "fft" command. Identify the individual frequencies in the plot. (3) Calculate the frequencies of these signals. In the frequency plot, 1000 2

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT