Question

In: Physics

Realize signal processing systems described by the difference equation: ?1(?)=1/2 [?(?)+?(?−1)] and ?2(?)=1/2 [?(?)−?(?−1)] using Matlab....

Realize signal processing systems described by the difference equation: ?1(?)=1/2 [?(?)+?(?−1)] and ?2(?)=1/2 [?(?)−?(?−1)] using Matlab. Assuming same input signal x(n)=sin(ωn) for various values of ω ={0,p/6 ,3p/2, 1.9p/2} applied to both systems find the following: a. Obtain stem plots and codes of y1(n) and y2(n) in each . b. 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).

Solutions

Expert Solution

Solution:

Given that

EXECUTABLE CODE:

  

clc;


clear all;


close all;

% first define w


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

% define n


n = 0:100;

% define system 1 and system 2


num1 = [12 12];


den1 = 1;

num2 = [12 -12];


den2 = 1;

% filtering for various w


for k = 1:length(w)


x = sin(w(k)*n);


% now filter the signal with filter #1


y1 = filter(num1,den1,x);

% now filter the signal with filter #2


y2 = filter(num2,den2,x);

% now plot the filtered signals


figure;


subplot(211);


stem(n,y1);xlabel('n');


title(['filtered signal from system 1 for w = ',num2str(w(k))]);

subplot(212);


stem(n,y2);xlabel('n');


title(['filtered signal from system 2 for w = ',num2str(w(k))]);

end

% Now plot the frequency responses of the filteres


figure;


freqz(num1,den1);grid on;


title('frequency response the filter 1');

figure;


freqz(num2,den2);grid on;


title('frequency response the filter 2');

OUTPUT:


Related Solutions

USING MATLAB In signal processing applications, the Hankel matrix is useful. The elements of a (N...
USING MATLAB In signal processing applications, the Hankel matrix is useful. The elements of a (N × N) Hankel matrix are given by h?? =0   ?+?−1>? =?+?−1 otherwise Write a script that takes as input from the user an integer, n. Your code should accept input ≥1 and <10. The user should be repeatedly prompted until acceptable input is entered. Next, create n Hankel matrices for N=1,2,...,n. That is, if the user enters 4, you’ll generate 1×1, 2×2, 3×3, and...
By using MATLAB 1. Divide a speech signal or music signal into frames of size N...
By using MATLAB 1. Divide a speech signal or music signal into frames of size N = 64. 2. Compute the N?point DFT of each frame. 3. Save only first L = 20 DFT coefficients. 4. Reconstruct the frame from these L coefficients. (Do not disturb the symmetry of DFT during inverse DFT computation. X[k] = X[N ?k] for real signals, N = 64 here. Pad zeros for missing DFT coefficients.) 5. Comment on the quality of reconstructed and the...
Need explanation of MATLAB code which creates echo. (SIGNAL PROCESSING) If the original audio signal is...
Need explanation of MATLAB code which creates echo. (SIGNAL PROCESSING) If the original audio signal is x(t) then the echo is y(t) = x(t) + alpha*x(t-delay) This code below creates this echo however I don't understand how every line of the code works, could someone comment this code so I can understand? [x,Fs] = audioread('Hallelujah.wav'); sound(x,Fs); delay = 0.5; % 0.5s delay alpha = 0.65; % echo strength D = delay*Fs; y = zeros(size(x)); y(1:D) = x(1:D); for i=D+1:length(x) y(i)...
Topic: Introduction to Convolution Software used : Matlab Course : Signal and Systems Lab 1. a)...
Topic: Introduction to Convolution Software used : Matlab Course : Signal and Systems Lab 1. a) Make the flowchart or pseudo code for convolution. b) Implement convolution in MATLAB.    Hint: Make a function using the format: function result = myconv (a,b)             Where a and b are input matrix and result is convolution answer. c) Compare it with conv command. 2. Let input signal x be [1, 3, –2, 4, -1] and the system h be [-2, 3, 4,...
The signal output from a certain process in an industry is described by the following equation...
The signal output from a certain process in an industry is described by the following equation h (t) = 5 cos 2π1000 t + 7 cos 2π 2000 t + 2 cos 2π 3000 t. Suggest any two remedial measures to avoid any problems that occurred during the reconstruction process.
Expert Systems Case Study- 1: Diagnosing Heart Diseases by Signal Processing   Learning Objectives: • Know the...
Expert Systems Case Study- 1: Diagnosing Heart Diseases by Signal Processing   Learning Objectives: • Know the concepts behind and application of genetic algorithm Agent-based simulation helps Analyze Spread of a Pandemic Outbreak Auscultation is the science of listening to the sounds of internal body organs, in this case the heart. Skilled experts can make diagnoses using this technique. It is a noninvasive screening method of providing valuable information about the conditions of the heart and its valves, but it is...
1.) Explain the difference between a time domain signal and a frequency domain signal. 2.) When...
1.) Explain the difference between a time domain signal and a frequency domain signal. 2.) When would you select the frequency domain signal over the time domain signal.
In matlab using a RC low pass filter Create a 1 Hz input signal (with amplitude...
In matlab using a RC low pass filter Create a 1 Hz input signal (with amplitude of one). Corrupt the input signal with signals greater than or equal to 100 Hz and/or random noise. Use randn(length(v_in,1)) to test filter
1.Explain the difference between file-oriented transaction processing systems and relational database systems. Discuss the advantages and...
1.Explain the difference between file-oriented transaction processing systems and relational database systems. Discuss the advantages and disadvantages of each system. 2. What is the difference in logical view and physical view? 3. Describe the differences between the data definition language (DDL), data manipulation language (DML), and the data query language (DQL). 4. Describe a data dictionary. 5. Explain the relational database data model.
Solve using the same approach as the solution using Matlab for this differential equation d^2y/dt^2 +...
Solve using the same approach as the solution using Matlab for this differential equation d^2y/dt^2 + 6dy/dt + 9y = cos(t) has initial conditions y(0)=1 y'(0)=2, Find Y(s) and without finding y(t), determine what function of time will appear in the solution %} clear, clc syms Y s t real rhs = laplace(cos(t),t,s) eqn1 = s^2*Y - s*2 - 1 + 6*s*Y -1 + 9*Y ==rhs myanss = solve(eqn1,Y) mypart = partfrac(myanss,'FactorMode','real') %{ mypart = (0.08*s + 0.06)/(s^2 + 1.0)...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT