# Filter Theory in Physics Notation

Sep 7, 2018   #Quantum Mechanics  #Signal Processing  #Filters

I happened to have picked up quantum mechanics from Feynman’s lectures and Dirac’s book before I got around to my main stream theory of linear filters during my B.Tech. So I went through a somewhat weird path of understanding the math around filter theory based on the quant-mech math I’d picked up. I do think it is clearer than the way linear filter theory books deal with the topic, especially due to an explicit notation for a “signal” in the abstract that is independent of “a representation of a signal”.

Here I capture a gist of how it went into my head. Note that I’m not aiming for mathematical rigour, but more as an illustration of how good notations are technology for the mind - simplifying our ability to reason in a domain.

A “signal” is a vector $$\mid {\mathbf s} \rangle$$.

Since a signal is entirely defined by its values at various times, we use $$\mid t \rangle$$ to denote the basis vector for an impulse signal peaking only at time $$t$$, where $${{\langle t’}{\mid t \rangle}} = \delta(t-t’)$$. So we can decompose $$\mid {\mathbf s} \rangle$$ as

$$\mid {\mathbf s} \rangle = \int{{\mid t \rangle}{\langle{t}\mid}{{\mathbf s}\rangle}dt} = \int{s(t) {\mid t \rangle} dt}$$

where $$\langle t {\mid {\mathbf s}\rangle} = s(t)$$.

A linear filter $$\hat{H}$$ is expressed as a linear operator on $${\mid {\mathbf s} \rangle}$$ as $$\hat{H}{\mid {\mathbf s}\rangle}$$.

If you denote by $$\hat{D}_t$$ the operator that delays a signal by time $$t$$, then we have -

$$\hat{D}_{t’}{\mid t\rangle} = {\mid t+t’ \rangle}$$

which when applied to $$\mid {\mathbf s} \rangle$$ gives -

$$\hat{D}_{t'}{\mid {\mathbf s} \rangle} = \int{s(t)\hat{D}_{t'}{\mid t \rangle}dt} = \int{s(t){\mid t+t' \rangle}dt} = \int{s(t-t'){\mid t \rangle}dt}$$

Now, how do we characterize $$\hat{D}_t$$?

$${\langle t''\mid}\hat{D}_{t'}{\mid t\rangle} = {\langle t''}{\mid t+t'\rangle} = \delta(t' + (t - t'')) = {\langle t''-t'}{\mid t\rangle}$$

Therefore

$${\langle t''\mid}\hat{D}_{t'} = {\langle t''-t'\mid}$$

Then a “time invariant” filter is an operator $$\hat{H}$$ that commutes with $$\hat{D}_t$$.

$$[\hat{H},\hat{D}_t] = \hat{H}\hat{D}_t - \hat{D}_t\hat{H} = 0$$

To construct a frequency representation of a signal, we choose a basis $${\mid \omega \rangle}$$ such that $$\langle \omega {\mid t \rangle} = e^{i\omega{t}}$$.

So the Fourier representation of $$\mid {\mathbf s} \rangle$$ is given by

$${\mid {\mathbf s} \rangle} = \int{{\mid\omega\rangle}{\langle\omega\mid}{{\mathbf s}\rangle}d\omega} = \int{S(\omega){\mid \omega\rangle}d\omega}$$

where

$$S(\omega) = {\langle\omega{\mid {\mathbf s}\rangle}} = \int{{\langle\omega}{\mid{t}\rangle}{\langle t}{\mid {\mathbf s}\rangle}dt} = \int{s(t)\langle\omega{\mid t\rangle}dt} = \int{s(t)e^{i\omega t}dt}$$

If we apply a linear time-invariant operator $$\hat{H}$$ to a signal $${\mid {\mathbf s} \rangle}$$, we have

$$\hat{H}{\mid {\mathbf s} \rangle} = \int{\hat{H}{\mid t\rangle}{\langle{t}\mid}{{\mathbf s}\rangle}dt} = \int{s(t)\hat{H}{\mid t\rangle}dt}$$

So we can characterize $$\hat{H}$$ using -

$${{\langle t\mid}\hat{H}{\mid {\mathbf s}\rangle}} = \int{s(t’){\langle t\mid}\hat{H}{\mid t’\rangle}dt’}$$

So we need to know -

