Ec3501 WC Lab
Ec3501 WC Lab
Ec3501 WC Lab
AIM:
To write a SCILAB program to calculate the median path loss for Okumura model for
outdoor propagation.
THEORY:
The Okumura model for Urban Areas is a Radio propagation model that was built
using the datacollected in the city of Tokyo, Japan. The model is ideal for using in
cities with many urbanstructuresbutnotmany
tallblockingstructures.Themodelserved asabasefortheHataModel. Okumura model
was built into three modes. The ones for urban, suburban and open areas.
Themodel for urban areas was built firstandusedasthebaseforothers.
Coverage
Frequency = 150 MHz to 1920 MHz
Mobile Station Antenna Height: between 1 m and 10 m Base station Antenna
Height: between 30 m and 1000 m Link distance: between 1 km and 100 km
Mathematical formulation
where,
L = The median path loss. Unit: Decibel (dB) LFSL = The Free Space Loss. Unit:
Decibel(dB) AMU = Median attenuation.Unit: Decibel(dB) HMG = Mobile station
antenna height gain factor. HBG = Base station antenna height gain factor.
Kcorrection = Correction factor gain (such as type of environment, water surfaces,
isolated obstacle etc.)
Okumura model does not provide a mean to measure the Free space loss. However,
any standard method for calculating the free space loss can be used.
PROGRAM:
The program for Okumura Model – Outdoor Propagation was simulated successfully.
EX. NO: MODELING OF WIRELESS COMMUNICATION SYSTEMS USING
SCILAB (HATA MODEL)
AIM:
To write a SCILAB program to calculate the median path loss for Hata model for
outdoor propagation.
THEORY:
In wireless communication, the Hata Model for Urban Areas, also known as the Okumura-
Hata model for being a developed version of the Okumura Model, is the most widely used
radio frequency propagation model for predicting the behaviour of cellular transmissions in
built up areas. This model incorporates the graphical information from Okumura model and
develops it further to realize the effects of diffraction, reflection and scattering caused by city
structures. This model also has two more varieties for transmission in Suburban Areas and
Open Areas.
Hata Model predicts the total path loss along a link of terrestrial microwave or other type of
cellular communications.
This particular version of the Hata model is applicable to the radio propagation within urban
areas.
This model is suited for both point-to-point and broadcast transmissions and it is based on
extensive empirical measurements taken.
PCS is another extension of the Hata model. The Walfisch and Bertoni Model is further
advanced.
Coverage
Frequency: 150 MHz to 1500 MHz
Mobile Station Antenna Height: between 1 m and 10 m Base station Antenna Height:
between 30 m and 200 m Link distance: between 1 km and 20 km.
Mathematical formulation
Hata Model for Urban Areas is formulated as:
LU = 69.55 + 26.16 log f – 13.82 log hB – CH + [ 44.9 – 6.55 log hB] log d.
For small or medium sized city,
CH = 0.8 + (1.1 log f – 0.7 )hM – 1.56 log f.
and for large cities,
CH = 8.29 (log (1.54 hM))2 – 1.1 , if 150 ≤ f ≤ 200
CH = 3.2 (log (11.75 hM))2 – 4.97 , if 200 ≤ f ≤ 1500
Where,
OUTPUT:
LU = Path loss in Urban Areas (dB)
hB= Height of base station Antenna. (m)
hM = Height of mobile station Antenna. (m) f= Frequency of Transmission (MHz).
CH = Antenna height correction factor
d= Distance between the base and mobile stations (km).
The term "small city" means a city where the mobile antenna height not more than 10 meters.
i.e. 1 ≤ hM ≤ 10m
PROGRAM:
RESULT:
The program for Hata Model – Outdoor Propagation was simulated successfully.
EX. NO: MODELING AND SIMULATION OF MULTIPATH FADING
CHANNEL
AIM:
To write a SCILAB program to measure performanceofDS-
CDMAusingmixedcodesinmultipathchannelusingRAKE receiver for single user case.
THEORY:
Multipath occurs when a radio signal is split into two or more signals causing the receiving
antenna to receive multiple copies of the same signal. The radio signal can be split by
obstacles such as walls, chairs, tables and other objects. As the signal bounces off an object it
causes a longer path to the receiver. Some signals may bounce off several objects before
reaching the receiver. The longer the path, the greater the amount of delay. As radio signals
are delayed, they reach the receiving antenna at different times sometimes overlapping. The
receiver becomes confused by the signals and is unable to interpret them correctly which
causes data errors requiring retransmission of the signal. Performance can be significantly
reduced by the delayed signals and retransmissions.
CDMA is inherently tolerant to multipath delay spreading signals as any signal that is
delayed by more than one chip time becomes uncorrelated to the PN code used to decode the
signal. This results in the multipath simply appearing as noise. This noise leads to an increase
in the amount of interference seen by each user subjected to the multipath and thus increases
the received BER. The BER is essentially flat for delay spreadings of greater than one chip
time (0.8 ms), which is to be expected as the reflected signal becomes uncorrelated. Also the
multipath delay spreading leads to an increase in the equivalent number of users in the cell, as
it increases the amount of interference seen by the receiver.
RAKE Receiver
A RAKE receiver is a radio receiver designed to nullify the effect of multipath fading. It uses
number of sub-receivers called fingers. Each finger is a correlator and is designed to a
different multipath component. Each finger independently decodes a single multipath
component. The output of all the correlators is combined to increase the SNR in a multipath
environment. The multipath channel through which a radio wave transmits can be viewed as
transmitting the line of sight wave plus a number of multipath components. Multipath
components are delayed copies of the original transmitted wave traveling through a different
echo path, each with a different magnitude and time of arrival at the receiver. Since each
component contains the original information, if the magnitude and phase of each component
is computed at the receiver through a method called channel estimation then all the
components can be added coherently to improve the information reliability. The RAKE
receiver is so named because it looks like a garden rake, each finger collecting the symbol
IMPLEMENTATION:
TRANSMITTER :
energy similar to how the fingers in a garden rake collects leaves. To minimize the distortions
introduced in the DS-CDMA systems, RAKE receiver uses a technique called diversity.
RAKE Receiver
In our case, RAKE receiver has 2 fingers. Each finger of the receiver process one path of the
composite multipath signal. All the processing in the RAKE fingers should be done at chip
level. Here c(k)indicates the spreading code used for that particular user. h0 and hL are the
multipath channel coefficients. LTc is the delay that is used in the multipath channel model.
MRC is the optimum way (in the sense of the least BER) to use information from different
paths to achieve decoding in an additive white Gaussian channel (AWGN)
In certain cases, it is not convenient to provide for the variable weighting capability required
for true maximal ratio combining. In such cases, the branch weights are all set to unity, but
the signals from each branch are co-phased to provide equal gain combining diversity. This
allows the receiver to exploit signals that are simultaneously received on each branch. The
possibility of producing an acceptable signal from a number of unacceptable inputs is still
retained, and performance is only marginally inferior to MRC The receiver corrects the phase
rotation of the received signals caused by the fading channel and combines the received
signals of different paths with equal weight. In a Rayleigh fading channel, the MRC
performance is the best, followed by EGC. The performance of MRC is the same as that of
EGC if signals from each path are of equal strength.
IMPLEMENTATION:
RECEIVER:
OUTPUT:
LU = Path loss in Urban Areas (dB)
hB= Height of base station Antenna. (m)
hM = Height of mobile station Antenna. (m) f= Frequency of Transmission (MHz).
CH = Antenna height correction factor
d= Distance between the base and mobile stations (km).
The term "small city" means a city where the mobile antenna height not more than 10 meters.
i.e. 1 ≤ hM ≤ 10m
RESULT:
AIM:
To write a SCILAB program to basic aspects of CDMA in single user case and two
user case.
THEORY:
Shannon’s formula for channel capacity is a relationship between achievable bit rate, signal
bandwidth and Signal to Noise Ratio (SNR).
When the signal is much smaller than the noise or under very low SNR condition the above
relationship becomes much simpler as given below.
Bandwidth Sharing
If the proper modulation codes are selected, it is feasible to have multiple pairs of receivers
and transmitters occupying the same bandwidth
Security
It is very difficult to intercept the signal if the modulation code of spread spectrum
transmission is not known. If the proper spreading code is not known to demodulate, the
signal will be seen as random electrical noise and not as useful signal. And also spread
spectrum link puts out much less power per bandwidth than a conventional radio link, having
spreading it over a wider bandwidth and hence a knowledge of the link’s spreading code is
required to demodulate. Hence it is very difficult to detect.
Immunity to Interference
If an external radio signal interferes with the spread spectrum signal, it will be rejected by the
demodulator much as random noise and hence provide excellent error rate even with faint
signals.
IMPLEMENTATION:
TRANSMITTER :
energy similar to how the fingers in a garden rake collects leaves. To minimize the distortions
introduced in the DS-CDMA systems, RAKE receiver uses a technique called diversity.
RAKE Receiver
In our case, RAKE receiver has 2 fingers. Each finger of the receiver process one path of the
composite multipath signal. All the processing in the RAKE fingers should be done at chip
level. Here c(k)indicates the spreading code used for that particular user. h0 and hL are the
multipath channel coefficients. LTc is the delay that is used in the multipath channel model.
MRC is the optimum way (in the sense of the least BER) to use information from different
paths to achieve decoding in an additive white Gaussian channel (AWGN)
In certain cases, it is not convenient to provide for the variable weighting capability required
for true maximal ratio combining. In such cases, the branch weights are all set to unity, but
the signals from each branch are co-phased to provide equal gain combining diversity. This
allows the receiver to exploit signals that are simultaneously received on each branch. The
possibility of producing an acceptable signal from a number of unacceptable inputs is still
retained, and performance is only marginally inferior to MRC The receiver corrects the phase
rotation of the received signals caused by the fading channel and combines the received
signals of different paths with equal weight. In a Rayleigh fading channel, the MRC
performance is the best, followed by EGC. The performance of MRC is the same as that of
EGC if signals from each path are of equal strength.
IMPLEMENTATION:
RECEIVER:
OUTPUT:
RESULT:
The program to SCILAB program to basic aspects of CDMA in single user case and
two user case was simulated successfully.
EX. NO: MODULATION: SPREAD SPECTRUM – DSSS MODULATION
& DEMODULATION
AIM:
To write a SCILAB program to modulate and demodulate Direct Sequence Spread
Spectrum techniques.
THEORY:
.
DSBSC signal is demodulated using product detection, both sidebands re multiplied
with a local carrier that must be synchronized to the transmitter’s carrier that is , it has the
same frequency and phase. Doing so produces two messages that are in phase with each other
and so add to form a single bigger message.
Direct sequence spread spectrum is a variation of DSBSC modulation scheme with a pulse
train for the carrier instead of a simple sinewave. This may sound radical until you remember
that pulse trans are actually made up of a theoretically infinite number of sinewaves. That
being the cse, spread spectrum is really the DSBSC modulation of a theoretically infinite
number of sinusoidal carrier signals. The result is a theoretically infinite number of pairs of
tiny sidebands about a suppressed carrier.
The only way to obtain the right number of sinewaves at the right frequency and
phase at the receiver is to use a pulse train with an identical sequence to that used by the
transmitter. Moreover, it must be synchronized. This issue gives spread spectrum another of
its advantages over other modulation schemes. The transmitted signal is effectively
encrypted.
Of course, with trial and error its possible for an unauthorized person to guess the correct PN
sequence to use for their receiver. However, this can be made difficult by making the
sequence longer before it repeats itself. Longer sequences can produce more combinations of
unique codes which would take longer to guess using a trial and error approach. To illustrate
this point , an 8 bit code has 256 combinations while a 20 bit code has 1048575
combinations. A 256 bit code has 1.1579*1077 combinations.
Increasing the sequence’s chip-length has another advantage. To explain, the total
energy in a spread spectrum signal is distributed between all of the tiny DSBSC that make it
up. A mathematical technique called Fourier Analysis shows that the greater the number of
chips in a sequence before repeating, the greater the number of sinewaves of significance
needed to make it.
That being the case, using more chips in the transmitter’s PN sequence products more
DSBSC signals and so the signal’s total energy is distributed more thinly between them. This
in turn means that the individual signals are many and extremely small. Infact , if the PN
sequence is long enough, all of these DSBSC signals are smaller than the background
electrical noise that’s always present in free space. This fact gives spread spectrum yet
another important advantage. The signal is difficult to detect.
Spread spectrum finds use in several digital applications including: CDMA mobile phone
technology, cordless phones. The global positioning system and two of the 805.11 Wi-fi
standards
IMPLEMENTATION:
Spreading codes
The spreading code or the PN sequence should be ideally balanced with equal number of
ones and zeros over the length of the sequence as well as cryptographically secure. Some of
the most popular PN sequences are Barker, M – Sequence, Gold and Walsh. More complex
sequences provide a more robust link but the implementation becomes very expensive. We
have Orthogonal spreading codes, Non-Orthogonal spreading codes and Mixed spreading
codes. Orthogonal codes are generated using Walsh-Hadamard series and the Non-orthogonal
codes are generated using Linear Feedback Shift Register (LFSR). The mixed codes are
generated by multiplying the orthogonal and non-orthogonal codes. The orthogonality
property of the orthogonal codes is very important for any communication system. Because
of the orthogonality property, two orthogonal signals can be transmitted at the same time and
will not interfere with each other. But the auto correlation function of the Walsh – Hadamard
matrix can have more than one peak and therefore it is not possible for the receiver to detect
the beginning of code word without an external synchronization scheme. Also the cross
correlation can also be non- zero for a number of time shifts and un-synchronous users can
interfere with each other. The spreading is not over the entire bandwidth instead it is over a
number of discrete frequency component. Orthogonally is affected by multi-path effect.
Gold sequences are popular for Non-orthogonal codes. Here the transmission can be
asynchronous. The receiver can synchronize using the auto correlation property of the Gold
Sequence.
IMPLEMENTATION:
GENERATING A DSSS SIGNAL USING SPEECH:
As DSSS is basically just DSBSC with a pulse train for the carrier instead of a simple
sinusoid, it can be generated by implementing the mathematical model for DSBSC.
1. Gather a set of the equipment listed on the previous page.
2. Set up the scope per the instructions in experiment 1.
a. The Trigger source control is set to the CHI position
b. The Moe control is set to the CHI position.
3. Set the scope’s Trigger source coupling control the t he HF REJ position.
4. Locate the sequence Generator module and set its dip-switches to 00
a. To do this, push both switches up.
5. Connect the set-up shown in Figure 1 below.
a. Note : Insert the black plugs of the oscilloscope leads into a ground (GND) socket.
6. Adjust the scope’s Time base control to view two or more cycles of the Master signals
modules 2 kHz sine output.
7. Set the scope’s Mode control to the DUAL position to view the DSSS signal out of
the Multiplier Module as well as the message signal.
8. Adjust the scope’s Vertical Attenuations controls to the appropriate settings for the
signals.
9. Draw the two waveforms to scale in the space provided on the next page leaving room
to draw a third waveform.
a. Tip: Draw the message signal in the upper third of the graph and DSSS signal in the
middle third.
10. Use the scope’s channel 1 Vertical position control to overlay the message with the
DSSS signal’s envelope’s and compare them.
Interferences occurs when an unwanted electrical signal gets added to the transmitted signal
and changes it enough to change the recovered message. Electrical noise is a significant
source of unintentional interference.
However, sometimes noise is deliberately added to the transmitted signal for the purpose of
interfering or Jamming it. The next part of the experiment models deliberate interference to
show how spread spectrum signals are highly resistant to it.
OUTPUT:
RESULT:
Aim:
To write a ns2 program for implementing destination sequence distance vector
protocol.
Software Required:
Turbo C, C++
Algorithm:
Program:
#include<stdio.h>struct node
{
unsigneddist[20]; unsigned from[20];
}rt[10];
int main()
{
intdmat[20][20]; intn,i,j,k,count=0;
printf("\nEnter the number of nodes : "); scanf("%d",&n);
printf("\nEnter the cost matrix :\n"); for(i=0;i<n;i++)
for(j=0;j<n;j++)
{
scanf("%d",&dmat[i][j]); dmat[i][i]=0; rt[i].dist[j]=dmat[i][j]; rt[i].from[j]=j;
}
do
{
count=0;
for(i=0;i<n;i++) for(j=0;j<n;j++) for(k=0;k<n;k++)
if(rt[i].dist[j]>dmat[i][k]+rt[k].dist[j])
}while(count!=0); for(i=0;i<n;i++)
{
rt[i].dist[j]=rt[i].dist[k]+rt[k].dist[j]; rt[i].from[j]=k;
count++;
Thus the ns2 program for implementing destination sequence distance vector
protocol.was executed and verified successfully.