Vous êtes sur la page 1sur 125

Traitement du

Signal/1005-03

Introduction

Alan Turing (1912-1954) T. Dutoit


mathmaticien et cryptographe
anglais, considr comme un de thierry.dutoit@fpms.ac.be
pres de linformatique.
En 1950, il inventa le Test de Turing,
qui devait permettre de mesurer
lintelligence dune machine.

01/09/2016

Signal

Un signal est une variation dune


grandeur physique, qui porte de
l information

Prof. Thierry Dutoit


2

1
1. Classification des signaux

Tlcom Signal

Gophysiques

Prof. Thierry Dutoit


3

1. Classification des signaux


Biomdicaux

Communication
interpersonnelle

Prof. Thierry Dutoit


4

2
2. Caractrisation des signaux

Analogique / x(t) x(n) xq(n)

Numrique fe

Mono/Multi
dimensionnel

Dterministe
/
Alatoire

Prof. Thierry Dutoit


5

2. Caractrisation des signaux

Causal/
Anti-causal
Non causal

Priodique/ fT 0 (t ) fT 0 (t T )
Apriodique

Pair/
Impair
Prof. Thierry Dutoit
6

3
2. Caractrisation des signaux

Energie
1
T /2

T T
P lim
2
f (t ) dt E
2
f (t ) dt
finie/ T / 2

Puissance
finie

Signaux
priodiques
Signal constant
de mme
puissance

T0 / 2 T0 / 2
1 1

2
FRMS
2
P fT0 (t ) dt f (t ) dt
T0 T0 / 2
T0 T0 / 2

Prof. Thierry Dutoit


7

3. Echantillonnage et
quantification

x(t) x(n) xq(n)

fe

ADC : analog-digital converter (CAN : convertisseur


analogique-numrique)
DAC : digital-analog converter (CNA : convertisseur
numrique-analogique )
DSP : Digital Signal Processor
Prof. Thierry Dutoit
8

4
Echantillonnage x(t)

fe
x(n)
x(n) xx((n)nTe )
q

Fe>= 2 Fmax

Prof. Thierry Dutoit


9

Echantillonnage x(t)

fe
x(n)
x(n) xx((n)nTe )
q

Fe/2 = miroir

Prof. Thierry Dutoit


10

5
Quantification x(t) xq(t)

pas de quantification

Prof. Thierry Dutoit


11

Quantification x(t) xq(t)

e(t ) xq (t ) x(t )
Erreur de quantification
q / 2 e(t ) q / 2

Choisir
b suffisant
ex: CD audio
16 bits =
[-32768, 32767]

Prof. Thierry Dutoit


12

6
Echant. + Quantif. x(t)

fe
x(n) xq(n)

NB : Les chantillons sont


en gnral transmis
sous forme dun signal
temps continu
Prof. Thierry Dutoit
13

Exemple 1 Echantillonnage dun sinus


A=10; f=440; Fe=10000;
t=(1:20000)/Fe;
signal = A * sin(2*pi*f*t); % f=440 Hz, Fe=10000 Hz
soundsc(signal,10000);
subplot(2,1,1); plot(signal(1:250)); title('sinus 440 Hz');
subplot(2,1,2); stem(signal(1:250)); title('sinus 440 Hz,Fe=10kHz');

Prof. Thierry Dutoit


14

7
Exemple 2 Quantification dun sinus chantillonn
A = 10; f = 440; Fe = 10000;
signal = A * sin(2*pi*f*(1:20000)/Fe); % f=440 Hz, Fe=10000 Hz
b = 2;
quantizer_max = max(signal);
q = (2*quantizer_max) / 2^b;
signal_quantized = floor(signal/q)*q + q/2;
error = signal - signal_quantized;
soundsc(signal_quantized,10000);

Prof. Thierry Dutoit


15

4. Rapport signal sur bruit

Signal

PS
RSB Gain en
puissance
Gain en
amplitude
dB
PB
20 log(2) 6dB

1/ 2 10log(2) 3dB
P
RSBdB 10log S 4 2 6 dB
PB 100 10 20 dB

S RMS 10000 100 40 dB


20log 1000000 1000 60 dB
BRMS
Prof. Thierry Dutoit
16

8
Exemple 3 Parole bruite
avec divers niveaux de RSB
Signal = audioread('par8.wav'); Tlphone = 30 dB
% Fe=8000 Hz; nbits=16

% out = awgn(in,snr) : additive


white Gaussian noise with given
SNR

signal_plus_noise = awgn(signal,
40, 'measured');

signal_plus_noise = awgn(signal,
20, 'measured');

signal_plus_noise = awgn(signal,
10, 'measured');

signal_plus_noise = awgn(signal,
0, 'measured');

signal_plus_noise = awgn(signal,
-10, 'measured');

Prof. Thierry Dutoit


17

Exemple 4 Image bruite avec


divers niveaux de RSB

signal =
rgb2gray(imread('lena.jpg'));

signal_plus_noise = imnoise(signal,
'gaussian', 0, 0.0001);
imshow(signal_plus_noise);
title('signal+noise; SNR=40dB');

signal_plus_noise = imnoise(signal,
'gaussian', 0, 0.001);
imshow(signal_plus_noise);
title('signal+noise; SNR=30dB');

signal_plus_noise = imnoise(signal,
'gaussian', 0, 0.01);
imshow(signal_plus_noise);
title('signal+noise; SNR=20dB');

signal_plus_noise = imnoise(signal,
'gaussian', 0, 0.1);
imshow(signal_plus_noise);
title('signal+noise; SNR=10dB');

Prof. Thierry Dutoit


18

9
Exemple 5 Quantification et RSB du signal quantifi lexemple 2
A = 10; f = 440; Fe = 10000;
signal = 10 * sin(2*pi*f*(1:20000)/Fe); % f=440 Hz, Fe=10000 Hz

b = 2;
quantizer_max = max(signal);
q = (2*quantizer_max) / 2^b;
signal_quantized = floor(signal/q)*q + q/2;
error = signal - signal_quantized;

N 1
1
P
2
SNR=var(signal)/var(error) f ( n)
SNR_dB = 10*log10(SNR) N 0

SNR = 19.0679
SNR_dB = 12.8030

RSBdB 6,02b 1,76

Chaque bit supplmentaire de quantification = + 6 dB de RSB.


En particulier, sur un CD audio (16 bits), le RSB est de 98 dB !

Prof. Thierry Dutoit


19

5. Traitement numrique du Signal

=Thories et mthodes permettant de:


Crer (synthse de musique, parole, images, )
Transmettre (TV, Radio, tlcoms numriques)
Analyser (visage, voix, gestes, )
Modifier (filtrage, cryptographie, )
Classifier (dtction de dfauts, diagnostics, )
Reconnatre (reco. vocale, dcriture, DTMF, )
Prvoir (mto, bourse, )

Prof. Thierry Dutoit


20

10
5. Traitement numrique du Signal

Domaines dapplication Exemples dapplications


Tlcommunications CD
(Convertisseur Delta-Sigma)
Traitement du son musical
Traitement de la parole MP3 (MPEG1-Layer3)
Dtection-positionnement GSM (analyse de parole,
numrotation vocale)
Etude des vibrations
Dicte vocale
sismiques
OCR (Reconnaissance de
Contrle non destructif caractres)
Ingnierie biomdicale Reconnaissance dempreintes
Imagerie mdicale Images JPEG
Economie DVD (MPEG2)
DIVX (MPEG4)
Sonar, radar
Modem ADSL
ECG, EMG, EEG, Scan, RMN

Prof. Thierry Dutoit


21

6. Systmes analogique vs.


numriques
Avantages du NUMERIQUE:
Simplicit
Ex : rcurrence linaire
Simuler le traitement du signal, cest en faire
Possibilits de traitement accrues
Ex : Non Linaire
Robustesse aux bruits
Ex : lectromagntiques
Numrique firewall
Prcision et stabilit
bruits = calcul f(calculateur) f(t, ge)
Flexibilit
Traitement = souvent logiciel
Upgradable Firmware !
(cf. modems numriques)

Prof. Thierry Dutoit


22

11
7. De lEmbarqu
lInternet des Objets
1960 : FFT (Fast Fourier Transform ; Cooley et Tukey)
80-90 : Ouvrages de base (Gold, Oppenheim, Rabiner,..)
90- ? : Standards numriques (CD-GSM-DVD-MP3, etc.)
Processeurs spcialiss (DSP : dig. signal processor)

2000- ? : Vers lembarqu ( embedded systems )


CAN-CNA-DSP bon march intgrs
Fini lunit centrale+priphriques
Rseaux informatiques et systmes embarqus (embedded
systems)
Camras, Appareils photos, Lecteurs de MP3, Imprimantes
autonomes, Agendas lectroniques, smartphones, ebooks,
camras intelligentes , vtements intelligents

Prof. Thierry Dutoit


23

De lEmbarqu
lInternet des Objets

Carte RaspBerry Pi3 : un ordinateur QuadCore


et 1 GO de RAM pour 30 EU.

Caractristiques des rsaux LoRa.

Prof. Thierry Dutoit


24

12
Pour aller plus loin

Voir le document Introduction au


traitement du signal par Marine
Campedel (Moodle)

(o lon apprend quil existe un lien


fort entre PlayBoy et le traitement du
signal)

Prof. Thierry Dutoit


25

Organisation pratique
TS1 : (chap 1-4 + 6) 16h cours 8h exercices 24h TP
TS2 : (chap 5) 8h cours 8h TP
Exercices = 4 sances lhoraire
Premier exercice preparer la maison (envoi tableau)
Des exercices en sances, sans rsolution au tableau
TP : 2 parties
TP1-6 : TS sous MATLAB et SIMULINK
TP7 : Epreuve pratique
+ TS2 : TP8-9 : Avant-projet
Rpartition:
FSINFO/IG: EP (35/100) Examen (65/100)
ELEC : EP (15/100) Projet (20/100) Examen (65/100)
Examen = uniquement des exercices
Dlgu(s)?
Prof. Thierry Dutoit
26

13
Traitement du Signal
Chapitre 1
Introduction aux systmes
numriques linaires et
invariants

Leonardo Pisano Fibonacci (1170-1250), mathmaticien italien T. Dutoit


spcialiste de la thorie des nombres. Parmi les nombreux
problmes quil a traits, celui qui a donn naissance la squence thierry.dutoit@fpms.ac.be
de Fibonacci est rest clbre : Un homme place un couple de
lapins dans un enclos. Si on suppose que chaque couple donne
naissance un nouveau couple chaque mois, et que chaque
nouveau couple devient lui-mme productif partir de son
deuxime mois, combien de couples aura-t-il de mois en mois ? .
Ce problme caractrise un systme linaire numrique, dont la
rponse impulsionnelle est {1,1,2,3,5,8,13}.

01/09/2016

Plan

1.1 Signaux numriques


1.2 Systmes numriques
1.3 Systmes rcursifs Systmes non rcursifs
1.4 Rponse impulsionnelle
1.5 Convolution numrique
1.6 Transforme en Z Ples et zros dun SLI

Prof. Thierry Dutoit


2

1
1.1 Signaux numriques
x(n)
x(n) ..., x( n),..., x(1), x(0), x(1),..., x(n),...
n
x(n) x(0), x(1),..., x(n),... (causal)
1 1

1 si n 0 1 si n kn0 (k )
( n)
0.8 0.8
n (n)
0 si n 0 0 si n kn0
0
0.6 0.6

impulse=[1,
0.4 zeros(1,49)]; 0.4 pulsetrain=[1, zeros(1,9)];
pulsetrain=[pulsetrain pulsetrain
stem(impulse)
0.2 0.2
pulsetrain] ;
0 0
0 10 20 30 40 50 stem(pulsetrain);
0 10 20 30 40 50

1 si n 0
1 1

( n)
f (n) e jn
0.8

0 si n 0
0.5
0.6
step=[ones(1,50)]; imagexp=[exp(j*(0:49)*pi/20)];
0
0.4
stem(step); stem(real(imagexp));
-0.5 hold on;
0.2
stem(imag(imagexp));
0 -1
0 10 20 30 40 50 0 20 40 60 80 100

Prof. Thierry Dutoit


3

1.2 Systmes numriques

x(n) Systme y(n)


numrique

x1(n)+ x2(n) Systme y1(n)+ y2(n)


numrique
linaire

x(n-n0) Systme y(n-n0)


numrique
invariant

Systme stable ssi [x(n)< y(n)< ]

Prof. Thierry Dutoit


4

2
Quizz

y(n)=ax(n)? Lin, Inv, Stable

y(n)=ax(n)+b? Non Lin, Inv, Stable

y(n)=x(n-1)? Lin, Inv, Stable

y(n)=ax(n)+bx(n-1)? Lin, Inv, Stable

y(n)=ax(n)+by(n-1)? Lin, Inv, Stable?

