EX NO: 01 Wireless Channel Simulation Including Fading and Doppler Effects 05-11-20 Aim
EX NO: 01 Wireless Channel Simulation Including Fading and Doppler Effects 05-11-20 Aim
AIM:
To simulate and study the fading effects of AWGN and Rayleigh channel conditions using
MATLAB simulation environment.
REQUIREMENTS:
THEORY:
Fading: In wireless communications, fading is variation of the attenuation of a signal with various
variables. These variables include time, geographical position, and radio frequency. Fading is often modeled
as a random process. A fading channel is a communication channel that experiences fading. In wireless
systems, fading may either be due to multipath propagation, referred to as multipath-induced fading, weather
(particularly rain), or shadowing from obstacles affecting the wave propagation, sometimes referred to
as shadow fading.The presence of reflectors in the environment surrounding a transmitter and receiver create
multiple paths that a transmitted signal can traverse. As a result, the receiver sees the superposition of
multiple copies of the transmitted signal, each traversing a different path. Each signal copy will experience
differences in attenuation, delay and phase shift while travelling from the source to the receiver. This can
result in either constructive or destructive interference, amplifying or attenuating the signal power seen at
the receiver. Strong destructive interference is frequently referred to as a deep fade and may result in
temporary failure of communication due to a severe drop in the channel signal-to-noise ratio.
A common example of deep fade is the experience of stopping at a traffic light and hearing an FM
broadcast degenerate into static, while the signal is re-acquired if the vehicle moves only a fraction of a
meter. The loss of the broadcast is caused by the vehicle stopping at a point where the signal experienced
severe destructive interference. Cellular phones can also exhibit similar momentary fades.Fading channel
models are often used to model the effects of electromagnetic transmission of information over the air in
cellular networks and broadcast communication. Fading channel models are also used in underwater
acoustic communications to model the distortion caused by the water.
Slow versus fast fading
The terms slow and fast fading refer to the rate at which the magnitude and phase change imposed by the
channel on the signal changes. The coherence time is a measure of the minimum time required for the
magnitude change or phase change of the channel to become uncorrelated from its previous value.
Slow fading arises when the coherence time of the channel is large relative to the delay requirement of
the application.[1] In this regime, the amplitude and phase change imposed by the channel can be
considered roughly constant over the period of use. Slow fading can be caused by events such
as shadowing, where a large obstruction such as a hill or large building obscures the main signal path
between the transmitter and the receiver. The received power change caused by shadowing is often
modeled using a log-normal distribution with a standard deviation according to the log-distance path
loss model.
Fast fading occurs when the coherence time of the channel is small relative to the delay requirement of
the application. In this case, the amplitude and phase change imposed by the channel varies considerably
over the period of use.
In a fast-fading channel, the transmitter may take advantage of the variations in the channel conditions
using time diversity to help increase robustness of the communication to a temporary deep fade. Although a
deep fade may temporarily erase some of the information transmitted, use of an error-correcting
code coupled with successfully transmitted bits during other time instances (interleaving) can allow for the
erased bits to be recovered. In a slow-fading channel, it is not possible to use time diversity because the
transmitter sees only a single realization of the channel within its delay constraint. A deep fade therefore
lasts the entire duration of transmission and cannot be mitigated using coding.
The coherence time of the channel is related to a quantity known as the Doppler spread of the channel.
When a user (or reflectors in its environment) is moving, the user's velocity causes a shift in the frequency of
the signal transmitted along each signal path. This phenomenon is known as the Doppler shift. Signals
traveling along different paths can have different Doppler shifts, corresponding to different rates of change
in phase. The difference in Doppler shifts between different signal components contributing to a signal
fading channel tap is known as the Doppler spread. Channels with a large Doppler spread have signal
components that are each changing independently in phase over time. Since fading depends on whether
signal components add constructively or destructively, such channels have a very short coherence time.
In general, coherence time is inversely related to Doppler spread, typically expressed as
Block fading: Block fading is where the fading process is approximately constant for a number of symbol
intervals. [3] A channel can be 'doubly block-fading' when it is block fading in both the time and frequency
domains.[4]
Selective fading: Selective fading or frequency selective fading is a radio propagation anomaly caused by
partial cancellation of a radio signal by itself — the signal arrives at the receiver by two different paths, and
at least one of the paths is changing (lengthening or shortening). This typically happens in the early evening
or early morning as the various layers in the ionosphere move, separate, and combine. The two paths can
both be skywave or one be groundwave.
Selective fading manifests as a slow, cyclic disturbance; the cancellation effect, or "null", is deepest at one
particular frequency, which changes constantly, sweeping through the received audio.
As the carrier frequency of a signal is varied, the magnitude of the change in amplitude will vary.
The coherence bandwidth measures the separation in frequency after which two signals will experience
uncorrelated fading.
As the carrier frequency of a signal is varied, the magnitude of the change in amplitude will vary.
The coherence bandwidth measures the separation in frequency after which two signals will experience
uncorrelated fading.
In flat fading, the coherence bandwidth of the channel is larger than the bandwidth of the signal.
Therefore, all frequency components of the signal will experience the same magnitude of fading.
In frequency-selective fading, the coherence bandwidth of the channel is smaller than the bandwidth of
the signal. Different frequency components of the signal therefore experience uncorrelated fading.
Since different frequency components of the signal are affected independently, it is highly unlikely that all
parts of the signal will be simultaneously affected by a deep fade. Certain modulation schemes such
as orthogonal frequency-division multiplexing (OFDM) and code division multiple access (CDMA) are
well-suited to employing frequency diversity to provide robustness to fading. OFDM divides the wideband
signal into many slowly modulated narrowband subcarriers, each exposed to flat fading rather than
frequency selective fading. This can be combated by means of error coding, simple equalization or
adaptive bit loading. Inter-symbol interference is avoided by introducing a guard interval between the
symbols called a cyclic prefix. CDMA uses the rake receiver to deal with each echo separately.Frequency-
selective fading channels are also dispersive, in that the signal energy associated with each symbol is spread
out in time. This causes transmitted symbols that are adjacent in time to interfere with other. Equalizers are
often deployed in such channels to compensate for the effects of the intersymbol interference.The echoes
may also be exposed to Doppler shift, resulting in a time varying channel model.The effect can be
counteracted by applying some diversity scheme, for example OFDM (with
subcarrier interleaving and forward error correction), or by using two receivers with
separate antennas spaced a quarter-wavelength apart, or a specially designed diversity receiver with two
antennas. Such a receiver continuously compares the signals arriving at the two antennas and presents the
better signal.
Upfade: Upfade is a special case of fading, used to describe constructive interference, in situations where a
radio signal gains strength.[5] Some multipath conditions cause a signal's amplitude to be increased in this
way because signals travelling by different paths arrive at the receiver in phase and become additive to the
main signal. Hence, the total signal that reaches the receiver will be stronger than the signal would otherwise
have been without the multipath conditions. The effect is also noticeable in wireless LAN systems.
ALGORITHM:
1. At the transmitter side, the input data is sent as binary bits into the modulator.
2. The input bits are modulated using BPSK (Binary Phase Shift Keying) and QPSK (Quadrature
Phase Shift Keying) at the modulator and transmitted through the wireless channel.
3. A wireless AWGN channel is first considered with an SNR value.
4. At the receiver side the transmitted bits are received and demodulated using the same.
5. The final output data is obtained.
6. These bits are now compared with the input bits and the bit error rate (BER) is found.
7. This can be performed for different values of SNR (Signal to Noise Ratio) and even for different
wireless channel models.
clc;
clearall;
closeall;
data=randi([0 1],1,100);
M=2;
txsig=pskmod(data,M);
scatterplot(txsig)
% hold on
SNR=1;
rxsig=awgn(txsig,SNR);
scatterplot(rxsig)
demod_data=pskdemod(rxsig,M);
[number,ratio] = biterr(data,demod_data)
OUTPUT:
0.8
1
0.6
0.4 0.5
Quadrature
Quadrature
0.2
0
0
-0.2
-0.5
-0.4
-0.6 -1
-0.8
-1.5
-1 -1.5 -1 -0.5 0 0.5 1 1.5
-1 -0.5 0 0.5 1 In-Phase
In-Phase
10 0
4 QAM
8 QAM
16 QAM
BPSK
10 -2
BER
10 -4
10 -6
10 -8
0 5 10 15 20 25 30
Eb /N0 (dB)
Figure: Fading Effects of AWGN channel depicted via SNR vs BER plot
PROGRAM CODE: RAYLEIGH CHANNEL FADING
clc;
clearall;
closeall;
fs=10000;
data=randi([0 1],1,100);
M=2;
txsig=pskmod(data,M);
scatterplot(txsig)
% hold on
SNR=1;
% rxsig=awgn(txsig,SNR);
ts=1/fs;
fd=10;
chan = rayleighchan(ts,fd);
rxsig=filter(chan,txsig);
scatterplot(rxsig)
demod_data=pskdemod(rxsig,M);
[number,ratio] = biterr(data,demod_data)
OUTPUT:
Scatter plot Scatter plot
1 1.5
0.8
0.6 1
0.4
0.5
Quadrature
0.2
Quadrature
0
0
-0.2
-0.4 -0.5
-0.6
-0.8 -1
-1
-1 -0.5 0 0.5 1 -1.5
In-Phase -1.5 -1 -0.5 0 0.5 1 1.5
In-Phase
Figure: Fading Effects of Rayleigh channel (Doppler shift 40 hertz) depicted via scatterplot
10 0
4 QAM
8 QAM
16 QAM
BPSK - AWGN
10 -2
BER
10 -4
10 -6
10 -8
0 5 10 15 20 25 30
Eb/N0 (dB)
Figure: Fading Effects of Rayleigh channel (4 QAM, 8 QAM, 16 QAM) AWGN (BPSK) depicted via
SNR vs BER plot
RESULT:
Thus the fading and Doppler effects of AWGN and Rayleigh wireless channel have been simulated
and studied using MATLAB simulation program.