Вы находитесь на странице: 1из 20

ANALOG COMMUNICATION SYSTEMS.

MAJOR SEMESTER ASSIGNMENT.

SUBMITTED TO: SIR M.FRAZ

SUBMITTED BY: YUSRA FAROOQ (SP08-060)


HIRA RASAB (SP08-022)
1. DSBSC Modulation.

Description.

1.1 Using a simple approach for generation of DSBSC, which is multiplying m(t) with carrier of
specified frequency of 250Hz gives us a modulated signal. A proper sampling interval, ‘ts’ is
selected by matching the matrix size of both message and carrier signal. Carrier is enveloped within
the message signal. DSBSC is plotted along time interval specified in question.
2

1.5

0.5
DSB
SC

-0.5

-1

-1.5

-20
0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16
t

1.2 The power of the modulated signal is simply obtained by dividing the square of DSBSC with 2.
It is plotted against frequency. We calculated the frequency by using the sampling frequency with
Matlab function of ‘linspace’ which generates linearly spaced vectors. As it is apparent from the
following figure the negative portion of the modulated signal is clipped due to squaring. The power
signal is much more compressed as compared to modulated signal.

1.8

1.6

1.4

1.2
1
power

0.8

0.6

0.4

0.2

0
0
200 400 600 800 1000 1200
f
1.3 For calculating the spectrum of modulated signal we needed to calculate the Fast Fourier
Transform. We used the built-in function of ‘fft’ to get it and the by taking its absolute value
we were able to plot it’s magnitude spectrum. It can be seen from the figure that the modulated
signal is shifted according to the carrier frequency, which is 250Hz.

50

45

40

35
magnitude
30

25

20

15

10
5

0
0
200 400 600 800 1000 1200
f

1.4 Power Spectral Density is simply calculated by using the theoretical formula of dividing the
square of magnitude spectrum by time period. It can be seen from the figures that the PSD of
modulated signal has same shape of the spectrum, just shifted across the carrier frequency and
amplitude increased. The message PSD is not centered at 250Hz and has more amplitude as
compared to PSD of modulated signal.
4

2 x 10

1.5
psd

0.5
0
0
200 400 600
f 800 1000 1200
4

8 x 10
message psd

0
0
200 400 600
f
800 1000 1200
Discussion.

DSBSC modulation is a type of linear modulation. Double-sideband suppressed-carrier transmission


in which frequencies produced by amplitude modulation are symmetrically spaced above and below
the carrier frequency and the carrier level is reduced to the lowest practical level, ideally completely
suppressed. In the double-sideband suppressed-carrier transmission modulation, unlike AM, the
wave carrier is not transmitted; thus, a great percentage of power that is dedicated to it is distributed
between the sidebands, which implies an increase of the cover in DSBSC, compared to AM, for the
same power used.

For a given signal, the power spectrum gives a plot of the portion of a signal's power (energy per
unit time) falling within given frequency bins. It is simply calculated by using the following formula:

A^2 / 2

In order to get the spectrum of the modulated signal we need to first know the definition of
spectrum. The spectrum of a time-domain signal is a representation of that signal in the frequency
domain. The frequency spectrum can be generated via a Fourier transform of the signal, and the
resulting values are usually presented as amplitude and phase, both plotted versus frequency.

We are using Fast Fourier Transform to calculate the magnitude spectrum of the signals. The FFT is
a faster version of the Discrete Fourier Transform (DFT). The FFT utilizes some clever algorithms to
do the same thing as the DTF, but in much less time.

Let x0, ...., xN-1 be complex numbers. The DFT is defined by the formula

Evaluating this definition directly requires O(N2) operations: there are N outputs Xk, and each output
requires a sum of N terms. An FFT is any method to compute the same results in O(N log N)
operations.

Power spectral density function (PSD) shows the strength of the variations (energy) as a function of
frequency. In other words, it shows at which frequencies variations are strong and at which
frequencies variations are weak. The unit of PSD is energy per frequency (width) and you can obtain
energy within a specific frequency range by integrating PSD within that frequency range.
Computation of PSD is done directly by FFT.

The biggest problem that occurred during the execution of this code was that we needed to plot the
spectrum of signals. Normally we use time domain functions, so in order to get the plot against
frequency we first took the inverse of the time. This did not provide the correct results, as the
modulated signal was not centered at the correct frequency. To solve this problem we used sampling
frequency of 600 multiplied with linearly spread vectors from 0 to 1.7.
2. AM MODULATION.

Description.

2.1 AM modulation only differs from DSBSC due to addition of a dc value. In the given question
we use modulation index (u=0.2) to calculate the dc value. Due to addition of dc value the
amplitude of signal has increased by 5 as compared to DSBSC. The spectrum shown below
also has more power as compared to the spectrum of DSBSC.

250
Magnitude Spectrum

200

150

100

50

0
0
200 400 600 800 1000 1200
f

2.2 As the modulation index was changed from 0.1 to 0.9 there was a marked change in the
amplitude of magnitude spectrum, but the phase spectrum remained same.

Magnitude Spectrum with u=0.1


600
Amplitude

400

200

0
0
200 400 600 800 1000 1200
f
Phase Spectrum with u=0.1
4
Amplitude

-2

-40
200 400 600 800 1000 1200
f
It is apparent from the previous figure that by decreasing the modulation index the dc value is
increased, thus the amplitude of spectrum increases.

It can be seen from the figure below that by increasing the modulation index amplitude of magnitude
spectrum is decreased. There is no drastic change in phase spectrum, it has become less smooth. The
magnitude spectrum has also lost it’s smooth peak and has two peaks instead of one.

Magnitude Spectrum with u=0.9


80

Amplitude 60

40

20

0
0
200 400 600 800 1000 1200
f
Phase Spectrum with u=0.9
4
Amplitude

-2

-40
200 400 600 800 1000 1200
f

2.3 Power content of both the modulated signal and message is calculated in the same way as in
the previous question, by using ‘fft’ built-in function of Matlab. The ratio is simply calculated
by dividing the power of modulated signal by message power and plotted against frequency.
As modulation index varies linearly, we have a straight line graph.

Modulation index
24.5

24
Amplitude

23.5

23

22.5

22 0
200 400 600 800 1000 1200
f
Discussion.

Amplitude modulation (AM) is a technique used in electronic communication, most commonly for
transmitting information via a radio carrier wave. AM works by varying the strength of the
transmitted signal in relation to the information being sent.

In its basic form, amplitude modulation produces a signal with power concentrated at the carrier
frequency and in two adjacent sidebands. This process is known as heterodyning. Each sideband is
equal in bandwidth to that of the modulating signal and is a mirror image of the other.
To increase transmitter efficiency, the carrier can be removed from the AM signal. This produces a
double-sideband suppressed-carrier (DSBSC) signal. A suppressed-carrier amplitude modulation
scheme is three times more power-efficient than traditional AM.

A carrier wave is modeled as a simple sine wave, such as:

A message signal is given as:

Then AM Modulated signal is:

In terms of the positive frequencies, the transmission bandwidth of AM is twice the signal's original
bandwidth, since both the positive and negative sidebands are shifted up to the carrier frequency.
The transmitter power efficiency of DSB-AM is relatively poor (about 33%). The benefit of this
system is that receivers are cheaper to produce.

Modulation index is defined as the measure of extent of amplitude variation about an unmodulated
maximum carrier. As with other modulation indices, in AM, this quantity, also called modulation
depth, indicates by how much the modulated variable varies around its 'original' level. For AM, it
relates to the variations in the carrier amplitude and is defined as:

So if h = 0.5, the carrier amplitude varies by 50% above and below its unmodulated level.
For h = 1.0 it varies by 100%, this condition is called 100% modulation. When M > A then it is
called over modulation. For M<A it is called under modulation.
3. USSB GENERATION.

Description.

