Table 1: QPSK symbol mapping integer number 0 1 2 3 LSB 0 1 0 1 MSB 0 0 1 1 symbol alphabet √ √ 2 2 √2 √2 (−1 − j) 4.1 Generate Databits The data information is a stream of binary bits. The occurrence of and are 0 1 of equal probability. Assume a data stream of length it can be 50000, generated in Matlab as shown below: tx_databits = round(rand(1,50000)); The function returns a matrix of size m × n with its entries rand(m,n) uniformly distributed within the interval [0, 1]. The operation rounds the round arguments to the nearest integers, resulting a vector of integer number 0 and 1. 4.2 QPSK Modulation For QPSK modulation, the mapping pattern is shown in Table. 1. It can be implemented in Matlab as shown below: symbol_alphabet = [ 1+1j, -1+1j, 1-1j, -1-1j]/sqrt(2); M = log2(length(symbol_alphabet)); symbols_int = 2.^[0:M-1]*reshape(tx_databits, M, []); tx_symbols = symbol_alphabet(symbols_int+1); In this example, the power per symbol is normalized to 1. σ2 4.3 Noise Definition In most of the simulations, the noise is assumed to be complex-valued additive white Gaussian. The function returns a m × n matrix of real randn(m,n) numbers which follows the standard normal distribution N (0, 1). Therefore, a complex-valued Gaussian vector with average power per symbol can be built 1 by (randn(m,n) + j*randn(m,n))/sqrt(2). In order to plot a Bit-Error-Ratio (BER)/Signal-to-Noise (SNR) curve, the transmission scheme is simulated for different SNR level. This is usually done by fixing the transmitted symbol power to 1 and varying the average noise power according to SNR levels. σ2
Table 1: QPSK symbol mapping integer number 0 1 2 3 LSB 0 1 0 1 MSB 0 0 1 1 symbol alphabet √ √ 2 2 √2 √2 (−1 − j) 4.1 Generate Databits The data information is a stream of binary bits. The occurrence of 0 and 1 are of equal probability. Assume a data stream of length 50000, it can be generated in Matlab as shown below: tx_databits = round(rand(1,50000)); The function rand(m,n) returns a matrix of size m × n with its entries uniformly distributed within the interval [0, 1]. The operation round rounds the arguments to the nearest integers, resulting a vector of integer number 0 and 1. 4.2 QPSK Modulation For QPSK modulation, the mapping pattern is shown in Table. 1. It can be implemented in Matlab as shown below: symbol_alphabet = [ 1+1j, -1+1j, 1-1j, -1-1j]/sqrt(2); M = log2(length(symbol_alphabet)); symbols_int = 2.^[0:M-1]*reshape(tx_databits, M, []); tx_symbols = symbol_alphabet(symbols_int+1); In this example, the power per symbol σ2 is normalized to 1. 4.3 Noise Definition In most of the simulations, the noise is assumed to be complex-valued additive white Gaussian. The function randn(m,n) returns a m × n matrix of real numbers which follows the standard normal distribution N (0, 1). Therefore, a complex-valued Gaussian vector with average power per symbol 1 can be built by (randn(m,n) + j*randn(m,n))/sqrt(2). In order to plot a Bit-Error-Ratio (BER)/Signal-to-Noise (SNR) curve, the transmission scheme is simulated for different SNR level. This is usually done by fixing the transmitted symbol power to 1 and varying the average noise power σ2 according to SNR levels.