0% found this document useful (0 votes)
4 views19 pages

5G Data Processing Coursework

The document discusses the implementation and design trade-offs of 5G systems, focusing on the requirements, challenges, and key components such as OFDM and FBMC waveforms. It compares the performance of these two modulation techniques, highlighting that FBMC is a more promising candidate for 5G due to its advantages over OFDM, including improved spectral efficiency and reduced inter-symbol interference. The conclusion recommends FBMC for future wireless communication systems while acknowledging its own limitations.

Uploaded by

vlsihub2020
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views19 pages

5G Data Processing Coursework

The document discusses the implementation and design trade-offs of 5G systems, focusing on the requirements, challenges, and key components such as OFDM and FBMC waveforms. It compares the performance of these two modulation techniques, highlighting that FBMC is a more promising candidate for 5G due to its advantages over OFDM, including improved spectral efficiency and reduced inter-symbol interference. The conclusion recommends FBMC for future wireless communication systems while acknowledging its own limitations.

Uploaded by

vlsihub2020
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Recommendations on 5G system

implementation and design trade-


offs
Module: 5G Data Processing (EE45GS)

Student: Akhmadjon Rajabov


Student ID: 190200705
Professor: Mariia Sorokina, PhD
Academic year: 2019-2020

1
Contents
Introduction………………………………………………………………………..3
Requirements of 5G……………………………………………………………….3
Challenges of 5G…………………………………………………………………..3
Key Components of 5G……………………………………………………………3
Waveform Standards and Requirements…………………………………………..4
OFDM……………………………………………………………………………..4
FBMC……………………………………………………………………………..6
Difference between OFDM and FBMC…………………………………………..6
Performance Metrics……………………………………………………………...8
Conclusion……………………………………………………………………….11
References………………………………………………………………………..12
Application……………………………………………………………………….13

2
Introduction
In recent years, the development of demand for the use of the Internet and the
demand of users has attracted great attention to mobile access networks. 4G, Long
Term Evolution currently is not able to meet the network requirements, therefore,
the development of new transmission methods with several carriers is the most
attractive for the development of a 5G successor. Orthogonal frequency division
multiplexing (OFDM) and multi-carrier filter modulation (FBMC) are the
dominant waveform candidates for fifth generation wireless communications. The
cyclic prefix OFDM method (CP-OFDM), which uses the orthogonal set of
subcarriers, is undoubtedly the most common multi-carrier system, but the severe
requirement of this method for tight timing and synchronization requirement
becomes a problem to achieve its goals [1].

Requirements of 5G
High average data transfer rate increased from 10 Kbit / s to 1 Gbit / s, connection
quality, very low latency up to 1 ms for ultra-reliable communication with low
delay to ensure successful real-time interactivity, as well as an increase in devices
connected to the Internet, optimization and increase the energy efficiency of
connected devices, all these data requirements are currently being pushed to 5G.

Challenges of 5G
To solve the requirements at the moment, scientists faced many problems such as
making spectrum distribution more flexible, how to expand addressable spectrum
into higher frequency bands, how to solve the difficulty in managing providing
communications between a large number of devices, traffic, inter-cell interference.

Key Components of 5G
5G core network (CN), 5G new radio (NR) and 5G devices, user equipment (UE)
are the end-to-end 5G network architecture. 5G core network (CN), 5G access
network (AN) and 5G devices, user equipment (UE) can be attributed to the most
key levels of architecture. Also, the user plane (UP), control plane (CP), access
network (AN), core network (CN) and public land mobile network (PLMN) are
key components of the network.

3
Figure 1 5G system Diagram
To ensure independent scalability and flexible deployment, the user plane (UP) and
control plane (CP) are separate from each other. The network architecture is
defined using a converged core network (CN) with a common access network
(AN) - core network (CN) interface. Deploying a user plane (UP) close to an
access network (AN) provides a low latency service and access to a local data
network.

