Communication Channel Design Using MATLAB Simulation

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 30

Design of a Weak Communication Channel

Using MATLAB
Simulation
Abstract:
Designing acoustical wireless communication channel with various modulations and
increasing the throughput and reduced BER requires different techniques like increasing the
sampling rate with Additive white Gaussian Noise channel. As channel consists of distortion,
fading and Multipath propagation effects so by adjusting different parameters of Modulators,
Normal Raised cosine Transmit and Receive filters optimum BER and Signal to Noise can be
obtained.
Introduction:
In a digital communication system is to transmit digital message from source to destination at
a high rate and accuracy as well. The source and the destination are distant apart from each
other. The signal received at the destination is a distorted one and is due to various factors
like Multipath propagation, Noise, Fading due to non-ideal nature of the channel.

Figure 1 Block diagram Of Communication from source to destination end to end

There are various blocks in communication system such as Information source, Input
transducer, Transmitter, Channel, Added Noise, Receiver and output converter or transducer.
Information source- The messages are in the form of words, symbols, messages. Out of all
these messages is some desired messages is selected and transmitted.
Input Transducer-The Transducer converts one form of energy into another form.
The signal may or may not be in electrical form. So to convert from electrical to non-
electrical or vice-versa transducers are required.
Transmitter- Here the purpose of the transmitter is to transmit signals from different sources
and in long distance communication modulation is required. As in Modulation information
signal is superimposed on the High frequency carrier. In transmitter Modulation, signal
processing and amplification is done.
Channel and the Added Noise- The main purpose of the communication channel is to provide
Physical connection between transmitter and receiver. There are guided channel which are
optical fibers and there are Un-guided channels which consists of wireless or free-space.
Noise is an unwanted interference which are added to the intended signal. Noise are of
different types like Thermal Noise, Shot Noise, High frequency Noise. These are removed by
proper filters. There are channel impairments like Inter symbol interference which are
removed by equalizers. Equalizers are equivalent to All pass filters.
The path from source to destination of a communication channel consists of Multipath
attenuation and due to time variation of received signal due to variable transmission medium
is called Fading. Fading depends on fixed and mobile scenario. In the fixed case there are
rain, heavy thunderstorms. In mobile scenario there are obstacles which are varying with the
path. There are various types of fading like large scale fading and small scale fading.
Large scale fading occurs when some obstacle comes between the transmitter and receiver.
Electromagnetic waves is shadowed or blocked by various obstacles in the path. There are
large variations of signal over distance. In large scale fading Shadowing effect is caused by
deviation of received Electromagnetic wave over average value.
Small Scale fading occurs when there is a rapid variation of signals over very short distances
or very short time. Based on the propagation or multi-path delay spread there are two types of
small scale fading – 1. flat fading 2. frequency Selective fading
Flat Fading -Wireless channel is said to be flat fading channel provided it has constant gain
and has linear phase response over a bandwidth which is higher than the bandwidth of the
transmitted one. Here all the frequency components of the received signal varies in same
proportions simultaneously. Other name of this type of fading is Non-Selective fading. Due
to this flat fading there is reduction in signal to Noise ratio. Other names of flat fading
channels are narrowband channels or amplitude varying channels.
Frequency selective fading- This type of fading affects different spectral components of a
signal with different amplitudes. Due to Doppler spread this frequency selective fading is
itself divided into (a) Fast Fading and (b) Slow Fading. This doppler spread depends on
mobility of receiver with respect to transmitter.
Fast Fading- This fading happens due to rapid variations of signal over small area or
bandwidth. This Fast fading occurs when channel impulse response varies rapidly with the
symbol duration. It is the result of reflection of objects and motion of objects that is a type of
frequency dispersion. The received signal is a combination of different signals which are
reflected from different sources. The resultant signal is addition or subtraction depending on
relative phase shift between them. Phase depends on Speed, Frequency and relative path
length. Due to which shape of the signal is distorted which leads to Inter symbol Interference
(ISI). Equalization is required to remove this type of distortion like Linear Equalization, Non-
linear Equalization and Adaptive Equalization.
Slow Fading- This fading is caused as a result of shadowing by hills, mountains and
buildings. This fading drastically reduces the Signal to Noise ratio. Various Diversity
reception techniques are used to reduce this fading like MIMO(Multi-input Multi-
Output),MISO(Multi-input Single Output) antenna arrays
Receiver – The main aim of the receiver is to reproduce the message signal in electrical form
from the distorted version of the signal. This is accomplished by proper demodulation of the
received signal.
Destination-It is another output transducer which converts the signal from electrical to sound
signal like Loudspeaker.
Objectives:
In the design of Wireless Communication link there are multipath effects and distortion in the
channel and to avoid it and increase reliability of the Communication link we need to adjust
parameters of various transmit and receive filters, choose the type of modulation and
demodulation and adjust samples of both transmit and received filters. We design all blocks
of the communication link using MATLAB simulation so that we can analyse spectrum of the
signal and do Bit error rate Analysis.
Design of the Simulation model:

Figure 2. Wireless Communication link Simulation design with block.


Detailed Descriptions of each Block:

Bernoulli Binary Generator- The purpose of the block is to generate random binary
numbers using a Bernoulli distribution. This block is used to generate random data bits to
simulate digital communication systems and obtain performance metrics such as bit error
rate. The Bernoulli binary distribution with p parameter produces zero with probability p and
one with probability 1-p. This Bernoulli distribution has mean value 1-p and variance p(1-p).
The Probability of zero parameter specifies p and it can be any real number in range [0, 1].
Here various parameters of Binary generator are set like probability which is set at 0.5. Here
we set samples per frame as 4. Here Output data type is single. And taking interpreted
execution for simulation.[1]

Fig 3. Bernoulli Binary Generator


Modulator- Mary Baseband FSK Modulator- The Mary FSK Modulator Baseband block
consists of Mary Frequency shift keying with M number equal to 16 is a modulation array.
The output is a Baseband representation of the modulated signal.[2]

Fig 4. 16-FSK Baseband Modulator


Here in Modulator block in simulation design we have Considered M as 16. Input type is
considered as Bit. Symbol ordering is taken as Gray. Frequency Separation is taken as 2Hz.

Phase considered is continuous. Here we have taken Samples per symbol as 4. Here single-
rate processing is enforced. The Output type is taken as Double.
Up-sampling- Here Data is Up-sampled by the factor of 2 before being processed by Normal
Transmit filter.[3]

Fig 5. Up-sampler
Normal Raised Cosine Transmit Filter – The Raised cosine filter is used to remove the
Inter-symbol Interference as it is Pulse shaping filter. The Raised Cosine filter do the up-
sampling and filters the input signal. The shape of the filter decides whether it is a Normal or
Square root Cosine Transmit filter. The Impulse response of Normal Raised Cosine Transmit
filter with roll-off factor R and symbol period T is

πt πRt
sin ⁡( ) cos ⁡( )
T T
h ( t )= .
πt 2 2
( ) (1− 4 R 2 t )
T T

The roll-off factor is filter roll-off factor which determines the excess bandwidth and its value
lies between 0 and 1. It is commonly used in communication systems link in pair, where the
transmitter first applies a Normal raised cosine Transmit filter, and then receiver applies a
reciprocal Normal raised cosine Receive filter. The raised cosine filter is basically
implementation of low pass Nyquist filter. If we consider specification of a Linear amplitude
filter gain, then the block scales the normalized filter coefficients using the gain value you
specify in this case.[4]
Figure 6. Normal raised cosine Transmit filter

Here in the Simulation design we have taken The shape of Raised Cosine filter as Normal.
The Roll off Factor is taken as 0.2. Here we have taken Filter span in symbols as 2. The
Output Samples per symbol is taken as 1024 as this number is required for spectrum analyses
of signal.

Linear amplitude filter gain is taken as 5. Input Processing is selected with elements that are
samples based. Here we applied Multirate processing.
AWGN channel- Here channel assumed is Additive White Gaussian Noise. Here signal to
Noise ratio mode is selected.[5]

Fig 7. AWGN block

Here we have taken initial seed as 10 and Additive White Gaussian Noise channel for
Simulation design. The Signal to noise ratio Mode is taken as we set SNR(dB) as 10. Input
signal Power is referenced at 1 Ohm.
Normal Raised Cosine Receive Filter-- The Normal raised cosine Receive filter block
filters the input signal and down-samples the filtered signal if we choose the output mode to
down-sampling. Here the filter is used to remove ISI from the received filtered signal and
properly shaped the received signal. Here the block normalizes the filter coefficients to unit
energy.[6]

