1

I am modelling a series of gratings and something seems amiss that I can not pinpoint. The problem that I am having is that the convolution of the gratings results in something that alternates into the negatives, which is non-sensical in this setting. So let me show my work so far. We define the train pulse with a period $p$, duty cycle $\kappa$, upper level $1$, and lower level $\tau$ according to \begin{align} T_\kappa^\tau(x) = 1~when~|x|<\frac{b}{2},~ \\ T_\kappa^\tau(x) = \tau~when~\frac{p}{2}\geq x\geq\frac{b}{2},~ \\ T_\kappa^\tau(x+np) = T_\kappa^\tau(x), \end{align} where $n$ is an integer and $\kappa = \frac{b}{p}$ where $b$ is the pulse width and $p$ is the period, thus making $\kappa$ the duty cycle.
Since this is an even function, we can use the Fourier series for an even function and set the coefficients to \begin{align} a_0 &= \dfrac{1}{p}\int_{-\frac{p}{2}}^\frac{p}{2}T_\kappa^\tau(x)dx = \dfrac{2}{p}\left[\int_{0}^{\frac{\kappa p}{2}} 1 dx + \int_{\frac{\kappa p}{2}}^{\frac{p}{2}}\tau dx\right] = \dfrac{2}{p}\left[\dfrac{\kappa p}{2} + \tau\left(\dfrac{p}{2}-\dfrac{\kappa p }{2}\right)\right] = \kappa+ \tau(1-\kappa) \end{align} and (directly using even function property of integrating from 0) \begin{align} a_n &= \dfrac{4}{p}\left[\int_{0}^{\frac{\kappa p}{2}} \cos(n\omega x) dx + \int_{\frac{\kappa p}{2}}^{\frac{p}{2}}\tau\cos(n\omega x) dx\right] = \dfrac{2}{n\pi}\left[(1-\tau)\sin(n\pi\kappa)+\sin(n\pi)\right] = ... = 2\kappa(1-\tau)\text{sinc}_\pi(n\kappa) \end{align}

where $ \text{sinc}_\pi(n\kappa) = \frac{\sin(n\pi\kappa)}{n\pi\kappa} $, and where I've used that $ \sin(n\pi) = 0$ for all integer $ n $.

This leaves us with the Fourier series \begin{align} T_\kappa^\tau (x) = a_0 + \sum_{n=1}^\infty a_n\cos\left(n\frac{2\pi}{p}x\right) = \kappa+ \tau(1-\kappa) + 2\kappa(1-\tau)\sum_{n=1}^\infty\text{sinc}_\pi(n\kappa)\cos\left(n\frac{2\pi}{p}x\right). \end{align}

From the convolution theorem we can show that the convolution of two functions over x becomes the product in Fourier space. Given that we have two rectangular pulse trains with parameters ($\kappa_1$,$\tau_1$) and ($\kappa_2$,$\tau_2$) respectively and both with the same period, the convolution theorem then leads me to the function \begin{align} \tilde{T}(x) = c_0 + \sum_{n=1}^\infty c_n \cos\left(n\frac{2\pi}{p}x\right) + \sum_{n=-1}^{-\infty} c_n \cos\left(n\frac{2\pi}{p}x\right) \end{align} where \begin{align} c_0 = (\kappa_1+ \tau_1(1-\kappa_1))(\kappa_2+ \tau_2(1-\kappa_2)) \end{align}

and

\begin{align} c_n = \kappa_1(1-\tau_1)\kappa_2(1-\tau_2)sinc_\pi(n\kappa_1)sinc_\pi(n\kappa_2). \end{align}

This function should become triangular periodic function with maximum value of 1 and a minimum value of 0 given that $\tau_1 = \tau_2 = 0$ and $\kappa_1 = \kappa_2 = 0.5$. However, the function I have derived is a triangular function going from 0 to 0.5, no matter how many terms in the sum I include. So there is a factor of 2 for the whole function missing.

So somewhere I seem to have made a mistake, but I can't for my life find it.
Is there something I have missed in the derivation, is there something wrong with my intuition of what to expect, or something else?

Rickard
  • 21
  • You should check the convolution theorem for your definition of Fourier coefficients. In particular, I believe $c_n$ must be scaled with a factor of $1/2$. – Andreas Lenz Oct 26 '23 at 09:34
  • You are correct, I have changed it now to two sums over positive and negative integers for clarity. However, should this function not produce a triangular function between 0 and 1? The one I have goes from 0 to 0.5, so there seems to be a factor of 2 missing for the full Fourier series. I suspect it comes from my not fully understanding of what I am doing and/or mixing definitions, so any help is appreciated. – Rickard Oct 26 '23 at 10:05
  • If you say, the triangle goes from 0 to 1, what is the value of $p$ (or $b$)? You have only specified $\kappa$. – Andreas Lenz Oct 26 '23 at 10:45
  • Ah sorry, the period p doesn't really matter since it only scales the graph in the x-direction, but for simplicity we can set it to 1. I can also mention that I have evaluated the formulas in python and the single grating formula produce the correct graph, but the convolution produce a triangular graph with y between 0 and 0.5 and with an arbitrary period p. – Rickard Oct 26 '23 at 11:11
  • Never mind, it seems I had the correct formula after I changed it.. – Rickard Oct 26 '23 at 13:31

1 Answers1

1

I seems as if I had the correct formula, the maximum of the convolution seems to become 0.5. I realised that the maximum of the convolution would be realised when the rectangular parts are fully overlapping. At this value of x, the integral takes the form $$ \frac{1}{p}\int_{-\frac{-\kappa p}{2}}^{\frac{-\kappa p}{2}}d\tau = \kappa. $$ The more general case for rectangular functions with equal periods with heights $A$ and $B$ would produce the height $AB\kappa$ where $\kappa$ is the duty cycle of the "thinner" rectangle.
One can make this more general, but I don't want to right now.

Rickard
  • 21