y(n)=nx(n)? Lin, Non Inv, Instable

Prof. Thierry Dutoit


5

1.3 Systmes rcursifs, ou pas


y (n) a1 y (n 1) a2 y (n 2) ... aN y (n N )
b0 x(n) b1 x(n 1) ... bM x(n M )
N M
y(n) ai y(n i) bi x(n i )
i 1 i 0

Filtre Rcursif, ordre N


M
y(n) bi x(n i)
i 0

Filtre Non-Rcursif, ordre M


Prof. Thierry Dutoit
6

3
Structure dun filtre
y (n) a1 y (n 1) a2 y (n 2) ... aN y (n N ) Rcursivit
b0 x(n) b1 x(n 1) ... bM x(n M )
b0
x(n) y(n)

z-1 z-1
b1 -a1

z-1 z-1
b2 -a2
Boucle

z-1
bM
z-1

-aN

Prof. Thierry Dutoit


7

Exemple 1.3 Intrts composs

p
y(n) y(n 1) y(n 1) x(n)
100
y(n) = somme disponible au temps t=nT
x(n) = dpt ou le retrait courant
p = taux dintrt
x(n) y(n)

z-1
1+p/100

Prof. Thierry Dutoit


8

4
Exemple 1.4 Squence de
Fibonacci
Un homme place un couple de lapins dans un
enclos. Si on suppose que chaque couple donne
naissance un nouveau couple chaque mois, et
que chaque nouveau couple devient lui-mme
productif partir de son deuxime mois, combien
de couples aura-t-il de mois en mois ? .

y(n) y(n 1) y(n 2) x(n)


y(n) = nombre de couples de lapins dans lenclos au nme mois
x(n) = nombre de couples que lon ajoute la population de lenclos
au nme mois.

Prof. Thierry Dutoit


9

Exemple 1.4 Squence de


Fibonacci

y(n) y(n 1) y(n 2) x(n)


x(n) y(n)

z-1
1

z-1
1

Stable?
Prof. Thierry Dutoit
10

5
Exemple 1.5 Filtre
moyenne mobile
x(n) 1/(2L+1)
x(n) y(n)

n
z-1
2L+1 points
x(n-1)
Moyenne

z-1
y(n)
x(n-2)
n
Causal,
dlai
z-1
L
1
y(n) x( n i )
2L 1 i L
x(n-(2L+1))

Stable?

Prof. Thierry Dutoit


11

1.4 Rponse impulsionnelle


(n) h(n)

SLI
numrique

n n

Calcul de h(n)?
Immdiat ( analogique!)
y (n) a1 y (n 1) a2 y (n 2) ... aN y (n N )
b0 x(n) b1 x(n 1) ... bM x(n M )

Prof. Thierry Dutoit


12

6
Exemple 1.6 Intrts composs
p
y(n) y(n 1) y(n 1) x(n)
100
h(n)={1, 1+p/100, (1+p/100), (1+p/100)3, }

Matlab (avec p=5):


impresp=filter([1],
[1 -1.05],impulse);
stem(impresp);

Instable
Prof. Thierry Dutoit
13

Exemple 1.7 - Fibonacci


y(n) y(n 1) y(n 2) x(n)
h(n)={1, 1, 2, 3, 5, 8, 13, 21, }

impresp=filter([1],[1 1 -1],impulse);
impresp(1:12)
>> 1 1 2 3 5 8 13 21 34 55 89 144
stem(impresp);

Prof. Thierry Dutoit


14

7
Exemple 1.8 - Moyenne mobile
1/(2L+1)
x(n) y(n)

z-1

x(n-1)
h(n)=1/(2L+1){1, 1, 1, , 1, 0, 0, 0, }
z-1
x(n-2)

z-1
x(n-(2L+1))

Prof. Thierry Dutoit


15

h(n) RII RIF (IIR FIR)


h(n) dun filtre non-rcursif = limite
filtre rponse impulsionnelle finie (RIF)
toujours stable

h(n) dun filtre rcursif = illimite (bouclage)


filtre rponse impulsionnelle infinie (RII)
parfois instable
Prof. Thierry Dutoit
16

8
1.5 Convolution numrique

x(n) Systme y(n) Connaissant x(n),


numrique calculer y(n)?

y (n) a1 y (n 1) a2 y (n 2) ... aN y (n N )
b0 x(n) b1 x(n 1) ... bM x(n M )

Ou: convolution (numrique)

y(n)=x(n)*h(n)

Prof. Thierry Dutoit


17

Premire interprtation
x(0)(n) x(0)h(n)

h(n)
n 0 n
0
x(1)(n-1) x(1)h(n-1)
0 n
n
0 0 n
SLI
x(2)(n-2) numrique x(2)h(n-2)

n
0
n y(n) x(n)* h(n) x(i)h(n i)
i
0


x(n) y(n)

n 0 n

Prof. Thierry Dutoit


18

9
Stabilit et h(n)
Intuitivement:
x(0)(n) x(0)h(n)
Stable | h(i) | ( i )
h(n)
n 0 n
0
x(1)(n-1)

0
n
0 n x(1)h(n-1)
0 n
On montre:
Stable | h(n i) |
SLI
x(2)(n-2) numrique x(2)h(n-2)

n
n i
0 0


x(n) y(n)

En pratique:
h(n) amorti
n 0 n

Stable | h(i) | ( i )

Prof. Thierry Dutoit


19

Seconde interprtation
h(n)
h(-n)

n
0 n 0
x(n)
x(n)

SLI
numrique n
0 n 0


y (n) x(n) * h(n) h(i) x(n i) y(n)
()
i 0

h(0) x(n) h(1) x(n 1) h(2) x( n 2) ...


n
0
y(2)

Prof. Thierry Dutoit


20

10
Exemple 1.9 - Fibonacci
y(n) y(n 1) y(n 2) x( n)
Soit x(n)={1,0,2,1,0,0,0,} y(6)?
resp=filter([1],[1 1 -1],[1,0,2,1,0,0,0])
1 1 4 6 10 16 26

A partir de h(n) = {1,1,2,3,5,8,13,21,34,} :

x(0)=1 y(6)=13 {34,21,13,8,5,3,2,1,1}


x(2)=2 y(6)=2*5=10 {1, 0,2,1,0,0,0}
x(3)=1 y(6)=3 ===============
=> total=26 () 26

Prof. Thierry Dutoit


21

1.6 Transforme en z
Ples et zros dun SLI
Convolution numrique produit de polynmes

x(n)={1,2,3,0,0,}
h(n)={2,3,4,0,0,}
y(n)=x(n) * h(n) = {2,7,16,17,12,0,0,}

X(z)=1+2z-1+3z-2=z-2(z2+2z+3)
H(z)=2+3z-1+4z-2= z-2(2z2+3z+4)
Y(z)=X(z).H(z)= z-4(2z4+7z3+16z+17z+12)

MATLAB: produit de polynmes


conv([2,3,4],[1 2 3])
ans =
2 7 16 17 12

Prof. Thierry Dutoit


22

11
Tsforme en Z Laplace

z ep
Prof. Thierry Dutoit
23

Rappel : L(signaux usuels)


exp(-at) (t)
1 sin( t)exp(-t)(t)
1

1/ 2/ t
1/a t

1 1 1
L e at (t ) L e t sin(t ) (t ) 2
p 2 p
2
pa
avec
2 2 2

Im(p)
X
Im(p)
Re(p) Re(p)
-a
X

Prof. Thierry Dutoit


24

12
z(signaux usuels)
a (n)
n
ncos(n)(n)
1 1

n n


i
cos(n ) (n) i cos(i ) z i e e ji z i
Z
n ji

i 0 i 0 2
| z 1 |1
|az 1 |1 1/ 2 1/ 2
an (n) ai z i 1
Z
1 e j z 1 1 e j z 1
i 0 1 az 1
1 cos( ) z 1

Im(z) Im(z) 1 2 cos( ) z 1 z 2

x
Re(z) Re(z)
x - 1 2 cos( ) z 1 z 2
a 1 1
x z 2 ( z 2 2 z )
( cos( ))

Prof. Thierry Dutoit


25

Proprits ?

(Moins utile quen Laplace)


Retard de {x(n)} de n0 chantillons :
Z
x(n n0 ) x(i n0 ) z i x(k ) z ( k n0 )

i k

z n0
x(k ) z
k
k

n0
z X ( z)

Prof. Thierry Dutoit


26

13
H(z)
N M
y(n) ai y(n i) bi x(n i )
i 1 i 0
N M
Y ( z ) Y ( z ) ai z i X ( z ) bi z i
i 1 i 0
M

Y ( z) b z i
i

H ( z) i 0
N
1 ai z i
X ( z)
i 1
M

b z i
i
B( z )
Zros
H ( z) i 0
N
(a0 1)
a z i A( z )
i Ples
i 0

Prof. Thierry Dutoit


27

Ples et stabilit

Im Im

z=ep 1
Re Re

Prof. Thierry Dutoit


28

14
Exemple 1.12 - Fibonacci
y(n) y(n 1) y(n 2) x(n)
Y ( z) z 1Y ( z) z 2Y ( z) X ( z)
1
H ( z)
1 z 1 z 2
zplane([1],[1 1 -1])

Prof. Thierry Dutoit


29

Exemple 1.13 Moyenne mobile


1/N
x(n) y(n)
N 1
1
y (n)
N
x(n i )
i 0
z-1
x(n-1)

N 1 z-1
1
H ( z)
N
z
i 0
i x(n-2)

z-1
1 1 zN
x(n-(N-1))

N 1 z 1

1/N
x(n) y(n)

1
y(n) y(n 1) x(n) x(n N ) z-N z-1
N -1 1

Prof. Thierry Dutoit


30

15
Traitement du Signal
Chapitre 2
ANALYSE FREQUENTIELLE
DES SIGNAUX ET SYSTEMES
NUMERIQUES

Witold Hurewicz (1904-1956). Mathmaticien russe,


T. Dutoit
spcialiste en topologie. Emigr aux Etats-Unis en 1936, il
dcida dy rester et devint professeur au MIT, de 1945 sa thierry.dutoit@fpms.ac.be
mort. Durant la seconde guerre mondiale, il participa
lanalyse des signaux radar, intrinsquement discrets puisque
la position des objets y est connue une seule fois par tour
dantenne. Cest dans ce contexte quil inventa en 1947 ce
que nous connaissons aujourdhui sous le nom de
transforme en Z.

01/09/2016

Plan du chapitre
Signaux usuels
Oprations sur les signaux
Analyse frquentielle des signaux temps
continu
Transforme de Fourier dun signal dnergie
finie
Transforme de Fourier d'une fonction
priodique - Sries de Fourier
Analyse frquentielle des signaux temps
discret
Rponse en frquence des SLI

Prof. Thierry Dutoit


2

1
1. Signaux simples usuels

(t) rect(t)
1 1

t t sinc(t)
-1/2 1/2 1
0
Signal chelon Signal rectangulaire
t
-2 - 2

Signal sinus cardinal

sinc(t)=sin(t)/t

Signal triangulaire

Prof. Thierry Dutoit


3

1. Signaux simples usuels

T0 2 / 0
P a
f 0 0 / 2

Signal exponentiel imaginaire

P a / 2
RMS a 2
Signal sinusodal

Prof. Thierry Dutoit


4

2
Exemple

U max 14.1 10 2

0 2 / T0 2 / 0.02 315 rad / s


t 2 0.0032
1 rad / s
2 T0 0.02

Prof. Thierry Dutoit


5

1. Signaux simples usuels : (t), (t) T0

rect(t/a)/a (t)
1/a 1
Thorie des distributions
(t )dt 1
a0
(L. Schwartz)
t t
-a/2 a/2

(t) f(t) f(0)(t)



1
f(0)

f (t ) (t ) dt f (0)
t x t = t
0 0 0

Train dimpulsions T0(t)


(ou peigne) de Dirac
1
t

T0

Prof. Thierry Dutoit


6

3
1. Signaux simples usuels : (n)

(n)
1

( n) 1

n
0

(n) f(n) f(0)(n)


1

n x n=
f(0)

n
f (n) (n) f (0)

0 0 0
Impulsion de Dirac (n)

Prof. Thierry Dutoit


7

2. Oprations sur les signaux


Dcalage temporel
(time-shift)

Rflexion Changement dchelle


f ( t )
f (t )
Contraction (>1)
Dilatation (<1)

Prof. Thierry Dutoit


8

4
2. Oprations : somme

Prof. Thierry Dutoit


9

2. Oprations : produit

modulation damplitude, trmolo

Prof. Thierry Dutoit


10

5
2. Oprations : produit scalaire

f (t ), g (t ) f (t ) g * (t ) dt
Energie dun signal

f(t)
E
2
f (t ) dt A
t

Signaux dnergie g(t)

finie : B

