時間周波数解析 "pspectrum" について

4 次查看(过去 30 天)
haru
haru 2024-8-1
時間周波数解析に使う "pspectrum" について、各パラメータからどのようにKaiser窓の時間幅が決まるのかわからず困っています。
現在私は下記のコードを使用しています。
pspectrum(W_mix,Fs,'spectrogram','FrequencyLimits',[0 1.2e6],
'FrequencyResolution',9e4,'Overlap',99,'Leakage',0.75,'MinThreshold',-95);
*ここで、w_mixは1×15000の波形データ、Fsはサンプリング周波数で1×10^8です。
この場合、形状係数βが10となるのはわかるのですが、窓関数の時間幅はどのように求まるのでしょうか。
参考にしている先行研究によると、時間幅は20.52μsとなるらしいのですが計算方法がわかりません。ご教授よろしくお願いいたします。

回答(1 个)

Suraj Kumar
Suraj Kumar 2024-8-5
Hi Haru,
From what I gather, you want to figure out how the time width of the Kaiser window is determined with the “pspectrumfunction in MATLAB.
For this, you can go through the following steps and the relevant code snippets:
1. Create the spectrogram plot using the “pspectrum” function with the specified parameters.
W_mix = rand(1, 15000); % Example waveform data
Fs = 1e8;
FrequencyResolution = 9e4;
% Calculate the spectrogram and plot it
pspectrum(W_mix, Fs, 'spectrogram', ...
'FrequencyLimits', [0 1.2e6], ...
'FrequencyResolution', FrequencyResolution, ...
'Overlap', 99, ...
'Leakage', 0.75, ...
'MinThreshold', -95);
2. Retrieve the handle to the current spectrogram plot using “gca” function and extract the time vector from the plot’s children.
h = gca;
spectrogramData = h.Children;
timeVector = spectrogramData.XData;
3. Then determine the length of time window by taking the difference between the first and last points of time vector and dividing by the length.
% Calculate the time width of the window
windowLength = length(timeVector); % Length of the time window
timeWidth = (timeVector(end) - timeVector(1)) / windowLength;
Refer to the output below for more clarity:
For more information on “gcafunction and graphic objects in MATLAB, you may refer to the following documentations:
I hope this is helpful.

类别

Help CenterFile Exchange 中查找有关 ビッグ データの処理 的更多信息

产品


版本

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!