Quiz4 Sol
Quiz4 Sol
∞
X ( z ) = ∑ x[n].z − n
n =0
This transform is said to be unilateral as it does not take into account any values prior to
n = 0.
The z-transform is relatively easy to visualise as it is essentially a power series in z-1, with
coefficients equal to successive values of the time domain signal x[n].
Probably the easiest way of thinking of z is as a time-shift operator. Multiplication by z is
equivalent to a time advance by one sampling interval and division by z equivalent to a
time delay of one sampling interval.
Find the z transform of the exponentially decaying signal shown in Figure 1, expressing it
as compactly as possible
Figure 1
∞
X ( z ) = ∑ x[n]z − n
n =0
1 z
= −1
=
1 − 0.8 z z − 0.8
See Figure 2
1
and from the sum to infinity of a geometric series which is given by:
For example: Find the sum of the first 8 terms of the following series and the sum to
infinity: 8, 4, 2, 1
a =8, r = 0.5
8
s= = 16
1 − 0.5
Figure 2
As far as DSP is concerned, one of the most important is the convolution property, which
states that time domain convolution is equivalent to frequency-domain multiplication.
e.g
n= 0 1 2 3 4 5 6 7 8 …
x[n] = 1 -2 3 -1 -1 0 0 0 0 …
h[n] 2 1 -1 0 0 0 0 0 0 …
=
y[n] = 2 -3 3 3 -6 0 1 0 0 …
In the frequency domain, we can describe the signal by their z-transforms. The
transforms of x[n] and h[n] are:
and
2
Where H(z) is known as the transfer function of the processor.
The corresponding signal has sample values equal to the coefficients of the power series,
namely:
2 -3 3 3 -6 0 1 0 0 ….
A z-transform used to describe a real digital signal can always be written as a ratio of
numerator and denominator polynomials in z:
N ( z)
x( z ) =
D( z )
This is true whether X(z) represents an input or an output signal, or the transfer function
of a processor.
N ( z ) K ( z − z1 )( z − z 2 )( z − z 3 )....
X ( z) = =
D( z ) ( z − p1 )( z − p 2 )( z − p 3 ).....
The constants z1, z2 and z3 are called the zeros of X(z), because they are the values of z
for which X(z) is zero.
Conversely p1, p2, and p3 are known as the poles of X(z), giving values of z for which
X(z) tends to infinity. It is found that whenever the corresponding time function is real,
then the poles and zeros are themselves either real, or occur in complex conjugate pairs.
The following example introduces the operator J. An explanation of this operator can be
found in Appendix 1 on page 11.
3
Example. Plot the z-plane poles and zeros of the following z transform.
z 2 ( z − 1.2)( z + 1)
X ( z) =
( z − 0.5 + j 0.7)( z − 0.5 − j 0.7)( z − 0.8)
Figure 3
4
Important points:
• For system or signal stability the poles must lie inside the unit circle in the z-
plane.
• This restriction does not apply to zeros – they can be placed anywhere in the z-
plane.
• Zeros (or poles) at the origin of the z plane produce a pure time advance (or
delay), but have no other effect on the characteristics of the processor or signal.
If a pole is placed directly on the unit circle at an angle of π/4. Then assuming that we
start at a frequency of DC, as the frequency increases from DC, we will approach the
pole. The denominator will approach zero and the output from the filter will approach
infinity and the filter will become unstable. In practical terms this means that even a
very small signal at π/4 (including, for example, a small amount of noise) will cause
the filter to try to go to an infinite value. This will be true for any case where the pole
lies on or outside the unit circle. Therefore all poles must lie within the unit circle.
This means that as the poles move closer to the origin, the amplitude response will
decrease and the general stability of the filter will improve. In general, if a sharp filter
with high gain is required, the poles will be moved as close to the unit circle as is
practical; if a smooth and well-behaved filter is required, the poles are moved as close
to the origin as possible.
Figure 4
5
Example. If we have a discrete system with a transfer function given by
T ( z) =
(z + 1)
(z − 0.5)
and we need to find the response at dc (0 Hz), 1Hz and 2Hz, give that the sampling
frequency is 8Hz.
The pole-zero diagram is shown in Figure 5. As the sampling frequency is 8HZ, the
Nyquist frequency is 4Hz and so the three frequencies of 0, 1Hz and 2Hz must
correspond to points A, B and C respectively.
Figure 5
Solution
• At frequency = 0Hz
Gain = k
∏ zero ⋅ dis tan ces
∏ pole ⋅ dis tan ces
AZ
∴ Gain =
Ap
2
∴Gain = =4
0.5
6
Phase angle = Σ zero angles - Σ pole angles
Phase angle = 0 – 0 = 0°
• At frequency = 1Hz: The pole and zero distances are more difficult to calculate,
hence it is probably easier to use a scale diagram and measure the distances.
They approximate to BZ = 1.84 and BP = 0.73
The angles approximate to tan-1 (0.7/1.7) = 22.3º and the pole angle = tan-1 (0.7/0.2) =
74.1º
2
At frequency = 2Hz: Here the zero distance is 2 and the pole distance is 12 + 0.5
2
Therefore Gain = = 1.27
1.25
The zero angle is 45º, and the pole angle is {180° – tan-1(1/0.5) = 116.5º}.
The Matlab frequency response plots for the system can be drawn using the freqz
function.
num=[1,1];
den=[1 -0.5];
freqz(num,den)
Plot the function and comment on how the gain and phase angle compare to the
calculated values.
Question
A digital filter has a transfer function of 3(z – 0.5)(z +1)/z2 + 0.25). Find the frequency
response at 0Hz, and 2.5Hz by (a)using a pole-zero diagram and (b) directly from the
transfer function. The sampling frequency is 10Hz.
Solution(a)
This system has zeros at 0.5 and -1 and poles at ± j 0.5 .
For zeros
z − 0.5 = 0 ∴ z = 0.5
z + 1 = 0 ∴ z = −1
7
for poles
z 2 + 0.25 = 0 ∴ z 2 = −0.25 ∴ z = ± − 1 × 0.25
z = ± j 0.5
Figure 6
• f = 0Hz
Magnitude = k
∏ zero ⋅ dis tan ces
∏ pole ⋅ dis tan ces
3 × 0.5 × 2
∴ Magnitude = = 2.4
1.25 × 1.25
8
Figure 7
3 × 1.25 × 2
Magnitude = 6.3
0.5 × 1.5
Solution(b)
• f = 0Hz: from z = e jωt , with ω = 0, we get z = 1
3 × 0.5 × 2
T ( z) = = 2.4
1.25
This is a real function and so gain = 2.4 and phase angle = 0 (as the imaginary component
is zero)
By inspection it can be seen that 2.5 Hz is half the Nyquist frequency, therefore z = j.
Substituting z = j into the transfer function:
9
3( j − 0.5)( j + 1) 3(1.12∠116 o )1.4∠45 o ) 4.7∠161o
T ( jω ) = ≈ =
(−1 + 0.25) − 0.75 0.75∠180 o
= 6.3∠ − 19 o
10
Appendix 1
Polar form is where a complex number is denoted by the length (otherwise known as the
magnitude, absolute value, or modulus) and the angle of its vector (usually denoted by an
angle symbol that looks like this: L). To use the map analogy, polar notation for the
vector from New York City to San Diego would be something like “2400 miles,
southwest.” Here are two examples of vectors and their polar notations: (Figure 1)
Standard orientation for vector angles in AC circuit calculations defines 0o as being to the
right (horizontal), making 90o straight up, 180o to the left, and 270o straight down. Please
note that vectors angled “down” can have angles represented in polar form as positive
numbers in excess of 180, or negative numbers less than 180. For example, a vector
angled L 270o (straight down) can also be said to have an angle of -90o. (Figure 2) The
above vector on the right (7.81 L 230.19o) can also be denoted as 7.81 L -129.81o.
11
Figure 2 The vector compass
Rectangular form, on the other hand, is where a complex number is denoted by its
respective horizontal and vertical components. In essence, the angled vector is taken to be
the hypotenuse of a right triangle, described by the lengths of the adjacent and opposite
sides. Rather than describing a vector's length and direction by denoting magnitude and
angle, it is described in terms of “how far left/right” and “how far up/down.”
J Notation
These two dimensional figures (horizontal and vertical) are symbolized by two numerical
figures. In order to distinguish the horizontal and vertical dimensions from each other, the
vertical is prefixed with a lower-case “i” (in pure mathematics) or “j” (in electronics).
These lower-case letters do not represent a physical variable (such as instantaneous
current, also symbolized by a lower-case letter “i”), but rather are mathematical operators
used to distinguish the vector's vertical component from its horizontal component. As a
complete complex number, the horizontal and vertical quantities are written as a sum:
(Figure 3)
12
Figure 3 In “rectangular” form the vector's length and direction are denoted in terms of
its horizontal and vertical span, the first number representing the the horizontal (“real”)
and the second number (with the “j” prefix) representing the vertical (“imaginary”)
dimensions.
The horizontal component is referred to as the real component, since that dimension is
compatible with normal, scalar (“real”) numbers. The vertical component is referred to as
the imaginary component, since that dimension lies in a different direction, totally alien
to the scale of the real numbers. (Figure 4)
13
The “real” axis of the graph corresponds to the familiar number line we saw earlier: the
one with both positive and negative values on it. The “imaginary” axis of the graph
corresponds to another number line situated at 90o to the “real” one. Vectors being two-
dimensional things, we must have a two-dimensional “map” upon which to express them,
thus the two number lines perpendicular to each other: (Figure 5)
Figure 5 Vector compass with real and imaginary (“j”) number lines.
Either method of notation is valid for complex numbers. The primary reason for having
two methods of notation is for ease of longhand calculation, rectangular form lending
itself to addition and subtraction, and polar form lending itself to multiplication and
division.
Conversion between the two notational forms involves simple trigonometry. To convert
from polar to rectangular, find the real component by multiplying the polar magnitude by
the cosine of the angle, and the imaginary component by multiplying the polar magnitude
by the sine of the angle. This may be understood more readily by drawing the quantities
as sides of a right triangle, the hypotenuse of the triangle representing the vector itself (its
length and angle with respect to the horizontal constituting the polar form), the horizontal
and vertical sides representing the “real” and “imaginary” rectangular components,
respectively: (Figure 6)
14
Figure 6 Magnitude vector in terms of real (4) and imaginary (j3) components.
To convert from rectangular to polar, find the polar magnitude through the use of the
Pythagorean Theorem (the polar magnitude is the hypotenuse of a right triangle, and the
real and imaginary components are the adjacent and opposite sides, respectively), and the
angle by taking the arctangent of the imaginary component divided by the real
component:
15
• REVIEW:
• Polar notation denotes a complex number in terms of its vector's length and
angular direction from the starting point. Example: fly 45 miles L203o (West by
Southwest).
• Rectangular notation denotes a complex number in terms of its horizontal and
vertical dimensions. Example: drive 41 miles West, then turn and drive 18 miles
South.
• In rectangular notation, the first quantity is the “real” component (horizontal
dimension of vector) and the second quantity is the “imaginary” component
(vertical dimension of vector). The imaginary component is preceded by a lower-
case “j,” sometimes called the j operator.
• Both polar and rectangular forms of notation for a complex number can be related
graphically in the form of a right triangle, with the hypotenuse representing the
vector itself (polar form: hypotenuse length = magnitude; angle with respect to
horizontal side = angle), the horizontal side representing the rectangular “real”
component, and the vertical side representing the rectangular “imaginary”
component.
16
perform these operations on two or more complex numbers, but these operations can also
be done “by hand.” This section will show you how the basic operations are performed. It
is highly recommended that you equip yourself with a scientific calculator capable of
performing arithmetic functions easily on complex numbers. It will make your study of
AC circuit much more pleasant than if you're forced to do all calculations the longer way.
Addition and subtraction with complex numbers in rectangular form is easy. For addition,
simply add up the real components of the complex numbers to determine the real
component of the sum, and add up the imaginary components of the complex numbers to
determine the imaginary component of the sum:
When subtracting complex numbers in rectangular form, simply subtract the real
component of the second complex number from the real component of the first to arrive
at the real component of the difference, and subtract the imaginary component of the
second complex number from the imaginary component of the first to arrive the
imaginary component of the difference:
For longhand multiplication and division, polar is the favored notation to work with.
When multiplying complex numbers in polar form, simply multiply the polar magnitudes
of the complex numbers to determine the polar magnitude of the product, and add the
angles of the complex numbers to determine the angle of the product:
Division of polar-form complex numbers is also easy: simply divide the polar magnitude
of the first complex number by the polar magnitude of the second complex number to
arrive at the polar magnitude of the quotient, and subtract the angle of the second
complex number from the angle of the first complex number to arrive at the angle of the
quotient:
17
To obtain the reciprocal, or “invert” (1/x), a complex number, simply divide the number
(in polar form) into a scalar value of 1, which is nothing more than a complex number
with no imaginary component (angle = 0):
These are the basic operations you will need to know in order to manipulate complex
numbers in the analysis of AC circuits. Operations with complex numbers are by no
means limited just to addition, subtraction, multiplication, division, and inversion,
however. Virtually any arithmetic operation that can be done with scalar numbers can be
done with complex numbers, including powers, roots, solving simultaneous equations
with complex coefficients, and even trigonometric functions (although this involves a
whole new perspective in trigonometry called hyperbolic functions which is well beyond
the scope of this discussion). Be sure that you're familiar with the basic arithmetic
operations of addition, subtraction, multiplication, division, and inversion, and you'll
have little trouble with AC circuit analysis.
• REVIEW:
• To add complex numbers in rectangular form, add the real components and add
the imaginary components. Subtraction is similar.
• To multiply complex numbers in polar form, multiply the magnitudes and add the
angles. To divide, divide the magnitudes and subtract one angle from the other.
18
19