Waveform Standards and Requirements


The requirements for the waveform for 5G at the physical level are the ability to
cut low latency, process the signal at high speed data transmission with a wide
bandwidth, short processing time for data packets, and the ability to quickly switch
from the uplink and downlink and vice versa for systems with time divisions. Also,
reduce turn-on times to improve the energy efficiency of low-data devices.

OFDM
An orthogonal frequency division multiplexing (OFDM) scheme is used as a
digital carrier modulation technique. A method of encoding digital data at several
non-continuous frequencies. In a system where multiple OFDM carriers, the
frequency spectrum of the subcarriers overlaps with the smallest frequency
spacing, and orthogonality is achieved among the various subcarriers.

4
Figure 2 Block diagram of Orthogonal Frequency Division Multiplexing
In Figure 2, the input stream is subdivided into parallel data streams by means of
the serial to parallel (S/P) converter, which is then passed into an inverse fast
Fourier transformation (IFFT) block to produce time sequence of the streams.
Consequently, by totaling a cyclic prefix (CP), the OFDM symbol time sequences
are extended. The CP is a copy of the latter portion of the symbol that is added at
the start of the sequence and should be greater than the network deferral spread in
order to diminish the inter symbol interference (ISI) produced by the influx of
various OFDM symbols with distinct delay. The resultant digital signal is
transformed into analog form and transmitted over the channel [5].
At the receiver end, the signal is reconstructed into digital form and the far Fourier
transform (FFT) is achieved in the received streams after eradicating the CP [5].
Finally, the parallel streams are collected into a single stream as the original
transmitted one. OFDM is not the most ideal circuit and it also has its drawbacks,
such as reduced spectral efficiency due to the used CP, high spectral leakage due to
a rectangular window, interference among an unsynchronized signal in adjacent
bands. Furthermore, the CP employed is chastely redundant in terms of
information and significantly diminishes the bandwidth efficiency. The
disadvantages of OFDM technique were overcome by a multicarrier
communication system called FBMC first proposed by Saltzberg [3] that delivers
an improved spectral shaping of subcarriers than OFDM systems. This is then
achieved by the careful designing of the prototype filter, which abridges
equalization in the lack of CP and also promises an additional effectual spectral
utilization by diminishing interference across subcarriers. By engaging Offset
Quadrature Amplitude Modulation (OQAM), the full capacity of the transmission
bandwidth can be attained in FBMC systems.

5
FBMC
The FBMC technique overcomes the limitations of OFDM by adding generalized
pulse shaping filters which deliver a well-localized sub-channel in both time and
frequency domain. Consequently, FBMC systems have more spectral containment
signals and offer more effective use of radio resources where no CP is required. In
Figure 3 it can be seen that the filter banks on the transmitter side and the receiver
side consist of an array of N filters that process N input signals to give N outputs.
If the inputs of these N filters are associated together, the system is analogous
manner can be measured as an analyzer to the input signal based on each filter
characteristics. In Figure 3 the filter bank used at the transmitter side is called a
synthesis filter bank and the filter bank used in the receiver side is called analysis
filter bank.

Figure 3. Block diagram of Filter Bank Multi Carrier (FBMC)


As depicted in Figure 3 the input signal is first converted from serial to parallel
form and then passed through synthesis filter bank and then it is converted back to
serial form after coming out of synthesis bank. After this, it can be seen in Figure 3
that on the receiver side after the signal passes through the channel it is converted
to parallel form by serial to parallel converter and passed through analysis filter
bank. Finally, when the output signal is obtained it is again converted to serial
form by parallel to serial converter [7].

Differences between OFDM and FBMC


FBMC is an evolved version of OFDM. The modulators of the OFDM technique
and FBMC technique are illustrated in Figure 2 [5]. The main difference is the
replacement of the OFDM with a multicarrier system based on filter banks, where
the IFFT plus CPin is substituted by the synthesis filter bank (SFB) whereas FFT
plus CPout is substituted by the analysis filter bank (AFB). The main differences
6
between OFDM and FBMC techniques have been summarized in Table 1 on the
properties—cyclic prefix, sidelobes, synchronization, Doppler effect, MIMO
systems, Spectrum sensing, and computational complexity. The basic principles of
OFDM and FBMC are explicated below.

Table 1. Major differences between OFDM and FBMC

7
Performance Matrices

Figure 4 (a) OFDM BER vs SNR, (b) FBMC BER vs SNR


Figure 4 implies the performance of BER versus SNR for OFDM (a), FBMC (b),
respectively. As shown in the figure, BER is of great importance at low SNR and
gradually decreases with increasing SNR. With a high SNR, the BER may be zero,
but this is almost impossible because using high SNR power reduces system
performance. From this it follows that transmission quality is achieved by efficient
power control.

Figure 5 (a) OFDM SER vs SNR, (b) FBMC SER vs SNR


Figure 5 implies the performance of SER versus SNR for OFDM (a), FBMC (b),
respectively. As shown in the figure, SER is of great importance at low SNR and
8
gradually decreases with increasing SNR. The principle of operation of SER is
similar to that of BER.

Figure 6 (a) OFDM Q-factor vs SNR, (b) FBMC Q-factor vs SNR


Figure 6 illustrates the relationship between Q-factor and SNR for OFDM and
FBMC. The Q-factor is inversely proportional to the attenuation rate of natural
oscillations in the system. In other words, the higher the Q-factor of the system, the
less energy loss. As we can see from the graph in both cases, the quality factor
increases on an equal footing with SNR.

Figure 7 Power spectral density of OFDM and FBMC.


To ensure low out-of-band leakage, the FBMC uses the power spectral density of
the transmitted signal. Figure 7 compares the spectral density plots for OFDM and
FBMC schemes. As can be seen from the figure, the FBMC has smaller side lobes.
This makes it possible to use the selected spectrum an additional time to increase
the efficiency of spectrum use. As for OFDM, it has higher side lobes and out-of-

9
band leakage. Thus, the FBMC scheme is more advantageous than OFDM,
providing higher spectral efficiency.

Figure 8 Eye Diagram of FBMC and OFDM


The Eye Diagram shows us how inter-symbol interference affects a signal in an
FBMС and OFDM scheme. As we can see in OFDM, the eye is more closed
thereby showing us that inter-symbol interference is higher than that of FBMС.

10
Conclusion
In this work, a comparison of the performance of OFDM and FBMC was made as
the most potential 5G applicants were conducted and modeled using MATLAB in
terms of power spectral density, Q-factor, Bit Error Rate, Symbol Error Rate and
Eye Diagram of OFDM and FBMC curves. To summarize, recommendations that
the FBMC method is the most promising candidate for 5G wireless
communication. It can also be said that FBMC derives from OFDM. More
precisely, the FBMC takes all the advantages of OFDM and tries to remove OFDM
flaws, while the FBMC has its own new flaws, such as short bursts and MIMO.

11
References
[1] Weiss, T.A. and Jondral, F.K. (2004) Spectrum Pooling: An Innovative
Strategy for the Enhancement of Spectrum Efficiency. IEEE Communications
Magazine, 42, S8-S14. [Link]
[2] Schafer, D.J. (2001) Wide Area Adaptive Spectrum Applications. Proceedings
of IEEE MILCOM, 1, 1-5. [Link]
[3] Saltzberg, B. (1967) Performance of an Efficient Parallel Data Transmission
System. IEEE Transactions on Communication Technology, 15, 805-811.
[Link]
[4] Farhang Boroujeny, B. (2008) A Square Root Nyquist (M) Filter Design for
Digital Communication Systems. IEEE Transactions on Signal Processing, 56,
2127-2132. [Link]
[5] Tensubam, B.D., Chanu, N.L. and Singh, S. (2014) Comparative Analysis of
FBMC and OFDM Multicarrier Techniques for Wireless Communication
Networks. International Journal of Computer Applications, 100, 27-31.
[Link]
[6] Schaich, F. (2010) Filterbank Based Multicarrier Transmission (FBMC)-
Evolving OFDM. Bell Labs Alcatel-Lucent.
[7] Hidalgo Stitz, T. (2010) Filterbank Techniques for the Physical Layer in
Wireless Communications. Ph.D. Theses, Tampere University of Technology
Publications, Tampere, 919 p.
[8] Vaidyanathan, P.P. (1993) Multirate Systems and Filterbanks. Prentice Hall,
Upper Saddle River.
[9] FP7-ICT Future Networks PHYDYAS—PHYsical Layer for DYnamic AccesS
and Cognitive Radio Project (ICT-211887).
[Link]