t
recta(t)
sinc(t)
1 1
f(t)g(t)
t t <f(t),g(t)>
-a/2 a/2 -2 - 2 AB
T0
t


f (t ), f (t ) f (t ) dt E
2

Prof. Thierry Dutoit


11

2. Oprations : produit scalaire


1 T0 / 2

fT0 (t ) gT (t )dt ( si T T0 / k ; k 0,1, 2,...)


*

fT0 (t ), gT (t ) T0 T0 / 2

Puissance dun signal 0 ( si T T0 / k ; k 0,1, 2,...)

T /2 fT0(t)
1
T T
P lim
2
f (t ) dt A
T / 2
t
Signaux de puissance
finie : gT0(t)
B
(t)
1
f(t) fT0(t) t
A A

t t t
T0
f(t)g(t)/T0
<fT0(t),gT0(t)>
T0 / 2 AB/T0
1 t

2
P fT0 (t ) dt
T0 T0 / 2
T0 / 2
1

2
1
T /2 fT0 (t ), fT0 (t ) fT0 (t ) dt P
lim recta (t ) / a dt 1
T T a 0
2
lim T0 T0 / 2

T / 2 Prof. Thierry Dutoit


12

6
T0

2. Produit scalaire - Exemples


recta(t) (t)
f(t) (t-)
1 1 1 1

< -a/2 a/2


t
, t
> = a/2 < t
,
> t
= f()

sin(0t ),cos(0t ) cos(0t ),cos(0t )


f(t) f(t)

t t

g(t) g(t)
Gnraliser :
t t
sincos
f(t)g(t) <f(t),g(t)>=0 f(t)g(t) <f(t),g(t)>=1/2

+ + t
+ ++ +
- -
t

1 si mme
< , > > =
sinon 0
Prof. Thierry Dutoit
13

2. Oprations : convolution

z (t ) x(t ) * y (t )

x( ) y(t )d

Prof. Thierry Dutoit


14

7
2. Oprations : convolution

Prof. Thierry Dutoit


15

Convolution : exemples

f(t) (t-t0) f(t-t0)


A A
1
t t t
* =
t0 t0

f(t) T0(t)

A 1
t t
*
T0

fT0(t)

= t
T0
Prof. Thierry Dutoit
16

8
3. Analyse frquentielle des
signaux temps continu

Prof. Thierry Dutoit


17

Rappel : dcomposition sur


une base orthonorme

x , u1 u1 x1u1

x x1u1 x2u2
u1

u2 x , u2 u2
x2u2

Prof. Thierry Dutoit


18

9
Dcomposition dun signal
dnergie finie sur { (t ) ( [, ]) }

f (t ), (t t1 ) (t t1 )
f (t1 ) (t t1 )
f (t ) f (t1 ) (t t1 ) f (t2 ) (t t 2 )
1 (t t1 )
t1

(t t2 )
1
f (t ), (t t2 ) (t t2 )
f (t2 ) (t t2 )
t2

Prof. Thierry Dutoit


19

Dcomposition dun signal


dnergie finie sur { e jt ( [, ]) }

f (t ), e j1t e j1t
F (1 )e j1t
f (t ) F (1 )e j1t F (2 )e j2t
e j1t
f (t ), e j2t e j2t
j2t
e
F (2 )e j2t

Prof. Thierry Dutoit


20

10
Dcomposition dun signal
dnergie finie sur { e jt ( [ , ]) }

Transforme de Fourier inverse



f(t) F(f)e jdf
t
avec F(f) e
f(t) , j t


f (t ), e j1t e j1t
F (1 )e j1t
F(f)

f(t)e jt dt
f (t ) F (1 )e j1t F (2 )e j2t
Transforme de Fourier
e j1t
f (t ), e j2t e j2t
e j2t
F (2 )e j2t
Prof. Thierry Dutoit
21

Amplitude et phase de la Transforme


de Fourier dun signal rel
f(t)


Surface= A0 Signal rel
Amplitude paire
F(f)

f(t)e jt dt
Phase impaire
F ( f ) A( f )e j ( f )
A(f) (f)

A0

Prof. Thierry Dutoit


22

11
Exemple : rect(t)
1/ 2
1
rect (t )
1/ 2
e jt dt e j / 2 e j / 2
j
sin / 2 sin / 2
2
/2
sinc( f )

Prof. Thierry Dutoit


23

Intuitivement
A(f)
1
rect(t)
1

t
-1/2 1/2

f
0 1 2 3
j 0t
1= e

e j 2 t
t

Prof. Thierry Dutoit


24

12
Autre exemple : Dirac
A(f)

(t) 1

t

f
0
j 0t
1= e

e jt
t

Prof. Thierry Dutoit


25

1.2 Proprits : dualit

F(f)e
jt
F(f) f(t)e jt dt f(t) df

Exemple : sinus cardinal


sinc(t ) rect( f ) rect ( f )

Prof. Thierry Dutoit


26

13
Proprits : dcalage temporel

Prof. Thierry Dutoit


27

Proprits : rflexion

f(t) f(-t)

Prof. Thierry Dutoit


28

14
Proprits : changement
dchelle

a=1/2

Prof. Thierry Dutoit


29

Proprits : produit et
convolution

rect(t) |sinc(f)|
1

Exemple :
1

t f

triangle -1/2

*
1/2 0

x
1 2 3

rect(t) |sinc(f)|
1
1

tri (t ) sinc( f ) t f
-1/2 1/2 0 1 2 3

= =
tri(t)
1 |sinc(f)|
1

t f
-1 1 0 1 2 3

Prof. Thierry Dutoit


30

15
Proprits :
produit scalaire et Parseval

x1
x1 , x2 x1 x2 cos( )

x2

Prof. Thierry Dutoit


31

Plan du chapitre
Signaux usuels
Oprations sur les signaux
Analyse frquentielle des signaux temps
continu
Transforme de Fourier dun signal dnergie
finie
Transforme de Fourier d'une fonction
priodique - Sries de Fourier
Analyse frquentielle des signaux temps
discret

Prof. Thierry Dutoit


32

16
4 Transforme de Fourier d'une
fonction priodique - Sries de Fourier

F(f)e
jt
f(t) df avec F(f) f(t), e jt

0 si k0
2
Mais ici : fT0 (t), e jt
1 T0 / 2
(0 )
T0 fT0 (t)e jt dt si k0 T0
T0 / 2

La transforme de Fourier dune fonction priodique est


nulle pour toutes les frquences sauf pour f = k f0
Les produits scalaires pour ces frquences apparaissent
comme des impulsions de Dirac en frquence
T /2
1 0
FT0 (f) Fk ( f kf 0 )
k
avec Fk
T0 T0 / 2 0
fT (t)e jk0t dt

Prof. Thierry Dutoit


33

Exemple : signal carr priodique

Prof. Thierry Dutoit


34

17
Graphiquement
fT0(t)

AT0(f)
T0 (f)
A0/T0

T /2
1 0
fT0 (t ) Fe
k
k
jk0t
avec Fk
T0 T0 / 2
fT0 (t)e jk0t dt

35 Prof. Thierry Dutoit

Lien avec la TF du signal non


priodique?
f(t)

Surface=A0

A(f) (f)

A0


f(t)

F(f)e jt dt avec F ( f )

f(t)e jt dt

Prof. Thierry Dutoit


36

18
Exemples

Prof. Thierry Dutoit


37

Exemple : peigne de Dirac

Explique la TF
dun signal
priodifi

Prof. Thierry Dutoit


38

19
Exemple : signal carr priodique

Exemple : triangle priodique


triT0(t)
1/2 |sinc(f)/2|
1

t f
-1 1 0 1 2 3

Prof. Thierry Dutoit


39

5 Notation en f notation en
A(f) A()
a a

Simple changement
daxe x

f
0 1/a 2/a 3/a 0 2/a 4/a 6/a


SAUF:

(f)df 1 ( )d (f)=2 () !

A(f) A()

1/2 1/2

f
-f0 0 f0 - 0 0 0

Prof. Thierry Dutoit


40

20
Plan du chapitre
Signaux usuels
Oprations sur les signaux
Analyse frquentielle des signaux temps
continu
Transforme de Fourier dun signal dnergie
finie
Transforme de Fourier d'une fonction
priodique - Sries de Fourier
Analyse frquentielle des signaux
temps discret
Rponse en frquence des SLI

Prof. Thierry Dutoit


41

4 Analyse frquentielle des


signaux temps discret
f +(t)

f (t )
n
f (n) (t nTe )
Te
f +(t)

Te F (f) f (t)e jt dt
= Tsfo de Fourier + temps discret
|F |
(TFTD)

|F +|
A(0)

n
f (n) (t nTe ) e jt dt

A+(0)

-2 e - e
2 e
f (n)e j nTe
-2 e -
0 e 2 e
n
e 0 e
f f

-2 f e - f e- f e f ef e 2f e

f
-2 f e 0 2f e

F(F) f (n)e jn 2 F (F )
Fe
-4 2 0 2 4 n
-4 2 0 2 4F

-2
-2
-1
-1 0
0
1
1
2
2
F(F )
n
f (n)e jn ( 2 F )

Prof. Thierry Dutoit


42

21
4 Analyse frquentielle des
signaux temps discret
f +(t)


Te
f +(t) f (t )

F( )e jn d

Te
1
F( )e d
jn
= Tsfo de Fourier + temps discret
|F | 2
(TFTD)

|F |+ 1/ 2
A(0)
A+(0)

F 1/ 2
F(F)e jn 2 dF


-2 e - e 2 e
-2 e - e
0
0
e
e 2 e
f favec F( )
n
f (n)e jn
-2 f e -2 f e - f e- f e 0 f ef e 2f e 2f e

-4 2 0 2 4
-4 2 0 2 4F
-2 -1 0 1 2 F
-2 -1 0 1 2

Prof. Thierry Dutoit


43

TFTD : gomtriquement

1, 2,1,0,0,0,... F( ) f (n)e jn

Im Im

1e j 0 1e j 0
Re Re

j
2
j
j
8
1e
1e 4 2e
j
4
j / 8 j / 4
2e
F (1/16) 1 2e e F (1/ 8) (2 2)e j / 4

Prof. Thierry Dutoit


44

22
f +(t)
TFTD sous MATLAB
Te
freqz([1 2 1],1)

|F +|

A(0)


-2 e - e 0 2 e
e
f
-2 f e -f e 0 fe 2f e

-4 2 0 2 4
F
-2 -1 0 1 2

Prof. Thierry Dutoit


45

TFTD : Proprits
TFTD = Tsfo de Fourier applique des signaux particuliers
Mmes proprits

f +(t)

Te

|F +|
Produits scalaires de fonctions F(F)
A(0) et G(F) priodiques
F Calcul sur une priode (F=1)
-2 -1 0 1 2

Prof. Thierry Dutoit


46

23
f +(t)

Te

TFTD(priodique) : short-cut
f +(t)
|F +(f)|

Sries de Fourier temps discret


A(0)
Te

f
FT0 (f) Fk ( f kf 0 ) e
Fk F(F 2FkF0 )
F-2FT0 (F) -F
e 0 e e

k * x
k

1 n0 1
T0 / 2
T0 (t)
avec Fk f(n)e jn k 0
1
avec Fk 1
T0
T0 / 2
fT0 (t)e jk0t dt
T0 n 0
1/T0

T0 t
f
-2Fe -Fe 0
f(t) Fe 2Fe
=n0Te
=

f
+
T0(t)
= t

+
|FT0(f)|
A+(0)/T0

f
t -2Fe -Fe 0 Fe 2Fe

NB: f, et pas F
Prof. Thierry Dutoit
47

Plan

Chapitre 2 ANALYSE FREQUENTIELLE DES SIGNAUX


ET SYSTEMES NUMERIQUES
2.1 Analyse frquentielle des signaux analogiques
2.2 Analyse frquentielle des signaux temps discret
2.3 Rponse en frquence dun SLI numrique

Prof. Thierry Dutoit


48

24
2.3 Rponse en frquence dun SLI
numrique

e jn y(n)

SLI
numrique
y ( n) x ( n) * h( n) h(i) x(n i)
i
?
h(i)e
i
j ( n i )


e jn h(i )e ji
i

y ( n) e jn
H ( )

avec H ( ) h(n)e
n
jn


Rponse en frquence
H ( ) h(n)e
n
jn
TFTD h(n)
du systme

Prof. Thierry Dutoit


49

Rponse en frquence
dun SLI numrique ?


1 1
X ( )e d X ( ) H ( )e d
jn jn
x ( n) y ( n)
2
2

Y ( )

e jn SLI H ( )e jn
numrique

y(n) e jn H ()

Prof. Thierry Dutoit


50

25
Exemples Matlab
h=0.9.^[0 :50] ; h=-0.9.^[0 :50] ; h=2*(0.9).^[0 :50].*
stem(h) ; stem(h) ; cos([0 :50]*pi/2)
freqz(h,1) ; freqz(h,1) ; freqz(h,1) ;
1 1 2