3.1 The same message signal we used in previous questions is used. We are using the same
approach of creating a double sideband-suppressed carrier. The only difference is we are removing
the lower sideband and utilizing only half bandwidth. This scheme is known as Single sideband
modulation (SSB). We have used the Matlab function of ‘hilbert’ to get mh(t) and multiply it with a
90` shifted carrier. We have used the function of ‘imag’ to calculate the imaginary parts.

Uppersideband
5

3
Amplitude

-1

-2

-30
0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16
t

3.2 We have again used ‘fft’ to calculate the spectrum of modulated signal. We take the
absolute value for magnitude spectrum.

USSB Spectrum

100

90

80

70
Amplitude

60

50

40

30

20

10

0
0
200 400 600 800 1000 1200
f
3.3 We simply compare the plots of the magnitude spectrum of message and modulated signal.
As it is shown from the figures that the USSB is shifted at 250Hz. As compared to the DSBSC
scheme this modulation scheme utilizes half bandwidth to transmit the same signal.

Message Spectrum
150

Amplitude
100

50

0
0
200 400 600 800 1000 1200
f
USSB Spectrum
100
Apmlitude

50

0
0
200 400 600 800 1000 1200
f

Discussion.

Single-sideband modulation (SSB) is a refinement of amplitude modulation that more efficiently


uses electrical power and bandwidth. Amplitude modulation produces a modulated output signal that
has twice the bandwidth of the original baseband signal.

Single-sideband modulation avoids this bandwidth doubling, and the power wasted on a carrier, at
the cost of somewhat increased device complexity. The most important part in SSB is Hilbert
transform. It is a linear operator which takes a function, u(t), and produces a function, H(u)(t), with
the same domain.
The upper sideband comes out to be:

, where is message signal and is the hilbert transform.

When is modulated by , all frequency components are shifted by .

4. DSBSC DEMODULATION.

Description.

4.1 Here we have to follow the same procedure as 1.1 i.e. generation of DSBSC signal.

2 Modulated signal

1.5

1
Amplitude

0.5

-0.5

-1

-1.5

-20
0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16
t
4.2 It can be clearly seen from the figure below that the demodulated signal is actually the message
signal on the receiver side. Demodulation is simply performed by multiplying the DSBSC
signal with the shifted carrier. Then by using Analog Butterworth filter, which is a built-in
function of Matlab we get the filtered demodulated signal.

As the carrier on the receiver side has a phase error of 60` that is the reason the obtained
demodulated signal is not exactly same as our message. We have improved the shape of our
demodulated signal by increasing the normalized cut-off frequency.

In the power of modulated signal Vs Phase graph the negative portion of signal is clipped due
to squaring. Compared to the power of message the demodulated signal has less power.

Message
2
Amplitude

-20
0.02 0.04 0.06 0.t08 0.1 0.12 0.14 0.16
Demodulated signal
1
Amplitude

-10
0.02 0.04 0.06 0.08
t 0.1 0.12 0.14 0.16
Power of Demodulated signal
Amplitude

0.2

0.1
0
0 1
0.2 0.4 0.6 0.8 1.2 1.4 1.6
Phase
Discussion.

Demodulation is performed on the receiver side to obtain the original signal i.e. the message signal.

Synchronous detection is used for the detection or demodulation of amplitude modulation (AM).This
form of modulation is still widely used for broadcasting on the long, medium and short wavebands
despite the fact that there are more efficient forms of modulation that can be used today.

Here a signal on exactly the same frequency as the carrier is mixed with the incoming signal. This
has the effect of converting the frequency of the signal directly down to audio frequencies where the
sidebands appear as the required audio signals in the audio frequency band.

The crucial part of the synchronous detector is in the production a local oscillator signal on exactly
the same frequency as the carrier. Although it is possible to receive an AM signal without the local
oscillator frequency on exactly the same frequency as the carrier this is the same as using the BFO in
a receiver to resolve the signal. If the BFO is not exactly on the same frequency as the carrier then
the resultant audio is not very good.

Synchronous detectors are used because they have several advantages over ordinary diode detectors.
Firstly the level of distortion is less. The other advantage is an improved signal to noise ratio at low
signal levels.

To write down the code for this problem the size of the demodulated signal’s power and phase had to
be made same. This was done by comparing the size of both by using the function ‘size’. We had to
use 0.01009 divisions on the phase axis.
5. FM MODULATION & DEMODULATION.

Description.
frequency modulation (FM) conveys information over a carrier wave by varying its instantaneous
frequency (contrast this with amplitude modulation, in which the amplitude of the carrier is varied
while its frequency remains constant). In analog applications, the difference between the
instantaneous and the base frequency of the carrier is directly proportional to the instantaneous value
of the input signal. Frequency modulation can be regarded as phase modulation where the carrier
phase modulation is the time integral of the FM modulating signal.

Suppose the baseband data signal (the message) to be transmitted is

and the sinusoidal carrier is

The modulator combines the carrier with the baseband data signal to get the transmitted signal,

