INT ROD U CCIîN A L PRO CES A DO D IG ITA L D E S …soriae/tema_1_pds.pdfT E M A 1 INT ROD U...
Transcript of INT ROD U CCIîN A L PRO CES A DO D IG ITA L D E S …soriae/tema_1_pds.pdfT E M A 1 INT ROD U...
T E M A 1
INTRODUCCIÓN AL
PROCESADO DIGITAL DE SEÑALES.
Conversión A/D, D/A
Procesado Digital de Señales, 4º Ingeniería Electrónica, E.T.S.E
Universitat de València, Profesor Emilio Soria
Objetivos del tema.
Conocer las ventajas que nos ofrece PDS.
Saber cuando es más conveniente usar estos procedimientos digitales.
Saber qué conlleva el paso “mundo continuo-mundo digital” e inverso.
Conocer el Teorema de Muestreo y sus consecuencias.
Procesado Digital de Señales, 4º Ingeniería Electrónica, E.T.S.E
Universitat de València, Profesor Emilio Soria
Definición y algunas aplicaciones.
Procesado Digital de Señales, 4º Ingeniería Electrónica, E.T.S.E
Universitat de València, Profesor Emilio Soria
Por procesado digital de señales se entienden todas aquellas técnicas
orientadas al tratamiento de secuencias discretas.
Voz
Vocoders.Reconocedores de usuario.Rec. de voz (conversores
texto)
ImagenFiltrado.
Reconocedores (hyperspectral).
Cmpresión.
AudioEfectos de audio.
Búsqueda canciones “tarareo”.
MP3.
Video
Compresión.Estimación de movimientos.
Caracterización (sist. expertos)
MedicinaSeñales unidimensionales
(ECG).Imágenes (mamografía).
Sistemas expertos.
Comunicaciones
TODO, SALVO LATRANSMISION!!!!
Internet
Compresión señales.Codificación/Decod.
SensoresRadar/Sonar.
TAC.Optimización de procesos
y mucho más......
Qué nos ofrece el procesado digital de señales
Procesado Digital de Señales, 4º Ingeniería Electrónica, E.T.S.E
Universitat de València, Profesor Emilio Soria
Facilidad de implementación de sistemas (amplificador analógico-amplificador digital)
Inmunidad a problemas físicos de los componentes(derivas térmicas y valores “exactos”)
Facilidad de cambio de los sistemas.(cambio en las especificaciones de un filtro)
Única forma de realizar algoritmos de procesado(algoritmos MPEG, MP3, vocoders, etc)
Mayor facilidad y precisión en el almacenamiento y recuperación de las señales.
Pero tenemos problemas.........
Procesado Digital de Señales, 4º Ingeniería Electrónica, E.T.S.E
Universitat de València, Profesor Emilio Soria
El Teorema de muestreo es una losa......problemas para
grandes frecuencias de muestreo (vídeo) que se traduce en
problemas de diseño hardware.....problemas en los
convertidores A/D, problemas de ruido........
Al realizar la conversión A/D y D/A aparecen errores y se tiene
una pérdida de parte de información de la señal continúa
original
Esquema general de un sistema de PDS.
Procesado Digital de Señales, 4º Ingeniería Electrónica, E.T.S.E
Universitat de València, Profesor Emilio Soria
Other digitalsystems
Anti-aliasingfilter ADC
x(n)
DSPhardware
Other digitalsystemsDACReconstruction
filter y(n)
x(t)x!(t)
Amplifier
Amplifier
y(t) y!(t)
Input channels
Output channels
!"#$%& '(' !"#$% &'(%)$*("+ ,+*%-# *& ./"+0)$1/ 234 #5#)/1
6$7$)"+ &*.18 "(6 %*(9/.)/6 ,"%- $()* "( "("+*7 #$7("+: ;"%< *& )</ &'(%)$*("+ ,+*%-# $(=$7'./ >:> ?$++ ,/ $().*6'%/6 $( )</ #',#/@'/() #/%)$*(#: =*. #*1/ ./"+0)$1/ "AA+$%"0)$*(#8 )</ $(A') 6")" 1"5 "+./"65 ,/ $( 6$7$)"+ &*.1 "(6B*. )</ *')A') 6")" 1"5 (*) (//6)* ,/ %*(9/.)/6 )* "( "("+*7 #$7("+: =*. /C"1A+/8 )</ A.*%/##/6 6$7$)"+ $(&*.1")$*( 1"5,/ #)*./6 $( %*1A')/. 1/1*.5 &*. +")/. '#/8 *. $) 1"5 ,/ 6$#A+"5/6 7."A<$%"++5: D( *)</."AA+$%")$*(#8 )</ 234 #5#)/1 1"5 ,/ ./@'$./6 )* 7/(/.")/ #$7("+# 6$7$)"++58 #'%< "##A//%< #5()</#$# '#/6 &*. %/++'+". A<*(/# *. A#/'6*0."(6*1 ('1,/. 7/(/.")*.# &*.E2FG H%*6/ 6$9$#$*( 1'+)$A+/ "%%/##I #5#)/1#:
'() *+,$- .+/ 0$-,$- 12.++&34
D( )<$# ,**-8 " )$1/06*1"$( #$7("+ $# 6/(*)/6 ?$)< " +*?/.%"#/ +/))/.: =*. /C"1A+/8 !!""$( =$7'./ >:> $# '#/6 )* ("1/ "( "("+*7 #$7("+ *& ! ?$)< " ./+")$*(#<$A )* )$1/ ": J</ )$1/9".$",+/ " )"-/# *( " %*()$(''1 *& 9"+'/# ,/)?//( #$ "(6 $: =*. )<$# ./"#*( ?/ #"5!!"" $# " %*()$('*'#0)$1/ #$7("+: D( )<$# #/%)$*(8 ?/ &$.#) 6$#%'## <*? )* %*(9/.) "("+*7#$7("+# $()* 6$7$)"+ #$7("+# #* )<") )</5 %"( ,/ A.*%/##/6 '#$(7 234 <".6?"./: J</A.*%/## *& %<"(7$(7 "( "("+*7 #$7("+ )* " C6$7$)"+ #$7("+ $# %"++/6 "("+*70)*06$7$)"+ HGB2I%*(9/.#$*(: G( GB2 %*(9/.)/. HG2EI $# '#'"++5 '#/6 )* A/.&*.1 )</ #$7("+ %*(9/.#$*(:K(%/ )</ $(A') 6$7$)"+ #$7("+ <"# ,//( A.*%/##/6 ,5 )</ 234 6/9$%/8 )</ ./#'+)8 #!$"8 $#
#)$++ $( 6$7$)"+ &*.18 "# #<*?( $( =$7'./ >:>: D( 1"(5 234 "AA+$%")$*(#8 ?/ (//6 )*./%*(#).'%) )</ "("+*7 #$7("+ "&)/. )</ 6$7$)"+ A.*%/##$(7 #)"7/: D( *)</. ?*.6#8 ?/ 1'#)%*(9/.) )</ 6$7$)"+ #$7("+ #!$" ,"%- )* )</ "("+*7 #$7("+ #!"" ,/&*./ $) $# A"##/6 )* "("AA.*A.$")/ 6/9$%/: J<$# A.*%/## $# %"++/6 )</ 6$7$)"+0)*0"("+*7 H2BGI %*(9/.#$*(8 )5A$0%"++5 A/.&*.1/6 ,5 " 2BG %*(9/.)/. H2GEI: K(/ /C"1A+/ ?*'+6 ,/ E2 H%*1A"%) 6$#-IA+"5/.#8 &*. ?<$%< )</ 1'#$% $# $( " 6$7$)"+ &*.1: J</ E2 A+"5/.# ./%*(#).'%) )</ "("+*7?"9/&*.1 )<") ?/ +$#)/( )*: !/%"'#/ *& )</ %*1A+/C$)5 *& #"1A+$(7 "(6 #5(%<.*($L")$*(A.*%/##/#8 )</ %*#) *& "( G2E $# '#'"++5 %*(#$6/.",+5 <$7</. )<"( )<") *& " 2GE:
'()(' *+,$- 5"#+.3 16+/"-"6+"+#
G# #<*?( $( =$7'./ >:>8 )</ "("+*7 #$7("+8 !%!""8 $# A$%-/6 'A ,5 "( "AA.*A.$")//+/%).*($% #/(#*. )<") %*(9/.)# A./##'./8 )/1A/.")'./8 *. #*'(6 $()* /+/%).$%"+ #$7("+#:
!"#$% &"' ($%#$% )*&""+,- 7
Importante: las aplicaciones, en general, no tienen todas
las partes del esquema anterior; según la aplicación se
puede tener todo o parte del esquema
CONVERSIÓN A/D. MUESTREO.
!"#$%&'()&'*+,-./01)"#2&(.&*3)&'*,)*40)-&1/+0*05*�)
+0$+010'*"*&,'6)1&'/0)#"'3)/,'*&'.,.15*�)1&('"%1)/"')
$+,-./0)*40)1"#0)107.0'/0),8)1"#$%019
0 5 10 15 20 250
0.5
1
1.5
2
2.5
3
3.5
n
x[n]
x1(t)
x2(t)
Tenemos muestras discretas de una señal continua....podemos tener
problemas de “ambigüedad” a la hora de determinar qué señal continua dio
lugar a la señal discreta que se obtiene del muestreo
!"# $%&'()'*+,-./0'12
3+)',*&%4%54'.%+&%/&%,%14-4'(1+!!"" (6+-+*(14'17(7,54'.%+,'21-0+!##$$%',+(84-'1%)+49&(729+!"#$%&$'()*+!,$-.:
;9%&%+% ',+49%+)*+!,$-.(!"#$%& -1)+'4,+&%*'/&(*-0<+&' &%'(%<+',+49%+)*+!,$-.(/#"01"-'2"
34%&$/$"&
/#%+(5%#*67
Proceso por el cual se obtienen una serie de muestras a partir de una señal continua. El tiempo de adquisición entre muestras se conoce como periodo de muestreo (su
inversa es la frecuencia de muestreo); en la mayor parte de las aplicaciones este tiempo
es constante.
Conversión Analógico-Digital. Muestreo
Procesado Digital de Señales, 4º Ingeniería Electrónica, E.T.S.E
Universitat de València, Profesor Emilio Soria
1.6. Teorema de Muestreo
Eleccion de Fs Para ello necesitamos tener informacion sobre el
contenido frecuencial de la senal a muestrear. Ej: Voz < 4KHz,
TV < 5MHz, ... Ası, si conocemos esa Fmax podemos escoger una
Fs adecuada (no aliasing) ! Fs > 2 " Fmax
Recuperacion Una senal muestreada correctamente (Fs > 2 "Fmax) podra ser recuperada sin perdida de informacion mediante un
interpolador (conversor D/A). La formula de interpolacion ideal
o “apropiada” se especifica mediante el Teorema de Muestreo
de Nyquist.
Teorema De Muestreo De Nyquist. Si la frecuencia mas alta
contenida en una senal analogica xa(t) es Fmax = B y la senal se
muestrea a una velocidad Fs > 2 " Fmax # 2B, entonces xa(t) se
puede recuperar totalmente a partir de sus muestras mediante la
siguiente funcion de interpolacion:
g(t) =sin(2!Bt)
2!Bt.
Ası, xa(t) se puede expresar como:
xa(t) =$!
n=%$xa
"n
Fs
#g
"t% n
Fs
#
donde xa(n/Fs) = xa(nT ) # x(n) son las muestras de xa(t).
Caso lımite: Cuando la senal se muestrea a la frecuencia (o tasa)
mınima Fs = 2B, la formula de reconstruccion es:
xa(t) =$!
n=%$xa
$ n
2B
% sin(2!B(t% n/2B))
2!B(t% n/2B)
15
Frecuencia de NyquistFN=2B
MUESTREO. UN EJEMPLO SENCILLO
!
" =R
2b+1
!
y(t) = A " cos w " t( )
!
y(n "T) = A " cos w " n "T( )[ ]# y(n) = A " cosw " n
fm
$
% &
'
( )
!
y(n) = A " cos 2 " # "fs " n
fm
$
% &
'
( )
!
y(n) = A " cos 2 " # "fs " n
fm
$
% &
'
( ) = A " cos 2 " # "
f s " n
fm± 2 " k " #
$
% &
'
( )
!
y(n) = A " cos 2 " # "fs " n
fm±2 " k " n " fm " #
fm
$
% &
'
( )
!
y(n) = A " cos 2 " # "f s ± k " fm( ) " n
fm
$
% &
'
( )
A nivel digital las frecuencias
f y f±k!fm
son indistinguibles
!
y(n) = A " cos 2 " # "fs " n
fm
$
% &
'
( )
!
y(n) = A " cos 2 " # "f s
fm
$
% &
'
( ) " n
$
% &
'
( )
Fdigital =f s
fm*+ = 2 " # " Fdigital
y(n) = A " cos +" n( )
!
y1(n) = A " cos #" n( )
y2(n) = A " cos #+ 2 " $( ) " n( )
y1(n) = y
2(n)
!
y1(n) = A " cos #" n( )
y2(n) = A " cos 2 " $ %#( ) " n( ) = A " cos % #( ) " n( )
y1(n) = y
2(n)
!
y(n) = A " cos 2 " # "fs " n
fm
$
% &
'
( )
!
y(n) = A " cos 2 " # "f s
fm
$
% &
'
( ) " n
$
% &
'
( )
Fdigital =f s
fm*+ = 2 " # " Fdigital
y(n) = A " cos +" n( )
!
y1(n) = A " cos #" n( )
y2(n) = A " cos #+ 2 " $( ) " n( )
y1(n) = y
2(n)
!
y1(n) = A " cos #" n( )
y2(n) = A " cos 2 " $ %#( ) " n( ) = A " cos % #( ) " n( )
y1(n) = y
2(n)
!
y(n) = A " cos 2 " # "fs " n
fm
$
% &
'
( )
!
y(n) = A " cos 2 " # "f s
fm
$
% &
'
( ) " n
$
% &
'
( )
Fdigital =f s
fm*+ = 2 " # " Fdigital
y(n) = A " cos +" n( )
!
y1(n) = A " cos #" n( )
y2(n) = A " cos #+ 2 " $( ) " n( )
y1(n) = y
2(n)
!
y1(n) = A " cos #" n( )
y2(n) = A " cos 2 " $ %#( ) " n( ) = A " cos % #( ) " n( )
y1(n) = y
2(n)
Las
frecuencias
digitales no
pueden crecer
sin límite!!!
0<!<""0<Fdigital
<1/2
MUESTREO. UN EJEMPLO SENCILLO
Fmuestreo=8000 Hz.Procesado Digital de Señales, 4º Ingeniería Electrónica,
E.T.S.E
Universitat de València, Profesor Emilio Soria
MUESTREO. OTRA DEDUCCIÓN MÁS FORMAL.
Fall 2000 Copyright 1999 ©Andreas Spanias I-3
The Fourier Transform of Periodic Impulses (2)
It can be easily shown that
( )!!"
#"=
"
#"=
#$kk
tjkke
T00
01
!!"!!
( )!S
o!0
......
o!2!
Fall 2000 Copyright 1999 ©Andreas Spanias I-3
The Fourier Transform of Periodic Impulses (2)
It can be easily shown that
( )!!"
#"=
"
#"=
#$kk
tjkke
T00
01
!!"!!
( )!S
o!0
......
o!2!
Fall 2000 Copyright 1999 ©Andreas Spanias I-2
The Fourier Transform of Periodic Impulses
Sampling Issues
The switching function
s t t nTn
( ) ( )= !=!"
"
#!
( )ts
0
T T2 T3 t
......
The frequency spectrum of the periodic impulse can be determined
in terms of the CFS, that is
#"
!"=
=k
tjk
k eSts 0)("
Tdtet
TS
T
T
tjk
k
1)(
12/
2/
0 == $!
! "!
where
Fall 2000 Copyright 1999 ©Andreas Spanias I-2
The Fourier Transform of Periodic Impulses
Sampling Issues
The switching function
s t t nTn
( ) ( )= !=!"
"
#!
( )ts
0
T T2 T3 t
......
The frequency spectrum of the periodic impulse can be determined
in terms of the CFS, that is
#"
!"=
=k
tjk
k eSts 0)("
Tdtet
TS
T
T
tjk
k
1)(
12/
2/
0 == $!
! "!
where
Fall 2000 Copyright 1999 ©Andreas Spanias I-2
The Fourier Transform of Periodic Impulses
Sampling Issues
The switching function
s t t nTn
( ) ( )= !=!"
"
#!
( )ts
0
T T2 T3 t
......
The frequency spectrum of the periodic impulse can be determined
in terms of the CFS, that is
#"
!"=
=k
tjk
k eSts 0)("
Tdtet
TS
T
T
tjk
k
1)(
12/
2/
0 == $!
! "!
where
Procesado Digital de Señales, 4º
Ingeniería Electrónica, E.T.S.E
Universitat de València, Profesor
Emilio Soria
MUESTREO.
Fall 2000 Copyright 1999 ©Andreas Spanias I-9
Derivation of the Sampling Theorem
x t x t s ts( ) ( ) ( )= where s t t nT
n
( ) ( )= != !"
"
# !
#"
!"=
!=n
snTtnTxtx )()()( !
and )(*)(2
1)( ""
#" SXX
s=
( )$%&
'()
!= #"
!"=k
oskX
TX ""!"" *)(
1)(
( )#"
!"=
!=*k
oskX
TX """
1)(
Fall 2000 Copyright 1999 ©Andreas Spanias I-10
Sampling and Periodic Spectra
......
……
t 00
)(tx )(!X
!BB!
... ...
T 2T 3T
......
0
)(txs
0
)(!s
X
!B s!
s!2
s!! B!t
1/T
Importante: SEPARACIÓN ENTRE ESPECTROS....LA CLAVE DEL ALIASING ESTÁ
AHÍ!!!!
Procesado Digital de Señales, 4º Ingeniería Electrónica, E.T.S.E
Universitat de València, Profesor Emilio Soria
MUESTREO.
!N !–!N
Xc( j!)
1
(a)
!s !–!s–2!s 2!s 3!s
–!s–2!s 2!s
2!s
3!s
S( j!)
(b)0
!N !s !–!N
Xs( j!)
1
(c)
T2!
T
(!s – !N)
!s !
Xs( j!)1
(d)
T
(!s – !N)
Figure 4.3 Effect in the frequencydomain of sampling in the time domain.(a) Spectrum of the original signal.(b) Spectrum of the sampling function.(c) Spectrum of the sampled signal with!s > 2!N . (d) Spectrum of thesampled signal with !s < 2!N .
Fro
m D
iscr
ete-
Tim
e Si
gnal
Pro
cess
ing,
2e
by
Op
pen
hei
m,
Sch
afer
, an
d B
uck
©
19
99
-20
00
Pre
nti
ce H
all,
In
c.
MUESTREO DE SEÑALES PASA-BANDA.
Digital Signal Processing in 2700 seconds
Sampling Band-limited Signals
• Consider a 2MHz band-limited signal riding on an 8MHz carrier.
A/DSignal Input
(7-9MHz)
Local oscillator
(10MHz)
1-3MHz
I.F.
Fs > 6MHz
0f (MHz)
97-7-9
• The IF could be extracted by mixing with a local oscillator at 10MHz and
sampled at 6MHz, or could be directly sampled at > 18MHz.
Si aplicamos el teorema de muestreo deberíamos
muestrear a 18 MHz, como mínimo; pero si muestreamos
a 10 MHz .........
Digital Signal Processing in 2700 seconds
Bandpass Sampling Example
• Instead, let’s directly sample the signal at only 10M samples/second.
0f (MHz)
(Fs)(Fs/2)
Original
spectrum
Image
spectrum
105 9731-10 -5
• In this case the Nyquist frequency would be 5MHz, and the original
spectrum is in the range of Fs/2 to Fs, instead of the range DC-Fs/2 (as we
are used to seeing).
• The original spectrum is aliased into the lower half of the frequency band,
reflected about the Nyquist rate of 5MHz, appearing in the frequency
range 3Mhz - 1MHz.
• So, we have successfully sampled the signal using a sampling rate almost
half the ‘officially’ required rate
Obtenemos el espectro “reflejado” entre 1 y 3 MHz. Si
ahora muestreamos la señal original a 6.5 MHz .....
Digital Signal Processing in 2700 seconds
Bandpass Sampling Example (cont)
• What if we sample at only 6.5M samples/second??
f (MHz)
(Fs)(Fs/2)
Original
spectrum
Image
spectra
9.750.5
6.53.252.5 4 6
• This time the original spectrum lies between Fs and 1.5Fs.
• Here, the spectrum is reflected about the sampling rate, to appear in the
range from Fs/2 to Fs, spanning 6MHz - 4MHz.
• It is then reflected a second time about Fs/2, finally appearing in the lower
half of the sampled frequency range between 0.5MHz and 2.5MHz.
Can we sample at an even lower rate and still get a unique spectrum??
Se obtiene el espectro de la señal original entre 0.5 y 2.5
MHz!!!!. Mediante operaciones de filtrado y modulación
podríamos obtener la señal original.
Las señales vistas hasta ahora se conocen como señales en banda base; el espectro de la señales esta centrado en el origen. Seguidamente se analizarán señales en lo que esto no ocurre, estas señales se conocen como pasa-banda.
En general, si se tiene una señal con un ancho de
banda B; con frecuencias límites fH y fL B=fH -fL
con Q=fH/B y n entero con n!Q la frecuencia de
muestreo fs debe cumplir los siguientes limites.
CUANTIZACIÓN.
!"#"$%"&'()'*++, -.-/'00+01'2343%56'!34756'8&9:"$$374 .0;(
!"#$%&'()*(+,-,%#.(/,-0#.1< ="'>366'?"$:&3@"'&"A&"$"7%5%397'9B'?343%56'$34756$)'%C"3&'#573AD65%397'57?'$9#"'D$"BD6'?343%56'$34756$;'231%(34(%",1("#1(#.'8(7&&0(839&'&5(,0(:;:!(<)=>*(/,-0#.1(?(/61%&@1(A#05('&$&#%&5("&'&(43'(8309&0,&08&BC,%"(13@&(@,03'(5,44&'&08&1D
< :E#@$.&()D>
+;EFG(((
+;FG+((+
+;H*G(+(
+;G++(++
+;0FG+((
+;*G++(+
+;(*G++(
+;++++++
I574"'9B'J75694'
K7AD%$'L5AA374'%9'
MC3$'2343%56'/9?"'NOP
QD57%3R5%397'
."S"6'NOP
2343%56'
/9?"
+H*G;++++;+ !" !
(EFG;++H*G;+ !" !
0(*G;+(EFG;+ !" !
,0FG;+0(*G;+ !" !
GH*G;+,0FG;+ !" !
HEFG;+GH*G;+ !" !
E(*G;+HEFG;+ !" !
+++;(E(*G;+ "" !
0T@3%'$34756'37'%C"'&574"'+'O'%9'(O
+(+
((+
+++
++(
+((
(++
((+(((
(++
+(+
!"#"$%"&'()'*++, -.-/'00+01'2343%56'!34756'8&9:"$$374 .0;*
< ="'D$D566U'A69%'%C"'VD57%3R5%397 6"S"6'N&5%C"&'%C57'?343%56':9?"P'%9'
&"A&"$"7%'%C"'?343%56'$34756;'
< =C"7'%C"'$%"#'A69%$'B9&'%C"'?343%56'$34756$'4"%'%99':6D%%"&"?)'D$D566U'%C"3&'
"7S"69A"'3$'A69%%"?;
F,-G'&()D<
!"#"$%"&'()'*++, -.-/'00+01'2343%56'!34756'8&9:"$$374 .0;(
!"#$%&'()*(+,-,%#.(/,-0#.1< ="'>366'?"$:&3@"'&"A&"$"7%5%397'9B'?343%56'$34756$)'%C"3&'#573AD65%397'57?'$9#"'D$"BD6'?343%56'$34756$;'231%(34(%",1("#1(#.'8(7&&0(839&'&5(,0(:;:!(<)=>*(/,-0#.1(?(/61%&@1(A#05('&$&#%&5("&'&(43'(8309&0,&08&BC,%"(13@&(@,03'(5,44&'&08&1D
< :E#@$.&()D>
+;EFG(((
+;FG+((+
+;H*G(+(
+;G++(++
+;0FG+((
+;*G++(+
+;(*G++(
+;++++++
I574"'9B'J75694'
K7AD%$'L5AA374'%9'
MC3$'2343%56'/9?"'NOP
QD57%3R5%397'
."S"6'NOP
2343%56'
/9?"
+H*G;++++;+ !" !
(EFG;++H*G;+ !" !
0(*G;+(EFG;+ !" !
,0FG;+0(*G;+ !" !
GH*G;+,0FG;+ !" !
HEFG;+GH*G;+ !" !
E(*G;+HEFG;+ !" !
+++;(E(*G;+ "" !
0T@3%'$34756'37'%C"'&574"'+'O'%9'(O
+(+
((+
+++
++(
+((
(++
((+(((
(++
+(+
!"#"$%"&'()'*++, -.-/'00+01'2343%56'!34756'8&9:"$$374 .0;*
< ="'D$D566U'A69%'%C"'VD57%3R5%397 6"S"6'N&5%C"&'%C57'?343%56':9?"P'%9'
&"A&"$"7%'%C"'?343%56'$34756;'
< =C"7'%C"'$%"#'A69%$'B9&'%C"'?343%56'$34756$'4"%'%99':6D%%"&"?)'D$D566U'%C"3&'
"7S"69A"'3$'A69%%"?;
F,-G'&()D<
Despues de muestrear se hace necesario cuantizar la señal,
estamos en un mundo discreto!!!!
CUANTIZACIÓN.
Se puede cuantizar redondeando (hacemos corresponder el nivel
más cercano) o por truncamiento (hacemos corresponder el nivel
inferior)
thedigital signal processing(DSP) system where thedesired DSP algorithm isperformed. Depending
on the application, the output of the DSP system can be used directly in digital form or converted
back to an analog signal by a digital-to-analog converter (D/A). A digital filtering application may
produce an analog signal as its output, whereas a speech recognition system may pass the digital
output of the DSP system to a computer system for further processing. This section will describe
basic converter terminology and a sample of common architectures for both conventional Nyquist
rate converters and oversampled delta-sigma converters.
5.2 Fundamentals of A/D and D/A Conversion
The analog signal can be given as either a voltage signal or current signal, depending on the signal
source. Figure 5.2 shows the ideal transfer characteristics for a 3-bit A/D conversion. The output of
FIGURE 5.2: Ideal transfer characteristics for an A/D converter.
the converter is an n-bit digital code given as,
D = Asig
FS= bn
2n+ bn!12n!1 + . . . + b1
21(5.1)
where Asig is the analog signal, FS is the analog full scale level, and bn is a digital value of either
0 or 1. As shown in the figure, each digital code represents a quantized analog level. The width
of the quantized region is one least-significant bit (LSB) and the ideal response line passes through
the center of each quantized region. The converse D/A operation can be represented as viewing the
digital code in Fig. 5.2 as the input and the analog signal as the output. An n-bit D/A converter
transfer equation is given as
Asig = FS
!
bn
2n+ bn!12n!1 + . . . + b1
21
"
(5.2)
whereAsig is the analog output signal, FS is the analog full scale level and bn is a binary coefficient.
The resolution of a converter is defined as the smallest distinct change that can be resolved (pro-
c"1999 by CRC Press LLC
DefinicionesNiveles de cuantización: son los niveles
digitales
Rango dinámico (RD): Es la diferencia entre los valores máximo y mínimo de
x(n); no confundir con el rango del cuantificador (R)!!!!!!. Cuando se
sobrepasa el rango del conversor se tiene el ruido de sobrecarga.
Resolución: tamaño del escalón entre niveles digitales (b es el número de bits)
Rango de escala completa (FSR): Cuantificador para señales bipolares.
Escala completa (FS): Cuantificador para señales unipolares.
!
" =R
2b#1
!
y(t) = A " cos w " t( )
!
y(n "T) = A " cos w " n "T( )[ ]# y(n) = A " cosw " n
fm
$
% &
'
( )
!
y(n) = A " cos 2 " # "fs " n
fm
$
% &
'
( )
!
y(n) = A " cos 2 " # "fs " n
fm
$
% &
'
( ) = A " cos 2 " # "
f s " n
fm± 2 " k " #
$
% &
'
( )
!
y(n) = A " cos 2 " # "fs " n
fm±2 " k " n " fm " #
fm
$
% &
'
( )
!
y(n) = A " cos 2 " # "f s ± k " fm( ) " n
fm
$
% &
'
( )
CUANTIZACIÓN.
0 50 100 150 n
1
–1
0
0 50 100 150 n
1
–1
0
0 50 100 150 n
0.2
–0.2
0
0 50
! 10–3
100 150 n
5
–5
0
(a)
(b)
(c)
(d)
Figure 4.51 Example of quantization noise. (a) Unquantized samples of the signalx[n] = 0.99 cos(n/10). (b) Quantized samples of the cosine waveform in part(a) with a 3-bit quantizer. (c) Quantization error sequence for 3-bit quantization ofthe signal in (a). (d) Quantization error sequence for 8-bit quantization of thesignal in (a).
From Discrete-Time Signal Processing, 2e
by Oppenheim, Schafer, and Buck
©1999-2000 Prentice Hall, Inc.
Al cuantizar se comete un error conocido, evidentemente, como
error de cuantización, que es IRREVERSIBLE. Se introduce
“ruido” a la señalconocido como ruido de
cuantización.
x [n] x [n] = Q(x [n])
x [n] = x [n] + e [n]x [n]
e [n]
+
QuantizerQ(•)
Figure 4.50 Additive noise model forquantizer.
From Discrete-Time Signal Processing, 2e
by Oppenheim, Schafer, and Buck
©1999-2000 Prentice Hall, Inc.
Modelo para la cuantizacion
!
" =R
2b+1
!
y(t) = A " cos w " t( )
!
y(n "T) = A " cos w " n "T( )[ ]# y(n) = A " cosw " n
fm
$
% &
'
( )
!
y(n) = A " cos 2 " # "fs " n
fm
$
% &
'
( )
!
y(n) = A " cos 2 " # "fs " n
fm
$
% &
'
( ) = A " cos 2 " # "
f s " n
fm± 2 " k " #
$
% &
'
( )
!
y(n) = A " cos 2 " # "fs " n
fm±2 " k " n " fm " #
fm
$
% &
'
( )
!
y(n) = A " cos 2 " # "f s ± k " fm( ) " n
fm
$
% &
'
( )
!
SNRQ =10 " logPseñal
Pruido
#
$ %
&
' ( = 6.02 " b +1.25 ) 6 " b Regla de
los 6 dBb=número de bits del conversor
CUANTIZACIÓN. ERRORES
duced) at an analog input (output) for an A/D (D/A) converter. This can be expressed as
!Asig = FS
2N(5.3)
where!Asig is the smallest reproducible analog signal for an N -bit converter with full scale analog
signal of FS.
Theaccuracyofa converter, often referred to also asrelativeaccuracy, is theworst-caseerror between
the actual and the ideal converter output after gain and offset errors are removed [1]. This can be
quantified as the number of equivalent bits of resolution or as a fraction of an LSB.
The conversion rate specifies the rate at which a digital code (analog signal) can be accurately
converted into an analogsignal (digital code). Accuracy is often expressed as a function of conversion
rate and the two are closely linked. The conversion rate is often an underlying factor in choosing the
converter architecture. The speed and accuracyof analog components are a limiting factor. Sensitive
analogoperations can either be done in parallel, at the expense of accuracy, or cyclicly reused to allow
high accuracywith lower conversion speeds.
5.2.1 Nonideal A/D and D/A Converters
Actual A/D and D/A converters exhibit deviations from the ideal characteristics shown in Fig. 5.2.
Integration of a complete converter on a single monolithic circuit or as a macro within a very large
scale integration (VLSI) DSP system presents formidable design challenges. Converter architectures
and design trade-offs are most often dictated by the fabrication process and available device types.
Device parameters such as voltage threshold, physical dimensions, etc. vary across a semiconductor
die. These variations can manifest themselves into errors. The following terms are used to describe
converter nonideal behavior:
1. Offset error, described in Fig. 5.3, is a d.c. error between the actual responsewith the ideal
response. This can usually be removed by trimming techniques.
FIGURE 5.3: Offset error.
2. Gain error is defined asan error in the slopeof the transfer characteristic shown in Fig. 5.4,
which can also usually be removed by trimming techniques.
c!1999 by CRC Press LLC
Error de
offset
FIGURE 5.4: Gain error.
3. Integral nonlinearity is the measure of worst-case deviation from an ideal line drawn
between the full scale analog signal and zero. This is shown in Fig. 5.5 as a monotonic
nonlinearity.
FIGURE 5.5: Monotonic nonlinearity.
4. Differential nonlinearity is the measure of nonuniform step sizes between adjacent steps
in a converter. This is usually specified as a fraction of an LSB.
5. Monotonicity in a converter specifies that theoutput will increasewith an increasinginput.
Certain converter architecturescan guaranteemonotonicityfor a specified number ofbits
of resolution. Anonmonotonic transfer characteristic is detailed in Fig. 5.6.
6. Settling time for D/Aconverters refers to the time taken from a change of the digital code
to the point at which the analog output settles within some tolerance around the final
value.
c!1999 by CRC Press LLC
Error de
ganancia
FIGURE 5.4: Gain error.
3. Integral nonlinearity is the measure of worst-case deviation from an ideal line drawn
between the full scale analog signal and zero. This is shown in Fig. 5.5 as a monotonic
nonlinearity.
FIGURE 5.5: Monotonic nonlinearity.
4. Differential nonlinearity is the measure of nonuniform step sizes between adjacent steps
in a converter. This is usually specified as a fraction of an LSB.
5. Monotonicity in a converter specifies that theoutput will increasewith an increasinginput.
Certain converter architecturescan guaranteemonotonicityfor a specified number ofbits
of resolution. Anonmonotonic transfer characteristic is detailed in Fig. 5.6.
6. Settling time for D/Aconverters refers to the time taken from a change of the digital code
to the point at which the analog output settles within some tolerance around the final
value.
c!1999 by CRC Press LLC
Error de no-
linealidad
FIGURE 5.6: Nonmonotonic nonlinearity.
7. Glitches can occur during changes in the output at major transitions, i.e., at 1 MSB, 1/2
MSB, 1/4MSB.During large changes, switching time delays between internal signal paths
can cause a spike in the output.
The choice of converter architecture can greatly affect the relative weight of each of these errors.
Data converters are often designed for low cost implementation in standard digital processes, i.e.,
digital CMOS, which often do not have well-controlled resistors or capacitors. Absolute values of
these devices can vary by as much as ± 20% under typical process tolerances. Post-fabrication
trimming techniques can be used to compensate for process variations, but at the expense of added
cost and complexity to themanufacturingprocess. Aswill be shown, variousarchitectural techniques
can be used to allow high speed or highly accurate data conversion with such variations of process
parameters.
5.3 Digital-to-Analog Converter Architecture
The digital-to-analog (D/A) converter, also known as a DAC, decodes a digital word into a discrete
analog level. Depending on the application, this can be either a voltage or current. Figure 5.7 shows
a high level block diagram of a D/Aconverter. Abinaryword is latched and decoded and drives a set
of switches that control a scaling network. A basic analog scaling network can be based on voltage
scaling, current scaling, or charge scaling [1, 2]. The scaling network scales the appropriate analog
level from the analog reference circuit and applies it to the output driver. A simple serial string of
identical resistors between a reference voltage and ground can be used as a voltage scaling network.
Switches can be used to tap voltages off the resistors and apply them to the output driver. Current
scaling approaches are based on switched scaled current sources. Charge scaling is achieved by
applying a reference voltage to a capacitor divider using scaled capacitorswhere the total capacitance
value is determined by the digital code [1]. Choice of the architecture depends on the available
components in the target technology, conversion rate, and resolution. Detailed description of these
trade-offs and designs can be found in the references [1]–[5].
c!1999 by CRC Press LLC
Error de no-linealidad
+
función no creciente
CUANTIZACIÓN NO UNIFORME.
+
En algunas aplicaciones conviene utilizar un cuantificador
no uniforme en el que los escalones digitales no tienen
una separación constante; de esta forma el error de
cuantización máximo es diferente según el valor de la
señal de entrada
Mu-law u=255;EEUU y Japón.
A-law A=87.56;Europa.
CODIFICACIÓN.
Una vez que se tienen los
diferentes niveles de
cuantificación tenemos que
codificar cada uno de esos
niveles.
La codificación dependerá
de la aplicación a
desarrollar así como de los
elementos hardware que se
dispongan.
En algunas aplicaciones
donde estos niveles son
asignados a determinados
símbolos la codificación se
realiza siguiendo criterios
más complejos (entropía).
CONVERSIÓN D/A
El procedimiento inverso al
muestreo, la reconstrucción de
la señal analógica a partir de
sus muestras, consistirá en la
eliminación de todas esas
copias espectrales digitales
mediante el uso de un filtro
paso-bajo ideal.
Como se ha visto el
proceso de muestreo
genera infinitas copias
del espectro de la señal
analógica original.
RECONSTRUCCIÓN.
Fall 2000 Copyright 1999 ©Andreas Spanias I-12
Signal Reconstruction Analytically for !!s=2B
)(sinc)(2
1)( BtdeHth
tj== !
"
"#
!!"
!
)()()(*)( !! ss XHtxth $
%&'
()*
#= +"
#"=n
nTtnTxBttx )()(*)(sinc)( #
+"
#"=
#=,n
nTtBnTxtx ))((sinc)()(
Remark: Note that the reconstruction filter interpolates between the
samples with sinc functions - hence the name interpolation filter.
E s t e reconstructor es ideal; no s e p u e d e implementar
Fall 2000 Copyright 1999 ©Andreas Spanias I-11
Signal Reconstruction using an Ideal Filter
... ...
T 2T 3T
......
0
)(txs
0
)(!s
X
!B s!
s!2
s!! B!t
1/T
......
……
t 00
)(tx )(!X
!BB!
T
T
t
xc( t)
(a)
t
xs( t)
(b)
T
t
xr( t)
(c)
Figure 4.9 Ideal bandlimitedinterpolation.
From Discrete-Time Signal Processing, 2e
by Oppenheim, Schafer, and Buck
©1999-2000 Prentice Hall, Inc.
RECONSTRUCCIÓN.
1.9. Conversion D/A
Conversion D/A. = RECONSTRUCCION + FILTRO SUAVI-
ZADOR.
Muestreo y mantenimiento: En la practica, la conversion D/A
se realiza normalmente combinando un conversor D/A con un cir-
cuito de muestreo y mantenimiento (“sample-and-hold”, S/H) se-
guido de un filtro pasa–baja (suavizado).
Figura 1.11: Operaciones basicas para convertir una senal digital en una
analogica.
Mantenedor de Orden Cero:
x(t) = x(nT ), nT ! t ! (n + 1)T
Mantenedor de Orden Uno:
x(t) = x(nT ) +x(nT )" x((n" 1)T )
T(t" nT ), nT ! t ! (n + 1)T
Interpolador lineal con retardo:
x(t) = x((n" 1)T ) +x(nT )" x((n" 1)T )
T(t" nT ), nT ! t ! (n + 1)T
En t = nT , x(nT ) = x((n"1)T ) y en t = (n+1)T , x((n+1)T ) =
x(nT ) por lo que x(t) tiene un retardo inherente de T segundos al
interpolar la senal verdadera x(t).
27
ALGUNOS COMENTARIOS
A la hora de muestrear una señal SIEMPRE hay que poner un filtro anti-
aliasing ya que se puede conocer a la perfección el contenido espectral de la
señal a muestrear pero no se conoce nada de las posibles interferencias
(ruido). Por ejemplo una señal de 40 KHz no es audible, pero al muestrear a
44 KHz (muestreo en un CD) aparece una componente “alias” de 4 KHz que
sí lo es.........
En el proceso de conversión A/D se modifica la señal original de forma
IRREVERSIBLE, téngase en cuenta el proceso de cuantización, por lo que
siempre habrá una pérdida de información en ese proceso.
Al final del proceso de conversión D/A se suele poner un filtro conocido
como filtro de reconstrucción que se encarga de “suavizar” la señal obtenida
con los diferentes mantenedores.