问小白 wenxiaobai
资讯
历史
科技
环境与自然
成长
游戏
财经
文学与艺术
美食
健康
家居
文化
情感
汽车
三农
军事
旅行
运动
教育
生活
星座命理

6种常见通信干扰信号及其MATLAB实现

创作时间:
作者:
@小白创作中心

6种常见通信干扰信号及其MATLAB实现

引用
CSDN
1.
https://blog.csdn.net/m0_54016576/article/details/143062120

通信干扰是影响无线通信系统性能的重要因素之一。本文将介绍6种常见的通信干扰信号类型,包括单音干扰、多音干扰、宽带噪声干扰、窄带噪声干扰、梳状谱干扰和扫频干扰,并通过MATLAB代码实现这些干扰信号的生成和分析。

单音干扰

单音干扰是针对目标信号单一频点进行干扰,干扰信号能量集中于固定频率,其表达式如下:

多音干扰

多音干扰是针对多个目标频率进行干扰,干扰信号能量相对于单音干扰分散,表现形式为多个单音干扰叠加,其表达式如下:

宽带噪声干扰

宽带噪声干扰是将高斯白噪声通过一个宽带滤波器,在每一个宽带范围内产生噪声。

窄带噪声干扰

窄带噪声干扰是干扰信号能量主要集中在一段频带,表现形式为高斯白噪声,其表达式如下:

梳状谱干扰

梳状谱干扰信号频谱与多音干扰相似,但是其谱峰为等间隔排列,且每个谱峰存在一定带宽,其表达式如下

扫频干扰

扫频干扰是扫频干扰中常见形式,干扰信号频率在一定带宽内逐渐改变,其表达式如下

MATLAB代码实现

单音干扰

% produce a fragment of single sinusoid jam
clear;close all;
Pl = 1;
Fs = 1000;                    % Sampling frequency
T = 1/Fs;                     % Sample time
L = 1000;                     % Length of signal
t = (0:L-1)*T;                % Time vector
% Sum of a 50 Hz sinusoid and a 120 Hz sinusoid
fs = 50;
x = sin(2*pi*fs*t); 
jnr = 200;
y = awgn(x,jnr,'measured');   % Sinusoids plus noise   
figure;set(gcf,'Color','w','Position',[400 300 600 300]);
plot(Fs*t(1:100),y(1:100),'Color',[0,0.4,0.8]);grid on;
title('single-tone jam')
xlabel('time (milliseconds)');
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y = fft(y,NFFT)/L;
f = Fs/2*linspace(0,1,NFFT/2+1);
% Plot single-sided amplitude spectrum.
figure;set(gcf,'Color','w','Position',[400 300 600 300]);
semilogy(f,2*abs(Y(1:NFFT/2+1)),'Color',[0,0.4,0.8]);grid on;
title('Single-Sided Amplitude Spectrum of single-tone jam');
xlabel('Frequency (Hz)');
ylabel('|Y(f)|');
ylim([10e-4,1]);grid on;
% C par  

多音干扰

% produce a fragment of multiple sinusoid jam
clear;close all;jnr = 200; % jam-noise ratio
Q = 10; % number of multiple sinusoid
Pl = 1-0.1*rand(1,Q);                       % Jam power
Fs = 2000;                    % Sampling frequency
T = 1/Fs;                     % Sample time
L = 2*Fs;                     % Length of signal
t = (0:L-1)*T;                % Time vector
% Sum of a 50 Hz sinusoid
fs0 = 100;deltafs = 10;
fs = fs0:deltafs:fs0+(Q-1)*deltafs; % produce same-distance fs
theta = 2*pi*rand(1,Q);% random phase
xx = cos(2*pi*fs'*t+theta'*ones(1,length(t)));% cos
x = sqrt(Pl)*xx; % multi frequency Sinusoids jam with random phase
x_mid = (max(x)+min(x))/2;
x_nor = 2*(x-x_mid)/(max(x)-min(x));% normalize the data into [-1,1]
x_dec = (x_nor-mean(x_nor))/sqrt(var(x_nor));% decentralize the data
figure;
subplot(2,1,1);
plot(Fs*t(1:5*Fs/fs(1)),x(1:5*Fs/fs(1)))
title('original data')
xlabel('time (milliseconds)');grid on;
subplot(2,1,2);
plot(Fs*t(1:5*Fs/fs(1)),x_dec(1:5*Fs/fs(1)))
title('pre_processed data')
xlabel('time (milliseconds)');grid on;
y = awgn(x,jnr,'measured');    % Sinusoids plus noise
figure;set(gcf,'Color','w','Position',[400 300 600 300]);
plot(Fs*t(1:10*Fs/fs(1)),y(1:10*Fs/fs(1)),'Color',[0,0.4,0.8]);grid on;
title('multiple-tone jam')
xlabel('time (milliseconds)');
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y = fft(y,NFFT)/L;
f = Fs/2*linspace(0,1,NFFT/2+1);
% Plot single-sided amplitude spectrum.
figure;set(gcf,'Color','w','Position',[400 300 600 300]);
semilogy(f,2*abs(Y(1:NFFT/2+1)),'Color',[0,0.4,0.8]);grid on;
title('Single-Sided Amplitude Spectrum of multiple-tone jam');
xlabel('Frequency (Hz)');
ylabel('|Y(f)|');
ylim([10e-4,1]);grid on;  

