京都大学 情報学研究科 知能情報学専攻 2023年8月実施 専門科目 S-5
Author
祭音Myyura
Description
設問1
2次元信号 f ( x , y ) f(x, y) f ( x , y ) の2次元フーリエ変換を
F ( u , v ) = ∬ − ∞ ∞ f ( x , y ) e − j ( u x + v y ) d x d y F(u, v) = \iint_{-\infty}^{\infty} f(x, y) e^{-j(ux+vy)} dxdy F ( u , v ) = ∬ − ∞ ∞ f ( x , y ) e − j ( ux + v y ) d x d y
とする。ただし j j j は虚数単位である。
また f ( x , y ) f(x, y) f ( x , y ) のある軸 l l l への投影を、軸 l l l 上の各点における、l l l に垂直な直線に沿った f ( x , y ) f(x, y) f ( x , y ) の線積分とする。以下の問いに答えよ。
(1) f ( x , y ) f(x, y) f ( x , y ) を x x x 軸に投影した信号 p ( x ) p(x) p ( x ) の1次元フーリエ変換を、F ( u , v ) F(u, v) F ( u , v ) を用いて表せ。
(2) 原点を中心として x x x 軸を反時計回りに角度 θ \theta θ 回転して得られた s s s 軸上に f ( x , y ) f(x, y) f ( x , y ) を投影した信号を p θ ( s ) p_\theta(s) p θ ( s ) とする。
p θ ( s ) p_\theta(s) p θ ( s ) の s s s についての1次元フーリエ変換を F ( u , v ) F(u, v) F ( u , v ) を用いて表せ。
設問2
長さ N N N の離散時間信号 x [ n ] x[n] x [ n ] の N N N 点離散フーリエ変換 X [ k ] X[k] X [ k ] を
X [ k ] = ∑ n = 0 N − 1 x [ n ] W N k n , W N = e − j 2 π N X[k] = \sum_{n=0}^{N-1} x[n] W_N^{kn}, \quad W_N = e^{-j\frac{2\pi}{N}} X [ k ] = n = 0 ∑ N − 1 x [ n ] W N kn , W N = e − j N 2 π
とする。ただし j j j は虚数単位、n , k = 0 , … , N − 1 n, k = 0, \ldots, N-1 n , k = 0 , … , N − 1 であり、N N N は正の偶数とする。以下の問いに答えよ。
(1) 観測系列 x 0 [ n ] = { x 0 [ 0 ] , x 0 [ 1 ] , x 0 [ 2 ] , x 0 [ 3 ] } = { 1 , 2 , 1 , − 2 } x_0[n] = \{x_0[0], x_0[1], x_0[2], x_0[3]\} = \{1, 2, 1, -2\} x 0 [ n ] = { x 0 [ 0 ] , x 0 [ 1 ] , x 0 [ 2 ] , x 0 [ 3 ]} = { 1 , 2 , 1 , − 2 } を、ある信号を 4000Hz で等間隔にサンプリングすることで得たとする。
x 0 [ n ] x_0[n] x 0 [ n ] の4点離散フーリエ変換を計算し、周波数(Hz)に対応する振幅スペクトルおよび位相スペクトルを図示せよ。
(2) 2つの要素数 N N N の実数値系列 x 1 [ n ] x_1[n] x 1 [ n ] および x 2 [ n ] x_2[n] x 2 [ n ] の N N N 点離散フーリエ変換を、1回の N N N 点離散フーリエによって計算する方法を導出せよ。
(3) 要素数 2 N 2N 2 N の実数値系列の 2 N 2N 2 N 点離散フーリエ変換を、1回の N N N 点離散フーリエ変換によって計算する方法を導出せよ。
Kai
設問1
(1)
By the definition of projection, we have
p ( x ) = ∫ − ∞ ∞ f ( x , y ) d y p(x) = \int_{-\infty}^{\infty}f(x,y)dy p ( x ) = ∫ − ∞ ∞ f ( x , y ) d y
hence the 1D Fourier transform of p ( x ) p(x) p ( x ) is
∫ − ∞ ∞ ( ∫ − ∞ ∞ f ( x , y ) d y ) e − j u x d x = ∫ − ∞ ∞ ∫ − ∞ ∞ f ( x , y ) e − j ( u x + 0 ⋅ y ) d x d y = F ( u , 0 ) \int_{-\infty}^{\infty}\left(\int_{-\infty}^{\infty}f(x,y)dy\right)e^{-jux}dx
= \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}f(x,y)e^{-j(ux+0\cdot y)}dxdy
= F(u, 0) ∫ − ∞ ∞ ( ∫ − ∞ ∞ f ( x , y ) d y ) e − j ux d x = ∫ − ∞ ∞ ∫ − ∞ ∞ f ( x , y ) e − j ( ux + 0 ⋅ y ) d x d y = F ( u , 0 )
(2)
Let ( s , t ) (s,t) ( s , t ) denote the coordinates obtained by rotating ( x , y ) (x, y) ( x , y ) counterclockwise by an angle θ \theta θ . Then we have
( s t ) = ( cos θ − sin θ sin θ cos θ ) ( x y ) ⇒ { x = s cos θ − t sin θ y = s sin θ + t cos θ \begin{pmatrix}
s\\
t
\end{pmatrix}
=
\begin{pmatrix}
\cos\theta&-\sin\theta\\
\sin\theta&\cos\theta
\end{pmatrix}
\begin{pmatrix}
x\\
y
\end{pmatrix} \Rightarrow
\begin{cases}
x = s\cos\theta-t\sin\theta\\
y = s\sin\theta+t\cos\theta
\end{cases} ( s t ) = ( cos θ sin θ − sin θ cos θ ) ( x y ) ⇒ { x = s cos θ − t sin θ y = s sin θ + t cos θ
by calculating the Jacobian determinant
J = ∣ cos θ − sin θ sin θ cos θ ∣ = cos 2 θ + sin 2 θ = 1 J =
\begin{vmatrix}
\cos\theta&-\sin\theta\\
\sin\theta&\cos\theta
\end{vmatrix}
= \cos^{2}\theta+\sin^{2}\theta = 1 J = cos θ sin θ − sin θ cos θ = cos 2 θ + sin 2 θ = 1
we know that f ( x , y ) d x d y = f ( s , t ) d s d t f(x,y)dxdy{=}f(s,t)dsdt f ( x , y ) d x d y = f ( s , t ) d s d t . Hence the 1D Fourier transform of p θ ( x ) p_{\theta}(x) p θ ( x ) is
∫ − ∞ ∞ ( ∫ − ∞ ∞ f ( s , t ) d t ) e − j u s d s = ∫ − ∞ ∞ ∫ − ∞ ∞ f ( s , t ) e − j ( u s + 0 ⋅ t ) d s d t = ∫ − ∞ ∞ ∫ − ∞ ∞ f ( x , y ) e − j ( u cos θ x + ( − u sin θ ) y ) d x d y = F ( u cos θ , − u sin θ ) \begin{aligned}
\int_{-\infty}^{\infty}\left(\int_{-\infty}^{\infty}f(s,t)dt\right)e^{-jus}ds
&= \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}f(s,t)e^{-j(us+0\cdot t)}dsdt\\
&= \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}f(x,y)e^{-j(u\cos\theta x+(-u\sin\theta)y)}dxdy\\
&= F(u\cos\theta, -u\sin\theta)
\end{aligned} ∫ − ∞ ∞ ( ∫ − ∞ ∞ f ( s , t ) d t ) e − j u s d s = ∫ − ∞ ∞ ∫ − ∞ ∞ f ( s , t ) e − j ( u s + 0 ⋅ t ) d s d t = ∫ − ∞ ∞ ∫ − ∞ ∞ f ( x , y ) e − j ( u c o s θ x + ( − u s i n θ ) y ) d x d y = F ( u cos θ , − u sin θ )
設問2
(1)
The 4-point discrete Fourier transform of x 0 [ n ] x_0[n] x 0 [ n ] :
( X [ 0 ] X [ 1 ] X [ 2 ] X [ 3 ] ) = ( W 4 0 W 4 0 W 4 0 W 4 0 W 4 0 W 4 1 W 4 2 W 4 3 W 4 0 W 4 2 W 4 4 W 4 6 W 4 0 W 4 3 W 4 6 W 4 9 ) ( x [ 0 ] x [ 1 ] x [ 2 ] x [ 3 ] ) = ( 1 1 1 1 1 − j − 1 j 1 − 1 1 − 1 1 j − 1 − j ) ( 1 2 1 − 2 ) = ( 2 − 4 j 2 4 j ) \begin{pmatrix}
X[0]\\
X[1]\\
X[2]\\
X[3]
\end{pmatrix}
=
\begin{pmatrix}
W_{4}^{0}&W_{4}^{0}&W_{4}^{0}&W_{4}^{0}\\
W_{4}^{0}&W_{4}^{1}&W_{4}^{2}&W_{4}^{3}\\
W_{4}^{0}&W_{4}^{2}&W_{4}^{4}&W_{4}^{6}\\
W_{4}^{0}&W_{4}^{3}&W_{4}^{6}&W_{4}^{9}
\end{pmatrix}
\begin{pmatrix}
x[0]\\
x[1]\\
x[2]\\
x[3]
\end{pmatrix}
=
\begin{pmatrix}
1&1&1&1\\
1&-j&-1&j\\
1&-1&1&-1\\
1&j&-1&-j
\end{pmatrix}
\begin{pmatrix}
1\\
2\\
1\\
-2
\end{pmatrix}
=
\begin{pmatrix}
2\\
-4j\\
2\\
4j
\end{pmatrix} X [ 0 ] X [ 1 ] X [ 2 ] X [ 3 ] = W 4 0 W 4 0 W 4 0 W 4 0 W 4 0 W 4 1 W 4 2 W 4 3 W 4 0 W 4 2 W 4 4 W 4 6 W 4 0 W 4 3 W 4 6 W 4 9 x [ 0 ] x [ 1 ] x [ 2 ] x [ 3 ] = 1 1 1 1 1 − j − 1 j 1 − 1 1 − 1 1 j − 1 − j 1 2 1 − 2 = 2 − 4 j 2 4 j
Fig. magnitude and phase spectra
(2)
X [ k ] = ∑ n = 0 N − 1 x [ n ] W N k n = ∑ n = 0 N − 1 x [ n ] cos ( 2 π − 2 π k n N ) + j ∑ n = 0 N − 1 x [ n ] sin ( 2 π − 2 π k n N ) = ∑ n = 0 N − 1 x [ n ] cos 2 π n ( N − k ) N + j ∑ n = 0 N − 1 x [ n ] sin 2 π n ( N − k ) N = Re X [ N − k ] − j Im X [ N − k ] \begin{aligned}
X[k]
&= \sum_{n=0}^{N-1}x[n]W_{N}^{kn}\\
&= \sum_{n=0}^{N-1}x[n]\cos\left(2\pi-\frac{2\pi kn}{N}\right)
+ j\sum_{n=0}^{N-1}x[n]\sin\left(2\pi-\frac{2\pi kn}{N}\right)\\
&= \sum_{n=0}^{N-1}x[n]\cos\frac{2\pi n(N-k)}{N}
+ j\sum_{n=0}^{N-1}x[n]\sin\frac{2\pi n(N-k)}{N}\\
&= \text{Re } X[N-k]-j\text{Im } X[N-k]
\end{aligned} X [ k ] = n = 0 ∑ N − 1 x [ n ] W N kn = n = 0 ∑ N − 1 x [ n ] cos ( 2 π − N 2 πkn ) + j n = 0 ∑ N − 1 x [ n ] sin ( 2 π − N 2 πkn ) = n = 0 ∑ N − 1 x [ n ] cos N 2 πn ( N − k ) + j n = 0 ∑ N − 1 x [ n ] sin N 2 πn ( N − k ) = Re X [ N − k ] − j Im X [ N − k ]
which implies that
{ Re X [ k ] = Re X [ N − k ] Im X [ k ] = − Im X [ N − k ] \begin{align}
\begin{cases}
\text{Re } X[k] = \text{Re } X[N-k]\\
\text{Im } X[k] = -\text{Im } X[N-k]
\end{cases} \tag{j}
\end{align} { Re X [ k ] = Re X [ N − k ] Im X [ k ] = − Im X [ N − k ] ( j )
Let y [ n ] = x 1 [ n ] + j x 2 [ n ] y[n] = x_{1}[n]+j x_{2}[n] y [ n ] = x 1 [ n ] + j x 2 [ n ] . Let X 1 [ k ] , X 2 [ k ] , Y [ k ] X_{1}[k],X_{2}[k],Y[k] X 1 [ k ] , X 2 [ k ] , Y [ k ] denote the discrete Fourier transform of x 1 [ n ] , x 2 [ n ] , y n x_{1}[n],x_{2}[n],y_{n} x 1 [ n ] , x 2 [ n ] , y n , respectively. Then,
Y [ k ] = ∑ n = 0 N − 1 ( x 1 [ n ] + j x 2 [ n ] ) W N k n = ∑ n = 0 N − 1 x 1 [ n ] W N k n + j ∑ n = 0 N − 1 x 2 [ n ] W N k n = X 1 [ k ] + i X 2 [ k ] = ( Re X 1 [ k ] + j Im X 1 [ k ] ) + j ( Re X 2 [ k ] + j Im X 2 [ k ] ) = ( Re X 1 [ k ] − Im X 2 [ k ] ) + j ( Im X 1 [ k ] + Re X 2 [ k ] ) \begin{align}
Y[k]
&= \sum_{n=0}^{N-1}(x_{1}[n]+j x_{2}[n])W_{N}^{kn} \nonumber \\
&= \sum_{n=0}^{N-1}x_{1}[n]W_{N}^{kn}+j\sum_{n=0}^{N-1}x_{2}[n]W_{N}^{kn} \nonumber \\
&= X_{1}[k]+iX_{2}[k] \nonumber \\
&= (\text{Re } X_{1}[k]+j\text{Im } X_{1}[k])+j(\text{Re } X_{2}[k]+j \text{Im } X_{2}[k]) \nonumber \\
&= (\text{Re } X_{1}[k]-\text{Im } X_{2}[k])+j(\text{Im } X_{1}[k]+\text{Re } X_{2}[k]) \tag{ii}
\end{align} Y [ k ] = n = 0 ∑ N − 1 ( x 1 [ n ] + j x 2 [ n ]) W N kn = n = 0 ∑ N − 1 x 1 [ n ] W N kn + j n = 0 ∑ N − 1 x 2 [ n ] W N kn = X 1 [ k ] + i X 2 [ k ] = ( Re X 1 [ k ] + j Im X 1 [ k ]) + j ( Re X 2 [ k ] + j Im X 2 [ k ]) = ( Re X 1 [ k ] − Im X 2 [ k ]) + j ( Im X 1 [ k ] + Re X 2 [ k ]) ( ii )
By (i) we know that
Y [ N − k ] = ( Re X 1 [ N − k ] − Im X 2 [ N − k ] ) + j ( Im X 1 [ N − k ] + Re X 2 [ N − k ] ) = ( Re X 1 [ k ] + Im X 2 [ k ] ) + j ( − Im X 1 [ k ] + Re X 2 [ k ] ) \begin{align}
Y[N-k]
&= (\text{Re } X_{1}[N-k]-\text{Im } X_{2}[N-k])+j(\text{Im } X_{1}[N-k]+\text{Re } X_{2}[N-k]) \nonumber \\
&= (\text{Re } X_{1}[k]+\text{Im } X_{2}[k])+j(-\text{Im } X_{1}[k]+\text{Re } X_{2}[k]) \tag{iii}
\end{align} Y [ N − k ] = ( Re X 1 [ N − k ] − Im X 2 [ N − k ]) + j ( Im X 1 [ N − k ] + Re X 2 [ N − k ]) = ( Re X 1 [ k ] + Im X 2 [ k ]) + j ( − Im X 1 [ k ] + Re X 2 [ k ]) ( iii )
and by (ii), (iii) we have
{ X 1 [ k ] = Re Y [ k ] + Re Y [ N − k ] 2 + j Im Y [ k ] − Im Y [ N − k ] 2 X 2 [ k ] = Im Y [ k ] + Im Y [ N − k ] 2 − j Re Y [ k ] − Re Y [ N − k ] 2 \begin{align}
\begin{cases}
\displaystyle
X_{1}[k] = \frac{\text{Re } Y[k]+\text{Re } Y[N-k]}{2}+j\frac{\text{Im } Y[k]-\text{Im } Y[N-k]}{2}\\
\displaystyle
X_{2}[k] = \frac{\text{Im } Y[k]+\text{Im } Y[N-k]}{2}-j\frac{\text{Re } Y[k]-\text{Re } Y[N-k]}{2}
\end{cases} \tag{iv}
\end{align} ⎩ ⎨ ⎧ X 1 [ k ] = 2 Re Y [ k ] + Re Y [ N − k ] + j 2 Im Y [ k ] − Im Y [ N − k ] X 2 [ k ] = 2 Im Y [ k ] + Im Y [ N − k ] − j 2 Re Y [ k ] − Re Y [ N − k ] ( iv )
(3)
By definition we know that W N 2 k n = W N / 2 k n W_{N}^{2kn}{=}W_{N/2}^{kn} W N 2 kn = W N /2 kn and W N k N = 1 W_{N}^{kN}{=}1 W N k N = 1 , hence we have
X [ 2 k ] = ∑ n = 0 N − 1 x [ n ] W 2 N 2 k n + ∑ n = N 2 N − 1 x [ n ] W 2 N 2 k n = ∑ n = 0 N − 1 x [ n ] W 2 N 2 k n + ∑ n = 0 N − 1 x [ n + N ] W 2 N 2 k ( n + N ) = ∑ n = 0 N − 1 x [ n ] W N k n + ∑ n = 0 N − 1 x [ n + N ] W N k ( n + N ) = ∑ n = 0 N − 1 x [ n ] W N k n + ∑ n = 0 N − 1 x [ n + N ] W N k n = ∑ n = 0 N − 1 ( x [ n ] + x [ n + N ] ) W N k n \begin{aligned}
X[2k]
&= \sum_{n=0}^{N-1}x[n]W_{2N}^{2kn}+\sum_{n=N}^{2N-1}x[n]W_{2N}^{2kn}\\
&= \sum_{n=0}^{N-1}x[n]W_{2N}^{2kn}+\sum_{n=0}^{N-1}x[n+N]W_{2N}^{2k(n+N)}\\
&= \sum_{n=0}^{N-1}x[n]W_{N}^{kn}+\sum_{n=0}^{N-1}x[n+N]W_{N}^{k(n+N)}\\
&= \sum_{n=0}^{N-1}x[n]W_{N}^{kn}+\sum_{n=0}^{N-1}x[n+N]W_{N}^{kn}\\
&= \sum_{n=0}^{N-1}(x[n]+x[n+N])W_{N}^{kn}\\
\end{aligned} X [ 2 k ] = n = 0 ∑ N − 1 x [ n ] W 2 N 2 kn + n = N ∑ 2 N − 1 x [ n ] W 2 N 2 kn = n = 0 ∑ N − 1 x [ n ] W 2 N 2 kn + n = 0 ∑ N − 1 x [ n + N ] W 2 N 2 k ( n + N ) = n = 0 ∑ N − 1 x [ n ] W N kn + n = 0 ∑ N − 1 x [ n + N ] W N k ( n + N ) = n = 0 ∑ N − 1 x [ n ] W N kn + n = 0 ∑ N − 1 x [ n + N ] W N kn = n = 0 ∑ N − 1 ( x [ n ] + x [ n + N ]) W N kn
Similarly, since W 2 N N = − 1 W_{2N}^{N}{=}{-}1 W 2 N N = − 1 , we have
X [ 2 k + 1 ] = ∑ n = 0 N − 1 x [ n ] W 2 N ( 2 k + 1 ) n + ∑ n = 0 N − 1 x [ n + N ] W 2 N ( 2 k + 1 ) ( n + N ) = ∑ n = 0 N − 1 ( x [ n ] + x [ n + N ] W 2 N ( 2 k + 1 ) N ) W 2 N ( 2 k + 1 ) n = ∑ n = 0 N − 1 ( x [ n ] + x [ n + N ] W 2 N N ) W 2 N 2 k n W 2 N n = ∑ n = 0 N − 1 ( x [ n ] − x [ n + N ] ) W 2 N n W N k n \begin{aligned}
X[2k+1]
&= \sum_{n=0}^{N-1}x[n]W_{2N}^{(2k+1)n}+\sum_{n=0}^{N-1}x[n+N]W_{2N}^{(2k+1)(n+N)}\\
&= \sum_{n=0}^{N-1}\left(x[n]+x[n+N]W_{2N}^{(2k+1)N}\right)W_{2N}^{(2k+1)n}\\
&= \sum_{n=0}^{N-1}\left(x[n]+x[n+N]W_{2N}^{N}\right)W_{2N}^{2kn}W_{2N}^{n}\\
&= \sum_{n=0}^{N-1}\left(x[n]-x[n+N]\right)W_{2N}^{n}W_{N}^{kn}
\end{aligned} X [ 2 k + 1 ] = n = 0 ∑ N − 1 x [ n ] W 2 N ( 2 k + 1 ) n + n = 0 ∑ N − 1 x [ n + N ] W 2 N ( 2 k + 1 ) ( n + N ) = n = 0 ∑ N − 1 ( x [ n ] + x [ n + N ] W 2 N ( 2 k + 1 ) N ) W 2 N ( 2 k + 1 ) n = n = 0 ∑ N − 1 ( x [ n ] + x [ n + N ] W 2 N N ) W 2 N 2 kn W 2 N n = n = 0 ∑ N − 1 ( x [ n ] − x [ n + N ] ) W 2 N n W N kn
Therefore, let y [ n ] = x [ n ] + x [ n + N ] y[n]{=}x[n]{+}x[n+N] y [ n ] = x [ n ] + x [ n + N ] and z [ n ] = x [ n ] − x [ n + N ] z[n]{=}x[n]{-}x[n+N] z [ n ] = x [ n ] − x [ n + N ] , we have
{ X [ 2 k ] = ∑ n = 0 N − 1 y [ n ] W N k n X [ 2 k ] = ∑ n = 0 N − 1 y [ n ] W 2 N n W N k n \begin{aligned}
\begin{cases}
X[2k] = \sum_{n=0}^{N-1}y[n]W_{N}^{kn}\\
X[2k] = \sum_{n=0}^{N-1}y[n]W_{2N}^{n}W_{N}^{kn}
\end{cases}
\end{aligned} { X [ 2 k ] = ∑ n = 0 N − 1 y [ n ] W N kn X [ 2 k ] = ∑ n = 0 N − 1 y [ n ] W 2 N n W N kn
which implies that 2 N 2N 2 N -point discrete Fourier transforms can be obtained using two executions of the N N N -point Fourier transform.
By using the result from the previous question (2), it has been demonstrated that the N N N -point discrete Fourier transforms of two different sequences can be obtained using a single execution of the N N N -point Fourier transform, thereby showing that a 2 N 2N 2 N -point discrete Fourier transform can be obtained using a single execution of the N N N -point Fourier transform.