lab4 am modulation

23
LAB REPORT EXPERIMENT INTRODUCTION TO AMPLITUDE MODULATION

Upload: gauruath89

Post on 24-Mar-2015

111 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lab4 AM Modulation

LAB REPORT

EXPERIMENT

INTRODUCTION TO AMPLITUDE MODULATION

Page 2: Lab4 AM Modulation

INTRODUCTION TO AMPLITUDE MODULATION

Purpose: The objectives of this laboratory are: 1. To introduce the spectrum analyzer as used in frequency domain analysis. 2. To implement theoretically functional blocks using the Communications Simulink Block.

Equipment List: 1. PC with Matlab and Simulink 2. Theoretical basis about equation of the AM, FM

Pre questions befor pactices:

1. DFT, FFT theoretical 2. Spectrum of sinus waveform 3. Spectrum of sinus waveform multiplication

Page 3: Lab4 AM Modulation

A: Exersices.(All exersices must be completed) Exersice 1. Implement and sketch an a simple sine wave and spectrum of Sine wave form. Exersice 2. Implement and sketch an output y = kmcos(2f1t)*cos(2f2t) and spectrum of this wave form. Exersice 3. Implement and sketch the output signal of AM modulation.

Exersice 3. Implement and sketch the output signal of FM modulation. The carrier signal is represented by c(t) = A cos(wct)

The modulating signal is represented by m(t) = B sin(wmt)

Then the final modulated signal is A cos(wct + m(t)) = A cos(wct + B sin(wmt))

B: Theoretical Experiment.

I Spectrum Analyzer and Function Generator. This section deals with looking at the spectrum of simple waves. We first look at the spectrum of a simple sine wave. To Start Simulink: Start Matlab then type simulink on the command line. A Simulink Library Window opens up as shown in figure 1.

Figure 1.1

