The LTI system xn hn yn stdnoise 03 omega 3 t 50025 noise randnsizet stdnoise x

The lti system xn hn yn stdnoise 03 omega 3 t 50025

This preview shows page 37 - 41 out of 41 pages.

% The LTI system: x[n] --> h[n] --> y[n] std_noise = 0.3; omega = 3; t = -5:0.02:5; noise = randn(size(t)) * std_noise; x = cos(omega * t) + noise; h = [1 1 0.7 0.3]; % Impulse response (lowpass filter) h = h / norm(h, 1); % some normalization y = conv(x, h); y = y(1:length(t)); figure(1), subplot(3, 1, 1), plot(t, x, 'linewidth' , 1.0); ylabel(sprintf( 'x = cos(%2.1f t)' , omega)); xlabel( 't' ); subplot(3, 1, 2), plot(t, y, 'linewidth' , 1.0); ylabel( 'y=h*x' ); xlabel( 't' ); w = -pi:0.02:pi; H = zeros(size(w)); % frequency response e_jn = exp(-1i * (0:length(h) - 1)); for i = 1:length(w) w_i = w(i); H_w_i = sum(h .* (e_jn .^ w_i)); % DTFT equation H(i) = H_w_i; end subplot(3, 1, 3), plot(w, abs(H), 'linewidth' , 1.0); ylabel( '|H(\Omega)|' ); xlabel( '\Omega' ); set(gca, 'XTick' , [-pi, 0, pi]); set(gca, 'XTickLabel' , { '-\pi' , '0' , '\pi' }); Low pass filter [Online Matlab]
Image of page 37

Subscribe to view the full document.

Demo – Filtering using Matlab 28-Mar-19 EIE3001 Sig & Sys, Spring 2019 38 % This script demonstrates time domain and frequency domain % characteristics for a discrete-time filter h[n]. % The LTI system: x[n] --> h[n] --> y[n] std_noise = 0.3; omega = 3; t = -5:0.02:5; noise = randn(size(t)) * std_noise; x = cos(omega * t) + noise; h = [1 -0.8 0.2]; % Impulse response (high pass filter) h = h / norm(h, 1); % some normalization y = conv(x, h); y = y(1:length(t)); figure(1), subplot(3, 1, 1), plot(t, x, 'linewidth' , 1.0); ylabel(sprintf( 'x = cos(%2.1f t)' , omega)); xlabel( 't' ); subplot(3, 1, 2), plot(t, y, 'linewidth' , 1.0); ylabel( 'y=h*x' ); xlabel( 't' ); w = -pi:0.02:pi; H = zeros(size(w)); % frequency response e_jn = exp(-1i * (0:length(h) - 1)); for i = 1:length(w) w_i = w(i); H_w_i = sum(h .* (e_jn .^ w_i)); % DTFT equation H(i) = H_w_i; end subplot(3, 1, 3), plot(w, abs(H), 'linewidth' , 1.0); ylabel( '|H(\Omega)|' ); xlabel( '\Omega' ); set(gca, 'XTick' , [-pi, 0, pi]); set(gca, 'XTickLabel' , { '-\pi' , '0' , '\pi' }); [Online Matlab] FT High pass filter
Image of page 38
Demo – Modulation using Matlab 28-Mar-19 EIE3001 Sig & Sys, Spring 2019 39 % This script demonstrates the time domain and frequency domain % characteristics for a modulation system dt = 0.01; t = -3:dt:3; x = zeros(size(t)); x(t > -0.5 & t < 0.5) = 0.95; f = 10; % Modulation using f = 10 Hz cosine wave omega = 2 * pi * f; c = cos(omega * t); y = x .* c; % time domain signals figure(2), subplot(4, 1, 1), plot(t, x, 'linewidth' , 1.5); ylabel( 'x(t)' ); xlabel( 't [sec]' ); subplot(4, 1, 2), plot(t, y, 'linewidth' , 1.0); ylabel( 'y(t)' ); xlabel( 't [sec]' ); % frequency domain df = 0.1; w = (- 2 * f: df: 2 * f) * (2 * pi); F = exp(-1i * w(:) * t) * dt; X = F * x(:); Y = F * y(:); subplot(4, 1, 3), plot(w/(2*pi), abs(X), 'linewidth' , 1.0); ylabel( '|X(\omega)|' ); xlabel( '\omega / 2\pi [Hz]' ); xlim([-20 20]); subplot(4, 1, 4), plot(w/(2*pi), abs(Y), 'linewidth' , 1.0); ylabel( '|Y(\omega)|' ); xlabel( '\omega / 2\pi [Hz]' ); FT Modulation using 10 Hz sinusoid [Online Matlab]
Image of page 39

Subscribe to view the full document.

Demo - Explanation of the Two-line Code for Fourier Transform 28-Mar-19 EIE3001 Sig & Sys, Spring 2019 40 F = exp(-1i * w(:) * t) * dt; X = F * x(:);
Image of page 40
Summary and Remark ¾ Expected learning outcome Be able to explain the characteristics and issues of ideal filters and several non-ideal filters (e.g., causality, Gibbs phenomenon) Be able to explain the basic concepts of filtering (modifying amplitudes of each exponential components separately) and modulation (moving the spectrum of the signal) Be able to connect these concepts and issues with the mathematical tools we have learned so far (LTI system property, convolution, Fourier transform, convolution/multiplication properties). ¾ Suggested reading: Filtering: Sections 4.5, 5.4 Modulation: Sections 8.0 – 8.4. 28-Mar-19 EIE3001 Sig & Sys, Spring 2019 41
Image of page 41
  • Fall '13

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes