MM3FC Mathematical Modeling 3 LECTURE 1

Slides:



Advertisements
Similar presentations
Math Review with Matlab:
Advertisements

Prepared by Dr. Taha MAhdy
Computer Vision Lecture 7: The Fourier Transform
Math Review with Matlab:
ECE 8443 – Pattern Recognition EE 3512 – Signals: Continuous and Discrete Objectives: Response to a Sinusoidal Input Frequency Analysis of an RC Circuit.
Symmetry and the DTFT If we know a few things about the symmetry properties of the DTFT, it can make life simpler. First, for a real-valued sequence x(n),
HILBERT TRANSFORM Fourier, Laplace, and z-transforms change from the time-domain representation of a signal to the frequency-domain representation of the.
Lecture 7: Basis Functions & Fourier Series
1 Chapter 16 Fourier Analysis with MATLAB Fourier analysis is the process of representing a function in terms of sinusoidal components. It is widely employed.
Professor Ahmadi and Robert Proie
Chapter Four Image Enhancement in the Frequency Domain.
Math Review with Matlab:
Review of Frequency Domain
MM3FC Mathematical Modeling 3 LECTURE 3
MM3FC Mathematical Modeling 3 LECTURE 10 Times Weeks 7,8 & 9. Lectures : Mon,Tues,Wed 10-11am, Rm.1439 Tutorials : Thurs, 10am, Rm. ULT. Clinics : Fri,
MM3FC Mathematical Modeling 3 LECTURE 4 Times Weeks 7,8 & 9. Lectures : Mon,Tues,Wed 10-11am, Rm.1439 Tutorials : Thurs, 10am, Rm. ULT. Clinics : Fri,
MM3FC Mathematical Modeling 3 LECTURE 6 Times Weeks 7,8 & 9. Lectures : Mon,Tues,Wed 10-11am, Rm.1439 Tutorials : Thurs, 10am, Rm. ULT. Clinics : Fri,
MM3FC Mathematical Modeling 3 LECTURE 5 Times Weeks 7,8 & 9. Lectures : Mon,Tues,Wed 10-11am, Rm.1439 Tutorials : Thurs, 10am, Rm. ULT. Clinics : Fri,
MM3FC Mathematical Modeling 3 LECTURE 7 Times Weeks 7,8 & 9. Lectures : Mon,Tues,Wed 10-11am, Rm.1439 Tutorials : Thurs, 10am, Rm. ULT. Clinics : Fri,
MM3FC Mathematical Modeling 3 LECTURE 2 Times Weeks 7,8 & 9. Lectures : Mon,Tues,Wed 10-11am, Rm.1439 Tutorials : Thurs, 10am, Rm. ULT. Clinics : Fri,
Lesson 18 Phasors & Complex Numbers in AC
Feb. 7, 2011 Plane EM Waves The Radiation Spectrum: Fourier Transforms.
EE D Fourier Transform.
EE313 Linear Systems and Signals Fall 2010 Initial conversion of content to PowerPoint by Dr. Wade C. Schwartzkopf Prof. Brian L. Evans Dept. of Electrical.
ES250: Electrical Science
EE513 Audio Signals and Systems Digital Signal Processing (Systems) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
1 Prof. Nizamettin AYDIN Digital Signal Processing.
Motivation Music as a combination of sounds at different frequencies
Fourier Transforms Section Kamen and Heck.
The Discrete Fourier Transform. The Fourier Transform “The Fourier transform is a mathematical operation with many applications in physics and engineering.
Lecture 3 MATLAB LABORATORY 3. Spectrum Representation Definition: A spectrum is a graphical representation of the frequency content of a signal. Formulae:
EE D Fourier Transform. Bahadir K. Gunturk EE Image Analysis I 2 Summary of Lecture 2 We talked about the digital image properties, including.
Signals & Systems Lecture 11: Chapter 3 Spectrum Representation (Book: Signal Processing First)
1 I. Phasors (complex envelope) representation for sinusoidal signal narrow band signal II. Complex Representation of Linear Modulated Signals & Bandpass.
Image Processing © 2002 R. C. Gonzalez & R. E. Woods Lecture 4 Image Enhancement in the Frequency Domain Lecture 4 Image Enhancement.
Two-Sided or Complex Exponential Form of the Fourier Series
Digital Signal Processing – Chapter 10
OUTLINE Wave Sinusoidal signal review Complex exponential signal
Where we’ve been Attenuate, Amplify, Linearize, Filter.
Digital Image Processing Chapter 4 Image Enhancement in the Frequency Domain Part I.
Complex Numbers. 1 August 2006 Slide 2 Definition A complex number z is a number of the form where x is the real part and y the imaginary part, written.
1 Prof. Nizamettin AYDIN Digital Signal Processing.
Lecture 3: Complex Exponentials; n th root of a complex number; continuous-time sinusoids.
1 Lecture 1: February 20, 2007 Topic: 1. Discrete-Time Signals and Systems.
Unit 8 Phasors.
ES97H Biomedical Signal Processing
2008/10/23 System Arch 2008 (Fire Tom Wada) 1 OUTLINE Wave Sinusoidal signal review Complex exponential signal Complex amplitude (phasor) What is Spectrum.
Signals and Systems Lecture 6: Spectral Representation.
 Circuits in which the source voltage or current is time-varying (particularly interested in sinusoidally time-varying excitation, or simply, excitation.
Signals and Systems Lecture 3: Sinusoids. 2 Today's lecture −Sinusoidal signals −Review of the Sine and Cosine Functions  Examples −Basic Trigonometric.
Oh-Jin Kwon, EE dept., Sejong Univ., Seoul, Korea: 2.3 Fourier Transform: From Fourier Series to Fourier Transforms.
Chapter 2. READING ASSIGNMENTS This Lecture: Chapter 2, pp Appendix A: Complex Numbers Appendix B: MATLAB or Labview Chapter 1: Introduction.
The Fourier Transform.
DSP-First, 2/e LECTURE #3 Complex Exponentials and Complex Numbers.
Digital Image Processing Lecture 8: Fourier Transform Prof. Charlene Tsai.
COMPLEX NUMBERS and PHASORS
Periodic Signals Prof. Brian L. Evans
LECTURE #3 Complex Exponentials & Complex Numbers
Lecture 5 Spectrum Representation
DCSP-3: Fourier Transform (continuous time)
CONTINUOUS-TIME SINUSOIDAL SIGNALS
Signal Processing First
Lecture 5: Phasor Addition & Spectral Representation
System Arch 2007 (Fire Tom Wada)
OUTLINE Wave Sinusoidal signal review Complex exponential signal
OUTLINE Wave Sinusoidal signal review Complex exponential signal
Lecture 5A: Operations on the Spectrum
Discrete Fourier Transform
Signal Processing First
System Arch 2006 (Fire Tom Wada)
Presentation transcript:

MM3FC Mathematical Modeling 3 LECTURE 1 Times Weeks 7,8 & 9. Lectures : Mon,Tues,Wed 10-11am, Rm.1439 Tutorials : Thurs, 10am, Rm. ULT. Clinics : Fri, 8am, Rm.4.503 Dr. Charles Unsworth, Department of Engineering Science, Rm. 4.611 Tel : 373-7599 ext. 2461 Email : c.unsworth@auckland.ac.nz

We are going to do this through simple filter theory The Big Plan Aim of course Understand the ‘Discrete Fourier Transform’ (DFT) . We are going to do this through simple filter theory Learn how to represent signals mathematically. Learn about FIR filters, impulse & frequency response. The z-transform, how it helps in the design of filters. Learn how to design lowpass, highpass, bandpass and nulling filters. Show how the DFT can be represented as a bank of filters.

This Lecture What are we going to cover & Why ? Sinusoidal representation of continuous signals. (because sinusoids make up all signals) Complex exponentials & phasors. (to simplify the addition & multiplication of sinusoids) Spectrum Representation. (to represent frequency content of a mixed signal)

The most general mathematical formula for a sinusoid Sinusoids The most general mathematical formula for a sinusoid x(t) = A cos(2π f t + φ) 1.1 x(t) = amplitude at time (t) A = maximum amplitude of sinusoid, f = frequency = 1/T in Hz, where T = period in secs. φ = phase shift in rads. ω = angular frequency = 2πf in rads/sec Can only do two things to the sinusoid of a set frequency : We can magnify it in amplitude We can shift it in phase Note * Say if we want to shift the sinusoid to the : right (in the positive direction) then phi +ve Left (in the negative direction) then phi –ve Thus, x(t) = Asin(ω0 t + φ) = Acos(ω0 t + φ – pi/2) = Acos(ω0 t + φ + 3pi/2) . (Shift the sinewave to the position of the cosine wave to stop confusion). 3) You might think we can compress or stretch it along its x-axis but this would change its frequency

Example 1 : Determine A, w, f, φ & T of the following signals : x(t) = 12cos(12pt + p/3) y(t) = 16sin(200pt – p/9)

Can only do two things to the sinusoid of a set frequency : x(t) = A cos(wt + φ) 1) We can magnify it in amplitude, A. 2) We can shift it in phase, φ. SHIFTING SIGN CONVENTION If we want to shift the sinusoid to the : Right (in the positive direction) then φ is -ve Left (in the negative direction) then φ is +ve IMPORTANT SINE/COSINE RELATIONSHIP sin(wt + φ) = cos(wt + (φ - π/2f)) 1.2 cos(wt + φ) = sin(wt + (φ + π/2f)) 1.3

3) In Signal Analysis, we always change sines to cosines using these relations. (This is to make the math easy when we deal with complex numbers, later.) Example 2 : Change sin(wt + π/3) to cosine form. Plot both the sine and cosine result and verify using the shifting properties. We see sin(wt + π/3) is sine shifted π/3 in the –ve direction. This moves the maxima of sin(wt) at π/2 to the new position (π/2 - π/3) = π/6 from the origin.

From the sine/cosine relations sin(wt + π/3) = cos(wt + (π/3 - π/2)) = cos(wt - π/6) Thus, cos(wt - π/6) is cos shifted π/6 in the +ve direction. This moves the maxima cos(wt) at 0 to the new position π/6 from the origin. Hence. Both the sine and cosine maximas lie on top of each other.

Example 3 : What is the Amplitude, frequency and phase of the equivalent sine/cosine. A) x(t) = 12cos(200πt + π/3) B) y(t) = 16sin(160πt – π/9)

Here is the MATLAB code used to plot : x(t) = 10 cos(2π 1000 t + π/2 ). A = 10; f = 1000; phi = pi/2; T = 1/f; t = -2*T : T/40 : 2*T; x = A*cos(2*pi*f*t + phi); plot(t,x) title('Sinusoid: x(t) = 10 cos(2*pi*1000*t + pi/2)'); xlabel('Time (sec)'); grid on NOTE ** This will give us 40 points per period. Line by line this code does: 1.Define the three parameters for the plot, A=amplitude, f0=frequency, and phi=phase angle. 2.The period, T0, is 1 over the frequency. 3.tt is the time axis for the plot, here we start 2 periods before 0 and quit 2 periods after. 4.Here the values of the cosine are computed. 5.The plot. 6.Put a title on the plot so we know what it is. 7.Also label the x axis. 8.Show the grid. You can copy and paste this code into MATLAB to test it. : We will see in sampling and aliasing that only 2 or samples/period is necessary to digitally record the signal

Continuous & Discrete Signals Real world signals are “continuous ” in time. Any recorded signal is said to be “discrete ” in time. It is impossible to collect every time sample of a real world signal. The “trick” is to “sample” the data to collect enough points such that the signal is accurately represented. Shannon’s sampling theorem states In order to recover a signal of frequency (f) We have to sample at a minimum frequency of (2f). (Namely, we must have a minimum of 2 points/period)

Complex Exponentials & Phasors Believe it or not !! … Analysis & manipulation of sinusoids is “ greatly simplified ” by using complex exponentials. First let’s review complex numbers. z = x + j y , (z) is a the complex number. (x) is the real part of (y) is the imaginary part of z (j) is an imaginary number = Re(z) Im(z) y x z Here we show how to Find roots of polynomials, Manipulate complex numbers and Find roots of Unity. Finding roots of polynomials MATLAB can find the roots of polynomials via the roots command. To find the roots of 2 z + 6 z + 25 you enter the coefficients of z EDU>>eqn = [1 6 25] eqn = 1 6 25 and ask for the roots: EDU>>roots(eqn) ans = -3.0000 + 4.0000i -3.0000 - 4.0000i Notice that this is the same answer as given in the book. MATLAB outputs i as the square root of -1, but you can use j too. Manipulating complex numbers There are many commands for manipulating complex numbers. You can guess what they do by their names. EDU>>z = 3 + j*4 z = 3.0000 + 4.0000i EDU>>real(z) 3 EDU>>imag(z) 4 EDU>>conj(z) 3.0000 - 4.0000i EDU>>abs(z) 5 EDU>>angle(z) 0.9273 Note the angle is in radians, you can convert to degrees by: EDU>>angle(z)*180/pi 53.1301 If you want to input as polar use: EDU>>z2=10*exp(j*pi/4) z2 = 7.0711 + 7.0711i or EDU>>10*exp(j*45/180*pi)

Re(z) Im(z) y x Re(z) Im(z) y x z r θ Cartesian Form z = x + jy Polar form x = r cosθ y = r sinθ The polar form is very clumsy, better to make use of Euler’s famous formula.