宽带干扰

% produce a fragment of narrow band noise 
clear;close all;jnr = 20; % jam-noise ratio
Fs = 2000;                    % Sampling frequency
T = 1/Fs;                     % Sample time
L = 2*Fs;                     % Length of signal
t = (0:L-1)*T;                % Time vector
P=1;% power of noise
y = wgn(L,1,P); % white noise
% 
% y = awgn(x,jnr,'measured');    % Sinusoids plus noise
figure;plot(1000*t(1:L/2),y(1:L/2));
title('White Noise')
xlabel('time (milliseconds)');grid on;
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y = fft(y,NFFT)/L;
f = Fs/2*linspace(0,1,NFFT/2+1);
% Plot single-sided amplitude spectrum.
figure;plot(f,2*10*log10(abs(Y(1:NFFT/2+1)))) 
title('Single-Sided Amplitude Spectrum of White Noise')
xlabel('Frequency (Hz)');ylabel('|Y(f)|(dB)');grid on;
% ylim([10e-4,1])
%% bandpass filter
WI = 50; %
window of narrow band
FJ = 600;% jamming frequency
fl_kaiser = [FJ-WI/2 FJ-WI/4 FJ+WI/4 FJ+WI/2];
fl_mag = [0 1 0];
fl_dev = [0.05 0.05 0.05];
[fl_n_kaiser,fl_wn,fl_beta,fl_ftype]=kaiserord(fl_kaiser,fl_mag,fl_dev,Fs);
h= fir1(fl_n_kaiser,fl_wn,fl_ftype,kaiser(fl_n_kaiser+1,fl_beta));
Y_bp = filter(h,1,y);% the result of filter in time domain
figure;
freqz(h)
figure;
subplot(2,1,1);plot(1000*t(1:L/2),y(1:L/2));% original noise
title('White Noise');xlabel('time (milliseconds)');grid on;
subplot(2,1,2);plot(1000*t(1:L/2),Y_bp(1:L/2));% original noise
title('Narrow Band White Noise');xlabel('time (milliseconds)');grid on;
figure;set(gcf,'Color','w','Position',[400 300 600 300]);
plot(1000*t(1:L/2),Y_bp(1:L/2),'Color',[0,0.4,0.8]);grid on;
title('Narrowband Noise jam')
xlabel('time (milliseconds)');
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y = fft(Y_bp,NFFT)/L;
f = Fs/2*linspace(0,1,NFFT/2+1);
% Plot single-sided amplitude spectrum.
figure;set(gcf,'Color','w','Position',[400 300 600 300]);
plot(f,2*10*log10(abs(Y(1:NFFT/2+1))),'Color',[0,0.4,0.8]);grid on;
title('Single-Sided Amplitude Spectrum of Narrowband Noise jam')
xlabel('Frequency (Hz)');ylabel('|Y(f)|(dB)');grid on;
% ylim([10e-4,1])

窄带干扰

梳状谱干扰

扫频干扰

© 2023 北京元石科技有限公司 ◎ 京公网安备 11010802042949号