Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted...
-
Upload
matthew-gorbett -
Category
Documents
-
view
217 -
download
1
Transcript of Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted...
![Page 1: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/1.jpg)
Islamic University of GazaElectrical Engineering Department
Communication I laboratory
Submitted by:
Adham Abu-Shamla Mohammed Hajjaj
120063320 120063640
Submitted to:
Eng. Mohammed kamel Abu-Foul
Amplitude modulation DSB-LC
(full AM)
1
![Page 2: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/2.jpg)
Contents:The objective of this experiment.Quick review about the AM modulation and
(DSB-LC)Part 1 code and its comments and results
(step by step)Part 2 code and its comment and resultsConclusion.
2
![Page 3: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/3.jpg)
Objective:Understanding AM modulation, Double Side Band-Large Carrier (DSB-LC) “known as Full AM”.
Using MATLAB to plot the modulated signal.
To simulate coherent demodulator and an envelope detector to obtain the real signal using MATLAB.
3
![Page 4: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/4.jpg)
Quick review about the AM modulation and (DSB-LC)
![Page 5: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/5.jpg)
Type of AM Modulation1. DSB-SC2. DSB-LC3. SSB4. VSB
![Page 6: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/6.jpg)
(AM) and (FM) :
6
![Page 7: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/7.jpg)
Part 1Use MATLAB to simulate this block (AM
block) (f(t)=cos(2π2000t),Ac=4,m=0.25,fc=20Khz)
X +
f(t)
mS(t)=Ac[1+mf(t)] .cos(2.π.fct)Ac.cos(2.π.fct)
![Page 8: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/8.jpg)
Part 1 (a) code: the input signal fc=20000; % Carrier frequency ts=1/(10*fc);t=[0:2000]*ts;fs=1/ts; % Sampling frequencym=.25; % Modulation indexAc=4; % DC shiftx=cos(2*pi*2000*t); % the original signalfigure(1)subplot(211)plot(t,x)title('plot of baseband signal x(t)')xlabel('time (t)')ylabel('x(t)')
Carrier freqyancy Sampling period Sampling frequancy Modulation index
µ=mp/ADC shift
plot the real signal
Comment:In the above code we chose ts =1/(10*fs) to avoid overlapping in signal, then we make Fourier transform to plot the magnitude spectrum.
![Page 9: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/9.jpg)
Code cont.Xf=fftshift(fft(x));Xf=Xf/length(Xf);deltax=fs/length(Xf);fx=-fs/2:deltax:fs/2-deltax;subplot(212)plot(fx,abs(Xf))title('the fourier transform of x(t)')xlabel('frequency (f)')ylabel('X(f)')
Fourier Transform of a real signal
Plot the magnitude spectrum
![Page 10: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/10.jpg)
The results (part 1a)
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01-1
-0.5
0
0.5
1plot of baseband signal x(t)
time (t)
x(t)
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
x 105
0
0.2
0.4
0.6
0.8the fourier transform of x(t)
frequency (f)
X(f
)
Two Sym. pulses on the signal frequency
![Page 11: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/11.jpg)
Code (part 1b): modulated signaly=(1+m*x)*Ac.*cos(2*pi*fc*t); % (Modulated
signal)figure(2)subplot(211)plot(t,y)title('the modulated signal
y(t)=(1+m*x)*Ac.*cos(2*pi*fc*t)')xlabel('time (t)')ylabel('y(t)')yf=fftshift(fft(y));
![Page 12: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/12.jpg)
Code (part 1b): modulated signal cont.yf=yf/length(yf);delta=fs/length(yf);f=-fs/2:delta:fs/2-delta;subplot(212)plot(f,abs(yf))title('the fourier transform of the modulated
signal Y(f)')xlabel('frequency (f)')ylabel('Y(f)')
Plot the magnitude spectrum
![Page 13: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/13.jpg)
The results (part 1b)
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01-5
0
5the modulated signal y(t)=(1+m*x)*Ac.*cos(2*pi*fc*t)
time (t)
y(t)
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
x 105
0
0.5
1
1.5
2the fourier transform of the modulated signal Y(f)
frequency (f)
Y(f
)
The same signal shifted at fc and the magnitude divided
by 2
![Page 14: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/14.jpg)
Coherent detector
LPHS(t) w(t)
)v(t)
cos(2.π.fc.t)
![Page 15: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/15.jpg)
Code (Part 1c-1) coherent demodulator “before filtering”. w=y.*cos(2*pi*fc*t); % Coherent
demodulated signal figure(3)subplot(211)plot(t,w)title('plot of demodulated signal w(t) before
LPF')xlabel('time (t)')ylabel('w(t)')wf=fftshift(fft(w));
![Page 16: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/16.jpg)
Code (Part 1c-1) coherent demodulator “before filtering”. wf=wf/length(wf);delta=fs/length(wf);f=-fs/2:delta:fs/2-delta;subplot(212)plot(f,abs(wf))title('fourier transform of the demodulated
signal W(f)')xlabel('frequency (f)')ylabel('W(f)')
![Page 17: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/17.jpg)
The results (part 1c-1)
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.010
2
4
6plot of demodulated signal w(t) before LPF
time (t)
w(t
)
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
x 105
0
1
2
3fourier transform of the demodulated signal W(f)
frequency (f)
W(f
)
The modulated signal shifted at 2*fc and the magnitude
divided by 2
There are a signal in 0 as real signal
![Page 18: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/18.jpg)
Code (Part 1c-2) coherent demodulator “after filtering”. Wp=5000/fs; Ws=20000/fs; Rp=-1; Rs=-100;[N, Wn] = BUTTORD(Wp, Ws, Rp, Rs); %[num,den]=butter(N,Wn); %
the lower frequency of the transient region ( must be
between 0 and 1 )
The Upper frequency of the transient region ( must be
between 0 and 1 ) losses due to rippels
Fn. that return the order of the filter and the cutt off frequency
Fn. that return the transfer function of the Butterworth
filter
![Page 19: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/19.jpg)
Code (Part 1c-2) coherent demodulator “after filtering”. v=filter(num,den,w); figure(4)subplot(211)plot(t,v)title('the demodulated signal after LPF v(t)')xlabel('time (t)')ylabel('v(t)')
Filtering process
![Page 20: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/20.jpg)
Code (Part 1c-2) coherent demodulator “after filtering”. Vf=fftshift(fft(v));Vf=Vf/length(Vf);deltav=fs/length(Vf);fv=-fs/2:deltav:fs/2-deltav;subplot(212)plot(fv,abs(Vf))title('the fourier transform of v(t)')xlabel('frequency (f)')ylabel('V(f)')
![Page 21: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/21.jpg)
The results (part 1c-2)
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.010
1
2
3the demodulated signal after LPF v(t)
time (t)
v(t)
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
x 105
0
0.5
1
1.5
2the fourier transform of v(t)
frequency (f)
V(f
)
There are a signal in 0 as real signal only
![Page 22: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/22.jpg)
Envelope detector
![Page 23: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/23.jpg)
Code (part 1d) %C=0.1e-6F,R=3.2e2%%%%%c=0.1e-6;r=3.2e2;RC=r*c;Vc=ones*(1:length(y));Vc(1)=y(1);for i=2:length(y) if y(i)>=Vc(i-1)
![Page 24: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/24.jpg)
Code (part 1d) Vc(i)=y(i); else Vc(i)=Vc(i-1).*exp(-ts/RC); endendfigure(5)plot(t,y,t,Vc)%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%We can explain this code by the following flow chart
![Page 25: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/25.jpg)
start
Vc(i)=y(i)
Vc(1)=y(1)i=2
Y(i)>=Vc(i-1)
Vc(i)=Vc(i-1).*exp(-ts/RC);
i=length(Y)
start
YES NO
YES
NO
![Page 26: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/26.jpg)
The results (C=0.1e-6F,R=3.2e2)
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01-5
-4
-3
-2
-1
0
1
2
3
4
5
![Page 27: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/27.jpg)
If we change R
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01-5
-4
-3
-2
-1
0
1
2
3
4
5
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01-5
-4
-3
-2
-1
0
1
2
3
4
5
R=3.2e(3)
R=3.2e(4)
![Page 28: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/28.jpg)
Part 2Repeat part 1 with Ac=1, m = 2
After we make the simulation, the result is the same in part 1, but we
saw some difference in the envelope detector .
we will show the results of this part and comment the reason
![Page 29: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/29.jpg)
Result of envelope
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01-1
0
1
2
3
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
x 105
0
2
4
6x 10
-3
overlap
![Page 30: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/30.jpg)
Result of envelope
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01-3
-2
-1
0
1
2
3
Not as real signal
![Page 31: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/31.jpg)
Comment in part 2 The reason of part 2 become like this becouse
the Ac is not enough to alternate the signal up to zero so envelope detector can’t get the real signal
![Page 32: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/32.jpg)
Conclusion The experiment is a good simulate for AM
signals.We must make sure of the code because any
error causes fail in compiling
![Page 33: Islamic University of Gaza Electrical Engineering Department Communication I laboratory Submitted by: Adham Abu-Shamla Mohammed Hajjaj 120063320 120063640.](https://reader036.fdocuments.net/reader036/viewer/2022062518/56649c7d5503460f94933038/html5/thumbnails/33.jpg)