0.9 0.8
1.5
0.8 0.6
1
0.7 0.4

0.6 0.2 0.5

0.5 0 0
0.4 -0.2
-0.5
0.3
-0.4

0.2 -1
-0.6
0.1
-0.8 -1.5
0
0 10 20 30 40 50 60 -1
0 10 20 30 40 50 60 -2
0 10 20 30 40 50 60

20 25

Magnitude Response (dB)


Magnitude Response (dB)

20
Magnitude Response (dB)

20
10 10
15

10
0 0
5

-10 -10 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized frequency (Nyquist == 1) Normalized frequency (Nyquist == 1) Normalized frequency (Nyquist == 1)
0 80 100
Phase (degrees)

Phase (degrees)

-20

Phase (degrees)
60 50

-40 40 0
-60
20 -50
-80
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 -100
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized frequency (Nyquist == 1)
Normalized frequency (Nyquist == 1) Normalized frequency (Nyquist == 1)

Prof. Thierry Dutoit


51

Lien H() H(z)

e jn y(n) N M
SLI
numrique
y(n) ai y(n i) bi x(n i )
i 1 i 0

y(n) e jn H ( ) N M

H ( )e jn ai H ( )e j ( ni ) bi e j ( n i )
avec H ( ) h(n)e
n
jn
i 1 i 0

b e i
ji

H ( ) i 0
N
1 ai e ji
M i 1

b z i
i

H ( ) i 0
N
H ( z ) z e j ( H () H ( p) p j )
1 ai z i

i 1 z e j

Prof. Thierry Dutoit


52

26
Exemple
y(n)+0.81 y(n-2)=x(n)-x(n-2)
Dterminer lexpression de sa rponse en frquence H()
1 z 2 1 e j 2
H ( )
1 0.81z z e j 1 0.81e j 2
2

Dterminer sa rponse de rgime pour lentre


x(n)=10 + 10 cos(n/2) + 10 cos(n)

H (0) 0 H ( / 2) 2 / 0.19 10.53 H ( ) 0


y(n)=105.3 cos(n/2) : +20dB
40

Magnitude Response (dB)


20

Calculer et dafficher la rponse -20

en frquence sous Matlab


-40

-60
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized frequency (Nyquist == 1)

freqz([1 0 -1],[1 0 0.81]) ; 100

Phase (degrees)
50

-50

-100
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized frequency (Nyquist == 1)

Prof. Thierry Dutoit


53

Rappel : H(j) Interp. gomtrique


N ( p)
H ( p)
D( p)

( p z1)( p z 2)...( p zM )
H ( p) k
( p p1)( p p 2)...( p pN )
Im
( j z1)( j z 2)...( j zM )
H ( j ) k
( j p1)( j p 2)...( j pN ) Dp Nq

j q
p
Re

N1 N 2 ... N M
H ( j ) k
D1 D2 ... DN

arg H ( j ) arg(k ) 1 2 ... M 1 2 ... N

Prof. Thierry Dutoit


54

27
H() Interprtation gomtrique
M

(z z )
M

bi z i i

H ( ) i 0
N
H ( z ) z e j H ( ) Kz ( M N ) i 1
N
1 ai z i (z p )
i 1
i
i 1 z e j z e j

(z z ) i
H ( ) K i 1
N

(z p )
i 1
i
z e j

Prof. Thierry Dutoit


55

H() Interprtation gomtrique

Im Im

j
ej

z=ep 1
Re Re

Prof. Thierry Dutoit


56

28
Exemple prcdent
freqz([1 0 -1],[1 0 0.81]) ; 40

Magnitude Response (dB)


20

-20

-40

-60
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized frequency (Nyquist == 1)

100

Phase (degrees)
50
1
0
0.8

-50
0.6
zplane([1 0 -1],[1 0 0.81]) ; 0.4
-100
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Imaginary part
0.2 Normalized frequency (Nyquist == 1)

-0.2

-0.4

-0.6

-0.8

-1

-1 -0.5 0 0.5 1
Real part

Prof. Thierry Dutoit


57

Conclusion Chap 1&2


Structure
Circuit
Numrique
Electrique

Mason
Kirchoff(p) Intuitif
Kirchoff(t)

Equation
Equation aux
Diff. Finies
Diffrentielle Sol. Gn
Rcurrence
+Sol Part.
zL
X(p)
X(z)
. H(p)
H(z) Y(p)
Y(z)

p=j
z= e j z=
p=j e j z=
p=j e j

Lz X(f)
X(F)
. H(f)
H(F)

Lz
Y(f)
Y(F)

Lz
TFTD
F TFTD
F TFTD
F
x(t)
x(n) h(t)
h(n) y(t)
y(n)
*
Rcurrence

(n)

Prof. Thierry Dutoit


58

29
Traitement du Signal
Chapitre 4
Transforme de Fourier
Discrte
John Tukey, (1915-2000), statisticien amricain. Aprs une licence
en chimie et deux en mathmatiques Brown et Princeton University,
il devint professeur de statistiques Princeton et continua en
parallle une carrire de chercheur aux Bell Labs. Il travailla
notamment dans le domaine de lanalyse statistique robuste. Avec
laide de James Cooley, il mit au point lalgorithme de la Transforme
de Fourier Rapide (FFT). John Tukey est galement linventeur du
mot software .
James Cooley (1926-), mathmaticien amricain, pionnier dans le T. Dutoit
dveloppement du traitement numrique du signal. Alors quil
travaillait dans les laboratoires de recherche de IBM New York, il thierry.dutoit@fpms.ac.be
co-inventa la FFT avec J. Tukey. Cet algorithme est aujourdhui lun
des plus utiliss en sciences et en ingnierie, de la gophysique
lastronomie en passant la biologie. Il a volontairement t rendu
public par IBM ds sa dcouverte en 1965, sans aucune protection
intellectuelle (sans brevet), afin de favoriser le dveloppement de
logiciels.
Invent par Frederic Gauss (1805) en Latin
Utilis en 1973 pour analyse les 18 minutes bruites dans lenregistrement
des conversations telephoniques de R. Nixon (Watergate) : authenticit de
la bande obtenue par analyse de la fluctuation du 60Hz!

01/09/2016

Plan

TFTD = Thorique TFD = outil

4.1 Transforme de Fourier Discrte


4.2 Transforme de Fourier Rapide
4.3 Observation spectrale
4.4 Convolution linaire

Prof. Thierry Dutoit


2

1
cos(0t) QUIZZ |XT0(f)|
1/2
t f
0
|XT0+(f)|
1/(2Te)
f
t
Te 0 fe

w(t) |W(f)|
T
1

t f
1/T
0 T
w+(t) |W+(f)| N
1
t f

0 T= NTe - fe 0 fe
|X+(f)|
N/2 N/2 N/2 N/2
t f
Te T=NTe
-fe 0 fe

Prof. Thierry Dutoit


3

4.1. Transforme de Fourier


Discrte

TFTD(DTFT): Transforme de Fourier


temps discret

2 F
f +(t) F( )
n
f (n)e jn
F
f
Te
fe

|F +|

A+(0)
Problmes :
1. - + ?
-2 0 2
F
-1 0 1 2. Pour tout ?

Prof. Thierry Dutoit


4

2
4.1. Transforme de Fourier
Discrte

TFD(DFT): Transforme de Fourier


Discrte
N 1 2
jn ( k
X (k ) x(n)e
)
f +(t) N
(k 0...N 1)
n 0
Te

|F +|

A+(0)
Problme :
?
Lien avec TFTD?
-2 0 2
F
-1 0 1

Prof. Thierry Dutoit


5

TFD - Dfinition

N 1 2
jnk
X (k ) x(n)e N

n 0

Inverse DFT

2
1 N 1

jnk
x ( n) X ( k )e N
N k 0

Prof. Thierry Dutoit


6

3
1. Interprtation gomtrique

Cf. TFTD! Exemple: N=4


Im Im
x(3)
2
j3
4
e
x(0)
e j0
x(1) e j 0 x(0) Re
k=0 Re 2 k=1
x(2) x(2) j2
x(3)
4
e 2
j
4
e
x(1)

Im Im
x(1)
2
j3
4
e
x(3) e j 0 x(0) e j 0 x(0) Re
2 k=2 Re 2 k=3
x(1) j2
x(2) x(2) j2
4
e 4 e 2
j
4
e
x(3)

Prof. Thierry Dutoit


7

1. Interprtation gomtrique 2 2
2

Exemple : TFD de { e j,0 e 4, } ={0,0,4,0}


j2 j4 j6
e 4
,e 4

Im Im
x(3)
2
j3
4
e
x(0)
e j 0 x(1) e j 0 x(0) Re
k=0 Re 2 k=1
x(2) x(2) j2
x(3)
4
e 2
j
4
e
X(0)=0 x(1) X(1)=0
Im Im
x(1)
2
j3
4
e
x(3) e j 0 x(0) e j 0 x(0) Re
2 k=2 Re 2 k=3
x(1) j2
x(2) x(2) j2
4
e 4 e 2
j
4
e
X(2)=4 x(3) X(3)=0

Prof. Thierry Dutoit


8

4
2. Interprtation vectorielle
N 1 2
x=[x(0),x(1),,x(N-1)]T
jn ( k
X (k ) x(n)e
)
N
x, w k 2 2
j ( N 1) k
2

{wk} ={[ e j 0, e ,e , e ] T}
jk j 2k
n 0 N N N

X1w1
Dcomposer
w1

x = X 0w0 X1w1 X 2w2 ... X N 1w N 1


w0 X0w0
Xk ?

x, w k X (k )
Xk
|| w k || N
X (k ) NX k
TFD=N * Dcomposition

Prof. Thierry Dutoit


9

2. Interprtation vectorielle 2 2 2

Exemple : TFD de
j2 j4 j14
{ e j,0 e 8, e 8
, e 8
}

1
1

0.5
x=exp(j*2*pi/8*2*(0:7)); 0.5

subplot(2,1,1); stem(real(x)); 0
0

-0.5
-0.5

-1
-1 1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8

8
8

6
6
X=fft(x,8) 4
X(2)=8
4
subplot(2,1,2); stem(abs(X)); 2
2

0
01 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8

Prof. Thierry Dutoit


10

5
3. Interprtation spectrale
+
x T0(t) (T0=NTe)

{x(n)} n=0N-1 TFD=T0 * Raies de Fourier


+
T0|XT0 (f)|

n0 1
1
+
|XT0 (f)| raies :
T0
x(n)e
n 0
jn k 0

2
( 0 )
f N
-Fe 0 Fe
N 1 2
jn k
{X(k)} k=0N-1 x(n)e N

n 0

Prof. Thierry Dutoit


11

TFD Proprits
TFD= T0 * TFTD du signal priodifi

ET si x est rel : F ( N k ) F (k )*
Prof. Thierry Dutoit
12

6
4.2 FFT : Fast Fourier Transform

{X(0),X(1),X(2),X(3)}=DFT({x(0),x(1),x(2),x(3)})
x(3) x(1)

x(0)
x(1) x(0) x(3) x(0) x(0)
X(0) x(2) X(1) X(2) X(3)
x(2) x(1) x(2) x(2)
x(3)

x(1) x(3)

{A0, A1}=DFT({x0, x2}) {B0, B1}=DFT({x1, x3})

x(0) x(2) x(0) x(1) x(3) x(1)


A(0) A(1) B(0) B(1)
x(2) x(3)

Prof. Thierry Dutoit


13

4.2 FFT : Fast Fourier Transform

{X(0),X(1),X(2),X(3)}=DFT({x(0),x(1),x(2),x(3)})
x(3) x(1)

x(0)
x(1) x(0) x(3) x(0) x(0)
X(0) x(2) X(1) X(2) X(3)
x(2) x(1) x(2) x(2)
x(3)

x(1) x(3)

+ + - -

x(3)

x(0) x(2) x(0) x(1) B(1)


A(0) A(1) B(0) 2
x(2) x(3) j
N
e

x(1)

Prof. Thierry Dutoit


14

7
4.2 FFT : Fast Fourier Transform
A(k) X(k)= A(k)+W-k B(k)
Croisillon
(Butterfly)
B(k) W-k 2 X(N/2+k)= A(k)-W-k B(k)
j
(W e N
)

FFT(N=8) Contrainte: N=2m


x0 X0
x4 X1
W0
x2 W 0 X2
x6 0 W -2 X3
W
x1 W0 X4
x5 W0 W-1 X5
x3
W 0 W-2 X6
x7 W0 W-3 X7
W-2

Prof. Thierry Dutoit


15

4.2 FFT : Charge de calcul


N 1 2
jn ( k
DFT: X (k ) x(n)e
)
N
(k 0...N 1)
n 0

O(N) additions et multiplications complexes