12
Application
OFDM code for MATLAB
%% OFDM
clear all;
close all;
clc

M = 16; % 16-QAM constellation


N = 2^20; % number of symbols
no_of_ifft_points = 2^6; % points for the FFT/IFFT
no_of_fft_points = 2^6;
block_size = no_of_fft_points; % number of symbols per ofdm channel
cp_len = ceil(0.1*block_size); % length of cyclic prefix
coordinates = [-3 -1 1 3];
numSamplePerSymbol = 2;

tic
%% Transmitter side
% Signal modulation
input = randsrc(1,N,coordinates) + 1i*randsrc(1,N,coordinates);

% First step: obtain the number of OFDM channels (i.e. columns) that will
exist after reshaping
num_ch = length(input)/block_size;
data_matrix = reshape(input, block_size, num_ch);

x = reshape(data_matrix, 1, (block_size * num_ch)); %input data in series form


for eyediagram

% Second: Create empty matix to put the IFFT'd data


cp_start = block_size-cp_len;
cp_end = block_size;
% Third: Operate columnwise & do CP
for i=1:num_ch
ifft_data_matrix(:,i) = ifft((data_matrix(:,i)),no_of_ifft_points);
% Compute and append Cyclic Prefix
for j=1:cp_len
actual_cp(j,i) = ifft_data_matrix(j+cp_start,i);
end
% Append the CP to the existing block to create the actual OFDM block
ifft_data(:,i) = vertcat(actual_cp(:,i),ifft_data_matrix(:,i));
end
% Convert parallel to serial for transmission
[rows_ifft_data cols_ifft_data] = size(ifft_data);
len_ofdm_data = rows_ifft_data * cols_ifft_data;
% Actual OFDM signal to be transmitted
ofdm_signal = reshape(ifft_data, 1, len_ofdm_data);

%% Channel
snr_dB = [0:20]; % here we use a loop to vary snr
errors = zeros(size(snr_dB));
for ii = 1:length(snr_dB)
s = 1/sqrt(mean(abs(ofdm_signal).^2)); % 16-QAM normalization

13
n = 1/sqrt(2)*(randn(1,len_ofdm_data) + 1i*randn(1,len_ofdm_data)); %
normalized guassian noise
% Pass the ofdm signal through the channel
recvd_signal = s * ofdm_signal + 10^(-snr_dB(ii)/20) * n; % linear AWGN

%% Receiver side
% Convert Data back to "parallel" form to perform FFT
recvd_signal_matrix = reshape(recvd_signal,rows_ifft_data, cols_ifft_data);
% Remove CP
recvd_signal_matrix(1:cp_len,:)=[];
% Perform FFT
for i=1:cols_ifft_data
fft_data_matrix(:,i) = fft(recvd_signal_matrix(:,i),no_of_fft_points);
end
% Convert parallel to serial
y = reshape(fft_data_matrix, 1,(block_size*num_ch));
y = y./s;
% Hard decision
y_re = real(y); % real part
y_im = imag(y); % imaginary part
out_re = y_re; out_im = y_im;
out_re(y_re < -2) = -3;
out_re(y_re > 2) = 3;
out_re(y_re > -2 & y_re <= 0) = -1;
out_re(y_re > 0 & y_re <= 2) = 1;

