mm3fc mathematical modeling 3 lecture 1
Post on 05-Feb-2016
25 Views
Preview:
DESCRIPTION
TRANSCRIPT
MM3FC Mathematical Modeling 3LECTURE 1
Times
Weeks 7,8 & 9.Lectures : Mon,Tues,Wed 10-11am,
Rm.1439Tutorials : Thurs, 10am, Rm. ULT.
Clinics : Fri, 8am, Rm.4.503Dr. Charles Unsworth,Department of Engineering Science, Rm. 4.611
Tel : 373-7599 ext. 2461Email : c.unsworth@auckland.ac.nz
The Big PlanAim of course
Understand the ‘Discrete Fourier Transform’ (DFT) .
We are going to do this through simple filter theory
1) Learn how to represent signals mathematically.2) Learn about FIR filters, impulse & frequency
response.3) The z-transform, how it helps in the design of filters.4) Learn how to design lowpass, highpass, bandpass
and nulling filters.5) Show how the DFT can be represented as a bank of
filters.
This LectureWhat 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)
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
Example 1 : Determine A, w, f, φ & T of the following signals :
A) x(t) = 12cos(12t +
B) y(t) = 16sin(200t –
• 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.
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 statesIn 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 =
1-
Re(z)
Im(z)
y
x
z
0
Re(z)
Im(z)
y
x Re(z)
Im(z)
y
x
Cartesian Form
z = x + jy
z r
θ
Polar formx = r cosθ y = r sinθ
• The polar form is very clumsy, better to make use of Euler’s famous formula.
(y/x)tan=θ
y+x=r1-
22
Euler’s formula :
ejcos + jsin1.4
Now, from cartesian coords :
z = x + jy
From polar coordinates : x = rcosθ & y = rsinθ
z = rcos+ rsin
Complex exponential representation of a sinusoid
z = rej1.5
• In this form all the rules of indices hold :
1je
ee
e
1 ee
eee ,
,
• Now s’ppose we have : z1 = r1ejα & z2 = r2ejβ
z3 = z1.z2 = r1ejα. r2ejβ
= r1r2 ejα ej
β = r1r2 ej(α
+
β)
Multiplying 2 complex numbers or exponentials wemultiply magnitude & addthe phases
… 1.6
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 + φ)
x(t) = Re { Ae j(2πft + φ) } = Re { Ae j(2πft )ejφ } = Ae j(2πft )ejφ
A sinusoid is the product
of 2 exponentials
Sometimes we just drop the Re{ }, for convienience.
Example 4 : Write in complex exponent form :
A) x(t) = 3cos(50πt + π/6)
B) y(t) = 2sin(2πt – π/3)
Hence, determine :
C) x(t)y(t)
D) x(t)/y(t)
Using Inverse Euler Formulas
jφ-jwt-jφjwt
φ)+-j(wtφ)+j(wt
ee2
A+ee
2
A=x(t)∴
2
e+eA = φ)+Acos(wt
2j
e-e=sinθ ,
2
e+e=cosθ
-jθjθ-jθjθ
The equation for a sinusoid x(t) = A cos(wt + φ) becomes :
… 1.8
… 1.9
• We now have two representations of a sinusoid.
Im(z)
Re(z)
Im(z)
Re(z)
Im(z)
A
φ
+wt+wt
-wt
A/2
A/2
+
1) As a rotating phasor with amplitude (A) and frequency (w).
2) Two counter rotating phasors of amplitude (A/2) and frequencies (w) & (-w)
OR φ-φ
Example 6 : Express as an additive linear combination of exponentials :A) x(t) = 3cos(3πt + π/12)
B) 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
}eeA Re{+A=
)+t fcos(2A+A=x(t)
kk f2jφN
1=kk0
N
1=kkk0
∑
∑
t
k
π
φπ
...} ),,-fe2
A(),f,e
2
A(),,-fe
2
A(),f,e
2
A(,0),{(A
}ee 2
A Re{+}ee
2
A Re{+A=x(t)
2jφ-2
2jφ2
1jφ-1
1jφ1
0
fj2-jφ-N
1=k
kfj2jφN
1=k
k0
2211
kkkk ∑∑ tt ππ
… 1.10
… 1.11
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.
)},-fe2
A(),f,e
2
A(),,-fe
2
A(),f,e
2
A(,0),{(A
}ee 2
A Re{+}ee
2
A Re{+A=x(t)
2jφ-2
2jφ2
1jφ-1
1jφ1
0
fj2-jφ-2
1=k
kfj2jφ2
1=k
k0
2211
kkkk ∑∑ tt ππ
… 1.12
kjφ-kk e
2
A= |X| .. 1.13
Example 7 : Plot the Magnitude Spectrum for the continuous signal. x(t) = 10 + 14cos(200πt – π/3) + 8cos(500πt + π/2)
Apply inverse Euler Formulax(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|
0 100 250-100-250 f(Hz)
|10|
|7ej π/3| |7e-j π/3|
|4ej π/2||4e-j π/2|
Two-sidedMagnitudeSpectrum
MA
GN
ITU
DE
|Xk|
top related