1
$\begingroup$

As you know that Discrete Hartley transformation is related to the discrete Fourier transformation, $i.e$, assuming we have a vector $X = [x_0,x_1,\ldots,x_N]$, its Hartley transformation is equal to $H(X) = Real(FFT(X)) - Imag(FFT(X))$. where $H$ denotes the Hartley transformation.

I wonder, if I want the output of the Hartley transformation equals to a vector of length $N$ whose all elements are $1$, it means $H(X) = [1,1,\ldots,1] $, what supposed to be the input $X$? I means I need to formulate the relationship between the inputs and outputs.

$\endgroup$
2
$\begingroup$

Wikipedia's entry for the discrete Hartley transform shows states that the $\mathsf{DHT}$ is, up to a scaling, its own inverse. If $x$ is a vector with $N$ entries and $y$ is its discrete Hartley transform, \begin{equation} y = \mathsf{DHT}x, \end{equation} then \begin{equation} x = \frac{1}{N}\mathsf{DHT}y. \end{equation}


If $x$ is a vector with $N$ entries such that \begin{equation} \mathsf{DHT}x = \underbrace{(1,1,\ldots,1)^{\mathsf{T}}}_{\textrm{$N$ entries}}, \end{equation} then we recover $x$ with \begin{equation} x = \frac{1}{N}\mathsf{DHT}\left(\begin{array}{c}1\\1\\\vdots\\1\end{array}\right). \end{equation} This means that $x$ is \begin{equation} \begin{split} x &=~ \frac{1}{N}\left(\mathsf{Re}\left[\mathsf{DFT}\left(\begin{array}{c}1\\1\\\vdots\\1\end{array}\right)\right] - \mathsf{Im}\left[\mathsf{DFT}\left(\begin{array}{c}1\\1\\\vdots\\1\end{array}\right)\right]\right), \end{split} \end{equation} where $\mathsf{DFT}$ is the discrete Fourier transform, which we usually compute with a FFT algorithm. The $\ell^{\textrm{th}}$ entry of the $\mathsf{DFT}$ of the all-1 vector is \begin{equation} \begin{split} \sum_{n=0}^{N-1}1\times e^{-2\pi j \ell n/N} &=~ 1 + e^{-2\pi j \ell/N} + \left(e^{-2\pi j \ell/N}\right)^2 + \cdots + \left(e^{-2\pi j \ell/N}\right)^{N-1}\\ &=~ \left\{\begin{array}{rl}N & \textrm{if}~\ell=0,\\0&\textrm{if}~\ell\neq 0.\end{array}\right.\\ &=~ N\delta_{\ell,0}, \end{split} \end{equation} where $\delta_{p,q}$ is the Kronecker delta. One way to show this is to note that if $\ell = 0$, then each exponent is $0$, so each term in the sum is $1$. On the other hand, if $\ell\neq 0$, then $\exp(-2\pi j\ell/N) \neq 1$,and \begin{equation} \begin{split} 1 + e^{-2\pi j \ell/N} + \left(e^{-2\pi j \ell/N}\right)^2 + \cdots + \left(e^{-2\pi j \ell/N}\right)^{N-1} &=~ \frac{1 - \left(e^{-2\pi j \ell/N}\right)^N}{1 - e^{-2\pi j \ell/N}}\\ &=~ \frac{1 - e^{-2N\pi j \ell/N}}{1 - e^{-2\pi j \ell/N}}\\ &=~ \frac{1 - 1}{1 - e^{-2\pi j \ell/N}} ~=~ 0. \end{split} \end{equation}

That shows that the $\mathsf{DFT}$ of the all-1 vector has no imaginary part, and its real part is $(N,0,0,\ldots,0)^{\mathsf{T}}$. Hence \begin{equation} x ~=~ \frac{1}{N}\left(\begin{array}{c} N\\0\\0\\\vdots\\0 \end{array}\right) ~=~ \left(\begin{array}{c} 1\\0\\0\\\vdots\\0 \end{array}\right). \end{equation}

$\endgroup$
  • $\begingroup$ Thank you so much .. that's really appreciated. $\endgroup$ – Gze May 20 '20 at 3:19
  • $\begingroup$ Thanks again, that's really interesting. I am trying to understand it well, if I got a question, I will let you know. $\endgroup$ – Gze May 20 '20 at 6:36
  • $\begingroup$ I added my question into the below answer, could you please check it . Thank you in advance. $\endgroup$ – Gze May 20 '20 at 11:46
1
$\begingroup$

The Hartley transform is an involution: it is (up to a scale factor) its own inverse. The classical discrete Hartley transform of order $N$ is such that $H_N^{-1} = \frac{1}{N}H_N$. Be careful with your notation, the vector $x$ has $N+1$ entries, so maybe you are after an $N+1$-order DHT!

If $\mathbf{1}$ denotes the all-ones vector, then in matrix-vector product $H_Nx = \mathbf{1} $ is equivalent to $H_N^{-1}H_Nx = H_N^{-1}\mathbf{1} $, and you get more directly the mysterious $X$:

$$x = \frac{1}{N}H_N\mathbf{1} $$

and you get the result given by Joe Mac by a direct computation. A little interpretation: the discrete "Dirac" signal at the origin yields a flat "Hartley" spectrum, just like for Fourier.

$\endgroup$
  • 1
    $\begingroup$ Thank you for explaining it, I got it now. but I was wondering what's about if $H_Nx = y$ and only some values of, i.e., $y_{1:4:N} = 1$ and other values of $y$ are any random values. So, can we express the relationship between the $y_{1:4:N}$ and $x_{1:4:N}$ mathematically in similar way too? $\endgroup$ – Gze May 20 '20 at 11:44
  • $\begingroup$ I should add something, .. So, can we express the relationship between the $y_{1:4:N}$ and $x_{1:4:N}$ OR between $y_{1:4:N}$ and $x$ mathematically in similar way too? $\endgroup$ – Gze May 20 '20 at 12:07
  • 1
    $\begingroup$ I don't really understand this comment. This may require a different question. But you can indeed interleave transforms and downsampling operators, and solutions can be quite complicated $\endgroup$ – Laurent Duval May 20 '20 at 12:16
  • 1
    $\begingroup$ OK .. I posted it as a new question here dsp.stackexchange.com/questions/67696/… .. thank you $\endgroup$ – Gze May 20 '20 at 14:49
  • 1
    $\begingroup$ And you did well. I am not able to see a clear answer right now $\endgroup$ – Laurent Duval May 20 '20 at 22:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.