out_im(y_im < -2) = -3;


out_im(y_im > 2) = 3;
out_im(y_im > -2 & y_im <= 0) = -1;
out_im(y_im > 0 & y_im <= 2) = 1;
out = out_re + 1i * out_im;

errors(ii) = length(find(input - out)); % calculate errors


end

%% Graph
scatterplot(input); title('Modulated data');
scatterplot(y); title('Received symbols before mapping');
scatterplot(out); title('Received symbols');

%to plot OFDM signal


plot(real(ofdm_signal)); xlabel('Time'); ylabel('Amplitude');
title('OFDM Signal');grid on;

%SER
Ser = errors / N;
formula_Ser = 3/2 * erfc(sqrt(0.1 * (10.^(snr_dB/10)))); %theoritical
figure
plot(snr_dB, log10(Ser),'-x'); hold on; %numerics
plot(snr_dB, log10(formula_Ser),'o'); %analytics
legend('numerics','analytics');
xlabel('SNR, dB');
ylabel('Lg(SER)');
title('Symbol Error Rate (a)');

%BER
Ber = Ser / 4 ; % a number of bits per symbol 16 QAM

14
formula_Ber = (1/4.0) * 3/2 * erfc(sqrt(0.1 * (10.^(snr_dB/10))));
%theoritical

figure
plot(snr_dB, log10(Ber),'-x'); hold on; %numerics
plot(snr_dB, log10(formula_Ber),'o'); %analytics
legend('numerics','analytics');
xlabel('SNR, dB');
ylabel('Lg(BER)');
title('BER vs SNR (a)');

%Eye Diagram
eyediagram(x(1:1000), numSamplePerSymbol^2); %transmitter
eyediagram(y(1:1000), numSamplePerSymbol^2); %receiver

%Q-factor
Q = 20 * log10(sqrt(2) * (erfcinv(2 * (Ber))));
formula_Q = 20 * log10(sqrt(2) * (erfcinv(2 * (formula_Ber))));

figure
plot(snr_dB, Q,'-x'); hold on; %numerics
plot(snr_dB, formula_Q,'o'); %analytics
title('Q factor vs SNR (a)');
ylabel('Q factor');
xlabel('SNR (dB)');
grid on
legend('numerics','analytics');

%Bandwidth efficiency
BW = no_of_fft_points/(no_of_fft_points + cp_len);
fprintf('Bandwidth efficiency is %.2f bit/s/Hz\n',BW)

toc
%%

FBMC code for MATLAB


clear all
clc
close

s = rng(211);

numFFT = 1024; % Number of FFT points


numGuards = 212; % Guard bands on both sides
K = 4; % Overlapping symbols, one of 2, 3, or 4
numSymbols = 2^10; % Simulation length in symbols
bitsPerSubCarrier = 4; % 2: 4QAM, 4: 16QAM, 6: 64QAM, 8: 256QAM
snrdB = [0:20]; % SNR in dB
num_samples_each_trace = 4; %number of samples for each trace for eye
%diagram

tic
% Prototype filter
switch K
case 2
HkOneSided = sqrt(2)/2;

15
case 3
HkOneSided = [0.911438 0.411438];
case 4
HkOneSided = [0.971960 sqrt(2)/2 0.235147];
otherwise
return
end
% Build symmetric filter
Hk = [fliplr(HkOneSided) 1 HkOneSided];

% Transmit-end processing
% Initialize arrays
L = numFFT-2*numGuards; % Number of complex symbols per OFDM symbol
KF = K*numFFT;
KL = K*L;
dataSubCar = zeros(L, 1);
dataSubCarUp = zeros(KL, 1);

sumFBMCSpec = zeros(KF*2, 1);


