# Magnitude and phase spectrum of a periodic signal

Let the following T-periodic signal :

I found that

$$x(t) = \frac{A \cdot t}{T} \qquad 0 \le t < T$$

and its Fourier series is :

$$x(t) = \frac{A}{2} - \frac{A}{\pi} \sum_{n=1}^\infty \frac{\sin(n \omega t)}{n}$$

How do I determine the magnitude and phase spectrum?

• Do you mean magnitude and phase spectrum?
– MBaz
Nov 12, 2023 at 1:03
• yes @MBaz exact Nov 12, 2023 at 1:13
• Are you sure about your result for $x(t)$?
– Jdip
Nov 12, 2023 at 2:04
• Also, I think you might want to be more clear about exactly what you mean by "spectrum". I can't tell if you've gotten to the Fourier Transform yet. If not, there is a notion of line spectrum associated with the Fourier Series. Nov 12, 2023 at 2:12
• can you recheck it please, cuz i tried hard with it thats what i ended up with @Jdip Nov 12, 2023 at 10:48

For magnitude and phase you need the complex Fourier coefficients:

$$c_n=\frac{1}{T}\int_{0}^Tx(t)e^{-j2\pi nt/T}dt\tag{1}$$

I think your Fourier series is correct, so you can directly determine them from the expression you came up with:

\begin{align*} x(t) &= \frac{A}{2}-\frac{A}{\pi}\sum_{n=1}^{\infty}\frac{\sin\left(2\pi nt/T\right)}{n} \\ &= \frac{A}{2}-\frac{A}{2\pi}\sum_{n=1}^{\infty}\frac{e^{j2\pi nt/T}-e^{-j2\pi nt/T}}{jn} \\ &= \frac{A}{2}+\frac{A}{2\pi}\sum_{n=-\infty\\n\neq 0}^{\infty}\frac{je^{j2\pi nt/T}}{n} \\ &= \sum_{n=-\infty}^{\infty}c_ne^{j2\pi nt/T}\tag{2} \end{align*}

From $$(2)$$ we obtain

$$c_n=\begin{cases}\displaystyle\frac{jA}{2\pi n},&n\neq 0\\\displaystyle\frac{A}{2},&n=0\end{cases}$$

The (discrete) magnitude and phase spectra are now given by the magnitude and phase of the complex Fourier coefficients $$c_n$$.

• so the magnitude spectra is $\frac{A}{2 \pi n}$ or $A/2$, and the phase spectra is obviously $\pi /2$ right? Nov 13, 2023 at 21:26
• @MOHAMEDSALHI: Yes, for positive frequencies (indices $n$) you're right. For $n=0$ the phase is of course not $\pi/2$, and for negative $n$ the magnitude can't be $A/(2\pi n)$ because that's a negative number for $n<0$. Nov 13, 2023 at 21:35
• whats the magnitude is for negative indices $n$ is what? im so confused please Nov 13, 2023 at 22:11
• @MOHAMEDSALHI: I'm quite confident that you can compute the magnitude of $A/(2\pi n)$ for negative $n$, can't you? Nov 14, 2023 at 11:00
• @MOHAMEDSALHI: Well, yes, or simply $A/(2\pi |n|)$, which is valid for both positive and negative values of $n$. Nov 14, 2023 at 20:43