m FPGA-based OFDM modulation and demodulation system verilog implementation, including IFFT, FFT and shaping filters, including testbench

Table of contents

1. Algorithm simulation effect

2. Summary of theoretical knowledge involved in algorithms

3.Verilog core program

4. Complete algorithm code file


1. Algorithm simulation effect

This system was developed on the Vivado2019.2 platform, and the test results are as follows

The entire OFDM structure is as follows:

2. Summary of theoretical knowledge involved in algorithms

       This system is at https://blog.csdn.net/hlayumi1234567/article/details/130548868

On the basis of this, a shaping filter module is added to further optimize the spectrum of OFDM signals.

      Orthogonal Frequency Division Multiplexing (OFDM) is a multi-carrier modulation technology. Its basic principle is to divide high-speed data signals into multiple low-speed sub-carriers, modulate data on each sub-carrier, and superimpose all sub-carriers. together form an OFDM signal. OFDM signals have good resistance to multipath fading and frequency selective fading, so they are widely used in fields such as wireless communications and digital television.

      The main idea of ​​OFDM is to divide the channel into several orthogonal sub-channels, convert high-speed data signals into parallel low-speed sub-data streams, and modulate them for transmission on each sub-channel. Orthogonal signals can be separated by using correlation techniques at the receiver, which can reduce mutual interference (ISI) between sub-channels. The signal bandwidth on each sub-channel is smaller than the correlation bandwidth of the channel, so each sub-channel can be regarded as flat fading, thereby eliminating inter-symbol crosstalk, and since the bandwidth of each sub-channel is only a small part of the original channel bandwidth, the channel Equalization becomes relatively easy.

        OFDM technology is the basis of the HPA Alliance (HomePlug Powerline Alliance) industrial specification. It uses a discontinuous multi-tone technology to combine a large number of signals in different frequencies called carriers into a single signal to complete signal transmission. Because this technology has the ability to transmit signals under clutter interference, it is often used in transmission media that are susceptible to external interference or have poor resistance to external interference.

       An OFDM symbol contains multiple subcarriers that have been phase-shift keyed (PSK) or quadrature amplitude modulated (QAM).

       Once the transmitted bits are allocated to each subcarrier, a certain modulation mode maps them to the amplitude and phase of the subcarrier. The equivalent baseband signal is usually used to describe the OFDM output signal:

The real part and imaginary part of the signal correspond to the in-phase and quadrature components of OFDM respectively. In the actual system, they can be multiplied by the corresponding cos coscos component and sin sinsin component respectively.


       The OFDM modulation and demodulation system consists of a transmitter and a receiver. At the transmitter end, the input digital signal is modulated and IFFT processed to form an OFDM signal, which is sent to the radio frequency module for radio frequency processing, and finally sent through the antenna. At the receiving end, the received OFDM signal is processed by the radio frequency front-end, and then outputs a digital signal after FFT transformation and demodulation.

      The design process of OFDM modulation and demodulation system can be divided into the following steps:

      System requirements analysis: Determine the system's functional modules, data processing methods, interface specifications and performance indicators based on the system's application scenarios and performance requirements.
      System architecture design: Design the system's hardware platform, software platform, communication interface and data transmission method, etc., and determine the overall architecture and module division of the system.
       Functional module design: Design various functional modules of the system, including OFDM modulation module, IFFT module, FFT module, demodulation module, etc.

3.Verilog core program

`timescale 1ns / 1ps
//
// Company: 
// Engineer: 
// 
// Create Date: 2023/02/03 23:29:37
// Design Name: 
// Module Name: Tants
// Project Name: 
// Target Devices: 
// Tool Versions: 
// Description: 
// 
// Dependencies: 
// 
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
// 
//


module Tants(
                i_clk,
                i_rst,
                
                i_before_fft1,
                i_last_fft1,
                i_enable1,
                i_real_dat,
                i_imag_dat,
                

 
                o_real_ifft,
                o_imag_ifft,
                o_start,
                o_ends,
                o_enable 
                 
                );
    
input             i_clk;                
input             i_rst;          
input             i_before_fft1;                
input             i_last_fft1;   
input             i_enable1;  
input signed[15:0]i_real_dat;                 
input signed[15:0]i_imag_dat;   

 
output signed[31:0]o_real_ifft;                 
output signed[31:0]o_imag_ifft; 
output  o_start;
output  o_ends ;
output  o_enable;

wire signed[31:0]w_real_ifft;                 
wire signed[31:0]w_imag_ifft; 
wire  w_start;
wire  w_ends ;
wire  w_enable;
IFFT_tops IFFT_tops_u(
                .i_clk       (i_clk),
                .i_rst       (i_rst),
                .i_before_fft(i_before_fft1),
                .i_last_fft  (i_last_fft1),
                .i_enable    (i_enable1),
                .i_real_dat  (i_real_dat),
                .i_imag_dat  (i_imag_dat),
                
                .o_start     (w_start),
                .o_ends      (w_ends),
                .o_enable    (w_enable),
                .o_real_ifft (w_real_ifft),
                .o_imag_ifft (w_imag_ifft)
                ); 
 
bd_filters bd_filters_u(
.i_clk       (i_clk),
.i_rst       (i_rst),
.i_start     (w_start),
.i_end       (w_ends),
.i_enable    (w_enable),
.i_ifftI     (w_real_ifft),
.i_ifftQ     (w_imag_ifft),

.o_I_filter  (o_real_ifft),
.o_Q_filter  (o_imag_ifft),
.o_enable    (o_enable),
.o_end       (o_ends),
.o_start     (o_start)
);
    
endmodule
00_043m

4. Complete algorithm code file

V

Guess you like

Origin blog.csdn.net/hlayumi1234567/article/details/132918586