Fourier series expansion of a phase shifted quasi-square wave

77 Views Asked by At

I am trying to evaluate the trigonometric Fourier series expansions of three quasi-square waves, which are essentially the same quasi-square waveform, phase-shifted with respect to each other by multiples of $\frac{2\pi}{3}$. The three waveforms are as shown:

Phase-shifted quasi-square waveforms

$$ S_a(x) = \begin{cases} 0 & : 0 ≤ x < \frac{\pi}{6} \\ 1 & : \frac{\pi}{6} ≤ x < \frac{5\pi}{6} \\ 0 & : \frac{5\pi}{6} ≤ x < \frac{7\pi}{6} \\ -1 & : \frac{7\pi}{6} ≤ x < \frac{11\pi}{6} \\ 0 & : \frac{11\pi}{6} ≤ x < {2\pi} \\ S_a((x \mod 2\pi)) & : \text{otherwise} \end{cases} $$

$$S_b(x)=S_a(x-\frac{2\pi}{3})$$ $$S_c(x)=S_a(x-\frac{4\pi}{3})$$

I have evaluated the Fourier series of the first waveform (in red) and the Fourier coefficients are as follows:

$$a_{0}^r = 0$$ $$a_{n}^r = 0$$ $$b_{n}^r = \begin{cases} \frac{4}{n\pi}\cos(\frac{n\pi}{6}) & : n\ \text{odd except triplen} \\ 0 & : \text{otherwise} \end{cases} $$

I am trying to approximate the Fourier coefficients for the other two waveforms from these coefficients. I know that for a complex Fourier series expansion, the time-shifting property of the Fourier series gives:

$$\operatorname{FourierSeriesCoeff}(f(x-x_0))=C_n'=C_{n}e^{-jnx_0}$$ where, $\operatorname{FourierSeriesCoeff}(f(x))=C_{n}$

I also know the relationship between the complex $C_n$ and trigonometric Fourier coefficients $a_n$ and $b_n$ as: $$C_{n}=\frac{1}{2}(a_n-jb_n)$$ $$C_{-n}=C_{n}^*=\frac{1}{2}(a_n+jb_n)$$

Combining the expressions above gives the following:

$$C_n'=\frac{1}{2}(a_n'-jb_n')=\frac{1}{2}(a_n-jb_n)e^{-jnx_0}$$ $$C_{-n}'=\frac{1}{2}(a_n'+jb_n')=\frac{1}{2}(a_n+jb_n)e^{-jnx_0}$$

Using Euler's formula $e^{-jnp}=cos(np)-jsin(np)$ and solving for $a_n'$ and $b_n'$, I get:

$$a_n'= a_n\cos(nx_0)-b_n\sin(nx_0)$$ $$b_n'= a_n\sin(nx_0)+b_n\cos(nx_0)$$

Using these for my initial problem, I should get for the blue waveform:

$$a_n^b= a_n^r\cos(\frac{n2\pi}{3})-b_n^r\sin(\frac{n2\pi}{3})$$ $$b_n^b= a_n^r\sin(\frac{n2\pi}{3})+b_n^r\cos(\frac{n2\pi}{3})$$

which resolves to:

$$a_n^b= \begin{cases} -b_n^r\sin(\frac{2n\pi}{3}) & : n\ \text{odd except triplen} \\ 0 & : \text{otherwise} \end{cases} $$

and

$$b_n^b= \begin{cases} b_n^r\cos(\frac{2n\pi}{3}) & : n\ \text{odd except triplen} \\ 0 & : \text{otherwise} \end{cases} $$

However, after trying to evaluate the trigonometric coefficients for the blue waveform manually, I have the following expression for $a_n^b$:

$$a_n^b=\frac{1}{n\pi}[-3sin(\frac{2n\pi}{3})cos(\frac{n\pi}{6})+cos(\frac{2n\pi}{3})sin(\frac{n\pi}{6})-sin(\frac{n\pi}{6})]$$

What am I doing wrong? I am attaching my attempt at a solution here: My Attempt

Edit 1: I was unable to simplify the expression for the manual calculation. However, after verifying with Mathematica, the coefficients follow the time-shifting property correctly, which is what I was trying to verify. The Fourier coefficients for the the three waveforms end up being:

$$a_{n}^r = 0$$ $$b_{n}^r = \begin{cases} \frac{4}{n\pi}\cos(\frac{n\pi}{6}) & : n\ \text{odd except triplen} \\ 0 & : \text{otherwise} \end{cases} $$

$$a_{n}^b= \begin{cases} -b_n^r\sin(\frac{2n\pi}{3}) & : n\ \text{odd except triplen} \\ 0 & : \text{otherwise} \end{cases} $$ $$b_n^b= \begin{cases} b_n^r\cos(\frac{2n\pi}{3}) & : n\ \text{odd except triplen} \\ 0 & : \text{otherwise} \end{cases} $$

$$a_{n}^o = -a_{n}^b= \begin{cases} b_n^r\sin(\frac{2n\pi}{3}) & : n\ \text{odd except triplen} \\ 0 & : \text{otherwise} \end{cases} $$ $$b_n^o= b_{n}^b = \begin{cases} b_n^r\cos(\frac{2n\pi}{3}) & : n\ \text{odd except triplen} \\ 0 & : \text{otherwise} \end{cases} $$

Here's the result from Mathematica