Wireless Communication Record
Wireless Communication Record
COMMUNICATION ENGINEERING
LAB RECORD
EC3501-WIRELESS COMMUNICATION
LABORATORY
NAME :……………………………..
REGISTER NO :……………………………...
YEAR/SEM : III / V
ACADEMIC YEAR : 2024-2025
CERTIFICATE
NAME :
REGISTER NUMBER :
SEMESTER :
BRANCH :
YEAR :
COMMUNICATION LABORATORY”.
PAGE MARKS
S.NO DATE NAME OF THE EXPERIMENTS SIGNATURE
NO. AWARDED
DESIGN A WIRELESS
7 CHANNELEQUALIZATION :
ADAPTIVE EQUALIZER (ADE).
% Okumura-Hata Model
A = 69.55; % Model parameter
% Plotting
figure;
plot(distance, Pr_two_ray, 'b-', 'LineWidth', 2);
hold on;
plot(distance, PL_okumura_hata, 'r--', 'LineWidth', 2);
xlabel('Distance (m)');
ylabel('Received Power/Path Loss (dB)');
grid on;
OUTPUT:
CODING:
% Simulation parameters
figure;
subplot(2,1,1);
legend('In-phase', 'Quadrature');
xlabel('Time');
ylabel('Amplitude');
subplot(2,1,2);
plot(t, real(rxSignal), 'b', t, imag(rxSignal), 'r');
title('Received Signal');
legend('In-phase', 'Quadrature');
xlabel('Time');
ylabel('Amplitude');
OUTPUT:
CODING:
% Define simulation parameters
numBits 1e6; % Number of bits to transmit
EbNo_dB=10; % Eb/No in dB
% Generate QPSK symbols
txSymbols = randi([03], 1, numBits);
modulatedSymbols = pskmod(txSymbols, 4, pi/4);
% Add noise to the symbols
EbNo=10^(EbNo_dB/10);
noise Var = 1/(2* EbNo); noise = sqrt(noise Var) randn(size(modulatedSymbols));
rxSymbols modulatedSymbols + noise;
% Apply Rayleigh fading channel
fadeChannel = rayleighchan (1/1000, 30);
fadedSymbols = filter(fadeChannel, rxSymbols);
% Demodulate received symbols
demodulatedSymbols = pskdemod(fadedSymbols, 4, pi/4);
% Calculate Bit Error Rate (BER)
numErrors = sum(txSymbols ~= demodulatedSymbols);
ber = numErrors/numBits;
% Display results
fprintf(‘Bit Error Rate (BER): %.4f\n’, ber);
OUTPUT:
Bit Error Rate (BER): 0.7512
CODING:
% DSSS Modulation and Demodulation Example
%Parameters
Data = [1101011001]; % Original data signal
% DSSS Modulation
modulatedSignal = [];
for i = 1:length(data)
chips = repmat(data(i), 1, spreading Factor)* spreadingCode;
% DSSS Demodulation
demodulatedSignal = [];
for i = 1:length(modulatedSignal)/spreadingFactor
else
demodulatedSignal = [demodulatedSignal 0];
end
end 10
% Display Results
disp('Original Data:');
disp(data);
disp('Demodulated Data:");
disp(demodulatedSignal);
OUTPUT:
Original Data:
10101100
Demodulated Data:
10101100
CODING:
%Zero-Forcing Equalizer (ZFE) MATLAB code
% Zero-Forcing Equalizer
L=length(h);
for n=1:N
received_symbols received_signal(n:n+L-1);
error = symbols(n)-equalized_symbols(n);
end
disp('Original Symbols:');
disp(symbols);
disp('Equalized Symbols:');
disp(equalized_symbols);
OUTPUT:
Original Symbols:
Columns 1 through 19
1101100111011010011
Columns 20 through 38
1101111101010000110
Columns 39 through 57
1000110001110110001
Columns 58 through 76
0101011111000101010
Columns 77 through 95
0010011110110100111
Columns 96 through 100
01000
Equalized Symbols:
Columns 1 through 11
0 1.0242 1.0351 -0.0148 0.8118 0.8423 0.2395 0.3127 0.8637 0.5667 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
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
CODING:
%Parameters
% Modulation
% Channel
% Add noise
SNR=10^(SNRdB/10);
pilotSignal = receivedSignal(pilotIndices);
estimatedChannel = estimatedChannel(end-length(channel)+1:end);
% MMSE equalization
equalizer Coefficients conj(estimated Channel) / (abs(estimated Channel).^2 + noiseVar);
% Demodulation
bitErrorRate = bitErrors/N;
modulated_symbols = 2 * data_symbols - 1;
length(received symbols)));
for i = equalizer_length:length(received_symbols_noisy)
received_window = received_symbols_noisy(i:-1:i-equalizer_length+1);
% Compute the equalizer output
end