(The documentation of function fft2_pow5_analytical)
Last Update: 2024/4/24
◆機能・用途(Purpose)
時間関数pow5
のフーリエスペクトルを解析式を用いて計算する。
Compute the Fourier spectrum of a
time function pow5
using an analytical formula.
時間関数pow5はを正の定数として
で定義され、そのフーリエスペクトルは
となる
(
関数pow5のマニュアル参照)。
但しこれはフーリエ変換の定義にを用いた場合の式であり、
関数fft2に合わせてを用いる場合には
()式のをで置き換えて
となる。この関数では()式を用いて
フーリエスペクトルを計算する。
A time function pow5 is defined by Eq. (),
where is a positive constant.
The Fourier spectrum of it is given as Eq. ()
(see
the documentation of function create_timefunc_pow5)
if is used for the definition of the spectrum.
If is used instead
(to be consistent with function fft2),
the formula for the corresponding Fourier spectrum
is obtained by replacing in Eq. ()
with , and the result is Eq. ().
This equation () is used in this function
to compute the Fourier spectrum.
但し、()式の分母にが登場するので
の成分(DC成分)は計算できない。
そこでDC成分については
関数fft2
と等価な計算式を用いて数値的に計算する。関数fft2で用いている計算式は
である
(:周波数刻み、
:時間刻み、
:時系列データの先頭時刻、
:時系列データのサンプル数、
:番目のサンプル時刻における時系列データの値)。
の成分は()式でとして
と計算できる。
However, the Fourier spectrum at (the DC component)
cannot be computed analytically
because of in the denominator of Eq. ().
Therefore, the DC component is computed numerically
using an equation equivalent to that used in
function fft2
that is Eq. (),
where is a frequency step,
is a time step,
is the beginning time of the input time series data,
is the number of samples of the time series data,
and is the value of the time series data at th time sample.
The component for can be computed
by letting in Eq. ()
and the result is Eq. ().
フーリエ変換したい時間関数。
関数create_timefunc
を用いて作成したpow5関数でなければならない。
A time function to convert to the Fourier spectrum.
It must be a pow5 function created by
function create_timefunc.
tp
時間関数のの値。
引数timefuncで与える時間関数に用いたものと同じでなければならない。
The value of of the time function,
which must be same as that used for argument timefunc.
◆戻り値(Return value)
引数timefuncで与えた時間関数のフーリエスペクトル。
()()式を用いて計算される。
ナイキスト周波数から高周波側は
関数fill_spectrum2_upper_half
を用いて計算される。
The Fourier spectrum of the time function given by argument timefunc,
computed by Eqs. () and ().
The spectral components above the Nyquist frequency are computed by
function fill_spectrum2_upper_half.
赤字で示した2つのが共通でなければならない。
The two shown by red must be equal.
◆検証(Validation)
数値積分で得られるフーリエスペクトルとの比較により検証した。
この検証には0.01秒刻み、長さ1000秒、時定数 sのpow5関数を用いた。
そのフーリエスペクトルをこの関数(解析式)を用いて計算した場合と
関数fft2_sequence
(数値積分)を用いて計算した場合とで同じ結果が得られるかをチェックした。
The output of this function was examined
by comparison with a Fourier spectrum obtained by numerical integration.
This examination used a pow5 function of 1000 s long
with a time constant s sampled at every 0.01 s.
Its Fourier spectra computed by this function
(based on an analytical equation)
and by 関数fft2_sequence
(numerical integral) were compared to check the results.
という3ステップである。
The numerical integral of a pow5 function
does not yield a correct Fourier spectrum.
This is because the pow5 function does not converge to zero
for :
the Fourier transformation of the pow5 function
is given by Eq. (),
and truncating the integral of the 2nd term of this equation
at a finite time results in a significant error.
To avoid this problem,
the Fourier transformation of the derivative of a pow5 function
(F_d(\omega); Eq. ) was computed,
and then a relation was applied
to obtain the Fourier spectrum .
This procedure is composed of the following three steps:
create the derivative of a pow5 function
using function create_timefunc;
compute its Fourier spectrum
using function fft2_sequence; and
divide each spectral component of the result by .
一方、解析式に基づくフーリエスペクトルは
関数create_timefuncを用いてpow5関数を作成する
そのフーリエスペクトルを関数fft2_pow5_analyticalを用いて計算する
という2ステップで得られる。
The Fourier spectrum based on an analytical equation
is computed by the following two steps:
create a pow5 function
using function create_timefunc; and
compute its Fourier spectrum
using function fft2_pow5_analytical.
下図はこのようにして計算したフーリエスペクトルを示している。
青緑が数値積分(関数fft2_sequence使用)、
赤線が解析式(関数fft2_pow5_analytical使用)である。
両者がよく一致していることからこの関数が正しい結果を与えることが分かる。
The figure below shows the Fourier spectra
computed by these two different approaches;
the blue-green line is the result of a numerical integration
calculated with a function fft2_sequence,
and the red line shows an analytical result
calculated with a function fft2_pow5_analytical.
The excellent fit between the two lines indicates
the validity of this function.