Input as a sum of harmonically related sinusoidal and complex exponential

5
LAB NO #9 OBJECTIVE: Input as a sum of harmonically related sinusoidal and complex exponential Theory: A harmonic of a wave is a component frequency of the signal that is an integer multiple of the fundamental frequency, i.e. if the fundamental frequency is f, the harmonics have frequencies 2f, 3f, 4f, . . . etc. The harmonics have the property that they are all periodic at the fundamental frequency; therefore the sum of harmonics is also periodic at that frequency. Harmonic frequencies are equally spaced by the width of the fundamental frequency and can be found by repeatedly adding that frequency. For example, if the fundamental frequency is 25 Hz, the frequencies of the harmonics are: 50 Hz, 75 Hz, 100 Hz etc. We can add odd harmonics in sinusoidal signals and mathematically it can be written as X(t)=sin(wt)+1/3 sin(3wt)+1/5 sin(5wt)+……………

description

Input as a sum of harmonically related sinusoidal and complex exponential

Transcript of Input as a sum of harmonically related sinusoidal and complex exponential

Page 1: Input as a sum of harmonically related sinusoidal and complex exponential

LAB NO #9

OBJECTIVE:

Input as a sum of harmonically related sinusoidal and complex exponential

Theory:

A harmonic of a wave is a component frequency of the signal that is an integer multiple of the fundamental frequency, i.e. if the fundamental frequency is f, the harmonics have frequencies 2f, 3f, 4f, . . . etc. The harmonics have the property that they are all periodic at the fundamental frequency; therefore the sum of harmonics is also periodic at that frequency. Harmonic frequencies are equally spaced by the width of the fundamental frequency and can be found by repeatedly adding that frequency. For example, if the fundamental frequency is 25 Hz, the frequencies of the harmonics are: 50 Hz, 75 Hz, 100 Hz etc.

We can add odd harmonics in sinusoidal signals and mathematically it can be written as

X(t)=sin(wt)+1/3 sin(3wt)+1/5 sin(5wt)+……………

We can add even harmonics in sinusoidal signals and mathematically it can be written as

X(t)=sin(wt)+1/2 sin(2wt)+1/4 sin(4wt)+……………

Page 2: Input as a sum of harmonically related sinusoidal and complex exponential

CODE IN MAT LAB:

>> t=0:0.01:2;

>> w=2*pi

w = 6.2832

>> x=sin(w*t);

>>plot(x)

>>subplot(331)

>>plot(x)

>>x1=1/3*sin(3*w*t);

>>subplot(332)

>> plot(x1)

>> y=x+x1;

>>subplot(333)

>> plot(y)

>>x2=1/5*sin(5*w*t);

>>subplot(334)

>> plot(x2)

>> y1=y+x2;

>>subplot(335)

>>plot(y1)

>>x3=1/7*sin(7*w*t);

>>subplot(336)

>> plot(x3)

>> y2=y1+x3;

>>subplot(337);

>>plot(y2)

Page 3: Input as a sum of harmonically related sinusoidal and complex exponential

FIGURE IN MAT LAB:

>>w = 2*pi

>> a=ones(1,101)*1/2

>>for i=1:2:55

b=2/pi/i

t=0:0.01:1

a=a+b*sin(w*i*t)

end

plot(t,a)

Page 4: Input as a sum of harmonically related sinusoidal and complex exponential

FIGURE IN MAT LAB:

Conclusion:

In this experiment we can also add the harmonics in sinusoidal signal harmonics can add in both odd and even signals only the difference in their shape of the plotting function