cover

Basic Principle of OFDM Technology

January 3, 2022

    Abstraction


    In this project, we focus on learning how to solve the problem of inter-symbol interference using OFDM techniques. We applied the properties of periodic convolution and DFT to process the signal and perfectly avoid the disadvantage of DTFT which cannot be processed by computer because it is continuous. After we designed the whole system of OFDM, we also simulated the whole process by passing random signals. From the whole project, we learned that transmitting signals in the frequency domain is much better than transmitting them in the time domain in terms of avoiding signal delay diffusion.

     

    Introduction


    Baseband of OFDM

    Block 1:

    A sequence data:

    $$ \{a_n\} = a_{0}, a_{1}, \cdots, a_{N-1} $$

    After Serial-to-Parallel Converter:

    $$ \widetilde{X}[0]=a_{0}\quad \cdots \quad \widetilde{X}[N-1]=a_{N-1} $$

    They will be packaged into:

    $$ \{\widetilde{X}[0], \widetilde{X}[1], \cdots, \widetilde{X}[N-1]\} $$

    Via IFFT,

    $$ \{x[0], x[1], \cdots, x[N-1]\}=D F T^{-1}\{\widetilde{X}[0], \widetilde{X}[1], \cdots, \widetilde{X}[N-1]\} $$

    In order to weaken the influence of both ISI and ICI and gain the correct information after FFT and IFFT, cyclic prefix (CP) is required. The length of CP supposed to be M, is associated with the length of delay.

    $$ x^{\prime}[n]=\left\{\begin{array}{c} x[n+N],-M \leq n<0 \\ x[n], 0 \leq n<N \end{array}\right. $$

    Block 2:

    After transmission:

    $$ \{x[N-M], \ldots, x[N-1], x[0], x[1], \ldots, x[N-1]\} * \mathrm{h}[n] $$

    To obtain the valid information, we need remove CP from the signal first:

    $$ \{x[0], x[1], \ldots, x[N-1]\} \otimes \mathrm{h}[n] $$

    The Serial-to-Parallel Converter helps FFT operate. Then we get:

    $$ \begin{aligned} & \{N \widetilde{X}[0] \widetilde{H}[0], \tilde{N X}[1] \widetilde{H}[1], \cdots, \tilde{N X}[N-1] \widetilde{H}[N-1]\} \\[6pt] =& D F T\{\{x[0], x[1], \cdots, x[N-1]\} \otimes \mathrm{h}[n]\} \end{aligned} $$

    By being dividing by $N \widetilde{H}[i]$,

    $$ \{\widetilde{X}[0], \widetilde{X}[1], \cdots, \widetilde{X}[N-1]\} $$

    Now we can obtain the original sequence $\{a_n\}$ by the Parallel-to-Serial Converter.

     

    DAC + RF front-end of the transmitter

    DAC is:

    $$ x_{c}(t)=x^{\prime}\left[\lfloor\frac{t}{T}\rfloor\right] $$

    $\mathcal{R} e\left\{x_{c}(t)\right\}$ and $\mathcal{I}m\left\{x_{c}(t)\right\}$ are used to modulate the amplitude of orthogonal functions $\cos \left(n \omega_{c} t\right)$ and $\sin \left(n \omega_{c} t\right)$, $\omega_{c}=\frac{2 \pi}{T}$.

    $$ \begin{gathered} \int_{T} \cos \left(n \omega_{c} t\right) \cos \left(m \omega_{c} t\right) d t=\frac{1}{2} \int_{T}\left(\cos \left((n+m) \omega_{c} t\right)+\cos \left((n-m) \omega_{c} t\right)\right) d t \\[6pt] =\left\{\begin{array}{c} \frac{1}{2}\left[\frac{\sin \left((n+m) \omega_{c} t\right)}{(n+m) \omega_{c}}+\frac{\sin \left((n-m) \omega_{c} t\right)}{(n-m) \omega_{c}}\right]_{T}=0, m \neq n \\ \frac{1}{2}\left[\frac{\sin \left(2 n \omega_{c} t\right)}{2 n \omega_{c}}+1\right]_{T}=\frac{T}{2}, m=n \end{array}\right. \end{gathered} $$
    $$ \begin{gathered} \int_{T} \sin \left(n \omega_{c} t\right) \sin \left(m \omega_{c} t\right) d t=-\frac{1}{2} \int_{T}\left(\cos \left((n+m) \omega_{c} t\right)-\cos \left((n-m) \omega_{c} t\right)\right) d t \\[6pt] =\left\{\begin{array}{c} -\frac{1}{2}\left[\frac{\sin \left((n+m) \omega_{c} t\right)}{(n+m) \omega_{c}}-\frac{\sin \left((n-m) \omega_{c} t\right)}{(n-m) \omega_{c}}\right]_{T}=0, m \neq n \\ -\frac{1}{2}\left[\frac{\sin \left(2 n \omega_{c} t\right)}{2 n \omega_{c}}-1\right]_{T}=\frac{T}{2}, m=n \end{array}\right. \end{gathered} $$
    $$ \begin{gathered} \int_{T} \sin \left(n \omega_{c} t\right) \cos \left(m \omega_{c} t\right) d t=\frac{1}{2} \int_{T}\left(\sin \left((n+m) \omega_{c} t\right)+\sin \left((n-m) \omega_{c} t\right)\right) d t \\[6pt] =-\frac{1}{2}\left[\frac{\cos \left((n+m) \omega_{c} t\right)}{(n+m) \omega_{c}}+\frac{\cos \left((n-m) \omega_{c} t\right)}{(n-m) \omega_{c}}\right]_{T}=0 \end{gathered} $$

    Sum all OFDM signals,

    $$ \sum_{i=0}^{m-1}\left(\mathcal{R} e\left\{x_{c i}(t)\right\} \cos \left(n_{i} \omega_{c_{0}} t\right)+\mathcal{I} m\left\{x_{c i}(t)\right\} \sin \left(n_{i} \omega_{c_{0}} t\right)\right) $$

    Receiver Design and Analysis


    Task A: Receiver RF front-end + ADC

    To demodulate the signal, we multiply $\cos(\omega_c t)$ and $\sin(\omega_c t)$.

    $$ \begin{aligned} &y(t) \cos \left(n_{k} \omega_{c_{0}} t\right)=\cos \left(n_{k} \omega_{c_{0}} t\right) \times\left(\left(\mathcal{R} e\left\{x_{c}(t)\right\} \cos \left(n_{k} \omega_{c} t\right)+\mathcal{I} m\left\{x_{c}(t)\right\} \sin \left(n_{k} \omega_{c} t\right)\right) * h(t)\right) \\[6pt] &y(t) \sin \left(n_{k} \omega_{c_{0}} t\right)=\sin \left(n_{k} \omega_{c_{0}} t\right) \times\left(\left(\mathcal{R} e\left\{x_{c}(t)\right\} \cos \left(n_{k} \omega_{c} t\right)+\mathcal{I} m\left\{x_{c}(t)\right\} \sin \left(n_{k} \omega_{c} t\right)\right) * h(t)\right) \end{aligned} $$

    Calculate the average signal in a length of a period.

    $$ \begin{aligned} &\frac{1}{T} \int_{T} y(t) \cos \left(n_{k} \omega_{c_{0}} t\right) d t \\ =&h[n] * \frac{1}{T}\left(\sum_{i=0}^{m-1} \mathcal{R} e\left\{x^{\prime}[n]\right\} \int_{T} \cos \left(n_{k} \omega_{c_{0}} t\right)^{2} d t+\sum_{i=0}^{m-1} J m\left\{x^{\prime}[n]\right\} \int_{T} \frac{1}{2} \sin \left(2 n_{k} \omega_{c_{0}} t\right) d t\right) \\ =&h[n] * \mathcal{R} e\left\{x_{k}^{\prime}[n]\right\}=\mathcal{R} e\left\{x_{k}^{\prime}[n] * h[n]\right\} \end{aligned} $$

    Similarly,

    $$ \begin{aligned} &\frac{1}{T} \int_{T} y(t) \sin \left(n_{k} \omega_{c_{0}} t\right) d t =\mathcal{I} m\left\{x_{k}^{\prime}[n] * h[n]\right\} \end{aligned} $$

    After multiply $\mathcal{I} m\left\{x_{k}^{\prime}[n] * h[n]\right\}$ with $j$, we have the output.

     

    Task B: The Relation between h(t) and h[n]

    We know the impulse response of actual wireless channel is:

    $$ h(t)=0.5 \delta(t)+0.4 \delta(t-1.5 T)+0.35 \delta(t-2.5 T)+0.3 \delta(t-3 T) $$

    Then we change it to DT signal:

    $$ h[n]=\left.h(n T)\right|_{t=n T} $$

    So,

    $$ h[n]=0.5 \delta[n]+0.4 \delta[n-1500]+0.35 \delta[n-2500]+0.3 \delta[n-3000] $$

    Task B: The length of CP

    Prefixing it with a cyclic prefix of length M, the OFDM symbol obtained is:

    $$ \{x[N-M], \ldots, x[N-1], x[0], x[1], \ldots, x[N-1]\} $$

    Assume that the channel is represented using

    $$ \mathbf{h}=\left\{h_{0}, h_{1}, \ldots h_{M}\right\} $$

    Then, after convolution with the channel, which happens as

    $$ y[m]=\sum_{l=0}^{M} h_{l} x[m-l] \quad 0 \leq m \leq N-1 $$

    So, taking the Discrete Fourier Transform, we get

    $$ Y[k]=H[k] \cdot X[k] $$

    Thus, a multipath channel is converted into scalar parallel sub-channels in frequency domain, thereby simplifying the receiver design considerably.

    We can find that if we take $M=\rm length(h[n])-1$, we can get the same result as period convolution. However if $M<\rm length(h[n])-1$, we cannot get the same result.

    So, the length of CP is length of h[n] - 1 = 3.

     

    Simulation


    Initialize

    n_channel = 32; n_data = 64; m_cp = 3; R = 1000; 
    wc = 1e11 / R; 
    n_seq = n_channel + n_data;
    n_bits = ceil(n_seq / n_channel);
    n_train = n_bits * (n_channel + m_cp);
    
    pilot = ones(1, n_channel);
    data_tx = randi([0, 1], 1, n_data);
    

    Block 1

    serial_tx = [pilot data_tx];
    parallel_tx = reshape(serial_tx, n_channel, n_bits);
    ftseq_tx = zeros(n_channel, n_bits);
    for i = 1 : n_bits
        ftseq_tx(:, i) = ifft(parallel_tx(:, i));
    end
    dtseq_tx = zeros(n_channel + m_cp, n_bits);
    for i = 1 : n_bits
        CP = ftseq_tx(n_channel - (m_cp-1) : n_channel, i);
        dtseq_tx(:, i) = [CP; ftseq_tx(:, i)];
    end
    train_tx = reshape(dtseq_tx, [1, n_train]);
    

    image-20220104052009660

    Block 3

    analog_tx = repelem(train_tx, R);
    t_tx = 0 : R * n_train - 1;
    cos_tx = cos(wc .* t_tx);
    sin_tx = sin(wc .* t_tx);
    ant_tx = real(analog_tx) .* cos_tx + imag(analog_tx) .* sin_tx;
    

    image-20220104052304152

    Transmit

    h = [0.5 zeros(1, 1.5 * R - 1) 0.4 zeros(1, R - 1) ...
        0.35 zeros(1, 0.5 * R - 1) 0.3];
    sig_air = filter(h, 1, ant_tx);
    

    image-20220104052434767

    Block 4

    ant_rx = filter(1, h, sig_air);
    t_rx = 0 : length(ant_rx) - 1;
    cos_rx = cos(wc .* t_rx);
    sin_rx = sin(wc .* t_rx);
    real_rx = ant_rx .* cos_rx;
    imag_rx = ant_rx .* sin_rx;
    train_rx = zeros(1, n_train);
    for i = 1 : n_train
        train_rx(i) = mean(real_rx((i - 1) * R + 1 : i * R)) ...
            + 1j * mean(imag_rx((i - 1) * R + 1 : i * R));
    end
    

    image-20220104052710702

    Block 2

    parallel_rx = zeros(n_channel, n_bits);
    for i = 1 : n_bits
        parallel_rx(:, i) = 2 * train_rx((i-1) * (n_channel + m_cp) ...
            + (m_cp + 1) : i * (n_channel + m_cp));
    end
    ftseq_rx = reshape(parallel_rx, 1, n_seq);
    serial_rx = zeros(1, n_seq);
    for i = 1 : n_bits   
        serial_rx((i-1) * n_channel + 1 : i * n_channel) = ...
            fft(ftseq_rx((i-1) * n_channel + 1 : i * n_channel));
    end
    

    image-20220104052830894

     

    Discussions


    The technical advantages of OFDM are as follows:

    1. High resistance to frequency selective fading or narrowband interference. In a single-carrier system, a single fading or interference can cause the failure of the entire communication link, but in a multi-carrier system, only a small fraction of the carriers will be interfered with.OFDM transmits user information through multiple subcarriers, and the signal time on each subcarrier is many times longer than that on a single-carrier system at the same rate, making OFDM more resistant to impulsive noise and fast fading channels. Also, the resistance to impulsive noise and fast fading of the channel is enhanced by the joint coding of the subcarriers, which achieves frequency diversity among the subchannels.
    2. Strong ability to resist ISI and ICI. OFDM has a strong ability to resist intercede interference due to its protective spacing and cyclic prefixes.
    3. High frequency utilization. OFDM allows overlapping common subcarriers to be used as subchannels, allowing a large amount of data to be transmitted in a narrowband bandwidth. It saves nearly half of the bandwidth compared to conventional FDM techniques and improves frequency utilization efficiency by using a protected-band approach to splitting subchannels.
    4. High channel utilization rate. When the number of subcarriers is large, the spectrum utilization of the system tends to 2Baud/Hz.
    5. The implementation of OFDM technology is relatively easy. The implementation method of OFDM can be chosen between IFFT/FFT.
    6. Suitable for high-speed data transmission. OFDM enables different sub-carriers to be modulated in different ways under the transmission medium, depending on the channel conditions and noise background, and automatically detects which particular carrier has high signal attenuation or interference pulses. When the channel conditions are good, the modulation method with high efficiency is used. When the channel conditions are poor, the modulation method with high anti-interference capability is used. In addition, the OFDM loading algorithm is used to enable the system to put more data in a channel with good conditions and transmit at high speed. Therefore, OFDM technology allows dynamic adaptation to turn on and off the corresponding carriers to ensure continuous and successful communication, which is ideal for high-speed data transmission.