Ingénierie des Systèmes Electroniques
Embarqués et Commande des systèmes
Module GE4.2 :
Processeurs de traitement du signal :
Introduction
Abdelkrim HAMZAOUI 2023-2024
Traitement numérique du signal : Définition
Digital signal processing (DSP) is a method of
processing signals and data in order to enhance or modify
those signals, or to analyze those signals to determine
specific information content. It involves the processing
of real-world signals that are converted into and
represented by sequences of numbers. These signals are
then processed using mathematical techniques in order to
extract certain information from the signal or to
transform the signal in some (preferably beneficial) way.
Traitement numérique du signal
n De quelles solutions dispose-t-on pour effectuer ce travail
n Quelle est la spécificité d’un processeur DSP
4
Traitement numérique du signal
Applications des DSP
n Communications n Image / vidéo
Ø Filaire (xDSL, câble) Ø Compression/Codage
Ø Sans fil (cellulaires, Ø Composition
télévision numérique, Ø Traitement
radio numérique)
Ø Modem
Ø Cryptage
n Militaire
Ø Imagerie : radar,
n Audio sonar…
Ø Mixage et effets Ø Cryptographie
Ø Suppression de bruit Ø Guidage de missiles
Ø Annuleur d’echo
1/03/24 8
Applications des DSP
n Automatisation n Biomédical
Ø Commande de Ø Équipements de monitoring
machines Ø Signaux biophysiques
Ø Contrôle de moteurs Ø ElectroEncéphaloGramme (EEG)
Ø Robots Ø ElectroCardioGramme (ECG)
Ø Radiographie
n Electronique Automobile
Ø Contrôle du moteur n Instrumentation
Ø Assistance au freinage Ø Analyseurs de spectre
Ø Aide à la navigation Ø Générations de fonctions
Ø Commandes vocales Ø Analyseurs de régimes
transitoires
1/03/24 9
TABLE 1-1. Common DSP Algorithms and Typical Applications
DSP Algorithm System Application
Speech coding and Digital cellular telephones, personal communications systems, digital cordless
decoding telephones, multimedia computers, secure communications
Speech encryption and Digital cellular telephones, personal communications systems, digital cordless
decryption telephones, secure communications
Speech recognition Advanced user interfaces, multimedia workstations, robotics, automotive
applications, digital cellular telephones, personal communications systems, digital
cordless telephones
Speech synthesis Multimedia PCs, advanced user interfaces, robotics
Speaker identification Security, multimedia workstations, advanced user interfaces
Hi-fi audio encoding Consumer audio, consumer video, digital audio broadcast, professional audio,
and decoding multimedia computers
Modem algorithms Digital cellular telephones, personal communications systems, digital cordless
telephones, digital audio broadcast, digital signaling on cable TV, multimedia comput-
ers, wireless computing, navigation, data/facsimile modems, secure communications
Noise cancellation Professional audio, advanced vehicular audio, industrial applications
Audio equalization Consumer audio, professional audio, advanced vehicular audio, music
Ambient acoustics
Consumer audio, professional audio, advanced vehicular audio, music
emulation
Audio mixing and
Professional audio, music, multimedia computers
editing
Sound synthesis Professional audio, music, multimedia computers, advanced user interfaces
Vision Security, multimedia computers, advanced user interfaces, instrumentation, robotics,
navigation
Image compression Digital photography, digital video, multimedia computers, video-over-voice, consumer
and decompression video
Image compositing Multimedia computers, consumer video, advanced user interfaces, navigation
Beamforming Navigation, medial imaging, radar/sonar, signals intelligence
Echo cancellation Speakerphones, modems, telephone switches
Spectral estimation Signals intelligence, radar/sonar, professional audio, music
Equations d’algorithmes
Algorithm Equation
M
Finite Impulse Response Filter ∑a
y ( n) =
k =0
k x( n − k )
M N
Infinite Impulse Response Filter ∑a
y ( n) =
k =0
k x ( n − k )+ ∑ b y (n − k )
k =1
k
N
Convolution ∑ x ( k ) h( n − k )
y ( n) =
k =0
N −1
Discrete Fourier Transform X (k ) = ∑ x(n) exp[− j(2π / N )nk ]
n =0
N −1
⎡π ⎤
Discrete Cosine Transform F (u ) = ∑ c(u ). f ( x).cos ⎢ u(2 x + 1)⎥
x =0 ⎣ 2N ⎦
rchitecture and instruction set optimized for power efficient performance9. For signal
Lesa common
processing intensive systems, algorithmes de(Figure
choice is a DSP TNS 1.14).
ALGORITHM BASIC FUNCTION
Voice compression FIR filter
Phase detection
DTMF, Graphic EQ IIR filter
Echo cancellation; high bit- Adaptive filter
rate modems; motion detectors
Audio decoder (MP3, AP3) Inverse modified DCT
(FFT)
Forward error correction Viterbi
Figure 1.14 Many of today’s complex algorithms are composed from basic function signal processing
locks that DSPs are very efficient at computing
Many of today’s complex algorithms are composed from
As an example of afunction
basic low power DSPprocessing
signal solution, consider a solid-state
blocks that DSPs are audio
veryplayer
ike the one shown in Figure
efficient 1.15. This system requires a number of DSP-centric
at computing
lgorithms to perform the signal processing necessary to produce high fidelity music
quality sound. Figure 1.16 shows some of the important algorithms required in this
Implémentation d’algorithmes
LE DOMAINE
Traitement du signal Électronique
Continue Discret Analogique
Numérique
(Analogique) (Numérique) (Continue)
(discret)
Circuits
Models Algorithmes Architectures Électroniques
mathématiques Technologies
Adéquation
Implémentation
Application
1/03/24 13
Utilisation prototype
reducing system costs and affording higher levels of system integration. Recently, FPGA
been gaining considerable attention in high-performance DSP applications, and are emerg
Digital Signal Processing Hardware
coprocessors [14] for standard digital signal processors that need specific accelerators. In
cases, FPGAs work in conjunction with digital signal processors for integrating pre- and
processing functions. These devices are hardware reconfigurable, and thus allow s
designers to optimize the hardware architecture for implementing algorithms that require
1.performance
Special-purpose
and lower(custom)
productionchips
cost. such as application-specific
In addition, designers can implement high-perfor
integrated
complex DSP circuit (ASICs).
functions using a fraction of the device, and use the rest of the device to imp
2.system
Field-programmable gate arrays
logic or interface functions, (FPGAs).
resulting in both lower costs and higher system integ
3. General-purpose microprocessors or microcontrollers (mP/mC).
4. Digital Signal Processors.
Table 1.1 Summary of DSP hardware implementations
ASIC FPGA mP/mC Digital signal Digital
processor processo
HW acce
Flexibility None Limited High High Medium
Design time Long Medium Short Short Short
Power consumption Low Low–medium Medium–high Low–medium Low–med
Performance High High Low–medium Medium–high High
Development cost High Medium Low Low Low
Production cost Low Low–medium Medium–high Low–medium Medium
The main trade-offs in the programmable vs. fixed-
function decision; flexibility and power.
xvi Introduction
DSP Implementation Options
µP
Power
Consumption DSP
FPGA
ASIC
Application Flexibility
An application-specific integrated circuit (ASIC) is a hardware only implementation
option. These devices are programmed to perform a fixed-function or set of functions.
Being a hardware only solution, an ASIC does not suffer from some of the program-
mable von Neumann-like limitations such as loading and storing of instructions and
Real-time processing
n DSP processors have to perform tasks in
real-time, so how do we define real-time?
n The definition of real-time depends on the
application.
n Example: a 100-tap FIR filter is performed in
real-time if the DSP can perform and
complete the following operation between two
samples:
99
y (n ) = ∑ a(k )x(n − k )
k =0
Real-time processing
Waiting Time
Processing Time
n n+1
Sample Time
n We can say that we have a real-time application if:
Waiting Time ≥ 0
I. Introduction
Besoins en TNS
Real-time processing
! Contraintes de temps réel :
# Exemple : taux d’échantillonnage 48kHz
Théorème de Shannon
& Te = 20.833 µs
Arrivée de Arrivée de
l’échantillon x(n) l’échantillon x(n+1)
t
t0 t0+Te
Temps de traitement T
doit être <Te
Spécificités des DSP
n Algorithme classique de TNS : Filtre RIF
N −1
y (n) = ∑ a(i ) x(n − i)
i =0
n Pour chaque a(i) x(n-i) :
n Recherche de l’instruction
3 accès à la n Recherche du coefficients a(i)
mémoire
n Recherche de la donnée x(n-i)
2 accès à n Multiplication a(i) x(n-i)
l’unité
de calcul n Accumulation a(i-1) x(n-i-1) + a(i) x(n-i)
1/03/24 19
A representative DSP
processor data path XO
(Motorola DSP5600x, Operand
Registers
-. Xl
YO
a 24-bit, fixed-point
Yl
processor).
56
Accumulators ---
1/03/24 20
Caractéristiques classiques des DSP
n Codage de données (virgule fixe / virgule flottante)
n Architecture
n Augmentation du parallélisme (DSP à haute performance)
n Modes d’adressage spécifiques
n Périphériques spéciaux pour le traitement du signal
1/03/24 21
Caractéristiques classiques des DSP III. Architecture des DSP
Format
Représentation de
des données
nombres
Les valeurs traitées (coefficients, échantillons...) sont
représentées
! sous(coefficients,
Les valeurs traitées les deuxéchantillons…)
formes suivantes :
sont représentées sous
les deux formes suivantes :
DSP à
Virgule fixe Virgule flottante
"Format courant : 16/24 "Format courant : 32 bits
bits
"Idéal avec CAN/CNA "Idéal pour le traitement sur
12/14 bits une grande dynamique
"Applications : Contrôle
industriel, communications, "Applications : Audio
instrumentation, parole, professionnel, vidéo,
médical, militaire… médical …
1/03/24 22
Le codage des nombres entiers
1/03/24 23
Entiers signés : Format complément à 2
1/03/24 24
Représentation de Nombres Réels
n La représentation des nombres doit répondre à deux
exigences contradictoires:
¨ Précision: intervalle entre deux rationnels codés
n doit être le plus petit possible
¨ Dynamique: rapport entre le plus grand rationnel et le plus petit
rationnel codés
n doit être la plus étendue possible
n Dans ce contexte les unités de calcul des DSP travaillent
¨ soit en format fixe (notation décimale)
¨ soit en format flottant (notation scientifique)
1/03/24 25
Représentation en Virgule fixe
•Aussi appelée représentation à “format fixe”
Propriétés:
Le format d’une donnée ne varie pas au cours du temps
Partie fractionnaire codée sur k bits
format Qk
Partie entière codée sur N-k bits en C2
Partie entière Partie fractionnaire
X bN-1-K bN-2-K ..... b1 b0 b-1 b-2 ....... b-K
Q0 désigne le cas particuler des entiers signés en C2
•Exemple: Le binaire 01011101 peut représenter :
Q2 : 23.25 Q4 : 5.8125 Q7 : 0.7265625
1/03/24 26
Représentation en Virgule Fixe
• Exemple: Q5 sur 8 bits
• Partie entière codé sur 3 bits (dont 1 de signe)
• Partie fractionnaire codée sur 5 bits
• Valeurs comprises entre -4 et +3.96875
#/Poids -22 21 20 ,2 -1 2-2 2-3 2-4 2-5
-4 1 0 0 0 0 0 0 0
-3.96875 1 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0
3.9375 0 1 1 1 1 1 1 0
3.96875 0 1 1 1 1 1 1 1
1/03/24 27
Représentation en Virgule Fixe
Précision: quantification uniforme de pas q
q=2-k
Dynamique:
-2N-k-1 .. 2N-k-1-2-k
Pour obtenir une dynamique sur l’intervalle [-1, 1[ ,utiliser le format
QN-1 sur N bits
Format Q15:
sur 16 bits, le format Q15 permet de représenter tous les
réels entre -1 et 1 avec une précision q=2-15
1/03/24 28
Représentation des nombres : Virgule fixe
Exercices
! Codage des entiers
" Format Qk :
! Ecrire les nombres suivant sous la forme binaire 8 bits signé
au format Q7 :
$ +0.5
$ +1.0
$ -1.0
$ +1/3 = 0.3333
$ -1/3 = -0.3333
1/03/24 29