Signal Processing
Signal Processing
Signal Processing
Digital signal processing (DSP) technology and its advancements have dramatically impacted
our modern society everywhere. Without DSP, we would not have digital/Internet audio or
video; digital recording; CD, DVD, and MP3 players; digital cameras; digital and cellular
telephones; digital satellite and TV; or wire and wireless networks. Medical instruments would
be less efficient or unable to provide useful information for precise diagnoses if there were no
digital electrocardiography (ECG) analyzers or digital x-rays and medical image systems. We
would also live in many less efficient ways, since we would not be equipped with voice
recognition systems, speech synthesis systems, and image and video editing systems. Without
DSP, scientists, engineers, and technologists would have no powerful tools to analyze and
visualize data and perform their design, and so on.
The concept of DSP is illustrated by the simplified block diagram in Figure 1.1, which consists
of an analog filter, an analog-to-digital conversion (ADC) unit, a digital signal (DS) processor,
a digital-to-analog conversion (DAC) unit, and a reconstruction (anti-image) filter.
As shown in the diagram, the analog input signal, which is continuous in time and amplitude,
is generally encountered in our real life. Examples of such analog signals include current,
voltage, temperature, pressure, and light intensity. Usually a transducer (sensor) is used to
convert the nonelectrical signal to the analog electrical signal (voltage). This analog signal is
fed to an analog filter, which is applied to limit the frequency range of analog signals prior to
the sampling process. The purpose of filtering is to significantly attenuate aliasing distortion,
which will be explained in the next chapter. The band-limited signal at the output of the analog
filter is then sampled and converted via the ADC unit into the digital signal, which is discrete
both in time and in amplitude. The DS processor then accepts the digital signal and processes
the digital data according to DSP rules such as lowpass, highpass, and bandpass digital filtering,
or other algorithms for different applications. Notice that the DS processor unit is a special type
of digital computer and can be a general-purpose digital computer, a microprocessor, or an
advanced microcontroller; furthermore, DSP rules can be implemented using software in
general. With the DS processor and corresponding software, a processed digital output signal
is generated. This signal behaves in a manner according to the specific algorithm used. The
next block in Figure 1.1, the DAC unit, converts the processed digital signal to an analog output
signal. As shown, the signal is continuous in time and discrete in amplitude. The final block in Figure
1.1 is designated as a function to smooth the DAC output voltage levels back to the analog signal via a
reconstruction (anti-image) filter for real-world applications.
In general, the analog signal process does not require software, an algorithm, ADC, and DAC.
The processing relies wholly on electrical and electronic devices such as resistors, capacitors,
transistors, operational amplifiers, and integrated circuits (ICs). DSP systems, on the other
hand, use software, digital processing, and algorithms; thus they have a great deal of flexibility,
less noise interference, and no signal distortion in various applications. However, as shown in
Figure 1.1, DSP systems still require minimum analog processing such as the anti-aliasing and
reconstruction filters, which are musts for converting real-world information into digital form
and digital form back into real-world information. Note that there are many real-world DSP
applications that do not require DAC, such as data acquisition and digital information display,
speech recognition, data encoding, and so on. Similarly, DSP applications that need no ADC
include CD players, text-to-speech synthesis, and digital tone generators, among others. We
will review some of them in the following sections.
Advantages of DSP
1. Physical size of analog systems is quite large while digital processors are more compact and
lighter in weight.
2. Analog systems are less accurate because of component tolerance. example R, L, C and
active components. Digital components are less sensitive to the environmental changes, noise
and disturbances.
3. Digital system is most flexible as software programs & control programs can be easily
modified.
4. Digital signal can be stored on digital hard disk, digital media (like a compact disc) and
manipulated on digital systems (like the integrated circuit in a CD player). Hence becomes
transportable. Thus, easy and lasting storage capacity.
5. Digital processing can be done offline.
6. Mathematical signal processing algorithm can be routinely implemented on digital signal
processing systems. Digital controllers are capable of performing complex computation with
constant accuracy at high speed.
7. Digital signal processing systems are upgradeable since they are software controlled.
8. Possibility of sharing DSP processor between several tasks.
9. For some complex control functions, it is not practically feasible to construct analog
controllers.
10. Single chip microprocessors, controllers and DSP processors are more versatile and
powerful.
The signal as a function of time, can be represented as x(t) or f(t) or any other notation. For
example, f(t) might denote a voltage level, or the velocity of an object, or the price of a stock
at time t.
In some cases, we might be interested in measuring the quantity as a function of some variable
other than time. For example, suppose we are interested in measuring the water temperature in
the ocean as a function of depth. In this case, the signal is a function of a spatial variable, with
f(x) denoting temperature at depth x.
A signal need not be a function of just a single variable. To continue the example above,
suppose we are interested in the temperature at particular points in the ocean, not simply as a
function of depth. In this case, we might let f (x, y, z) denote the temperature at the point (x, y,
z), so the signal is a function of three variables.
Now, if we are also interested in how the temperature evolves in time, the signal f (x, y, z, t)
would be a function of four variables.
Other examples of signals that we will encounter frequently are audio signals, images, and
video.
An audio signal is created by changes in air pressure, and therefore can be represented by a
function of time f(t) with f representing the air pressure due to the sound at time t.
Any signal can be represented by weighted sum of sinusoids of different amplitudes and
frequencies.
The frequency f is in units of Hertz (abbreviated Hz) which is sec-1, or often called cycles per
second. Of course, f and w are related by w = 2pf.
x(t) =
In this example mostly a sinusoid at frequency w2 is dominant, with small contributions from
sinusoids at frequencies w1 and w3. But, it is not obvious by seeing the composite waveform
x(t) represented in the time domain. Therefore, to analyse a signal we have to convert it into a
frequency domain.
Example 1:
Listen to the piano chord. You hear several notes being struck, and fading away. This is
waveform is plotted below:
The time series plot shows the time the chord starts, and its decay, but it is difficult tell what the notes are from
the waveform. If we represent the waveform as a sum of sinusoids at different frequencies, and plot the amplitude
at each frequency, the plot is much simpler to understand.
Example 2:
When a signal (sinewave) is corrupt by large noise signal, in time-domain, it looks a mess. In
frequency-domain, we can clearly see the spectrum occupied by noise and hence design/use
proper filters to filter out the noise and get the original signal back.
Signals can be Continuous or Discrete. Continuous Time signals-CTS are called as analog
signals. Analog signal is represented as x(t). Discrete Time Signals-DTS are called as digital
signals. Digital signal is represented as x(n).
CLASSIFICATION OF SIGNALS
Signal is a function of time. Signal is a variation in some property of the medium used to convey
the data. We have variety of signals, Light, Sound, Electronic, Electromagnetic are a few of
them. Analog signal can be mathematically expressed as x(t) or f(t) and digital signal as x(n)
or f(n) or any other notation, meaning it is the function of time.
Signals can be classified according to various properties. Some of these classifications are:
1. Single channel and Multi-channel signals
2. Single dimensional and Multi-dimensional signals
3. Continuous time and Discrete time signals.
4. Continuous valued and discrete valued signals.
5. Analog and digital signals.
6. Deterministic and Random signals
7. Periodic signal and Non-periodic signal
8. Symmetrical(even) and Anti-Symmetrical(odd) signal
9. Causal and non-causal signals
10. Energy and Power signal
In mathematics, a differential equation is an equation that relates one or more functions and
their derivatives. In applications, the functions generally represent physical quantities, the
derivatives represent their rates of change, and the differential equation defines a relationship
between the two.
A digital signal is a sequence of discrete symbols. If these symbols are zeros and ones, we call
them bits.
Note: DIGITAL signals are called as DISCRETE TIME & DISCRETE
AMPLITUDE/VALUED. By sampling the ANALOG signal at discrete instants of time we
obtain DISCRETE TIME signals and then by quantizing its values to a set of discrete values
& thus generating DISCRETE AMPLITUDE signals.
Sampling process takes place on x axis at regular intervals & quantization process takes place
along y axis. Quantization process is also called as rounding or truncating or approximation
process.
A discrete-time signal is periodic if and only if there exists an integer N0 > 0 such that
If the signal does not satisfy above property called as Non-Periodic signals.
Periodic signals
Non-periodic signals
On the other hand, a non-periodic signal is any signal that does not repeat itself after any period
of time, however large that period may be. Most of the signals we come across in real life are
non-periodic. For example, speech is a non-periodic signal.
xe(n)= cos(ωn) and xo(n)= sin(ωn) are good examples of even & odd signals respectively.
Given an analog signal x(t), we can create even and odd functions as given below:
Given a discrete signal g[n], we can create even and odd functions as given below:
Example:
Same type of decomposition applies for discrete-time signals.
The decomposition into even and odd components depends on the location of the origin.
Shifting the signal changes the decomposition.
Ø Anti-causal signals are non-zero only for t £ 0 (goes backward in time from t = 0)
The signal energy for i(t) is defined as the energy dissipated in a 1W resistor
In most applications, this is not an actual energy (most signals aren't actually applied to 1W
resistor).
The average of the signal energy over time is the signal power
If a sinusoidal signal is sampled with a high sampling rate, the original signal can be recovered
exactly by connecting the samples together in a smooth way.
Fs >= 2 fm (fm is the maximum analog signal frequency).
F=fm
In contrast, if a sinusoidal signal is sampled with a low sampling rate, the samples may be too
infrequent to recover the original signal.
Types of Sampling
There are three types of sampling techniques:
i. Impulse sampling.
ii. Natural sampling.
iii. Flat Top sampling.
Impulse sampling is called ideal sampling. You cannot use this practically because pulse width
cannot be zero and the generation of impulse train is not possible practically.
Proof: Consider a continuous time signal x(t). The spectrum of x(t) is band limited to fm Hz
i.e. the spectrum of x(t) is zero for |ω|>ωm. where ω =2pf.
The output of multiplier is a discrete signal called sampled signal which is represented with
y(t) in the following diagrams
Figure
Before proceeding with the mathematical derivation of the process of sampling, let us see the
fundamentals.
Any periodic signal x(t) may be expanded in a Fourier series. Let the period be T0. Since the
period is T0, we take the fundamental frequency to be ω0=2π/T0.
There are two common forms of the Fourier Series, "Trigonometric" and "Exponential."
Trigonometric
Exponential
T
= 2 22 ∫T22 −TT22δ(t) 2 2
T
aaa
annnn=
==TT2s TT∫∫s −T
δ(t)coscos
∫ −T2δ(t)δ(t)
−T cos cos
nωdts dt
nnωωsnsdt = 2=
ωs=dt =
T
2 2 δ(0) cos nωs20 2=
δ(0) cos
δ(0)
T2 cos
δ(0) nsω0sn0=ω=s 0 T=
cos
nω T2
s s 2 2 T 2 T
2 T T
2 2
T
TT
2 2 ∫22 −TT2 δ(t) sin nωs t dt 2= 2 2 δ(0) sin nωs 0 = 0
bbb ==
bnnnn==Ts TT2∫ss −T 2δ(t)sin
∫22 −T2δ(t)
−T sinsin
δ(t) nnωωsnstω
tdtdtt=dt
=T= δ(0)
δ(0)
sTs
sin
T2s sin
δ(0)nωnsω0sn0=ω=
sin 000= 0
s Ts s
2
[ Aside..
Substitute above
Substitute
Substitute above values
abovevalues in
valuesin equation
in 2.2. 2.
equation
equation
Substitute above values in equation 2.
1 ∞ 2
∴∴ δ(t)
δ(t)===TT1sT11s+
∴ δ(t) ++Σ Σ∞
∞
Σn=1 (( T2s( cos
2 nωs t + 0)
coscos
nωnω
t +t 0)
+ 0)
∴ δ(t) = T + Σn=1 ( T2s cos nsωss t + 0)
s
∞
n=1
n=1 T s T
s s
T T
anan==T2s T∫2 −T∫
2
δ(t)
δ(t)
2
−T coscos
nωs ndtωs=dtT22= 2
δ(0)
T2
δ(0)
cos nωcos nωT2s 0 = T2
s0 =
s
2 2
T
2 T
bn = ∫2 −T2 δ(t) sin nωs t dt = T2 δ(0)2 sin nωs 0 = 0
bn = s T 2∫ −T2 δ(t)
T sin nωs t dt s = T δ(0) sin nωs 0 =0
s s
Aside ends…..] 2
Signals Sampling Theorem - Tutorialspoint 19/02/20, 2:43 PM
In Y(ω)
order =to see
1 the frequency
[X(ω) + X(ω − ωspectrum of y(t), we have to Transform the signal to frequency
s ) + X(ω + ωs ) + X(ω − 2ωs ) + X(ω + 2ωs )+ . . . ]
Ts
domain using
Substitute the
above
Take Fourier Frequency
values
transform Transform
in equation
on both sides. method call Fourier Transform.
2.
1 ∞ 2
∴ δ(t) = T1s + Σn=1 ( Ts cos nωs t + 0)
[Aside….
Y(ω) = T [X(ω) + X(ω − ωs ) + X(ω + ωs ) + X(ω − 2ωs ) + X(ω + 2ωs )+ . . . ]
s
Fourier Transform formula given below:
https://www.tutorialspoint.com/signals_and_systems/signals_sampling_theorem.htm Page 2 of 3
IfSubstitute
x(t) is a δ(t) time domain 1.
in equation signal, X(w) is the frequency domain conversion. The conversion is
done by applying Fourier transform.
→ y(t) = x(t). δ(t)
https://www.tutorialspoint.com/signals_and_systems/signals_sampling_theorem.htm Page 2 of 3
= x(t)[ T1 + Σ∞ 2
n=1 ( T cos nωs t)]
s s
1
= Ts
[x(t) + 2Σ∞
n=1 (cos nωs t)x(t)]
1
y(t) = [x(t) + 2 cos ωs t. x(t) + 2 cos 2ωs t. x(t) + 2 cos 3ωs t. x(t) . . . . . . ]
Aside ends] Ts
1
Y(ω) = Ts
[X(ω) + X(ω − ωs ) + X(ω + ωs ) + X(ω − 2ωs ) + X(ω + 2ωs )+ . . . ]
https://www.tutorialspoint.com/signals_and_systems/signals_sampling_theorem.htm Page 2 of 3
Signals Sampling Theorem - Tutorialspoint 19/02/20, 2:43 PM
Signals Sampli
Techniques
Aliasing Effect
https://www.tutorialspoint.com/signals_and_systems/signals_sampling_theorem.htm Page 3 of 3
Aliasing Effect
https://www.tutorialspoint.com/signals_and_systems/signals_sampling_theorem.htm ∞ Page 3
n=−∞
= x(t) × p(t)
Natural Sampling
= x(t) × Σ∞
n=−∞ P(t − nT) . . . . . . (1)
T
1
Where Fn = T
∫ −T2 p(t)e−jnωs t dt
2
1
= TP
(nωs )
Comparison
Substitute Fn value in equation 2
https://www.tutorialspoint.com/signals_and_systems/signals_sampling_techniques.htm Page 2 of 5
Example 1:
Tips:
xa(t) = 3cos w t (continuous time signal)
w = 2pF =100p =2*50* p
F=50
Fs >= 2 F
x(n) is got after sampling and it is a discrete time signal.
[Aside…
Relation between analog frequency and digital frequency is given in (1.4.5)
Aside ends]
!"p "p
= 3 cos 𝑛 = -3 cos 𝑛
# #
Example 2:
Tips:
Hz to KHz conversion
1 kHz = 1000 Hz
sampled signal.
The sampled signal is x(n) with frequency f is got by diving the analog signal frequency F by the sampling
frequency Fs,
Exercises to do yourself…
2. Quantization of Continuous-Amplitude Signals
3. Coding of Quantized Samples
3) Sequence Representation
n=0
4) Graphical representation
Another example for the four types of discrete signal representations:
Amplitude Scaling
The scaled signal a x(t) is x(t) multiplied by the constant ‘a’
a=2
1. Time scaling
A signal x(t) is scaled in time by multiplying the time variable by a positive constant b, to
produce x(bt). A positive factor of b either expands (0 < b < 1) or compresses (b > 1) the
signal in time.
The discrete-time sequence x[n] is compressed in time by multiplying the index n by an integer
k, to produce the time-scaled sequence x[nk].
Ø This extracts every kth sample of x[n].
Ø Intermediate samples are lost.
Ø The sequence is shorter.
Ø Called as down sampling, or decimation.
The discrete-time sequence x[n] is expanded in time by dividing the index n by an integer m,
to produce the time-scaled sequence x[n/m].
Ø This specifies every mth sample.
Ø The intermediate samples must be synthesized (set to zero, or interpolated).
Ø The sequence is longer.
Ø Called up sampling, or interpolation.
Example
In another representation,
n=0
n=0
3. Time shift
For a continuous-time signal x(t), and a time t1 > 0,
Ø Replacing t with t - t1 gives a delayed signal x(t - t1)
Ø Replacing t with t + t1 gives an advanced signal x(t + t1)
Example
A signal x(n) is graphically illustrated in Fig below. Show a graphical representation of the
signals x(n-3) and x(n+2).
Example in sequence form of representation
If n-k is delayed in time by k samples (Arrow (n=0) gets shifted on left hand side) and if n+k
(Arrow get shifted on right hand side)
4. Combinations
Ø Time scaling, shifting, and reversal can all be combined.
Ø Operation can be performed in any order, but care is required.
Ø This will cause confusion.
Example.
Show the graphical representation of the signal x(- n) and x(-n +2). where x(n) is the signal
illustrated in Fig below:
Example:
Show the graphical representation of the signal x(n - 2) and x(3n-2), where x (n) is
the signal illustrated in Fig below:
Example.
Show the graphical representation of the signal y(n) = x(2n), where x(n) is the signal illustrated
in Fig. below
Example:
Given the Signal below:
(ii) Find
Try these yourselves ....
1. Solve the following for the signal given below:
Find x(n-3),discrete-time
Important x(n+2), x(-n), x(-n+1),
signals If ax(-n-2)
continuous-time signal x(t) is sampled at T-second
intervals, the result is the sequence {x(nT)}. For convenience we shall drop the T and the braces
and use just x(n) to represent the sequence.
ELEMENTARY DISCRETE TIME SIGNALS
1) The unit sample sequence (discrete-time impulse, aka Kronecker delta)
1. The unit impulse signal/sequence (discrete-time impulse, aka Kronecker delta)
= 1, n = 0
0, n 0
Whereas is somewhat similar to the continuous-time impulse function the
Dirac delta we note that the magnitude of the discrete impulse is finite. Thus there are no
analytical difficulties in defining . It is convenient to interpret the delta function as follows:
k)
1 1
analytical difficulties in defining . It is convenient to interpret the delta function as follows:
k)
1 1
n n
1 0 1 1 0 1 k
u(n) = 1, n 0
0, n<0
u(argument) = 1, if argument 0
0, if argument < 0
u(n) u(n k)
1 1
n n
1 0 1 1 0 k
a) The discrete delta function can be expressed as the first difference of the unit step function:
= u(n) u(n 1)
16 of 77
2. Unit step signal: