\documentclass[a4paper,french,11pt]{article}

\title{
Théorie du signal --- TD1
\\
\large Décomposition en Série de Fourier
}
\author{}
\date{Dernière compilation~: \today{} à \currenttime}

\usepackage{../../cours}
\usepackage{enumitem}
\usepackage{xfrac}
\usepackage{tikz}

\begin{document}

\maketitle

\section{Signal carré}

    Soit le signal carré $x(t)$, $T_0$-périodique tel que~:
    \begin{align*}
        x(t) =
        \left\{
        \begin{array}{ll}
            -1 \quad \forall\, t \in [-\frac{T_0}{2};0] \\
            1 \quad \forall\, t \in [0;\frac{T_0}{2}] \\
        \end{array}
        \right.
    \end{align*}

    \subsection{Tracer le signal $x(t)$}

        \begin{center}
        \begin{tikzpicture}

            \draw[help lines, dashed] (-7,-2) grid (7,2);
            \draw[-latex] (-7,0) -- (7,0) node[below]{$t$};
            \draw[-latex] (0,-2) -- (0,2) node[left]{$x(t)$};

            \foreach \i in {-6, -4, -2, 0, 2, 4, 6}{
                \draw[very thick, teal]
                    plot[domain=\i-1:\i]({\x}, {-1})
                    plot[domain=\i:\i+1]({\x}, {1})
                    ;
            }

        \end{tikzpicture}
        \end{center}

    \subsection{Calculer les coefficients de Fourier réels $a_0, a_n, b_n$ du signal $x(t)$}

        $x$ est impaire donc $a_0 = a_n = 0$.

        \begin{tabularx}{\linewidth}{XX}
            {
            \begin{equation*}
                \text{formule~:} \quad b_n = \frac{2}{T_0} \int_{(T_0)} x(t) \sin(n\omega_0 t) \dif t
            \end{equation*}
            \vspace{4cm}
            \begin{equation*}
                x(t) = \sum_{n=1}^{+\infty} \frac{2}{n\pi}(1 - (-1)^n) \sin(n\omega_0 t)
            \end{equation*}
            } &
            {
            \begin{align*}
                b_n &= \frac{4}{T_0} \int_0^{T_0/2} 1 \sin(n\omega_0 t) \dif t \\
                    &= \frac{4}{T_0} \left[\frac{-\cos(n\omega_0 t)}{n\omega_0}\right]_0^{T_0/2} \\
                    &= \frac{4}{T_0} \left(\frac{-\cos(n2\pi f_0 \frac{T_0}{2}) + 1}{n2\pi f_0}\right) \\
                    &= 2 \left(\frac{-\cos(n\pi) + 1}{n\pi}\right) \\
                    &= \frac{2}{n\pi} (-\cos(n\pi) + 1) \\
                    &= \frac{2}{n\pi} (-(-1)^n + 1) \\
                b_n &= \boxed{\frac{2}{n\pi} (1 -(-1)^n)}
            \end{align*}
            } \\
        \end{tabularx}


    \subsection{Tracer la DSP du signal $x(t)$}

        \begin{align*}
            |c_n|^2 = |-j\frac{1}{2}b_n|^2 = \frac{1}{4}b_n^2 = \frac{1}{4}(\frac{2}{n\pi})^2(1 - (-1)^n)^2
        \end{align*}
        \begin{align*}
            S_x(f) = \sum_{-\infty}^{+\infty} |c_n|^2 \implies
            \left\{
            \begin{array}{l}
                \text{si } n \text{ est pair, } b_n = 0 \implies |c_n|^2 = 0 \\
                \text{si } n \text{ est impair, } b_n = \frac{4}{n\pi} \implies |c_n|^2 = \frac{4}{(n\pi)^2} \\
            \end{array}
            \right.
        \end{align*}

\section{Signal en dent de scie}

    Soit le signal $x(t)$, $T_0$-périodique tel que~:
    \begin{align*}
        x(t) = A \times \frac{1}{T_0}t \,\forall\, t \in [0;T_0] \\
    \end{align*}

\end{document}
