Embedded Signal Processing
Embedded Signal Processing
Embedded Signal Processing
In the above all four applications one thing is common. What is it?
2. To make the output to follow the input, what should we do? Why should I sample
the signal?
o If it is analog signal processing, we need a voltage follower circuit.
o If it is digital signal processing, we need to sample the signal first before
processing.
3. Why we need to sample for digital signal processing?
o Calculator in Mobile, Lucky Number divide by zero !
o Digital Programmable devices like mobile can compute / process only finite
values.
o To convert infinite values in analog to finite values in digital we need ADC.
o ADC includes (Sampling, Quantizing and Encoding)
Sampling
X-axis discretization
o segmenting time
Discrete samples in x-axis (time axis “ x-axis ” )
Quantizing
Y-axis Segmentation
o Rounding sample values into integers [ Eg. 2.2 to 2 ]
Integer Samples in y-axis ( Voltage axis “ y-axis”)
Encoding
Converting integers into binary
o 8/10/12/16-bit binary (Digital)
TO MAKE THE OUTPUT TO FOLLOW THE INPUT, USING DIGITAL PROGRAMMABLE
DEVICES LIKE MOBILE, FIRST STEP IS TO DIGITIZE THE ANALOG SIGNAL FROM
MICROPHONE (ONE DIMENTIONAL(1D) SIGNAL PROCESSING) OR CAMERA (TWO
DIMENTIONAL (2D) SIGNAL PROCESSING)
4. If output should follow the input, how many samples to take? Answer it by looking
at the image below?
From the image it is clear that more the samples, better the quality of
video/image/audio/voice.
There is a standard called Nyquist sampling theorem (Fs>=2Fm)!
Speech is 4kHz, According to Nyquist sampling theorem Fs=8kHz, to play one second
voice! (Standardized for all telephones !)
Audio is 20kHz, Fs=40kHz. Sampling rate is standardized as 44.1kHz (i.e) 44,100
samples need to be processed in one second to reconstruct one second audio !
If we do not follow Nyquist Sampling theorem, reconstruction results in aliasing!
TO RECONSTRUCT ONE SECOND SPEECH FROM MICROPHONE IN LOUD SPEAKER
8000 SAMPLES/SEC NEED TO BE TAKEN. SIMILARLY FOR AUDIO 44,100
SAMPLES/SEC.
5. From the above discussion we understood that, Digital Signal Processor should
take 44,100 samples from microphone, processes it and give back 44,100+
samples to loud speaker after converting back to analog. Isn’t it?
o Yes, the following diagram justifies this statement by taking the voice through
microphone which is analog x(t), converted to digital using ADC x[n], processed
using digital signal processor x[n] * h[n] and giving back the digital values y[n] to
DAC to get the analog output from DAC y(t), which is given to loud speaker.
From the above figures, it is understood that the audio equalizers are multiple band pass
filters of 10-band of frequencies (60,170,310,600,1k,3k,6k,12k,14k,16k)Hz within the
audible range (20Hz-20kHz). From this equalizer, it is clear that digital signal processor is
doing filtering.
Skin instruments produce low frequency music (BASS) which has to be reconstructed
using WOOFERS
String instruments produce high frequency music (TREBLE) which has to be
reconstructed using TWETERS
Human produce mid frequency voice which has to be reconstructed using SQUAKERS
Loud speakers are available as 2.1, 5.1 etc., 2/5 indicates 2/5 speakers, 1 indicates 1
woofer. Woofers are the devices which reconstruct low frequency; speakers are the
devices which reconstructs high frequency.
Note: This is first order analog low pass filter. Number of storage element decides the
order of the filter. Here there is one storage element which is capacitor; hence it is first
order filter. If the order „n‟ increases, performance of the filter increases!
7. What is digital low pass filter?
A digital low pass filter is set of numbers, which does some mathematical operation on
the input set of numbers to give another set of numbers in the output. Digital filter is a set
of numbers.
Note: h[n] values are filter coefficients. Number of coefficients decides the order of the
filter. Here there are two coefficients; hence it is first order digital low pass filter.
Note: The above two filters are first order digital low and high pass filters. Number of
storage element decides the order of the filter. In digital filter the storage element is filter
coefficient. There are two storage elements „h[n]‟. The order of the digital filter is number
of coefficients -1. Therefore 2-1=1. Both the low pass and high pass filters are first order
filters. Increasing the order means increasing the coefficients.
Just by changing the sign of h[n], low pass filter has become high pass filter! Here
without resistors and capacitors it is possible to get the same result using just
h[n]. For h[n] we no need to pay anything! (no need to pay for filter coefficients
(nos.)) This is the secret of digital filters!
Justification1: VLC player is some form of h[n] with graphics user interface (GUI)front
end, which play audio and video. For VLC player we never pay!!!! because of numbers.
Justification2: All the songs are some form of numbers x[n]; while playing, this song
x[n] is convolved with, h[n] ( VLC Player ), produces y[n] which is again a set of numbers,
when given to a loud speaker through DAC (codec) it produces pleasant music. For this
song also; we never pay!!!!
BECAUSE OF DIGITAL
“SONG IS FREE”
AS WELL AS
“VLC PLAYER ” IS ALSO FREE !
2. What is the frequency of the speech signal? For collar mike example, how the
input signal is processed using digital signal processor?
16x16 bit Hardware multiplier, multiplies two 16-bit numbers in hardware directly (not like
conventional repeated addition which takes much time) in one machine cycle to product
32-bit product. Eg. Two 16-bit numbers(0xffff x 0xffff) can be multiplied in one machine
cycle in hardware multiplier, but in conventional multiplication 65536 repeated addition
will happen for one multiplication which takes 65535 machine cycle. From this example it
is clear that, the presence of hardware multiplier saves 65535 machine cycles for every
multiplication. For more than 8000 multiplications/sec. just for speech signal processing;
hardware multiplier saves 8000 x 65535 = 52,42,800 microseconds per second, when
compared with conventional repeated addition. This is extraordinary performance
improvement in speed and is suitable for real time signal processing.
From this example, it is clear that, any processor / controller which has on-chip hardware
MAC unit, performs real time signal processing. Therefore the processing element inside
the digital signal processor is hardware MAC.
To address the opcode in the program memory, dedicated address bus is used,
which is called as PAB (Program Memory Address Bus), To fetch the opcode
from the Program memory, dedicated bus is used, which is called as PB (
Program Data Bus).
To address the coefficient h[n] in program/data memory, dedicated address bus is
used, which is called as CAB ( Coefficient Address Bus), To read the coefficient
from the Program/Data memory, dedicated data bus is used, which is called as
CB ( Coefficient Data Bus).
To address the input data x[n] from data memory, dedicated address bus is used,
which is called as DAB ( Data Address Bus). To read the in data from the Data
memory, dedicated data bus is used, which is called as DB ( Data Bus).
To address the data memory, for storing the convolved output y[n], dedicated
address bus is used, which is called as EAB ( Executed Address Bus), To store
the convolved output fetch the opcode to the Data memory, dedicated data bus is
used, which is called as EB ( Executed Data Bus).
Challenge-3: What is the challenge in storing the content of the MAC output?
Multiplication of two 16-bit numbers result in 32-bit number. For successive multiplication
and addition, the Accumulator (result register) size must be larger to prevent overflow.
Solution-3: There are two 40-bit accumulators, with lower order 16-bit, higher order
16-bit and 8-Guard bits, which can manage 255, 32-bit overflows!!!!