Académique Documents
Professionnel Documents
Culture Documents
Signal/1005-03
Introduction
01/09/2016
Signal
1
1. Classification des signaux
Tlcom Signal
Gophysiques
Communication
interpersonnelle
2
2. Caractrisation des signaux
Numrique fe
Mono/Multi
dimensionnel
Dterministe
/
Alatoire
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
3. Echantillonnage et
quantification
fe
4
Echantillonnage x(t)
fe
x(n)
x(n) xx((n)nTe )
q
Fe>= 2 Fmax
Echantillonnage x(t)
fe
x(n)
x(n) xx((n)nTe )
q
Fe/2 = miroir
5
Quantification x(t) xq(t)
pas de quantification
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]
6
Echant. + Quantif. x(t)
fe
x(n) xq(n)
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);
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
8
Exemple 3 Parole bruite
avec divers niveaux de RSB
Signal = audioread('par8.wav'); Tlphone = 30 dB
% Fe=8000 Hz; nbits=16
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');
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');
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
10
5. Traitement numrique du Signal
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)
De lEmbarqu
lInternet des Objets
12
Pour aller plus loin
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
01/09/2016
Plan
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
2
Quizz
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
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
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 ? .
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?
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 )
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, }
Instable
Prof. Thierry Dutoit
13
impresp=filter([1],[1 1 -1],impulse);
impresp(1:12)
>> 1 1 2 3 5 8 13 21 34 55 89 144
stem(impresp);
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))
8
1.5 Convolution numrique
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 )
y(n)=x(n)*h(n)
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
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 )
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
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
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)
11
Tsforme en Z Laplace
z ep
Prof. Thierry Dutoit
23
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
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( ))
Proprits ?
i k
z n0
x(k ) z
k
k
n0
z X ( z)
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
Ples et stabilit
Im Im
z=ep 1
Re Re
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])
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
15
Traitement du Signal
Chapitre 2
ANALYSE FREQUENTIELLE
DES SIGNAUX ET SYSTEMES
NUMERIQUES
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
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
sinc(t)=sin(t)/t
Signal triangulaire
T0 2 / 0
P a
f 0 0 / 2
P a / 2
RMS a 2
Signal sinusodal
2
Exemple
U max 14.1 10 2
rect(t/a)/a (t)
1/a 1
Thorie des distributions
(t )dt 1
a0
(L. Schwartz)
t t
-a/2 a/2
T0
3
1. Signaux simples usuels : (n)
(n)
1
( n) 1
n
0
n x n=
f(0)
n
f (n) (n) f (0)
0 0 0
Impulsion de Dirac (n)
4
2. Oprations : somme
2. Oprations : produit
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
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
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
6
T0
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
7
2. Oprations : convolution
Convolution : exemples
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
x , u1 u1 x1u1
x x1u1 x2u2
u1
u2 x , u2 u2
x2u2
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
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
10
Dcomposition dun signal
dnergie finie sur { e jt ( [ , ]) }
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
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
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 )
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
12
Autre exemple : Dirac
A(f)
(t) 1
t
f
0
j 0t
1= e
e jt
t
F(f)e
jt
F(f) f(t)e jt dt f(t) df
13
Proprits : dcalage temporel
Proprits : rflexion
f(t) f(-t)
14
Proprits : changement
dchelle
a=1/2
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
15
Proprits :
produit scalaire et Parseval
x1
x1 , x2 x1 x2 cos( )
x2
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
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
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
Surface=A0
A(f) (f)
A0
f(t)
F(f)e jt dt avec F ( f )
f(t)e jt dt
18
Exemples
Explique la TF
dun signal
priodifi
19
Exemple : signal carr priodique
t f
-1 1 0 1 2 3
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
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
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 )
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
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
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
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
23
f +(t)
Te
TFTD(priodique) : short-cut
f +(t)
|F +(f)|
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
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
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 ()
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.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
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)
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
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
-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)
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)
( 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
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
Im Im
j
ej
z=ep 1
Re Re
28
Exemple prcdent
freqz([1 0 -1],[1 0 0.81]) ; 40
-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
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)
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
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
|F +|
A+(0)
Problmes :
1. - + ?
-2 0 2
F
-1 0 1 2. Pour tout ?
2
4.1. Transforme de Fourier
Discrte
|F +|
A+(0)
Problme :
?
Lien avec TFTD?
-2 0 2
F
-1 0 1
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
3
1. Interprtation gomtrique
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)
1. Interprtation gomtrique 2 2
2
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
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, w k X (k )
Xk
|| w k || N
X (k ) NX k
TFD=N * Dcomposition
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
5
3. Interprtation spectrale
+
x T0(t) (T0=NTe)
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
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)
{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(1)
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
)
8
Plan
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
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
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
Exemple : sinusode
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)|');
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)|');
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)|');
12
Exemple : triangle priodique
triT0(t)
1/2 |sinc(f)/2|
1
t f
-1 1 0 1 2 3
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
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)|');
13
4.3 Observation spectrale
TFTD(Signal non priodique)
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)|');
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)|');
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
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
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
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
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
Exemple : sinc(t)
Sinc(t)
Fe = 10 Hz,
centr dans le vecteur dchantillons
subplot(211); stem(signal);
title('f(n)')
subplot(212);
plot(frequencies/pi*(Fe/2),abs(fourier);
title('|F(f)|');
17
Plan
|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
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(2) x(3)
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
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
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
19
TFD sur NTFD points en frquence
NTFD < N
xN(0), xN(1), xN(2), xN(3), xN(4), , xN(N-1)
|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)
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
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
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
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
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 ?
Duplication du spectre Fe ?
x(t) x(n)
Shannon- recouvrement
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
y(n)
x IFFT
200
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
25
Parler
26
Traitement du Signal
Chapitre 5
TRAITEMENT NUMERIQUE
DES SIGNAUX ALEATOIRES
01/09/2016
|X(f)|
x(t)
A(0)
Signaux dterministes t f
|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
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
Alatoires?
Forme analytique ? Synthse
= Dterministes
Ex : mission radar-sonar, synthse de son-image,
modulations en tlcom, etc.
alatoire dterministe !
2
Exemples de signaux alatoires
Pression artrielle
moyenne (mm Hg)
Volume respiratoire
Signal alatoire
pX (t ) ( x)
x
3
Plan
Approch par
mX E[ X ] xp
X ( x)dx
X 2 E[( X mX )2 ] (x m
X ) 2 p X ( x)dx
4
Variables alatoires
densit de y pY(y| x=1.6)
probabilit
conjointe
p XY ( x, y )
x pY(y| x=1)
Approch par
Indpendance Non-corrlation
pXY ( x, y) pX ( x) pY ( y) cov( X , Y ) 0
Prof. Thierry Dutoit
9
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
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);
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);
6
Exemple : v.a. Gaussienne N(m,)
Tirage dune variable Gausienne?
U=FX(x)
1
tirage uniforme
0 x
Tirage suivant
pX(x)
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
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 ]
*
X | mX |2
2
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
S XX ( f ) X
2
XX (t ) X 2 (t )
9
Exemple : Bruit blanc (rel)
x(t) XX(t) SXX(f)
X
X
3X
t t f
0
0
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
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
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 )
11
Plan
p X ( k ) ( x)
x
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 )
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
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
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
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
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
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
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
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
Plan
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()=
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
18
Exemple Moyenne dun bruit
blanc de moyenne non-nulle
Ici 100 bruits Gaussiens N(1,1)
moyenne(mux)
1.5
0.6
0.4
0.2
0
Consistant
0 10 20 30 40 50 60 70 80 90 100
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 )
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
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'));
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.)
21
Exemple : N(0,2)
x= 2*randn(1,512) ;
plot(10*log10( abs(fft(x,512)).^2 /512 ));
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
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)
Exemple : N(0,2)
Par dfaut : pwelch(x,[],[],[], 2)
L=8
Hamming
Overlap=50%
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
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
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
RSB ?
s ? b?
s(n)? b(n)? Inconnus
Seul s(n)+b(n) est connu !
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
27
La FFT fait AUSSI le caf
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
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
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)
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+
b 2=
1-
1
f
2 2(1 ) radians
f 2(1 ).Fe / 2 Hertz
fe/2 fe f
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
MATLAB?
filter : structure directe II transpose
dfilt : autres structures
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
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)
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 )
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
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);
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
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
2. La transformation bilinaire
2
tgf 2
Te
f
Af (dB)
( FILTREANALOGIQ UE
)
Af ( dB)
f
0 fc fs
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);
10
3. Quantification des coefficients
MATLAB = 16 chiffres dcimaux (64 bits!) En virgule fixe?
% 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
16 chiffres
6 chiffres
5 chiffres
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
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
Phase nulle
=> pas de dformations
n0
Simple retard
=> pas de dformations
Prof. Thierry Dutoit
27
13
Approximation optimale des FIR
phase linaire
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)
14