FFT アナライザ このプログラムの説明は,CQ出版社「トランジスタ技術」の2021年10月号から開始された連載記事「STM32マイコンではじめるPC計測」の中にあります.このプログラムといっしょに使うPC側のプログラムについても同誌を参照してください.
Dependencies: Array_Matrix mbed SerialTxRxIntr DSP_ADDA UIT_FFT_Real Window
MyFFT_Analyzer/FFT_Analyzer.hpp
- Committer:
- MikamiUitOpen
- Date:
- 2021-11-03
- Revision:
- 1:d9dbfbe95c8d
- Parent:
- 0:e5fc70976c00
File content as of revision 1:d9dbfbe95c8d:
//------------------------------------------------------- // FFT を使ってスペクトル解析を行うクラス(ヘッダ) // // 2021/10/19, Copyright (c) 2021 MIKAMI, Naoki //------------------------------------------------------- #ifndef FFT_ANALYZER_HPP #define FFT_ANALYZER_HPP #include "Array.hpp" #include "fftReal.hpp" #include "Blackman.hpp" namespace Mikami { class FftAnalyzer { public: // nFft: FFT のデータ点の数 explicit FftAnalyzer(int nFft); virtual ~FftAnalyzer() {} void Execute(const Array<float> &xn, Array<float> &absFt); private: const int N_FFT_; FftReal fft_; BlackmanWindow wBlk_; Array<float> xData_; // 解析対象の時系列データ Array<float> wData_; // 窓掛けされたデータ Array<Complex> yFft_; // FFT の結果 // コピー・コンストラクタおよび代入演算子の禁止のため FftAnalyzer(const FftAnalyzer& ); FftAnalyzer& operator=(const FftAnalyzer& ); }; } #endif // FFT_ANALYZER_HPP