資源簡介
跳頻信號主要參數估計,包括跳變周期,跳時刻,瞬時頻率估計,以及誤差分析。運用多種方法:短時傅里葉編碼(STFT),SPWVD,GABOR,EMBD,SWWVD

代碼片段和文件信息
%輸入信息序列,4FSK調制1111111111111111
x=input(‘Please?enter?:‘);%輸入任意雙比特數組,如:[11?01?10?01??00?01?10?...],但數組長度不大于10
N=length(x);
Ts=0.00001;?
fs=1/Ts;?
Tm=0.002;
EndTime=0.004-Ts;?%2s??
Nset=(EndTime+Ts)/Ts;
y=zeros(Nset1);
?i=0;
?xd=zeros(1N);
?while?i ?????i=i+1;
??switch?(x(i))
??????case?00
??????????[u1time1]=gensig(‘sin‘Tm/1EndTimeTs);
??????????xd(i)=1;
??????case?01
??????????[u1time1]=gensig(‘sin‘Tm/2EndTimeTs);?
???????????xd(i)=2;
??????case?10
?????????[u1time1]=gensig(‘sin‘Tm/3EndTimeTs);?
??????????xd(i)=3;
??????case?11
??????????[u1time1]=gensig(‘sin‘Tm/4EndTimeTs);?
???????????xd(i)=4;
??????otherwise?
??????????disp(?‘輸入錯誤‘);
??end
y(1+(i-1)*Nset:Nset*i1)=u1;
%t=[t;time1];
end
%跳頻信號時域波形
figure(1)
????subplot(211);
?????plot(y)????
xlabel(‘t‘)
ylabel(‘4FSK調制信號‘)
title(‘4FSK信號‘)
%axis([0?20?-1?1])
grid
%輸出跳頻序列1111111111111111111111111111111
G=[0?1?2?3?4?5?6?7?8?9?10];
b=input(‘選擇跳頻序列:‘);%輸入1~9任意數字,選擇不同跳頻序列(最好選擇4、5、6,這樣保證寬跳頻,每一跳頻率差更大)
Su=mod(b.*G11);
for??j=2:11
???fprintf(‘%3d‘Su(j))
end
%??跳頻序列合成跳頻載波1111111111111111111
Tc=0.0003;
C=zeros(Nset1);
for?k=2:(N+1)
?[Carrier1time2]=gensig(‘sin‘?1/(Su(k)/Tc+xd(k-1)/Tm)EndTimeTs);
???C(1+(k-2)*Nset:Nset*(k-1)1)=Carrier1;
end
%混頻產生跳頻信號
subplot(212)
plot(C)
xlabel(‘t‘)
ylabel(‘跳頻調制信號‘)
title(‘跳頻信號‘)
grid
??%1111111111111111111111111111111111111111111111
subplot(212)
plot(C)
xlabel(‘t‘)
ylabel(‘跳頻調制信號‘)
title(‘跳頻信號‘)
grid
??%1111111111111111111111111111111111111111111111
%11111111111111111111111111111111111111111111
%小波變換
figure(2)
?%z=hilbert(FHsignal);
len?=?length(C);
B=centfrq(‘cmor3-3‘);????
?CC=2*B*1000;
?a=CC./(1000:-1:1);
%a=6:600;
cw1?=?cwt(Ca‘cmor3-3‘‘plot‘);???
%?%?title(‘Continuous?Transform?absolute?coefficients.‘)?
%?%?ylabel(‘a‘)
%?%?xlabel(‘b‘)
%?%?figure(3)
%?%?imagesc(abs(cw1));
%?%??xlabel(‘b‘)
%?%??ylabel(‘f‘)
%?%??set(gca‘ydir‘‘normal‘)?
%?%?title(‘小波變換時頻圖‘)
%?f=scal2frq(a‘morl‘Ts);??%一模一樣
f=B./a/Ts;
figure(4)
imagesc(1:length(C)f*Tsabs(cw1))
xlabel(‘t‘)
ylabel(‘歸一化頻率f‘)?
set(gca‘ydir‘‘normal‘)?
ylim([0?0.5])
title(‘小波變換時頻圖‘)
%111111111111111111111111111111111111
%跳頻信號跳變點位置
[csize]=max(abs(cw1));
d=length(cw1);
result=abs(cw1);
big1=max(result);
big2=max(big1);
y=big2*0.2;
L=length(C);
i=1;
j=1;
sum=zeros(1L);
for?i=1:L
for?j=1:1000
?if(result(ji) ?????sum(i)=sum(i)+result(ji);
?end
end
end
figure(7)
plot(sum)
D=fft(sum);
title(‘低于閾值門限的模值在各平移因子下的平均模值‘);
[peak1loc1]=max(D(2:length(sum)));
N=length(sum)/loc1;
bigpeak=sort(sum‘descend‘);
high=bigpeak(1)*0.5;
width=N/2;
for?M=1:length(sum)
???if?(sum(M) ???????sum(M)=0;
???end
end
[peakloc]?=?findpeaks(sum‘minpeakdistance‘width);
??figure(8)
?stem(locpeak)
?xlabel(‘時間?T‘)
?title(‘CWT跳時刻估計‘)
?%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%???誤差分析??%%%%%%
%?%??er=zeros(19);
%?%??err0=400:400:3600;
%?%??resultend=zeros(99);%%
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????4926??2018-05-29?19:16??程序\CWTT.m
?????文件???????2770??2018-05-29?00:27??程序\EMBDIF.m
?????文件???????4500??2018-05-28?20:07??程序\EMBDshiji.m
?????文件???????2435??2018-05-29?04:33??程序\EMBDzui.m
?????文件???????3015??2018-05-26?21:08??程序\gabor.m
?????文件???????4559??2018-05-29?03:13??程序\resist.m
?????文件???????3235??2018-05-31?11:33??程序\SPWVD.m
?????文件???????5819??2018-05-31?11:43??程序\STFT.m
?????文件???????2342??2018-05-31?13:58??程序\STFTIF.m
?????文件???????6392??2018-05-28?13:57??程序\SWWVD.m
?????文件???????6368??2018-05-29?19:16??程序\SWWVDMoment.m
?????文件???????2642??2018-05-31?13:17??程序\SWWVDZUI.m
?????文件??????12840??2018-05-31?15:08??程序說明.docx
?????目錄??????????0??2018-06-08?12:56??程序
-----------?---------??----------?-----??----
????????????????61843????????????????????14
- 上一篇:粘彈性介質地震波場有限差分數值模擬程序
- 下一篇:二維相關shige軟件
評論
共有 條評論