Matlab simulation of underwater image transmission communication system based on OFDM

Table of contents

1. Preview of algorithm operation renderings

2.Algorithm running software version

3. Some core programs

4. Overview of algorithm theory

5. Algorithm complete program engineering


1. Preview of algorithm operation renderings

2.Algorithm running software version

matlab2022a

3. Some core programs

function [rx_img] = func_TR(tx_img, num_path, pathdelays, pathgains, snr)
rng('default'); 
% 将输入的图像展平为一维数组
img1d = reshape(tx_img, 1, 256*256);

% 将一维数组中的数值转换为四进制表示
img_b4 = dec2base(img1d, 4);
% 将四进制表示的数据转换为一维数组
for i=1:length(img_b4)
    a = img_b4(i,:);
    img_b4d((i-1)*4+1:i*4) = a(:)-48;
end 

% 使用QAM调制将数据进行调制
QAM = 4;
data = qammod(img_b4d, QAM);
NFFT = 64;
CPLEN = NFFT/4;
tsig = func_T_ofdm(data,CPLEN);
% 应用多径信道
%pathdelays = [0, 3, 5, 6, 8];
%pathgains =  [0, -2, -5, -8, -20 ];
[tsig_c, h] = func_multipath(tsig, num_path, pathdelays, pathgains);

% 添加高斯噪声
rsig = awgn(tsig_c, snr);
% 使用逆OFDM转换
fsig = func_R_ofdm(rsig, h(1), CPLEN);
img_b4d = qamdemod(fsig, 4);


% 将数据重新转换为图像
pimg = char(img_b4d+48);
for i=1:256*256;
    a = pimg((i-1)*4+1:i*4);
    pimg_q(i,:) = a;
end;

pimg_d = base2dec(pimg_q, 4);
pimg_u8 = cast(pimg_d, 'uint8');
rx_img = reshape(pimg_u8, 256, 256);

end
 
55

4. Overview of algorithm theory

       The OFDM-based underwater image transmission communication system is a communication system used to transmit image data in an underwater environment. It uses OFDM (Orthogonal Frequency Division Multiplexing) technology, which has some advantages in underwater communications because it can overcome problems such as multipath propagation and frequency selective fading.

       The principle of OFDM-based underwater image transmission communication system is to use multiple orthogonal subcarriers to transmit data. These subcarriers are orthogonal in the frequency domain, thus reducing inter-symbol interference caused by multipath propagation. At the same time, frequency selective fading can be overcome by choosing appropriate subcarrier spacing.

structure:

  1. Data source: Typically an underwater camera or other image acquisition device used to capture image data in an underwater scene.

  2. Data encoding: Image data needs to be compressed and encoded to reduce transmission bandwidth and improve transmission efficiency.

  3. OFDM modulation: The encoded data is divided into multiple subcarriers and subjected to OFDM modulation. This typically involves mapping data onto a complex constellation and allocating data to each subcarrier.

  1. Channel: Data is transmitted over an underwater channel, an environment with multipath propagation and fading effects. Signals may be affected by fading and distortion during transmission.

  1. OFDM demodulation: The receiving end demodulates the received OFDM signal and converts it from the frequency domain to the time domain signal.

  2. Channel estimation and equalization: By using pilots or estimating channel characteristics, the receiving end performs channel estimation and equalization to offset the distortion caused by the signal during underwater transmission.

  3. Decoding: The decoder decodes the received data and restores it to the original image data.

  4. Image reconstruction: The decoded data is restored to an image of the underwater scene.

  5. Data display: The final image can be displayed on a display device for observation and analysis.

       Among them, the signal power can be calculated by the energy of the received signal, and the noise power can be estimated by measuring the background noise. The above are the basic principles, structure and some related formulas of the underwater image transmission communication system based on OFDM. This kind of system has a wide range of applications in underwater data transmission, including underwater exploration, underwater robots and underwater communications.

5. Algorithm complete program engineering

OOOOO

OOO

O

Guess you like

Origin blog.csdn.net/aycd1234/article/details/132631990
Recommended