From e74c3a6dc8f0b6136cf8019e9a4703369d67db2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9munaire?= Date: Mon, 5 Mar 2012 13:25:05 +0100 Subject: [PATCH] Cours du jour --- foncprog/intro.tex | 35 ++++- maths/approximations.tex | 230 ++++++++++++++++++++++++++++++- mathsignal/cours.tex | 291 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 552 insertions(+), 4 deletions(-) diff --git a/foncprog/intro.tex b/foncprog/intro.tex index 23d24cd..7414901 100644 --- a/foncprog/intro.tex +++ b/foncprog/intro.tex @@ -55,9 +55,40 @@ volée. \section{Pureté} +Une fonction mathématique, sans effet de bord. En lui passant les mêmes +arguments, elle doit toujours renvoyé la même chose quelque soit le contexte. + +Au niveau des variables, elles n'existent plus~! il n'y a que des constantes.\\ + +Étant donné qu'écrire dans un terminal est un effet de bord, l'implémentation +des fonctions interagissant avec des fichiers sont confinées dans des bunkers. + +\subsection{Intérêt} + +La pureté est essentielle pour le parallélisme. En effet, avec la pureté, on a +pas de problème de concurence d'accès, ... + +Par exemple Erlang est parfaitement adapté à ça. Il est d'ailleurs parfaitement +adapté à la distribution qui est prévu dans les primitives du langage. + +\paragraph{Sëmantique locale aux fonctions} +Étant donné que les fonctions pures n'ont pas d'effet de bord, il est très +facile de les tester/déboguer. + +\paragraph{Preuve de programme} + \section{Évaluation} +\subsection{Strict} + +Dans un évaluateur strict (tel que Lisp), il va d'abord évaluer les arguments +de gauche à droite, puis il applique la fonction avec les arguments évalués. + +\subsection{Lazy} ou évaluation paresseuse (Haskell). + +Les expressions ne sont évaluées que quand on en a besoin. + \section{Typage} -\section{Résumé} - +En Haskell, toutes les variables sont typées et la vérification est faite à +l'exécution. diff --git a/maths/approximations.tex b/maths/approximations.tex index ef16284..b9cfddd 100644 --- a/maths/approximations.tex +++ b/maths/approximations.tex @@ -381,11 +381,237 @@ $$\Rightarrow||P_n||=\sqrt{\frac{2}{2n+1}}$$ \section{Méthode des moindres carrés} +Soit $E$ espace vectoriel sur $\mathbb{R}$. + +$$(f,g)\in E\times E\longrightarrow\in\mathbb{R}$$ +$$||f||=\sqrt{}$$ + +Soit $F\subset E$ (sous-espace vectoriel) de dimension finie. + +\paragraph{Théorème} Une condition nécessaire et suffisante pour que +$\phi^*\in F$ soit une meilleure approximation de +$f\in E$ et que $=0\quad\forall\phi\in F$ + +\paragraph{Démonstration} +\subparagraph{Condition nécessaire} + +Soit $\phi^*\in F$ la meilleure approximation de $f\in E$, supposons +$\exists\phi_1\in F$ tel que $=\alpha\neq 0$. + +Soit $\phi_2=\phi^*+\beta.\phi_1$ avec $\beta=\frac{\alpha}{||\phi_1||^2}$ +$$ + \begin{array}{l l} + ||f-\phi_2||^2 & =\\ + & =\\ + & =||f-\phi^*||^2 - 2\beta+\beta^2||\phi_1||^2\\ + & =||f-\phi^*||^2 - 2\beta\alpha + \beta^2||\phi_1||^2\\ + &=||f-\phi^*||^2-2\frac{\alpha^2}{||\phi_1||}+\frac{\alpha^2}{||\phi_1||^2}\\ + & =||f-\phi^*||^2-\frac{\alpha^2}{||\phi_1||^2}\\ + & =||f-\phi^*||^2-\frac{\alpha^2}{||\phi_1||^2}\\ + & \Rightarrow||f-\phi_2||<||f-\phi^*|| \text{ce qui est absurde car }\phi^* + \text{ est déjà la meilleure approximation de } f\\ + & \Rightarrow =0\forall\phi\in F\\ + \end{array} +$$ + +\subparagraph{Condition suffisante} + +Supposons que $=0\quad\forall\phi\in F$. + +Soit $\phi_1\in F$ tel que $=0\quad\forall\phi\in F$. + +$$ + \begin{array}{l l} + ||f-\phi||^2 & =\\ + & = <(f-\phi_1)-(\phi-\phi_1), (f-\phi_1)-(\phi-\phi_1)>\\ + & =||f-\phi_1||^2-2+||\phi-\phi_1||^2\\ + & =||f-\phi_1||^2+||\phi-\phi_1||^2\qquad\forall\phi\in F\\ + & \Rightarrow ||f-\phi_1||\le||f-\phi||\quad\forall\phi\in F\\ + & \Rightarrow ||f-\phi_1||=\min||f-\phi||\Longrightarrow\phi_1=\phi^*\\ + \end{array} +$$ + +\subparagraph{Remarque} Cette condition montre que l'élément $\phi^*$ +représente la projection orthogonale de $f$ sur $F$.\\ +$\phi^*$ est unique + +\subsubsection{Construction de $\phi^*$} + +Soit ${\varphi_1,\varphi_2,\ldots,\varphi_n}$ une base de $F$. + +$$\varphi^*=\sum^{n}_{k=1}a^*_k.\varphi_k$$ + +La condition d'orthogonalisation $=0\quad\forall +j=1\ldots +n$\\ +$$\left=0\quad\forall j=1\ldots +n$$ +$$-\sum^n_{k=1}a^*_{k=1}<\varphi_k,\varphi_j>=0\quad\forall +j=1\ldots n$$ + +\[ (S) +\begin{cases} + \sum^n_{k=1}<\varphi_k,\varphi_j>a^*_k=\\ + \forall j=1\ldots n +\end{cases} +\] + +C'est un système linéaire à $n$ équations et $n$ inconnues. + +\paragraph{Remarque} Si la base ${\varphi_1,\varphi_2,\ldots,\varphi_n}$ est +orthonormée, la matrice du système sera diagonale.\\ + +La matrice du système $(S)$ est la matrice de \emph{Gram}~: +$$G_{kj}=<\varphi_k,\varphi_j>\forall k=1\ldots n, j=1\ldots n$$ + +\begin{enumerate}[(a)] + \item \textbf{Cas continu} +\end{enumerate} + +Soit $\omega$ une fonction poids, position telle que $\int^b_af(x)\omega(x)dx$ +existe $\forall f\in E=\mathcal{C}([a,b])$. + +$=\int^b_af(x)g(x)\omega(x)dx$ produit scalaire sur $E$. + +$F=\epsilon$ sous-espace vectoriel de dimension $n$. + +$$(S)\Leftrightarrow +\begin{cases} + \sum^n_{k=1}a^*_k\int_a^b\varphi_k(x)\omega(x)dx=\int_a^bf(x)\varphi_j(x)dx\\ + \forall j=1\ldots n\\ +\end{cases} +$$ + +$$\text{La matrice de Gram~: } +G_{kj}=\int^b_a\varphi_k(x).\varphi_j(x)\omega(x)dx$$ + +\begin{enumerate}[(b)] + \item \textbf{Cas discret} +\end{enumerate} + +Le produit scalaire discret~: $=\sum^N_{i=0}f(x_i)g(x_i)\omega(x_i)$. + +$f$ est donnée aux points $x_i(i=0\ldots N)$ +$$||f||=\sqrt{\sum^N_{i=0}f(x_i)\omega(x_i)}$$ + +$$(S)\Leftrightarrow +\left\{ +\begin{array}{l} + \sum^n_{k=1}a_k^* + \sum^N_{i=0}\varphi_k(x_i).\varphi_j(x_i)\omega(x_i)= + \sum^N_{i=0}f(x_i)\varphi_j(x_i)\omega(x_i)\\ + \forall j=1\ldots n \text{ La matrice } G_{kj}= + \sum^N_{i=0}\varphi_k(x_i).\varphi_j(x_i)\omega(x_i) +\end{array}\right. +$$ + \section{Interpolation} -\subsection{Algo de Lagrange} +Soit $f(x)$ une fonction continue sur $[a,b]$. -\subsection{Algo de Newton} +$f(x)$ est connue en $(n+1)$ points $x_i\in[a,b] (i=1\ldots n+1)$. + +Chercher une fonction $\varphi$ d'un type choisi à l'avance qui interpole +$f(x)$ sur $[a,b]$, c'est déterminer $\varphi$ tel que +$\varphi(x_i)\quad\forall i=1\ldots n+1$. + +En général, on cherche $\varphi$ dans l'espace des polynômes. + +\subsection{Polynôme d'interpolation de Lagrange} + +Soit $P_n(x)=\sum_{i=1}^{n+1}L_i(x)f(x_i)$ où les fonctions $L_i$ sont des +polynômes de degré au plus $n$, telles que $L_i(x_j)=\delta_{ij}$. + +$$L_i(x_j)=0\Rightarrow +L_i(x)=C(x-x_1)(x-x_2)\ldots(x-x_{i-1})(x-x_{i+1})\ldots(x-x_{n+1}) +\qquad\forall j\neq i$$ +$$L_i(x_i)=1\Rightarrow +C=\left[(x_i-x_1)\ldots(x-x_{i-1})(x-x_{i+1})\ldots(x-x_{n+1})\right]$$ +$$L_i(x)=\prod^{n+1}_{j=1~j/neq i}\frac{x-x_j}{x_i-x_j}\text{ La base de + Lagrange}$$ + +$$P_n(x)=\sum^{n+1}_{i=1}L_i(x)f(x_i)=\sum^{n+1}_{i=1}\prod^{n+1}_{j=1~j\neq + i}\frac{x-x_j}{x_i-x_j}f(x_i)\text{ Le polynôme de Lagrange}$$ +$$P_n(x_k)=\sum^{n+1}_{i=1}L_i(x_k)f(x_i)$$ +$$P_n(x_k)=f(x_k)\qquad\forall k=1\ldots n+1$$ + +\paragraph{Exemple} Soit $f$ continue telle que~: +\begin{tabular}{r|cccc} + $x_i$ & $0$ & $1$ & $3$ & $4$ \\ \hline + $f(x_i)$ & $1$ & $3$ & $2$ & $5$ +\end{tabular} + +Construire le polynôme d'interpolation $P_z(x)$ de $f(x)$. + +$$P_z(x)=\frac{(x-1)(x-3)(x-4)}{(-1)(-3)(-4)}.1+ +\frac{x(x-3)(x-4)}{1(1-3)(1-4)}.3+ +\frac{x(x-1)(x-4)}{3(3-1)(3-4)}.2+ +\frac{x(x-1)(x-3)}{4(4-1)(4-3)}.5$$ +$$P_z(x)=\frac{x^3}{2}-\frac{14}{6}x^2+\frac{13}{3}x+1$$ + +Pour vérifier que l'on a pas fait d'erreur de calcul, on véfifie que +$P_z(x_i)=f(x_i)$ + +\paragraph{Remarque} L'erreur d'interpolation $\varepsilon(x)=f(x)-P_n(x)$. + +Si $f\in\mathcal{C}^{n+1}[a,b]$ ($f$ est dérivable $n+1$ fois avec ses dérivées +continues). +$$\exists\eta_x\in[a,b]/\varepsilon(x)=\prod^{n+1}_{i=1}(x-x_i) +\frac{f^{(n+1)}(\eta_x)}{(n+1)!}$$ + +\subsection{Polynôme d'interpolation de Newton} + +\paragraph{Différence divisées} Soit $f$ une fonction donnée en $n+1$ points +$x_1,x_2,\ldots,x_{n+1}~(x_i\neq x_j~i\neq j)$. + +On appelle différence divisée d'ordre $0,1,2,\ldots,n$ de $f$ les expressions +suivantes~: + +\begin{figure}[h!] + \centering + \begin{tabular}{c|c|c} + \textbf{Ordre} & \textbf{Notation} & \textbf{Définition} \\ \hline + $0$ & $f[x_i]$ & $f(x_i)$ \\ + $1$ & $f[x_i,x_j]$ & $\frac{f[x_i]-f[x_j]}{x_i-x_j}~i\neq j$ \\ + $2$ & $f[x_i,x_j,x_k]$ & $\frac{f[x_i,x_j]-f[x_j,x_k]}{x_i-x_k}~i\neq j\neq + k$ \\ + \vdots&\vdots&\vdots\\ + $n$ & $f[x_1,\ldots,x_{n+1}]$ & + $\frac{f[x_1,\ldots,x_n]-f[x_2,\ldots,x_{n+1}]}{x_1-x_{n+1}}$\\ + \end{tabular} +\end{figure} + +\paragraph{Polynôme de Newton} + +$$f[x,x_1]=\frac{f(x)-f(x_1)}{x-x_1}\Rightarrow f(x)=f(x_1)+(x-x_1).f[x,x_1]$$ +$$f[x,x_1,x_2]=\frac{f[x,x_1]-f[x_1,x_2]}{x-x_2} +\Rightarrow f[x,x_1]=f[x_1,x_2]+(x-x_2).f[x,x_1,x_2]$$ +$$f(x)=f(x_1)+(x-x_1).f[x_1,x_2]+(x-x_1)(x-x_2).f[x,x_1,x_2]$$ + +$$P_1(x)=f(x_1)+(x-x_1).f[x_1,x_2]$$ +$$P_1(x_1)=f(x_1)$$ +$$P_1(x_2)=f(x_1)+(x_2-x_1).\frac{f(x_1)-f(x_2)}{x_1-x_2}=f(x_1)-f(x_1)+f(x_2) +=f(x_2)$$ + +Donc $P_1(x)$ interpole la fonction $f$ aux points $x_1$ et $x_2$. +En réitérant le procédé, on obtient~: + +$$f(x)=f(x_1)+(x-x_1).f[x_1,x_2]+(x-x_1)(x-x_2)f[x_1,x_2,x_3]+ +\ldots+(x-x_1)\ldots(x-x_n).f[x_1,\ldots,x_{n+1}]$$ +$$+\prod^{n+1}_{i=1}(x-x_i).f[x,x_1,\ldots,x_{n+1}]\qquad\text{l'erreur}$$ + +$P_n(x)$ est le polynôme d'interpolation de Newton de $f(x)$ aux $(n+1)$ points +$x_i~(i=1\ldots n+1)$. +$$\varepsilon(x)=\prod^{n+1}_{i=1}(x-x_i).f[x,x_1,\ldots,x_{n+1}]$$ + +\paragraph{Algorithme de Newton} + +$$P_0(x)=f(x_1)$$ + +Pour $m=0,\ldots,n-1$~: +$$P_{m+1}(x)=P_m(x)+(x-x_1)\ldots(x-x_{m-1}).f[x_1,\ldots,x_{m+1}]$$ + +%% Il cherchait à faire un tableau \section{Dérivation numérique} diff --git a/mathsignal/cours.tex b/mathsignal/cours.tex index d7a440d..ce44d8a 100644 --- a/mathsignal/cours.tex +++ b/mathsignal/cours.tex @@ -777,3 +777,294 @@ Donc~: $$F(p)=\frac{1}{b-a}\times\frac{1}{p+a}+\frac{1}{a-b}\times\frac{1}{p+b}$$ $$\mathcal{F}(z)=\frac{1}{b-a}\times\frac{z}{z-e^{-aT}}+ \frac{1}{a-b}\times\frac{z}{z-e^{-bT}}$$ + +\subsection{Méthode trigonométrique} + +\paragraph{Exemple} + +$$f(t)=\sin(\omega_0.t).u(t)$$ + +\paragraph{Calcul de $\mathcal{F}(z)$} + +\begin{figure}[h!] + \centering + \begin{tikzpicture}[domain=0:4] + \draw[very thin,color=gray] (-1.2,-1) grid (4.2,1.0); + \draw[->] (-1.2,0) -- (4.2,0) node[right] {$t$}; + \draw[->] (0,-1.2) -- (0,1.2) node[above] {}; + \draw[color=blue,domain=-1:0] + plot (\x,0); + \draw[color=blue] + plot (\x,{sin(2*\x r)}) + node[right] {$f(x)$}; + \end{tikzpicture} +\end{figure} + +On utilise les formules d'Euler~: + +\[ +\begin{cases} + \cos\theta=\frac{e^{j\theta+e^{-j\theta}}}{2}\\ + \sin\theta=\frac{e^{j\theta-e^{-j\theta}}}{2j} +\end{cases} +\] +$$Z\left[f(t)\right]= +Z\left[\frac{e^{j\omega_0t}-e^{-j\omega_0t}}{2j}.u(t)\right] +=\frac{1}{2j}\times\left[Z(e^{j\omega_0t}.u(t))- +Z(e^{-j\omega_0t}.u(t))\right]$$ + +$$a=-j\omega_0\qquad a=+j\omega_0$$ +$$Z\left[f(t)\right]=\frac{1}{2j}.\left[\frac{z}{z-e^{j\omega_0T}}- +\frac{z}{j-e^{-j\omega_0T}}\right]$$ +$$=\frac{z}{2j}\left[\frac{z-e^{-j\omega_0T}-z+ +e^{j\omega_0T}}{z^2-(e^{j\omega_0T}+e^{-j\omega_0T})z+1}\right]$$ +$$=\frac{z.\sin(\omega_0T)}{z^2-2\cos(\omega_0T)z+1}=Z\left[( +\sin(\omega_0T).u(t))\right]$$ + +\subsubsection{Propriétés de la transformée en $z$} + +\paragraph{Linéarité} + +$$Z\left[\lambda.(f(t)+\mu.g(t))\right]= +\lambda.\mathcal{F}(z)+\mu.g(z)\forall\lambda,\mu\text{ constants}$$ + +\paragraph{Théorème du retard} + +Rappel dans le cas continu~: +$$\mathcal{L}\left[f(t-\tau)\right]=e^{\tau.p}.F(p)$$ +$$Z\left[f(t-k.T)\right]=z^{-k}.\mathcal{F}(z)$$ + +\paragraph{Théorème de la valeur initiale/finale} + +Rappel dans le cas continu~: +\[ +\begin{cases} + \lim_{t\rightarrow 0}f(t)=\lim_{p\rightarrow+\infty}\left[p.F(p)\right]\\ + \lim_{t\rightarrow +\infty}f(t)=\lim_{p\rightarrow 0}\left[p.F(p)\right] +\end{cases} +\] + +$$\lim_{k\rightarrow 0}f(k.T)= +\lim_{z\rightarrow +\infty}\left[\mathcal{F}(z)\right]$$ +$$\lim_{k\rightarrow+\infty}f(kT)= +\lim_{z\rightarrow 1}\left[\frac{z-1}{z}.\mathcal{F}(z)\right]$$ +$$\Rightarrow\text{régime permabebt en automatique}$$ + +\subsection{Transformée en $z$ inverse} + +\paragraph{Définition} $$Z^{-1}\left[\mathcal{\mathcal{F}}(z)\right]= +\left\{f(kT)\right\}$$ + +\paragraph{Remarque} Il existe une infinité de fonctions continues du temps qui +possèdent la même transformée en $z$~: + +\begin{figure}[h!] + \centering + \begin{tikzpicture}[domain=-0.5:4] + \draw[very thin,color=gray] (-0.2,-0.2) grid (4.2,3.1); + \draw[->] (-0.2,0) -- (4.2,0) node[right] {$t$}; + \draw[->] (0,-0.2) -- (0,3.2) node[above] {}; + \draw[color=blue,smooth] + plot coordinates {(-0.2,1.1) (0,0.7) (1,2.2) (1.4,2.6) (2,1.7) (2.5,1.9) + (3,1.5) (3.5,1) (4.2,1.1)} + node[right] {$f(x)$}; + \draw[color=orange,smooth] + plot coordinates {(-0.2,0.9) (1,2.2) (2,1.7) (2.5,2.1) (3,1.5) (3.8,0.1) + (4.2,0.3)} + node[right] {$g(x)$}; + \draw[color=black] plot coordinates {(1,2.2) (1,0)} node[left] {$T$}; + \draw[color=black] plot coordinates {(2,1.7) (2,0)} node[left] {$2T$}; + \draw[color=black] plot coordinates {(3,1.5) (3,0)} node[left] {$3T$}; + \end{tikzpicture} +\end{figure} + +$f(t)\neq g(t)$ mais $f(kT)=g(kT)\quad\forall k$ + +\paragraph{$\mathcal{F}(z)=g(z)$} +$$Z^{-1}\left[\mathcal{F}(z)\right]=Z^{-1}\left[g(z)\right]\neq f(t)\neq g(t)$$ +$$=\left\{f(kT)\right\}=g\left\{kT\right\}$$ + +\subsubsection{Remarque sur les notations} + +$$Z^{-1}\left[\mathcal{F}(z)\right]=\left\{f(kT)\right\}_{k=0,1,\ldots}$$ +$$Z^{-1}\left[\mathcal{F}(z)\right]=\left\{f(kT)\right\}$$ +À éviter ~: +$$Z^{-1}\left[\mathcal{F}(z)\right]=f(kT)$$ + +La transformée en $Z$ inverse est une collection de nombres. Ce n'est pas un +seul nombre ou une fonction continue. + +\subsubsection{Quatre méthodes de calcul de $Z^{-1}$} +\begin{itemize} + \item \textbf{Deux méthodes analytiques~:} (cas simples) $f(kT)=$ fonction de + $k$ et de $T$. + \item \textbf{Deux méthodes numériques~:} (cas général) $f(0)=\ldots$, + $f(T)=\ldots$, $f(2T)=\ldots$, \ldots, pour les 50 premiers échantillons + par exemple. +\end{itemize} + +\paragraph{Méthode des résidus} + +$$f(nT)=\sum\text{résidus de }\mathcal{F}(z).z^{n-1}$$ + +\subparagraph{Cas particulier} + +$\mathcal{F}(z)$ est une fraction rationnelle en $z$ n'ayant que des pôles +simples $z_i$. + +$\rightarrow$ fonction auxiliaire~: +$$g(z)=\mathcal{F}(z).z^{n-1}=\frac{N(z)}{D(z)}$$ + +On pose $D'(z)=\frac{dD(z)}{dz}$. + +La formule d'inversion devient~: + +$$f(nT)=\sum_i\frac{N(z_i)}{D'(z_i)}$$ + +\paragraph{Exemple} + +$$\mathcal{F}(z)=\frac{z(z+1)}{(z-a)(z-b)}$$ + +Calculer la transformée en $z$ inverse de $\mathcal{F}(z)$, soit $Z^{-1}\left[ +\mathcal{F}(z)\right]$. + +Ici~: $\mathcal{F}(z)$ a deux pôles simples~: $z_1=a$ et $z_2=b$ (méthode 1 +applicable). + +$\rightarrow$ fonction auxiliaire~: +$$g(z)=\mathcal{F}(z).z^{n-1}=\frac{z^n(z+1)}{(z-a)(z-b)}=\frac{N(z)}{D(z)}$$ +$$D(z)=(z-a)(z-b)\Rightarrow D'(z)=2z-a-b$$ + +$$f(nT)=\sum_i\frac{N(z_i)}{D'(z_i)}=\frac{N(a)}{D'(a)}+\frac{N(b)}{D'(b)}= +\frac{a^n(a+1)}{a-b}+\frac{b^n(b+1)}{b-a}$$ + +$$Z^{-1}\left[\frac{z(z+1)}{(z-a)(z-b)}\right]= +\left\{\frac{a+1}{a-b}a^n+\frac{b+1}{b-a}.b^n\right\}= +\left\{1;\frac{a+1}{a-b}.a+\frac{b+1}{b-a}.b;\ldots\right\}$$ + +\paragraph{Développement en fractions élémentaires} + +Cette méthode s'inspire de la méthode classique de calcul de +$\mathcal{L}^{-1}$. + +Rappel~: $F(p)$ est une fraction rationnelle n'ayant que des pôles simples. +$$\mathcal{L}^{-1}\left[F(p)\right]?$$ + +On décompose $F(p)$ en éléments simples~: +$$F(p)=\frac{A}{p+a}+\frac{B}{p+b}+\ldots$$ + +La $\mathcal{L}^{-1}$ s'obtient terme à terme~: +$$f(t)=\left[A.e^{-at}.u(t)+B.e^{-bt}.u(t)+\ldots\right]$$ + +\begin{figure}[h!] + \centering + \begin{tabular}{c|c|c} + $t$ & $p$ & $z$\\\hline + $e^{-at}.u(t)$ & $\frac{1}{p+a}$ & $\frac{z}{z-e^{-aT}}$ + \end{tabular} +\end{figure} + +\subparagraph{Bonne méthode} + +\begin{itemize} + \item Fonction auxiliaire~: + $$g(z)=\frac{\mathcal{F}(z)}{z}$$ + \item On décompose $g(z)$ en éléments simples~: + $$g(z)=\frac{A}{z+a}+\frac{B}{z+b}$$ + \item On multiplie les deux membres par $z$~: + $$\mathcal{F}(z)=\frac{A.z}{z+a}+\frac{B.z}{z+b}+\ldots$$ +\end{itemize} + +\paragraph{Exemple} + +$$\mathcal{F}(z)=\frac{2z}{(z-1)(z-0,5)}$$ +Calculer $Z^{-1}\left[\mathcal{F}(z)\right]$ par la méthode 2 de développement +en fractions élémentaires. + +\begin{itemize} + \item fonction + auxiliaire~: $$g(z)=\frac{\mathcal{F}(z)}{z}=\frac{2}{(z-1)(z-0,5)} + =\frac{4}{z-1}-\frac{4}{z-0,5}$$ + \item on revient à $\mathcal{F}(z)$~: + $$\mathcal{F}(z)=\frac{z}{z-1}-\frac{4z}{z-0,5}$$ + On recheche les solutions dans la table, via $a:0,5=e^{-aT}$, + $f(nT)=4(1-e^{-anT})$ + $$f(nT)=4.u(nT)-4.e^{-anT}.u(nT)$$ + Maintenant, on doit éliminer $a$. + $$f(nT)=4\left[1-(0,5)^n\right]$$ +\end{itemize} + +$$Z^{-1}\left[\frac{2z}{(z-1)(z-0,5)}=\left\{4 +\left[1-(0,5)^n\right]\right\}\right]= +\left\{0;2;3;3,5;\ldots\right\}$$ + +\paragraph{Méthode 3~: Division selon les puissances croissantes de $z^{-1}$} + +Cette méthode se base sur la définition de la transformée en $z$~: +$$\mathcal{F}(z)=\sum^{+\infty}_{n=0}f(nT).z^{-n}$$ + +\subparagraph{Problème inverse} + +\begin{itemize} + \item On recherche un développement de $\mathcal{F}(z)$ sous la forme d'un + polynome en $z^{-1}$. + \item $f(nT)$ est le coefficient dans ce polynôme de $z^{-1}$ + \item ce développement peut s'obtenir par division polynomiale +\end{itemize} + +\subparagraph{Exemple} + +$$\mathcal{F}(z)=\frac{z^2}{(z-1)(z^2-0,4.z+0,1)}$$ +$$\mathcal{F}(z)=\frac{z^2}{z^3+1,4z^2+0,5z-0,1}$$ +$$\mathcal{F}(z)=\frac{z^{-1}}{1-1,4z^{-1}+0,5z^{-2}-0,1z^{-3}}$$ +On divise haut et bas par $z^3$ pour n'avoir que des puissances de $z^{-1}$ + +\paragraph{Méthode 4~: Méthode de l'équation aux différences} + +Théoriquement, \emph{l'équation aux différences} est la transposition au cas +discret de l'équation différentielle/ + +\subparagraph{Exemple} $$\frac{X(z)}{Y(z)}=\frac{0,3.z}{z-0,2}$$ + +\begin{itemize} + \item On suppose connue $Z^{-1}\left[Y(z)\right]$ soit + $\left\{y(nT)\right\}$. + \item On cherche $Z^{-1}\left[X(z)\right]$ soit $\left\{x(nT)\right\}$. +\end{itemize} + +Propriété (théorème du retard)~: +$$Z\left[f(t-kT)\right]=z^{-k}.\mathcal{F}(z)\qquad k\text{ entier}$$ +$$Z\left[z^{-k}.\mathcal{F}(z)\right]=f\left[(n-k)T\right]$$ +$$Z^{-1}\left[\mathcal{F}(z)\right]=f(nT)$$ + +On divise haut et bas par $z$~: +$$0,3.Y(z)=X(z)-0,2z^{-1}.X(z)$$ +On applique $Z^{-1}$~: +$$0,3.y(nT)=x(nT)-0,2z.x\left[(n-1)T\right]$$ +On a donc une équation aux différences du 1\ier{} ordre. + +On pose~: $y(nT)=y_n$ et $x(nT)=z_n$ + +Équation aux différences~: $x_n=0,3.y_n+0,2.x_{n-1}$ + +\begin{figure}[h!] + \centering + \begin{tabular}{c||c|c||c} + $n$ & $0,3.y_n$ & $0,2.x_{n-1}$ & $x_n$\\\hline + $0$ & $0,3$ & $0$ & $0,3$\\\hline + $1$ & $0,3$ & $0,06$ & $0,36$\\\hline + $2$ & $0,3$ & $0,072$ & $0,372$\\ + \end{tabular} +\end{figure} + +$$Z^{-1}\left[X(z)\right]=\left\{0,3;0,36;0,372;\ldots\right\}$$ + +\underline{Critère d'arrêt} +\begin{enumerate} + \item Nombre d'échantillons + \item Convergence~: $x_n\longrightarrow_{n\rightarrow+\infty} L$ +\end{enumerate} + +Si $L$ existe~: $L=0,3+0,2L\Rightarrow L=\frac{0,3}{0,8}=\frac{3}{8}=0,375$. + +C'est la méthode la plus utilisée car facile à programmée.