WC Lab Manual
WC Lab Manual
SYLLABUS
1. Modeling of wireless communication systems using Matlab (Two ray channel and Okumura
– Hata model)
3. Design, analyze and test Wireless standards and evaluate the performance measurements such
as BER, PER, BLER, throughput, capacity, ACLR, EVM for 4G and 5G using Matlab
6. Modeling and simulation of TDMA, FDMA and CDMA for wireless communication
COURSE OUTCOMES
● To study and Understand Mobile Radio Propagation and Various Digital Modulation Techniques.
1
EXPERIMENT 1:
AIM: To design a model of wireless communication systems using Matlab (Two ray channel
and Okumura –Hata model)
CODING:
% System Parameters
L = 1; % System loss
% Okumura-Hata Model
2
% Plotting
figure;
hold on;
xlabel('Distance (m)');
grid on;
Output:
VIVA QUESTIONS :
3
EXPERIMENT 2:
CODING:
% Simulation parameters
end
t = 1:numSamples;
figure;
subplot(2,1,1);
title('Transmitted Signal');
legend('In-phase', 'Quadrature');
xlabel('Time');
ylabel('Amplitude');
subplot(2,1,2);
4
title('Received Signal');
legend('In-phase',
'Quadrature'); xlabel('Time');
ylabel('Amplitude');
OUTPUT :
RESULT:
Thus the designing of a Model and simulation of Multipath fading channel has been achieved
VIVA QUESTIONS :
1. What is multipath fading channel?
2. What are the effects of multipath fading?
3. What are multipath channels?
4. What are the causes of multipath?
5. What is the advantage of multipath?
6. How do you reduce multipath effects?
7. What are the disadvantages of multipath
5
EXPERIMENT 3:
AIM : Design, analyze and test Wireless standards and evaluate the performance measurements such as
BER, PER, BLER, throughput, capacity, ACLR, EVM for 4G and 5G using Matlab.
CODING:
EbNo = 10^(EbNo_dB/10);
noiseVar = 1 / (2 * EbNo);
% Display results
6
OUTPUT:
RESULT: Thus designing, analyzing and testing Wireless standards and evaluating the performance
measurements such as BER, PER, BLER, throughput, capacity, ACLR, EVM for 4G and 5G using Matlab h as
been achieved
VIVA QUESTIONS
1. What is the ACLR measurement in Matlab?
2. What is the ACLR requirement?
3. How to generate 5G signal in MATLAB?
4. What is the use of 5G toolbox in Matlab?
5. What is the full form of ACLR?
6. How do 5G antennas work?
7. What is the use of 5G toolbox in Matlab?
7
EXPERIMENT 4:
CODING:
% Parameters
spreadingFactor = length(spreadingCode);
% DSSS
Modulation
modulatedSignal = [];
for i = 1:length(data)
end
% DSSS Demodulation
demodulatedSignal = [];
for i = 1:length(modulatedSignal)/spreadingFactor
chips = modulatedSignal((i-1)*spreadingFactor+1:i*spreadingFactor);
chipSum = sum(chips);
if chipSum>= spreadingFactor/2
else
end
end
8
% Display Results
disp('Original Data:');
disp(data);
disp('Demodulated Data:');
disp(demodulatedSignal);
OUTPUT:
Original Data:
1 0 1 0 1 1 0 0
Demodulated Data:
1 0 1 0 1 1 0 0
RESULT: Thus designing modulation: Spread Spectrum – DSSS Modulation & Demodulation has
been achieved
VIVA QUESTIONS:
9
EXPERIMENT 5:
CODING :
% Zero-Forcing Equalizer
L = length(h);
for n = 1:N
received_symbols = received_signal(n:n+L-1);
10
% Perform zero-forcing equalization
end
disp('Original Symbols:');
disp(symbols);
disp('Equalized Symbols:');
disp(equalized_symbols);
OUTPUT:
Original Symbols:
Columns 1 through 19
1 1 0 1 1 0 0 1 1 1 0 1 1 0 1 0 0 1 1
Columns 20 through 38
1 1 0 1 1 1 1 1 0 1 0 1 0 0 0 0 1 1 0
Columns 39 through 57
1 0 0 0 1 1 0 0 0 1 1 1 0 1 1 0 0 0 1
Columns 58 through 76
0 1 0 1 0 1 1 1 1 1 0 0 0 1 0 1 0 1 0
11
Columns 77 through 95
0 0 1 0 0 1 1 1 1 0 1 1 0 1 0 0 1 1 1
0 1 0 0 0
Equalized Symbols:
Columns 1 through 11
1.0034
Columns 12 through 22
0.3164 0.8987 0.7162 -0.0194 0.8262 0.2108 0.3684 1.3409 0.6328 0.5942
0.7986
Columns 23 through 33
0.3903 1.3034 0.9963 0.6816 0.6242 0.6419 0.1078 0.9584 -0.0282 0.4643 -
0.0959
Columns 34 through 44
0.3857 0.3709 0.1746 1.1529 0.6859 -0.3254 0.6316 -0.1321 0.2851 0.6131
0.9881
Columns 45 through 55
0.1328 -0.3112 0.5753 0.4748 1.4226 0.8176 0.5202 0.2300 0.9991 0.4921 -
0.2495
Columns 56 through 66
0.2145 0.5610 1.0497 -0.3251 1.0165 -0.0410 1.1669 0.3767 1.3984 0.8522
0.7683
12
Columns 67 through 77
0.6932 0.4118 -0.0997 0.1789 0.1747 1.2491 0.0166 1.0660 -0.0451 0.5827 -
0.1786
Columns 78 through 88
0.2406 0.4407 0.5875 -0.0514 0.5994 1.4474 0.8587 0.6711 0.4184 0.5040
1.2422
Columns 89 through 99
0.4668 -0.0972 0.6936 -0.1060 0.7651 1.3313 0.6154 0.7091 0.0191 0.5241 -
0.1900
Column 100
0.0171
2. MMSE CODE
% Parameters
% Modulation
13
% Channel
% Add noise
SNR = 10^(SNRdB/10);
noiseVar = 1/(2*SNR);
pilotSignal = receivedSignal(pilotIndices);
estimatedChannel = estimatedChannel(end-length(channel)+1:end);
% MMSE equalization
% Demodulation
bitErrorRate = bitErrors / N;
14
output:
ADE:
% Parameters
modulated_symbols = 2 * data_symbols - 1;
equalizer_length = channel_length; % Set the equalizer length to match the channel length
15
for i = equalizer_length:length(received_symbols_noisy)
received_window = received_symbols_noisy(i:-1:i-equalizer_length+1);
end
output:
16
EXPERIMENT 6:
AIM: To model and simulate TDMA, FDMA and CDMA for wireless communication
CODING:
1.TDMA
numUsers = 4;
timeSlotDuration = 1; % seconds
totalTimeSlots = 10;
channelGain = 0.8;
if userSlots(slot) == user
end
end
end
17
% Step 6: Evaluate Performance Metrics (e.g., BER)
figure;
subplot(2, 1, 1);
stem(timeSlots, userData');
title('User Traffic');
xlabel('Time (s)');
ylabel('Data');
subplot(2, 1, 2);
stem(timeSlots, receivedData');
title('Received Data');
xlabel('Time (s)');
ylabel('Data');
Output :
18
2.FDMA:
% System parameters
% Time parameters
time = 0:1/samplingFrequency:timeDuration;
for i = 1:numUsers
userSignals(i, :) = sin(2*pi*userFrequency*time);
end
19
% Create the FDMA signal
for i = 1:numUsers
end
figure;
subplot(numUsers+1, 1, 1);
plot(time, fdmaSignal);
title('FDMA Signal');
xlabel('Time (s)');
ylabel('Amplitude');
for i = 1:numUsers
subplot(numUsers+1, 1, i+1);
xlabel('Time (s)');
ylabel('Amplitude');
end
20
Output:
3.CDMA:
user2Symbols = 2 * user2Bits - 1;
chipSequence = [1, -1, 1, 1, -1, 1, -1, -1]; % Chip sequence for spreading
21
% Add AWGN (Additive White Gaussian Noise)
% Display results
Output:
Result : Thus modeling and simulation of TDMA, FDMA and CDMA for
wireless communication has been achieved.
22
Viva Questions:
1. What is the basic principle of TDMA?
2. What is TDMA used for?
3. Why GSM is called TDMA?
4. What is the basic principle of FDMA?
5. What is the frequency range of FDMA?
6. What are the applications of FDMA?
7. What is the principle of CDMA?
8. What technology is used in CDMA?
9. What is the noise power of a CDMA system?
23