DFT calcule par FFT: x0


x4
W0
X0
X1
x2 W0 X2
x6 W-2 X3
W0
x1 W0 X4
x5 W0 W-1 X5
x3
W0 W-2 X6
x7 W0 -2 W-3 X7
W

O(N log2 (N) ) additions et mult. complexes

Ex: N=1024 106 104 Gain de 100!


(NB: x(n) rel X(N-K)=X*(k) Gain suppl. de 2)

Prof. Thierry Dutoit


16

8
Plan

4.1 Transforme de Fourier Discrte


4.2 Transforme de Fourier Rapide
4.3 Observation spectrale
4.4 Convolution linaire

Prof. Thierry Dutoit


17

Prliminaire
w(t) |W(f)|
T
1

t f
1/T
0 T
w+(t) |W+(f)| N
1
t f

0 T= NTe - fe 0 fe


W ( F ) w(n)e jn

1 e j e j 2 ... e j ( N 1)
1 e jN

1 e j
e j N 2 sin( N )
j1 2
e 2 sin( 1 )
2
Prof. Thierry Dutoit
18

9
4.3 Observation spectrale
TFTD(Signal priodique)
|XT0(f)|
xT0(t)
AT0(0)

t f

-fe 0 fe

|W+(f)|
w+(t)

1
1/Te

t f

- Fe 0 Fe
0 (N-1)Te

xT0+(t) |XT0+(f)|
AT0(0)/Te

t f

- Fe 0 Fe

Prof. Thierry Dutoit


19

4.3 Observation spectrale


TFD(Signal priodique)
|XT0(f)|
xT0(t)
AT0(0)

t f

-fe 0 fe

|W+(f)|
w+(t)
N

t f

- Fe 0 Fe
0 (N-1)Te

+ +
|X|X(k)|
N (f) |=|XT0(f)*W (f)|

N AT0(0)

xN+(t)=xT0(t)w+(t)

t kf

0 (N-1)Te - Fe 0 Fe
N-1

Prof. Thierry Dutoit


20

10
Exemple: exp(jn0)
FFT(N=16)
20

0=4/16 10

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
20

0=4.1/16 10

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
20

0=4.5/16 10

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
20

0=4.9/16 10

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
fr quence normalis e

Prof. Thierry Dutoit


21

Exemple : sinusode

2s de cos(0t) avec f0=1Hz


Fe=100 Hz

Fe=100; t=[0:1/100:2];
sinusoid=[cos(2*pi*1*t)];
[fourier,frequencies]=freqz(sinusoid) %

subplot(211);
plot(sinusoid);
title('f(n)');
subplot(212);
plot(frequencies/pi*(Fe/2),abs(fourier));
title('|F(f)|');

Prof. Thierry Dutoit


22

11
Exemple : signal constant

2s de f(t)=1
Fe=100 Hz

signal=rectwin(200);
[fourier,frequencies]=freqz(signal);

subplot(211);
plot(signal);
title('f(n)');
subplot(212);
plot(frequencies/pi*(Fe/2),abs(fourier));
title('|F(f)|');

Prof. Thierry Dutoit


23

Exemple : signal carr


priodique

3 priodes de rectT0(t) avec T0=2s


Fe=10 Hz

signal=[rectwin(10) ; zeros(10,1)];
signal = [signal; signal; signal];
[fourier,frequencies]=freqz(signal)

subplot(211);
stem(signal);
title('f(n)')
Fe=10;
subplot(212);
plot(frequencies/pi*(Fe/2),abs(fourier));
title('|F(f)|');

Prof. Thierry Dutoit


24

12
Exemple : triangle priodique
triT0(t)
1/2 |sinc(f)/2|
1

t f
-1 1 0 1 2 3

3 priodes de triT0(t) avec T0=2s


Fe=10 Hz

signal=[triang(20)];
signal = [signal; signal; signal]
[fourier,frequencies]=freqz(signal)

subplot(211);
subplot(211);
stem(signal);
stem(signal);
title('f(n)')
title('f(n)')
freqz(signal);
Fe=10;
subplot(212);
plot(frequencies/pi*(Fe/2),abs(fourier));
title('|F(f)|');
Prof. Thierry Dutoit
25

Exemple : segment de parole


Parenthse , Fe=8000 Hz
signal=audioread('par8.wav');
Fe=8000;

plot(signal)
xlabel('temps (chantillons)');
ylabel('Amplitude');
soundsc(signal,8000);

Extrait du a de parenthse
segment=signal(600:839);
[fourier,frequencies]=freqz(segment)

subplot(211);
plot(segment);
subplot(212);
plot(frequencies/pi*(Fe/2),abs(fourier));
title('|F(f)|');

Prof. Thierry Dutoit


26

13
4.3 Observation spectrale
TFTD(Signal non priodique)

Cas o la fentre de N chantillons na pas


dinfluence (N est suffisamment grand
pour reprendre toute la dure du signal)

la TFD affiche alors directement N valeurs de


la TFTD originale

Prof. Thierry Dutoit


27

Exemple : rect(t)

rect(t)
Fe = 10 Hz,
complt par cent chantillons nuls.

signal=[rectwin(10) ; zeros(100,1)];
[fourier,frequencies]=freqz(signal);

subplot(211); stem(signal);
title('f(n)');

Fe=10;
subplot(212);
plot(frequencies/pi*(Fe/2),abs(fourier));
title('|F(f)|');

Prof. Thierry Dutoit


28

14
Exemple : tri(t)
tri(t)
1 |sinc(f)|
1

t f
-1 1 0 1 2 3

tri(t)
Fe = 10 Hz,
complt par cent chantillons nuls

signal=[triang(20) ; zeros(100,1)];
[fourier,frequencies]=freqz(signal)