$${\langle t\mid}\hat{H}{\mid t'\rangle} = {\langle t\mid}\hat{H}\hat{D}_{t'}{\mid 0\rangle} = {\langle t\mid}\hat{D}_{t'}\hat{H}{\mid 0\rangle} = {\langle t\mid}\hat{D}_{t'}\hat{H}{\mid 0\rangle} = {\langle t-t'\mid}\hat{H}{\mid 0\rangle}$$

The last expression tells us that we can completely characterize such a $$\hat{H}$$ if we know $${\langle t\mid}\hat{H}{\mid 0\rangle} = h(t)$$ which we call the “impulse response” of $$\hat{H}$$.

For two such filters, $$\hat{H}$$ and $$\hat{G}$$, we can characterize their sequential application $$\hat{H}\hat{G}$$ (which is also time invariant) if we know their individual responses, since -

$${\langle t\mid}\hat{H}\hat{G}{\mid 0\rangle} = \int{{\langle t\mid}\hat{H}{\mid t'\rangle}{\langle t'\mid}\hat{G}{\mid 0\rangle}dt'} = \int{h(t-t')g(t')dt'}$$

That gives the convolution expression.

Now what is the Fourier representation of $$\hat{H}$$? i.e. we want to find the components in the $${\mid\omega\rangle}$$ basis.

Since $$\hat{H}{\mid{\mathbf s}\rangle} = \int{\hat{H}{\mid\omega\rangle}{\langle\omega\mid}{{\mathbf s}\rangle}d\omega} = \int{\hat{H}{\mid\omega\rangle}S(\omega)d\omega}$$, we need to just find $$\hat{H}{\mid\omega\rangle}$$ in the $${\mid\omega\rangle}$$ basis.

$$\hat{H}{\mid\omega\rangle} = \int{{\mid{t}\rangle}{\langle{t}\mid}\hat{H}{\mid\omega\rangle}dt}$$

So -

$$\begin{split} {\langle t\mid}\hat{H}{\mid\omega\rangle} & = \int{{\langle t\mid}\hat{H}{\mid t'\rangle}{\langle t'}{\mid\omega\rangle}dt'} \\ & = \int{{\langle t\mid}\hat{H}{\mid t'\rangle}{e^{-i\omega t'}}dt'} \\ & = \int{h(t-t'){e^{-i\omega t'}}dt'} \\ & = e^{-i\omega t}\int{h(t')e^{i\omega t'}dt'} \\ & = e^{-i\omega t}H(\omega) \\ & = {\langle{t}{\mid}}{\omega\rangle}{\langle\omega\mid}\hat{H}{\mid\omega\rangle} \end{split}$$

where $$H(\omega) = {\langle\omega\mid}\hat{H}{\mid\omega\rangle}$$, which implies $$\hat{H}{\mid\omega\rangle} = H(\omega){\mid\omega\rangle}$$ - i.e. $$H(\omega)$$ are the eigenvalues of $$\hat{H}$$ with the eigenvectors being the basis vectors $${\mid\omega\rangle}$$. In other words, linear time invariant filters are “diagonal” in the $${\mid\omega\rangle}$$ basis.

So we have -

$$\begin{split} {\langle\omega\mid}\hat{H}{\mid{\mathbf s}\rangle} & = {\langle\omega\mid}\hat{H}{\mid\omega\rangle}{\langle\omega\mid}{{\mathbf s}\rangle} \\ & = H(\omega)S(\omega) \end{split}$$

… which means that filtering using linear time-invariant filters is akin to multiplication in the Fourier domain. Therefore we can characterize the product $$\hat{H}\hat{G}$$ as -

$$\begin{split} \hat{H}\hat{G}{\mid\omega\rangle} & = \hat{H}{\mid\omega\rangle}{\langle\omega\mid}\hat{G}{\mid\omega\rangle} \\ & = {\mid\omega\rangle}{\langle\omega\mid}\hat{H}{\mid\omega\rangle}{\langle\omega\mid}\hat{G}{\mid\omega\rangle} \\ & = H(\omega)G(\omega){\mid\omega\rangle} \\ & = \hat{G}\hat{H}{\mid\omega\rangle} \end{split}$$

which is the Fourier domain multiplication of filter characteristic functions. This makes it more apparent that linear time-invariant filters are commutative - i.e. $$[\hat{H},\hat{G}] = \hat{H}\hat{G} - \hat{G}\hat{H} = 0$$.