💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...
DSP Third Class.ppsx
1. MINISTRY OF SCIENTIFIC EDUCATION AND HIGHER RESEARCHES
NORTHERN TECHNICAL UNIVERSITY
ENGINEERING TECHNICAL COLLEGE / MOSUL
DEPARTMENT OF COMPUTER TECHNOLOGY
1
DIGITAL SIGNAL PROCESSING LECTURE
DEPARTMENT OF COMPUTER
TECHNOLOGY –THIRD CLASS
2018-2019
ARJUWAN MOHAMMED ABDULJAWAD
ALJAWADI
LECTURER
2. DIGITAL SIGNAL PROCESSING (DSP)
2
Engineers must model two distinct physical phenomena:
- The first is physical systems, which can be modeled by
mathematical equations. For example, continuous-time, or analog,
systems (systems that contain no sampling) can be modeled by
ordinary differential equations with constant coefficients. An
example of such a system is a linear electrical circuit.
3. 3
- The second physical phenomenon to be modeled is called a signal.
Physical signals are modeled by mathematical functions. One
example of a physical signal is the voltage that is applied to the
speaker in a radio. Another example is the temperature at a
designated point in a particular room. This signal is a function of
time, since the temperature varies with time.
4. 4
The temperature can be expressed as:
Temperature at a point (𝜃)…….(1)
Where has the units of, for example, degrees Celsius. To be more precise in
this example, the temperature in a room is a function of time and of space. We
may designate a point in a room in the rectangular coordinates x,y, and z.
Equation(2) becomes:
Temperature at a point (𝜃, 𝑋, 𝑌, 𝑍)…….(2)
Where the point in a room is identified by the three space
coordinates x, y, and z. The signal in (1) is a function of one
independent variable, whereas the signal in (2) is a function of four
independent variables.
5. 5
Signals are divided into two natural categories:
The first category to be considered is continuous-time, or simply, continuous,
signals. A signal of this type is defined for all values of time. A continuous-time
signal is also called an analog signal. A continuous-time signal is illustrated in
the figure below.
Figure(1) :(a) Continuous-time signal; (b) Discrete-time signal
6. 6
The second category for signals is discrete-time, or simply, discrete, signals. A
discrete signal is defined at only certain instants of time. For example, suppose
that a signal is to be processed by a digital computer. [This operation is called
digital signal processing (DSP).] Because a computer can operate only on
numbers and not on a continuum, the continuous signal must be converted into
a sequence of numbers by sampling. If a signal is sampled every T seconds, the
number sequence
𝑓 𝑛𝑇 , 𝑛 =. . . −2, −1,0,1,2 … . .
is available to the computer. This sequence of numbers is called a
discrete- time signal. The 𝑓 𝑛𝑇 with 𝑛 𝑎 non-integer value is not exist.
7. 7
Both continuous-time and discrete-time signals appear in some physical
systems; we call these systems hybrid systems, or sampled-data systems. An
example of a sampled data system is an automatic aircraft-landing system, in
which the control functions are implemented on a digital computer.
- Continuous-Time Physical Systems:
1. Electrical Circuits
In this section, we give models for some electric-circuit
elements. We begin with the model for resistance, given by
𝑉 𝑡 = 𝑅𝑖 𝑡 … … (3)
This model circuit symbol given in Figure (2) .
9. 9
The model for inductance is given by:
𝑉 𝑡 = 𝐿 .
𝑑𝑖(𝑡)
𝑑(𝑡)
…………..(4)
𝑜𝑟 𝑖 𝑡 =
1
𝐿 −∞
𝑡
𝑉 𝜏 𝑑(𝜏)
The model for the capacitance is given by:
𝑉 𝑡 =
1
𝐶 −∞
𝑡
𝑖 𝜏 𝑑(𝜏)
𝑜𝑟 𝑖 𝑡 = 𝑐 .
𝑑𝑣(𝑡)
𝑑(𝑡)
………….(5)
10. 10
2. DC Power Supply
Power supplies that convert an AC voltage (sinusoidal voltage)
into a dc voltage (constant voltage) are required in almost all
electronic equipment. Shown in Figure (3) are voltages that appear
in certain dc power supplies in which the ac voltage is converted to
a nonnegative voltage. The voltage in Figure 3(a) is called a half-
wave rectified signal. This signal is generated from a sinusoidal
signal by replacing the negative half cycles of the sinusoid with a
value of zero. The positive half cycles are unchanged. In this figure,
𝑇0 is the period of the waveform (the time of one cycle).
11. 11
The signal in Figure 3(b) is called a full-wave rectified signal. This signal is generated
from a sinusoidal signal by the amplitude reversal of each negative half cycle.
Figure (3): a. Half Wave Rectifier ; . Full wave Rectifier
12. 12
The positive half cycles are unchanged. Note that the period of this
signal is one-half that of the sinusoid and, hence, one-half that of the
half-wave rectified signal. Usually, these waveforms are generated by
the use of diodes. The circuit symbol for a diode is given in Figure 4(a).
An ideal diode has the voltage–current characteristic shown by the
heavy line in Figure 4(b).
13. 13
The diode allows current to flow unimpeded in the direction of the
arrowhead in its symbol and blocks current flow in the opposite direction.
The ideal diode is a short circuit for current flow in the direction of the
arrowhead [when 𝑣 𝑡 tends to be positive] and an open circuit for current
flow in the opposite direction [when 𝑣 𝑡 is negative]. The diode is a
nonlinear device; therefore, many circuits that contain diodes are nonlinear
circuits.
15. 15
- Discrete-Time Systems:
A discrete-time signal is defined only at discrete instants of time. We denote a discrete-time signal as x[n], where
the independent variable n may assume only integer values.
A discrete-time system is defined as one in which all signals are discrete time. For example, suppose that a
continuous-time signal is to be processed by a digital computer. [This operation is called digital signal processing
(DSP).] Because a computer can operate only on a number, the continuous-time signal must first be converted to a
sequence of numbers. This conversion process is called sampling. If the signal is sampled at regular increments of
time T, the number sequence 𝐹 𝑛𝑇 , 𝑛 = ⋯ . −2, −1,0,1,2 … … The time increment T is called the sampling period.
(Since there is little danger of confusion in this and following chapters, the symbol T is used to denote the sampling
period.
16. 16
The sampling process is illustrated in the following figure (a) , the hardware normally used in sampling is
represented in figure (b)
17. 17
The notation 𝑓 𝑡 indicates a continuous-time signal. The notation 𝑓(𝑛𝑇) indicates the value of 𝑓 𝑡 𝑎𝑡 𝑡 = 𝑛𝑇. at
the notation f[n] denotes a discrete-time signal that is defined only for n an integer. Parentheses ( ) indicate
continuous time; brackets [ ]indicate discrete time.
18. 18
Figure (c) illustrates a total system for digital signal processing. The sampler converts the continuous-time signal into
the discrete-time signal the output of the processor is the signal g[n]. While is defined for all time, g[n] is defined
only for n an integer; for example, g[1.2] simply does not exist.
19. 19
A discrete-time signal x[n] can be a continuous-amplitude signal, for which the amplitude can assume any value A
second class of discrete time signals is a discrete-amplitude signal, for which x[n] can assume only certain defined
amplitudes.
A discrete-amplitude discrete-time signal is also called a digital signal. An example of a discrete-amplitude
discrete-time signal is the output of an analog-to-digital converter. For example, if the binary signal out of an
analog-to-digital converter is represented by eight bits, the output-signal amplitude can assume only different
values. A second example of a discrete amplitude discrete-time signal is any signal internal to a digital computer.
- Home Work:
Why engineers are interested in discrete-time signals? Support you answer with examples and drawing.
20. 20
- Samplers and Discrete-time physical systems:
1. Analogue to Digital Converter
An electronic integrated circuit which transforms a signal from analog (continuous) to digital
(discrete) form. Analog signals are directly measurable quantities.
Microprocessors can only perform complex processing on digital signals. When signals are in
digital form they are less susceptible to the effects of additive noise. ADC provides a link
between the analog world and the digital world of signal processing and data handling.
When microcontroller is sampled from 5-volt , it understand zero – volt as a binary (0) and five-volt as
binary (1)
What if the analog signal is 2.72 volt , the analog sensor may output 0.01volt or 4.99volt or between them
values.
ADC can vary greatly between microcontroller .The ADC on the Arduino is a 10-bit ADC meaning it has
the ability to detect 210
= 1024 discrete-analog levels.
Some microcontroller have 8-bit ADC , 28
= 256 discrete-levels.
21. 21
- Relating ADC Value to Voltage
The ADC reports a ratio-metric value, means the ADC assumes 5-volt is 1023 and analyzing less than 5-volt will be a
ratio between 5-volt and 1023.
22. 22
- Sample and Hold Circuit
Definition: The Sample and Hold circuit is an electronic circuit which creates the samples of
voltage given to it as input, and after that, it holds these samples for the definite time.
The time during which sample and hold circuit generates the sample of the input signal is called
sampling time.
Similarly, the time duration of the circuit during which it holds the sampled value is called holding
time.
Sampling time is generally between 1µs to 14 µs while the holding time can assume any value as
required in the application. It will not be wrong to say that capacitor is the heart of sample and
hold circuit. This is because the capacitor present in it charges to its peak value when the switch is
opened, i.e. during sampling and holds the sampled voltage when the switch is closed.
24. 24
- Circuit Diagram of Sample and Hold Circuit
The diagram below shows the circuit of the sample and hold circuit with the help of an Operational Amplifier. It
is evident from the circuit diagram that two OP-AMPS are connected via a switch. When the switch is closed
sampling process will occur where the capacitor will charge to its peak value but when the switch is opened the
capacitor stops charging Due to the high impedance operational amplifier connected at the end of the circuit, the
capacitor will experience high impedance due to this it cannot get discharged.
This leads to the holding of the charge by the capacitor for the definite amount of time. This time can be
referred as holding period. And the time in which samples of the input voltage is generated is called sampling
period.
The output processed by operational amplifier during the holding period. Therefore, holding period holds
significance for OP-AMPS.
26. 26
- Quantizing
The digitization of analog signals involves the rounding off of the values which are approximately equal to the
analog values. The method of sampling chooses a few points on the analog signal and then these points are joined
to round off the value to a near stabilized value. Such a process is called as Quantization.
- Quantizing an Analogue Signal
The analog-to-digital converters perform this type of function to create a series of digital values out of the given
analog signal.
The following figure represents an analog signal. This signal to get converted into digital, has to undergo sampling
and quantizing.
27. 27
The quantizing of an analog signal is done by discretizing the signal with a number of quantization levels. Quantization
is representing the sampled values of the amplitude by a finite set of levels, which means converting a continuous-
amplitude sample into a discrete-time signal.
The following figure shows how an analog signal gets quantized. The blue line represents analog signal while the brown
one represents the quantized signal.
28. 28
Both sampling and quantization result in the loss of information. The quality of a Quantizor output depends upon the
number of quantization levels used.
- The discrete amplitudes of the quantized output are called as representation levels or reconstruction levels.
- The spacing between the two adjacent representation levels is called a quantum or step-size.
The following figure shows the resultant quantized signal which is the digital form for the given analog signal.
29. 29
- There are two types of quantization:
There are two types of Quantization:
1. Uniform Quantization
2. Non-uniform Quantization.
- The type of quantization in which the quantization levels are uniformly spaced is termed
as a Uniform Quantization.
- The type of quantization in which the quantization levels are unequal and mostly the
relation between them is logarithmic, is termed as a Non-uniform Quantization.
- Quantization Noise: is the discrepancy between the quantized and true value of the
sampled data. The absolute value of n is limited to ½ the size of the quantization step
size, q . In some cases the quantization noise is highly correlated.
30. 30
Numerical Integration
Consider numerical integration, in which we use a digital computer to integrate a physical signal. Suppose that we wish
to integrate a voltage signal, using a digital computer. Integration by a digital computer requires that we use a numerical
algorithm. In general, numerical algorithms are based on approximating a signal with an unknown integral with a signal
that has a known integral. Hence, all integration algorithms are approximate in nature.
We illustrate numerical integration with Euler’s rule. Euler’s rule approximates the area under the curve 𝑋(𝑡) by the sum
of the rectangular areas shown. In this figure, the step size H (the width of each rectangle) is called the numerical-
integration increment. The implementation of this algorithm requires 𝑋 𝑡 be sampled every H seconds , resulting in the
number sequence 𝑋 𝑛𝐻 𝑤𝑖𝑡ℎ 𝑛 an integer. Usually, the sampling is performed using an analog – to – digital converter.
32. 32
A system described by a difference equation is called a discrete-time system with an input 𝑋 𝑛 and an output
𝑌 𝑛 .
- Example: sampling a unit-step function by numerical integration using Euler’s rule.
Assuming that the initial condition 𝑦 0 is zero ; that is
𝑦 0 = 0 , sampling a unit-step function yields 𝑥 𝑛𝐻 =
1 𝑓𝑜𝑟 𝑛 ≥ 0 𝑎𝑛𝑑 𝑡ℎ𝑢𝑠 𝑥 𝑛 = 1 𝑓𝑜𝑟 𝑛 ≥ 0 from the
equation:
𝑦 𝑛 − 𝑦 𝑛 − 1 = 𝐻𝑥 𝑛 − 1
This equation is solved iteratively , beginning with 𝑛 = 1:
𝑦 1 = 𝑦 0 + 𝐻𝑥 0 = 0 + 𝐻 = 𝐻
𝑦 2 = 𝑦 1 + 𝐻𝑥 1 = 𝐻 + 𝐻 = 2𝐻
𝑦 3 = 𝑦 2 + 𝐻𝑥 2 = 2𝐻 + 𝐻 = 3𝐻
33. 33
𝑦 𝑛 = 𝑦 𝑛 − 1 + 𝐻𝑥 𝑛 − 1 = 𝑛 − 1 𝐻 + 𝐻 = 𝑛𝐻
Thus , 𝑦 𝑛𝐻 = 𝑛𝐻 . The exact integral of the unit step function gives the result:
𝑦 𝑡 =
0
𝑡
𝑢 𝜏 . 𝑑𝜏 =
0
𝑡
𝑑𝜏 = 𝜏 𝑓𝑟𝑜𝑚 0 − 𝑡𝑜 − 𝑡 = 𝑡 , 𝑡 > 0
And 𝑦 𝑡 𝑒𝑣𝑎𝑙𝑢𝑎𝑡𝑒𝑑 𝑎𝑡 𝑡 = 𝑛𝐻 𝑖𝑠 𝑒𝑞𝑢𝑎𝑙 𝑡𝑜 𝑛𝐻. Hence , Euler’s rule gives the exact value for the
integral of the unit-step function . In general , the Euler rule is not exact. The integral of a general
function by Euler’s rule yields the summation of 𝑥 𝑘 multiplied by the constant 𝐻: 𝑦 𝑛 = 𝐻𝑥 0 +
𝐻𝑥 1 + 𝐻𝑥 2 + ⋯ + 𝐻𝑥 𝑛 − 1 = 𝐻 𝑘=0
𝑛−1
𝑥[𝑘]
34. 34
Picture in Picture
This system is used in television to show two frames simultaneously, where a smaller picture is superimposed on a
larger picture. Where a TV picture is depicted as having six lines. (The actual number of lines is greater than 500.)
Suppose that the picture is to be reduced in size by a factor of three and inserted into the upper right corner of a
second picture. First, the lines of the picture are digitized (sampled). Each line produces six samples (the actual
number can be more than 2000), which are called picture elements (pixels). Both the number of lines and the number
of samples per line must be reduced by a factor of three to reduce the size of the picture. Assume that the samples
retained for the reduced picture are the four circled .(In practical cases, the total number of pixels retained may be
greater than 100,000.)
35. 35
The above figure represent a different picture; the four pixels of the reduced picture then replace the four
pixels in the upper right corner of the full picture. The inserted picture is outlined by the dashed lines. This
reduction in the number of samples as indicated in Figure, called time scaling,
- Unit Step and Unit Impulse Functions
The discrete-time unit step function u[n] is defined by:
36. 36
- Properties of Discrete-Time System:
1. System with Memory
A system that has memory if its output at time 𝑌0 𝑛 depends on input values other than 𝑋0 𝑛 . Otherwise the system
is memoryless.
For a discrete signal x[n], time is represented by the discrete increment variable n. An example of a simple
memoryless discrete-time system is the equation
𝑦[𝑛] = 5𝑥[𝑛]
A memoryless system is also called a static system. A system with memory is also called a dynamic
system. An example of a system with memory is the Euler integrator of
𝑦[𝑛] = 𝑦[𝑛 − 1] + 𝐻𝑥[𝑛 − 1]
37. 37
This equation can be represented as :
and we see that the output depends on all past values of the input.
A second example of a discrete system with memory is one whose output is the average of the last two values of the
input. The difference equation describing this system is:
38. 38
2. System with Inevitability
A system is said to be invertible if distinct inputs result in distinct outputs. A second definition of inevitability is that
the input of an invertible system can be determined from its output. For example, the memoryless system described by
is not invertible. The inputs of +2 and -2 produce the same output of +2
3. Inverse System
Inverse of a System The inverse of a system T is a second system 𝑇𝑖 that, when cascaded with
T, yields the identity system.
The identity system is defined by the equation 𝑌 𝑛 = 𝑋 𝑛 Consider the two systems of the
figure below. System 𝑇𝑖 is the inverse of system T if
39. 39
4. Casual System
A system is causal if the output at any time is dependent on the input only at the present time
and in the past.
We have defined the unit delay as a system with an input of x[n] and an output of
𝑋 𝑛 − 1 .
An example of a non-causal system is the unit advance, which has an input of x[n] and an
output of 𝑋 𝑛 + 1
Another example of a non-causal system is an averaging system, given by
40. 40
which requires us to know a future value, 𝑋 𝑛 + 1 of the input signal in order to calculate the current value,
y[n], of the output signal.
We denote the unit advance with the symbol 𝐷−1
We realize it by first delaying a signal and then advancing it. However, we cannot advance a signal more than
it has been delayed. Although this system may appear to have no application, the procedure is used in filtering
signals “off line,” or in non real time. If we store a signal in computer memory, we know “future” values of the
signal relative to the value that
41. 41
5. Stability
BIBO Stability: A system is stable if the output remains bounded for any bounded input. This is the bounded-input
bounded-output (BIBO) definition of stability. By definition, a signal x[n] is bounded if there exists a number M such
that
Hence, a system is bounded-input bounded-output stable if, for a number R,
for all x[n] such that (1) is satisfied. To determine BIBO stability, R [ in general, a function of M in
(1)] must be found such that (2) is satisfied. Note that the Euler integrator of
42. 42
is not BIBO stable; if the signal to be integrated has a constant value of unity, the output increases without
limit as n increases.
6. Time Invariance
Time-invariant System: A system is said to be time invariant if a time shift in the input results only in the same time
shift in the output. In this definition, the discrete increment n represents time. For a time-invariant system for which the
input x[n] produces the output y[n], the input produces
45. 45
7. Linearity
The property of linearity is one of the most important properties that we consider. Once again, we define the system
input signal to be x[n] and the output signal to be y[n].
These two criteria can be combined to yield the principle of superposition. A system
satisfies the principle of superposition if
46. 46
Where and are arbitrary constants. A system is linear if it satisfies the principle of superposition. No
physical system is linear under all operating conditions. However, a physical system can be tested with the
use of (1) to determine ranges of operation for which the system is approximately linear. An example of a
linear operation (system) is that of multiplication by a constant K, described by an example of a nonlinear
system is the operation of squaring a signal,
Where and are arbitrary constants. A system is linear if it satisfies the principle of superposition.
No physical system is linear under all operating conditions. However, a physical system can be
tested with the use of (1) to determine ranges of operation for which the system is
approximately linear. An example of a linear operation (system) is that of multiplication by a
constant K, described by an example of a nonlinear system is the operation of squaring a signal,
48. 48
A linear time-invariant (LTI) system is a linear system that is also time invariant. LTI systems, for both
continuous-time and discrete-time systems, are emphasized in this book. An important class of LTI discrete-time
systems are those that are modeled by linear difference equations with constant coefficients.
49. 49
This difference equation is said to be of order N. The second version of this general equation is obtained by
replacing n with 𝑛 + 𝑁 .
50. 50
From this definition:
- Impulse Representation of a Discrete-Time Signal
A relation is developed that expresses a general signal x[n] as a function of impulse functions. This relation is useful
in deriving properties of LTI discrete-time systems. Recall the definition of the discrete-time impulse function (also
called the unit sample function):
52. 52
It can be defined as the following:
The only nonzero values of x[n] are contained in these three signals; hence, we can express the signal
x[n] as:
54. 54
An equation relating the output of a discrete LTI system to its
input will now be developed:
A unit impulse function δ[n] is applied to the system input. Recall that this input is unity for and is zero at all other values of n. With the input as
described, the LTI system response in the above figure denoted as h[n]; that is, in standard notation,