Fig 8. Normal Raised Cosine Receive Filter

Here in the Normal Raised cosine Receive filter in the simulation design. We are
reciprocating what is in the transmit block. Here the shape is taken as Normal. Roll off factor
is taken as 0.2.

Filter span in symbols is taken as 2. Here input per symbol is taken as 1024. Decimation
factor is reset to 0. Decimation offset is taken as 0. Linear Amplitude filter gain is taken as
0.2175. The processing of elements is sample based. Multirate processing is enforced.
Down-sampling- Here down-sampling is done at 64 before being processed by BER
calculator.[7]

Fig 9. Down-sampler Block

Here in the simulation design the Down-sample factor is taken as 64. Sample offset is taken
as 0. Samples based elements are selected for input processing. Here Multirate Processing
option is selected.
Demodulator-Here M-ary FSK demodulator is used. And M used is 16.[8]

Fig 10. 16-FSK Baseband Demodulator

Here in the Simulation design block for FSK Demodulator M is chosen as 16. Output bit is
taken as Bit. Frequency separation is taken as 2Hz. Samples per symbol is taken as 4. Single
rate processing is enforced. Output data is taken as Double.
Rate Transition Block-

Fig 11. Rate Transition Block


Here in simulation design Rate transition block handles transfer of data due to different
sample times.[9] Here to maintain integrity of data and for synchronization of different
samples timing rate we employ rate transition block to both input of spectrum analyzer. Here
initial condition is reset to 0. Output port sample time is selected as -1.
BER calculator-

Fig 12. Bit Error Rate Calculator

Here in the Simulation design BER calculator block error rate is computed by comparing it to
the delayed version of the transmitted signal.[10] The output block is a three-element vector
consisting of error rate followed by number of errors detected and number of symbols
compared. The parameters we specified is Received delay which is rest to 0. Computation
delay is reset to 0. Here Entire frame is chosen for computation mode.
BER block to Workspace:

Fig 13. BER block to workspace


Here in this simulation design the BER block to workspace is considered in which Data
points to last are limited to 2 and decimation is reset at 1. Format is saved as 3D-array.
Sample time is selected as -1. [11]
Analysis of the Simulation results and the
demonstration:

Fig 14. Spectrum analysis of signals


The Spectrum analyzer display the frequency spectrum of signals.
Here we have considered two ports -One port input signal is coming from the input of
Normal Raised Cosine Receive filter and the other input port signal is coming from the
output of Down-sampler. Here in the X-axis signal frequency is taken in kHz and in the Y-
axis Power signal is taken in dBm. Here sample rate is taken at 2.05 kHz. Here Resolution
bandwidth is taken as 2Hz. Here the Frequency of First harmonic is 0.678kHz and the power
reached at this frequency is -17.83dBm. Here output per samples at the Normal Raised cosine
transmit filter is chosen as 1024. Here SNR is shown at 0.71 for dBc(Decibel for reference
power carrier). Here the Signal Amplitude can be enhanced by increasing the samples per
symbol, vary the roll off factor of both Transmit and Receive Normal Raised Cosine filter.
And by the frequency the signal magnitude can be varied.
Fig 15. Bit Error Rate Analysis
Here in this figure Bit error rate analysis the EbNo is specified at 10 decibels range. By
setting Simulink environment as Simulink and specifying the number of errors as 100 or
Number of bits to 10e8. By comparing Simulation results with theoretical Results in first
iteration BER of exact or Theoretical plot is numerically 0.089859 and the BER of simulation
plot numerically is 0.125
Fig 16. Bit Error Rate diagram of Theoretical and Simulated Graphs

Here in this figure for 16-FSK Modulation BER figure is shown with Eb/No(dB) in the X-
axis and the BER in the Y-axis. Here BER for theoretical vs Simulated plot is graphically
shown and it matches with numerical results in first iteration.
Final Acoustical System Results and
Discussions:
Spectrum analysis Results:

Fig 17. Spectrum analysis after updating parameters