n this equation, is the instantaneous frequency of the oscillator and is the frequency
deviation, which represents the maximum shift away from fc in one direction, assuming xm(t) is
limited to the range ±1.

Although it may seem that this limits the frequencies in use to fc ± fΔ, this neglects the distinction
between instantaneous frequency and spectral frequency. The frequency spectrum of an actual FM
signal has components extending out to infinite frequency, although they become negligibly small
beyond a point.

As with other modulation indices, this quantity indicates by how much the modulated variable varies
around its unmodulated level. It relates to the variations in the frequency of the carrier signal:

where is the highest frequency component present in the modulating signal xm(t), and is the
Peak frequency-deviation, i.e. the maximum deviation of the instantaneous frequency from the
carrier frequency. If , the modulation is called narrowband FM, and its bandwidth is
approximately . If , the modulation is called wideband FM and its bandwidth is
approximately . While wideband FM uses more bandwidth, it can improve signal-to-noise ratio
significantly.

A rule of thumb, Carson's rule states that nearly all (~98%) of the power of a frequency-modulated
signal lies within a bandwidth of

where , as defined above, is the peak deviation of the instantaneous frequency from the
center carrier frequency .

Frequency modulation or FM is more complex. It has numerous advantages over AM, such as better
fidelity and noise immunity. However, it is much more complex to both modulate and demodulate a
carrier wave with FM, and AM predates it by several decades. In fm demodulators, the intelligence
to be recovered is not in amplitude variations; it is in the variation of the instantaneous frequency of
the carrier, either above or below the center frequency. The detecting device must be constructed so
that its output amplitude will vary linearly according to the instantaneous frequency of the incoming
signal.

There are several common types of FM demodulator:

• The quadrature detector, which phase shifts the signal by 90 degrees and multiplies it with
the unshifted version. One of the terms that drops out from this operation is the original
information signal, which is selected and amplified.
• The signal is fed into a PLL and the error signal is used as the demodulated signal.
6. AM DEMODULATION.

Description.
Discussion.

Additive white Gaussian noise (AWGN) is a channel model in which the only impairment to
communication is a linear addition of wideband or white noise with a constant spectral density
(expressed as watts per hertz of bandwidth) and a Gaussian distribution of amplitude. The model
does not account for fading, frequency selectivity, interference, nonlinearity or dispersion. However,
it produces simple and tractable mathematical models which are useful for gaining insight into the
underlying behavior of a system before these other phenomena are considered.

y = awgn(x,snr) adds white Gaussian noise to the vector signal x. The scalar snr specifies the
signal-to-noise ratio per sample, in dB. If x is complex, awgn adds complex noise. This syntax
assumes that the power of x is 0 dBW.

Signal-to-noise ratio (often abbreviated SNR or S/N) is a measure used in science and engineering
to quantify how much a signal has been corrupted by noise. It is defined as the ratio of signal power
to the noise power corrupting the signal. A ratio higher than 1:1 indicates more signal than noise.

Signal-to-noise ratio is defined as the power ratio between a signal (meaningful information) and the
background noise (unwanted signal):
MATLAB CODES.

Q1. t=0.001:0.001:0.15;
ts=0.001;
t0=0.15;
x=[ones(1,(t0/(3*ts))), -2*ones(1,(t0/(3*ts))), zeros(1,(t0/(3*ts)))];
f=250;
y=cos((2*pi*f).*t);
mod=x.*y;
A=(mod).^2/2;
a=fft(x);
c=abs(a);
b=fft(mod);
mag=abs(b);
phase=angle(b);
psd=((mag).^2)/t0;
psdmsg=((c).^2)/t0;

fs=600;
F= fs.* linspace(0,1.7,150);

subplot(8,1,1);plot(t,x)
xlabel('t');ylabel('m(t)')
subplot(8,1,2);plot(t,mod)
xlabel('t');ylabel('DSBSC')
subplot(8,1,3);plot(F,A)
xlabel('f');ylabel('power')
subplot(8,1,4);plot(F,b)
xlabel('f');ylabel('fft')
subplot(8,1,5);plot(F,mag)
xlabel('f');ylabel('magnitude')
subplot(8,1,6);plot(F,phase)
xlabel('f');ylabel('phase')
subplot(8,1,7);plot(F,psd)
xlabel('f');ylabel('psd')
subplot(8,1,8);plot(F,psdmsg)
xlabel('f');ylabel('message psd')