Complex exponential representation of a sinusoid Euler’s formula : ejq = cosq + jsinq 1.4 Now, from cartesian coords : z = x + jy From polar coordinates : x = rcosθ & y = rsinθ z = rcosq + rsinq Complex exponential representation of a sinusoid z = rejq 1.5

1 = e , In this form all the rules of indices hold : 2p j e - b a + , … 1.6 Now s’ppose we have : z1 = r1ejα & z2 = r2ejβ Multiplying 2 complex numbers or exponentials we multiply magnitude & add the phases z3 = z1.z2 = r1ejα. r2ejβ = r1r2 ejα ej β = r1r2 ej(α + β)

How do we express a sinusoid in exponential form ? The most general mathematical formula for a sinusoid x(t) = A cos(2πft + φ) Now consider the expansion of : A e j(2πft + φ) = Acos(2πft + φ) + jAsin(2πft + φ) A sinusoid is the product of 2 exponentials x(t) = Re { Ae j(2πft + φ) } = Re { Ae j(2πft )ejφ } = Ae j(2πft )ejφ Sometimes we just drop the Re{ }, for convienience.

Example 4 : Write in complex exponent form : x(t) = 3cos(50πt + π/6) y(t) = 2sin(2πt – π/3) Hence, determine : C) x(t)y(t) D) x(t)/y(t)

Using Inverse Euler Formulas … 1.8 The equation for a sinusoid x(t) = A cos(wt + φ) becomes : … 1.9

We now have two representations of a sinusoid. Re(z) Im(z) +wt +wt Im(z) Im(z) -wt A A/2 φ φ OR + -φ Re(z) A/2 As a rotating phasor with amplitude (A) and frequency (w). 2) Two counter rotating phasors of amplitude (A/2) and frequencies (w) & (-w)

Example 6 : Express as an additive linear combination of exponentials : x(t) = 3cos(3πt + π/12) y(t) = 5sin(24 πt – π/7)

The Spectrum The way we are use to observing a signal is by viewing its time-course. This is known as the “time domain representation” of the signal. The spectrum is a graphical representation of the frequency content of the sum of sinusoids in a signal. Known as the “frequency domain representation” of the signal. This visual form allows us to see the relationships between the different frequency components and their relative amplitudes quickly and easy.

A spectrum can be produced from “additive linear combination” of a constant and (N) sinusoids with different frequency, amplitude and phase. Using Inverse Euler formulae … 1.10 … 1.11

{(X0,0), (X1,f1), (X1*,-f1), (X2,f2), (X2*,-f2), …} NOTE** Observe what happens for k=1,2. For each (fk) the we have ‘complex conjugate pair’ that represents the sinusoidal component contributing at frequency (fk) . So we could write this as : {(X0,0), (X1,f1), (X1*,-f1), (X2,f2), (X2*,-f2), …} (2N+1) frequency components with Magnitude’s (X0) is a DC component that can be expressed as complex exponential signal with a frequency of zero. The ‘Magnitude Spectrum’ of the signal x(t) is a plot of |Xk| vs. f. … 1.12 .. 1.13

x(t) = 10 + 14cos(200πt – π/3) + 8cos(500πt + π/2) Example 7 : Plot the Magnitude Spectrum for the continuous signal. x(t) = 10 + 14cos(200πt – π/3) + 8cos(500πt + π/2) Apply inverse Euler Formula x(t) = 10 + 7e-j π/3 e j2π(100)t + 7ej π/3 e -j2π(100)t + 4ej π/2 e j2π(250)t + 4e-j π/2 e -j2π(250)t Thus, {(10,0),(7e-j π/3, 100),(7ej π/3, -100),(4ej π/2, 250),(4e-j π/2, -250)} Draw each frequency as a vertical line of length of magnitude |Xk| 100 250 -100 -250 f(Hz) |10| |7ej π/3| |7e-j π/3| |4ej π/2| |4e-j π/2| Two-sided Magnitude Spectrum MAGNITUDE |Xk| Can only do two things to the sinusoid of a set frequency : We can magnify it in amplitude We can shift it in phase Note * Say if we want to shift the sinusoid to the : right (in the positive direction) then phi +ve Left (in the negative direction) then phi –ve Thus, x(t) = Asin(ω0 t + φ) = Acos(ω0 t + φ – pi/2) = Acos(ω0 t + φ + 3pi/2) . (Shift the sinewave to the position of the cosine wave to stop confusion). 3) You might think we can compress or stretch it along its x-axis but this would change its frequency