The Spectrum analyzer is a communication tool which displays the frequency spectrum of
signals.
Here we have considered two ports -One port input signal is coming from the input of
Normal Raised Cosine Receive filter and the other input port signal is coming from the
output of Down-sampler. Here in the X-axis signal frequency is taken in kHz and in the Y-
axis Power signal is taken in dBm. Here sample rate is taken at 4.1 kHz. Here Resolution
bandwidth is taken as 4 Hz. Here roll off factor is taken at 0.5. The linear amplitude gain of
Normal Raised cosine transmit filter is 32dB. Similarly the linear amplitude gain of Normal
Raised cosine receive filter is reset to 0.2275dB. Here the updated spectrum is showing 6
Harmonics. Here the Frequency of First harmonic is 0.016kHz and the power reached at this
frequency is
-3.55dBm. The Frequency of second harmonic is 0.032kHz and the power reached at this
frequency is -6.02dBm. The Frequency of third harmonic is 0.048kHz and the power reached
at this frequency is -9.54dBm. Here the Frequency of Fourth harmonic is 0.064kHz and the
power reached at this frequency is -12.04dBm. The Frequency of Fifth harmonic is 0.08 kHz
and the power reached at this frequency is -13.98dBm. Lastly the Frequency of sixth
harmonic is 0.09 kHz and the power reached at this frequency is -15.56dBm. Here output per
samples at the Normal Raised cosine transmit filter is selected as 2048. Here SNR is shown at
2.11 for dBc (Decibel for reference power carrier). Hence it shows improvement in Signal to
Noise ratio.
Eye Diagram Results:

Fig 18. Eye diagram obtained after Normal Raised Cosine Transmit Filter
The eye diagram block displays multiple traces of a modulated signal to produce eye
diagram.[12]. Here we increase sampling frequency to 100Ghz and increase the symbol rate
to 10Ghz and increase the frame length to 500, then there is clear eye opening. It shows that
recovered signal has less effect of distortions and (Inter-symbol interference) ISI due to
proper filtering and adaptive equalization. Below it there is high distortion and (Inter-symbol
interference) ISI.
BER Results:

Fig 19. Bit Error Rate Analysis after updating parameters


Here in this figure Bit error rate analysis the EbNo is specified at 10 decibels range. By
setting Simulink environment as Simulink and specifying the number of errors as 100 or
Number of bits to 10e8. By comparing Simulation results with theoretical Results in first
iteration BER of exact or Theoretical plot is numerically 0.089859 and the BER of simulation
plot numerically is 0.4375 but in second iteration BER of exact or Theoretical plot is
numerically 0.17469 and the BER of simulation plot numerically is 0.4375.
Fig 20. Bit Error Rate diagram of Theoretical and Simulated Graphs after updating
parameters
Here in this figure for 16-FSK Modulation BER figure is depicted with Eb/No(dB) in the X-
axis and the BER in the Y-axis. Here BER for theoretical vs Simulated plot is graphically
shown and it matches with numerical results in first and second iterations.
Conclusions:
By Changing or adjusting parameters of various transmit and receive filters, choosing the
type of modulation and demodulation and adjusting samples of both transmit and receive
filters we can obtain optimum BER and Signal to Noise ratio for a Weak Communication
link.
References:

[1]https://in.mathworks.com/help/comm/ref/bernoullibinarygenerator.html

[2]https://in.mathworks.com/help/comm/ref/mfskmodulatorbaseband.html

[3] https://in.mathworks.com/help/dsp/ref/firinterpolation.html

[4] https://in.mathworks.com/help/comm/ref/raisedcosinetransmitfilter.html

[5] https://in.mathworks.com/help/comm/ref/awgnchannel.html

[6]https://in.mathworks.com/help/comm/ref/raisedcosinereceivefilter.html

[7] https://in.mathworks.com/help/signal/ref/downsample.html

[8] https://in.mathworks.com/help/comm/ref/mfskdemodulatorbaseband.html

[9] https://in.mathworks.com/help/simulink/slref/ratetransition.html

[10] https://in.mathworks.com/help/comm/ref/errorratecalculation.html

[11] https://in.mathworks.com/help/comm/ref/biterrorrateanalysis-app.html

[12] https://in.mathworks.com/help/comm/ref/eyediagramscope.html

You might also like