lecture 3

24
lecture 3 MATLAB LABORATORY 3

description

lecture 3. MATLAB LABORATORY 3. Spectrum Representation. Definition: A spectrum is a graphical representation of the frequency content of a signal . Formulae : Sum Of Sinusoidal Signals N - PowerPoint PPT Presentation

Transcript of lecture 3

Page 1: lecture  3

lecture 3

MATLAB LABORATORY 3

Page 2: lecture  3

Spectrum RepresentationDefinition: A spectrum is a graphical representation of the frequency content of a signal .

Formulae: Sum Of Sinusoidal Signals N x(t)= Ao + ∑ Ak cos(2*pi*fk*t + øk) k=1 = N Xo + Re{ ∑ Xk exp(j*2*pi*fk*t)} k=1

Page 3: lecture  3

Where Xo = Ao is a real constant,and Xk = Ak exp(j*øk)

is the complex amplitude (i.e. the phasor) for the complex exponential frequency fk.

The spectrum is also a graphical presentation of the individual sinusoidal components that make up the signal.

Page 4: lecture  3

Spectrum of SinusoidsSinusoids are very important as they are basic building blocks for making more complicated signals.

The most important and powerful method of producing new signals from sinusoids is the additive linear combination.

Where a signal is created by adding together a constant and N sinusoids of different frequencies, amplitude and phase.

Page 5: lecture  3

Formulae :

N x(t)=Ao + ∑ Ak cos(2*pi*fk*t +øk) k=1

Where each amplitude, phase and frequency can be chosen independently.In Phasor representation x(t) can also be represented as: Nx(t)= Xo + ∑ Re { Xk exp(j*2*pi*fk*t)} K=1

Example 3.1

Page 6: lecture  3

Where Xo = Ao represents a real constant component, and each phasor

Xk = Ak exp(j*øk)

represents the magnitude and phase of a rotating phasor whose frequency is fk.

Using Inverse Euler formula we can write x(t) as

N

x(t)=Xo + ∑ {Xk/2 exp(j*2*pi*fk*t) + Xk*/2 exp k=1 (-j*2*pi*fk*t)}

Page 7: lecture  3

We define the two sided spectrum of a signal composed of sinusoids as in above x(t) to be the set of 2N+1 complex phasors and 2N+1 frequencies that specify the signal representation of x(t).

The definition of spectrum is just set of pairs

{ (Xo,0) , (1/2 X1,f1) , (1/2 X1*,- f1) …………}

Each pair (1/2Xk,fk) indicates the size and relative phase of the sinusoidal component contributing at frequency fk .

Page 8: lecture  3

It is common to refer spectrum as the frequency domain representation of the signal. The frequency domain representation simply gives the information required to synthesize the signal.

Example:x(t) =10 + 14cos(200*pi*t -pi/3) + 8cos(500*pi*t+pi/2)

Applying inverse Euler’s formula we getx(t) = 10 + 7 exp(-j*pi/3) exp(j*2*pi*100*t) + 7 exp(j*pi/3) exp(- j*2*pi*100*t) + 4 exp(j*pi/2) exp(j*2*pi*250*t) + 4 exp(- j*pi/2) exp(- j*2*pi*250*t)

Page 9: lecture  3

The spectrum of the signal is the set of five rotating phasors represented by{ (10,0) , (7 exp(- j*pi/3) ,100) , (7 exp( j*pi/3) ,-100) , (4 exp(j*pi/2) ,250)(4exp(- j*pi/2 , -250) }The constant component of the signal, often called as the DC component can be expressed as a complex exponential signal with zero frequency i.e. 10 exp(j*0*t) =10.

>> f =[-250,-100,0,100,250];>> y =[4,7,10,7,4];>> stem(f,y)>> axis([-300 300 ,0 15 ])

Page 10: lecture  3
Page 11: lecture  3

Graphical plot of the spectrum

A plot of the spectrum contains frequency component represented by a straight line at that frequency. And its length is given by the magnitude of the corresponding phasor.

This simple but effective plot makes easy two things

1) The relative location of the frequencies

