天天看點

猝發信号的matlab實作

BPSK猝發信号及其短時傅裡葉變換和能量譜密度:

猝發信号的matlab實作
猝發信号的matlab實作
猝發信号的matlab實作

代碼實作:

close all;

clc;clear

%% 純BPSK信号

snr = 15;

N = 512;

sig=anabpsk(N,50,0.25);

sig2=anabpsk(N,50,0.25);

y = awgn(sig,snr);

y2 = awgn(sig2,snr);

%% 噪聲

figure

n01 = randn(1,1024);

n02 = randn(1,512);

n03 = randn(1,512);

%% 猝發BPAK信号

sig_contac = [n01 y’ n02 y2’ n03]’;

[S,F,T,P] = spectrogram(sig_contac(900:1100),kaiser(128,18),120,128,1E3,‘yaxis’);%選取 時間軸上900:1100的信号畫能量譜密度作存在性檢測

figure(1)

plot(F,S);

title(‘BPSK調制猝發信号短時傅裡葉變換’)

axis([0 500 -50 50])

figure(2)

plot(F,P);

title(‘BPSK調制猝發信号能量譜密度’)

[tfr,t,f] = tfrstft(sig_contac,1:length(sig_contac),1024);

figure(3)

imagesc(t,f,abs(tfr));

title(‘BPSK調制猝發信号時頻圖’)

繼續閱讀