sumOFDMSpec = zeros(numFFT*2, 1);

numBits = bitsPerSubCarrier*L/2; % account for oversampling by 2


inpData = zeros(numBits, numSymbols);
rxBits = zeros(numBits, numSymbols);
txSigAll = complex(zeros(KF, numSymbols));
symBuf = complex(zeros(2*KF, 1));

% Loop over symbols


for symIdx = 1:numSymbols

% Generate mapped symbol data


inpData(:, symIdx) = randi([0 1], numBits, 1);
modData = qammod(inpData(:, symIdx), 2^bitsPerSubCarrier, ...
'InputType', 'Bit', 'UnitAveragePower', true);

% OQAM Modulator: alternate real and imaginary parts


%The real and imaginary parts of a complex data symbol
%are not transmitted simultaneously, as the imaginary part is delayed
%by half the symbol duration.
if rem(symIdx,2)==1 % Odd symbols
dataSubCar(1:2:L) = real(modData);
dataSubCar(2:2:L) = 1i*imag(modData);
else % Even symbols
dataSubCar(1:2:L) = 1i*imag(modData);
dataSubCar(2:2:L) = real(modData);
end

% Upsample by K, pad with guards, and filter with the prototype filter
dataSubCarUp(1:K:end) = dataSubCar;
dataBitsUpPad = [zeros(numGuards*K,1); dataSubCarUp;
zeros(numGuards*K,1)];
X1 = filter(Hk, 1, dataBitsUpPad);
% Remove 1/2 filter length delay
X = [X1(K:end); zeros(K-1,1)];

% Compute IFFT of length KF for the transmitted symbol


txSymb = fftshift(ifft(X));

16
% Transmitted signal is a sum of the delayed real, imag symbols
symBuf = [symBuf(numFFT/2+1:end); complex(zeros(numFFT/2,1))];
symBuf(KF+(1:KF)) = symBuf(KF+(1:KF)) + txSymb;

% Compute power spectral density (PSD)


currSym = complex(symBuf(1:KF));
[specFBMC, fFBMC] = periodogram(currSym, hann(KF, 'periodic'), KF*2, 1);
sumFBMCSpec = sumFBMCSpec + specFBMC;

% Store transmitted signals for all symbols


txSigAll(:,symIdx) = currSym;
end

%Scatterplot of modulated data (constellation diagram)


scatterplot(modData);title('modulated data')

% Plot power spectral density


sumFBMCSpec = sumFBMCSpec/mean(sumFBMCSpec(1+K+2*numGuards*K:end-
2*numGuards*K-K));
plot(fFBMC-0.5,10*log10(sumFBMCSpec));
grid on
axis([-0.5 0.5 -180 10]);
xlabel('Normalized frequency');
ylabel('PSD (dBW/Hz)')
title(['FBMC, K = ' num2str(K) ' overlapped symbols'])
set(gcf, 'Position', figposition([15 50 30 30]));

% Process symbol-wise
BERR=zeros(size(snrdB));
for ii = 1:length(snrdB)
BER = [Link];
for symIdx = 1:numSymbols
rxSig = txSigAll(:, symIdx);

% Add WGN
rxNsig = awgn(rxSig, ii, 'measured');

% Perform FFT
rxf = fft(fftshift(rxNsig));

% Matched filtering with prototype filter


rxfmf = filter(Hk, 1, rxf);
% Remove K-1 delay elements
rxfmf = [rxfmf(K:end); zeros(K-1,1)];

% Remove guards
rxfmfg = rxfmf(numGuards*K+1:end-numGuards*K);

% OQAM post-processing
% Downsample by 2K, extract real and imaginary parts
if rem(symIdx, 2)
% Imaginary part is K samples after real one
r1 = real(rxfmfg(1:2*K:end));
r2 = imag(rxfmfg(K+1:2*K:end));
rcomb = complex(r1, r2);

