右上の図がどのようになっているのか、非常に興味があります。http://en.wikipedia.org/wiki/Spectrogram 最小限の数学用語で簡略化された答えに感謝します。ありがとうございました。スペクトログラムとは何ですか?
3
A
答えて
3
プロットは、横軸に時間、縦軸に周波数を示しています。ピクセルカラーは各時刻の各周波数の強度を示します。
スペクトログラムは、信号を取り出し、小さな時間セグメントに細断し、各セグメントにフーリエ級数をかけて生成されます。
ここにいくつかのMATLABコードを生成します。
ごみのように信号を直接プロットすると、スペクトログラムをプロットすると、コンポーネント信号の周波数が明確にわかります。
%%%%%%%%
%% setup
%%%%%%%%
%signal length in seconds
signalLength = 60+10*randn();
%100Hz sampling rate
sampleRate = 100;
dt = 1/sampleRate;
%total number of samples, and all time tags
Nsamples = round(sampleRate*signalLength);
time = linspace(0,signalLength,Nsamples);
%%%%%%%%%%%%%%%%%%%%%
%create a test signal
%%%%%%%%%%%%%%%%%%%%%
%function for converting from time to frequency in this test signal
F1 = @(T)0+40*T/signalLength; #frequency increasing with time
M1 = @(T)1-T/signalLength; #amplitude decreasing with time
F2 = @(T)20+10*sin(2*pi()*T/signalLength); #oscilating frequenct over time
M2 = @(T)1/2; #constant low amplitude
%Signal frequency as a function of time
signal1Frequency = F1(time);
signal1Mag = M1(time);
signal2Frequency = F2(time);
signal2Mag = M2(time);
%integrate frequency to get angle
signal1Angle = 2*pi()*dt*cumsum(signal1Frequency);
signal2Angle = 2*pi()*dt*cumsum(signal2Frequency);
%sin of the angle to get the signal value
signal = signal1Mag.*sin(signal1Angle+randn()) + signal2Mag.*sin(signal2Angle+randn());
figure();
plot(time,signal)
%%%%%%%%%%%%%%%%%%%%%%%
%processing starts here
%%%%%%%%%%%%%%%%%%%%%%%
frequencyResolution = 1
%time resolution, binWidth, is inversly proportional to frequency resolution
binWidth = 1/frequencyResolution;
%number of resulting samples per bin
binSize = sampleRate*binWidth;
%number of bins
Nbins = ceil(Nsamples/binSize);
%pad the data with zeros so that it fills Nbins
signal(Nbins*binSize+1)=0;
signal(end) = [];
%reshape the data to binSize by Nbins
signal = reshape(signal,[binSize,Nbins]);
%calculate the fourier transform
fourierResult = fft(signal);
%convert the cos+j*sin, encoded in the complex numbers into magnitude.^2
mags= fourierResult.*conj(fourierResult);
binTimes = linspace(0,signalLength,Nbins);
frequencies = (0:frequencyResolution:binSize*frequencyResolution);
frequencies = frequencies(1:end-1);
%the upper frequencies are just aliasing, you can ignore them in this example.
slice = frequencies<max(frequencies)/2;
%plot the spectrogram
figure();
pcolor(binTimes,frequencies(slice),mags(slice,:));
フーリエ変換fourierResult
行列の逆変換は、元の信号を返します。ただ、ここでは、好きの答えに追加する
0
はあなたを通じ歩く偉大なチュートリアルでは、直感的に主要な概念を説明するだけの十分な数学と物理学を上に触れ、Matlabのスペクトログラムを読んで、ステップバイステップです:
http://www.caam.rice.edu/~yad1/data/EEG_Rice/Literature/Spectrograms.pdf
関連する問題
- 1. Matlabスペクトログラムとmatplotlibスペックグラムの違いは?
- 2. Matlabのスペクトログラム例
- 3. スペクトログラムをGUIDEスクリプト
- 4. fft後のスペクトログラム
- 5. Matlabで2Dスペクトログラムを作成
- 6. PythonのスペクトログラムのFFT
- 7. 2つのオーディオファイルのスペクトログラム(まとめて)
- 8. 音声分析でスペクトログラムをプロットする
- 9. オーディオファイルのスペクトログラム、時間と振幅か時間か周波数か
- 10. Matplotlibスペクトログラムからのパディングの除去
- 11. fftのpythonによるスペクトログラム
- 12. スペクトログラムに色を追加するにはどうすればいいですか?
- 13. スペクトログラムにカラーバーを追加する
- 14. Bokeh:スペクトログラムをフラッシュする方法
- 15. オーディオファイルのスペクトログラムの値を理解する
- 16. 信号スペクトログラムからピークを抽出する
- 17. スペクトログラムのピークを見つける
- 18. iOSの2つのスペクトログラムの比較
- 19. トランスフォームとは何か、トランスフォームとは何ですか?
- 20. jobConfクラスとは何ですか?それは何ですか?
- 21. @privateとは何ですか?その用途は何ですか?
- 22. IPM.Noteとは何ですか?その用途は何ですか?
- 23. _applyプラグインとは何ですか: 'com.google.gms.google-services'_は何ですか?
- 24. Mongoclientとは何ですか?その目的は何ですか?
- 25. 型とは何ですか?スカラーの型コンストラクタは何ですか?
- 26. GraphemeClusterとは何ですか?ExpressibleByExtendedGraphemeClusterLiteralの機能は何ですか?
- 27. オプションとは何ですか?typescriptの[x:string]は何ですか?
- 28. スペクトログラムと呼ばれるモジュールがありません
- 29. Sqliteとは何ですか?
- 30. イメージハッシュとは何ですか?
多分DSP.stackexchangeはもっと適切です... –
私はプログラミングの解決策を探していましたが、DSPの数学的専門用語のテクニカルなオーバーロードに追いつくことができません! – Sm1
dsp.seには問題はありませんので、再質問しないでください。記事の右上のプロットについては、[詳細についてはそのページ](http://en.wikipedia.org/wiki/File:Spectrogram_of_violin.png)を参照してください。作者はAdobe Auditionを使用して作成しました。使用されたオーディオファイルも使用できます。 MATLABのスペクトログラムのドキュメントの基本例を使って、自分でやってみることができます – abcd