Log Booklet for EE2 Experiments

Similar documents
DFT: Discrete Fourier Transform & Linear Signal Processing

Discrete Fourier Transform (DFT)

LABORATORY - FREQUENCY ANALYSIS OF DISCRETE-TIME SIGNALS

PART I: The questions in Part I refer to the aliasing portion of the procedure as outlined in the lab manual.

Frequency Domain Representation of Signals

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering. EIE2106 Signal and System Analysis Lab 2 Fourier series

The Discrete Fourier Transform. Claudia Feregrino-Uribe, Alicia Morales-Reyes Original material: Dr. René Cumplido

Digital Signal Processing PW1 Signals, Correlation functions and Spectra

Department of Electronic Engineering NED University of Engineering & Technology. LABORATORY WORKBOOK For the Course SIGNALS & SYSTEMS (TC-202)

5.1 Graphing Sine and Cosine Functions.notebook. Chapter 5: Trigonometric Functions and Graphs

ECEn 487 Digital Signal Processing Laboratory. Lab 3 FFT-based Spectrum Analyzer

Lab 4 Fourier Series and the Gibbs Phenomenon

Graphing Sine and Cosine

EE 215 Semester Project SPECTRAL ANALYSIS USING FOURIER TRANSFORM

Lab 3 FFT based Spectrum Analyzer

Electrical & Computer Engineering Technology

Problem Set 1 (Solutions are due Mon )

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar

L A B 3 : G E N E R A T I N G S I N U S O I D S

EE 470 BIOMEDICAL SIGNALS AND SYSTEMS. Active Learning Exercises Part 2

Digital Signal Processing

6.02 Practice Problems: Modulation & Demodulation

EE 422G - Signals and Systems Laboratory

Algebra and Trig. I. The graph of

Synthesis: From Frequency to Time-Domain

Laboratory Assignment 4. Fourier Sound Synthesis

Fourier Transform. Prepared by :Eng. Abdo Z Salah

SAMPLING THEORY. Representing continuous signals with discrete numbers

Linear Time-Invariant Systems

ME 365 EXPERIMENT 8 FREQUENCY ANALYSIS

1. In the command window, type "help conv" and press [enter]. Read the information displayed.

DIGITAL SIGNAL PROCESSING CCC-INAOE AUTUMN 2015

Basic Signals and Systems

Window Method. designates the window function. Commonly used window functions in FIR filters. are: 1. Rectangular Window:

Observation of the Effects of the Fourier Transformation on Periodic Signals ECE 521. Project 2

MATLAB Assignment. The Fourier Series

Fourier transforms, SIM

B.Tech III Year II Semester (R13) Regular & Supplementary Examinations May/June 2017 DIGITAL SIGNAL PROCESSING (Common to ECE and EIE)

ENGR 210 Lab 12: Sampling and Aliasing

Digital Video and Audio Processing. Winter term 2002/ 2003 Computer-based exercises

LAB 2 SPECTRUM ANALYSIS OF PERIODIC SIGNALS

Lecture 17 z-transforms 2

Design of FIR Filters

First, frequency is being used in terms of radians per second which is often called "j*w0". The relationship is as such.

3. Use your unit circle and fill in the exact values of the cosine function for each of the following angles (measured in radians).

Use Matlab Function pwelch to Find Power Spectral Density or Do It Yourself

Lecture 3 Complex Exponential Signals

DISCRETE FOURIER TRANSFORM AND FILTER DESIGN

Lecture 3, Multirate Signal Processing

Filter Banks I. Prof. Dr. Gerald Schuller. Fraunhofer IDMT & Ilmenau University of Technology Ilmenau, Germany. Fraunhofer IDMT

Instruction Manual for Concept Simulators. Signals and Systems. M. J. Roberts

ECE438 - Laboratory 7a: Digital Filter Design (Week 1) By Prof. Charles Bouman and Prof. Mireille Boutin Fall 2015

Fourier Transform. Any signal can be expressed as a linear combination of a bunch of sine gratings of different frequency Amplitude Phase

