Signals and System: Basics DR - Suja P
Signals and System: Basics DR - Suja P
Basics
Dr.Suja P.
1
Signals
• Information or data that varies with time.
– Time is the independent variable that we’ll deal with in
electrical engineering.
• Examples:
– TV signal, radio signal, mp3
– Electrical signals (voltages and currents)
– Acoustic signals (both analog and digital)
– Video signals
• Variation in the intensity of a color
– Biological signals
• DNA sequence
– Economic signals – stock prices
2
SIGNALS
Signals are functions of independent variables that carry
information. For example:
• Electrical signals --- voltages and currents in a circuit
• Acoustic signals --- audio or speech signals (analog or
digital)
Spectrogram
Time-domain
Speech signal
3
SIGNALS
• Video signals --- intensity variations in an image (e.g. a
CAT scan)
Its signal
representation
4
Signal
• What is a signal
• A description of how one parameter is related
to another parameter
• Examples
– The voltage varies with time
v
5
Signal
– The Speech Signal
6
• For many cases, x[n] is obtained by
sampling x(t) as:
• x[n] = x(nT) , n =0,+1,+2,…
7
Classification of signals (cont.)
Signal
– The image
8
Signal
– The image
9
Signal
• It is the variation pattern that conveys the information, in a
signal
11
THE INDEPENDENT VARIABLES
• For electrical signal the value of voltage or current changes with time,
hence time is called independent variable and voltage or current is
called dependent variable
12
THE INDEPENDENT VARIABLES
What are the independent variables in these signals?
(i) Speech (ii) CAT scan image (iii) DNA sequence
(i) Time (ii) Spatial Location (iii) Location on DNA molecule
13
Mathematical Representation
– The image is a function of two spatial variables
14
Continuous-time signals
• A value of signal exists at every instant of time
Voltage, current, pressure, temperature,
velocity…
Independent variable
Independent variable
15
Discrete-time signals
• The value of signal exists only at equally
spaced discrete points in time
• DNA base sequence.
• Population of the nth generation of a certain
species
Independent variable
Independent variable
16
Discrete-time signals
• Why to discretize
• How to discretize
– How closely spaced are the samples
• Distinction between discrete & digital signals
• How to denote discrete signals
• Is the image a discrete or continuous signal
– The image is generally considered to be a continuous
variable
– Sampling can however be used to obtain a discrete, two
dimensional signal (sampled image)
17
Human-made DT signals
• Why do we like digital signals?
Why DT?
Can be processed by modern digital computers and digital
signal processors (DSPs).
18
Limitations of Analog Signal Processing
• Accuracy limitations due to
– Component tolerances
– Undesired nonlinearities
• Limited repeatability due to
– Tolerances
– Changes in environmental conditions
• Temperature
• Vibration
• Sensitivity to electrical noise
• Limited dynamic range for voltage and currents
• Inflexibility to changes
• Difficulty of implementing certain operations
– Nonlinear operations
– Time-varying operations
• Difficulty of storing information
19
Notation
• A continuous-time signal is represented by
enclosing the independent variable (time) in
parentheses ()
20
• Most of the signals in the physical world are CT signals—E.g.
voltage & current, pressure, temperature, velocity, etc.
• Most real-world signals are analog
– They are continuous in time and amplitude
– Convert to voltage or currents using sensors and transducers
• Analog circuits process these signals using
– Resistors, Capacitors, Inductors, Amplifiers,…
• Analog signal processing examples
– Audio processing in FM radios
– Video processing in traditional TV sets
21
Continuous & Discrete-Time Mathematical Models of
Systems
• Continuous-Time
Systems
• Most continuous time systems
represent how continuous signals
are transformed via differential
equations. First order differential equations
• E.g. circuit, car velocity
• Discrete-Time Systems
• Most discrete time systems
represent how discrete signals are
transformed via difference
equations
• E.g. bank account, discrete car
velocity system
First order difference equations
22
System
• An entity that responds to a signal
Shows inter-relations of many signals involved in the implementation of a complex
system
• Examples
– Circuit
23
How is a System Represented?
• A system takes a signal as an input and transforms it
into another signal
24
Examples of Systems
– The camera
Image
Identified
25
EXAMPLES OF SYSTEMS
•An RLC circuit
26
EXAMPLES OF SYSTEMS
•Dynamics of an aircraft or space vehicle
•An algorithm for analyzing financial and economic factors to predict bond
prices
•An algorithm for post-flight analysis of a space launch
•An edge detection algorithm for medical images
What are the inputs and what are the outputs in above examples?
27
Examples of Systems
• An RLC circuit
28
System Interconnections
• Doing stuff to inputs to produce outputs.
– Transformations, shifting, scaling, inverting
29
Signal Properties
• On this course, we shall be particularly interested in signals with certain
properties:
• Periodic signals: a signal is periodic if it repeats itself after a fixed period
T, i.e. x(t) = x(t+T) for all t. A sin(t) signal is periodic.
• Even and odd signals: a signal is even if x(t) = x(-t) (i.e. it can be reflected
in the axis at zero). A signal is odd if -x(t) = x(-t). Examples are cos(t) and
sin(t) signals, respectively.
• Exponential and sinusoidal signals: a signal is (real) exponential if it can
be represented as x(t) = Ceat. A signal is (complex) exponential if it can be
represented in the same form but C and a are complex numbers.
• Step and pulse signals: A pulse signal is one which is nearly completely
zero, apart from a short spike, d(t). A step signal is zero up to a certain
time, and then a constant value after that time, u(t).
• These properties define a large class of tractable, useful signals and will
be further considered in the coming lectures
30
Properties of a System
• Causal: a system is causal if the output at a time,
only depends on input values up to that time.
• Linear: a system is linear if the output of the scaled
sum of two input signals is the equivalent scaled
sum of outputs
• Time-invariance: a system is time invariant if the
system’s output is the same, given the same input
signal, regardless of time.
• These properties define a large class of tractable,
useful systems and will be further considered in
the coming lectures
31
How Are Signal & Systems Related (i)?
• How to design a system to process a signal in particular ways?
• Design a system to restore or enhance a particular signal
– Remove high frequency background communication noise
– Enhance noisy images from spacecraft
35
Digital Signal Processing
• Represent signals by a sequence of numbers
– Sampling or analog-to-digital conversions
• Perform processing on these numbers with a digital processor
– Digital signal processing
• Reconstruct analog signal from processed numbers
– Reconstruction or digital-to-analog conversion
digital digital
analog signal signal analog
signal
A/D DSP D/A signal
38
It sounds simple,
but something does not fit in
What is it?
x(0) = 255
x(1) = 255
x(2) = 128
x(3) = 128
x(4) = 255
x(5) = 255
x(n)= [ 255,255,128,128,255,255]
40
DSP is Everywhere
• Sound applications
– Compression, enhancement, special effects, synthesis, recognition, echo cancellation,…
– Cell Phones, MP3 Players, Movies, Dictation, Text-to-speech,…
• Communication
– Modulation, coding, detection, equalization, echo cancellation,…
– Cell Phones, dial-up modem, DSL modem, Satellite Receiver,…
• Automotive
– ABS, GPS, Active Noise Cancellation, Cruise Control, Parking,…
• Medical
– Magnetic Resonance, Tomography, Electrocardiogram,…
• Military
– Radar, Sonar, Space photographs, remote sensing,…
• Image and Video Applications
– DVD, JPEG, Movie special effects, video conferencing,…
• Mechanical
– Motor control, process control, oil and mineral prospecting,…
41
Pros and Cons of Digital Signal Processing
• Pros
– Accuracy can be controlled by choosing word length
– Repeatable
– Sensitivity to electrical noise is minimal
– Dynamic range can be controlled using floating point numbers
– Flexibility can be achieved with software implementations
– Non-linear and time-varying operations are easier to implement
– Digital storage is cheap
– Digital information can be encrypted for security
– Price/performance and reduced time-to-market
• Cons
– Sampling causes loss of information
– A/D and D/A requires mixed-signal hardware
– Limited speed of processors
– Quantization and round-off errors
42
What Is the Signal Processing Toolbox?
43
Differences between Frequency Domain and
Time Domain
• The time-domain representation gives the amplitudes of the signal at
the instants of time during which it was sampled. However, in many
cases you need to know the frequency content of a signal rather than
the amplitudes of the individual samples.
• Fourier's theorem states that any waveform in the time domain can be
represented by the weighted sum of sines and cosines. The same
waveform then can be represented in the frequency domain as a pair of
amplitude and phase values at each component frequency.
• You can generate any waveform by adding sine waves, each with a
particular amplitude and phase. The following figure shows the original
waveform, labeled sum, and its component frequencies. The
fundamental frequency is shown at the frequency f0, the second
harmonic at frequency 2f0, and the third harmonic at frequency 3f0.
44
In the frequency domain, you
can separate conceptually the
sine waves that add to form the
complex time-domain signal. The
amplitude of each frequency line
is the amplitude of the time
waveform for that frequency
component. The representation
of a signal in terms of its
individual frequency
components is the frequency-
domain representation of the
signal. The frequency-domain
representation might provide
more insight about the signal
and the system from which it
was generated
45
View the difference
46
Signal synthesis
47
Classification of signals
• 1. CT and DT signals:
48
Classification of signals
• Analog Signal and Digital Signal
49
2. Even and odd signals:
Even:
x(t) = x(-t)
x[n] = x[-n]
Odd:
x(t) = −x(-t)
x[n] = −x[-n]
52
• Energy and power signals:
• CT signal x(t):
Energy: E =
Power: P =
53
• DT signal x[n]:
• Energy: E =
• Power:
54
Basic Sequences and Operations
0
-10 -5 0 5 10
1.5
0
-10 -5 0 5 10
1
0.5
• Exponential sequences 0
-10 -5 0 5 10
55
Lecture 1: Summary
• Signals and systems are pervasive in modern engineering
courses:
– Electrical circuits
– Physical models and control systems
– Digital media (music, voice, photos, video)
• https://www.youtube.com/watch?v=s8rsR_TStaA
• https://www.youtube.com/watch?v=up55tuwestg
• https://www.youtube.com/watch?v=M3DLpradBNE
58
Sampling
Basics
59
• A digital signal is superior to an analog signal
because it is more robust to noise and can
easily be recovered, corrected and amplified.
For this reason, the tendency is to change an
analog signal to digital data.
60
Why is Sampling Important?
• For many systems (e.g. Matlab, …) designing and
processing discrete-time systems is more efficient and
more general compared to performing continuous-time
system design.
– How does Simulink perform continuous-time system simulation?
– The signals are sampled and the systems are approximately
integrated in discrete time
61
What is Discrete Time Sampling?
• Sampling a continuous function
62
What is Discrete Time Sampling?
• Sampling is the transformation of a continuous signal into
a discrete signal
x(t), T is the sampling
x[n] period
t=nT
• Widely applied in digital analysis systems
x(t) Discrete x[n] Discrete y[n] Signal y(t)
Time sampler time system reconstruction
x1(t),
x2(t),
x3(t),
x[n]
t=nT
66
Sampling
• Sampling can be done for functions varying in space, time, or
any other dimension, and similar results are obtained in two or
more dimensions.
• The sampling frequency or sampling rate, fs, is the average
number of samples obtained in one second (samples per
second), thus fs= 1/T
• A sample is a value or set of values at a point in time and/or
space
• A sampler is a subsystem or operation that extracts samples
from a continuous signal.
• A theoretical ideal sampler produces samples equivalent to the
instantaneous value of the continuous signal at the desired
points.
67
Sampling
• Analog signal is sampled every TS secs.
• Ts is referred to as the sampling interval.
• fs = 1/Ts is called the sampling rate or sampling
frequency.
• It is the average number of samples obtained in
one second (samples per second)
According to the Nyquist theorem, the
sampling rate must be
at least 2 times the highest frequency
contained in the signal.
4.68
Sampling Theorem
• The sample time for converting a continuous
time signal into a sampled, discrete time signal
is determined by the Nyquist rate, amongst
other things.
• The signal must satisfy the relationship:
70
Definition of Impulse Train Sampling
• We need to have a convenient way in
which to represent the sampling of a CT
signal at regular intervals
• A common/useful way to do this is through
the use of a periodic impulse train signal,
p(t), multiplied by the CT signal
T
– Ts is the sampling period
– ws=2p/T is the sampling
frequency
• This is known as impulse train sampling.
Note xp(t) is still a continuous time signal
71
Under Sampling
• In Undersampling a band pass signal is
sampled slower than its Nyquist rate.
• When one undersamples a bandpass signal,
the samples are indistinguishable from the
samples of a low-frequency samples of the
high-frequency signal.
73
Oversampling
• In Oversampling a signal is sampled faster
than its Nyquist rate.
• Oversampling is used in most modern analog-
to-digital converters to reduce the distortion
or noise effects introduced by practical digital-
to-analog converters.
74
Example 1
For an intuitive example of the Nyquist theorem, let us
sample a simple sine wave at three sampling rates: fs = 4f
(2 times the Nyquist rate), fs = 2f (Nyquist rate), and
fs = f (one-half the Nyquist rate). Figures in the next slide
shows the sampling and the subsequent recovery of the
signal.
76
Example 2
Consider the revolution of a hand of a clock. The second
hand of a clock has a period of 60 s. According to the
Nyquist theorem, we need to sample the hand every 30 s
(Ts = T or fs = 2f ). In Figure 1.a, the sample points, in
order, are 12, 6, 12, 6, 12, and 6. The receiver of the
samples cannot tell if the clock is moving forward or
backward. In part b, we sample at double the Nyquist
rate (every 15 s). The sample points are 12, 3, 6, 9, and
12. The clock is moving forward. In part c, we sample
below the Nyquist rate (Ts = T or fs = f ). The sample points
are 12, 9, 6, 3, and 12. Although the clock is moving
forward, the receiver thinks that the clock is moving
backward.
77
Sampling of a clock with only one hand
78
Quantization
• Sampling results in a series of pulses of varying
amplitude values ranging between two limits: a
min and a max.
• The amplitude values are infinite between the
two limits.
• We need to map the infinite amplitude values
onto a finite set of known values.
• This is achieved by dividing the distance between
min and max into L zones, each of height
= (max - min)/L
4.83
Quantization Levels
4.84
Quantization Zones
• Assume we have a voltage signal with
amplitutes Vmin=-20V and Vmax=+20V.
• We want to use L=8 quantization levels.
• Zone width = (20 - -20)/8 = 5
• The 8 zones are: -20 to -15, -15 to -10, -10
to -5, -5 to 0, 0 to +5, +5 to +10, +10 to +15,
+15 to +20
• The midpoints are: -17.5, -12.5, -7.5, -2.5,
2.5, 7.5, 12.5, 17.5
4.85
Assigning Codes to Zones
• Each zone is then assigned a binary code.
• The number of bits required to encode the zones,
or the number of bits per sample as it is
commonly referred to, is obtained as follows:
nb = log2 L
• Given our example, nb = 3
• The 8 zone (or level) codes are therefore: 000,
001, 010, 011, 100, 101, 110, and 111
• Assigning codes to zones:
– 000 will refer to zone -20 to -15
– 001 to zone -15 to -10, etc.
4.86
Quantization and encoding of a sampled signal
87
Quantization Error
• When a signal is quantized, we introduce an error
- the coded signal is an approximation of the
actual amplitude value.
• The difference between actual and coded value
(midpoint) is referred to as the quantization error.
• The more zones, the smaller which results in
smaller errors.
• But, the more zones the more bits required to
encode the samples -> higher bit rate
88
Convolution
Dr. Suja P.
Significance of Convolution