2) The relative amplitudes of the sinusoidal components.

Page 12: lecture  3

A general procedure to compute and plot the spectrum for any given signal.It is necessary to express the signals as complex exponentials (by using inverse Euler relation) And then plot the complex amplitude of each of the positive and negative frequency components at the corresponding frequency.

In other words the process of analyzing the signal to find its spectral components involves simply looking at an equation and picking off the amplitude, phase and frequency

Page 13: lecture  3

Beat Notes

When two sinusoidal signals of different frequencies are multiplied ,then it creates an interesting audio effect called a Beat note.

This interesting sound can be best heard by picking one of the frequencies to be very small.

Another use of multiplying sinusoids is for Modulation.

Page 14: lecture  3

To plot spectrum of a signal the signal should be expressed as additive linear combination of complex exponential signal.

And a product of two sinusoids can be written as sum of complex exponential signal by using inverse Euler formula.

Beat notes are also produced by adding two sinusoids with nearly identical frequencies,e.g., by playing two neighboring piano keys.

Page 15: lecture  3

As the previous example suggests that the sum of two sinusoids can also be written as a product.

Let x(t)=cos(2*pi*f1*t) +cos(2*pi*f2*t)

The two frequencies are expressed as f1=fc – fΔf2=fc + fΔWhere fc is the center frequency and fΔ is the deviation frequency.

fc = (f1+f2)/2fΔ = (f1-f2)/2

.

Page 16: lecture  3

After the use of Euler formula to the equation we obtain the equation of x(t) as

x(t)=2*cos(2*pi*fΔ*t)*cos(2*pi*fc*t)

Let fc=200 and fΔ=20

>> t=0:1/2000:0.1;>> x=2*cos(2*pi*20*t).*cos(2*pi*200*t);>> plot(t,x) >> sound(x,2000)

Page 17: lecture  3
Page 18: lecture  3

If we listen to such x(t) we can hear that the fΔ

Variation causes the signal to fade in and fade out because of the signal envelope falling and rising.This is the phenomenon called Beating of tones in music.

If fΔ is reduced to 9Hz we can see that the envelope of the 200Hz tone changes slowly.

>> t=0:1/2000:0.1;>> x=2*cos(2*pi*9*t).*cos(2*pi*200*t);>> plot(t,x) >> sound(x,2000)

Page 19: lecture  3
Page 20: lecture  3

The time interval between nulls of the envelops is ½(1/fΔ),so the more closely spaced the sinusoids ,the slower the envelope variation.

Musicians use this phenomenon as an aid in tuning two instruments to the same pitch. When two notes are close but not identical in frequency, the beating phenomenon is heard. As on pitch is changed to become closer and closer to the other ,this effect disappears ,and the two instruments are then in tune.

Page 21: lecture  3

Amplitude ModulationMultiplying two sinusoids is also useful in modulation for communication systems.

Amplitude Modulation is the process of multiplying a low frequency signal with a frequency sinusoid.

In other words changing the amplitude of the high frequency signal according to the change in the message signal to be transmitted is called as amplitude modulation.

Where the high frequency signal is called as the carrier signal and its frequency is called as carrier frequency.

Page 22: lecture  3

Example say v(t)=(5+2*cos(40*pi*t))

x(t)=v(t)*cos(400*pi*t)

>> t=0:1/2000:0.1;>> x=(5+2*cos(40*pi*t)).*cos(2*pi*200*t);>> plot(t,x)

The primary difference between this Amplitude modulated signal and the beat signal is that the envelope never goes to zero as the case of beat signal.

Page 23: lecture  3
Page 24: lecture  3

In the frequency domain the Am signal spectrum is nearly same as the beat signal ,the only difference being a large term at f = fcWhere fc is the center frequency.

HW:

Problem 3.1, Exercise 3.1