PROBLEM SET 6. Note: This version is preliminary in that it does not yet have instructions for uploading the MATLAB problems.

Spectrum Analysis: The FFT Display

Fourier Signal Analysis


Section 8.4: The Equations of Sinusoidal Functions

EE 791 EEG-5 Measures of EEG Dynamic Properties

EE 438 Final Exam Spring 2000

Digital Signal Processing Fourier Analysis of Continuous-Time Signals with the Discrete Fourier Transform

y(n)= Aa n u(n)+bu(n) b m sin(2πmt)= b 1 sin(2πt)+b 2 sin(4πt)+b 3 sin(6πt)+ m=1 x(t)= x = 2 ( b b b b

UNIVERSITY OF SWAZILAND

2.1 BASIC CONCEPTS Basic Operations on Signals Time Shifting. Figure 2.2 Time shifting of a signal. Time Reversal.

Physics 115 Lecture 13. Fourier Analysis February 22, 2018

Concordia University. Discrete-Time Signal Processing. Lab Manual (ELEC442) Dr. Wei-Ping Zhu

3.2 Measuring Frequency Response Of Low-Pass Filter :

LAB #7: Digital Signal Processing

ELT COMMUNICATION THEORY

Experiment 2 Effects of Filtering

Signal Processing Toolbox

Signal Processing First Lab 20: Extracting Frequencies of Musical Tones

The University of Texas at Austin Dept. of Electrical and Computer Engineering Final Exam

Subtractive Synthesis. Describing a Filter. Filters. CMPT 468: Subtractive Synthesis

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

Signals. Periodic vs. Aperiodic. Signals

Computer Networks. Practice Set I. Dr. Hussein Al-Bahadili

ELEC3104: Digital Signal Processing Session 1, 2013

Image acquisition. Midterm Review. Digitization, line of image. Digitization, whole image. Geometric transformations. Interpolation 10/26/2016

Lab Report #10 Alex Styborski, Daniel Telesman, and Josh Kauffman Group 12 Abstract

Graph of the Sine Function

G(f ) = g(t) dt. e i2πft. = cos(2πf t) + i sin(2πf t)

Lecture 2: SIGNALS. 1 st semester By: Elham Sunbu

SECTION 7: FREQUENCY DOMAIN ANALYSIS. MAE 3401 Modeling and Simulation

Notes on Fourier transforms

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

Matlab Exercises. Matlab Exercises 1

EC310 Security Exercise 20

5.3 Trigonometric Graphs. Copyright Cengage Learning. All rights reserved.

DSP First. Laboratory Exercise #11. Extracting Frequencies of Musical Tones

Sampling and Reconstruction of Analog Signals

Islamic University of Gaza. Faculty of Engineering Electrical Engineering Department Spring-2011

EE 403: Digital Signal Processing

INTEGRATING AND DECIPHERING SIGNAL BY FOURIER TRANSFORM

Topic. Spectrogram Chromagram Cesptrogram. Bryan Pardo, 2008, Northwestern University EECS 352: Machine Perception of Music and Audio

Fourier Transform Pairs

Lab 0: Introduction to TIMS AND MATLAB

Alternative View of Frequency Modulation

The Formula for Sinusoidal Signals

Signal Processing. Naureen Ghani. December 9, 2017

Transcription:

Log Booklet for EE2 Experiments Vasil Zlatanov DFT experiment Exercise 1 Code for sinegen.m function y = sinegen(fsamp, fsig, nsamp) tsamp = 1/fsamp; t = 0 : tsamp : (nsamp-1)*tsamp; y = sin(2*pi*fsig*t); plot (y); grid title ( Sine Wave ) xlabel ( Time ) ylabel ( Amplitude ) end Exercise 2 Simply ploting S does not give us the correct value because of the way matlab stores S. Plotting S plots the matrix in the wrong orientation. So instead of plotting 10 sine curves with 128 samples. We plot 128 curves with 10 samples each, which is not what we want to do. For that we will have to rotate the matrix S And now we plot f k (t) = 10 n=1 sin(nw s t k ) So this is the output when all the harmonics have the same amplitude. Now using the weighting for the harmonics, such that the higher harmonics have a smaller amplitude: 1

Figure 1: plot of S / time in milliseconds Figure 2: transpose of S /time in milliseconds 2

Figure 3: plot / time in milliseconds Figure 4: with bn / time in milliseconds 3

We can see that the coefficients have made it so that the haromnics add up to what is approximately a sine square wave. Every 15ms or so they all add up to produce a nearly vertical edge and then cancel out to produce horizontal bits. And this is how cosine version looks: Figure 5: cosine with a_n / time in milliseconds They both imitate a sawtooth function, but the cosine wave is shifted by 10 milliseconds. In order to actually get the sawtooth function we need to add up the odd sines to infinity, and according to the Gibb s effect it will converge. For example here are the sine waves from 1 to 99: Mind you we will never get a perfect square wave because there will always be a spike at the corner. Exercise 3 Fourier transform is zero except at 1 = -4i and at 7 = +4i So we have a spike at 1 -> 1khz and a spike at 7khz which is the reflected dirac from the negative axis. Evaluating the same cosine signal we get 4 instead of 4i plotspec.m function y = plotspec(x) X = fft(x); 4

Figure 6: sine waves to 99 5

Figure 7: adding up haromnics up to 99 Figure 8: function of x 6

amp = sqrt( X.* conj (X)); phase = atan2( imag(x), real(x)); figure bar(amp); grid title ( Amplitude Spectra ) ylabel ( Amplitude ) figure plot (phase); grid title ( Phase Spectra ) ylabel ( Phase in radians ) end So using this function we can then graph the impulses: For [ 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ] Figure 9: plot And for [ 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ] So they both have an amplitude of 1 but a different phase graph. 7

Figure 10: plot Figure 11: plot 8

Figure 12: plot Exercise 4 Using Hanning windows Exercise 5 Now doing the plotsec for the unknown signal Taking 256-samples they have the same frequency spectrum as the whole function. Namely the first maximum is at 53 ( the second is a reflection of that in the negative axis that appears on the positive side, a characteristic of matlab). The sampling frequency is 1000Khz and we have 1048 samples. max(amp) tells us that the 53 element has the max frequency of with magnitude 387.6. That would mean that the frequency is 53/(1000/1048) = 55.544 So it looks like the main majority of the signals is at 50Hz (which is the same frequency as the electricity in Europe). Exercise 6 300 Hz is at: 300/(1000/256) = 77 9

Figure 13: plot 10

Figure 14: plot Figure 15: phase 11

Figure 16: amplitude By excluding everything all indexes in the fft above 77 and below 256-77 (the reflection) amplitude The disadvantage to filtering in the frequency domain is that we lose information for samples we can not recover. Exercise 7 Here we have an impulsew ith 8 1 s and 8 0 s: Now with only 4 ones: With 2 ones: With 1 ones and 15 zeros: Exercise 8: With [1 0 0 0]: Infinite sum of sine waves. The fft of 4 1 s: We can see how the higher frequencies have been cut as it is a low pass filter. Convolution between [1 1 1 1] and uknown gives us: 12

Figure 17: 8 ones Figure 18: 4 ones 13

Figure 19: 2 ones Figure 20: 1 ones 14

Figure 21: unfiltered Figure 22: filtered with low-pass 15

Figure 23: convoluton 16

We can see that the high frequencies have gones down. The humps are caused by the fact that the spectra of a rectangular function is a sinc function. Exercise 9 Using unit impulse of with 1 one and 15 zeros, the response of the filter is: The impulse response of: y[n] = 0.5x[n] + 0.5 y[n-1] is: Input: Response from the filter: Figure 24: unit impulse 17

Figure 25: impulse response This looks like a sinc function. In frequency: Now doing the same with the unknown: The response from the filter: And in the frequency domain: 18

Figure 26: filter frequency response Figure 27: response in time 19

Figure 28: butterworth filter on unknown in frequency 20