17
else
% Real part is K samples after imaginary one
r1 = imag(rxfmfg(1:2*K:end));
r2 = real(rxfmfg(K+1:2*K:end));
rcomb = complex(r2, r1);
end
% Normalize by the upsampling factor
rcomb = (1/K)*rcomb;

% De-mapper: Perform hard decision


rxBits(:, symIdx) = qamdemod(rcomb, 2^bitsPerSubCarrier, ...
'OutputType', 'bit', 'UnitAveragePower', true);
end
% Measure BER with appropriate delay
[Link] = bitsPerSubCarrier*KL;
ber = BER(inpData(:), rxBits(:));
BERR(ii) = ber(1); %to keep BER for each SNR in variable BERR
end

%Scatterplot of received data (constellation diagram)


scatterplot(rcomb);title('received data')

%plot SER vs SNR in logarithm scale


Ser = BERR * bitsPerSubCarrier;
formula_Ser = 3/2*erfc(sqrt(0.1*(10.^(snrdB/10))));
figure
plot(snrdB,log10(Ser),'-x'); %numerics
hold on;
plot(snrdB,log10(formula_Ser),'o'); %analytics
legend('numerics','analytics');
xlabel('SNR, dB')
ylabel('Lg(SER)')
title('Symbol Error Rate (b)');

%plot BER vs SNR in logarithm scale


formula_Ber = (1/4.0)*3/2*erfc(sqrt(4*0.1*(10.^(snrdB/10))));
figure
plot(snrdB,log10(BERR),'-x'); %numerics
hold on;
plot(snrdB,log10(formula_Ber),'o'); %analytics
title('BER vs SNR (b)');
ylabel('Normalised BER');
xlabel('SNR (dB)');
grid on
legend('numerics','analytics');

%eyediagrams of transmitter and receiver


eyediagram(modData,num_samples_each_trace) %transmitter
eyediagram(rcomb,num_samples_each_trace) %receiver

%Q-factor
Q = 20*log10(sqrt(2)*(erfcinv(2*BERR)));
formula_Q = 20*log10(sqrt(2)*(erfcinv(2*formula_Ber)));
figure
plot(snrdB,Q,'-x'); %numerics
hold on;
plot(snrdB,formula_Q,'o'); %analytics

18
title('Q factor vs SNR (b)');
ylabel('Q factor');
xlabel('SNR (dB)');
grid on
legend('numerics','analytics');

%BW efficiency
S=ceil(length(modData)/(numSymbols/bitsPerSubCarrier));
BW = S/(S+K-(1/2)); %BW efficiency formula of FBMC
fprintf('Bandwidth efficiency is %.2f bit/s/Hz\n',BW)

% Restore RNG state


rng(s);

%% OFDM Power Spectral Density


for symIdx = 1:numSymbols

inpData2 = randi([0 1], bitsPerSubCarrier*L, 1);


modData = qammod(inpData2, 2^bitsPerSubCarrier, ...
'InputType', 'Bit', 'UnitAveragePower', true);

symOFDM = [zeros(numGuards,1); modData; zeros(numGuards,1)];


ifftOut = sqrt(numFFT).*ifft(ifftshift(symOFDM));

[specOFDM,fOFDM] = periodogram(ifftOut, rectwin(length(ifftOut)), ...


numFFT*2, 1, 'centered');
sumOFDMSpec = sumOFDMSpec + specOFDM;
end

% Plot power spectral density (PSD) over all subcarriers


sumOFDMSpec = sumOFDMSpec/mean(sumOFDMSpec(1+2*numGuards:end-2*numGuards));
figure;
plot(fOFDM,10*log10(sumOFDMSpec));
grid on
axis([-0.5 0.5 -180 10]);
xlabel('Normalized frequency');
ylabel('PSD (dBW/Hz)')
title(['OFDM, numFFT = ' num2str(numFFT)])
set(gcf, 'Position', figposition([46 50 30 30]));

toc

19

You might also like