ttaky m )10000(2cos())1000(2cos(1(

Page 4: Lab4 AM Modulation

Spectrum of a simple sine wave: - Figure 1.2 shows the design for viewing the spectrum of a simple sine wave.

Figure 1.2 Figure 1.3 shows the time-domain sine wave and the corresponding frequency domain is shown in figure 1.4. The frequency domain spectrum is obtained through a buffered-FFT scope, which comprises of a Fast Fourier Transform of 128 samples which also has a buffering of 64 of them in one frame. The property block of the B-FFT is also displayed in figure 1.5.

Figure 1.3 Figure 1.4

Page 5: Lab4 AM Modulation

Figure 1.5

This is the property box of the Spectrum Analyzer

Page 6: Lab4 AM Modulation

From the property box of the B-FFT scope the axis properties can be changed and the Line properties can be changed. The line properties are not shown in the above. The Frequency range can be changed by using the frequency range pop down menu and so can be the y-axis the amplitude scaling be changed to either real magnitude or the dB (log of magnitude) scale. The upper limit can be specified as shown by the Min and Max Y-limits edit box. The sampling time in this case has been set to 1/5000. Note: The sampling frequency of the B-FFT scope should match with the sampling time of the input time signal. Also as indicated above the FFT is taken for 128 points and buffered with half of them for an overlap. Calculating the Power: The power can be calculated by squaring the value of the voltage of the spectrum analyzer. Note: The signal analyzer if chosen with half the scale, the spectrum is the single-sided analyzer, so the power in the spectrum is the total power. Similar operations can be done for other waveforms � like the square wave, triangular. These signals can be generated from the signal generator block.

II Waveform Multiplication (Modulation) The implementation of the output y = kmcos2(2ft), when km = 1 was shown below.

Page 7: Lab4 AM Modulation

Figure 1.6 The following figure demonstrates the waveform multiplication. A sine wave of f1kHz is generated using a sine wave generator and multiplied with a replica signal. The input signal, the output and output of the multiplier are shown in figures Figure 1.6. It can be seen that the output of the multiplier in time domain is basically a sine wave but doesn�t have the negative sides. Since they get canceled out in the multiplication.

Figure 1.7

The spectral output of the spectrum is shown below. It can be seen that there are two side components in spectrum and a central impulse.

Page 8: Lab4 AM Modulation

If a DC component was present in the input waveform, then y = km*(cos(21000t) + Vdc)2

= km*(cos2(21000t) + 2cos(21000t)*Vdc + Vdc2) The effect of adding a dc component to the input has the overall effect of raising the amplitude of the 2KHz component and decreases the 2KHz component and adding the 1KHz component. Figure shows the multiplication of two difference signal waveform. The Signals are at 1kHz and 10kHz.

The output is shown below. It can be seen that the output consists of just two side bands at +(fc + fm) and the other at �(fc + fm) , i.e. at 9kHz and 11kHz.

Page 9: Lab4 AM Modulation

By multiplying the carrier signal and the message signal, we achieve modulation.

Y*m(t) = [km cos (21000t)*cos (210000t)] We observe the output to have no 10KHz component i.e., the carrier is not present. The output contains a band at 9KHz (fc-fm) and a band at 11KHz (fc+fm). Note: By varying the multiplication of two difference sinus waveform we observe that the 2 sidebands move according to the equation fcfm. Amplitude Modulation: This experiment is the amplitude modulation for modulation index a = 0.5. From the equation of the AM

The representation of the signal in both time-domain and frequency domain when km=1 for a=0.5 were found to be as shown in figures. The experimental set up for generating an AM signal looks like this:

The waveforms at various levels of modulation are shown in the following figures.

ttaky m )10000(2cos())1000(2cos(1(

Page 10: Lab4 AM Modulation

The results from the experiment were shown. The results from the experiment are pretty much the same as in the theoretical ones except there are 2 other peaks at 0 and 1000kHz. This is the same as earlier experiment. The cause of this problem is probably the multiplier.

0 0.5 1 1.5 2 2.5 3

x 10-3

-1.5

-1

-0.5

0

0.5

1

1.5

time (sec)

Am

plitu

de

AM waveform when a=0.5

0 2 0 0 0 4 0 0 0 6 0 0 0 8 0 0 0 1 0 0 0 0 1 2 0 0 00

0 . 5

1

1 . 5

F re q u n c y

Mag

nitu

de

S p e c t ru m o f A M w a ve fo rm w h e n a = 0 . 5

Page 11: Lab4 AM Modulation

Appendix

PRE LAB

INTRODUCTION TO AMPLITUDE MODULATION

Page 12: Lab4 AM Modulation

III. Sketch the time and frequency domain representations(magnitude only) of the following: A. Cos 2ft f = 1kHz Sine Wave The time and frequency domain of the input signal is shown as below.

-5 -4 -3 -2 -1 0 1 2 3 4 5-3

-2

-1

0

1

2

3

Time domain

Am

plitu

de

0 500 1000 1500 2000 2500 3000 3500 40000

500

1000

1500

2000

Freq domain

Am

plitu

de

subplot(2,1,1); x = -5:0.001:5; t = 0:1/4000:1; time = cos(2*3.14*1000*t); y1 = cos(2*3.14*1000*x); plot(x,y1) axis([-5 5 -3 3]); grid on zoom on

Spectrum Analyzer

SCOPE

Page 13: Lab4 AM Modulation

xlabel('Time domain'); ylabel('Amplitude'); % now create a frequency vector for the x-axis and plot the magnitude and phase subplot(2,1,2); fre = abs(fft(time)); f = (0:length(fre) - 1)'*4000/length(fre); plot(f,fre); %axis([0 1 -1 10]); %axis([0 0.75 -2 2]); grid on zoom on xlabel('Freq domain'); ylabel('Amplitude'); B. Square wave period = 1msec, amplitude = 1v Square Wave

CODE: subplot(2,1,1); x = -5:0.001:5; Fs = 399; t = 0:1/Fs:1; time = SQUARE(2*3.14*1000*t); y1 = SQUARE(2*3.14*1000*x); plot(x,y1) axis([-5 5 -3 3]); grid on zoom on xlabel('Time domain'); ylabel('Amplitude'); % now create a frequency vector for the x-axis and plot the magnitude and phase subplot(2,1,2); fre = abs(fft(time)); f = (0:length(fre) - 1)'*Fs/length(fre); plot(f,fre); %axis([0 1 -1 10]); %axis([0 0.75 -2 2]);

Spectrum Analyzer

SCOPE

Page 14: Lab4 AM Modulation

grid on zoom on xlabel('Freq domain'); ylabel('Amplitude');

-5 -4 -3 -2 -1 0 1 2 3 4 5-3

-2

-1

0

1

2

3

Time domain

Am

plitu

de

0 50 100 150 200 250 300 350 4000

100

200

300

Freq domain

Am

plitu

de

C. Cos2(2ft) f = 1kHz subplot(2,1,1); x = -5:0.001:5; Fs = 1699; t = 0:1/Fs:1; time = cos(2*3.14*1000*t).*cos(2*3.14*1000*t); y1 = cos(2*3.14*1000*x).*cos(2*3.14*1000*x); plot(x,y1) axis([-5 5 -3 3]); grid on zoom on xlabel('Time domain'); ylabel('Amplitude'); % now create a frequency vector for the x-axis and plot the magnitude and phase subplot(2,1,2); fre = abs(fft(time)); f = (0:length(fre) - 1)'*Fs/length(fre); plot(f,fre); %axis([0 1 -1 10]);

Page 15: Lab4 AM Modulation

%axis([0 0.75 -2 2]); grid on zoom on xlabel('Freq domain'); ylabel('Amplitude');

-5 -4 -3 -2 -1 0 1 2 3 4 5-3

-2

-1

0

1

2

3

Time domain

Am

plitu

deCos2(2pift)

0 50 100 150 200 250 3000

50

100

150

200

Freq domain

Am

plitu

de

II A carrier Cos 2(5000)t is modulated by a single tone Cos 2(1000)t. The time and freq domain representation are shown. A. Double side-band � suppressed carrier modulation

Page 16: Lab4 AM Modulation

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-1

0

1

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-1

0

1

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-1

0

1

0 10 20 30 40 50 60 70 80 90 1000

50

Freq domain

Am

plitu

de

% Modulating the single tone message signal. Ts = 199; subplot(4,1,1); t = 0:1/Ts:1; m = cos(2*3.14*1000*t); plot(t,m); grid on zoom on % plot of the carrier signal subplot(4,1,2); c = cos(2*3.14*5000*t); plot(t,c); grid on zoom on % plot of the DSB signal with Suppresed carrier intime domain subplot(4,1,3); d = m.*c; plot(t,d); grid on zoom on % freq. domain of the DSB signal. subplot(4,1,4); fre = abs(fft(d)); f = (0:length(fre) - 1)'*Ts/length(fre); plot(f,fre); %axis([0 1 -1 10]); axis([0 100 0 50]); grid on

Page 17: Lab4 AM Modulation

zoom on xlabel('Freq domain'); ylabel('Amplitude'); B. 100% AM modulation ( modulation index = 1) % Modulating the single tone message signal. Ts = 199; K = 1; a = 1; subplot(4,1,1); t = -1:1/Ts:1; m = cos(2*3.14*1000*t); plot(t,m); grid on zoom on % plot of the carrier signal subplot(4,1,2); c = cos(2*3.14*5000*t); plot(t,c); grid on zoom on % plot of the DSB signal with Suppresed carrier intime domain subplot(4,1,3); d = (K + a*m).*c; plot(t,d); grid on zoom on % freq. domain of the DSB signal. subplot(4,1,4); fre = abs(fft(d)); f = (0:length(fre) - 1)'*4000/length(fre); plot(f,fre); %axis([0 1 -1 10]); %axis([0 0.75 -2 2]); grid on zoom on xlabel('Freq domain'); ylabel('Amplitude'); %axis([0 2000 0 205]);

Page 18: Lab4 AM Modulation

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

0

1

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

0

1

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-2

0

2

0 100 200 300 400 500 600 700 800 900 10000

100

200

Freq domain

Am

plitu

de

C. 50% AM modulation (modulation index = 0.5) Ts = 199; K = 1; a = 1; subplot(4,1,1); t = -1:1/Ts:1; m = cos(2*3.14*1000*t); plot(t,m); grid on zoom on % plot of the carrier signal subplot(4,1,2); c = cos(2*3.14*5000*t); plot(t,c); grid on zoom on % plot of the DSB signal with Suppresed carrier intime domain subplot(4,1,3); d = (K + a*m).*c; plot(t,d); grid on zoom on % freq. domain of the DSB signal. subplot(4,1,4); fre = abs(fft(d)); f = (0:length(fre) - 1)'*4000/length(fre); plot(f,fre);

Page 19: Lab4 AM Modulation

%axis([0 1 -1 10]); %axis([0 0.75 -2 2]); grid on zoom on xlabel('Freq domain'); ylabel('Amplitude'); %axis([0 2000 0 205]); Single Side Band Modulation (lower side band)

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

0

1

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

0

1

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-2

0

2

0 100 200 300 400 500 600 700 800 900 10000

100

200

Freq domain

Am

plitu

de

The single side band waveform can be obtained by filtering the DSB signal. Filtering out the lower side band give the upper side � i.e. the SSB signal with the upper side bands. So by low passing the DSB signal we get the lower side band of the SSB signal.

Page 20: Lab4 AM Modulation

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

0

1

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

0

1

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-2

0

2

0 200 400 600 800 1000 1200 1400 1600 1800 20000

100

200

Freq domain

Am

plitu

de

D. By changing the modulating signal in frequency the distance between the carrier and

the side bands change as shown in figure for a increase and decrease in the frequency of the modulating signal.

Increasing the frequency f = 4000Hz.

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

0

1

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

0

1

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-2

0

2

0 200 400 600 800 1000 1200 1400 1600 1800 20000

100

200

Freq domain

Am

plitu

de

Decreasing the Frequency f = 990Hz

Page 21: Lab4 AM Modulation

III Two Tone (1kHz and 2kHz) modulating a carrier of 5kHz. A. Double side band suppressed carrier

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

0

1

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

0

1

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-2

0

2

0 200 400 600 800 1000 1200 1400 1600 1800 20000

100

200

Freq domain

Am

plitu

de

B. 100% AM modulation ( modulation index = 1) % Modulating the single tone message signal. Ts = 199; K = 1; a = 1s; subplot(4,1,1); t = -1:1/Ts:1; m = cos(2*3.14*1000*t) + cos(2*3.14*2000*t); plot(t,m); title('2 tone Double side band - suppressed carrier modulation'); xlabel('Time'); ylabel('Amplitude'); grid on zoom on % plot of the carrier signal subplot(4,1,2); c = cos(2*3.14*5000*t); plot(t,c); grid on zoom on % plot of the DSB signal with Suppresed carrier intime domain

Page 22: Lab4 AM Modulation

subplot(4,1,3); d = (K + a*m).*c; plot(t,d); grid on zoom on % freq. domain of the DSB signal. subplot(4,1,4); fre = abs(fft(d)); f = (0:length(fre) - 1)'*4000/length(fre); plot(f,fre); %axis([0 1 -1 10]); %axis([0 0.75 -2 2]); grid on zoom on xlabel('Freq domain'); ylabel('Amplitude'); %axis([0 2000 0 205]);

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-2

0

22 tone 100% AM modulation with modulation index = 1

Time

Am

plitu

de

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

0

1

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-5

0

5

0 500 1000 1500 2000 2500 3000 3500 40000

100

200

Freq domain

Am

plitu

de

C.50% AM modulation (modulation index = 0.5)

Page 23: Lab4 AM Modulation

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-2

0

22 tone 50% AM Modulation modulaton index = 0.5

TimeA

mpl

itude

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

0

1

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-2

0

2

0 200 400 600 800 1000 1200 1400 1600 1800 20000

100

200

Freq domain

Am

plitu

de