Q2. t=0.001:0.001:0.15;
ts=0.001;
t0=0.15;
x=[ones(1,(t0/(3*ts))), -2*ones(1,(t0/(3*ts))), zeros(1,(t0/(3*ts)))];
f=250;
y=cos((2*pi*f).*t);
fs=600;
F= fs.* linspace(0,1.7,150);
d=5;
r=d+x;
mod=r.*y;
a= fft(mod);
mag=abs(a);
phase=angle(a)
e=10;
l=e+x;
mod1=l.*y;
b= fft(mod1);
mag1=abs(b);
phase1=angle(b)
g=1;
p=g+x;
mod2=p.*y;
c= fft(mod2);
mag2=abs(c);
phase2=angle(c)
pwr1=(mod.^2)/2;
pwr2=(y.^2)/2;
ratio=pwr1/pwr2;
subplot(8,1,1);plot(t,mod);
xlabel('t');
ylabel('Am signal');
subplot(8,1,2);plot(F,mag);
xlabel('f');
ylabel('Magnitude Spectrum');
subplot(8,1,3);plot(F,phase);
xlabel('f');
ylabel('Phase Spectrum');
subplot(8,1,4);plot(F,mag1);
xlabel('f');
ylabel('Amplitude');
title('Magnitude Spectrum with u=0.1');
subplot(8,1,5);plot(F,phase1);
xlabel('f');
ylabel('Amplitude');
title('Phase Spectrum with u=0.1');
subplot(8,1,6);plot(F,mag2);
xlabel('f');
ylabel('Amplitude');
title('Magnitude Spectrum with u=0.9');
subplot(8,1,7);plot(F,phase2);
xlabel('f');
ylabel('Amplitude');
title('Phase Spectrum with u=0.9');
subplot(8,1,8);plot(F,ratio);
xlabel('f');
ylabel('Amplitude');
title('Modulation index');

Q3. t=0.001:0.001:0.15;
ts=0.001;
t0=0.15;
x=[ones(1,(t0/(3*ts))), -2*ones(1,(t0/(3*ts))), zeros(1,(t0/(3*ts)))];
f=250;
fs=600;
F= fs.* linspace(0,1.7,150);
subplot(4,1,1); plot(t,x)
title('Message Signal')
xlabel('t')
ylabel('Amplitude')
a=fft(x,150)
mag=abs(a);
subplot(4,1,2);plot(F,mag)
title('Message Spectrum')
xlabel('f')
ylabel('Amplitude')
y=cos((2*pi*f).*t);
z=sin((2*pi*f).*t);
x_h=hilbert(x);
xh=imag(x_h);
ussb=x.*y - xh.*z;
subplot(4,1,3);plot(t,ussb)
title('Uppersideband')
ylabel('Amplitude')
xlabel('t')
b=fft(ussb);
mag1=abs(b);
subplot(4,1,3);plot(F,mag)
title('Message Spectrum')
xlabel('f')
ylabel('Amplitude')
subplot(4,1,4); plot(F,mag1)
title('USSB Spectrum')
xlabel('f')
ylabel('Apmlitude')

Q4. t=0.001:0.001:0.156;
ts=0.001;
t0=0.156;
x=[ones(1,(t0/(3*ts))), -2*ones(1,(t0/(3*ts))), zeros(1,(t0/(3*ts)))];
f=250;
y=cos((2*pi*f).*t);
mod=x.*y;
subplot(4,1,1); plot(t,x)
title('Message');
xlabel('t')
ylabel('Amplitude')
subplot(4,1,2); plot(t,mod)
title('Modulated signal')
xlabel('t')
ylabel('Amplitude')
phase=0:0.01009:pi/2;
lag=pi/3;
a=cos((2*pi*f).*t+lag);
demod=mod.*a;
[p,z]=butter(1,0.3,'low')
b=filter(p,z,demod)
subplot(4,1,3);plot(t,b)
title('Demodulated signal')
xlabel('t')
ylabel('Amplitude')
pwr=(b.^2)/2;
subplot(4,1,4); plot(phase,pwr)
title('Power of Demodulated signal')
xlabel('Phase')
ylabel('Amplitude')

Q5.

Q6.

Вам также может понравиться