Professional Documents
Culture Documents
Mini Project LEB 41403 2020
Mini Project LEB 41403 2020
Objectives:
1. To design multiple antenna system for high data rates signal transmission.
3. To evaluate Bit Error rate (BER) and signal-to-noise (SNR) ratio of the system.
Introduction:
Future wireless communications deployed smart antenna systems to gain high speed data transmission.
The system should carries variable input packets to meet the requirements by the users with maximum
bandwidth and low power consumption. The idea of smart antenna is having the number of transmitters
and also receivers. The multiple input and multiple output (MIMO) system shown in Figure 1, which
covers the development of Frequency Division Multiplexing (FDM) and Orthogonal Frequency Division
Multiplexing (OFDM). Figure 2 and Figure 3 shows the system model of a transmitter and a receiver
respectively.
Figure 1
Figure 2
Figure 3
Procedure:
n = 7;
k=4;
msg_size=100;
msg=randint (msg_size,k,[0,1]);
numPlot=4;
xlabel (‘Time’);
ylabel (‘Amplitude’);
grid;
For t=1:k
if t==1;
ant1(z,t)=msg(z,1);
ant2(z,t)=abs(-conj (msg (z,2)));
ant3(z,t)=conj (msg(z,3));
ant4(z,4) = 0;
elseif t==2;
ant1(z,t)=msg (z,2);
ant2(z,t)=conj(msg(z,1));
ant3(z,t) = 0;
elseif t==3;
ant1(z,t)=conj (msg(z,3));
ant2(z,t)=0;
elseif t==4;
ant1 (z,t) = 0;
ant3(z,t) = msg(z,2);
ant4(z,4)= msg(z,1);
end
end
end
%Encode Signals
Ant1
Ant2
Ant3
Ant4
%MIMO Signals
SubPlot (1,4,1);
Xlabel (‘Time’);
Ylabel (‘Amplitude’);
Grid;
SubPlot (1,4,2);
Xlabel (‘Time’);
Ylabel (‘Amplitude’);
Grid;
SubPlot (1,4,3);
Xlabel (‘Time’);
Ylabel (‘Amplitude’);
Grid;
SubPlot (1,4,4);
Xlabel (‘Time’);
Ylabel (‘Amplitude’);
Grid;
Figure (3)
subPlot (1,4,1);
numPlot = 7;
xlabel (‘Time’);
ylabel(‘Amplitude’);
Grid;
subPlot (1,4,2);
numPlot = 7;
xlabel (‘Time’);
ylabel(‘Amplitude’);
subPlot (1,4,3);
numPlot = 7;
xlabel (‘Time’);
ylabel(‘Amplitude’);
Grid;
subPlot (1,4,4);
numPlot = 7;
xlabel (‘Time’);
ylabel(‘Amplitude’);
Grid;
Fd=1/2;
Fc1 = 1;
Fc2 = 2;
Fc3 = 3;
Fc4 = 4;
N=fs/fd;
M=4;
SNRpBit = 14;
SNR= SNRpBit/log2(M);
%Modulate All Signals
%Modulation Antenna 1
For z = 1:msg_size
K1= code1(z,: );
Msg_ant1 = k1;
Msg_gr_orig1=grayencod(msg_ant1 +1);
Msg_mod1=dmod(msg_gr_orig1,fc1,fd,fs,’psk’, M);
If sig1=ifft(msg_mod1);
Msg_tx1(z,: )=if_sig1;
Chan=rayleighchan;
Msg_rx1=filter (chan,if_sig1);
End
For z = 1:msg_size
K2= code2(z,: );
Msg_ant2 = k2;
Msg_gr_orig2=grayencod(msg_ant2 +1);
Msg_mod2=dmod(msg_gr_orig2,fc2,fd,fs,’psk’, M);
Msg_tx2(z,: )=if_sig2;
Chan=rayleighchan;
Msg_rx2=filter (chan,if_sig2);
End
(complete this)
(complete this)
Figure (4)
subPlot (4,1,1);
numModPlot = numPlot*fs;
xlabel (‘Time’);
ylabel(‘Amplitude’);
Grid;
Figure (5);
subPlot (4,1,1);
xlabel (‘Time’);
ylabel (‘Amplitude’);
Grid;
subPlot (4,1,2);
xlabel (‘Time’);
ylabel (‘Amplitude’);
Grid;
Figure (6);
subPlot (4,1,1);
plot(t,msg_rx2(1:length(t)), ‘b-‘);
xlabel (‘Time’);
ylabel (‘Amplitude’);
grid;
subPlot (4,1,2);
plot(t,msg_rx2(1:length(t)), ‘r-‘);
xlabel (‘Time’);
ylabel (‘Amplitude’);
grid;
Chan = ricianchan
For z = 1: msg_size
Msg_choosen1 = msg_noise1;
Msg_choosen2 = msg_noise2;
Msg_choosen3 = msg_noise3;
Elseif tot_ant3<[tot_ant1; tot_ant2; tot_ant4;];
Msg_choosen1 = msg_noise1;
Msg_choosen2 = msg_noise2;
Msg_choosen3 = msg_noise4;
Msg_choosen1 = msg_noise1;
Msg_choosen2 = msg_noise4;
Msg_choosen3 = msg_noise3;
Else
Msg_choosen1=msg_noise4;
Msg_choosen2=msg_noise2;
Msg_choosen3=msg_noise3;
End
End
Tot_ant1
Tot_ant2
Tot_ant3
%Selection Frequency 1
For z = 1: msg_size
if msg_choosen1==msg_noise1;
fc5=fc1;
code5=code1;
ant5=ant1;
else
fc5=fc4;
code5=code4;
ant5=ant4;
end
end
msg_rx5=rxdata1(z,: );
msg_gr_demod1=ddemod(real (msg_rx5),fc5,fd,fs,’psk’,M);
Graydecod=graydecod-1;
Msg_demod1=graydecod(msg_gr_demod1+1);
End
Msg_demod1=noisycode1 (1,: );
Code_1=noisycode1;
Rxdata2=fft (msg_choosen2);
%Selection Frequency 2
(complete this)
%Selection Frequency 3
(complete this)
Figure (7);
subPlot (3,1,1);
xlabel (‘Time’);
ylabel(‘Amplitude’);
grid;
Figure (8)
subplot (1,3,1);
numPlot=7
stem ([0:numPlot-1],msg_demod1(1:numPlot),’bo’;
hold off;
xlabel(‘Time’);
ylabel (‘Amplitude’);
grid;
%Demodulate Signal Antenna 2
subplot (1,3,2);
numPlot=7
stem ([0:numPlot-1],msg_demod2(1:numPlot),’ro’;
hold off;
xlabel(‘Time’);
ylabel (‘Amplitude’);
grid;
subplot (1,3,3);
numPlot=7
stem ([0:numPlot-1],msg_demod3(1:numPlot),’mo’;
hold off;
xlabel(‘Time’);
ylabel (‘Amplitude’);
grid;
P=[1 0 1 1];
Syndrome1=rem(recd1*parmat’, 2);
Syndrome_de1=bi2de(syndrome1, ‘left-msb’); % convert to decimal
End
p=[1 0 1 1];
For z = 1 : msg_size
end
p=[1 0 1 1];
For z = 1 : msg_size
end
numPlot=4
xlabel (‘Time’);
ylabel (‘Apmlitude’);
grid;
pack = 3;
BNRpbit=[5:9:25];
for i=1:pack
[number,ratio1]=biterr(ant5, newmsg1);
ber1(i) = ratio1/msg_size*10;
msg_size=msg_size*10;
end
pack = 3;
BNRpbit=[5:9:25];
for i=1:pack
[number,ratio2]=biterr(ant6, newmsg2);
ber2(i) = ratio2/msg_size*10;
msg_size=msg_size*10;
end
pack = 3;
BNRpbit=[5:9:25];
for i=1:pack
[number,ratio3]=biterr(ant7, newmsg3);
ber3(i) = ratio3/msg_size*10;
msg_size=msg_size*10;
end
figure (10);
snr = 0:1:15;
n = 0.5;
k = log2 (M);
k= 13;
N= (2^M) – 1;
hold on;
grid on;
xlabel (‘SNR’);
ylabel (‘BER’);
hold on;
Figure 4
Discussion:
Figure 5
4. Produce MIMO-OFDM Standards and Applications embedded with the latest technology for
receiver system model.
Conclusion.
References: