You are on page 1of 21

Systems for Digital Signal

1 - Introduction
• Educational objectives and reasons
• DSP for mechatronics: a functional perspective
• Course syllabus & references
• Definitions and basic properties of signals and systems
• Why is digital better than analog?
• Overview of DSP technologies

Course objectives
• Mathematical representation of digital signals and systems

• Learning the most important basic algorithms for digital signals

(with a special focus on those for mechatronics applications)

• Introduction to software/hardware platforms for DSP

• Theoretical aspects

• Implementation issues (SW or HW)

DSP and mechatronics
More in general signal and systems!

Theoretical aspects DSP issues

Source: Wikipedia
DSP and mechatronics applications

Automotive Ambient Assisted Measurement instruments

Living (AAL)

Robotics Industrial automation Home appliances

DSP in Mechatronic systems: a
functional perspective
• Digital control
• Digital filtering
• Transforms
• Analog filtering • Parameter estimation
• Feature extractions • D/A conversion
• Amplification
• Optimization • Power Amplification
• A/D conversion
«Embedded» Output signal
Input Signal
Signals Processing conditioning
Sensors conditioning
(MCU, μP, FPGA, & interfacing
& interfacing
Of «external» quantities
(i.e. related to the Signals DSP • Electric valves
environment) • Motors (electric, pneumatic, hydraulic)

of «internal»
quantities (i.e. related Mechanical
to the system) Sensors system Actuators
(gears, axles, …)

Embedded electronic systems are computing systems which are dedicated to

an application domain and located into a technical environment
Syllabus of the course
• Discrete-time signals and systems
• Linear and time-invariant (LTI) systems and properties
• Sampling theory
• A/D and D/A conversion
• Discrete-time Fourier Transform and Z-transform
• LTI structures and FIR/IIR filters
• Discrete Time Fourier Transform and FFT
• Adaptive filters
• [Machine learning basics]
• Basics of computer arithmetics and architectures
• [DSP computational platforms]
• Exercises
Signal definition
• Signal: function generally of time x(t) describing a
physical quantity (e.g. speed, position, temperature…)


Deterministic Stochastic (processes)

They can be described by a function The same phenomenon is described
x(t) which is the repeatable over time by different functions of time, which
share the same statistical properties
(stationary or not)

Types of signalsQuantization &
Continuous Discrete ↓
Continuous continuous-time
analog signals
Sampling → Discrete digital signals
Analog/continuous-time signals Discrete-time/digital signals (sequences)
x(t) -- f: R  R or R Z x(n) -- f: Z  R or Z Z

x(t) x(n)

3 4 5 6 7 t 3 4 5 6 7 n
-6 -5 -4-3 -2 -1 1 2 8 9 10 -8 -7 -6 -5 -4-3 -2 -1 1 2 8 9 10

Overview on A/D Conversion
•The Analog-to-Digital Converters are the interface between the analog and the digital

•Usually the ADCs are the performance bottleneck in processing analog data

•From the functional point of view, ADC consists of three parts:

– Sampling (xs)  analog input voltage values are sampled at equidistant time intervals TADC
– Quantization (xq)  sampled values are mapped to finite precision values
– Coding (xc)  quantized values are binary encoded

Main parameters of an ADC: sampling frequency Fc and number of bits b

Digital signal processing types
Digital signal processing can be off-line or on-line
• Off-line (batch) processing: Signal acquisition from outside world
and processing can occur at distinct times. Suitable if timing is not an
issue (e.g. biomedical signals and photographic image processing)

• On-line (real-time) processing: Signal acquisition and processing

must be finished within a given time, because the result must be
used for immediate purposes (e.g. control systems)

– Serial processing: Each new input sample is processed in a time Tp

and must produce the output sample within the sampling time T (Tp<T)
– Block processing: Each block of N samples is processed in a time Tp
and must produce one or more output samples within a time equal to
block duration NT (Tp<NT)

Real-time systems classifications
Computation Time Time

time Period Deadline

• In real-time systems a certain task should be carried out by a given time

• Hard real-time systems: missing deadline may cause catastrophic
consequences on the environment under control.
Examples: sensory data acquisition, actuator servoing.
• Soft real-time systems: meeting a deadline is desirable for performance
reasons, but missing it does not cause serious damage to the environment
and does not jeopardize correct system behavior.
Examples: command interpreter of the user interface, displaying
messages on the screen.
Definition of system

x(n) T [∙] y(n)=T [x(n)]

• System: mathematical model of a physical phenomenon or item, who

is able to turn input quantities into output quantities through a unique
transformation operator T[∙]

• Depending on the type of I/O signals systems can be:

– Continuous-time (CT) & analog
– Discrete-time (DT) & digital
– Hybrid (uncommon)


x(n) T [∙] y(n)=T [x(n)]

Ideal Delay System y (n) = x(n − nd )

k =M 2
y (n ) = ∑x (n − k )
Moving Average
M 1 + M 2 + 1 k =− M
Accumulator y ( n) = ∑ x(k )
k = −∞

General system properties - 1
• Linearity: a system is linear if the superimposition principle holds, i.e.

T [ax1 (n) + bx2 (n)] = aT [ x1 (n)] + bT [ x2 (n)]

• Shift- (or time-) invariance: a system is time invariant if the output
sequence does not change when the input sequence is shifted in time,
if y (n ) = T [x (n )] ⇒ y (n − no ) = T [x (n − no )] ∀no

• Causality: a system is causal if the output at time n depends only on

the samples at time n or before, i.e. for no<n.
– A special type of causal systems are the memoryless systems, whose output
depends only on the input at time n
– Real-time systems must be causal!
– Offline (batch) processing can be noncausal

General system properties - 2
Stability: a system is stable in a bounded-input/bounded-output
(BIBO) sense if the following condition holds

∀x (⋅) | x (n ) ≤ B ∀n ⇒ ∃B' | y (n ) ≤ B'

Ideal delay y (n) = x(n − nd ) Linear, time-invariant, not always causal
k =M 2 Linear, time-
Moving Average y (n ) = ∑
x (n − k )
1 invariant, not
M 1 + M 2 + 1 k =− M always causal
(depends on M1)
Accumulator y ( n) = ∑ x(k )
k = −∞
Linear, time-invariant, causal

Squarer y (n) = [ x(n)]2 Nonlinear, memoryless

All systems above are stable
Why is digital better than analog?
– Flexibility  parameters can be set or reconfigured
– Robustness  stability (no drifting with temperature or age)
– Predictability  behavior always predicted through
– Performance  better frequency response in amplitude
and phase, controlled accumulation noise
– Development time  systems can be easily reprogrammed
– Known (numerical) precision

– Bandwidth limited by ADCs and DACs sampling rates
– Limited dynamic range
– Round-off and quantization errors
DSP computational requirements
• DSP processing algorithms typically relies on Multiply-And-Accumulate
(MAC) operations

Most DSP algorithms can be

expressed with MAC:

Y = Σ ai * xi

for (i = 1; i < count; i++){

sum += m[i] * n[i]; }

• A general key requirement for performance is parallelism. DSP

technologies can be run both on normal microprocessors and on more
dedicated platforms because of the increment of parallelism.

Overview of DSP technologies
Cost Role of SW/HW on performance
• Single-core μP and high-end microcontrollers (μC) SW HW

• Multi-core μPs or μPs with ASIP/DSP coprocessors SW HW

– DSP processors alone seldom used nowadays

• Field-Programmable Gate Arrays (FPGAs) HW SW

• Field-Programmable Gate Arrays (FPGAs) + μC core SW HW

• Application Specific Integrated Circuits HW


A typical multi-core DSP platform

General μA of
a DSP platform

Texas Instrument

Design options
• At first glance DSP architectures look similar but major differences exist
integration level (on-chip peripherals, memory sizes)
system cost
energy efficiency (power consumption)
ease of software and hardware development
available licensable software

Efficiency Max Performance

Best performance per
Watt / Dollar / Size
 Multi Channel and
 Wireless phones Multi Function App's
 Comm Infrastructure
Lowest Cost  Internet audio players
 Wireless Base-stations
 Digital still cameras  DSL
Control Systems  Modems  Imaging
 Storage Telephony
  Multi-media Servers
 Digital Ctrl Systems  VoIP  Video
References for the course
• A. Oppenheim, R. Schafer, Discrete-Time Signal Processing,
Prentice Hall.

Implementation & Technology

• U. Meyer-Baese, Digital Signal Processing with Field Programmable
Gate Arrays, 2° edition, Springer.

• R. Chassing, DSP Applications using C and the TMS320C6x DSK,