subplot(211); stem(signal);
title('f(n)')
Fe=10;
subplot(212);
plot(frequencies/pi*(Fe/2),abs(fourier);
title('|F(f)|');

Prof. Thierry Dutoit


29

4.3 Observation spectrale


TFTD(Signal non priodique)
Si la fentre de N chantillons tronque le signal
|X(f)|
x(t)
A(0)

t f

-fe 0 fe

|W+(f)|
w+(t)

1
1/Te

t f

- Fe 0 Fe
0 (N-1)Te

|X+(f)|
A(0)/Te

x+(t)

t f

-Fe 0 Fe

Prof. Thierry Dutoit


30

15
4.3 Observation spectrale
TFD(Signal non priodique)
|X(f)|
x(t)
A(0)

t f

-fe 0 fe

|W+(f)|
w+(t)
N

t f

- Fe 0 Fe
0 (N-1)Te

+
N 1
|X N(f) |=|X(f)*W (F)|
|X(k)|
x ( n)
k n 0

kk A(0)/T
A(0)/Tee
xN+(t)=x(t)w+(t)
x ( n)
n

t kf

0 (N-1)Te - Fe 0 Fe
N-1

Prof. Thierry Dutoit


31

Ex: h(n) dun SLI analogique


20 logQ
log
=
-40 dB/dc

2
( p) 2

p 2 p 2
10
2
0
Magnitude

10

-2
=21000
10

-4
Qp=40 dB
10
3 4 5
10 10 10
Frequency (radians)
0
4
x 10 h(t) pour Fe=10000 et N=1024
Phase (degrees)

-501

0.5
-100
2
h(t ) exp( t ) sin( t ) (t ) -1500

-0.5
-200
3 4 5
10
-1 10 10
0 0.02 0.04Frequency (radians) 0.08
0.06 0.1 0.12

A(w) (dB)
40

Fe? 10kHzaliasing(0)=-40dB 20

Prof. Thierry Dutoit -20


1 2 3 4 5

32
10 10 10 10 10

16
Ex: h(n) dun SLI analogique
4
x 10 h(t) pour Fe=10000 et N=1024 4
h(t) pour Fe=10000 et N=512
x 10
1 1

0.5 0.5

0 0

-0.5

-1
N=1024 -0.5

-1
N=512
0 0.02 0.04 0.06 0.08 0.1 0.12 0 0.01 0.02 0.03 0.04 0.05 0.06
A(w) (dB) A(w) (dB)
40 40

20 20

0 0

-20 -20
1 2 3 4 5 2 3 4 5
10 10 10 10 10 10 10 10 10

4 4
x 10 h(t) pour Fe=10000 et N=256 x 10 h(t) pour Fe=10000 et N=128
1 1

0.5 0.5

0 0

N=256 N=128
-0.5 -0.5

-1 -1
0 0.005 0.01 0.015 0.02 0.025 0.03 0 0.002 0.004 0.006 0.008 0.01 0.012 0.014

A(w) (dB) A(w) (dB)


40 30

20 20

10
0
0
-20
-10

-40 -20
2 3 4 5 2 3 4 5
10 10 10 10 10 10 10 10

Prof. Thierry Dutoit


33

Exemple : sinc(t)

Sinc(t)
Fe = 10 Hz,
centr dans le vecteur dchantillons

Fe=10 ; t=(-100:99)* 1/Fe;


signal=sinc(t);
[fourier,frequencies]=freqz(signal)

subplot(211); stem(signal);
title('f(n)')
subplot(212);
plot(frequencies/pi*(Fe/2),abs(fourier);
title('|F(f)|');

Prof. Thierry Dutoit


34

17
Plan

4.1 Transforme de Fourier Discrte


4.2 Transforme de Fourier Rapide
4.3 Observation spectrale
* NTFD (deviner leffet)
* Fentre de pondration
4.4 Convolution linaire

Prof. Thierry Dutoit


35

TFD sur NTFD points en frquence 2

NTFD > N : X (k ) x(n)e


N 1 jn ( k )
(k 0...N 1) NTFD
TFD
n 0

|X(f)|
x(t)
A(0)

t f

-fe 0 fe

|W+(f)|
w+(t)
N

t f

- Fe 0 Fe
0 (N-1)Te

|X(k)|

k A(0)/Te
xN+(t)=x(t)w+(t)

t k

0
0 (N-1)Te NTFD-1

Prof. Thierry Dutoit


36

18
Exemple: TFD de
{x(0), x(1), x(2), x(3),0,0,0,0}

x(3) x(2)

x(0)
e j 0 x(1) x(0) x(2) x(0) x(0)
k=0 x(2) k=1 k=2 k=3
2
x(3) j
8
e
x(3) x(1) x(1) x(3)
x(2) x(1)

x(1) x(2)
x(1) x(3) x(3) x(1)

x(1) x(0) x(0) x(2) x(0) x(0)


k=4 x(2) k=5 k=6 k=7
x(3)

x(2) x(3)

TFD de {x(0), x(1), x(2), x(3)}


Prof. Thierry Dutoit
37

Exemple : {1,1,1,,1}

Ex: x=ones(1,16)
1

0.5

0
0 2 4 6 8 10 12 14 16
20

abs(fft(x)) 10

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
1

y=[x zeros(1,16)] 0.5

0
0 5 10 15 20 25 30 35
20

abs(fft(y)) 10

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
1

y=[x zeros(1,112)] 0.5

0
0 20 40 60 80 100 120 140
20

abs(fft(x)) 10

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Prof. Thierry Dutoit


38

19
TFD sur NTFD points en frquence
NTFD < N
xN(0), xN(1), xN(2), xN(3), xN(4), , xN(N-1)

NTFD valeurs NTFD valeurs NTFD valeurs NTFD valeurs

|X(k)|

k A(0)/Te

Somme TFD k
0 NTFD-1
Prof. Thierry Dutoit
39

Exemple: TFD de
{x(0)+x(4), x(1)+x(5), x(2)+x(6), x(3)+x(7)}

x(3)+x(7)

j3
4
e
x(0)+x(4)
x(1)+x(5)
j0
k=0
e x(2) e j 0 x(0)
x(2)+x(6) k=1
+ x(6) j2 +x(4)
x(3)+x(7) e 4

j
4
e
x(1)+x(5)

x(1)+x(5)

j3
4
x(1) x(0) e
+x(5) e j0 +x(4) x(2) e j 0 x(0)
k=2 k=3
x(3) j2
4 x(2) + x(6) j2 +x(4)
e e 4
+x(7) +x(6) j

4
e
x(3)+x(7)

Prof. Thierry Dutoit


40

20
Exemple: {1,1,1,,1}
Ex: x=ones(1,16)
1

0.5

0
0 2 4 6 8 10 12 14 16
20

abs(fft(x)) 10

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
2

y=x(1:8)+x(9:16) 1

0
1 2 3 4 5 6 7 8
20

abs(fft(y)) 10

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
4

y=y(1:4)+y(1:4) 2

0
1 1.5 2 2.5 3 3.5 4
20

abs(fft(y)) 10

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8

Prof. Thierry Dutoit


41

En rsum, pour NTFD

Prof. Thierry Dutoit


42

21
Pondration par une fentre
{x(n)}.* {w(n)}

1
Ex: sin(130Hz) +
0
0.01 sin(300 Hz) -1

-2

Fe= 1000 Hz
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07

N=64 40

NTFD=512 20

-20
0 100 200 300 400 500 600 700 800 900 1000

Autres fentres (que rectangulaire)?


Prof. Thierry Dutoit
43

Pondration par une fentre


{x(n)}.* {w(n)}
Type Largeur du lobe Niveau des lobes
principal (en F) secondaires

Rectangulaire 1/N -13 dB

Hanning 1.5/N -30dB

Hamming 2/N -40 dB

Blackman 2.75/N -60 dB

Prof. Thierry Dutoit


44

22
Pondration par une fentre
1

0.5

0
Ex: sin(130Hz) + 0.01 sin(300
-0.5
Hz) (Fe=1000)
-1
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07

2 40
1

1
20
0.5
Hamming
0
0 0
-20
-1 -0.5
-40

-2 -60
-1
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0 1000.01 200 0.02
300 400
0.03 500 0.04
600 700
0.05 800 0.06900 1000
0.07

40 50
Rectangulaire Blackman
20 0

0 -50

-20 -100
0 100 200 300 400 500 600 700 800 900 1000 0 100 200 300 400 500 600 700 800 900 1000

Prof. Thierry Dutoit


45

Pondration par une fentre


Ex: sin(130Hz) + sin(150 Hz) (Fe=1000)

50
Rectangulaire
0

-50
0 100 200 300 400 500 600 700 800 900 1000
50
Hamming
0

-50

-100
0 100 200 300 400 500 600 700 800 900 1000
50
Blackman
0

-50

-100
0 100 200 300 400 500 600 700 800 900 1000

Prof. Thierry Dutoit


46

23
Compromis temps-frquence
Ex: [sin(100Hz) ; sin(200 Hz)] (Fe=1000)
1

0.5 N=196
0

-0.5

1 -1
0 20 40 60 80 100 120 140 160 180 200
0.5

0
60

-0.5
N=256 40 N=64 N=32
-1
0 20 40 60 80 100 120 140 160 180 200
20
60

0
40 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

20

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

ordre des
sinusoides ?

Prof. Thierry Dutoit


47

4.3 Observation spectrale


Conclusion
CAUSE EFFET CONTRLE

Duplication du spectre Fe ?
x(t) x(n)
Shannon- recouvrement

x(n) .* w(n) Type de


Fentre ?
N?

x(n) X(k) NTFD ?

Prof. Thierry Dutoit


48

24
4.4 Convolution linaire

y(n) x(n)* h(n) x(i)h(n i)
i

N*M N M
N 1
yc (n) x(n) h(n) x(i)h((n i) mod N )
i 0

x(n) Compltion x(n)


par des zros FFT

y(n)
x IFFT

h(n) Compltion h(n)


par des zros FFT

[x(n),0,0,,0] et [h(n),0,0,,0] : N+M-1 chantillons


Trs intressant si N et M >>
Prof. Thierry Dutoit
49

4.4 Convolution linaire


Exemple

200

a=ones(1,200) ; b=ones(1,180) ; 100

y1= conv(a,b);
0
0 100 200 300 400 500 600
200

a(256)=0;b(256)=0;
100
y2=real(ifft(fft(a).*fft(b)));
0
0 100 200 300 400 500 600
200
a(512)=0;b(512)=0;
y3=real(ifft(fft(a).*fft(b))); 100

0
0 100 200 300 400 500 600

Prof. Thierry Dutoit


50

25
Parler

DES ECHANGES ERASMUS

Prof. Thierry Dutoit


51

26
Traitement du Signal
Chapitre 5
TRAITEMENT NUMERIQUE
DES SIGNAUX ALEATOIRES

Steven L. Kay, ingnieur lectricien amricain,


professeur de traitement du signal luniversit de
Rhodes Island. Spcialiste en statistique
T. Dutoit
mathmatique en liaison avec le traitement du thierry.dutoit@fpms.ac.be
signal, il est lauteur dun ouvrage de rfrence
dans le domaine de la dtection de signaux
(Fundamentals of Statistical Signal Processing,
Prentice Hall). Membre dhonneur de lIEEE pour
sa contribution la dtection et lestimation
spectrale paramtrique

01/09/2016

|X(f)|
x(t)
A(0)

Signaux dterministes t f

non priodiques : TF-TFTD-FFT


-fe 0 fe

|W+(f)|
w+(t) |X(f)|
x(t)
1 A(0)
1/Te

t f
t f
- Fe 0 Fe
0 (N-1)Te -fe 0 fe

|X+(f)|
A(0)/Te
|W+(f)|
w++(t)
x (t)
1
1/Te

t f
t f
- Fe 0 Fe
0 (N-1)Te -Fe 0 Fe

|X+(f)|
A(0)/Te

x+(t)

t f

-Fe 0 Fe

Prof. Thierry Dutoit


2

1
|XT0(f)|
xT0(t)
AT0(0)

Signaux dterministes t
-fe 0 fe
f

priodiques : TF-TFTD-FFT
w+(t)
|W+(f)|

1 |XT0(f)|
xT0(t) |XT0(f)|
xT0(t) 1/Te
AT0(0)
t AT0(0) f

- Fe 0 Fe f
0 (N-1)Te t
t f
-fe 0 fe
-fe 0 fe

|W+(f)|
w+(t) |W++(f)|
xwT0++(t)
(t) |X
N T0 (f)|
AT0(0)/Te
11
1/Te
t f
t f
- Fe 0 Fe
0 (N-1)Te - Fe 0 Fe
0 (N-1)Te

|X(k)|

N AT0(0)

xN+(t)=xT0(t)w+(t) |XT0+(f)|
xT0+(t)
AT0(0)/Te

t k
t f
0 (N-1)Te 0 N-1
- Fe 0 Fe

Prof. Thierry Dutoit


3

Alatoires?
Forme analytique ? Synthse
= Dterministes
Ex : mission radar-sonar, synthse de son-image,
modulations en tlcom, etc.

Forme non analytique ? Analyse (naturel)


(Causes multiples, incontrlables, non mesurables)
= Alatoires
Ex : rception sonar ou radar, parole naturelle,
lectro-cardiogramme, lectro-encphalogramme,
signaux godsiques, signaux boursiers

alatoire dterministe !

Prof. Thierry Dutoit


4

2
Exemples de signaux alatoires

Intervalles entre les


battement du cur (ms)

Pression artrielle
moyenne (mm Hg)

Volume respiratoire

Prof. Thierry Dutoit


5

Signal alatoire

pX (t ) ( x)
x

Signal stationnaire : pX (t ) ( x) = p X ( x) pour tout t


p X ( x) = Statistique dordre 1 ~ moyenne, cart-type
pX (t ) X (t ) ( x, y) = Statistique dordre 2 ~ autocorrlation,
densit spectrale de puissance
Prof. Thierry Dutoit
6

3
Plan

5.1 Variables alatoires


5.2 Signaux alatoires
5.3 Signaux alatoires a temps discret
5.4 Filtrage dun signal alatoire
5.5 Estimation de sa statistique du 2e ordre

Prof. Thierry Dutoit


7

5.1 Variable alatoire


PX(x) FX(x)
1
densit de probabilit
fonction de rpartition
x
x 0 x
mx x
b
P ( X (a, b)) p X ( x)dx FX ( x) p

X ( )d
a

Approch par


mX E[ X ] xp

X ( x)dx

X 2 E[( X mX )2 ] (x m

X ) 2 p X ( x)dx

Prof. Thierry Dutoit


8

4
Variables alatoires
densit de y pY(y| x=1.6)

probabilit
conjointe
p XY ( x, y )
x pY(y| x=1)

Approch par

cov( X , Y ) E[( X mX )(Y mY )]

Indpendance Non-corrlation
pXY ( x, y) pX ( x) pY ( y) cov( X , Y ) 0
Prof. Thierry Dutoit
9

Algbre des variables alatoires


PX1(x1) PX2(x2)

x2

x1
x1 x2
mx1 mx2

Y X1 X 2 Y X1 X 2
pY ( y ) ? pY ( y ) ?

pY ( y ) p

X1 ( x) p X 2 ( y x)dx ???

pY ( y ) p X1 ( x) * p X 2 ( x)
https://en.wikipedia.org/wiki/Product_distribution

Prof. Thierry Dutoit


10

5
Exemple : v.a. uniforme
pX(x)

1/q q/2
x3
q/2
x2 q2
x
X2
q / 2
q
dx
3q q / 2 12
-q/2 q/2

x=rand(1,1000);
x=(x-1/2)*10;
80
m=mean(x)
m = 60

0.0211 40

s=std(x)^2; 20
s =
0
8.3717 -5 -4 -3 -2 -1 0 1 2 3 4 5

hist(x,20);

Prof. Thierry Dutoit


11

Exemple : v.a. Gaussienne N(m,)


PX(x)
1 ( x m)2
p X ( x) exp
2 2 2
6

X2 x p X ( x)dx ... 2
2
x
m

x=randn(1,1000);
x=x*10+8;
m=mean(x) 2000

m = 1500

7.5692 1000

s=std(x)^2; 500
s =
89.0175 0
-30 -20 -10 0 10 20 30 40 50

hist(x,20);

Prof. Thierry Dutoit


12

6
Exemple : v.a. Gaussienne N(m,)
Tirage dune variable Gausienne?

U=FX(x)
1

tirage uniforme

0 x

Tirage suivant
pX(x)

Thorme central limite

X quelconque(mX,X) X+X+X+X++X : N(NmX,X/N)

PX(x)*PX(x)*PX(x)*PX(x)PX(x) = N(NmX,X/N) !!!

Prof. Thierry Dutoit


13

5.2 Signaux alatoires

A. Einstein a invente l'autocorrlation, la


densit spectrale de puissance et le
thorme de Wiener-Kintchine en
1914 (un an avant la relativit gnrale)
Il tudiait depuis 1904 ( 26 ans!) le
"bruit" du mouvement brownien pour
prouver l'existence des atomes (dont il est
une manifestation macroscopique)

Prof. Thierry Dutoit


14

7
Fonction dautocorrlation

XX ( ) E[ X (t ) X (t )] xy
* *
p X (t ) X (t ) ( x, y)dxdy

XY ( ) E[ X (t )Y * (t )] (intercorrelation)

Signal
ergodique

1 T /2
mX x(t ) lim x(t )dt
T T
T / 2
1 T /2

X 2 | x(t ) mX |2 lim | x(t ) mX |2dt
T T
T / 2
1 T /2

XX ( ) x(t ) x* (t ) lim x(t ) x* (t )dt =<x(t),x(t-)>
T T
T / 2

Prof. Thierry Dutoit


15

Fonction dautocorrlation
1 T /2

XX ( ) x(t ) x* (t ) lim
x(t ) x* (t )dt XX ( ) XX * ( )
T T
T / 2 SXX(f)

XX(t)
x(t) X
X

X t t f
0

XX (0) E[ XX * ]
E[( X mX mX )( X mX mX )* ]
E[( X mX )( X mX )* ] E[mX mX ]
*

E[( X mX )mX ] E[mX ( X mX )* ]


*

X | mX |2
2

Prof. Thierry Dutoit


16

8
Densit spectrale de puissance

S XX ( f )

XX (t )e jt dt avec 2 f

XX ( ) XX * ( ) S XX ( f ) relle

et si XX ( ) relle S XX ( f ) paire

SXX(f)

XX(t)
x(t) X
X

X t t f
0

densit
spectrale de
puissance
Prof. Thierry Dutoit
17

Exemple : Bruit blanc (thorique)

S XX ( f ) X
2
XX (t ) X 2 (t )

x(t) XX(t) SXX(f)


X
X
3X
t t f
0
Ici: Gaussien 0

X(t1) et X(t2) = non corrles

NB: blanc na rien voir avec Gaussien

2me ordre 1er ordre


Prof. Thierry Dutoit
18

9
Exemple : Bruit blanc (rel)
x(t) XX(t) SXX(f)
X
X
3X
t t f
0
0

x(t) XX(t) SXX(f)


X/B X
X
3X
t t f
- B/2 0 B/2
0

Prof. Thierry Dutoit


19

Exemple : Signal priodique


T /2
1
T T
x(t ) Ae j (0t ) XX (t ) lim Ae j (0 ) Ae j (0 ( t ) ) d
T / 2
T0 / 2
A2
S XX ( f ) A2 ( f f0 ) e j0 e j0 ( t ) d A2e j0t
T0 T0 / 2

x(t) X(f)
A A/2

x(t ) A cos(0t )
t f
0 T0 - f0 0 f0

XX(t) SXX(f)
A/2
A/4

t f
0 T0 - f0 0 f0

Prof. Thierry Dutoit


20

10
Signal alatoire
de moyenne non nulle
( X m X )( X mX) ( ) E[( X( )t mX)( X( t ) m)X] *
XX ( ) | mX | 2

S( X mX )( X mX) ( f ) S XX ( f) | mX| 2 ( )f

SXX(f)
XX(t)
mX+X
x(t) mX X

mX+X mX
mX t t f
0

Prof. Thierry Dutoit


21

(Signaux alatoires non corrls)


( X Y )( X Y ) ( ) E[( X( t) Y( t))( X( t ) Y( t )) ] *

XX ( ) YY ( ) XY ( ) YX ( )

X et Y = non corrles

( X Y )( X Y ) ( ) XX ( ) YY ( )

S( X Y )( X Y ) (F ) SXX (F ) SYY (F )

(cf. cas prcdent)

Prof. Thierry Dutoit


22

11
Plan

5.1 Variables alatoires


5.2 Signaux alatoires
5.3 Signaux alatoires a temps discret
5.4 Filtrage dun signal alatoire
5.5 Estimation de sa statistique du 2e ordre

Prof. Thierry Dutoit


23

Signal alatoire temps discret

p X ( k ) ( x)
x

X (n) ..., X ( n),..., X (1), X (0), X (1),..., X (n),...

Prof. Thierry Dutoit


24

12
Signaux alatoires temps discret
(Signal stationnaire et ergodique)

1 T /2 1 N

mX x(t ) lim x(t )dt
T T
mX x(n) lim
N 2 N 1

x ( n)

T / 2 i N

X 2 | x(t ) mX |2 X 2 | x(n) mX |2
1 T /2 1 N

lim | x(t ) mX |2 dt
T T
lim
N 2 N 1


i N
| x ( n) m X |2

T / 2

XX ( ) x(t ) x* (t ) XX (k ) x(n) x* (n k )
1 T /2 1 N

lim x(t ) x* (t )dt
T T
lim
N 2 N 1

x ( n) x* ( n k )

T / 2 n N

S XX ( f ) XX (t )e dt ( 2 f )
jt S XX ( F )
n
XX (n)e jn ( 2 F )

Prof. Thierry Dutoit


25

Signaux alatoires temps discret


SXX(f)
A
XX(t)
x(t) X

X t t f
- Fe /2 0 Fe/2

SXX+(f)

XX+(t)
x+(t) A/Te
X X/Te

X t t f
Te Te - Fe/2 0 Fe/2

SXX(F)

XX(n)
x(n) A/Te
X X

X n n F
-1/2 0 1/2

Prof. Thierry Dutoit


26

13
Ex. : bruit blanc temps discret


2
pour k 0
XX (k ) X S XX ( F ) X
2

0 pour k 0
XX(n) SXX(F)
X X
X

n n F
-1/2 0 1/2

bruit blanc uniforme (0,1)


1

0.8

0.6

0.4

0.2

plot(rand(1,300)) 0
0 50 100 150 200 250 300

plot(randn(1,300)) 4
bruit blanc gaussien (0,1)

-2

-4
0 50 100 150 200 250 300

Prof. Thierry Dutoit


27

Signaux priodiques
temps discret
XX(t) SXX(f)
x(t) A/2
A/4
A
t t f
0 T0 0 T0 - f0 0 f0

XX+(t)
x+(t) SXX+(f)
A/2
A/4Te

t t f
Te Te - Fe/2 0 Fe/2

XX(n) SXX(F)
x(n)
A/2 A/4

n n F
-1/2 0 1/2

Prof. Thierry Dutoit


28

14
Application : Quantification
x(t) x(n) xq(n)

fe

xq(x)
pX(x)

2 e(n)

q xq(n)
e(n) xq (n) x(n)
x x(n)
q=2A/2N
-A q A q / 2 e( n ) q / 2
Quantificateur

bruit de quantification

e(x)=xq(x)-x
q/2 x
Rapport Signal sur Bruit (RSB)
-q/2
=10 log(x/ e) = ?
A
facteur de charge
x
Prof. Thierry Dutoit
29

Application : Quantification
x


e~bruit blanc uniforme [q/2,q/2]
q2 2A
e2 et q N
12 2
A2
2 N et A x

32
t
x


3 22 N

x2
e
RSB 10 log

t e2
1
10 log 2 3 22 N

6, 02 N 4.44 20.log

Prof. Thierry Dutoit


30

15
Application : Quantification
RSB 6,02 N 4.44 20.log
dB RSB = 10 log (x 2 / e 2)
1 bit = + 6dB de RSB 100
90
86
80

70
65,8
60
b = 16 50
14 42
12 40
10
30
8
20
10
10 log (x2 / s2) = - 20 log

-100 -50 0 10 20 (dB)

Prof. Thierry Dutoit


31

5.4 Filtrage dun signal alatoire


temps discret
x(n) h(n) y(n)
H(F)

1
YY lim y (n)* y ( n) SYY ( F ) H ( F ) H ( F )* S XX ( F )
mY E[Y (n)] N N
1 SYY ( F ) | H ( F ) | S XX ( F )
h(i) E[ X (n i)]
i
lim x(n)* h(n)* h( n)* x( n)
N N

1
h(n)* h(n) * lim x( n)* x( n)
mX h(i)
i
N N

HH * XX

XX(n) HH(n) YY(n)


SXX(F) |H(F)| SYY(F)

Prof. Thierry Dutoit


32

16
Exemple
SXX(F)
X
X

F
-1/2 0 1/2

H(F)
1
F
-1/2 0 1/2
B

SYY ( F ) X2 H ( F )
2
SYY(F) Y
X 1/ 2
Y2 X2
2
H ( F ) dF
F 1/ 2

-1/2 0 1/2 2 B 2
X

Prof. Thierry Dutoit


33

Plan

5.1 Variables alatoires


5.2 Signaux alatoires
5.3 Signaux alatoires a temps discret
5.4 Filtrage dun signal alatoire
5.5 Estimation de la statistique du 2e ordre
1. Estimation de la fonction dautocorrlation
2. Estimation de la densit spectrale de puissance

Prof. Thierry Dutoit


34

17
Les estimateurs sont eux aussi des
signaux alatoires !

~ ~
xx(n), Sxx(F) ? Estimateurs xx(n), Sxx(F)

Alatoires!

~
Qualits dun estimateur dune var. alatoire ?
~
Non biais si E()=

Consistant si lim VAR ( ) 0


N

Prof. Thierry Dutoit


35

Exemple Moyenne dun bruit


blanc de moyenne non-nulle
x(t)
1 N 1
2

VAR x E . x(n) x
t N n 0

1 N 1
2
N 1
X
1
x (n) 2 E x ( n ) N x
N n 0
N n 0

1 N 1
2

1 N 1 Bruit 2 E x ( n ) x
E X E x(n) blanc
N n 0
N n 0
1 N 1 2
VAR x E x ( n) x
N 1
1
E x ( n) N 2 n 0
N n 0
X 1 1
2 N x2 x2
Non biais
N N
Consistant

Prof. Thierry Dutoit


36

18
Exemple Moyenne dun bruit
blanc de moyenne non-nulle
Ici 100 bruits Gaussiens N(1,1)
moyenne(mux)
1.5

x= randn(100,100)+1 ; 1 Non biais


for N=2:100 0.5
mux= sum(x(1:N ,:))/N ;
meanmux(N)=mean(mux); 0
0 10 20 30 40 50 60 70 80 90 100
varmux(N)=std(mux)*std(mux); variance(mux)
end 0.8

0.6

0.4

0.2

0
Consistant
0 10 20 30 40 50 60 70 80 90 100

Prof. Thierry Dutoit


37

1. Estimation de la fonction
d'autocorrlation
XX(n)
x(n)

n n

XX (k ) x(n) x* (n k )
1 N

lim
N 2 N 1


n N
x ( n) x* ( n k )

Intuitivement : si on na que N
chantillons?
Prof. Thierry Dutoit
38

19
1 . Estimation de la fonction
d'autocorrlation
N k 1
1
Estimateur non biais XX (k )
Nk
.
n 0
x(n) x* (n k )

Non biais et consistant

N k 1
1
Estimateur biais XX (k )
N
.
n 0
x ( n) x * ( n k )

Biais et consistant

Nk
XX (k ) XX (k )
N

Prof. Thierry Dutoit


39

Exemple: signal sinusodal


x= 10*cos(2*pi*1/10*(0:99)+pi/5) ;
subplot(2,1,1) ; plot(xcorr(x, unbiased'));
subplot(2,1,2) ; plot(xcorr(x, 'biased'));

Prof. Thierry Dutoit


40

20
Exemple: bruit blanc Gaussien
x= 2*randn(1,100) ;
subplot(2,1,1) ; plot(xcorr(x, unbiased'));
subplot(2,1,2) ; plot(xcorr(x, 'biased'));

Prof. Thierry Dutoit


41

2. Estimation de la PSD :
Priodogramme
N 1
S XX ( F )
k ( N 1)
XX (k )e jk avec 2 F

1
Calcul partir de XX (k ) {xN (n)}*{xN (n)}
*

lestimateur biais ! N
1
S XX ( F ) X N ( ) X * N ( ) avec 2 F
N
1
| X N ( ) |
N
Fentrage
1
S XX ( F ) | FFT ( x(n)) | possible
N (Hamming,
Blackman, etc.)

Biais (biais triangulaire de XX (k ) )


et NON consistant : VAR S XX ( F ) S XX
2
(F )
Prof. Thierry Dutoit
42

21
Exemple : N(0,2)
x= 2*randn(1,512) ;
plot(10*log10( abs(fft(x,512)).^2 /512 ));

Prof. Thierry Dutoit


43

2. Estimation de la PSD :
Priodogramme Moyenn
Priodogramme xN(0), xN(1), xN(2), xN(3), xN(4), , xN(N-1)

Moyenn =
M chantillons M chantillons M chantillons M chantillons
Estimateur de
WELSH Priodogramme 1

Priodogramme 2
N=L*M

Priodogramme L

Moyenne

Biais (biais triangulaire de XX (k ))


1
mais Consistant : VAR S XX ( F ) L S XX ( F )
2

Prof. Thierry Dutoit


44

22
Exemple : N(0,2)
En pratique : pwelch(x,window,NOVERLAP,NFFT,Fe)
Et pour Sxx(F) : pwelch(x,window,NOVERLAP,NFFT,2)

pwelch(x(1:128),boxcar(128),0,128,2) pwelch(x(1:512),boxcar(512),0,512,2)

pwelch(x(1:128),hamming(128),0,128,2) pwelch(x,hamming(128),0,128,2)

Prof. Thierry Dutoit


45

Exemple : N(0,2)
Par dfaut : pwelch(x,[],[],[], 2)
L=8
Hamming
Overlap=50%

Prof. Thierry Dutoit


46

23
Exemple : N(0,2)
Estimer x ? variance= sum(x.*x)/length(x)
variance = 4.0372
SXX(F)
XX(n)
x(n)
X X

X n n F
-1/2 0 1/2

^
SXX(k)

k
0 ... NFFT/2

variance=sum(pwelch(x,[],[],128,2))*2*(1/128)
variance = 3.9154

Prof. Thierry Dutoit


47

Exemple : Bruit color


x=2*randn(1,512) ;
[N,Wn]=ellipord(0.5,0.6,1,40);
[B,A]=ellip(N,1,40,Wn);
freqz(B,A)
xf=filter(B,A,x) ;

Prof. Thierry Dutoit


48

24
Exemple : Bruit color

pwelch(xf(1:128),boxcar(128),0,128,2) pwelch(xf(1:512),boxcar(512),0,512,2)

pwelch(xf(1:128),hamming(128),0,128,2) pwelch(xf,hamming(128),0,128,2)

variance=sum(pwelch(xf,[],[],128,2))/128*2
variance = 1.9973
Prof. Thierry Dutoit
49

Exemple : Cisode
x= 10*cos(2*pi*1/10*(0:511)+pi/5) ;

XX(n) SXX(F)
x(n)
A/2 A/4

n n F
-1/2 0 1/2

^
SXX(k)
x(n)
XX(n) A/2 N.A/4

|FFT|2/N n k
0 NFFT/2

N 2N+1

Prof. Thierry Dutoit


50

25
Exemple : Cisode
NFFT A/4

pwelch(x(1:128),boxcar(128),0,128,2) pwelch(x(1:512),boxcar(512),0,512,2)

pwelch(x(1:128),hamming(128),0,128,2) pwelch(x,hamming(128),0,128,2)

variance=sum(pwelch(x,[],[],128,2))/128*2
variance = 49.9994

Prof. Thierry Dutoit


51

Exemple : Cisode + bruit blanc


x=10*randn(1,512)+10*cos(2*pi*1/10*(0 :511));
b = 100 s = A/2=50

RSB = 10log10(s/ b)=-3dB

RSB ?
s ? b?
s(n)? b(n)? Inconnus
Seul s(n)+b(n) est connu !

Prof. Thierry Dutoit


52

26
Exemple : Cisode + bruit blanc
x=10*randn(1,512)+10*cos(2*pi*1/10*(0 :511));
pwelch(x,hamming(128),0,128,2)

NFFTA/4=35dB
A=10 s=A/2=50

b=100
(10log(b)=20dB)

RSB=10log10(s/ b)=10log10(1/2)=-3dB

Prof. Thierry Dutoit


53

Ce que la FFT peut faire pour vous

Observation spectrale (estimateur de


Transorme de Fourier)
Convolution linaire (c.--d. filtrage)
Estimation de PSD
Calcul dautocorrlation
Caf

Prof. Thierry Dutoit


54

27
La FFT fait AUSSI le caf

The SANI (Smart Appliance Network Interface)


Wireless Network transmits and receives data
between your appliances.

1. Simple point and click web interface allows unique on and off times for each
day of the week
2. Clock time and day of week set automatically by home hub
3. Time of day and program recovery from a power outage means you will
have your morning coffee even if the power has been interupted.
4. Home Hub reminder if user forgets to prepare coffee the night before
5. "Coffee Brewing" and "Coffee Ready" status updates to Home Hub

Prof. Thierry Dutoit


55

28
Traitement du Signal
Chapitre 6
SYNTHESE DES FILTRES
NUMERIQUES
Thomas W. Parks and James H. McClellan ont
marqu le traitement du signal au dbut des
annes 70, alors que J. McClellan tait encore
tudiant Rice University (Houston, Texas), par
l'invention d'une technique d'approximation
numrique de filtres FIR phase linaire. Connue T. Dutoit
aujourd'hui sous le nom d'algorithme de Parks-
McClellan, ce procd est trs largement utilis
dans les systmes de tlcommunications
thierry.dutoit@fpms.ac.be
numriques.
R. Boite (1928-2002) et H. Leich (1941-),
professeurs mrites de la FPMs, ont fortement
contribu au dveloppement des techniques de
filtrage numrique au dbut des annes 80,
notamment par la publication de leur ouvrage "Les
filtres numriques" (Masson, Paris)

01/09/2016

Plan
6.1 Cas simple : La cellule du second degr
6.1.1 Stabilit
6.1.2 Le rsonateur du second ordre
6.1.3 Le filtre coupe-bande du second ordre
6.1.4 Implmentation d'une cellule du second degr
6.2 Approximation et synthse des filtres IIR
6.2.1 La transformation qui prserve h(n)
6.2.2 La transformation bilinaire
6.2.3 Le problme de la quantification des coefficients
6.2.4 Synthse des filtres IIR en virgule fixe
6.3 Approximation et synthse des filtres FIR
6.3.1 Filtres phase linaire
6.3.2 Approximation optimale des FIR phase linaire
6.3.3 Synthse des filtres FIR phase linaire

Prof. Thierry Dutoit


2

1
Filtres simples (d1-2-3)
"The Swiss Army Knife of Digital Networks" de R.
Lyons et A. Bell (IEEE Signal Processing
Magazine, Mai 2004, pp. 90-100)

Prof. Thierry Dutoit


3

Filtres simples (d1-2-3)

Prof. Thierry Dutoit


4

2
6.1 La Cellule du second degr
b0 b1 z 1 b2 z 2
H ( z) Stable(b1,b2)?
1 a1 z 1 a2 z 2
Si Ples Cplxes*
b z b1 z b2 b0 z b1 z b2 a2<1
H ( z) 0
z a1 z a2 z 2 z
Si Ples Rels
ba22
Ples complexes
ples conjugus
complexes conjugus (1 a1 a2 ) 0
1 (1 a1 a2 ) 0
2
ba22=
=ab11/4
/4

-2 -1 0 1 2 ab
11

Ples
ples rels
rels
0
b2 =

1+
b1+

1-a1+ a2=0 1+a1+ a2=0


b1 +

b 2=
1-

Prof. Thierry Dutoit


5

Le rsonateur du 2nd degr


1 bz 1 1 bz 1
H ( z) K 1 2
K
1 a1.z a2 .z (1 p1.z 1 ).(1 p2 .z 1 )
(Z)
p1 a1 2 cos a2 b cos


Z0
si 1
K
AM f ( )
p2
2(1 ).
A()

1
f
2 2(1 ) radians
f 2(1 ).Fe / 2 Hertz
fe/2 fe f

Prof. Thierry Dutoit


6

3
Le filtre coupe-bande du 2nd degr

(Z)
1 2cos .z 1 z 2
P1
Z1
H ( z) K. 1 1
|0P1|=
1 2 cos .z 1 2 z 2

P2
Z2

A()

2 2(1 ) radians
f
f 2(1 ).Fe / 2 Hertz
fc/2 f

Prof. Thierry Dutoit


7

Implmentation d'une cellule du


second degr

Structure directe I (dite immdiate) Structure directe II

MATLAB?
filter : structure directe II transpose
dfilt : autres structures

Structure directe II transpose

Prof. Thierry Dutoit


8

4
Rgle de MASON

P ( z) i
H ( z) i

1 B j ( z)
j

b0 b1 z 1 b2 z 2
H ( z)
1 a1 z 1 a2 z 2
Structure transpose :
1. Remplacer les nuds de sommation par
des nuds de dispersion, et inversment
2. Inverser tous les sens de parcours

Prof. Thierry Dutoit


9

rappel
Butterworth Chebyshev (I-II) - Cauer
|H(f)| (dB)
|H(f)| (dB)
f (Hz)
0 f (Hz)
|H( 0
f)|
(dB
) Butterworth Chebyshev I
n=2

|H( n=3
f)|
(dB n=2 n=4
)
n=4 n=3
n=2 (dB)
|H(f)| |H(f)| (dB)
f (Hz)
f (Hz) 0
0

Chebyshev II

Cauer n=4
n=3
(ou n=3
n=4
Elliptique)

Prof. Thierry Dutoit, TCTS Lab


10

5
6.2 Approximation et synthse des
filtres IIR
N ( p)
H a ( p) Butterworth, Chebyshev, Cauer, etc.
D( p )

B( z )
H ( z) En maintenant la stabilit et la rponse en frquence?
A( z )

Tsfo qui maintient h(n) Tsfo bilinaire

Prof. Thierry Dutoit


11

1. La transfo. qui prserve h(n)


h(n) ha (nTe )

H ( z ) h(i ) z i ha (iTe ) z i FIR : degr >>>
i 0 i 0

IIR : comment ?
A
H a ( p) ha (t ) Aeat h( n) Ae anTe H ( z)
A
pa 1 e aTe z 1
N
Ai
H a ( p) K
N
Ai
H ( z) K
i 1 p pi i 1 1 e
piTe 1
z
N
Ai
H ( z ) KTe piTe 1
i 1 1 e z

Prof. Thierry Dutoit


12

6
Exemple : Chebyshev type I
H ( f ) (dB)

0
-1

-40
f (Hz)
1000 1200

Fe=3000;
[n,wn]=cheb1ord(2*pi*1000,2*pi*1200,1,40,'s');
[N,D]=cheby1(n,1,wn,'s');
[B,A]= impinvar(N,D,Fe);

Prof. Thierry Dutoit


13

Exemple : Chebyshev type I


% Calcul de la rponse impusionnelle analogique
[r,p,k]=residue(N,D);
t=0:1/(5*Fe):.02;
ha=real([exp(t'*(p.'))*r]);

% Calcul de la rponse impusionnelle numrique


h=filter(B,A,[1;zeros(49,1)]);

% Comparaison des ples et zros


figure;
zplane(N,D)
figure
zplane(B,A)
% Calcul des rponses en frquence
[Ha,Wa]=freqs(N,D,2*pi*(1:10:Fe));
[H,W]=freqz(B,A, 1:10:Fe,Fe);

Prof. Thierry Dutoit


14

7
Prof. Thierry Dutoit
15

2. La transformation bilinaire
1 z 1 1 p
p z
1 z 1 1 p

(z)
j ( p)

p j z e j

Prof. Thierry Dutoit


16

8
2. La transformation bilinaire
1 e j 1 e j H ( z ) H a ( p) p(1 z 1 ) /(1 z 1 )
ja
1 e j 1 e j
2 j sin
H ( ) H a (a )
2 2cos
avec 2arctan(a )
j 2sin cos f
2 2

2 cos
2

j tan( ) a
2

Prof. Thierry Dutoit


17

2. La transformation bilinaire

2
tgf 2
Te

f
Af (dB)
( FILTREANALOGIQ UE
)
Af ( dB)

Pr-distorsion des ( FILTRE


NUMERIQUE)

f
0 fc fs

Prof. Thierry Dutoit


18

9
Exemple : Chebyshev type I
H ( f ) (dB)

0
-1

-40
f (Hz)
1000 1200

Fe=3000;
[n,wn]=cheb1ord(1000/(Fe/2),1200/(Fe/2),1,40);
[B,A]=cheby1(n,1,wn);

% Calcul du filtre analogique, pour comparaison


[n,wn]=cheb1ord(2*pi*1000,2*pi*1200,1,40,'s');
[N,D]=cheby1(n,1,wn,'s');

Prof. Thierry Dutoit


19

Exemple : Chebyshev type I

Prof. Thierry Dutoit


20

10
3. Quantification des coefficients
MATLAB = 16 chiffres dcimaux (64 bits!) En virgule fixe?

Ex : (Fe = 4 kHz) passe-bas IIR de Cauer, d8, fc=300 Hz,


ripple=0.5 dB et Am=50 dB
% Approximation de dpart
[b,a]=ellip(8,.5,50,300/2000);
[h,f]=freqz(b,a,256,4000);

% 6 chiffres dcimaux
b6=round(b*1e6)/1e6;
a6=round(a*1e6)/1e6;
[h6,f]=freqz(b6,a6,256,4000);

% 5 chiffres dcimaux
b5=round(b*1e5)/1e5;
a5=round(a*1e5)/1e5;
[h5,f]=freqz(b5,a5,256,4000);
Prof. Thierry Dutoit
21

3. Quantification des coefficients

16 chiffres

6 chiffres

5 chiffres

Prof. Thierry Dutoit


22

11
4. Bruit de calcul
Les chantillons sont eux aussi quantifis sur N bits
1. Chaque multiplieur cre un nombre sur 2N bits, qui doit tre
recadr sur N bits
Larrondi est lui aussi quivalent un bruit de calcul
Pour limiter la puissance du bruit de calcul, les sorties des
multiplieurs sont recadre sur Nc bits avec N<Nc<2N

2. Chaque additionneur peut tre source de dpassement,


interprt comme un changement de signe, et crer un transitoire
Dans certains cas, on constate mme lapparition dun
transitoire permanent = cycle limite
Pour viter les dpassements, on applique des facteurs
dchelle
On montre que les structures dir I, dir II, dir II tsp ont des
performances de bruit trs tester et prendre la
meilleure (souvent dir II tsp)
Prof. Thierry Dutoit
23

Synthse par cascade de


cellules du 2nd degr
1 z0 z 1 M /2
(1 bi1 z 1 bi 2 z 2 )
H ( z ) K0
1 p0 z 1
Ki
i 1

(1 ai1 z 1 ai 2 z 2 )

Prof. Thierry Dutoit


24

12
Exemple : Cauer
[b,a]=ellip(8,.5,50,300/2000);
sos=tf2sos(b,a,'up',Inf)
>sos=
0.0261 -0.0085 0.0261 1.0000 -1.6853 0.7290
0.3027 -0.4761 0.3027 1.0000 -1.7250 0.8573
0.6795 -1.1687 0.6795 1.0000 -1.7542 0.9488
0.8641 -1.5131 0.8641 1.0000 -1.7705 0.9882

Prof. Thierry Dutoit


26

6.3 Approximation et synthse des


filtres FIR
Toujours stables
N 1
Intrt : crer des filtres qui ne
H ( z ) h( n) z n dforment pas les signaux
n 0
(filtres symmtriques,
phase linaire) h(n) h(n)
Ex: interpolation - dcimation
Inconvnient : degr lev

Phase nulle
=> pas de dformations

n0
Simple retard
=> pas de dformations
Prof. Thierry Dutoit
27

13
Approximation optimale des FIR
phase linaire

Parks et McClellan FIR de d min


pour des spcifications donnes
= Approximation numrique base
sur la minimisation de | H ( ) Hd ( ) |

NB : sensibilit la quantification <<<


pas besoin de cellules du 2nd d

Prof. Thierry Dutoit


28

Exemple
Fe=5 kHz, d 32, Passe-bande(600-900 Hz),
bande attnue <400 Hz, >1100 Hz
f=[0 400/2500 600/2500 900/2500 1100/2500 1];
m=[0 0 1 1 0 0];
b=remez(31,f,m);
stem(b)
freqz(b,1)

Prof. Thierry Dutoit


29

14

Vous aimerez peut-être aussi