Nonlinear Digital Filters
This page intentionally left blank
Nonlinear Digital Filters Analysis and Applications
Wing-Kuen Ling
AMSTERDAM • BOSTON • HEIDELBERG • LONDON • NEW YORK • OXFORD PARIS • SAN DIEGO • SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO Academic Press is an imprint of Elsevier
Academic Press is an imprint of Elsevier Linacre House, Jordan Hill, Oxford, OX2 8DP 84 Theobald’s Road, London WC1X 8RR, UK 30 Corporate Drive, Burlington, MA 01803 525 B Street, Suite 1900, San Diego, California 92101-4495, USA First edition 2007 Copyright © 2007 Wing-Kuen Ling. Published by Elsevier Ltd. All rights reserved The right of Wing-Kuen Ling to be identified as the author of this work has been asserted in accordance with the Copyright, Designs and Patents Act 1988 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means electronic, mechanical, photocopying, recording or otherwise without the prior written permission of the publisher Permission may be sought directly from Elsevier’s Science & Technology Rights Department in Oxford, UK: phone (+44) (0) 1865 843830; fax (+44) (0) 1865 853333; email:
[email protected]. Alternatively you can submit your request online by visiting the Elsevier web site at http://elsevier.com/ locate/permissions, and selecting Obtaining permission to use Elsevier material Notice No responsibility is assumed by the publisher for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions or ideas contained in the material herein. Because of rapid advances in the medical sciences, in particular, independent verification of diagnoses and drug dosages should be made British Library Cataloguing in Publication Data A catalogue record for this book is available from the British Library Library of Congress Cataloging-in-Publication Data A catalog record for this book is available from the Library of Congress ISBN 13: 9-78-0-12-372536-3 ISBN 10: 0-12-372536-4 For information on all Academic Press publications visit our web site at books.elsevier.com Typeset by Charon Tec Ltd (A Macmillan Company), Chennai, India, www.charontec.com Printed and bound in Great Britain 07
08
09
10
11
10
9
8
7
6
5
4
3
2
1
Contents Preface
vii
Chapter 1 Introduction Why are digital filters associated with nonlinearities? Challenges for the analysis and design of digital filters associated with nonlinearities An overview
1 1 6 7
Chapter 2 Reviews Mathematical preliminary Backgrounds on signals and systems Backgrounds on sampling theorem Backgrounds on bifurcation theorem Absolute stability theorem Exercises
8 8 13 25 27 28 28
Chapter 3 Quantization in Digital Filters Model of quantizer Quantization noise analysis Optimal code design Summary Exercises
32 32 36 42 51 52
Chapter 4 Saturation in Digital Filters System model Oscillations of digital filters associated with saturation nonlinearity Stability of oscillations of digital filters associated with saturation nonlinearity Summary Exercises
53 53 54
Chapter 5 Autonomous Response of Digital Filters with Two’s Complement Arithmetic System model Linear and affine linear behaviors Limit cycle behavior Chaotic behavior Summary Exercises v
58 59 60 61 61 63 70 75 77 77
vi
Contents
Chapter 6 Step Response of Digital Filters with Two’s Complement Arithmetic Affine linear behavior Limit cycle behavior Fractal behavior Summary Exercises
78 78 92 104 109 109
Chapter 7 Sinusoidal Response of Digital Filters with Two’s Complement Arithmetic No overflow case Overflow case Summary Exercises
114 114 127 138 138
Chapter 8 Two’s Complement Arithmetic in Complex Digital Filters First order complex digital filters Second order complex digital filters Summary Exercises
139 139 144 150 151
Chapter 9 Quantization and Two’s Complement Arithmetic in Digital Filters Nonlinear behavioral differences of finite and infinite state machines Nonlinear behavior of unstable second order digital filters Nonlinear behaviors of digital filters with arbitrary orders and initial conditions Summary Exercises Properties and Applications of Digital Filters with Nonlinearities Admissibility of symbolic sequences Statistical property Computer cryptography via digital filters associated with nonlinearities Summary Exercises
152 152 156 162 170 171
Chapter 10
172 172 179 188 195 197
Further Reading
199
Index
205
Preface
Digital filters may be one of the most important building blocks in electrical and electronic engineering. They are widely employed in signal processing, communications, control, circuits design, electrical engineering and biomedical engineering communities. However, as digital filters are linear time invariant systems, any nonlinear behaviors occur in digital filters should be avoided. The first observed nonlinear phenomenon was the limit cycle behavior discovered in 1965 by implementing a digital filter via a finite state machine. Since then, engineers have tried to avoid the occurrence of the limit cycle behavior. In 1988, L. O. Chua and T. Lin (Chaos in Digital Filters, IEEE Transactions on Circuits and Systems, Vol. 35, no. 6, pp. 648–658) observed that besides the occurrence of the limit cycle behavior, digital filter may exhibit fractal behaviors if implemented via the two’s complement arithmetic. This observation implies that digital filters associated with nonlinearities may exhibit chaotic behaviors and this property may be utilized in some applications. While avoiding the occurrence of nonlinear behaviors, engineers began investigating the applications of digital filters with nonlinearities and found that many applications – such as computer cryptography – secure communications, etc. Hence, the subject of nonlinear digital filters plays an increasingly important role in electrical and electronic engineering. However, most nonlinearities associated with digital filters are discontinuous. For examples, quantization, saturation and two’s complement arithmetic, all involve discontinuous nonlinear function. The analysis of systems with discontinuous nonlinearities is difficult and not many existing techniques can be applied for the analysis of these systems. Hence, the objective of this book is to introduce techniques for the analysis of digital filters with various nonlinearities as well as to explore applications using digital filters associated with nonlinearities. From Chapter 3 through to Chapter 9, techniques for the analysis of digital filters associated with various nonlinearities will be introduced. In Chapter 10, application of digital filters associated with nonlinearities is explored. I believe that this book would be very useful for those engineers who deal with nonlinearities of digital filters. Also, it starts from very simple and fundamental techniques (initially introduced in first or second year courses) and is suitable vii
viii
Preface
for both the third year undergraduate and postgraduate student. In order to improve the readability of this book, examples are presented in each section or subsection and these examples directly illustrate the main concepts found in that section or subsection. Wing-Kuen Ling
This page intentionally left blank
In addition to the material covered in the text, Matlab source codes for the figures can be found on the textbook website: http://books.elsevier.com/companions/ 798123725363.
1 INTRODUCTION
WHY ARE DIGITAL FILTERS ASSOCIATED WITH NONLINEARITIES? Nonlinearities are associated with digital filters mainly for implementation reasons and are tailor-made for many applications. Nonlinearities due to implementation reasons The most common nonlinearities associated with digital filters due to implementation reasons are quantization, saturation and two’s complement. Quantization occurs because of the finite word length effects. Saturation occurs because of a constraint being imposed on the maximum bound of signals. Two’s complement operation occurs because of the overflow of signals to their sign bits. Although most computers these days are more than 64 bits—and floating point arithmetic is employed for the implementation—the cost of using computers to implement a simple digital filter is very high. Thus, many simple digital filters are still implemented using very simple circuits or microcontrollers because of their low cost. In these situations, only 8, or even lower, bits fixed point arithmetic are employed for the implementation. As a result, effects due to the quantization, saturation and two’s complement would be significant. Hence, the analysis and design of digital filters under these nonlinearities are important. Quantization Quantization is a nonlinear map that partitions the whole space and represents all of the values in each subspace by a single value. For example, for real input signals, if the input to the quantizer is nonnegative, then the output of the quantizer is represented by the value ‘1’, and ‘–1’ for other values. In this example, the set of real numbers is partitioned into two subsets, nonnegative and negative. ‘1’ and ‘–1’ are used for the representation of all values in these two subsets. It is worth noting that quantization is a noninvertible map. Hence, once 1
2
1 Introduction
0.8
1
0.6
0.6
0.8
0.4
0.4
0.2
0.2
0
⫺0.2
⫺0.4
⫺0.4
⫺0.6
⫺0.6
(a)
0 0.5 Input
⫺0.8 ⫺1 ⫺0.5
1 (b)
0.4
0
⫺0.2
⫺0.8 ⫺1 ⫺0.5
0.6
Output
Output
Output
0.8
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8
0 0.5 Input
⫺1 ⫺1 ⫺0.5
1
0 0.5 Input
1
(c)
Figure 1.1 Input output relationships of 4 bit (a) Lloyd Max quantizer with Gaussian input statistics, (b) μ law quantizer with μ = 100 and (c) uniform quantizer.
a quantization is applied, information is lost and error would be introduced. As a result, one of the most important issues in quantization is to minimize the quantization error. Quantization can be classified as uniform quantization and nonuniform quantization. Uniform quantization partitions the whole space in a uniform manner, and vice versa for the nonuniform quantization. The most common nonuniform quantizers are the Lloyd Max quantizer and the μ law quantizer, as shown in Figure 1.1a and 1.1b, respectively. It can be seen from this figure that the quantization step sizes are unevenly distributed, while that of the uniform quantizer shown in Figure 1.1c is evenly distributed. Another type of classification of quantization is based on the number of subspaces that are partitioned. For an N bit quantization, the whole space can be partitioned into 2N subspaces. In Figure 1.2, three 4-bit quantizers are shown, so there are exactly 16 quantization levels in each of the quantizers. In general, more bits of the quantizers would give less quantization error. However, the implementation complexity would be increased. Quantizers can also be classified as midrise or midthread quantizer. A midrise quantizer is the one that has a transition at the origin, and vice versa for the midthread quantizer. Figure 1.2a and 1.2b show the midrise and midthread quantizers, respectively. Saturation Saturation maps the whole space within a bounded subspace. The boundary of the bounded subspace is characterized by the saturation level. For example, an
3
1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2 Output
Output
Why are Digital Filters Associated with Nonlinearities?
0
0
⫺0.2
⫺0.2
⫺0.4
⫺0.4
⫺0.6
⫺0.6
⫺0.8
⫺0.8
⫺1 ⫺1
⫺0.5
0
0.5
⫺1 ⫺1
1
⫺0.5
Input (a)
0
0.5
1
Input (b)
Figure 1.2 Input output relationships of 4 bit (a) midrise quantizer and (b) midthread quantizer.
output of a saturator is 1 and –1 if the input is greater than 1 and smaller than −1, respectively, and the saturation level of this saturator is 1. Figure 1.3 shows the input output relationship for this saturator. Two’s complement Two’s complement partitions the whole space into periodic subspaces and maps all subspaces into a single subspace. For example, the set of real numbers is divided into subsets with periodic 2 and all real values are mapped to values between –1 and 1 as shown in Figure 1.4. Nonlinearities due to tailor-made applications Digital filters are widely used in many applications in signal processing, communications, control, electrical and biomedical systems. For examples, coding and compression, denoising, signal enhancement, feature detection and extraction, amplitude and frequency demodulations, the Hilbert transform, analog-todigital conversions, differentiation, accumulation or integration, etc., all involve digital filters. For some applications, nonlinearities are tailor-made to fit for a particular purpose. Denoising application Figure 1.5b shows an image corrupted by an additive white Gaussian noise. The mean square error of the noisy image is 1605.8382. Figure 1.5c shows a
4
1 Introduction
1 0.8 0.6 0.4
Output
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺2
⫺1.5
⫺1
⫺0.5
0
0.5
1
1.5
2
Input Figure 1.3 Input output relationship of a saturator with saturation level equal to 1.
1 0.8 0.6 0.4
Output
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺5
⫺4
⫺3
⫺2
⫺1
0
1
2
3
Input Figure 1.4 Input output relationship of a two’s complement nonlinearity.
4
5
5
Why are Digital Filters Associated with Nonlinearities?
50
50
50
100
100
100
150
150
150
200
200
200
250
250
250
300
300
300
350
350
350
400
400
400
450
450
450
500
500 100
200
300
400
(a)
500 100
500
200
300
400
500
(b)
100
200
300
400
500
(c)
Figure 1.5 (a) Original image, (b) image corrupted by an additive white Gaussian noise and (c) image after lowpass filtering.
lowpass filtered image. The mean square error of the filtered image drops to 167.7439. This example illustrates that lowpass filtering can reduce an additive white Gaussian noise effectively. Another method for reducing additive white Gaussian noise is via the wavelet denoising approach. In this approach, signals are decomposed into different scales via a wavelet transform and wavelet coefficients are set to zero if their magnitudes are smaller than a certain threshold. It was found that this nonlinear technique can reduce additive white Gaussian noise effectively. Coding application Another application for imposing quantization and saturation intentionally in signal processing is coding and compression processes. Figure 1.6 shows
0.0367bpp
0.0524bpp
0.1442bpp
0.2808bpp
0.03738bpp
0.05368bpp
0.1443bpp
0.2822bpp
Figure 1.6 Quantized images.
6
1 Introduction
some compressed images at different bit rates via quantization. After applying quantization, these images can be transmitted and stored efficiently.
CHALLENGES FOR THE ANALYSIS AND DESIGN OF DIGITAL FILTERS ASSOCIATED WITH NONLINEARITIES A nonlinear system is said to be exhibiting:
• a limit cycle behavior if it exhibits a nontrivial periodic output behavior • a fractal behavior if there is a self-similar geometric pattern exhibited on the
phase plane and this self-similar geometric pattern is repeated at ever smaller scales to produce irregular shapes and surfaces that cannot be represented by classical geometry • an irregular chaotic behavior if it is sensitive to its initial condition, a state trajectory is dense and consists of dense periodic orbits, but fractal patterns do not exhibit on the phase plane • a nonlinear divergent behavior if some state variables tend to infinity but the corresponding linear part is strictly stable. Although linear system theories are reasonably well-developed, these theories cannot be applied when trying to explain the above phenomena. This is because nonlinear systems are highly dependent on initial conditions and system parameters, while these properties are not found in linear systems. For nonlinear systems, it is useful to characterize the set of initial conditions and system parameters such that these phenomena would be utilized or avoided. For example, in audio applications, limit cycles correspond to annoying audio tones. Hence, it should be avoided. Moreover, nonlinear divergent behaviors should also be avoided because circuits may be damaged and serious disaster may occur. In secure communications, fractal and chaotic behaviors may be preferred because they correspond to a rich frequency spectrum. Analyzing the stability property of nonlinear systems is also very challenging. Although Lyapunov stability theorem is powerful, it does not explain limit cycle, fractal and chaotic behaviors. Also, Lyapunov stability theorem requires a smooth Lyapunov candidate, which is difficult to find when the nonlinear function is discontinuous. In sigma delta modulation, digital filters are usually designed in an unstable manner in order that a high signal-to-noise ratio can be achieved. In this case, it is very challenging to design a digital filter such that the stability of the system is guaranteed and limit cycle behavior is avoided.
An Overview
7
AN OVERVIEW This book is organized as follows. In Chapter 2, fundamentals of mathematics, digital signal processing and control theory, used throughout the book, are reviewed. These include linear algebra, fuzzy theory, sampling theorem, bifurcation theorem and absolute stability theorem. From Chapters 3 to 9, digital filters associated with different nonlinearities are discussed. In Chapter 3, digital filters associated with the quantization nonlinearity are covered, and models for the quantization nonlinearity are introduced. Based on these quantization models, methods for improving the signal-to-noise ratios are presented. In Chapter 4, digital filters associated with the saturation nonlinearity are considered. Since oscillations may sometimes occur, the conditions for the occurrence of these oscillations and the stability conditions are presented, which is useful for both utilizing and avoiding the occurrence of these oscillations. From Chapters 5 to 8, digital filters associated with the two’s complement arithmetic are discussed. Chapters 5, 6 and 7 cover autonomous, step and sinusoidal responses, respectively. In Chapter 8, complex digital filters associated with two’s complement are considered, and in Chapter 9, digital filters associated with both the quantization and two’s complement arithmetic are dealt with. Finally, in Chapter 10, applications of digital filters associated with nonlinearities are presented; in particular, this chapter examines the applications on secure communications and computer cryptography.
2 REVIEWS
MATHEMATICAL PRELIMINARY Eigen decomposition Suppose an n × n matrix A has n linear independent eigenvectors, denoted as ξi for I = 1, 2, . . . , n and the corresponding eigenvalues are λi . Denote T ≡ [ξ1 , ξ2 , . . . , ξn ] and D ≡ diag(λ1 , λ2 , . . . , λn ). Then A is diagonalizable and A = TDT−1 . By employing the eigen decomposition, it can facilitate the evaluation of a power of a matrix. For example, if A has n linear independent eigenvectors, then Ak = TDk T−1 . If ∃ j ∈ {1, 2, . . . , n} such that |λj | > 1, then some of the elements in limk→+ ∞ Ak would be unbounded. Hence, the BIBO stability condition of a discrete time linear system becomes all eigenvalues confined inside the unit circle.
Inverse of a map A map F : X → Y is said to be injective if ∃x1 , x2 ∈ X and y ∈ Y such that F(x1 ) = F(x2 ) = y, then x1 = x2 . A map F : X → Y is said to be surjective if ∀y ∈ Y , ∃x ∈ X such that F(x) = y. A map is said to be bijective if it is both injective and surjective. A map is invertible if and only if it is bijective.
Fuzzy theory Fuzzy set In traditional set theory, an element is either in or not in a set A, that is x ∈ A or x∈ / A. This kind of set is called a crisp set. A fuzzy set is a set that is characterized 8
Mathematical Preliminary
9
by a fuzzy membership function μA (x) ∈ [0,1]. If μA (x) = 0, it implies that x ∈ / A. On the other hand, if μA (x) = 1, then x ∈ A. Common fuzzy membership functions The most common fuzzy membership functions are impulsive fuzzy 1 x = x0 membership function μA (x) ≡ , triangular fuzzy member0 otherwise ⎧ x−x0 ⎪ ⎨ a + 1 x0 − a ≤ x ≤ x0 ship function μA (x) ≡ x0b−x + 1 x0 < x ≤ x0 + b where a, b > 0, right sided ⎪ ⎩ 0 otherwise ⎧ 1 x ≥ x0 ⎨ x−x0 + 1 x − a ≤ x < x0 trapezoidal fuzzy membership function μA (x) ≡ 0 ⎩ a 0 otherwise where ⎧ a > 0, left sided trapezoidal fuzzy membership function x ≤ x0 − a ⎨ 1 x −x x0 − a < x ≤ x0 where a > 0, and Gaussian fuzzy memberμA (x) ≡ 0 a ⎩ 0 otherwise −
ship function μA (x) ≡ e
(x − x0 )2 2σ 2
.
Fuzzy operations In the traditional binary logics, all combinational logics can be represented by combinations of complement, intersection and union of binary variables because all Boolean equations can be represented by sum of products or product of sums. Hence, there are three fundamental operations in fuzzy logics and these operations represent the traditional complement, intersection and union operations. For the fuzzy complement operations, the fuzzy set A maps to a fuzzy set A with the fuzzy membership function μA (x) ≡ c(μA (x)) satisfying c(0) = 1, c(1) = 0 and ∀x1 , x2 ∈ [0,1] c(x1 ) > c(x2 ) for x1 < x2 . The most common fuzzy complement operations are the Sugeno operaa tion cλ (a) ≡ 11+−λa for λ > −1λ > −1 and ∀a ∈ [0, 1], and Yager operation 1
cw (a) ≡ (1 − aw ) w for w > 0 and ∀a ∈ [0,1].
For the fuzzy intersection operations, the fuzzy sets A and B map to a fuzzy set A ∩ B with the fuzzy membership function μA∩B (x) ≡ t(μA (x), μB (x)) satisfying t(0, 0) = 0, t(1, a) = t(a, 1) = a ∀a ∈ [0, 1], t(a, b) = t(b, a) ∀a, b ∈ [0, 1], t(t(a, b), c) = t(a, t(b, c)) ∀a, b, c ∈ [0, 1], and t(a, b) ≤ t(a′ , b′ ) for a ≤ a′ , b ≤ b′ and a, a′ , b, b′ ∈ [0, 1].
10
2 Reviews
The most common types of fuzzy intersection operations are the Dombi operation tλ (a, b) ≡
1 1+
1 a
−1
λ
+
the Dubois-Prade operation tα (a, b) ≡
1 b
ab max(a, b, α)
for λ > 0 and ∀a, b ∈ [0, 1],
λ λ1 −1
for α ∈ [0, 1] and ∀a, b ∈ [0, 1],
the Yager operation 1
tw (a, b) ≡ 1−min 1, (1 − a)w + (1 − b)w w for w > 0 and ∀a, b ∈ [0, 1],
the drastic product operation
⎧ ⎨a tdp (a, b) ≡ b ⎩ 0
b=1 a=1 otherwise
∀a, b ∈ [0, 1],
the Einstein operation
tep (a, b) ≡ algebraic product operation
ab 2 − (a + b − ab)
tap (a, b) ≡ ab
and the minimum operation
∀a, b ∈ [0, 1],
∀a, b ∈ [0, 1]
tmin (a, b) ≡ min(ab)
∀a, b ∈ [0, 1].
For any fuzzy intersection operations t(a, b), it was found that tap (a, b) ≤ t(a, b) ≤ tmin (a, b) ∀a, b ∈ [0, 1]. For the fuzzy union operations, the fuzzy sets A and B map to a fuzzy set A ∪ B with the fuzzy membership function μA∪B (x) ≡ s(μA (x), μB (x)) satisfying s(1, 1) = 1, s(0, a) = s(a, 0) = a ∀a ∈ [0, 1], s(a, b) = s(b, a) ∀a, b ∈ [0, 1], s(s(a, b), c) = s(a, s(b, c)) ∀a, b, c ∈ [0,1], and s(a, b) ≤ s(a′ , b′ ) for a ≤ a′ , b ≤ b′ and a, a′ , b, b′ ∈ [0,1]. The most common types of fuzzy union operations are the the Dombi operation sλ (a, b) ≡
1 1+
1 a
−1
−λ
the Dubois-Prade operation sα (a, b) ≡
+
1 b
−λ − λ1 −1
a + b − ab − min(a, b, 1 − α) max(1 − a, 1 − b, α)
for λ > 0 and ∀a, b ∈ [0, 1],
for ∀a ∈ [0, 1] and ∀a, b ∈ [0, 1],
Mathematical Preliminary
11
the Yager operation 1
sw (a, b) ≡ min 1, aw + bw w
for w > 0 and ∀a, b ∈ [0, 1],
the drastic sum operation
⎧ ⎨a sds (a, b) ≡ b ⎩ 1
b=0 a=0 otherwise
∀a, b ∈ [0, 1],
the Einstein operation
ses (a, b) ≡ algebraic sum operation
a+b 1 + ab
sas (a, b) ≡ a + b − ab
∀a, b ∈ [0, 1], ∀a, b ∈ [0, 1]
and the maximum operation smax (a, b) ≡ max(a, b) ∀a, b ∈ [0, 1]. For any fuzzy union operations s(a, b), it was found that smax (a, b) ≤ s(a, b) ≤ sds (a, b) ∀a, b ∈ [0,1]. Hence, the fuzzy intersection and union operations cannot cover the interval [min(a, b), max(a, b)]. The operations that cover the interval [min(a, b), max(a, b)] are called the fuzzy averaging operations. The most common fuzzy averaging operations are the maxmin average operation vλ (a, b) ≡ λmax(a, b) + (1 − λ)min(a, b) for λ ∈ [0,1] and ∀a, b ∈ [0,1], generalized mean operations 1 α a + bα α να (a, b) ≡ 2
for α = 0 and ∀a, b ∈ [0, 1],
fuzzy “and” operations
νp (a, b) ≡ p min(a, b) +
(1 − p)(a + b) 2
for p ∈ [0, 1] and ∀a, b ∈ [0, 1],
and fuzzy “or” operations (1 − γ)(a + b) for γ ∈ [0, 1] and ∀a, b ∈ [0, 1]. 2 Clearly, vλ (a, b) and vα (a, b) cover the whole interval [min(a, b), max(a, b)] as λ changing from 0 to 1 and α changing from −∞ to +∞, respectively. On the other hand, vp (a, b) and vγ (a, b) cover the ranges min(a, b), a+b and 2
a+b 2 , max(a, b) , respectively. νγ (a, b) ≡ γ max(a, b) +
12
2 Reviews
Fuzzy relations and fuzzy compositions A fuzzy relation Q in U1 × U2 × · · · × Un is defined as Q ≡ {(u1 × u2 × · · · × un ), μQ (u1 × u2 × · · · × un ) | (u1 × u2 × · · · × un ) ∈ U1 × U2 × · · · × Un }, where μQ : U1 × U2 × · · · × Un → [0, 1]. Suppose P(U, V ) and Q(V , W ) are two fuzzy relations. P ◦ Q is the composition of P(U, V ) and Q(V , W ) if and only if μP◦Q (x, z) = max t(μP (x, y), μQ (y, z)) ∀(x, z) ∈ U × W . The most y∈V
common fuzzy compositions are the maxmin composition μP◦Q (x, z) ≡ max min(μP (x, y), μQ (y, z)) and the max product composition μP◦Q (x, z) ≡ y∈V
max(μP (x, y), μQ (y, z)). y∈V
Linguistic variables If a variable can take words in natural languages as its values, it is called a linguistic variable, where the words are characterized by fuzzy sets. A linguistic variable is characterized by (X, T , U, M), where X is the name of the linguistic variable, T is the set of linguistic values that X can take, U is the actual physical domain in which the linguistic variable X takes its quantitative values, and M is a set of semantic rules which relates each linguistic values in T with a fuzzy set. For example, X is the speed of a car, T = {slow, medium, fast}, U = [0, VMAX ], and M consists of three fuzzy membership functions that describe slow, medium and fast. Fuzzy if then rules A fuzzy if then rule is a conditional statement expressed in the form of “IF fuzzy proposition 1 (FP1 ), then fuzzy proposition 2 (FP2 )”, where there are two types of fuzzy propositions, an atomic fuzzy proposition and a compound fuzzy proposition. An atomic fuzzy proposition is a single statement “x is A”, in which x is a linguistic variable and A is a linguistic value of x. A compound fuzzy proposition is a composition of atomic fuzzy propositions using the connectives “and”, “or” and “not” which represent fuzzy intersection, fuzzy union and fuzzy complement, respectively. For example, “x is A and x is not B”. The fuzzy if then rule is a fuzzy implication. The most common fuzzy implications are the Dienes-Rescher implication μQD (x, y) ≡ max(1 − μFP1 (x), μFP2 (y)), the Lukasiewicz implication μQL (x, y) ≡ min(1, 1 − μFP1 (x) + μFP2 (y)), the Zadeh implication μQZ (x, y) ≡ max(min(μFP1(x), μFP2 (y), 1 − μFP1 (x))),
Backgrounds on Signals and Systems
the Gödel implication μQG (x, y) ≡
1 μFP2 (y)
13
μFP1 (x) ≤ μFP2 (y) and otherwise
the Mamdani implications μQMM (x, y) ≡ min(μFP1 (x), μFP2 (y)) or μQMP (x, y) ≡ μFP1 (x)μFP2 (y). It was found that μQZ (x, z) ≤ μQD (x, z) ≤ μQL (x, z). Definitions and reasons for employing fuzzy systems Fuzzy systems are knowledge based or rule based systems which consist of fuzzy if then rules. The real world is too complicated that precise descriptions cannot be obtained. Therefore, approximation is required to model real systems. Moreover, in order to formulate human knowledge in a systematic manner and put it into engineering systems together with other information like mathematical models and sensory measurements, fuzzy systems are employed. Classifications and examples of fuzzy systems There are three common types of fuzzy systems, pure fuzzy systems, TakagiSugeno-Kang (TSK) fuzzy systems and fuzzy systems with fuzzifier and defuzzifier. The pure fuzzy systems map the input fuzzy sets to output fuzzy sets via a fuzzy inference engine which consists of a set of fuzzy if then rules. The TSK fuzzy systems formulate the fuzzy if then rules via a weighted average fuzzy inference engine. Fuzzy systems with fuzzifier and defuzzifier employ the fuzzifier to map the real valued variables into fuzzy sets and the defuzzifier transforms fuzzy sets into real valued variables. The most common fuzzy systems employed in industries are fuzzy washing machines, fuzzy image stabilizers, fuzzy car systems, etc.
BACKGROUNDS ON SIGNALS AND SYSTEMS Definition of signals Signals are usually used for describing physical phenomena. For examples, speech, music, text, image, video, electrocardiogram, electromyogram, genomic sequences, etc., all are signals. They are represented mathematically as functions of one or more independent variables. Consider a map x which maps the domain A to the range B, that is, x : A → B. Then x is a signal.
14
2 Reviews
Classifications of signals Continuous time and discrete time signals If A is a continuous set, then x is called a continuous time signal. For example, a one-dimensional real time function is a continuous time signal. This is because A is the set of real numbers and it is a continuous set. In this case, x : ℜ → ℜ, denoted as x(t), where t ∈ ℜ, is a continuous time signal. On the other hand, if A is a discrete set, then x is called a discrete time signal. For example, a one-dimensional real time sequence is a discrete time signal. This is because A is the set of integers and it is a discrete set. In this case, x : Z → ℜ, denoted as x(n), where n ∈ Z, is a discrete time signal. Periodic and aperiodic signals If an element in A exists such that the signal repeats itself after that element, then the signal is called a periodic signal. For example, for a one-dimensional time function, if ∃T ∈ ℜ such that x(t) = x(t + T ) ∀t ∈ ℜ, then x(t) is periodic with period T . Since if ∃T ∈ ℜ such that x(t) = x(t + T ) ∀t ∈ ℜ, then x(t) = x(t + nT ) ∀t ∈ ℜ and ∀n ∈ Z. The minimum value of T ∈ ℜ+ such that x(t) = x(t + T ) ∀t ∈ ℜ is called the fundamental period. Pure complex exponential signals, that is x(t) = ejω0 t for ω0 = 0, are periodic. This is because ejω0 t = ej(ω0 t+2πn) ∀n ∈ Z. Hence, ∃T = 2π ω0 ∈ ℜ such that x(t) = x(t + T ) ∀t ∈ ℜ. Similarly, for a one-dimensional time sequence, if ∃N ∈ Z such that x(n) = x(n + N) ∀n ∈ Z, then x(n) is periodic with period N. If a signal is not periodic, then it is called aperiodic signal. Odd and even signals Another type of classification of signals is based on the symmetric property of the signals. For a one-dimensional continuous time signal, if x(t) = −x(−t) ∀t ∈ ℜ, then x(t) is called an odd signal. On the other hand, if x(t) = x(−t) ∀t ∈ ℜ, then x(t) is called an even signal. Similarly, for a one-dimensional time sequence, if x(n) = −x(−n) ∀n ∈ Z, then x(n) is called an odd signal. On the other hand, if x(n) = x(−n) ∀n ∈ Z, then x(n) is called an even signal. It is worth noting that many signals are neither even nor odd. Common signals The most common signals employed for an analysis are impulse, step and pure complex exponential signals, denoted as δ(t), u(t) and ejω0 t for the continuous time case, respectively, and δ(n), u(n) and ejω0 n for the discrete +∞ time case, respectively. Impulse signals are defined as δ(t) = 0 for t = 0 and −∞ δ(t)dt = 1
15
Backgrounds on Signals and Systems
1 n=0 for the continuous time case, and δ(n) = for the discrete time case. 0 n = 0 1 t≥0 Step signals are defined as u(t) = for the continuous time case and 0 t<0 1 n≥0 u(n) = for the discrete time case. Impulse signals are very important 0 n<0 for an analysis because any bounded signals can be represented as a convolution +∞ of impulse signals and itself. That is x(t) = −∞ x(τ)δ(t − τ)dτ for the con tinuous time case and x(n) = +∞ k→−∞ x(k)δ(n − k) for the discrete time case. Hence, from the time domain point of view, shifted impulses form a basis of any bounded signals. If the pure complex exponential signals are transformed into the frequency domain via Fourier transform which is discussed in Section 2.2.8, then there is a single impulse exhibited in the frequency domain. Hence, from the frequency domain point of view, pure complex exponential signals also form a basis for any bounded signals. Definition of systems Systems are maps from a set of input signals to a set of output signals. Denote X and Y as the set of input and output signals. Denote a map T from X to Y , that is, T : X → Y . Then T is a system. Classification of systems If both inputs and outputs of the systems are continuous time signals, then the systems are called continuous time systems. If both inputs and outputs of the systems are discrete time signals, then the systems are called discrete time systems. On the other hand, if the inputs of the systems are continuous time signals while the outputs of the systems are discrete time signals, or vice versa, these are called dual systems. For examples, analog-to-digital or digital-toanalog converters are dual systems. Properties of systems A system is said to be:
• Linear holds. That is if yi = T (xi ) ∀i, then if superposition
∀i ai yi = ∀a a x ∈ C. RLC circuits are examples of linear systems T i i i ∀i • Nonlinear if superposition does not hold. Switching circuits are examples of nonlinear systems • Time invariant if y(t − T ) = T (x(t − T )) ∀T ∈ ℜ and ∀t ∈ ℜ for continuous time systems and y(n − N) = T (x(n − N)) ∀N ∈ Z and ∀n ∈ Z for discrete
16
• • • • • •
• • •
2 Reviews
time systems. An aliasing free filter bank is an example of time invariant systems Time varying if it is not time invariant. An incompatible nonuniform filter bank is an example of time varying systems Causal if current output only depends on previous or current input. All practical systems are causal Strictly causal if current output only depends on previous input. A pure delay system is an example of strictly causal systems Memoryless or static if current output only depends on current input. A quantizer is an example of memoryless systems With memory or dynamical if it is not memoryless. A hysteresis system is an example of dynamical systems Bounded input bounded output (BIBO) stable if the outputs of the system is bounded for all bounded inputs. That is ∀t ∈ ℜ, if ∃M ∈ ℜ+ such that |x(t)| < M, then ∀t ∈ ℜ, ∃M ′ ∈ ℜ+ such that |y(t)| < M ′ for the continuous time case, and ∀n ∈ Z, if ∃M ∈ ℜ+ such that |x(n)| < M, then ∀n ∈ Z, ∃M ′ ∈ ℜ+ such that |y(n)| < M ′ for the discrete time case. BIBO unstable if it is not BIBO stable. Invertible if ∀y(t) ∈ B, ∃x(t) ∈ A such that T (x(t)) = y(t) ∀t ∈ ℜ for the continuous time case, and if ∀y(n) ∈ B, ∃x(n) ∈ A such that T (x(n)) = y(n) ∀n ∈ Z for the discrete time case. An integrator is an example of invertible systems. Noninvertible if it is not invertible. A differentiator is an example of noninvertible systems.
There are some other definitions of stability of systems. For example:
• An equilibrium state x0 is said to be stable if ∀R > 0, ∃r > 0 such that
x(0) − x0 < r implies x(t) − x0 < R ∀t > 0 for the continuous time case, and ∀R > 0, ∃r > 0 such that x(0) − x0 < r implies x(n) − x0 < R ∀n > 0 for the discrete time case. A pendulum is an example of stable systems. • If the above condition is not satisfied, then the equilibrium state x0 is said to be unstable. An inverted pendulum is an example of unstable systems. • An equilibrium state x0 is said to be asymptotically stable if it is stable and ∃r ′ > 0 such that x(0) − x0 < r ′ implies x(t) − x0 → 0 as t → +∞ for the continuous time case, and ∃r ′ > 0 such that x(0) − x0 < r ′ implies x(n) − x0 → 0 as n → +∞ for the discrete time case. • An equilibrium state x0 is said to be exponentially stable if, for the continuous time case, ∃α, λ > 0 such that ∀t > 0 x(t) − x0 < αx0 e−λt for some ball Br around x0 , and for the discrete time case, ∃α, λ > 0 such that ∀n > 0 x(n) − x0 < αx0 e−λn for some ball Br around x0 .
Backgrounds on Signals and Systems
17
• If asymptotic stability holds for any initial states, the equilibrium point is said to be asymptotically stable in the large or globally asymptotically stable.
• Similarly, if exponential stability holds for any initial states, the equilibrium
point is said to be exponential stable in the large or globally exponential stable.
Digital filters Definition of digital filters Digital filters are discrete time systems that are characterized by their frequency responses. Classifications of digital filters Based on the frequency characteristics The most common method for the classification of digital filters is based on their frequency selectivity, such as grouping them as lowpass filters, highpass filters, allpass filters, bandpass filters, band rejected filters, notch filters, oscillators, etc. Lowpass filters allow the low frequency components of the input signals to pass through while the high frequency components are attenuated. Highpass filters are the opposite. Allpass filters allow all frequencies of the input signals to pass through. Bandpass filters allow a particular band of frequency of the input signals to pass through and the rest frequency components are attenuated. Band rejected filters are the opposite. Notch filters only reject a particular frequency of the input signals to pass through and allow the rest frequency components to pass through. Oscillators are the vice versa. Figure 2.1 shows the magnitude responses of various filters. Based on the impulse and frequency responses If the impulse response of a digital filter has finite support or finite length, then the digital filter is called the finite impulse response (FIR). Otherwise, it is called the infinite impulse response (IIR). If the transfer function of the digital filter is rational, then the digital filter is called rational. It is worth noting that IIR filters are not necessarily rational. For example, an ideal lowpass filter is not rational but it is IIR. If the impulse response of the digital filter is symmetric, then the digital filter is called symmetric. On the other hand, if the impulse response of the digital filter is antisymmetric, then the digital filter is called antisymmetric. It is worth noting that many digital filters are neither symmetric nor antisymmetric. If the phase response of the digital filter is linear, the digital filter is called the linear phase. Otherwise, it is called the nonlinear phase. All symmetric and antisymmetric digital filters are linear phase. It is worth noting
2 Reviews
1
0.5
0
0
2 Frequency v
4
(d)
1
0.5
0
0
2 Frequency v
4
(b)
1
0.5
0
0
2 Frequency v
4 (e)
1.5
1
0.5
0
0
2 Frequency v
4
0
2 Frequency v
4
(c) 1.5
Magnitude response |H(v)|
1.5
Magnitude response |H(v)|
Magnitude response |H(v)|
(a)
1.5
Magnitude response |H(v)|
1.5
Magnitude response |H(v)|
Magnitude response |H(v)|
18
1
0.5
0
0
2 Frequency v
4
1.5
1
0.5
0
(f)
Figure 2.1 Magnitude responses of: (a) a lowpass filter; (b) a bandpass filter; (c) an oscillator; (d) a highpass filter; (e) a band rejected filter; (f) a notch filter.
that not all FIR filters are linear phase and not all IIR filters are nonlinear phase. For examples, if the FIR filter is neither symmetric nor antisymmetric, then it is nonlinear phase. Also, if both the numerator and denominator of a rational IIR filter is linear phase, then the IIR filter is linear phase. Linear phase digital filters are used in many signal processing applications. In particular, they are extensively employed in image and video signal processing because images and videos are phase sensitive. Figure 2.2 shows both the impulse and frequency responses of a symmetric FIR filter. It can be seen from Figure 2.2a that the impulse response is symmetric and finite length, so the phase response is linear, as shown in Figure 2.2c. Figure 2.3 shows both the impulse and frequency responses of an antisymmetric FIR filter. It can be seen from Figure 2.3a that the impulse response is antisymmetric and finite length, so the phase response is also linear as shown in Figure 2.3c. Figure 2.4 shows both the impulse and frequency responses of an IIR filter. It can be seen from Figure 2.4a that the impulse response is infinite length. Figure 2.4c shows that the phase response is nonlinear.
19
Backgrounds on Signals and Systems 20
0.6 0.5
0
0.4
⫺20
0 ⫺10
h(n)
0.3 0.2
Phase of H(v) (in radians)
20 log10(|H(v)|)
⫺20
⫺40 ⫺60
0.1
⫺80
0
⫺100
⫺0.1
⫺120
⫺30 ⫺40 ⫺50 ⫺60 ⫺70 ⫺80
0
20
40 60 Time index n
80
(a)
⫺90 0
1
2 Frequency
3
⫺100
4
(b)
0
1
2 3 Frequency
4
(c)
Figure 2.2 (a) Impulse response; (b) magnitude response; (c) phase response of a symmetric FIR filter.
20
50
0.5 0.4
0
0
0.3
20 log10(|H(v)|)
0.2
h(n)
0.1 0 ⫺0.1
Phase of H(v) (in radians)
⫺50 ⫺100 ⫺150 ⫺200
⫺0.2 ⫺250
⫺20
⫺40
⫺60
⫺0.3
⫺0.5
0
20
40
60
80
⫺350
0
1
2
3
4
⫺100
(b)
0
1
2
3
4
Frequency
Frequency
Time index n
(a)
⫺80
⫺300
⫺0.4
(c)
Figure 2.3 (a) Impulse response; (b) magnitude response; (c) phase response of an antisymmetric FIR filter.
Characteristics of digital filters The frequency bands that allow and reject the input signals to pass through are called the passbands and the stopbands, respectively. The frequency bands between the passbands and stopbands are called the transition bands. The bandwidth of a digital filter is defined as the total width of all passbands. The maximum absolute difference between the magnitude response of the digital filters and the desired values in all passbands is called the passband ripple magnitude, and that in the stopbands is called the stopband ripple magnitude. A represented frequency in a transition band is called the cutoff frequency.
20
2 Reviews 0.5
0
0 ⫺20
0.4
⫺5 Phase of H(v) (in radians)
⫺40 20 log (|H(v)|)
0.3 ⫺60 ⫺80
10
h(n)
0.2 0.1 0
⫺100 ⫺120 ⫺140
⫺0.1 ⫺0.2
⫺15
⫺20
⫺160 0
20
40
60
80
⫺180
0
1
2
3
⫺25
4
(b)
0
1
2
3
4
Frequency
Frequency
Time index n
(a)
⫺10
(c)
Figure 2.4 (a) Impulse response; (b) magnitude response; (c) phase response of an IIR filter.
Impulse, step and frequency responses Definitions of impulse and step responses Impulse response of a system is defined as the output of a system when the input is an impulse and it is denoted as h(t) for the continuous time case and h(n) for the discrete time case. Similarly, step response of a system is defined as the output of a system when the input is a step and it is denoted as s(t) for the continuous time case and s(n) for the discrete time case. Relationships among impulse response, properties of linear time invariant systems and their input output relationships For linear and time invariant systems, denoted as LTI systems, the input– output relationship of the systems isgoverned by a convolution of their impulse +∞ responses and inputs, that is y(t) = −∞ x(τ)h(t − τ)dτ for the continuous time +∞ case and y(n) = k→− ∞ x(k)h(n − k) for the discrete time case. Also, the causality condition of an LTI system reduces to h(t) = 0 ∀t < 0 for the continuous time case and h(n) = 0 ∀n ≤ 0 for the discrete time case. Similarly, the strictly causality condition of an LTI system reduces to h(t) = 0 ∀t ≤ 0 for the continuous time case and h(n) = 0 ∀n ≤ 0 for the discrete time case. The memoryless condition of an LTI system reduces to h(t) = Kδ(t) for the continuous time case and h(n) = Kδ(n) for the discrete time case, where K is a + constant. The +∞BIBO stability condition of an LTI system reduces to ∃M+ ∈ ℜ such that −∞ |h(t)|dt < M for the continuous time case and ∃M ∈ ℜ such that ∀n |h(n)| < M for the discrete time case. The invertible condition of +∞ an LTI system reduces to ∃g(t) such that −∞ g(τ)h(t − τ)dτ = δ(t) for the
Backgrounds on Signals and Systems
continuous time case and ∃g(n) such that discrete time case.
∀m
21
g(m)h(n − m) = δ(n) for the
Definitions of frequency responses If a pure complex exponential signal is input to an LTI system, then the output of the system is also a pure complex exponential signal with a gain in the magnitude and shift in the phase. The plot of the magnitude gain versus frequency, and that of the phase shift versus the frequency, is called the magnitude and phase responses, respectively. When these two responses are combined, it is called the frequency response and denoted as H(ω), where |H(ω)| is the magnitude response and ∠H(ω) is the phase response. Fourier analysis Definitions of continuous time Fourier transform, discrete time Fourier transform, and discrete Fourier transform The Fourier analysis evaluates signals and systems in the frequency +∞ domain. Continuous time Fourier transform of x(t) is defined as X(ω) = −∞ x(t)e−jωt dt and discrete time Fourier transform of x(n) is defined as X(ω) = ∀n x(n)e−jωn . It is worth noting that the discrete time Fourier transform is always 2π periodic, while this is not the case for the continuous time Fourier transform. Also, both the continuous time and discrete time Fourier transforms are defined in the frequency domain, which is a continuous domain. On the other hand, the − j2πnk ˜ N discrete Fourier transform of x(n) is defined as X(k) = N1 nN−1 for = 0 x(n)e k = 0, 1, . . . , N − 1, in which the discrete Fourier transform is a map from an N point sequence to an N point sequence. The inverse continuous time Fourier 1 +∞ jωt transform of X(ω) is defined as x(t) = 2π −∞ X(ω)e dω, the inverse discrete 1 π jωn dω, and the time Fourier transform of X(ω) is defined as x(n) = 2π −π X(ω)e N−1 j2πnk inverse discrete Fourier transform of X(k) is defined as x(n) = k=0 X(k)e N for n = 0, 1, . . . , N − 1. For a continuous time periodic signal with period T , X(ω) would consist of impulses located at 2πk T ∀k ∈ Z. Hence, its time domain j2πtk can be represented as continuous time Fourier series x(t) = ∀k ak e T , where jk2πt T ak = T1 0 x(t)e− T dt ∀k ∈ Z are called the continuous time Fourier coefficients. Similarly, for a discrete time periodic signal with period N, X(ω) would consist of impulses located at 2πk N for k = 0, 1, . . . , N − 1 and 2π periodic elsewhere. Hence, its time domain can be represented as discrete time Fourier series j2πnk 1 N−1 − jk2πn N , where ak = N are called the discrete x(n) = kN−1 n = 0 x(n)e = 0 ak e N time Fourier coefficients. It is worth noting that there are exactly N discrete time Fourier coefficients, while this is not the case for the continuous time Fourier coefficients.
22
2 Reviews
Relationships between Fourier coefficients and discrete Fourier transform Consider an N point discrete time signal x(n). Denote its discrete Fourier transform as X(k) for k = 0, 1, . . . , N − 1. Since x(n) is finite support, it is aperiodic and its discrete time Fourier transform X(ω) is a smooth 2π periodic function. By periodizing x(n) with period N, denoted as xp (n) = x(n) ∗ ∀k δ(n − kN), in which * denotes the convolution, xp (n) is periodic. Denote its discrete time Fourier as ak for k = 0, 1, . . . , N − 1. It can be shown series
for k = 0, 1, . . . , N − 1. Also, as xp (n) is periodic, that ak = X(k) = N1 X 2πk N
its discrete time Fourier transform consists of impulses located at 2πk N for k = 0, 1, . . . , N − 1. It can be shown that the magnitudes of the impulses are
2πk 2π which are also equal to 2πak or 2πX(k) for k = 0, 1, . . . , N − 1. N X N Advantages of employing Fourier analysis
The main advantage of employing the Fourier analysis for LTI systems is to evaluate the output of the systems via a multiplication instead of a convolution. By computing the Fourier transform of the input, output and the impulse response of the systems, denoted as X(ω), Y (ω) and H(ω), respectively, it can be shown that Y (ω) = X(ω)H(ω). Also, the invertibility of LTI systems can be concluded easily from H(ω). If ∃ω0 ∈ ℜ such that X(ω0 ) = 0, then the LTI systems are noninvertible. Laplace transform and z transform Definitions of Laplace transform and z transform +∞ Laplace transform of x(t) is defined as X(s) = −∞ x(t)e−st dt and z transform of x(n) is defined as X(z) = ∀n x(n)z−n . The inverse Laplace transform of σ+j∞ 1 st X(s) is defined as x(t) = 2πj σ−j∞ X(s)e ds where σ is the real part of s. The 1 inverse z transform of X(z) is defined as x(n) = 2πj X(z)zn−1 dz. Advantages of employing Laplace transform and z transform As with Fourier transforms, for continuous time LTI systems, Y (s) = X(s)H(s) where X(s), Y (s) and H(s) are the Laplace transform of the input, output and impulse response of the systems, respectively, and for discrete time LTI systems, Y (z) = X(z)X(z) where X(z), Y (z) and H(z) are the z transform of the input, output and impulse response of the systems, respectively. H(s) and H(z) are called the transfer functions. By using the Laplace transform or z transform,
Backgrounds on Signals and Systems
23
the output of LTI systems can be evaluated via multiplication instead of convolution. Region of convergences and their properties Denote the region of convergence, or simply ROC, of H(s) as the set of s such that H(s) are analytically defined. Similarly, denote the ROC of H(z) as the set of z such that H(z) are analytically defined. If ROC of H(s) contains the entire imaginary axis, or in other words, the continuous time Fourier transform is analytically defined ∀ω ∈ ℜ, then the corresponding continuous time LTI system is BIBO stable. Similarly, if ROC of H(z) contains the entire unit circle, or in other words, the discrete time Fourier transform is analytically defined ∀ω ∈ [−π, π], then the corresponding discrete time LTI system is BIBO stable. State space representations Advantages of employing state space representations Since the transfer functions only reflect the input–output relationship of systems, internal properties of the systems are not reflected by the transfer functions. To have more information about the internal properties of systems, state space representation is employed. State space representations of various systems For a continuous time system, define x(t), u(t) and y(t) as the state vector, input and output of the system. The state space representation is to represent a system in the form of dtd x(t) = f (x(t), u(t), t) and y(t) = g(x(t), u(t), t). If the system is linear, then four time varying matrices A(t), B(t), C(t) and D(t) exist, such that dtd x(t) = A(t)x(t) + B(t)u(t) and y(t) = C(t)x(t) + D(t)u(t). If the system is LTI, then four constant matrices A, B, C and D exist, such that dtd x(t) = Ax(t) + Bu(t) and y(t) = Cx(t) + Du(t). And the solut tions of the LTI system are x(t) = e(t−t0 )A x(t0 ) + t0 e(t−τ)A Bu(τ)dτ ∀t ≥ t0 t and y(t) = Ce(t−t0 )A x(t0 ) + C t0 e(t−τ)A Bu(τ)dτ + Du(t) ∀t ≥ t0 . Similarly, for a discrete time system, define x(k), u(k) and y(k) as the state vector, input and output of the system. The state space representation is to represent a system in the form of x(k + 1) = f (x(k), u(k), k) and y(k) = g(x(k), u(k), k). If the system is linear, then four time varying matrices A(k), B(k), C(k) and D(k) exist, such that x(k + 1) = A(k)x(k) + B(k)u(k) and y(k) = C(k)x(k) + D(k)u(k). If the system is LTI, then four constant matrices A, B, C and D exist, such that x(k + 1) = Ax(k) + Bu(k) and y(k) = Cx(k) + Du(k). And the solutions of
24
2 Reviews
n−k−1 Bu(k) ∀n ≥ n + 1 and the LTI system are x(n) = An−n0 x(n0 ) + n−1 0 k=n0 A n−1 n−n0 n−k−1 x(n0 ) + C k=n0 A Bu(n) + Du(k) ∀n ≥ n0 + 1. y(n) = CA Relationships between state space representations and transfer functions of LTI systems
The relationship between the transfer function and the state space matrices of LTI continuous time systems is H(s) = C(sI − A)−1 B + D, where I is an identity matrix. Similarly, the relationship between the transfer function and the state space matrices of LTI discrete time systems is H(z) = C(zI − A)−1 B + D. Realizations Different state space representations are called different realizations. It is worth noting that state space representations of systems are not uniquely defined. For LTI systems, different sets of state space matrices may correspond to the same transfer function, being related by similarity transform. Controllability and observability For a continuous time system, assume that x(0) = 0. ∀x1 , if ∃t1 > 0 and u(t) such that x(t1 ) = x1 , then the continuous time system is said to be reachable. Similarly, for a discrete time system, assume that x(0) = 0. ∀x1 , if ∃n1 > 0 and u(n) such that x(n1 ) = x1 , then the discrete time system is said to be reachable. For a continuous time system, if ∀x0 , x1 , ∃t1 > 0 and u(t) such that x(0) = x0 and x(t1 ) = x1 , then the continuous time system is said to be controllable. Similarly, for a discrete time system, if ∀x0 , x1 , ∃n1 > 0 and u(n) such that x(0) = x0 and x(n1 ) = x1 , then the discrete time system is said to be controllable. For LTI systems, the set of reachable state is R(|B AB · · · An B|), where R(A) is defined as the range of A, that is R(A) ≡ {y : y = Ax}. Also, the LTI systems are controllable if and only if R(A) = ℜn . Or in other words, rank(|B AB · · · An B|) = n. For a continuous time system, ∀x1 , if ∃t1 > 0 and u(t) such that x1 can be determined from y(t) for t > t1 , then the continuous time system is said to be observable. Similarly, for a discrete time system, ∀x1 , if ∃n1 > 0 and u(n) such that x1 can be determined from y(n) for n > n1 , then the discrete time system is said to be observable. For LTI systems, the set of unobservable state is ⎛⎡ ⎤⎞ C ⎜⎢ CA ⎥⎟ ⎜⎢ ⎥⎟ N ⎜⎢ .. ⎥⎟ , ⎝⎣ . ⎦ ⎠ CAn−1
Backgrounds on Sampling Theorem
25
where N(A) is defined as the null space of the kernel of A, that is N(A) ≡ {x : Ax = 0}. Also, the LTI systems are observable if and only if ⎤⎞ ⎛⎡ ⎤⎞ ⎛⎡ C C ⎜⎢ CA ⎥⎟ ⎜⎢ CA ⎥⎟ ⎥⎟ ⎜⎢ ⎥⎟ ⎜⎢ N ⎜⎢ .. ⎥⎟ = {0}. Or in other words, rank ⎜⎢ .. ⎥⎟ = n. ⎝⎣ . ⎦⎠ ⎝⎣ . ⎦ ⎠ CAn−1 CAn−1 BACKGROUNDS ON SAMPLING THEOREM Relationships among continuous time signals, sampled signals and discrete time signals in the frequency domain Denote a continuous time signal as x(t) and sampling frequency as fs . Then the sampling period is f1s and the continuous time sampled sig
nal is xs (t) = x(t) ∀n δ t − fns . By taking the continuous time Fourier transform on this sampled signal, we have Xs (ω) = fs ∀n X(ω − 2πfs n). Since Xs (ω) is periodic with period 2πfs , if X(ω) is bandlimited within (−πfs , πfs ), then X(ω) can be reconstructed via a simple lowpass filtering with passband of the filter (−πfs , πfs ). Hence, if a signal is bandlimited by (−πfs , πfs ), fs is the minimum sampling frequency that can guarantee perfect reconstruction. is called the Nyquist frequency. As
This frequency
n n n x(t) ∀n δ t − fs = ∀n x fs δ t − fs , by taking continuous time Fourier jωn transform on both sides, we have fs ∀n X(ω − 2πfs n) = ∀n x fns e− fs .
Denote a discrete time sequence as x fns , taking the discrete time Fourier
transform on this discrete time sequence, we have XD (ω) = ∀n x fns e−jωn .
Hence, we have XD ωfs = Xs (ω) = fs ∀n X(ω − 2πfs n). Relationships among upsampled signals, downsampled signals and original signals in the frequency domain Denote a discrete time signal as x(n) and it is upsampled by an expander with upsampling ratio L. Then the upsampled signal is ⎧ n
⎨x n is a multiple of L L . xL (n) = ⎩ 0 otherwise
26
x [n]
2 Reviews
H0(z)
↓N
↑N
F0(z)
H1(z)
↓N
↑N
F1(z)
…
…
…
…
HN⫺1(z)
↓N
↑N
FN⫺1(z)
y [n]
⫹
Figure 2.5 A uniform filter bank.
By taking the discrete time Fourier transform on this upsampled signal, we have XL (ω) = X(Lω), or by taking the z transform, we have XL (z) = X(zL ). Similarly, if a discrete time signal x(n) is downsampled by a decimator with downsampling ratio M, then the downsampled signal is xM (n) = x(Mn). By taking the discrete time Fourier transform on this downsampled signal, we
1 M−1 ω−2πk have XM (ω) = M k = 0 X , or by taking the z transform, we have
M 1 j2π 1 M−1 XM (z) = M k = 0 X z M W k , where W ≡ e− M . Filter bank systems Consider a filter bank system shown in Figure 2.5. A filter bank system is said to be aliasing free if it can be represented by an LTI system and achieve perfect reconstruction is a pure delay gain of its input. Since N−1 N−1 if its output k )H (zW k )F (z), the filter bank system achieves Y (z) = N1 i=0 X(zW i i k=0 aliasing free if and only if ∃T (z) such that ⎤ ⎡ ⎤⎡ ⎡ ⎤ H1 (z) ··· HN−1 (z) H0 (z) F0 (z) T (z) ⎥ ⎢ ⎢ ⎢ H0 (zW ) ⎥ H1 (zW ) ··· HN−1 (zW ) ⎥ ⎥ ⎢ F1 (z) ⎥ ⎢ 0 ⎥ ⎢ = ⎢ . ⎥, ⎥ ⎥ ⎢ ⎢ . .. .. . . .. .. ⎦ ⎣ .. ⎦ ⎣ .. ⎦ ⎣ . . H0 (zW N−1 ) H1 (zW N−1 )
· · · HN−1 (zW N−1 )
FN−1 (z)
0
and it achieves perfect reconstruction if and only if ∃c ∈ ℜ and ∃n0 ∈ Z such that T (z) = cz−n0 . It is worth noting that if both Hi (z) for i = 0, 1, . . . , N − 1 and Fj (z) for j = 0, 1, . . . , N − 1 are FIR, then perfect reconstruction condition requires ⎛⎡ ⎤⎞ H0 (z) H1 (z) ··· HN−1 (z) ⎜⎢ H0 (zW ) ⎟ H1 (zW ) ··· HN−1 (zW ) ⎥ ⎜⎢ ⎥⎟ det ⎜⎢ ⎟ = c′ z−n1 , ⎥ .. .. . . .. .. ⎝⎣ ⎦⎠ . . H0 (zW N−1 ) H1 (zW N−1 ) · · · HN−1 (zW N−1 )
27
Backgrounds on Bifurcation Theorem
x [n]
H0(z)
↓n0
↑n0
F0(z)
H1(z)
↓n1
↑n1
F1(z)
…
…
…
…
HN⫺1(z)
↓nN⫺1
↑nN⫺1
FN⫺1(z)
⫹
y [n]
Figure 2.6 A nonuniform filter bank.
u(k)
v(k) = 0 ⫹
y(k) G(z; µ)
⫹ e(k) f(e(k); µ)
⫺
d(k) = 0
⫹
Figure 2.7 Nonlinear feedback system.
where c′ ∈ ℜ and n1 ∈ Z. This kind of filter bank system is called the unimodular filter bank. Consider a nonuniform filter bank system as shown in Figure 2.6. In this N−1 1 ni −1 − j2π k k ni for case, Y (z) = i=0 k=0 X(zWni )Hi (zWni )Fi (z), where Wni ≡ e ni i = 0, 1, . . . , N − 1. For some set of decimation ratio, such as {2, 3, 6}, aliasing free condition cannot be achieved via non-ideal LTI filters. Hence, forget the perfect reconstruction. This kind of nonuniform filter bank is called an incompatible nonuniform filter bank.
BACKGROUNDS ON BIFURCATION THEOREM Suppose a discrete time system can be represented as x(k + 1) = Ax(k) + Bg(Cx(k); μ) and y(k) = Cx(k), where x(k) ∈ ℜn , A ∈ ℜnxn , B ∈ ℜnxl , C ∈ ℜmxn , y(k) ∈ ℜm , g(·) : ℜm × ℜ → ℜl is a smooth (C r , r ≥ 3) l dimensional vector field, k ∈ Z + ∪ {0} is the iteration index, and μ ∈ ℜ is the bifurcation parameter. It is worth noting that all of the matrices may depend on μ, and A may be a zero matrix. By introducing an arbitrary matrix D ∈ ℜlxm , which may also depend on μ, the system can be represented by a feedback system. The whole feedback system consists of the linear feedforward part G(z; μ) and the nonlinear feedback part f(e(k); μ) as shown in Figure 2.7, and the system can be described as x(k + 1) = Ax(k) + BDy(k) +
28
2 Reviews
⫹ u(k)
⫺
F(z)
y(k)
Q
Figure 2.8 A nonlinear feedback system.
B(g(Cx(k); μ) − Dy(k)) or x(k +1) = (A+BDC)x(k)+B(g(Cx(k); μ) −Dy(k)), G(z; μ) = C(zI−(A + BDC))−1 B, u(k)=f(e(k); μ) + v(k) =g(y(k); μ) − Dy(k) and e(k) = d(k) − y(k). If we assume that the reference input v(k) = 0 and the external disturbance d(k) = 0, supposing that the system achieves equilibrium at e(k) = ê, by linearizing the nonlinear feedback system f(e(k); μ) at the equilibrium point, then the open loop gain of the system is ∂f(e(k)) G(z; μ)J(μ), where J(μ) ≡ ∂e(k) e(k)=ˆe
is the Jacobian matrix. If there exists a simple pair of complex eigenvalues of G(z; μ)J(μ) for z = ejω crossing the critical point −1 + 0j for some values of ω0 and a given parameter μ = μ0 , then the system exhibits the Hopf bifurcation. ABSOLUTE STABILITY THEOREM Consider the nonlinear feedback system shown in Figure 2.8. If Q(y) is a piecewise continuous integrable function, Q(0) = 0, ∃K ≥ 0 such that dQ(y) ′ ′ K ≥ Q(y) y ≥ 0 ∀y ∈ ℜ\{0}, ∃K ∈ ℜ such that dy ≤ K ∀y ∈ ℜ\{yi } where yi are the discontinuous boundaries, F(z) is a rational causal transfer function without any poles outside the unit circle, the loop filter is realized in a controllable and observable form, as well as ∃q ≥ 0 and ∃δ > 0 such that ′ Re{(1 + q(z − 1))F(z)} + K1 − K 2|q| |(z − 1)F(z)|2 ≥ δ ∀|z| = 1, then the nonlinear feedback system is BIBO stable.
EXERCISES
n 1. Evaluate cos1 θ sin0 θ for θ = kπ, where k ∈ Z and n ∈ Z + . 2. Show that y = sin x for x!∈ [−π, π] and y ∈ [−1, 1] is noninvertible, while y = sin x for x ∈ − π2 , π2 and y ∈ [−1, 1] is invertible. 3. Show that for any fuzzy intersection operations t(a, b), tdp (a, b) ≤ t(a, b) ≤ tmin (a, b) ∀a, b ∈ [0, 1].
Exercises
29
4. Show that for any fuzzy union operations s(a, b), smax (a, b) ≤ s(a, b) ≤ sds (a, b) ∀a, b ∈ [0,1]. 5. ∀a ∈ [0, 1], plot the following fuzzy complement operations cλ (a) for λ = 0.5 and cw (a) for w = 0.5. 6. ∀a, b ∈ [0, 1], plot the following fuzzy intersection operations tλ (a, b) for λ = 0.5, tα (a, b) for α = 0.5, tw (a, b) for w = 0.5, tdp (a, b), tep (a, b), tap (a, b) and tmin (a, b). 7. ∀a, b ∈ [0, 1], plot the following fuzzy union operations sλ (a, b) for λ = 0.5, sα (a, b) for α = 0.5, sw (a, b) for w = 0.5, sds (a, b), ses (a, b), sas (a, b) and smax (a, b). 8. ∀a, b ∈ [0, 1], plot the following fuzzy averaging operations vλ (a, b) for λ = 0.5, vα (a, b) for α = 0.5, vp (a, b) for p = 0.5 and vγ (a, b) for γ = 0.5. 9. ∀μFP1 (x), μFP2 (y) ∈ [0, 1], plot the fuzzy implications μQD (x, y), μQL (x, y), μQZ (x, y), μQG (x, y), μQMM (x, y) and μQMP (x, y). 10. Show that μQZ (x, z) ≤ μQD (x, z) ≤ μQL (x, z) ∀μFP1 (x), μFP2 (y) ∈ [0, 1]. 11. Show that a discrete time complex exponential signal x(n) = ejω0 n is periodic if and only if ω0 is rational multiple of π. 12. Consider a second order digital filter with the transfer function H(z) ≡ cz−1 + dz−2 , where a, b, c, d ∈ ℜ. Show that the set of filter coefficients 1−az−1 − bz−2 which guarantees the BIBO stability of H(z) is ≡ {(a, b) : 1 + a − b > 0, b + a − 1 < 0 and b > −1}. 13. Show that the relationships t between impulse signals and step signals are governed by u(t) = −∞ δ(τ)dτ and u(n) = nk →−∞ δ(k) for the continuous time and discrete time cases, respectively. 14. For an LTI system, show +∞ that the input output relationship of the system is governed by y(t) = −∞ x(τ)h(t − τ)dτ for the continuous time case and y(n) = +∞ k →−∞ x(k)h(n − k) for the discrete time case. 15. For an LTI system, show that the causality condition of an LTI system reduces to h(t) = 0 ∀t < 0 for the continuous time case and h(n) = 0 ∀n < 0 for the discrete time case. 16. For an LTI system, show that the strictly causality condition of an LTI system reduces to h(t) = 0 ∀t ≤ 0 for the continuous time case and h(n) = 0 ∀n ≤ 0 for the discrete time case. 17. For an LTI system, show that the memoryless condition of an LTI system reduces to h(t) = Kδ(t) for the continuous time case and h(n) = Kδ(n) for the discrete time case, where K is a constant. 18. For an LTI system, show that theBIBO stability condition of an LTI system +∞ reduces to ∃M ∈ ℜ+ such that −∞ |h(t)|dt < M for the continuous time + case and ∃M ∈ ℜ such that ∀n |h(n)| < M for the discrete time case. 19. For an LTI system, show that +∞the invertible condition of an LTI system reduces to ∃g(t) such that −∞ g(τ)h(t − τ)dτ = δ(t) for the continuous
30
20.
21.
22. 23. 24. 25.
26. 27. 28.
29. 30.
31.
2 Reviews
time case and ∃g(n) such that ∀m g(m)h(n − m) = δ(n) for the discrete time case. For an LTI system, show that if a pure complex exponential signal with frequency ω0 is inputted to an LTI system with frequency response H(ω), then the output is also a pure complex exponential signal with magnitude gain |H(ω0 )| and phase shift ∠H(ω0 ). +∞ For continuous time aperiodic signals, show that −∞ |x(t)|2 dt = +∞ 1 2 2π −∞ |X(ω)| dω.For a continuous time periodic signals, show that +∞ 1 2 2 ∀k |ak | , where ak ∀k are the continuous time T −∞ |x(t)| dt = Fourier coefficients. time aperiodic signals, show that +∞ For discrete 1 2 2 ∀n |x(n)| = 2π −∞ |X(ω)| dω. For a discrete time periodic signals, N−1 2 2 show that N1 nN−1 n = 0 |ak | , where ak ∀k are the discrete = 0 |x(n)| = time Fourier coefficients. Plot the frequency response of the digital filters with impulse response 0 n) h(n) = sin(ω and g(n) = (−1)n h(n) for |n| ≤ 30. πn For an LTI system, show that Y (ω) = X(ω)H(ω), Y (s) = X(s)H(s) and Y (z) = X(z)H(z). Show that if ∃ω0 ∈ ℜ such that H(ω0 ) = 0, then the LTI systems are noninvertible. For a system governed by constant coefficients ordinary differential equaN−1 d n y(t) M−1 d m u(t) tion n=0 an dt n = m=0 bm dt m , where N ≥ M. Assume the system is initially at rest, find the impulse and frequency responses of the system. Show that if ROC of H(s) contains the entire imaginary axis, then the corresponding continuous time LTI system is BIBO stable. Show that if ROC of H(z) contains the entire unit circle, then the corresponding discrete time LTI system is BIBO stable. Show that the solutions of the continuous time LTI system are x(t) = t e(t−t0 )A x(t0 ) + t0 e(t−τ)A Bu(τ)dτ ∀t ≥ t0 and y(t) = Ce(t−t0 )A x(t0 ) + t (t−τ)A Bu(τ)dτ + Du(t) ∀t ≥ t0 , and that for the discrete time LTI C t0 e n−k−1 Bu(k) ∀n ≥ n + 1 and system are x(n) = An−n0 x(n0 ) + n−1 0 k=n0 A n−1 y(n) = CAn−n0 x(n0 ) + C k=n0 An−k−1 Bu(n) + Du(k) ∀n ≥ n0 + 1. Show that for a strictly causal LTI system, the state space matrix D = 0. Show that for two different realizations of an LTI discrete time system x(k + 1) = Ax(k) + Bu(k) and y(k) = Cx(k) + Du(k), and xˆ (k + 1) = ˆ x(k) + Bu(k) ˆ ˆ x(k) + Du(k), ˆ Aˆ and y(k) = Cˆ if ∃T such that xˆ (k) = T−1 x(k), find the relationship between these two sets of state space matrices. Show that for LTI systems, the set of reachable state is R(|B AB · · · An B|). Also, the LTI systems are controllable if and only if R(A) = ℜn or rank(|B AB · · · An B|) = n.
Exercises
31
32. Show ⎤⎞ LTI systems, the set of unobservable state is ⎛⎡ that for C ⎜⎢ CA ⎥⎟ ⎥⎟ ⎜⎢ N⎜⎢ .. ⎥⎟. Also, the LTI systems are observable if and only if ⎝⎣ . ⎦ ⎠ CAn−1 ⎛⎡ ⎤⎞ ⎛⎡ ⎤⎞ C C ⎜⎢ CA ⎥⎟ ⎜⎢ CA ⎥⎟ ⎜⎢ ⎥⎟ ⎜⎢ ⎥⎟ N⎜⎢ .. ⎥⎟ = {0} or rank ⎜⎢ .. ⎥⎟ = n. ⎝⎣ . ⎦ ⎠ ⎝⎣ . ⎦⎠
CAn−1 CAn−1 33. Consider a continuous time signal x(t) sampled by a periodic signal with nonzero DC value. Show that if f1s is the fundamental period of the periodic signal and X(ω) is bandlimited within (−πfs , πfs ), then X(ω) can be reconstructed via a simple lowpass filtering with passband of the filter (−πfs , πfs ). 34. Find an impulse response of a general two channel uniform filter bank with impulse responses of analysis filters h0 (n) and h1 (n), that of synthesis filters f0 (n) and f1 (n), and the sampling ratio of decimators and expanders equal to 2. 35. For a general two channel uniform filter bank with frequency responses of analysis filters H0 (ω) and H1 (ω), that of synthesis filters F0 (ω) and F1 (ω), and the sampling ratio of decimators and expanders equal to 2, if the input of system is A sin(ω0 n), find the discrete time Fourier transform of the output of the system.
3 QUANTIZATION IN DIGITAL FILTERS
Quantization is widely employed in many signal processing applications, such as in data compression and analog-to-digital conversion. However, as quantization is not a reversible process (it uses a many-to-one mapping approach), signals cannot be perfectly reconstructed after the quantization. As a result, efficient methods for the reduction of the quantization noise would be useful for many signal processing applications. In this chapter quantization and the method used for the reduction of quantization noise is presented.
MODEL OF QUANTIZER Modeling the quantizer as an independent additive white Gaussian noise source Although quantization is a memoryless system, it involves discontinuous nonlinearity. Hence, many existing system theories cannot be applied for analyzing digital filters associated with quantization. In order to tackle this problem, quantization noise is usually assumed to be a wide sense stationary white process with each input sample being uniformly distributed over the range of the quantization error. For an N bit uniform midrise quantizer with saturation level equal to L, the quantization step size is ≡ 2N−1L− 0.5 . Denote e(n) and p(e(n)) as the quantization error and the probability density function of the quantization error, respectively. Since it is assumed that the quantization noise is a wide sense stationary white process with each sample being uniformly distributed over the range of the quantization error, the total expected noise energy is
2 2 L 1 σe2 ≡ −2 (e(n))2 p(e(n))de(n) = = 12 3 2N − 1 . 2
Example 3.1 Assume the quantization noise of 8 bit uniform midrise quantizer with saturation level equal to 1 is a wide sense stationary white process with each sample being 32
33
Model of Quantizer
uniformly distributed over the range of the quantization error. Find the step size and the expected noise energy. Solution: 2 The step size and the expected noise energy is ≡ 28−1 1− 0.5 = 509 and
2 1 , respectively. σe2 = 31 281−1 = 195075 Modeling the quantizer as a polynomial of input Consider an N-bit uniform antisymmetric quantizer with the quantization range [−L, L], that is: ⎧ |μ(n)| 1 ⎪ ⎨sign(μ(n)) ceil |μ(n)| ≤ L − 2 Q(μ(n)) ≡ , ⎪ ⎩ |μ(n)| > L sign(μ(n))L
(3.1)
Where μ(n) is the input of the quantizer, ⎧ ⎨ μ(n) sign(μ(n)) ≡ |μ(n)| ⎩ 0
μ(n) = 0
, ceil(μ(n))
μ(n) = 0
denotes the rounding operator towards the plus infinity, |·| denotes the absolute operator, and ≡ 2N−1L− 0.5 is the step size of the quantizer. It is worth noting that the Taylor expansion is not generally used to approximate the quantization function as a polynomial function. This is because the derivative of the midrise quantization function does not exist at the origin. In order to approximate the quantization function as a polynomial function, a polynomial fitting technique is employed. Since the quantization function is an odd function, all coefficients associated to the even power terms are zero and the polynomial with only odd power terms is enough for the approximation. Denote 3 · · · (μ(n))2M−1 ]T and p ≡ [p T µ(n) ≡ [μ(n) (μ(n)) 1 · · · pM ] , where the superscript T denotes the transpose operator, pm ∈ ℜ for m = 1, 2, . . . , M and 2M − 1 are, respectively, the coefficients and the order of the polynomial, in which ℜ denotes the set of real numbers. Since all of the coefficients of the model are real, the approximated nonlinear model is a real model and p can be found via solving the optimization problem with the objective being to minimize the total absolute square difference between the actual quantizer and
34
3 Quantization in Digital Filters A 2-bit quantizer An approximated 2-bit quantizer
1.5
1
1
Quantizer outputs
Quantizer outputs
A 1-bit quantizer An approximated 1-bit quantizer
1.5
0.5 0 ⫺0.5 ⫺1 ⫺1.5 ⫺1
0
⫺0.5
(a)
0.5
0 ⫺0.5 ⫺1 ⫺1.5 ⫺1
1
Quantizer input
0.5
(b)
0
0.5
1
Quantizer input A 4-bit quantizer An approximated 4-bit quantizer
A 3-bit quantizer An approximated 3-bit quantizer
1.5
1.5 1
Quantizer outputs
Quantizer outputs
⫺0.5
0.5 0 ⫺0.5 ⫺1 ⫺1.5 ⫺1
0
⫺0.5
Quantizer input
(c)
0.5
1 0.5 0 ⫺0.5 ⫺1 ⫺1.5 ⫺1
1
⫺0.5
0
0.5
1
Quantizer input
(d)
Figure 3.1 Input–output relationships of actual quantizers with L = 1 and the approximated quantizers µT (n)p with M = 10 for: (a) N = 1; (b) N = 2; (c) N = 3; (d) N = 4.
the approximated polynomial function subject to the constraint on the absolute difference. Define the bound on this absolute difference as ε 2 , where ε > 0. The optimization problem can be expressed as follow:
min p
"L
|µ(n)T p − Q(μ(n))|2 dμ(n)
(3.2a)
−L
subject to
|µT (n)p − Q(μ(n))| ≤
ε 2
∀μ(n) ∈ [−L, L].
(3.2b)
This optimization problem is actually a semi-infinite programming problem and can be solved via the dual parameterization method. Figure 3.1 shows examples of input output relationships of actual quantizers with L = 1 and the approximated quantizers µT(n)p with M = 10 for N = 1, N = 2, N = 3 and N = 4. Figure 3.2 shows the corresponding differences, that is Q(μ(n)) − µ(n)T p. It can be seen from Figure 3.2 that the solutions of the semi-infinite programming problems exist for N = 1, 2, 3, 4 when M = 10.
35
0.5 0 ⫺0.5 ⫺1 ⫺1
Difference between two 3-bit quantizer outputs
(a)
(c)
Difference between two 2-bit quantizer outputs
1
⫺0.5
0
0.5
1
0.3 0.2 0.1 0 ⫺0.1 ⫺0.2 ⫺0.3 ⫺0.4 ⫺1
⫺0.5
0
0.5
Quantizer input
1 0.5 0 ⫺0.5 ⫺1 ⫺1
1 (d)
⫺0.5
0
0.5
1
Quantizer input
(b)
Quantizer input
Difference between two 4-bit quantizer outputs
Difference between two 1-bit quantizer outputs
Model of Quantizer
0.2 0.1 0 ⫺0.1 ⫺0.2 ⫺1
⫺0.5
0
0.5
1
Quantizer input
Figure 3.2 The differences between the actual quantizers with L = 1 and the approximated quantizers µT (n)p with M = 10 for: (a) N = 1; (b) N = 2; (c) N = 3; (d) N = 4.
According to Figure 3.1, although the approximated models for high bit quantizers and that for the one bit quantizer for relatively small input signal look like a linear model, a linear model is not appropriate for the approximation of the quantizers. The approximated models obtained via solving the semiinfinite programming problems are derived from the linear model as pm = 0 for m = 2, 3, . . . , M and for N = 1, 2, 3, 4. It can be seen from Figure 3.2 that the largest error occurs at the neighborhood of discontinuous points of the actual quantizer. For N = 1, the discontinuous point of the actual quantizer is at the origin. If the magnitude of input signals is small and the linear model is applied, then the difference between the output of the actual quantizer and that based on the linear model will be very large. For the high bit quantizers, the approximated quantizer models are not as good as that compared to the case when N = 1, as shown in Figure 3.2. This is because the same value of M is employed for the illustration. Since the quantization step size is so small that the magnitudes of input signals fall into the neighborhood of the discontinuous points of the actual quantizer, the approximated models based on the same value of M is not as accurate as that compared to the case when N = 1. In this case, the value of M should be increased such that the magnitudes of the input signals do not fall into the neighborhood of the discontinuous points of the actual quantizer.
36
3 Quantization in Digital Filters
Although the accuracy of the model decreases for the same value of M when the number of bits of quantizer increases, the same value of M is used for an illustration. This is because the coefficients of the model are obtained based on solving the semi-infinite programming problem. If a solution for the semiinfinite programming problem exists, then the maximum absolute quantization error is guaranteed to be bounded by a constant 2ε multiplying the quantization step. In other words, the ratio of the maximum absolute quantization error to the quantization step is bounded by 2ε (when the solution of the semi-infinite programming problem exists). Moreover, a too large value of M would result in aliasing. This is explained in more detail in Section 3.2. Actually, if the magnitude of the input signal falls outside the neighborhood of the discontinuous points of the actual quantizers, then the differences between the approximated models and the actual quantizers will be small. In this case, the approximated model would be very accurate. This fact is illustrated in Figure 3.2.
Example 3.2 Using the polynomial fitting technique, find N coefficients which approximates sin(x) for −π < x < π. Solution: 2i−1 . The approximation coefficients can be found via Let y = N i=1 ai x π ( y − sin (x))2 dx. Denote solving the optimization problem min (a1 ,a2 ,...,aN ) −π π π x ≡ [x x 3 · · · x 2N−1 ]T , Q ≡ 2 −π xxT dx, b ≡ −2 −π sin(x)xT dx and a ≡ [a1 a2 · · · aN ]T . If Q is a full rank matrix, then a = −Q−1 b. It is worth noting that there is no simple relationship between the Taylor coefficients and the coefficients obtained via the polynomial fitting technique.
QUANTIZATION NOISE ANALYSIS Consider the systems shown in Figure 3.3. Figure 3.3a is a conventional quantization system. If an input signal is oversampled with an oversampling ratio (OSR) R, then u(n) is bandlimited within the frequency spectrum − πR , πR . After applying the quantization, if H(ω) is an ideal lowpass filter, that is 1 |ω| < πR H(ω) = , then the high frequency component of the quan0 otherwise tization noise is removed and a high signal-to-noise ratio (SNR) can be achieved.
37
Quantization Noise Analysis
u(n)
Q
(a)
u(n)
Q
s1(n)
H(v)
s2(n)
y1(n)
H(v)
y2(n)
Na
(b)
a(n) ⫽ 兺 ak cos(kv0n) k ⫽1
Figure 3.3 (a) Conventional system; (b) quantized system with periodic codes.
The quantization noise of these two systems can now be analyzed via the approximated model. This is done by replacing the actual quantizer Q(μ(n)) by the approximated quantizer µT (n)p. Denote the Fourier transform of u(n), s1 (n), s2 (n), y1 (n) and y2 (n), respectively, as U(ω), S1 (ω), S2 (ω), Y1 (ω) and Y2 (ω). Denote the periodic code as a(n) and its coefficients as ak for k = 1, 2, . . . , Na , where Na is the length of the code. Denote periodic code as ω0 . Hence, a(n) ≡ Na the fundamental frequency of the a Denote A(ω) ≡ N k=1 ak cos(kω0 n). k=1 ak (δ(ω − kω0 ) + δ(ω + kω0 )), U2m−1 (ω) ≡ U(ω) ∗ · · · ∗ U(ω) and A2m−1 (ω) ≡ A(ω) ∗ · · · ∗ A(ω), where ∗ denotes the convolution operator and there are 2m − 1 terms in both U2m−1 (ω) and A2m−1 (ω).
Denote the DFT matrix with size (4mNa + 1) × (4mNa + 1) as W4mNa +1 , and its tth row qth column element as W4mNa +1 (t, q). Denote the inverse of W4mNa +1 4mNa +1 and its tth row qth column element as W 4mNa +1 (t, q). as W Denote
′′ am ≡
4mN a +1 # k=1
⎛ Na # ⎝ (W4mN a +1 (k, Na + 1 − q) W4mN a +1 (2mN a + 1, k) q=1
+ W4mN a +1 (k, Na + 1 + q))aq
$2m
.
38
3 Quantization in Digital Filters
Theorem 3.1 Assume that T
Q(μ(n)) ≈ µ (n)p, H(ω) =
⎧ ⎨1 ⎩
π R , otherwise
|ω| <
0
ω0 ≥
(2M − 1)π R
and
π 2 % N $2 "πR M 2 "R # M a ′′ U # # 1 (ω) p a 2m−1 m m ak2 pm U2m−1 (ω) dω > dω. 2 22m
k=1
− πR
m=2
− πR
m=2
Then the SNR of the coded system shown in Figure 3.3b will be higher than that of the conventional system shown in Figure 3.3a. Proof: If Q(μ(n)) ≈ µT (n)p, then for the conventional system shown in Figure 3.3a, we have: Y1 (ω) = H(ω)S1 (ω) ≈ H(ω)
M #
pm U2m−1 (ω).
(3.3)
m=1
If we regard the first order term (m = 1) in the signal band as the signal component and all higher order terms (m ≥ 2) in the signal band as the quantization noise, then the SNR can be estimated as follows: πR 2 − πR |H(ω)p1 U(ω)| dω SNR ≈ 10 log10 π . (3.4) 2 M R m=2 pm U2m−1 (ω) dω − π H(ω) R
Since H(ω) is an ideal lowpass filter, then we have: π p21 −R π |U(ω)|2 dω R . SNR ≈ 10 log10 π 2 M R − π m=2 pm U2m−1 (ω) dω
(3.5)
R
Now consider the coded system shown in Figure 3.3b.
2m−1 (ω) ≡ U(ω) Denote the input to the quantizer as u(n) and U ∗ · · · ∗ U(ω), U(ω) ∗ A(ω) where there are 2m − 1 terms in U2m−1 (ω). Since U(ω) = , we have 2 U2m−1 (ω) ∗ A2m−1 (ω) T U2m−1 (ω) = . As we assume that Q(μ(n)) ≈ µ (n)p, so we 22m−1
M pm U2m−1 (ω) ∗ A2m−1 (ω) and have S2 (ω) ≈ m=1 2m−1 2 M # pm U2m−1 (ω) ∗ A2m (ω) Y2 (ω) ≈ H(ω) . (3.6) 22m m=1
39
Quantization Noise Analysis
As a result,
SNR ≈ 10 log10
π R
− πR
2 p U(ω) ∗ A (ω) H(ω) 1 22 2 dω .
2 M p U (ω) ∗ A (ω) H(ω) m=2 m 2m−122m 2m dω
π R
− πR
(3.7)
and u(n) is bandlimited, terms in U2m−1 (ω) ∗ A2m (ω) for Since ω0 ≥ (2M−1)π R m = 1, 2, . . . , M do not overlap each other in the frequency spectrum. As H(ω) is an ideal lowpass filter, eqn (3.7) can be further simplified as:
SNR ≈ 10 log10
p21 4
π R
− πR
Na 2 k=1 ak
2
π R
|U(ω)|2 dω .
2 M p U (ω)∗ A (ω) H(ω) m=2 m 2m−122m 2m dω − πR
(3.8)
Denote a vector a ≡ [a1 · · · aNa ]T and am ≡ [fliplr(aT ) 0 aT 0(4m−2)Na ]T , T where fliplr(a ) ≡ [aNa · · · a1 ] and 0(4m−2)Na denotes a zero row vector with length (4m − 2)Na . Denote the discrete Fourier transform of am as aˆ m and its kth element as aˆ m (k).
Denote a vector am with its kth element am (k) as am (k) ≡ (ˆam (k))2m .
′ and its kth element Denote the inverse discrete Fourier transform of am as am (2M−1)π ′ (k). Then a′ (2mN + 1) = a′′ . Since ω ≥ , u(n) is bandlimited as am 0 a m m R and H(ω) is an ideal lowpass filter, p21 4
SNR ≈ 10 log10
π R
− πR
Na 2 k=1 ak
2
π R
|U(ω)|2 dω . ′′
M pm am U2m−1 (ω) 2 dω m=2 22m − πR
(3.9)
2
2 π πR M pm am′′ U2m−1 (ω) 2 M a 2 R a If 21 N p U (ω) dω > dω, π m 2m−1 m=2 k=1 k − R − πR m=2 22m then the SNR of the coded system will be larger than that of the conventional system. This completes the proof.
40
3 Quantization in Digital Filters
If the periodic code only consists of a single coefficient, then the coded system will become a modulated system. Denote the factorial operator as !, then we have the following corollary: Corollary 3.1 Assume that
Q(μ(n)) ≈ µT (n)p,
a1 = 1, ak = 0 for k = 1 and
2m
r=0 r =m
1 |ω| < πR , ω0 ≥ (2M R− 1)π , 0 otherwise 2m)! (2m)! r!(2m−r)! > (m!)2 for m = 1, 2, . . . , M, then
H(ω) =
the SNR of the modulated system will be higher than that of the conventional system. Proof: Since 22m = 2m r=0
2m (2m)! (2m)! (2m)! for r=0 r!(2m−r)! > r!(2m−r)! for m = 1, 2, . . . , M, if (m!)2 r =m 2(2m)! m = 1, 2, . . . , M, then 22m (m!)2 < 1 for m = 1, 2, . . . , M. This implies that 2 πR M pm U2m−1 (ω)(2m)! 2 πR M dω. Accord− π m=2 pm U2m−1 (ω) dω > 4 − π m=2 22m (m!)2 R
R
ing to Theorem 3.1, the SNR of the modulated system will be higher than that of the conventional system.
This completes the proof.
Intuitively, the improvement of SNR of the coded system can be accounted as follows. If the quantizer can be modeled by a polynomial, then the quantizer performs a weighted sum of multiplications of the input signal in the time domain. In the frequency domain, the quantizer performs a weighted sum of convolutions of the input signal. If the input signal is in the base band, then convolutions of the base band signal are still in the base band. In other words, all high order terms in the model are collapsed together in the base band. As the signal component and the noise components are mixed together, the SNR is low. On the other hand, for the conventional amplitude modulation system, if a base band signal is modulated by a cosine carrier, then two frequency bands are generated centered at the carrier frequency and with the magnitude being half of the original signal. By demodulating the signal, three frequency bands are generated with one at the base band and two centered at twice the carrier frequency. The magnitude of these two high frequency bands is just half of that in the base band. By applying an ideal lowpass filtering, the base band signal can be recovered and the signal energy is halved. A similar idea is applied for the modulated quantized system. If a base band signal modulates a carrier and performs convolutions in the frequency domain, then more than two frequency
41
Quantization Noise Analysis
bands are generated after convolutions. For example, if the modulated signal is convolved by itself three times, then four frequency bands are generated centered at the carrier frequency and three times the carrier frequency. By demodulating the convolved signal, the frequency bands are shifted and one more frequency band is generated. The demodulated frequency bands are centered at the base band, twice of and four times the carrier frequency, with the magnitude equal to 0.375, 0.25 and 0.0625 of the original signal, respectively. By applying an ideal lowpass filtering, all the noise components in the high frequency bands are filtered. Only 0.375 of the noise energy is preserved. Although the signal energy is halved, the noise components are less than half. As a result, after filtering the SNR is improved. Hence, by multiplying a periodic code both before and after the quantizer, further noise reduction can be achieved compared to the conventional approach.
Example 3.3 Consider the system shown in Figure 3.4. Denote R as the OSR of the input signal, that is u(n) is bandlimited within the π π 1 |ω| < πR frequency spectrum − R , R . Assume that H(ω) = . Express 0 otherwise Y2 (ω) in terms of U(ω), ω0 and ak for k = 1, 2, . . . , Na . What is the minimum value of ω0 such that aliasing does not occur. Solution:
Since Y2 (ω) = H(ω) U3 (ω) ∗ A416(ω) , where A(ω) ≡ δ(ω − ω0 ) + δ(ω + ω0 ) and U3 (ω) ≡ U(ω) ∗ U(ω) ∗ U(ω), we have
U3 (ω − 4ω0 ) + 4U3 (ω − 2ω0 ) + 6U3 (ω) + 4U3 (ω + 2ω0 ) + U3 (ω + 4ω0 ) , 16 3H(ω)U3 (ω) which is equivalent to Y2 (ω) = . As the bandwidth of U3 (ω) is 6π 8 R , 6π in order to avoid the occurrence of the aliasing, we need R < 2ω0 , which implies that 3π R < ω0 .
Y2 (ω) = H(ω)
u(n)
( )3
s2(n)
H (v)
a(n) ⫽ cos(v0n) Figure 3.4 Cubic system with periodic codes.
y2(n)
42
3 Quantization in Digital Filters
OPTIMAL CODE DESIGN In order to design an optimal code such that the SNR is maximized, a modified gradient decent method is employed as follows: Algorithm 3.1 Step 1: Initialize iteration indices n = 0 and t = 0. Generate a random vector a0 , set l0 = 0, λ0 = 1, N˜ = 1000, Nˆ = 10 and δ = δ′ = 10−6 (these values are employed because they are typical for most gradient descent methods and global optimal searching algorithms). Choose Na = 40 and M = 10 (the reasons for employing these values will be discussed later).
Step 2: Assume that u(k) = U sin 2πk (The reason for employing this input 3R signal will also be discussed later). Compute a new periodic code an+1 = an − λn ∇a SNR|a=an and set λn+1 = λ0
2 , where ceil
n N
⎛ ′′
π
2 M p a U2m−1 (ω) Na R 2 2 m=2 m m 22m dω ⎜ ak p21 k=1 ak − πR |U(ω)| dω ∇a SNR = ⎝ π
2 ′′
2 π p2 N a pm am U2m−1 (ω) M R R 2 2 ln(10) 41 dω k=1 ak − π |U(ω)| dω − π m=2 22m 10
π R
− πR
R
−
p21 4
Na k=1
ak2
2
π R
− πR
R
π R
′′ )U pm (∇a am 2m−1 (ω) 22m−1
M
|U(ω)|2 dω − π m=2 R 2
π 2 R M ′′ U pm am 2m−1 (ω) dω − π m=2 22m R
′′ U p m am 2m−1 (ω) 22m
⎞
dω ⎟ ⎟ ⎟ ⎠
and 4mNa +1 k=1 2mW4mNa +1 (2mNa + 1, k)(W4mNa +1 (k, Na + 1−q)+W4mN a +1 × Na 2m−1, (k, Na + 1 + q)) q=1 (W4mNa +1 (k, Na + 1 − q) +W4mNa +1 (k, Na + 1 + q))aq in which pm for m = 1, 2, . . . , M are obtained via solving the corresponding semi-infinite programming problem. Step 3: If |an+1 − an | ≤ δ, then go to Step 4, otherwise, increase the index n by 1 and iterate Step 2. ˆ then take an+1 as Step 4: Denote lt+1 = SNR|an+1 . If 0 < lt+1 − lt ≤ δ′ and t > N, t+1 t the final approximated optimal solution. If l > l + δ′ , then increase both the indices n and t by 1, set ain = (1 + rit )ain where ain is the ith element of the vector an and rit is a random scalar with uniform distribution between [−0.5, 0.5], and iterate Step 2. If lt+1 < lt , then set an+1 as that corresponds to l t and add a random vector on it, increase both the indices n and t by 1, and iterate Step 2. ′′ ≡ ∇a am
Optimal Code Design
43
In general, the gradient descent method is prone to divergence and usually finds solutions that are only locally optimal. To avoid the obtained solution being trapped in the local optimal solution, once an approximated local optimal solution is found, a random vector is added to it so that it is kicked out of the approximated local optimal solution and a new approximated local optimal solution is found. If the SNR of the current approximated local optimal solution is lower than that of the previous one, then the current approximated local optimal solution is discarded, the code corresponding to the previous local optimal solution is re-used but a random vector is added to it and re-iterates the above procedures. Since Na is finite, there are finite number of local minima. As the obtained SNR is monotonic increasing, it will not go back to those local optimal solutions corresponding to lower SNRs. As a result, it tends to move to the optimal solution with the largest SNR. Since there are two loops in Algorithm 3.1, certain mechanisms are required to quit both loops in order to solve the divergent problem. To quit the first loop, a dynamical factor λn is employed. In general, the convergence of the gradient descent method would depend on the values of λn , rit , δ and δ′ . For instance, if the values for λn are too small, this would cause the termination of Step 3 and go straight to Step 4 and be further away from the exact local optimal solution. But too large values of λn might deviate. To tackle this problem, a If large value for λn is employed in the first round of the iterations (n < N). it then deviates, λn is decreased in each of the following rounds of iterations so that the difference between the current approximated local optimal solution and the previous one is forced to zero and the first loop would eventually have a fixed value of λn . For the second loop, if the SNR is lower, then the solution will stay in the same position. However, if the number of iterations that cause a particular approximated local optimal solution stays at that point and is larger ˆ then the second loop will be terminated for a fixed value of δ′ . Hence, than N, the divergence problem is solved. To verify the effectiveness of Algorithm 3.1, numerical computer simulations are illustrated. In these numerical computer simulations, the saturation level of the quantizer is chosen to be 1, that is L = 1, for the normalization reason. The ideal lowpass filter is implemented by computing the discrete Fourier transform of the corresponding inputs of the filter and taking the inverse discrete Fourier ! transform of the coefficients within the frequency spectrum − πR , πR . We choose Na = 40 and M = 10 because too large values of Na and M would increase the computation complexity, while a too small value of Na limits the performance and a too small value of M is not enough to approximate the quantizer. Sinusoidal signals !are employed because they are guaranteed to be bandlimited within − πR , πR .
3 Quantization in Digital Filters
0.1 0.05 0 ⫺0.05 ⫺0.1 ⫺0.15 ⫺0.2 ⫺0.25
Coded coefficients ak
Coded coefficients ak
44
0
10
0.4 0.2 0 ⫺0.2 10
20
0.1 0 ⫺0.1 0
10
(b)
0.6
0
0.2
⫺0.2
40
k
⫺0.4 (c)
30
Coded coefficients ak
Coded coefficients ak
(a)
20
0.3
30
k
(d)
30
40
30
40
k 8 6 4 2 0 ⫺2 ⫺4
40
20
0
10
20 k
Figure 3.5 Coded coefficients when R = 32 for: (a) N = 1; (b) N = 2; (c) N = 3; (d) N = 4.
It is worth noting that it may not have similar patterns on the obtained optimal periodic codes as the number of bits for the quantizer or the OSR varies. Since the coefficients of the approximate models are obtained via solving the corresponding semi-infinite programming problems, the coefficients of the approximated models for a different number of bits for the quantizer are very different (for the same value of M). Also, the thermal noise dominates as OSR increases. Hence, it may not have similar patterns on the obtained periodic codes as the number of bits for the quantizer or the OSR varies. For examples, by running Algorithm 3.1 with changing the input to a normalized sum of sinusoidal signals, that is
100 knπ sin n=1 100R
, u(k) = 100 knπ max n=1 sin 100R ∀k≥0
the periodic codes based on the above parameters with different numbers of bits for quantizers and OSRs can be obtained (Figures 3.5–3.9). It can be seen from Figures 3.5 to 3.9 that there are no similar patterns on the obtained optimal periodic codes as the number of bits for the quantizer or the OSR varies.
Improvements for the SNR performance of the coded system over the conventional system and the system with an additive dithering are shown in Figure 3.10. Assume that an additive white noise source with a uniform distribution between [−1,1] is added and subtracted before and after the quantizer
45
0.06
Coded coefficients ak
Coded coefficients ak
Optimal Code Design
0.04 0.02 0 ⫺0.02 ⫺0.04 ⫺0.06
0
10
30
40
0.5 0.4 0.3 0.2 0.1 0 ⫺0.1 ⫺0.2
0
10
(c)
20
0.15 0.1 0.05 0 ⫺0.05
0
10
(b)
k
Coded coefficients ak
Coded coefficients ak
(a)
20
0.2
30
40
30
40
30
40
k 0.6 0.4 0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8
0
10
(d)
k
20
20 k
0.06 0.04 0.02 0 ⫺0.02 ⫺0.04 ⫺0.06 ⫺0.08
Coded coefficients ak
Coded coefficients ak
Figure 3.6 Coded coefficients when R = 64 for:(a) N = 1; (b) N = 2; (c) N = 3; (d) N = 4.
0
10
(c)
20
30
40
k 0.6 0.4 0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8
0
10
20 k
0
10
(b) Coded coefficients ak
Coded coefficients ak
(a)
0.25 0.2 0.15 0.1 0.05 0 ⫺0.05 ⫺0.1
30
40 (d)
20
30
40
30
40
k 0.8 0.6 0.4 0.2 0 ⫺0.2 ⫺0.4 ⫺0.6
0
10
20 k
Figure 3.7 Coded coefficients when R = 128 for: (a) N = 1; (b) N = 2; (c) N = 3; (d) N = 4.
3 Quantization in Digital Filters
0.15
Coded coefficients ak
Coded coefficients ak
46
0.1 0.05 0 ⫺0.05 ⫺0.1
0
10
20
30
40
0
10
(c)
20
0.2 0.1 0 0
10
(b)
k 1 0.8 0.6 0.4 0.2 0 ⫺0.2 ⫺0.4
0.3
⫺0.1
Coded coefficients ak
Coded coefficients ak
(a)
0.4
30
40
30
40
30
40
k 0.8 0.6 0.4 0.2 0 ⫺0.2 ⫺0.4 ⫺0.6
0
10
(d)
k
20
20 k
0.15
0.35 Coded coefficients ak
Coded coefficients ak
Figure 3.8 Coded coefficients when R = 256 for: (a) N = 1; (b) N = 2; (c) N = 3; (d) N = 4.
0.1 0.05 0 ⫺0.05 ⫺0.1
0
10
(c)
30
k
0.4 0.2 0
0
10
20 k
0.1 0.05 0
10
(b)
1 0.8 0.6
⫺0.2 ⫺0.4
0.2 0.15
0
40
Coded coefficients ak
Coded coefficients ak
(a)
20
0.3 0.25
30
(d)
30
40
30
40
k 1.5 1 0.5 0 ⫺0.5
40
20
0
10
20 k
Figure 3.9 Coded coefficients when R = 512 for: (a) N = 1; (b) N = 2; (c) N = 3; (d) N = 4.
47
Optimal Code Design
Compared to conventional approach Compared to dithering approach
Improvements on SNRs (dB)
250
200
150
100
50
0 0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Input magnitude U Figure 3.10 Improvements in SNR performance of the coded system over the conventional system and the additive dithering system.
in the additive system, respectively. Assume that the input signal is
dithering 2πk u(k) = U sin 3R ∀k ≥ 0, where R = 64 and U is the magnitude of the sinusoidal input. The quantizer is assumed to be a singlebit antisymmetric one with 1 y≥0 the saturation level equal to one, that is Q′ (y) ≡ . This type −1 otherwise of sinusoidal input and quantizer is used for performance testing because it is the most common method used these days. Since the thermal noise would be dominated when the OSR is very large, the comparison with very high OSR is not useful and R = 64 is used for the comparison. The periodic codes employed in these numerical computer simulations consist of 40 coefficients designed under M = 10 − 40 coefficients with M = 10 are employed as discussed earlier. According to the numerical computer simulations, the coded system could achieve an average of 101 dB improvement over the conventional system and an average of 85 dB improvement over the additive dithering system. These numerical computer simulations show that the coded system achieves very significant improvements over the additive dithering system and the conventional system. There are two main fundamental differences between the additive dithering system and the coded system. First, in the additive dithering system, a white noise is added before and after the quantizer; while in the coded system, a periodic code
48
3 Quantization in Digital Filters
is multiplied before and after the quantizer. Just changing addition to multiplication would cause the noise analysis to change drastically. Statistical analysis of an additive noise can be performed easily and many well-known methods can be applied. However, the techniques for analyzing multiplicative noise are limited and this problem is theoretically difficult. Hence, just changing additive noise to multiplicative noise would require a very different analytical technique and result in a very different picture. Second, the noise in the conventional approach is a random process, while the periodic code in the coded system is a deterministic signal. Since these two signals are very different in nature, their analysis is also very different. In terms of complexity and cost of an implementation, since the implementation of the additive dithering system requires a random sequence, it is, in general, more difficult and costly to generate a truly random signal with a uniform distribution. Hence, the implementation cost of the additive dithering system is high. On the other hand, it is easier and cheaper to implement the coded system because the periodic code can be stored in memory and only multiplications are required. It is worth noting that the coded method gives worse results for large values of N, such as N = 4, when the numerical computer simulations are performed at the same value of M. This is because the number of terms of the polynomial required to approximate the quantizer should be increased as the number of bits for the quantizer increases, as discussed previously. As M remains unchanged, the accuracy of the approximated model decreases. Hence, the results are worse when N = 4. However, if increasing the value of M, then aliasing may occur. Because of the trade off between the aliasing and model errors, the improvements in the SNR performance decrease as the number of bits of quantizer increases. For examples, by running Algorithm 3.1 and changing the input to a normalized sum of sinusoidal signals, that is
100 knπ sin n=1 100R
, u(k) = 100 knπ max n=1 sin 100R ∀k≥0
the periodic codes based on 40 coefficients with M = 10, a different number of bits of quantizers, as well as different OSRs can be obtained accordingly. Figure 3.11 shows the improvements on SNR performance at different OSRs as the number of bits of quantizer varies. It can be seen from Figure 3.11 that improvements in the SNR performance decrease as N increases. However, there is no simple relationship between the improvements on the SNR performance as the OSR varies. This is because the effects of thermal noise dominate as the
49
Optimal Code Design
OSR ⫽ 32
18
OSR ⫽ 64
20
16
18
16
16
14
10 8
14
Improved SNR (dB)
Improved SNR (dB)
Improved SNR (dB)
14 12
12 10 8 6
6 4 2
1
(a)
2
3
Number of bits N
4
12 10 8 6
4
4
2
2
0
1
(b)
2
OSR ⫽ 128
18
3
4
Number of bits N
0
1
2
3
4
(c) Number of bits N
Figure 3.11 Relationships between the improved SNRs of the coded system over the conventional system and the number of bits of quantizer when: (a) R = 32; (b) R = 64; (c) R = 128.
OSR increases. Also, as the OSR increases, π 2 % N $2 "πR M "R a # # 1 pm U2m−1 (ω) dω − ak2 2 k=1
− πR
becomes smaller.
m=2
− πR
M 2 # p a′′ U m m 2m−1 (ω) dω 22m m=2
Figure 3.12 shows improvements of the SNR performance at different numbers of bits of quantizer as the OSR varies. It can be seen from Figure 3.12 that there is no simple relationship between the improvements on the SNR performance and the OSR. Figure 3.13 shows the histograms of the input signal, the quantized signal, and the output of the filter of the conventional system when a single bit antisymmetric quantizer with the saturation level equal to one; that is
1 y ≥0 ∀k ≥ 0 with Q′ (y) ≡ , and the input signal u(k) = U sin 2πk 3R −1 otherwise R = 64 and U = 0.1, are applied. Figure 3.14 shows the histograms of the input of the quantizer, the output of the quantizer, the demodulated signal, and the output of the filter of the coded system with 40 coefficients designed under M = 10 (40 coefficients with M = 10 is employed for reasons discussed earlier). It can be seen from Figure 3.13 that the dynamical range of the filtered signal of the conventional system is between −1.27 and 1.27, which is about
50
3 Quantization in Digital Filters
Improved SNR (dB)
18 17 16 15
(a)
102
(c)
10 9 8 7 6 5 101
103
102
(b)
OSR 4.5 4 3.5 3 2.5 2 1.5 1 101
2 bit quantizer
11
19
14 101
Improved SNR (dB)
1 bit quantizer
103
OSR
3 bit quantizer
4 bit quantizer 3 Improved SNR (dB)
Improved SNR (dB)
20
102
1 0 ⫺1 ⫺2 ⫺3 101
103
OSR
2
102
(d)
103
OSR
(a)
4000
800
700
3500
700
600
3000
600
500 400 300
2500 2000 1500
Histogram of y1(k)
800
Histogram of s1(k)
Histogram of x1(k)
Figure 3.12 Relationships between the improved SNRs of the coded system over the conventional system and the OSR when: (a) N = 1; (1b) N = 2; (c) N = 3; (d) N = 4.
500 400 300
200
1000
200
100
500
100
0 ⫺0.1 ⫺0.05 0 0.05 0.1 Range of input signal (b)
0 0 ⫺1 ⫺0.5 0 0.05 0.1 ⫺2 ⫺1 0 1 2 Range of quantized signal (c) Range of filtered output signal
Figure 3.13 Histograms of the input signal, the quantized signal and the output of the filter of the conventional system.
1200% of that of the input signal. Hence, the SNR ratio is low. On the other hand, as can be seen in Figure 3.14, the dynamical range of the filtered signal of the coded system has the same dynamical range as the input signal. Hence, the coded system achieves a higher SNR than the conventional one.
51
Summary
4000 Histogram of s2(k)
Histogram of input of quantizer
2500 2000 1500 1000 500 0 ⫺0.04 (a)
⫺0.02
0
0.02
⫺0.5
0
0.5
1
Range of output of quantizer 800
Histogram of y2(k)
Histogram of demodulated signal
1000
(b)
2000 1500 1000 500 0 ⫺0.4 (c)
2000
0 ⫺1
0.04
Range of input of quantizer
3000
⫺0.2
0
0.2
Range of demodulated signal
600 400 200 0 ⫺0.15 ⫺0.1 ⫺0.05
0.4 (d)
0
0.05
0.1
Range of filtered output signal
Figure 3.14 Histograms of the input of the quantizer, the output of the quantizer, the demodulated signal and the output of the filter of the coded system.
Example 3.4 Using the conventional gradient descent method, find the minimum value of the function f (x) = x 2 with the initial guess at x0 = 0.1 and λn = 0.45 ∀n ≥ 0, in which the algorithm stops when |xn+1 − xn | < 0.01. Solution: Since xn+1 = xn − λn dfdx(x)
x=xn
and λn = 0.45 ∀n ≥ 0, we have xn+1 = 0.1xn
∀n ≥ 0. Hence, x1 = 0.01. As |x1 − x0 | = 0.09 > 0.01, further iteration is required and we have x2 = 0.001. As |x2 − x1 | = 0.09 < 0.01, the algorithm stops and the obtained solution is x = 0.009. SUMMARY In this chapter two quantization models are discussed. The first one is to model the quantizer as an additive white noise source, while the second models the quantizer as a high order polynomial function. Based on these models, a detailed SNR analysis is performed. When a periodic code is applied to both the input and output of the quantizer, the SNR may be increased. A condition for an
52
3 Quantization in Digital Filters
Loop filter Input signal ⫹ ⫺
Output signal ⫹
H(v)
Q
Figure 3.15 A sigma delta modulator.
improvement of the SNR is derived. An optimal periodic code is designed via a modified gradient descent method.
EXERCISES 1. Denote xi for i = 1, 2, . . . , N as data and cj for j = 1, 2, . . . , M as the quantized data, where M < N. That is Q(xi ) = cj . Find cj in terms of xi such that the total quantized error energy is minimized. That is to solve N M 2 min i=1 j=1 (xi − cj ) . (c1 ,c2 ,...,cM )
2. Consider the following system shown in Figure 3.15. This system is known as a sigma delta modulator, which is widely employed in the analog-to-digital conversion. By modeling the quantizer as an additive white Gaussian noise source, derive the signal transfer function and noise transfer function of the system. Based on the derived expressions, show that in order to achieve high SNR, the loop filter should have poles on or outside the unit circle. 3. Consider the system shown in Figure 3.4. Calculate the SNR of the system. 4. Consider the problem discussed in Example 3.4. Show that the algorithm converges if 1 > λn > 0 ∀n ≥ 0.
4 SATURATION IN DIGITAL FILTERS
Nonlinearity due to saturation is widely seen in many signal processing circuits and systems because signals can be guaranteed to be bounded in certain regions. However, even for a second order digital filter associated with the saturation nonlinearity, it may exhibit oscillation behaviors and the frequencies of the oscillations are different for different filter parameters. For some applications, this would cause the degradation of system performance. When the eigenvalues of the system matrix are outside the unit circle, we can expect that the state trajectories would not converge to the origin and oscillation behaviors would occur. But this is not necessarily true. In this chapter, conditions for the occurrence of oscillations are discussed. The corresponding oscillation frequencies are estimated, and the stability conditions for the occurrence of the limit cycles are presented. SYSTEM MODEL The second order digital filter associated with the saturation nonlinearity can be briefly modeled as follows. Let the state vector of a second order digital filter be x(k) and the state equation be: & ' x1 (k + 1) x(k + 1) = = F(x(k)). (4.1) x2 (k + 1) If the second order digital filter is realized by a direct form representation, then: & ' x2 (k) x(k + 1) = , (4.2) fs (bx1 (k) + ax2 (k)) where a and b are the filter parameters, and fs (·) is the saturation function defined as: ⎧ 1 ⎨ μy if |y| ≤ (4.3) fs ( y) = μ, ⎩sgn( y) otherwise 53
54
4 Saturation in Digital Filters
in which μ is the gain of the saturation function in the linear region and sgn(·) denotes the sign function. Example 4.1 Consider a digital filter with transfer function
G(z) =
M
m=0 N
bm z−m , an
n=0
z−n
where M ≤ N. Find the direct form state space matrices of the filter. Solution: ⎡ 0 1 ⎢ .. ⎢ . 0 ⎢ ⎢ . .. . ⎢ A=⎢ . . ⎢ 0 0 ⎢ ⎣ aN ··· − a0 and D = 0.
⎤ 0 ⎡ ⎤ 0 .. ⎥ . ⎥ ⎢ .. ⎥ ⎥ ⎢ . ⎥ ⎥ .. .. ⎢ ⎥ . . 0 ⎥ , B = ⎢ 0 ⎥, C = [0 · · · 0 bM · · · b1 ] ⎥ ⎢ ⎥ ⎥ ⎣1⎦ ··· 0 1 ⎥ ⎦ a1 a0 ··· ··· − a0 0 ··· .. .. . .
OSCILLATIONS OF DIGITAL FILTERS ASSOCIATED WITH SATURATION NONLINEARITY For a second order digital filter associated with the saturation nonlinearity, the state space matrices of the filter are denoted as: & ' 0 1 A= , (4.4) b a & ' 0 B= , (4.5) 1 ! C= b a (4.6) and D = 0,
while the transfer function of the filter is obtained as az + b . G(z) = 2 z − az − b
(4.7)
(4.8)
Oscillations of Digital Filters Associated with Saturation Nonlinearity
55
Referring to Section 2.4 and Figure 2.7 we see that, the saturation nonlinearity can be modeled as a feedback system with the input output relationship as follows: ⎧ 1 ⎨ (μ − 1)y(k) |y(k)| ≤ g( y(k); μ) = (4.9) μ ⎩−y(k) + sgn(y(k)) otherwise or ⎧ 1 ⎨ (1 − μ)e(k) |e(k)| ≤ f (e(k); μ) = (4.10) μ ⎩e(k) − sgn(e(k)) otherwise
However, f (e(k), μ) is not a smooth (C r , r ≥ 3) function because f (e(k), μ) is not differentiable at e(k) = ± μ1 . Hence, the Hopf bifurcation theorem cannot be applied directly. By letting μπe(k) 2 , (4.11) f˜ (e(k); μ) = e(k) − tan−1 π 2 it can easily be shown that f˜ (e(k); μ) is a smooth (C r , r ≥ 3) function and ∃ε(μ) such that | f˜ (e(k); μ) − f (e(k); μ)| < ε(μ) ∀e(k). By solving the equation G(z)f˜ (e(k); μ)|z=1,e(k)=ˆe = −e(k)|e(k)=ˆe , the equilibrium point is located at eˆ = 0. Since ∂f˜ (e(k); μ) = 1 − μ, J(μ) = ∂e(k)
(4.12)
(4.13)
e(k)=ˆe
λ(e jω ; μ) = G(z)J(μ)|z=e jω =
ae jω + b (1 − μ), e2jω − ae jω − b
(4.14)
where λ(e jω ; μ) is the eigenvalue of G(e jω )J(μ). As G(e jω )J(μ) is a scalar, the right and left eigenvectors are: η1 = 1
(4.15)
η2 = 1,
(4.16)
and
respectively. Define: az + b G(z) = 2 , 1 + G(z)J(μ0 ) z − aμ0 z − μ0 b ∂2 f˜ (e(k); μ) Q≡ η1 = 0, ∂e(k)2
H(z) ≡
e(k)=ˆe,μ=μ0
(4.17)
(4.18)
56
4 Saturation in Digital Filters
1 v0 ≡ − H(e j0 )Qη1 = 0, 4
(4.19)
1 v2 ≡ − H(e j2ωR )Qη1 = 0, 4 π2 μ30 ∂3 f˜ (e(k); μ) L≡ , η1 η1 = 3 ∂e(k) 2
(4.20)
(4.21)
e(k)=ˆe,μ=μ0
π2 μ30 1 1 p(e jωR ) ≡ Qv0 + Qv2 + Lη1 = , 2 8 16
and ζ(e
jωR
(4.22)
% 2 3 $ π μ0 −η1 G(e jωR )p(e jωR ) ae jωR + b )≡ = − 2jω , (4.23) jω R R − ae − b η1 η2 e 16
where η2 and Q are the complex conjugates of η2 and Q, respectively, ωR and μ0 are the frequency and the bifurcation parameter such that Im(λ(e jωR ; μ0 )) = 0. It can be easily shown that a
(4.24) ωR = cos−1 − 2b and μ0 = 1 +
e2jωR − ae jωR − b , ae jωR + b
(4.25)
respectively. According to the bifurcation theorem, the frequency of oscillations of the second order digital filter associated with the saturation nonlinearity can be approximated by the frequency at the point Pˆ where Pˆ is the intersecting point of the locus of λ(e jω ; μ) and the half line starting at −1 + 0j in the direction defined by ζ(e jωR ). In this case, since ζ(e jωR ) ∈ ℜ, Pˆ is the point where the locus of λ(e jω ; μ0 ) cuts the imaginary axis. Hence, the frequency of oscillations can be approximated by ωR . When μ = 1, α = 0.5 and −1.5 ≤ b ≤ −1.2, the digital filter exhibits oscillation behaviors. The oscillation frequency depends on the filter parameter b, but it is 0
independent of the initial conditions except when x(0) = 0 . Figure 4.1a shows the actual oscillation frequencies of a second order digital filter associated with
0.0001
the saturation nonlinearity when μ = 1.0001μ0 , α = 0.5, x(0) = 0.0001 and −1.5 ≤ b ≤ −1.2, while Figure 4.1b shows the estimated frequencies via the
1.405
1.405
1.4
1.4
1.395
1.395
1.39
1.39
Estimated frequency
Actual frequency
Oscillations of Digital Filters Associated with Saturation Nonlinearity
1.385
1.38
1.385
1.38
1.375
1.375
1.37
1.37
1.365
1.365
1.36 ⫺1.5 ⫺1.45 ⫺1.4 ⫺1.35 ⫺1.3 ⫺1.25 ⫺1.2 ⫺1.15 ⫺1.1
1.36 ⫺1.5 ⫺1.45 ⫺1.4 ⫺1.35 ⫺1.3 ⫺1.25 ⫺1.2 ⫺1.15 ⫺1.1
b
b (a)
57
(b)
Figure 4.1 (a) Actual oscillation frequencies of the second order digital filter associated with the saturation nonlinearity; (b) Estimated frequencies via the Hopf bifurcation theorem.
Hopf bifurcation theorem. It can be seen from Figure 4.1b that the difference between the actual frequencies and the estimated frequencies are negligible, and so the estimations are valid. Example 4.2
Consider the delayed logistic system with state space matrices A = 00 μ1 ,
B = 01 , C = 01 01 and D = [0 0], and the nonlinearity is governed by g( y(k);
μ) = −μy1 (k)y2 (k), where y(k) ≡ [y1 (k)y2 (k)]T . Find ζ(e jωR ).
Solution:
1 z−1 The transfer function of the digital filter is G(z; μ) = z−μ and the 1 corresponding nonlinear function is f (e(k); μ) =−μe1 (k)e
2(k). By solving G(z; μ)f (e(k); μ)|z=1,e=ˆe = −ˆe, we have eˆ = μ1 − 1 11 . Hence, the Jacobian matrix is given by J(μ) = ∂f (e(k);μ) = (μ − 1)[1 1] and the ∂e(k) e=ˆe
58
4 Saturation in Digital Filters
open loop system matrix is G(z; μ)J(μ) = μ−1 z−μ (e jω ; μ) = 0
−jω . λ2 (e jω ; μ) = (μ − 1) 1+e ejω −μ
−1 z
1
z−1 1
with eigenvalues
(e jω ; μ) = 0
Since λ1 ∀ω ∈ ℜ, λ1 and it never crosses the critical point −1 + 0j. Hence, the only relevant eigenvalues is λ2 (e jω ; μ). The normalized right and left eigenvectors associated with
1 −jω λ2 (e jω ; μ) are η1 = √ e 1 and η2 = √1 11 , respectively. Hence, we 2 2 have Q = − √μ [1 e−jω ] and L = [0 0]. As a result, the linearized closed 2
1 μ 1 jω + e−jω ) 1 0= loop matrix is H(z) = μ−1−z+z (e and we have v 2 z 1 8(μ−1)
√ 1 2(1+e−jωR )p(ωR ) μe−jω 2 jω R and v = 4(μ−1−e2jωR +e4jωR ) e2jωR . Thus, ζ(e ) = (μ−e jωR )(1+e−jω ) , where √ μ 2 μ p(ωR ) = − (e jω + e−jω ) + (e j(ω+2ωR ) + 1) 2 1 + e−jω 4 8(μ − 1) μe−jω . × 4(μ − 1 − e2jωR + e4jωR ) STABILITY OF OSCILLATIONS OF DIGITAL FILTERS ASSOCIATED WITH SATURATION NONLINEARITY When μ < μ0 (before criticality), the curve λ(e jω ; μ) encircles the point −1 + 0j in a clockwise direction as shown in Figure 4.2a. Hence, the overall system is stable. As a result, oscillation behaviors do not occur and the state variables converge asymptotically to the origin, even though the eigenvalues of the system matrix are outside the unit circle, as shown in Figure 4.2b. However, when μ > μ0 (after criticality), the curve does not encircle the point −1 + 0j as shown in Figure 4.2c. Hence, the equilibrium point is unstable. As a result, the state trajectories will move from the neighbor of the equilibrium point to the limit cycle and oscillation occurs, as shown in Figure 4.2d. In this case, the limit cycle is stable.
Example 4.3 Consider the delayed logistic system discussed in Example 4.2. Does the limit cycle exist when μ = 2.05? Solution: When μ = 2.05, it can be checked that the intersection between λ2 (e jω ; μ) and the negative real axis near the critical point −1 + 0j takes place at ω = 1.018 and ζ(e jω )|ω=1.018 = −0.5185 − j0.0118. As expected, the locus interests the half line verifying the existence of an invariant cycle.
59
Stability of Oscillations of Digital Filters Associated with Saturation Nonlinearity 0.1
1 0.8
0.05
0.6 0
0.2
x2
Image (lemda)
0.4 ⫺0.05
⫺0.1
0 ⫺0.2
⫺0.15
⫺0.4 ⫺0.2 ⫺0.6 ⫺0.25
⫺0.8 ⫺1 ⫺1
⫺0.3 ⫺1.06 ⫺1.04 ⫺1.02 ⫺1 ⫺0.98 ⫺0.96 ⫺0.94 ⫺0.92 ⫺0.9 ⫺0.88
⫺0.5
(a)
0
0.5
1
0.5
1
x1
Real (lemda) (b) 0.1
1 0.8
0.05 0.6 0.4 0.2
⫺0.05
x2
Image (lemda)
0
⫺0.1
0 ⫺0.2 ⫺0.4
⫺0.15
⫺0.6 ⫺0.2 ⫺0.8 ⫺1 ⫺1
⫺0.25 ⫺0.98 ⫺0.96 ⫺0.94 ⫺0.92 ⫺0.9 ⫺0.88 ⫺0.86 ⫺0.84 ⫺0.82 ⫺0.8
(c)
⫺0.5
0
x1
Real (lemda) (d)
' 0.99 ; 0.99 jω ; μ) when μ = 1.01μ , a = 0.5, b = −1.25 (b) The corresponding state trajectories; (c) The curve λ (e 0 & ' 0.99 and x(0) = ; (d) The corresponding state trajectories. 0.99
Figure 4.2 (a) The curve λ(e jω ; μ) when μ = 0.99μ0 , a = 0.5, b = −1.25 and x(0) =
&
SUMMARY In this chapter the existence of oscillations in digital filters associated with saturation nonlinearity is discussed via the Hopf bifurcation theorem. The state trajectories may converge to the origin even though the eigenvalues of the system matrix are outside the unit circle.
60
4 Saturation in Digital Filters
EXERCISES 1. Consider the discretized model of a neural netlet in which their excitation and inhibition is governed by x1 (k + 1) = e−μ x1 (k) + a(1 − e−μ )tanh(c1 x2 (k)) and x2 (k + 1) = e−μ x2 (k) + a(1 − e−μ )tanh(−c2 x1 (k)), where a, c1 and c2 are positive constants and μ is the bifurcation parameter that presents the time delay due to the finite switching speed of amplifiers in models of electronic networks. Assume that a2 c1 c2 > 1. Define μ0 ≡ ln(a2 c1 c2 + 1) − ln(a2 c1 c2 − 1). Find the state space matrices of the corresponding filter and the corresponding nonlinear function f (e(k); μ). 2. Consider the same problem in Question 1. Find ζ(e jωR ). 3. Consider √ the same problem in Question 1. Is the fixed point stable ∀μ > μ0 , a = 3 and c1 = c2 = 1?
5 AUTONOMOUS RESPONSE OF DIGITAL FILTERS WITH TWO’S COMPLEMENT ARITHMETIC
In a real situation, digital filters are usually implemented via the two’s complement arithmetic because subtraction can be implemented easily via addition. However, the two’s complement arithmetic involves a periodic discontinuous nonlinear function, and the dynamics of digital filters could be very complicated even when no input signal is applied. Limit cycle and chaotic behaviors could occur even for second order digital filters. In this chapter autonomous response of second order lowpass and highpass digital filters associated with two’s complement arithmetic is discussed. In particular, the lowpass filter containing a DC pole and the highpass filter containing a pole located at z = −1 are discussed. Finally, various conditions for the occurrence of limit cycle and chaotic behaviors are given.
SYSTEM MODEL Second order real digital filters can be represented by a state space model as follows: & ' x (k + 1) x(k + 1) = 1 = F(x(k)). (5.1) x2 (k + 1) Using a direct form representation, the system can then be further represented as: & ' x2 (k) x(k + 1) = , (5.2) f (bx1 (k) + ax2 (k) + u(k)) where a and b are the filter parameters, u(k) is the input signal, x1 (k) and x2 (k) are the state variables, and f is the nonlinearity due to the use of two’s complement arithmetic. 61
62
5 Autonomous Response of Digital Filters with Two’s Complement Arithmetic
The nonlinearity f can be modeled as such that
f (ν) = v − 2n
(5.3)
2n − 1 ≤ v < 2n + 1
(5.4)
and n ∈ Z. Hence, the system can be represented as & ' x2 (k) x(k + 1) = bx1 (k) + ax2 (k) + u(k) + 2s(k) & ' 0 = Ax(k) + Bu(k) + s(k) 2
∀k ≥ 0, where & ' & ' ( x1 (k) x1 (k) 2 ∈I ≡ : −1 ≤ x1 (k) < 1, −1 ≤ x2 (k) < 1 , x2 (k) x2 (k) A=
& 0 b
B= and
' 1 , a
& ' 0 , 1
s(k) ∈ {−m, . . . , −1, 0, 1, . . . , m},
(5.5) (5.6)
(5.7)
(5.8)
(5.9)
(5.10)
in which m is the minimum integer satisfying −2m − 1 ≤ bx1 (k) + ax2 (k) + u(k) < 2m + 1.
(5.11)
Since s(k) is an element in the discrete set {−m, . . . , −1, 0, 1, . . . , m}, the values of s(k) can be viewed as symbols and s(k) is called a symbolic sequence. It is worth noting that once the initial condition x(0), the filter parameters and the input signal are given, the state variables and the symbolic sequences are uniquely defined by equations (5.3)–(5.11). Also, for a given set of filter parameters and an input signal, denote the symbolic sequence as s = (s(0), s(1), . . .) and the set of symbolic sequence as . Denote the map from the set of initial 2 conditions to the set of symbolic sequence as S, that is S : I → . The
symbolic x1 (0) sequence s in is said to be admissible if ∃ x2 (0) ∈ I 2 such that S xx21 (0) = s. (0) The set can be partitioned into three subsets: α = {s = (s(0), s(1), . . . ): s is periodic}, β = {s = (s(0), s(1), . . . ) : s is periodic after a number of iterations} and γ = \(α ∪ β ).
Linear and Affine Linear Behaviors
63
LINEAR AND AFFINE LINEAR BEHAVIORS Filters with a DC pole For a second order digital filter with a DC pole, the filter coefficients have to satisfy the following condition: b = a + 1.
(5.12)
In this chapter we only consider the autonomous response, that is u(k) = 0
(5.13)
∀k ≥ 0. For the strictly linear property, s(k) = 0 ∀k ≥ k0 . Hence, we have the following theorem: Theorem 5.1 For b = a + 1 and |a + 1| > 1, s(k) = 0 ∀k ≥ k0 if and only if ∃k0 ∈ Z+ ∪ {0} such that x1 (k0 ) = −x2 (k0 ). Proof: For the if part, since b = a + 1 and s(k) = 0 ∀k ≥ k0 , we have:
' ' & 1 (a + 1)k−k0 (x1 (k0 ) + x2 (k0 )) + (−1)k−k0 ((a + 1)x1 (k0 ) − x2 (k0 )) x1 (k) . = x2 (k) a + 2 (a + 1)k−k0 +1 (x1 (k0 ) + x2 (k0 )) − (−1)k−k0 ((a + 1)x1 (k0 ) − x2 (k0 )) (5.14)
&
Since |a + 1| > 1, (a + 1)k−k0 (x1 (k0 ) + x2 (k0 )) diverges as k → +∞ if
x1 (k0) + x2 (k0 ) = 0. However, as s(k) = 0 ∀k ≥ k0 , this implies that x1 (k) 2 k−k0 (x (k ) + x (k )) is bounded ∀k ≥ k . Hence, 1 0 2 0 0 x2 (k) ∈ I and that (a + 1) x1 (k0 ) + x2 (k0 ) = 0 and this proves the if part.
0 + 1) For the only if part, since x1 (k0 ) = −x2 (k0 ), we have xx21 (k =
(k0 + 1) −x1 (k0 ) −x1 (k0 ) x1 (k0 + 1) = f (x1 (k0 )) . Since |x1 (k0 )| < 1, we have x2 (k0 + 1) =
f ((a + 1)x 1 (k0 ) − ax1 (k0 )) −x1 (k0 ) x1 (k0 ) and s(k0 ) = 0.
x1 (k0 ) x1 (k0 + 2) 0 + 2) Similarly, we have xx21 (k (k0 + 2) = −x1 (k0 ) and s(k0 + 1) = 0. Since x2 (k0 + 2) =
x1 (k0 ) x2 (k0 ) , we have s(k) = 0 ∀k ≥ k0 and this proves the only if part and completes the proof.
64
5 Autonomous Response of Digital Filters with Two’s Complement Arithmetic
Remark 5.1 Although the digital filter is implemented via the two’s complement arithmetic, the system may behave as a linear system when s(k) = 0 ∀k ≥ k0 . Also, since the eigenvalues of matrix A are −1 and a + 1, where |a + 1| > 1, one of the eigenvalues is outside the unit circle and the digital filter is unstable. However, the trajectory of an unstable linear system is confined in a finite state space. This is counter intuitive. Theorem 5.1 gives the necessary and sufficient condition for the nonlinear system to behave as a linear system after a number of iterations. It is interesting to note that the system would behave as a linear system after a number of iterations if and only if the state vector toggles between two points on a particular straight line of the phase plane.
Example 5.1
+ 1) x1 (k) 0 1 Consider the system xx21 (k = A + Bs(k), where A = x2 (k) a+1 a ,
(k+ 1) 0 x1 (0) 0.9003 B = 2 , a = 3 and x2 (0) = −0.5377 . Plot the phase portrait of the system. Solution: The phase portrait of the system is shown on Figure 5.1. It can be seen from Figure 5.1 that the state vector toggles between two states at the steady state on a particular straight line x1 = −x2 of the phase plane.
The strictly linear property – that is s(k) = 0 ∀k ≥ k0 , was discussed in Theorem 5.1. How about the affine linear property – that is, s(k) = a = 0 ∀k ≥ k0 ? This case is presented in the following theorem:
Theorem 5.2 + For b = a + 1 and a being an odd integer,
∃k 0 ∈ Z ∪ {0} such that x1 (k) x1 (k0 ) x1 (k0 ) = x2 (k0 ) = −1 if and only if s(k) = a and x2 (k) = x2 (k0 ) ∀k ≥ k0 .
Proof:
x2 (k0 ) 0 + 1) + For the if part, since xx21 (k (k0 + 1) = f ((a + 1)x1 (k0 ) + ax2 (k0 )) , if ∃k0 ∈ Z ∪ {0}
−1 0 + 1) such that x1 (k0 ) = x2 (k0 ) = −1, then we have xx21 (k (k0 + 1) = f (−(2a + 1)) .
65
Linear and Affine Linear Behaviors
−1 0 + 1) Since a is an odd integer, we have xx21 (k (k0 + 1) = −1 and s(k0 ) = a. As
x1 (k0 + 1) x1 (k0 ) −1 x2 (k0 + 1) = x2 (k0 ) = −1 , we have s(k0 ) = a and x1 (k) = x2 (k) = −1 ∀k ≥ k0 . For the only if part, since
x1 (k0 + 1) x2 (k0 + 1)
=
x2 (k0 ) f ((a + 1)x1 (k0 ) + ax2 (k0 ))
, if x1 (k) =
x1 (k0 ) have x2 (k0 ) =
then we x2 (k) = x2 (k0 ) ∀k ≥ k0 , x2 (k0 ) which implies x1 (k0 ) = x2 (k0 ) and x2 (k0 ) = f ((a + 1)x1 (k0 ) + ax2 (k0 )) , f ((a + 1)x1 (k0 ) + ax2 (k0 )). Since s(k) = a ∀k ≥ k0 , we have x1 (k0 ) = (a + 1) × x1 (k0 ) + ax1 (k0 ) + 2a, which implies 2a(x1 (k0 ) + 1) = 0. As a is an odd integer, so a = 0. As a result, we have x1 (k0 ) = −1 and we prove the only if part and complete the proof. x1 (k0 )
and
1 0.8 0.6 0.4
x2
0.2 0
x(1) x(2)
⫺0.2 ⫺0.4
x(0)
⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0
0.2
0.4
0.6
0.8
x1 Figure 5.1 The phase portrait of the second order digital filter associated with two’s complement arithmetic. The points x(0), x(1), x(2) are as annotated, and the points with ‘∗ ’ denote the ‘steady states’ of x.
1
66
5 Autonomous Response of Digital Filters with Two’s Complement Arithmetic
0 ⫺0.1 ⫺0.2 x(0) ⫺0.3
x2
⫺0.4 ⫺0.5 ⫺0.6 ⫺0.7 ⫺0.8 ⫺0.9 x(2) ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0
0.2
0.4
x1 Figure 5.2 The phase portrait of the second order digital filter associated with two’s complement arithmetic. The points x(0), x(1), x(2) are as annotated, and the point with ‘∗ ’ denotes the ‘steady state’ of x.
Remark 5.2 Theorem 2 states the necessary and sufficient condition for the state vector to stay at a fixed point after a number of iterations when the parameter a is an odd integer. It is interesting to note that this fixed point is (−1, −1). Example 5.2
+ 1) x1 (k) 0 Consider the system xx21 (k (k + 1) = A x2 (k) + Bs(k), where A = a + 1
0.1875 B = 02 , a = 3 and xx21 (0) (0) = −0.25 . Plot the phase portrait of the system.
1 a
,
Solution: The phase portrait of the system is shown on Figure 5.2. It can be seen from −1 Figure 5.2 that the state vector converges to a fixed point xx21 (k) = (k) −1 .
Linear and Affine Linear Behaviors
67
Filters with a pole located at z = −1 For a second order digital filter with a pole located at z = −1, the filter coefficients are required to satisfy the following condition: b = −a + 1.
(5.15)
Similarly, we also only consider the autonomous response, that is: u(k) = 0
(5.16)
∀k ≥ 0. Remark 5.3 It can be shown that properties similar to Theorem 5.1 and Theorem 5.2 can be obtained accordingly as stated below.
Theorem 5.3 For b = −a + 1 and |a − 1| > 1, s(k) = 0 ∀k ≥ k0 if and only if ∃k0 ∈ Z+ ∪ {0} such that x1 (k0 ) = x2 (k0 ). Proof: The proof is omitted here.
Example 5.3
+ 1) x1 (k) 0 1 Consider the system xx21 (k (k + 1) = A x2 (k) + Bs(k), where A = −a + 1 a ,
−0.1875 = B = 02 , a = 3 and xx21 (0) (0) −0.1234 . Plot the phase portrait of the system. Solution: The phase portrait of the system is shown in Figure 5.3. It can be seen from the figure that the state vector converges to a fixed point on a particular straight line x1 = x2 of the phase plane.
Theorem 5.4 For b = −a + 1 and a being an odd integer, there does not exist k0 ∈ Z+ such that s(k) = a ∀k ≥ k0 .
68
5 Autonomous Response of Digital Filters with Two’s Complement Arithmetic
1 0.8 0.6 0.4 x(2)
x2
0.2 0
x(1) x(0)
⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0
0.2
0.4
0.6
0.8
1
x1 Figure 5.3 The phase portrait of the second order digital filter associated with two’s complement arithmetic. The points x(0), x(1), x(2) are as annotated, and the point with ‘∗ ’ denotes the ‘steady state’ of x.
Proof:
k−1 k−1−j k−k0 x1 (k0 ) + Bs( j) ∀k > k0 , if s(k) = a Since xx21 (k) j=k0 A (k) = A x2 (k0 ) ∀k ≥ k0 , we have: ⎡ ⎤ k−k0 x (k ) − x (k ) − 2a (a − 1) 2 0 1 0 ⎢ ⎥ 2−a ⎢ ⎥ ⎢ ⎥ ⎢ + (a − 1)x (k ) − x (k ) + 2a − 2a(k − k ) ⎥ & ' ⎢ ⎥ 1 0 2 0 0 1 ⎢ x1 (k) 2−a ⎥ = ⎢ ⎥. x2 (k) ⎥ a−2 ⎢ 2a ⎢(a − 1)k−k0 +1 x2 (k0 ) − x1 (k0 ) − ⎥ ⎢ ⎥ 2 − a ⎢ ⎥ ⎣ ⎦ 2a(a − 1) − 2a(k − k0 ) + (a − 1)x1 (k0 ) − x2 (k0 ) + 2−a (5.17)
x1 (k) 2 As k → +∞, k − k0 → +∞, so lim x2 (k) ∈/ I . Hence, there does not exist k→+∞
k0 ∈ Z+ such that s(k) = a ∀k ≥ k0 , and this proves the theorem.
69
Linear and Affine Linear Behaviors
1
x(2)
0.8 0.6
x(0)
0.4
x2
0.2 0 x(1) ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0
0.2
0.4
0.6
0.8
1
x1
Figure 5.4 The phase portrait of the second order digital filter associated with two’s complement arithmetic. The points x(0), x(1), x(2) are as annotated, and the point with ‘∗ ’ denotes the ‘steady state’ of x.
Example 5.4
+ 1) x1 (k) 0 1 Consider the system xx21 (k = A + Bs(k), where A = x2 (k) −a + 1 a ,
(k + 1) x1 (0) 0 0.7826 B = 2 , a = 3 and x2 (0) = 0.5242 . Plot the phase portrait of the system and check if ∃k0 ≥ 0 such that s(k) = a ∀k ≥ k0 . Solution: The phase portrait of the system is shown in Figure 5.4. It can be checked that ∃k0 ≥ 0 such that s(k) = 0 = a ∀k ≥ k0 . Observation 5.1 When b = −a + 1 and a is an odd integer, the state vector converges to a fixed point on a particular straight line x1 = x2 of the phase plane ∀x(0) ∈ I 2 . Example 5.5 Generate a random initial condition x(0) in I 2 , plot the response of the state variables with a = 5 and b = −4.
70
5 Autonomous Response of Digital Filters with Two’s Complement Arithmetic
1 0.8 0.6 0.4
x2(k)
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1
0
50
100
150
200
250
Time index k Figure 5.5 The response of the second order digital filter associated with two’s complement arithmetic. The initial condition is x(0) = [−0.1886 0.87909]T , a = 5 and b = −4, the state converges to a fixed point.
Solution: The response of the state variables is shown on Figure 5.5. As can be seen in Figure 5.5, the state converges to a fixed point.
LIMIT CYCLE BEHAVIOR Filters with a DC pole In this section several conditions for exhibiting eventually periodic state vector are presented. Theorem 5.5
x1 (k + M) For b = a + 1, if ∃M ∈ Z+ such that xx21 (k) = (k) x2 (k + M) ∀k ≥ k0 , then k0 −1 s( j) M M (x1 (0) + x2 (0))((a + 1) − 1) + 2(2(a + 1) − 1) j=0 (a + 1) j+1 + 2(a + 1)M k0 +M−1 s( j) = 0. j=k0 (a + 1) j+1
71
Limit Cycle Behavior
Proof: For b = a + 1, the
digital filter can be represented by the state equax1 (k + 1) 0 1 x1 (k) 0 tion x2 (k + 1) = a + 1 a x2 (k) + 2 s(k). Hence, the solution of the system is: ) *& & ' ' (a + 1)k − (−1)k x1 (0) (a + 1)k + (a + 1)(−1)k x1 (k) 1 = x2 (k) a + 2 (a + 1)k+1 − (a + 1)(−1)k (a + 1)k+1 + (−1)k x2 (0) ) * k−1 2 # (a + 1)k−1−j − (−1)k−1−j s( j). (5.18) + a+2 (a + 1)k−j + (−1)k−1−j j=0 If ∃M ∈ Z+ such that
x1 (k) x2 (k)
=
x1 (k + M) x2 (k + M)
∀k ≥ k0 , then:
*& ) ' x1 (0) (a + 1)k0 − (−1)k0 (a + 1)k0 + (a + 1)(−1)k0 1 a + 2 (a + 1)k0 +1 − (a + 1)(−1)k0 (a + 1)k0 +1 + (−1)k0 x2 (0) * ) k0 −1 (a + 1)k0 −1−j − (−1)k0 −1−j 2 # + s( j) a+2 (a + 1)k0 −j + (−1)k0 −1−j j=0 * ) (a + 1)k0 +M + (a + 1)(−1)k0 +M (a + 1)k0 +M − (−1)k0 +M 1 = a + 2 (a + 1)k0 +M+1 − (a + 1)(−1)k0 +M (a + 1)k0 +M+1 + (−1)k0 +M * ) & ' k +M−1 x1 (0) (a + 1)k0 +M−1−j − (−1)k0 +M−1−j 2 0# × s( j). + x2 (0) a+2 (a + 1)k0 +M−j + (−1)k0 +M−1−j j=0 (5.19)
Hence, ⎧ ⎛ ⎞ k# 0 −1 ⎪ k0 ⎪ s( j) (a + 1) ⎪ ⎪ ⎝x1 (0) + x2 (0) + 2 ⎠ ((a + 1)M − 1) ⎪ ⎪ ⎪ a+2 (a + 1) j+1 ⎪ j=0 ⎪ ⎪ ⎪ ⎞ ⎛ ⎪ ⎪ k# ⎨ 0 −1 k0 s( j) (−1) ⎠. ⎝(a + 1)x1 (0) − x2 (0) − 2 +((−1)M − 1) j+1 ⎪ a + 2 (−1) ⎪ ⎪ j=0 ⎪ ⎪ ⎪ ⎪ k +M−1 ⎪ 0 # ⎪ ⎪ ⎪ + 2 ⎪ s( j)((a + 1)k0 +M−1−j − (−1)k0 +M−1−j ) = 0 ⎪ ⎩ a+2 j=0
(5.20)
72
5 Autonomous Response of Digital Filters with Two’s Complement Arithmetic
⎧ ⎛ ⎞ k# 0 −1 ⎪ k0 +1 ⎪ s( j) (a + 1) ⎪ M ⎪ ⎝x1 (0) + x2 (0) + 2 ⎠ ⎪ ⎪ ((a + 1) − 1) a + 2 ⎪ (a + 1) j+1 ⎪ j=0 ⎪ ⎪ ⎪ ⎛ ⎞ ⎪ ⎪ k −1 ⎨ 0 k0 # s( j) (−1) ⎝2 + ((−1)M − 1) − ((a + 1)x1 (0) − x2 (0))⎠ ⎪ a+2 (−1) j+1 ⎪ ⎪ j=0 ⎪ ⎪ ⎪ ⎪ k +M−1 ⎪ 0 # ⎪ 2 ⎪ ⎪ (5.21) ⎪ + s( j)((a + 1)k0 +M−j + (−1)k0 +M−1−j ) = 0. ⎪ ⎩ a+2 j=0
Let
⎞ ⎛ k# 0 −1 k0 s( j) (a + 1) ⎝x1 (0) + x2 (0) + 2 ⎠, (5.22) t1 = ((a + 1)M − 1) a+2 (a + 1) j+1 j=0 ⎞ ⎛ k# 0 −1 k0 (−1) s( j) ⎝(a + 1)x1 (0) − x2 (0) − 2 ⎠, (5.23) t2 = ((−1)M − 1) a+2 (−1) j+1 j=0
t3 =
2 a+2
k0 +M−1 # j=0
s( j)(a + 1)k0 +M−1−j ,
(5.24)
and
Then we have:
which implies
2 a+2
k0 +M−1 #
s( j)(−1)k0 +M−1−j .
(5.25)
t1 + t2 + t3 − t4 = 0 , (a + 1)t1 − t2 + (a + 1)t3 + t4 = 0
(5.26)
t4 =
j=0
a = −2
or
(5.27)
t1 = −t3 .
For a = −2, we have t1 = −t3 , that is: ⎞ ⎛ k# 0 −1 k0 s( j) (a + 1) ⎠ ⎝x1 (0) + x2 (0) + 2 ((a + 1)M − 1) a+2 (a + 1) j+1 j=0
=−
2 a+2
k0 +M−1 # j=0
s( j)(a + 1)k0 +M−1−j ,
(5.28)
73
Limit Cycle Behavior
⇒ (x1 (0) + x2 (0))((a + 1)M − 1) + 2(2(a + 1)M − 1) + 2(a + 1)M
k0 +M−1 # j=k0
k# 0 −1 j=0
s( j) (a + 1) j+1
s( j) = 0. (a + 1) j+1
This completes the proof. Remark 5.4 If, after a number of iterations, the state vector is periodic with period M, then the symbolic sequence will also be periodic with the same period, that is, s ∈ β . Hence, Theorem 5.5 gives a necessary condition for a symbolic sequence to be periodic after a number of iterations. However, s(k) is an integer in {−m, . . . , −1, 0, 1, . . . m} and the periodicity of the symbolic sequence is M. So there are (2m + 1)M possibilities of s. Example 5.6 Consider Example 5.1. Check if Theorem 5.5 is satisfied or not. Solution:
0.9003 By putting k0 = 32, M = 2, a = 3 and x(0) = −0.5377 into Theorem 5.5, it can be checked easily that it is satisfied. Remark 5.5 Refer to Theorem 5.1. Since one of the eigenvalues may be unstable, one may predict that the periodic orbits are unstable. However, a counter intuitive phenomenon is observed in which the periodic orbits are stable if a is an odd integer. This counter intuitive phenomenon is presented in Observation 5.2. Observation 5.2 When b = a + 1 and a is an odd integer, the state vector toggles between two states at the steady state on a particular
straight line x1 = −x2 of the phase plane ∗ 2 or converges to a fixed point x = −1 −1 ∀x(0) ∈ I . Example 5.7 Generate a random initial condition x(0) in I 2 , plot the response of the state variables with a = 5 and b = 6.
74
5 Autonomous Response of Digital Filters with Two’s Complement Arithmetic
1 0.8 0.6 0.4
x2(k)
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1
0
20
40
60
80
100
120
Time index k Figure 5.6 The response of the second order digital filter associated with two’s complement arithmetic. The initial condition x(0) = [−0.7826 0.5242]T is generated randomly. When a = 5 and b = 6, the state converges to a period 2 signal.
Solution: The response of the state variables is shown on Figure 5.6. As can be seen in Figure 5.6, the state converges to a signal with a period of 2.
Filters with a pole located at z = −1 As in Theorem 5.5, a limit cycle behavior can occur when there is a pole located at z = −1. This property is stated in the following theorem: Theorem 5.6
x1 (k + M) For b = −a + 1, if ∃M ∈ Z+ such that xx21 (k) = (k) x2 (k + M) ∀k ≥ k0 , then
k −1 s( j) 0 +M−1 0 +2 kj=k (a + 1)M−j−1× (1 − (a − 1)M ) x1 (0) − x2 (0) − 2 j=0 (a − 1) j+1 0 s( j) = 0. Proof: The proof is omitted here.
Chaotic Behavior
75
Example 5.8 Consider Example 5.3. Check if Theorem 5.6 is satisfied or not. Solution:
−0.1875 By putting k0 = 57, M = 1, a = 3 and x(0) = −0.1234 into Theorem 5.6, we can see that it is easily satisfied.
CHAOTIC BEHAVIOR Filters with a DC pole Observation 5.3 Contrary to Observation 5.2, when b = a + 1 and a deviates slightly from an odd integer, the state neither converges to a periodic signal nor a fixed point.
Example 5.9 Generate a random initial condition x(0) in I 2 , plot the response of the state variables with a = 3.001 and b = 4.001. Solution: The response of the state variables is shown on Figure 5.7. As can be seen in Figure 5.7, chaotic behavior is exhibited.
Filters with a pole located at z = −1 Observation 5.4 Similarly, when b = −a + 1 and a deviates slightly from an odd integer, the state does not converge to a fixed point.
Example 5.10 Generate a random initial condition x(0) in I 2 , plot the response of the state variables with a = 5.01 and b = −4.01. Solution: The response of the state variables is shown on Figure 5.8. As can be seen from Figure 5.8 chaotic behavior is exhibited.
76
5 Autonomous Response of Digital Filters with Two’s Complement Arithmetic 1 0.8 0.6 0.4
x2(k)
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1
0
200
400
600
800
1000
1200
Time index k
Figure 5.7 The response of the second order digital filter associated with two’s complement arithmetic. The initial condition is x(0) = [−0.8 0.7999]T , a = 3.001 and b = 4.001. The state neither converges to a periodic signal nor a fixed point. 1 0.8 0.6 0.4
x2(k)
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1
0
50
100
150
200
250
Time index k
Figure 5.8 The response of the second order digital filter associated with two’s complement arithmetic. The initial condition is x(0) = [−0.5 0.5001]T , a = 5.01 and b = −4.01. The state does not converge to a fixed point.
Exercises
77
SUMMARY In this chapter autonomous response of second order lowpass and highpass digital filters associated with two’s complement arithmetic were discussed, and conditions for the occurrence of limit cycles were derived. Based on the derived conditions, some counter intuitive phenomena were presented.
EXERCISES 1. 2. 3. 4. 5. 6.
Prove Theorem 5.3. Prove Theorem 5.6. Plot the phase portrait of the system shown in Figure 5.5. Plot the phase portrait of the system shown in Figure 5.6. Plot the phase portrait of the system shown in Figure 5.7. Plot the phase portrait of the system shown in Figure 5.8.
6 STEP RESPONSE OF DIGITAL FILTERS WITH TWO’S COMPLEMENT ARITHMETIC
In Chapter 5 we presented nonlinear behaviors exhibited in the autonomous response of both lowpass and highpass digital filters associated with two’s complement arithmetic. However, in practice various types of input signals are usually applied. As a result, we need to analyze forced input systems in addition to autonomous systems. In this chapter we look at nonlinear behaviors exhibited in the step response of bandpass digital filters. It is well-known that, in general, the method of affine transformation cannot relate the step response behaviors and autonomous response behaviors in a straightforward and simplistic manner if the system is nonlinear. We show how the step response behaviors can be related to the autonomous response behaviors in an explicit manner where even overflow nonlinearity occurs. Based on the affine transformation method, some differences between the step response and the autonomous response, as well as some counter intuitive phenomena, are given here. AFFINE LINEAR BEHAVIOR For a marginally stable bandpass filter (refer to Section 5.1), the filter coefficients are as follows: b = −1, (6.1) and
|a| ≤ 2.
We now consider the step response case, that is: u(k) = c ∀k ≥ 0 and c ∈ ℜ. 78
(6.2) (6.3)
Affine Linear Behavior
79
There are three types of trajectories exhibited on the phase plane, namely the type I, II, and III trajectories. The type I, II and III trajectories are defined as trajectories that give a single rotated ellipse, some rotated and translated ellipses, and an elliptical fractal pattern, respectively. The occurrence of a particular type of trajectory depends on the initial condition. For the type I trajectory, there is a single ellipse exhibited on the phase plane. The symbolic sequences are constant. The set of initial conditions for the type I trajectory is an elliptic region on the phase plane. The following theorem shows that these three statements are equivalent to each other.
Theorem 6.1 Let
T= ⌢
A=
cos θ =
a , 2
(6.4)
&
' 0 , sin θ
(6.5)
' sin θ , cos θ
(6.6)
&
1 cos θ
cos θ −sin θ
x∗ =
& ' c 1 , 2−a 1
(6.7)
and ⌢
x(k) =
&
' c + 2s0 ∗ xˆ 1 (k) x , = T−1 x(k) − xˆ 2 (k) c
(6.8)
where s0 ≡ s(0). Then the following three statements are equivalents: ⌢
⌢⌢
i) x(k + 1) = Ax(k) ∀k ≥ 0. ii) s(k) = s+0 ∀k ≥ , 0. , iii) x(0) ∈ x(0) : ,T−1 x(0) −
c+2s0 ∗ c x
, , |c + 2s | , ≤ 1 − 2 − a0 .
(6.9)
80
6 Step Response of Digital Filters with Two’s Complement Arithmetic
Proof: The proof can be divided into two parts. The first part is to prove ⌢⌢ ⌢ that x(k + 1) = Ax(k) ∀k ≥ 0 if and only if s(k) = s0 ∀k ≥ 0. And the second part is , to prove that +
, s(k) = s0 ∀k-≥ 0 if and only if , −1 c + 2s0 ∗ , x(0) − c x , ≤ 1 − |c2+−2sa0 | . x(0) ∈ x(0) : ,T For the necessity of the first part, since x(k + 1) = Ax(k) + Bu(k) +
u(k) = c, s(k) = s0 ∀k ≥ 0, and B = 01 ,
0 2
s(k),
we have
x(k + 1) = Ax(k) + (c + 2s0 )B.
(6.10)
c + 2s0 ∗ x x(k + 1) = T−1 x(k + 1) − c
(6.11)
⌢
implies that ⌢
x(k + 1) = T ⌢
−1
Since A = TAT
−1
c + 2s0 ∗ Ax(k) + (c + 2s0 )B − x . c
(6.12)
and Bc = (I − A)x∗ , we have ⌢⌢
⌢
x(k + 1) = Ax(k),
(6.13)
and this proves the necessity of the first part. For the sufficiency of the first part, if ⌢
then T
−1
⌢⌢
x(k + 1) = Ax(k),
(6.14)
⌢ −1 c + 2s0 ∗ c + 2s0 ∗ x(k) − x(k + 1) − x = AT x , c c
(6.15)
which implies that
x(k + 1) = Ax(k) + Bc + This further implies that
& ' 0 s . 2 0
s(k) = s0 ∀k ≥ 0. This proves the sufficiency of the first part.
(6.16)
(6.17)
81
Affine Linear Behavior
For the necessity of the second part, when s(k) = s0 ∀k ≥ 0, from the
⌢⌢ ⌢ ⌢ above, we have x(k + 1) = Ax(k) ∀k ≥ 0, where x(k) = T−1 x(k) − c +c2s0 x∗ . ⌢⌢
⌢
Since ,
, of x(k + 1) = Ax(k) is a circle with radius the phase portrait , −1 c + 2s0 ∗ , x x(0) − ,, we can let ,T c , ' , & , −1 c + 2s0 ∗ , ⌢ , cos φ(k) . T x(0) − x(k) = , (6.18) x , , sin φ(k) c
This implies that , ' , & & ' , −1 c + 2s0 ∗ , c + 2s0 1 cos φ(k) , T x(0) − + x x(k) = , . (6.19) , cos(θ − φ(k)) , c 2−a 1 Since x(k) ∈ I 2 , that is
|x1 (k)| ≤ 1
(6.20)
|x2 (k)| ≤ 1,
(6.21)
and we have , , , −1 c + 2s0 ∗ , c + 2s0 , T , x(0) − x , cos (φ(k)) + ≤ 1, , c 2−a
(6.22)
which implies that , , , −1 c + 2s0 ∗ , , ≤ 1 − |c + 2s0 | , ,T x(0) − x , , c 2−a
(6.23)
and this proves the necessity of the second part.
⌢ For the sufficiency of the second part, since x(k) = T−1 x(k) − c +c2s0 x∗ , ⌢
A = TAT
−1
and
Bc = (I − A)x∗ ,
(6.24)
we have ⌢
⌢⌢
x(k + 1) = Ax(k) + T
+ , If x(0) ∈ x(0) : ,T−1 x(0) − ⌢
c + 2s0 ∗ x c
−1
& ' 0 (s(k) − s0 ) . 2
, , ≤ 1 − |c + 2s0 | , then ˆx(0) ≤ 1 − 2−a ⌢⌢
(6.25) |c + 2s0 | . 2−a
Since A = 1, we have s(0) = s0 and ˆx(1) = Ax(0) ≤ 1 − |c2+−2sa0 | .
82
6 Step Response of Digital Filters with Two’s Complement Arithmetic
, +
, , , Assume that x(k) ∈ x(k) : ,T−1 x(k) − c +c2s0 x∗ , ≤ 1 − |c2+−2sa0 | , then using an approach similar, we can show that s(k) = s0 and , ,⌢⌢ , , |c + 2s0 | , ,xˆ (k + 1), = , . (6.26) ,Ax(k), ≤ 1 − 2−a Hence, by mathematical induction, we conclude that s(k) = s0 ∀k ≥ 0, and this proves the sufficiency of the second part and completes the proof.
Trajectory pattern ⌢
⌢
⌢⌢
Since A is a rotation matrix, x(k + 1) = Ax(k) ∀k ≥ 0 corresponds to ⌢ a, circular trajectory , with a center at the origin and radius x(0) = , , −1 x(0) − c +c2s0 x∗ ,. By the transformation defined in Theorem 6.1, that ,T
⌢ is x(k) = T−1 x(k) − c +c2s0 x∗ , the trajectory of x(k) is an elliptical orbit with
the center of the ellipse at c +c2s0 x∗ . Since c +c2s0 x∗ = c2+−2sa0 11 , the center is on the diagonal line x2 = x1 . Compared to that of the autonomous response, the center of the ellipse is shifted by the vector 2 −c a 11 , which depends on the input step size and the filter parameter a. Figure 6.1 shows the phase portrait of such a system when a = −1.5 and c = 1 with different
initial conditions. Figure 6.1a shows the trajectory −0.8 when x(0) = −0.9 . Figure 6.1b shows the corresponding symbolic sequence
0.2 s(k) = −2 ∀k ≥ 0. Figure 6.1c shows the trajectory when x(0) = −0.8 . Figure 6.1d shows the corresponding symbolic sequence
s(k) = −1 ∀k ≥ 0. Figure 6.1e shows the trajectory when x(0) = −0.2 0.8 . Figure 6.1f shows the corresponding symbolic
sequence s(k) = 0 ∀k ≥ 0. Figure 6.1g shows the trajectory when x(0) = 0.9 0.8 . Figure 6.1h shows the corresponding symbolic sequence s(k) = 1 ∀k ≥ 0. According to Theorem 6.1, a system will give a type I trajectory if and only if the symbolic sequence is constant at any time instant k ≥ 0. Based on this necessary and sufficient condition, some counter intuitive phenomena are reported in Example 6.1. Theorem 6.1 implies that the system may also give the type I trajectory even when overflow occurs, that is, ∃k ∈ Z + ∪ {0} such that s(k) = 0. As examples, when s(k) = −2 ∀k ≥ 0, s(k) = −1 ∀k ≥ 0, or s(k) = 1 ∀k ≥ 0,
83
Affine Linear Behavior ⫺1
⫺0.8 ⫺0.82
⫺1.5 s(k)
x2
⫺0.84 ⫺0.86
⫺2
⫺0.88 ⫺2.5 ⫺0.9 ⫺3
⫺0.92 ⫺0.92 ⫺0.9 ⫺0.88 ⫺0.86 ⫺0.84 ⫺0.82 ⫺0.8
0
10
x1
20
30
40
50
40
50
40
50
40
50
Time index k
(a)
(b) 0
0.4 0.2
⫺0.5
⫺0.2 s(k)
x2
0
⫺0.4 ⫺0.6
⫺1 ⫺1.5
⫺0.8 ⫺1 ⫺1 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
0
0.2
⫺2
0.4
0
10
x1
20
30
Time index k
(c)
(d) 1
1
0.8 0.5
0.6 s(k)
x2
0.4 0.2 0
0 ⫺0.5
⫺0.2 ⫺0.4 ⫺0.4 ⫺0.2
0
0.2
0.4
0.6
0.8
⫺1
1
0
10
x1
20
30
Time index k
(e)
(f) 2
0.92 0.9
1.5 s(k)
x2
0.88 0.86
1
0.84 0.5 0.82 0.8 0.8
0.82
0.84
0.86
0.88
0.9
0
0.92
(g)
0
10
20
30
Time index k
x1 (h)
Figure 6.1 The phase portrait and the symbolic sequences for the type I trajectories.
84
6 Step Response of Digital Filters with Two’s Complement Arithmetic
overflow does occur, but the system still gives the type I trajectory, as illustrated in Figure 6.1. Example 6.1 Consider a strictly stable second order digital filter with the eigenvalues of the matrix A being complex, that is b = −r 2 and a = 2r cos θ in which 0 < r < 1 and θ ∈ ℜ. Show that if u(k) = s(k) = 0 ∀k ≥ 0, then the phase trajectory converges to the origin. + θ Define Ik2 ≡ x(0) : x(0) ∈ I 2 and |sin((k + 1)θ)x2 (0) − r sin (kθ)x1 (0)|< sin . k r .K ′ 2 ′ Show that if overflow does not occur, then ∃K ≥ 0 such that x(0) ∈ k=0 Ik , and this set of initial conditions corresponds to a polygon on the phase plane. Solution: jθ Let D = re0
0 re−jθ
and T =
&
jθ
√1 e− 2 r
√ jθ re 2
jθ
√1 e 2 r √ − jθ 2
re
'
. Then A = TDT−1 . If overflow does
not occur, then x(k) = TDk T−1 x(0). This implies that ' & rk−1 sin θ (sin(kθ)x2 (0) − r sin((k − 1)θ)x1 (0)) ∀k ≥1. Hence, x(k) = rk sin θ (sin((k + 1)θ)x2 (0) − r sin(kθ)x1 (0))
lim x(k) = 0. As the
k→+∞
state vector converges to zero, the phase trajectory converges to the origin as shown in Figure 6.2a.
k r Since x(k) ∈ I 2 , this implies that sin θ (sin((k + 1)θ)x2 (0) − r sin (kθ)x1 (0)) <1 ∀k ≥ 0. If sin ((k + 1)θ) > 0, then θ r sin(kθ)x1 (0) − sin k r sin((k + 1)θ)
< x2 (0) <
θ r sin(kθ)x1 (0) + sin k r
.
(6.27)
> x2 (0) >
θ r sin(kθ)x1 (0) + sin k r
.
(6.28)
If sin((k + 1)(θ) < 0, then
θ r sin(kθ)x1 (0) − sin k r sin((k + 1)θ)
As
sin((k + 1)θ)
sin((k + 1)θ)
+ θ Ik2 ≡ x(0) : x(0) ∈ I 2 and |sin((k + 1)θ)x2 (0) − r sin(kθ)x1 (0)| < sin k r
∀k ≥ 0, we can characterize Ik2 as the region bounded between two parallel straight lines in I 2 described by the inequalities in eqns (6.27) or (6.28). Although the slope of the two parallel straight lines for Ik2 is different for different values
85
Affine Linear Behavior
0.5 0.4 0.3 0.2
x2
0.1 0 ⫺0.1 ⫺0.2 ⫺0.3 ⫺0.4 ⫺0.5 ⫺0.5
⫺0.4
⫺0.3
⫺0.2
0.1
0
⫺0.1
0.2
0.3
0.4
0.5
x1
(a) 1 0.8 0.6 0.4
x2(0)
0.2 0
⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0
0.2
0.4
0.6
0.8
1
x1(0) (b) Figure 6.2 (a) The phase portrait of strictly stable second &order 'digital filters associated with two’s 0.5 ; (b) The set of initial conditions of complement arithmetic for r = 0.9999, θ = 0.75π and x(0) = −0.5 the corresponding digital filters when s(k ) = 0 ∀k ≥ 0.
86
6 Step Response of Digital Filters with Two’s Complement Arithmetic
of k, the y-axis intercepts of these two lines move away from the origin as k increases. Hence, ∃K ≥ 0 such that Ik2 = I 2 ∀k ≥ K. This implies that ∃K ′ ≥ 0 . .K ′ 2 2 2 such that K ′ ≤ K and +∞ k=0 Ik ⊆ I . As a result, if overflow does k=0 Ik = .K ′ 2 not occur, then x(0) ∈ k=0 Ik . This set of initial conditions corresponds to a polygon on the phase plane as shown in Figure 6.2b, and the number of sides of the polygon depends on the value of K ′ .
Periodicity of the state vector Even if a single ellipse is exhibited on the phase plane, the state variables ⌢ may not be periodic. Since A is a rotation matrix, x(k) is periodic if and only if θ is a rational multiple of π. It is worth noting that the frequency spectrum of x1 (k) and x2 (k) consists of impulses located at the DC frequency and at the natural frequency of the digital filter, whether x(k) is periodic or not (it is one of various differences between continuous time systems and discrete time systems). For the symbolic sequences, since s(k) = s0 ∀k ≥ 0, the frequency spectrum of s(k) consists of an impulse located at the DC frequency only. Example 6.2 Consider the same strictly stable second order digital filter discussed in Example 6.1. Is the state trajectory corresponding to s(k) = 0 ∀k ≥ 0 periodic when θ is a rational multiple of π? Solution: Since x(k) = TDk T−1 x(0), it is aperiodic even though θ is a rational multiple of π.
Set of initial conditions for the type I trajectory The set of initial conditions corresponding to the type I trajectory consists of rotated and translated elliptical regions. For each value of s0 , the region is characterized by a single rotated and translated ellipse with the center at c +c2s0 x∗ . It is interesting to note that these centers are the same as that for the trajectory described in Section 6.1.1, and so these centers are also on the diagonal line x2 = x1 . Compared to the autonomous response, the set of admissible initial
conditions is shifted by the vector 2 −c a 11 , which also depends on the input step size and the filter parameter a.
87
Affine Linear Behavior
1 s(k)) ⫽ 1
0.8 0.6 0.4
s(k)) ⫽ 0
x2
0.2 0 ⫺0.2 s (k)) ⫽ ⫺1 ⫺ ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
s (k)) ⫽ ⫺2 ⫺ ⫺0.8
⫺0.6
⫺0.4
0
⫺0.2
0.2
0.4
0.6
0.8
1
x1 Figure 6.3 Set of initial conditions that gives the type I trajectory.
Moreover, by transforming these ellipses to circles, the radii of the circles are 1−
|c + 2s0 | . 2−a
For the autonomous response case, the radii of the circles are 1, 1 −
2 4 ,1 − ,··· , 2−a 2−a
depending on the values of s0 . The corresponding radii of the circles for the step response case are · · · , 1−
|c + 2| |c| |c − 2| ,1 − ,1 − ,··· . 2−a 2−a 2−a
Comparing the two sequences, it can be concluded that the sizes of the ellipses for the step response case are smaller than those for the autonomous response case. Figure 6.3 shows the set of initial conditions that gives the type I trajectory when a = −1.5 and c = 1. Example 6.3 Consider the same strictly stable second order digital filter discussed in Example 6.1. Assume that u(k) = 0 and s(k) = s0 = 0 ∀k ≥ 0. Show that the trajectory converges to a fixed point not at the origin.
88
6 Step Response of Digital Filters with Two’s Complement Arithmetic
Define:
′2 Ik,s 0
⎫ ⎧ x(0) : x(0) ∈ I 2 and ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ k ⎪ ⎪ ⎬ ⎨ r (sin((k + 1)θ)x (0) − r sin(kθ)x (0)) 2 1 ≡ . sin θ ⎪ ⎪ ⎪ ⎪ 2s0 ⎪ ⎪ k k+1 ⎪ ⎪ ⎩ + (sin θ − r sin((k + 1)θ) + r sin(kθ)) < 1⎭ sin θ(1 − 2r cos θ + r 2 )
.Ks′0 ′2 2 Ik,s0 , and the set of initial Show that ∃Ks′0 ≥ 0 such that x(0) ∈ ∀s0 =0 k=0 conditions also corresponds to polygons on the phase plane. Solution: Since x(k + 1) = Ax(k) + Bs(k) ∀k ≥ 0, if s(k) = s0 = 0 ∀k ≥ 0, then
⎤ r k−1 (sin(kθ)x (0) − r sin((k − 1)θ)x (0)) 2 1 ⎥ ⎢ sin θ ⎥ An Bs0 = ⎢ x(k) = Ak x(0) + ⎦ ⎣ k r n=0 (sin((k + 1)θ)x2 (0) − r sin(kθ)x1 (0)) sin θ & ' 2s0 sin θ − r k−1 sin(kθ) + r k sin((k − 1)θ) + ∀k ≥ 1. sin θ · (1 − 2r cos θ + r 2 ) sin θ − r k sin((k + 1)θ) + r k+1 sin(kθ) ⎡
k−1 #
0 Denote x∗ = 1 − 2r 2s cos θ + r 2
lim x(k) =
k→+∞
2s0 1 − 2r cos θ + r 2
1 . Since 0 < r < 1, we have
1 1 ∗ 1 =x .
Hence, x(k) will converge to x∗ . If s0 = 0, then x∗ = 0. Hence, the trajectory converges to a fixed point not at the origin as shown in Figure 6.4a. In fact, when s0 = 0, then x∗ = 0. This reduces to the case discussed in Example 6.1. ∈ I 2 implies that x(k) rk 2s0 (sin θ − sin θ (sin((k + 1)θ)x2 (0) − r sin(kθ)x1 (0)) + sin θ(1 − 2r cos θ + r 2 ) r k sin((k + 1)θ) + r k + 1 sin(kθ)) < 1 ∀k ≥ 0. If sin((k + 1)θ) > 0, then θ − sin − rk
x2 (0) <
2s0 1−2r cos θ+r 2
sin θ rk −
sin θ rk
2s0 1−2r cos θ+r 2
− sin((k + 1)θ) + r sin(kθ) + r sin(kθ)x1 (0)
< sin((k + 1)θ)
sin θ − sin((k + 1)θ) + r sin(kθ) + r sin(kθ)x1 (0) rk sin((k + 1)θ)
(6.29)
89
Affine Linear Behavior
1 0.9 0.8
x2
0.7 0.6 0.5 0.4 0.3 0.2 0.2
0.3
0.4
0.5
0.7
0.6
0.8
0.9
1
x1 (a) 1 0.8 0.6 0.4
x2(0)
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1
⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0
0.2
0.4
0.6
0.8
1
x1(0) (b) Figure 6.4 (a) The phase portrait of strictly stable second& order ' digital filters associated with two’s 0.8 ; (b) The set of initial conditions of the complement arithmetic for r = 0.9999, θ = 0.75π and x(0) = 0.6 corresponding digital filters when s(k ) = s 0 = 0 ∀k ≥ 0.
90
6 Step Response of Digital Filters with Two’s Complement Arithmetic
∀k ≥ 0. If sin((k + 1)θ) < 0, then
θ sin θ 0 − sin − sin((k + 1)θ) + r sin(kθ) + r sin(kθ)x1 (0) − 1−2r 2s cos θ+r 2 rk rk x2 (0) >
As
′2 Ik,s 0
sin θ rk −
2s0 1−2r cos θ+r 2
> sin((k + 1)θ)
sin θ − sin((k + 1)θ) + r sin(kθ) + r sin(kθ)x1 (0) rk sin((k + 1)θ)
.
(6.30)
⎫ ⎧ 2 x(0) ⎪ ⎪ ⎪ ⎪ k : x(0) ∈ I and ⎪ ⎪ ⎪ ⎪ ⎬ ⎨ r (sin((k + 1)θ)x2 (0) − r sin(kθ)x1 (0)) , ≡ sin θ ⎪ ⎪ ⎪ ⎪ 2s0 ⎪ ⎪ k k+1 ⎪ ⎪ ⎩ + (sin θ − r sin((k + 1)θ) + r sin(kθ)) < 1⎭ sin θ(1 − 2r cos θ + r 2 )
′2 can be characterized as the region bounded between ∀k ≥ 0 and ∀s0 = 0, Ik,s 0 two parallel straight lines in I 2 described by the inequalities in eqns (6.29) or .Ks′0 2 . 2 2 (6.30). Similarly, ∃Ks′0 ≥ 0 such that +∞ k=0 Ik,s0 = k=0 Ik,s0 ⊆ I . As a result, ′ .Ks0 ′2 if s(k) = s0 = 0 ∀k ≥ 0, then x(0) ∈ k=0 Ik,s0 . This set of initial conditions also corresponds to a polygon on the phase plane and the number of sides of the polygon depends on the value of Ks′0 . By combining different polygons 2 .Ks′0 ′2 Ik,s0 and corresponding to different values of s0 , we have x(0) ∈ ∀s0 =0 k=0 the set of initial conditions consists of polygons on the phase plane as shown in Figure 6.4b.
Set of filter parameter and input step sizes for the type I trajectory The set of the filter parameter a and the input step size c that gives the type I trajectory is discussed as follows. The size of the elliptical region of the set of initial conditions depend on 1 − |c2+−2sa0 | , which should of course be greater than zero. This implies that 2 − a ≥ |c + 2s0 |. For a given s0 , the possible values of a and c are in a translated triangle as shown in Figure 6.5. By combining different triangles for the different values of s0 , the parameter space for the type I trajectory is characterized in Figure 6.6. + 2s0 | ≥ 0 ⇒ c +c2s0 x∗ ∈ I 2 . So if a and c are in the parameNote that 1 − |c 2−a ter space shown in Figure 6.6, then the centers of the trajectories are in I 2 automatically.
91
Affine Linear Behavior
c
a
2
⫺2 ⫺2(s0 ⫺ 2)
⫺2s0
⫺2(s0 ⫹ 2)
Figure 6.5 The possible values of a and c for a fixed s 0 .
8
…
4
s(k) ⫽ ⫺2
2
s(k) ⫽ ⫺1
0
s(k) ⫽ 0
⫺2
s(k) ⫽ 1
c
6
…
⫺4
⫺6 ⫺2
⫺1.5
⫺1
0
⫺0.5
0.5
1
1.5
2
a Figure 6.6 Parameter space for the type I trajectory.
The parameter space for the type I trajectory includes the line c = 0. So for ∀a ∈ {a : |a| ≤ 2}, some initial conditions exist such that the autonomous system will give the type I trajectory. A counter intuitive phenomenon can be derived from Theorem 6.1. The parameter space also includes the points with large values of c. This means that the
92
6 Step Response of Digital Filters with Two’s Complement Arithmetic
system will also give the type I trajectory even if the input step size is so large that overflow always occurs. On the other hand, there are some values of a and c which are not in the parameter space shown in Figure 6.6. This region includes the case for very small values of c. This implies that the corresponding system can never result in type I trajectory even though the input step size tends to a value very close to zero, no matter what the initial conditions are. Under this condition, the system will give either the type II or type III trajectory, depending on the values of the initial conditions.
Example 6.4 Consider the marginally stable bandpass second order digital filter with a = 1.8 and b = −1. Assume that a step input with step size c = 0.3 is applied to the system. Does any initial condition that generates the type I trajectory exist? Solution: Since (a, c) is outside the triangle regions shown in Figure 6.6, no initial condition that generates the type I trajectory exists.
LIMIT CYCLE BEHAVIOR Now we extend the analysis to the type II trajectory. When using the affine transformation method for the type I trajectory, the step response behaviors can be readily related to the autonomous response behaviors. However, this is not the case for the type II trajectory. The affine transformation method is modified and discussed below. Trajectory pattern Some ellipses are exhibited on the phase plane for the step response, and the centers of these ellipses exhibited on the phase plane are merely shifted versions of the autonomous response. The shifts of different ellipses are, however, different. The shifts depend on filter parameter a, and input step size c, as well as the periodicity of the symbolic sequences. The details are shown in Theorem 6.2 and Theorem 6.3 as follows. Theorem 6.2 For a second order digital filter, b = 0. Otherwise, the system reduces to a first order system with delays. For a second order bandpass filter, θ is not an integer multiple of π. Hence, T−1 exists and the following statements are true.
93
Limit Cycle Behavior
(i) |I − AM | = 0, and so (I − AM )−1 exists. (ii) By defining ⎞ ⎛ & ' M−1 M−1 # # 0 x0∗ ≡ (I − AM )−1 ⎝ AM−1−j s( j)⎠ , Aj Bc + 2
(6.31)
j=0
j=0
& ' 0 s(i) 2
(6.32)
xi (k) = T−1 (x(kM + i) − xi∗ )
(6.33)
∗ xi+1 ≡ Axi∗ + Bc +
for i = 0, 1, . . . , M − 2, and ⌢
∀k ≥ 0 and for i = 0, 1, . . . , M − 1, then ∃M such that s(Mk + i) = ⌢
⌢M⌢
s(i) ∀k ≥ 0 and for i = 0, 1, . . . , M − 1 if and only if xi (k + 1) = A xi (k) ∀k ≥ 0 and for i = 0, 1, . . . , M − 1.
Proof: (i) The proof is obvious. (ii) For the necessity part, by the definition of ⎛ ⎞ & ' M−1 M−1 # # 0 s( j)⎠ , x0∗ = (I − AM )−1 ⎝ AM−1−j Aj Bc + 2
(6.34)
j=0
j=0
this implies that
x0∗ = AM x0∗ +
M−1 # j=0
Aj Bc +
Since ∗ xi+1
=
Ax∗i
M−1 #
AM−1−j
j=0
& ' 0 + Bc + s(i) 2
& ' 0 s( j). 2
(6.35)
(6.36)
for i = 0, 1, . . . , M − 2, we have & ' & ' M−1 M−1 # # 0 0 Ax∗M−1 +Bc+ AM−1−j s( j) = x0∗ . Aj Bc+ s(M −1) = AM x0∗ + 2 2 j=0
j=0
(6.37)
If s(Mk + i) = s(i)
(6.38)
94
6 Step Response of Digital Filters with Two’s Complement Arithmetic
∀k ≥ 0 and for i = 0, 1, . . . , M − 1, we have
& ' 0 s(i + j) 2
(6.39)
for i = 0, 1, . . . , M − 1. This implies that & ' M−1 M−1 # # M−1−j 0 j A s(kM + i + j) = (I − AM )xi∗ A Bc + 2
(6.40)
xi∗ = AM xi∗ +
M−1 # j=0
Aj Bc +
M−1 #
AM−1−j
j=0
j=0
j=0
for i = 0, 1, . . . , M − 1. Since M
x((k + 1)M + i) = A x(kM + i) +
M−1 # j=0
j
A Bc +
M−1 #
A
M−1−j
j=0
& ' 0 s(kM + i + j) 2 (6.41)
∀k ≥ 0 and for i = 0, 1, . . . , M − 1, this implies that
x((k + 1)M + i) = AM x(kM + i) + (I − AM )xi∗
(6.42)
∀k ≥ 0 and for i = 0, 1, . . . , M − 1. Since xi (k) = T−1 (x(kM + i) − xi∗ ) ⇒ x(kM + i) = Txi (k) + xi∗ ∀k ≥ 0 and for i = 0, 1, . . . , M − 1, we have ⌢
⌢
(6.43)
Txi (k +1)+xi∗ = AM (Txi (k)+xi∗ )+(I−AM )xi∗ ⇒ xi (k +1) = T−1 AM Txi (k) (6.44) ∀k ≥ 0 and for i = 0, 1, . . . , M − 1. ⌢
⌢
⌢
−1
Since A = TAT
⌢
⌢
, we have ⌢
⌢M⌢
xi (k + 1) = A xi (k) ∀k ≥ 0 and for i = 0, 1, . . . , M − 1, and this proves the necessity part.
(6.45)
For the sufficiency part, if xi (k) = T−1 (x(kM + i) − xi∗ )
⌢
(6.46)
and ⌢
⌢M⌢
xi (k + 1) = A xi (k)
∀k ≥ 0 and for i = 0, 1, . . . , M − 1, then
⌢M
(6.47)
xi (k + 1) = T−1 (x(kM + M + i) − xi∗ ) = A T−1 (x(kM + i) − xi∗ ) (6.48)
⌢
95
Limit Cycle Behavior
∀k ≥ 0 and for i = 0, 1, . . . , M − 1. This implies that x(kM + M + i) = AM x(kM + i) + (I − AM )xi∗
(6.49)
∀k ≥ 0 and for i = 0, 1, . . . , M − 1. But, M
x(kM + M + i) = A x(kM + i) +
M−1 # j=0
j
A Bc +
∀k ≥ 0 and for i = 0, 1, . . . , M − 1 implies that (I − AM )xi∗ −
M−1 # j=0
M−1 #
Aj Bc =
AM−1−j
j=0
M−1 #
M−1−j
A
j=0
& ' 0 s(kM + i + j) 2 (6.50)
& ' 0 s(kM + i + j) 2
(6.51)
for i = 0, 1, . . . , M − 1 and ∀k ≥ 0, which further implies that ∗ (I − AM )xi+1 −
M−1 # j=0
Aj Bc =
M−1 #
AM−1−j
j=0
& ' 0 s(kM + i + 1 + j) 2
for i = 0, 1, . . . , M − 2 and ∀k ≥ 0. Therefore ∗ (I − AM )xi+1 −
=
M−1 # j=0
A
M−1−j
M−1 # j=0
⎛
Aj Bc − A ⎝(I − AM )xi∗ −
M−1 # j=0
(6.52)
⎞
Aj Bc⎠
⎛ ⎞ & ' & ' M−1 # 0 0 M−1−j s(kM + i + 1 + j) − A ⎝ s(kM + i + j)⎠ (6.53) A 2 2 j=0
for i = 0, 1, . . . , M − 1 and ∀k ≥ 0. This implies that & ' 0 M ∗ (I − A ) Axi + Bc + s(i) − A(I − AM )xi∗ + (AM − I)Bc 2 & ' 0 = (Is(kM + M + i) − AM s(kM + i)) (6.54) 2 ∀k ≥ 0 and for i = 0, 1, . . . , M − 2. This further implies that & ' & ' 0 0 (I − AM ) s(i) = (Is(kM + M + i) − AM s(kM + i)) 2 2 ∀k ≥ 0 and for i = 0, 1, . . . , M − 2.
(6.55)
96
6 Step Response of Digital Filters with Two’s Complement Arithmetic
When k = 0, we have
& ' & ' 0 0 M (I − A ) s(i) = (Is(M + i) − A s(i)) 2 2 M
for i = 0, 1, . . . , M − 2. This implies that for i = 0, 1, . . . , M − 2.
(6.56)
s(i) = s(M + i)
(6.57)
s(i) = s(M + i)
(6.58)
Similarly, we can prove that for i = M − 1.
When k = 1, since s(i) = s(M + i) for i = 0, 1, . . . , M − 1, we have s(i) = s(2M + i), for i = 0, 1, . . . , M − 1. Similarly, we have s(i) = s(kM + i) ∀k ≥ 0 and for i = 0, 1, . . . , M − 1. This proves the sufficiency part and completes the proof.
⌢
⌢M⌢
Since xi (k + 1) = A xi (k) ∀k ≥ 0 corresponds to a circular trajectory for each i = 0, 1, . . . , M − 1, there are M circles with centers at the origin and radii ⌢ xi (0) = T−1 (x(i) − xi∗ ) for i = 0, 1, . . . , M − 1 exhibited on the phase ⌢ plane when plotting the trajectory of xi (k) for i = 0, 1, . . . , M − 1. Similarly, by ⌢ applying these M different transformations xi (k) = T−1 (x(kM + i) − xi∗ ) for i = 0, 1, . . . , M − 1, there are M rotated and translated ellipses exhibited on the phase plane when plotting the trajectory of x(k). The centers of these ellipses are at xi∗ for i = 0, 1, . . . , M − 1.
M−1−j 0 s( j) It is interesting to note that when c = 0, x0∗ = (I − AM )−1 M−1 A j=0 2
0 ∗ ∗ and xi+1 = Axi + 2 s(i) for i = 0, 1, . . . , M − 2. Compared to c = 0, x0∗ is M−1 ∗ i M −1 j shifted by (I − AM )−1 M−1 j=0 j=0 A Bc and xi is shifted by A (I − A ) i−1 i−1−j Aj Bc + j=0 A Bc for i = 1, . . . , M − 1. Since different values of i correspond to different shift values, the centers of the ellipses are shifted toward different positions. Moreover, the shifts also depend on the periodicity of the symbolic sequences, which cannot be predicted by the simple affine transformation defined in Theorem 6.1. Figure 6.7a shows the phase portrait
of such a system with a = −1.5 and c = 1 at the initial condition x(0) = −0.7 0.7 . Figure 6.7b shows the corresponding
97
Limit Cycle Behavior
0
0.8
⫺0.1
0.6
⫺0.2 0.4 ⫺0.3 ⫺0.4
s(k)
x2
0.2
0
⫺0.5 ⫺0.6
⫺0.2
⫺0.7 ⫺0.4 ⫺0.8 ⫺0.6
⫺0.8 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
⫺0.9
0
0.2
0.4
0.6
⫺1
0.8
x1 (a)
0
10
20
30
40
50
Time index k (b)
Figure 6.7 A phase portrait and the corresponding symbolic sequence for the type II trajectory.
symbolic sequence. In this particular case, the period of the symbolic sequence is 4 and the trajectory consists of 4 ellipses with centers at xi∗ for I = 0,1,2,3. The significance of the second part of Theorem 6.2 is the necessary and sufficient condition relating to the symbolic sequence and the type II trajectory. That is, a system gives a type II trajectory if and only if the symbolic sequence is periodic with period M. Furthermore, the second part of Theorem 6.2 is a generalization of the first part of Theorem 6.1. By substituting M = 1 into the second part of Theorem 6.2, s(k) becomes a constant ∀k ≥ 0, and we have xi∗ = c +c2s0 x∗ . This gives the same results as for the first part of Theorem 6.1. Example 6.5 If we refer to the strictly stable second order digital filter discussed in Example 6.1, we can show that if ∃k0 ≥ 0 and ∃M ∈ Z + such that s(k) = s(k + M) ∀k ≥ k0 , then limit cycles with period M will occur. Solution: pM−1 ∀p, M ∈ Z + and ∀k ≥ 0, x(k + pM) = ApM x(k) + n=0 ApM−1−n Bs(k + n). If ∃k0 ≥ 0 and ∃M ∈ Z + such that s(k) = s(k + M) ∀k ≥ k0 , that is s ∈ α ∪ β ,
98
6 Step Response of Digital Filters with Two’s Complement Arithmetic
then ∀p ∈ Z + x(k0 + pM) = TDpM T−1 x(k0 ) + T−1 Bs(k0 + n). This implies that
x(k0 + pM) = TD pM T−1 x(k0 ) ⎡ M−1−n j(M−1−n)θ r e (1 − r pM e jpMθ ) M−1 # ⎢ 1 − r M e jMθ T⎢ + ⎣ n=0 0
M−1 n=0
TDM−1−n
r
M−1−n −j(M−1−n)θ
(1 − r 1 − r M e−jMθ
e
⎡
r M−1−n e j(M−1−n)θ M−1 # ⎢ 1 − r M e jMθ T⎢ lim x(k0 + pM) = ⎣ p→+∞ n=0 0 −1
Let
×T
Bs(k0 + n).
⎡
r M−1−n e j(M−1−n)θ M−1 # ⎢ 1 − r M e jMθ x0∗ = T⎢ ⎣ n=0 0 n−1
p−1 mM m=0 D
0
× T−1 Bs(k0 + n).
Hence,
pM −jpMθ
e
0
⎤
⎥ ⎥ )⎦
⎤ ⎥ ⎥
r M−1−n e−j(M−1−n)θ ⎦
0
1 − r M e−jMθ ⎤
⎥ −1 ⎥ T Bs(k0 + n).
r M−1−n e−j(M−1−n)θ ⎦ 1 − r M e−jMθ
By defining xn∗ = An x0∗ + m=0 An−1−m Bs(k0 + m) for n = 1, 2, . . . , M − 1, ∗ then x(k) will converge to a periodic sequence {x0∗ , x1∗ , . . . , xM−1 } as shown in Figure 6.8. As a result, limit cycles with period M will occur. Periodicity of state vector For the type I trajectory, x(k) is periodic if and only if θ is a rational multiple of π. For the type II trajectory, this is also a necessary and sufficient condition for the state variables to be periodic. However, the frequency spectrum of x1 (k) and x2 (k) consists of impulses located at the harmonic frequencies of the symbolic sequences, that is: 2πj M for j = 1, . . . , M − 1, and at the natural frequency of the digital filter, whether or not x(k) is periodic. For the symbolic sequences, since it is periodic with period M, the frequency spectrum of s(k) consists of impulses located at its harmonic frequencies only. Example 6.6 Referring to the strictly stable second order digital filter discussed in Example 6.1, is the state trajectory corresponding to s(k) = s(k + M) ∀k ≥ k0 periodic when θ is a rational multiple of π?
99
Limit Cycle Behavior
1 0.8 0.6 0.4
x2
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1
⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0
0.2
0.4
0.6
0.8
1
x1 Figure 6.8 The phase portrait of strictly stable second order & ' digital filters associated with two’s 0.8 . complement arithmetic for r = 0.9999, θ = 0.75π and x(0) = 0.6
Solution: Since x(k0 + pM) = TDpM T−1 x(k0 ) ⎡ M−1−n j(M−1−n)θ r e (1 − r pM e jpMθ ) M−1 # ⎢ M 1 − r e jMθ T⎢ + ⎣ n=0 0
0 r
M−1−n −j(M−1−n)θ
e
× T−1 Bs(k0 + n),
(1 − r 1 − r M e−jMθ
pM −jpMθ
e
⎤
⎥ ⎥ )⎦
x(k) is aperiodic even though θ is a rational multiple of π. Set of initial condition for the type II trajectory The set of initial conditions that gives type II trajectory is given by the following theorem: Theorem 6.3 ∃M such that s(Mk + i) = s(i) ∀k ≥ 0 and for i = 0, 1, . . . , M − 1 if and only if x(0) ∈ {x(0) : T−1 (x(i) − xi∗ ) ≤ 1 − xi∗ ∞ } for i = 0, 1, . . . , M − 1.
100
6 Step Response of Digital Filters with Two’s Complement Arithmetic
Proof: For the necessity part, if ∃M such that s(Mk + i) = s(i) ∀k ≥ 0 and for ⌢M⌢
⌢
i = 0, 1, . . . , M − 1, then by Theorem 6.2, we have xi (k + 1) = A xi (k) ∀k ≥ 0 ⌢ and for i = 0, 1, . . . , M − 1, where xi (k) = T−1 (x(kM + i) − xi∗ ) ∀k ≥ 0 and ⌢
⌢M⌢
for i = 0, 1, . . . , M − 1. Since the phase portrait of xi (k + 1) = A xi (k) for ⌢ i = 0, 1, . . . , M − 1 is a circle with radius xi (0) = T−1 (x(i) − xi∗ ) for i = 0, 1, . . . , M − 1, we can let & ' cos α(k) ⌢ −1 ∗ xi (k) = T (x(i) − xi ) (6.59) sin α(k) ∀k ≥ 0 and for i = 0, 1, . . . , M − 1. xi (k) = T−1 (x(kM + i) − xi∗ ) ⇒ x(kM + i) = Txi (k) + xi∗
⌢
⌢
∀k ≥ 0 and for i = 0, 1, . . . , M − 1, this implies that & ' cos α(k) −1 ∗ x(kM + i) = T (x(i) − xi ) + xi∗ cos (θ − α(k))
(6.60)
(6.61)
∀k ≥ 0 and for i = 0, 1, . . . , M − 1. Since x(k) ∈ I 2 , we have |x1 (k)| ≤ 1 and |x2 (k)| ≤ 1. Hence, we have , −1 , ,T (x(i) − x∗ ), + x∗ ∞ ≤ 1 ⇒ T−1 (x(i) − x∗ ) ≤ 1 − x∗ ∞ (6.62) i i i i for i = 0, 1, . . . , M − 1. This proves the necessity part. For the sufficiency part, since xi (k) = T−1 (x(kM + i) − xi∗ )
⌢
(6.63)
∀k ≥ 0 and for i = 0, 1, . . . , M − 1, we have xi (k + 1) = T−1 (x((k + 1)M + i) − xi∗ )
⌢
(6.64)
∀k ≥ 0 and for i = 0, 1, . . . , M − 1. This implies that ⎛ M−1 # ⌢ Aj Bc xi (k + 1) = T−1 ⎝AM x(kM + i) + j=0
+
M−1 # j=0
⎞ & ' 0 AM−1−j s(kM + i + j) − xi∗ ⎠ 2
(6.65)
101
Limit Cycle Behavior
∀k ≥ 0 and for i = 0, 1, . . . , M − 1. This further implies that ⌢M⌢
xi (k + 1) = A xi (k) + T−1 (AM − I)xi∗ + T−1
⌢
M−1 #
Aj Bc
j=0
& ' M−1 # M−1−j 0 −1 A s(kM + i + j) +T 2
(6.66)
j=0
∀k ≥ 0 and i = 0, 1, . . . , M − 1. Since xi∗
=
Ai x0∗
+
i−1 #
A
i−1−j
j=0
for i = 0, 1, . . . , M − 1, we have ⎛
(I − AM )xi∗ = (I − AM ) ⎝Ai x0∗ +
Bc +
i−1 # j=0
i−1 #
A
i−1−j
j=0
Ai−1−j Bc +
& ' 0 s( j) 2
i−1 # j=0
for i = 0, 1, . . . , M − 1.
(6.67)
⎞ & ' 0 Ai−1−j s( j)⎠ 2
(6.68)
Since (I − A
M
)x0∗
=
we have (I − AM )xi∗ =
M−1 # j=0
M−1 # j=0
+
⌢M⌢
xi (k + 1) = A xi (k) + T−1 − T−1
M−1−i # j=0
AM−1−j
A Bc +
Aj Bc +
M−1 #
M−1 #
M−1 # j=0
A
& ' 0 s( j), 2
AM−1−j
& ' 0 s(i + j) 2
M−1−j
j=0
M−1−i # j=0
AM−1−j
j=M−i
for i = 1, . . . , M − 1, and ⌢
j
AM−1−j
& ' 0 s(i + j − M) 2
(6.69)
(6.70)
& ' 0 s(kM + i + j) 2
& ' & ' M−1 # 0 0 AM−1−j s(i + j) − T−1 s(i + j − M) 2 2 j=M−i
(6.71)
102
6 Step Response of Digital Filters with Two’s Complement Arithmetic
∀k ≥ 0 and for i = 0, 1, . . . , M − 1. When k = 0, we have ⌢M⌢
⎛
xi (1) = A xi (0) + T−1 ⎝
⌢
M−1 #
j=M−i
⎞ & ' 0 (s(i + j) − s(i + j − M))⎠ AM−1−j 2
(6.72)
for i = 1, . . . , M − 1. If x(0) ∈ {x(0) : T−1 (x(i) − xi∗ ) ≤ 1 − xi∗ ∞ }
(6.73)
for i = 1, . . . , M − 1, then ˆxi (0) ≤ 1 − xi∗ ∞
(6.74)
for i = 0, . . . , M − 1. ˆ = 1, by taking i = 1, we have Since A s(M) = s(0).
(6.75)
Similarly, by taking i = 2 and s(M) = s(0), we have s(M + 1) = s(1). As a result, we have s(M + i) = s(i)
(6.76)
for i = 0, . . . , M − 2. When k = 1 and i = 0, we have ⌢
⌢M⌢
x0 (2) = A x0 (1) + T
−1
M−1 # j=0
M−1−j
A
& ' 0 (s(M + j) − s(j)). 2
(6.77)
Since s(M + i) = s(i) for i = 0, . . . , M − 2, we have s(2M − 1) = s(M − 1).
(6.78)
Since ˆxi (0) ≤ 1 − xi∗ ∞ for i = 0, . . . , M − 1, we have ˆxi (1) ≤ 1 − xi∗ ∞ for i = 0, . . . , M − 1, and s(M + i) = s(i) for i = 0, . . . , M − 1, by mathematical induction, we can conclude that s(Mk + i) = s(i) ∀k ≥ 0 and for i = 0, . . . , M − 1. Hence, this proves the sufficiency part and completes the proof.
103
Limit Cycle Behavior
1 0.8 0.6 0.4
x2
0.2 0
⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0
0.2
0.4
0.6
0.8
1
x1 Figure 6.9 The set of initial conditions that give the type II trajectory.
Theorem 6.3 implies that the set of initial conditions corresponding to the type II trajectory consists of rotated and translated elliptical regions. For each periodic symbolic sequence s(Mk + i) = s(i) for i = 0, . . . , M − 1, we have a corresponding single rotated and translated ellipse with center at xi∗ for i = 0, . . . , M − 1. In general, the centers are the same as that of the trajectory described by Theorem 6.2. Hence, compared to that of the autonomous response, the centers are shifted to different positions, and the shifts depend on filter parameter α, input step size, and the periodicity of the symbolic sequences. By transforming these ellipses to circles, the radii of these circles are 1 − xi∗ ∞ for i = 0, . . . , M − 1. Figure 6.9 shows the set of initial conditions that result in the type II trajectory when a = −1.5 and c = 1. As can be seen from Figure 6.9, the set of initial conditions is in the elliptical regions with centers at xi∗ for i = 0, . . . , M − 1. We can consider Theorem 6.3 as a generalization of the second part of Theorem 6.1. By substituting M = 1 into Theorem 6.3, we have the same results as the second part of Theorem 6.1. Example 6.7 Referring to the strictly stable second order digital filter discussed in Example 6.1, can we plot the set of initial conditions of the system corresponding to r = 0.9999, θ = 0.75π and s(k) = s(k + M) ∀k ≥ k0 for and M > 1?
104
6 Step Response of Digital Filters with Two’s Complement Arithmetic
1 0.8 0.6 0.4
x2(0)
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
0
⫺0.2
0.2
0.4
0.6
0.8
1
x1(0) Figure 6.10 The set of initial conditions of the corresponding digital filters when r = 0.9999, θ = 0.75π and s(k ) = s(k + M ) ∀k ≥ 0 and for M > 1.
Solution: The plot is shown in Figure 6.10.
FRACTAL BEHAVIOR Now we proceed to the type III trajectory. Remark 6.1 The system may produce an elliptical fractal pattern of trajectory if it does not give the type I or type II trajectories. Figure 6.11a shows the phase portrait a system with a = −1.5 and
of such −0.9 c = 1 at the initial condition x(0) = −0.98 . Figure 6.11b shows the corresponding symbolic sequence. In this particular case, there is an elliptical fractal pattern shown on the phase plane and the symbolic sequences are aperiodic.
105
Fractal Behavior
1
1
0.8 0.5
0.6 0.4
0
s(k)
x2
0.2 0
⫺0.5
⫺0.2 ⫺1
⫺0.4 ⫺0.6
⫺1.5
⫺0.8 ⫺1 ⫺1 (a)
⫺0.5
0 x1
0.5
⫺2
1
0
10
20 30 Time index k
40
50
(b)
Figure 6.11 A phase portrait and the corresponding symbolic sequence for the type III trajectory.
Remark 6.2 The symbolic sequences and the state variables are in general aperiodic. Hence, the frequency spectrum of the state variables and the symbolic sequences are continuous. Remark 6.3 Let DM = {x(0) : T−1 (x(i) − xi∗ ) ≤ 1 − xi∗ ∞ and 2 s(i) = s(i + M)} + for M ∈ Z \{0} and for i = 0, . . . , M − 1. Define D ≡ I 2 \ ∀M DM . Then the set of initial conditions that may give the type III trajectory is D. That is, the system with initial condition in the rest of the space after taking away the regions indicated in Figure 6.3 and Figure 6.9 may give rise to an elliptical fractal pattern of trajectory. Figure 6.12 shows the set of initial conditions that will result in the type III trajectory when a = −1.5 and c = 1. Example 6.8 Refer to the strictly stable second order digital filter discussed in Example 6.1. Give an example that the symbolic sequences are aperiodic; that is, s ∈ γ , and
106
6 Step Response of Digital Filters with Two’s Complement Arithmetic
1 0.8 0.6 0.4
x2
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0 x1
0.2
0.4
0.6
0.8
1
Figure 6.12 The set of initial conditions that gives the type III trajectory.
plot the corresponding phase portrait. Explain why the set of initial conditions corresponds to polygonal fractal patterns. Solution: The strictly stable second order digital filters associated with two’s complement arithmetic may also exhibit a chaotic fractal pattern on the phase plane. Consider the example with r = 0.9999, θ = 0.75π and x(0) = −1 0 . The fractal pattern is polygonal as shown in Figure 6.13a, whereas it is elliptical for the marginally stable case. Define 0 ≡ {x(0) : s(k) = 0, ∀k ≥ k0 }. This set is the sequence of initial conditions that the state trajectories will converge to zero. When k0 = 0, it was shown . ′ 2 in Example 6.1 that 0 = K k=0 Ik .
Similarly, define 1 ≡ {x(0) : s(k) = s0 = 0, ∀k ≥ k01 }. This set is the set of initial conditions that the state trajectories will converge to a fixed point. When k01 = 0, 2 .Ks′0 ′2 Ik,s0 . it was shown in Example 6.2 that 1 = ∀s0 =0 k=0
Likewise, we define M ≡ {x(0) : s(k) = s(k + M), for k ≥ k0M and for M > 1}. This set is the sequence of initial conditions that generates limiting cycles.
107
Fractal Behavior
1 0.8 0.6 0.4
x2
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
0.2
0 x1
⫺0.2
(a)
0.4
0.6
0.8
1
1 0.8 0.6 0.4
x2(0)
0.2 0
⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0
0.2
0.4
0.6
0.8
1
x1(0) (b) Figure 6.13 (a) The phase portrait of strictly stable second& order ' digital filters associated with two’s −1 ; (b) The set of initial conditions of the complement arithmetic for r = 0.9999, θ = 0.75π and x(0) = 0 corresponding digital filters when s(k ) is aperiodic.
108
6 Step Response of Digital Filters with Two’s Complement Arithmetic
2 If = I 2 \ M≥0 M = ∅, this implies that some initial conditions exist, which may not result in the convergence of the state trajectories nor the occurrence of limiting cycles. Under this condition, chaotic behaviors may occur. 2 Since ∀k ≥ 0, x(k) 2 will not fall into the set M≥0 M , otherwise, ∃k0 ≥ 0 such that x(k0 ) ∈ M≥0 M . As a result, the phase portrait is inside 2 = I 2 \ M≥0 M . This may correspond to polygonal fractal patterns as shown in Figure 6.13b because M ∀M ≥ 0 are all polygons. Example 6.9 Compare the differences on the state response, the phase portrait and the sets of initial conditions between strictly stable and marginally stable second order digital filters associated with two’s complement arithmetic. Solution: Table 6.1 Comparison of the state response between strictly stable and marginally stable second order digital filters associated with two’s complement arithmetic. s(k ) = 0 ∀k ≥ 0
s(k ) = s 0 = 0 ∀k ≥ 0
s ∈ α ∪ β
s ∈ γ
State response of marginally stable second order digital filters associated with two’s complement arithmetic
Oscillates with its natural frequency, and the DC value is equal to 0
Oscillates with its natural frequency, and the DC value does not equal to 0
Oscillates with its natural frequency and harmonic frequencies 2πn M for n = 0, 1, . . . , M − 1
Chaotic
State response of strictly stable second order digital filters associated with two’s complement arithmetic
Converges to zero
Converges to a nonzero value
Limit cycles occur with period M
Chaotic
Table 6.2 Comparison of the phase portraits between strictly stable and marginally stable second order digital filters associated with two’s complement arithmetic. s(k ) = 0 ∀k ≥ 0
s(k ) = s 0 = 0 ∀k ≥ 0
s ∈ α ∪ β
s ∈ γ
Phase portrait of marginally Single ellipse Single ellipse, and stable second order digital centered at the center is not at filters associated with two’s the origin the origin complement arithmetic
Several ellipses with Elliptical different sizes, and all the fractal centers are not at the pattern origin
Phase portrait of strictly Converges to stable second order digital the origin filters associated with two’s complement arithmetic
Converges to several Polygonal fixed points, and those fractal fixed points are not at the pattern origin
Converges to a fixed point, and the fixed point is not at the origin
109
Exercises
Table 6.3 Comparison of the sets of initial conditions between strictly stable and marginally stable second order digital filters associated with two’s complement arithmetic. s(k ) = 0 ∀k ≥ 0 Set of initial conditions of marginally stable second order digital filters associated with two’s complement arithmetic
s(k ) = s 0 = 0 ∀k ≥ 0
Single ellipse Single ellipse, and centered at the the center is not at origin the origin
Set of initial conditions of Single polygon Single polygon, and strictly stable second order centered at the the center is not at digital filters associated origin the origin with two’s complement arithmetic
s ∈ α ∪ β
s ∈ γ
Several ellipses with Elliptical different sizes, and all fractal the centers are not at pattern the origin Several polygons with Polygonal different sizes, and all fractal the centers are not at pattern the origin
SUMMARY The main focus of this chapter has been on the analysis of step response for second order digital filters associated with two’s complement arithmetic. Even in the presence of the overflow nonlinearity, the step response behaviors can be related to some corresponding autonomous response behaviors by means of affine transformations. Based on this method, some differences between the step response and autonomous response are discussed. EXERCISES 1. Consider a third order digital filter where its state space model is realized by a parallel connection of a first order digital filter and a second order one associated with two’s complement arithmetic in direct form as shown in Figure 6.14. Define ⎫ ⎧⎡ ⎤ ⎤ x1 (k) ⎬ ⎨ x1 (k) ⎣x2 (k)⎦ ∈ I 3 ≡ ⎣x2 (k)⎦: −1 ≤ x1 (k) < 1, −1 ≤ x2 (k) < 1 and −1 ≤ x3 (k) < 1 . ⎭ ⎩ x3 (k) x3 (k) ⎡
Assume that u(k) = 0 ∀k ≥ 0, b = −1 and |a| ≤ 2. Consider the case when |c| < 1, show that the state trajectory converges to the plane x3 = 0 ∀xi (0) ∈ [−1, 1) and for I = 1, 2, 3. Plot the output y(k − 1) versus y(k). Show that three types of trajectories are exhibited on the phase plane and the type of trajectories depends on the initial condition of the corresponding second order subsystem. 2. Consider the third order digital filter discussed in Question 1. Assume that u(k) = 0 ∀k ≥ 0, b = −1 and |a| ≤ 2. Consider the case when c = 1, and show
110
6 Step Response of Digital Filters with Two’s Complement Arithmetic
u(k)
⫹
f(•)
Delay a
x2(k) Delay
b
⫹
x1(k)
y1(k)
⫹
f(•)
f(•)
y(k)
Delay c
y2(k) x3(k)
Figure 6.14 Parallel realization of a third order digital filter associated with two’s complement arithmetic.
that the state trajectories stay on a plane with x3 = x3 (0). Plot the output y(k − 1) versus y(k). Show that there are again three types of trajectories exhibited on the phase plane and the type of trajectories depends on the initial conditions of the corresponding second order subsystem, but the plot of y(k − 1) versus y(k) is resulted by shifting the phase portrait and applying the two’s complement operation on the shifted trajectory of the corresponding second order digital filter, both horizontally and vertically. 3. Consider the third order digital filter discussed in Question 1. Assume that u(k) = 0 ∀k ≥ 0, b = −1 and |a| ≤ 2. Consider the case when c = −1, and show that if x3 (0) = −1, then the state trajectories are on a phase plane with x3 = −1. Otherwise, the state trajectories are on two phase planes with x3 = x3 (0) and x3 = −x3 (0). Plot the output y(k − 1) versus y(k). Show that there are again three types of trajectories exhibited on the phase plane and the type of trajectories depends on the initial conditions of the corresponding second order subsystem, but the plot of y(k − 1) versus y(k) is the overlapping of two plots of state trajectories of the corresponding second order digital filter resulted by shifting the trajectory and applying the two’s complement operation on the shifted trajectory both horizontally and vertically. 4. Consider a third order digital filter where its state space model is realized by a cascade connection of a first order digital filter and a second order one associated with two’s complement arithmetic in direct form as shown in
111
Exercises
u(k)
⫹
y1(k)
f(•)
⫹
f(•)
Delay
Delay a
c
x3(k)
x2(k) Delay
b
x1(k)
y(k)
Figure 6.15 Cascade realization of a third order digital filter associated with two’s complement arithmetic.
Figure 6.15. Assume that u(k) = 0 ∀k ≥ 0, c = 1, b = −1 and |a| ≤ 2. Define ⎫ ⎧⎡ ⎤ ⎤ x1 (k) ⎬ ⎨ x1 (k) 3 ⎣x2 (k)⎦ ∈ I ≡ ⎣x2 (k)⎦ : −1 ≤ x1 (k) < 1, −1 ≤ x2 (k) < 1 and −1 ≤ x3 (k) < 1 , ⎭ ⎩ x3 (k) x3 (k) ⎡
θ ≡ cos−1 a2 where θ is not assumed to be an integral multiple of π,
T ≡ cos1 θ sin0 θ , s1 (k) and s2 (k) as the symbolic sequence of the corresponding second order subsystem and the first order subsystem, respectively, that is & ' ' ' & 0 x (k) x1 (k + 1) s (k) and x3 (k + 1) ≡ cx3 (k)+u(k)+2s2 (k) +By1 (k)+ ≡A 1 2 1 x2 (k) x2 (k + 1)
&
∀k ≥ 0, in which A ≡ x∗ ≡
0 1 b a
and B =
0 1
. Denote s1∗ ≡ s1 (0),
' & ' & ' & x3 (0) + 2s1∗ 1 xˆ (k) x1 (k) ≡ T−1 − x∗ ∀k ≥ 0. and 1 1 xˆ 2 (k) x2 (k) 2−a
Then show that x3 (k) = y1 (k) = x3 (0) and s2 (k) = 0 ∀k ≥ 0. Also, show that the following three statements for the type I trajectory are equivalent:
+ 1) ˆ xˆ1 (k) ∀k ≥ 0, where A ˆ ≡ cos θ sin θ . i) xxˆˆ21 (k = A (k + 1) xˆ 2 (k) − sin θ cos θ ii) s 1 (k)= s1∗ ∀k+ ≥ 0. ,
, , −1 x1 (0) x3 (0) + 2s1∗ x1 (0) ∗ , iii) xx21 (0) . (0) ∈ 0 ≡ x2 (0) : ,T x2 (0) − x , ≤ 1 − 2 − a
112
6 Step Response of Digital Filters with Two’s Complement Arithmetic
5. Consider the third order digital filter discussed in Question 4. Assume that u(k) = 0 ∀k ≥ 0, c = 1, b = −1 and |a| ≤ 2. Define: ⎛
x0∗ ≡ (I − AM )−1 ⎝
∗ xi+1
M−1 # j=0
Aj Bx3 (0) +
& ' 0 ≡ Ax∗i + Bx3 (0) + s (i) 2 1
M−1 # j=0
⎞ & ' 0 AM−1−j s ( j)⎠ , 2 1
+ i) ∗ ∀k ≥ 0 and for − x for i = 0, 1, . . . , M − 2, and xˆ i (k) ≡ T−1 xx21 (kM i (kM + i) i = 0, 1, . . . , M − 1. Show that the following three statements for the type II trajectory are equivalent: ˆ M xˆ i (k) i) xˆ i (k + 1) = A
∀k ≥ 0 and for i = 0, 1, . . . , M − 1.
ii) s1 (kM + i) = s1 (i) ∀k ≥ 0 and for i = 0, 1, . . . , M − 1.
, + , , , , −1 x1 (i) x1 (0) ∗ , ≤ 1 − ,x ∗ , iii) xx21 (0) ∈ ≡ − x : , ,T M i i ∞ (0) x2 (i) x2 (0) i = 0, 1, . . . , M − 1.
for
Hence, show that the centers of these ellipses are no longer on the diagonal plane x1 = x2 . 6. Consider the third order digital filter discussed in Question 4. Assume that 2 u(k) = 0 ∀k ≥ 0, c = 1, b = −1 and |a| ≤ 2. Define ≡ I 3 \ ∀M≥0 M . Show that the following three statements for the type III trajectory are equivalent: &x (k)' 1 i) The trajectory of x2 (k) exhibits an elliptical fractal pattern on the plane x3 (k)
x3 = x3 (0). ii) s 1 (k)is aperiodic ∀k ≥ 0. x (0) iii) x21 (0) ∈ .
7. Consider the third order digital filter discussed in Question 4. Assume that u(k) = 0 ∀k ≥ 0, c = −1, b = −1 and |a| ≤ 2. Show that if x3 (0) = −1, then y1 (k) = x3 (k) = x3 (0) for k is even and y1 (k) = x3 (k) = −x3 (0) for k is odd, while s2 (k) = 0 ∀k ≥ 0. Also, show that the behavior of the overall system is equivalent to that of the sinusoidal response of the second order subsystem with the period of the input sinusoidal signal being 2. Then show that the trajectories are both on the horizontal planes x3 = x3 (0) and x3 = −x3 (0). Moreover, show that there are three types of trajectories, namely the type I, type II and type III trajectories, corresponding to the cases when s1 (k) are all zero, periodic and aperiodic, respectively. If x3 (0) = −1, then show that y1 (k) = x3 (k) = −1 and s2 (k) = −1 ∀k ≥ 0. Finally, show that the behavior
113
Exercises
of the overall system is equivalent to that of the step response of the second order subsystem having the input step size equal to −1. 8. Consider the third order digital filter discussed in Question 4. Assume that u(k) = 0 ∀k ≥ 0, |c| < 1, b = −1 and |a| ≤ 2. Show that s2 (k) = 0 and y1 (k) = x3 (k) = ck x3 (0) ∀k ≥ 0. Also show the following statements: & ' & ' & ' x1 (k + 1) x1 (k) 0 k i) =A + Bc x3 (0) + s (k) ∀k ≥ 0. x2 (k + 1) x2 (k) 2 1 M−1−j Bcj x (k ), ii) By defining x0 ≡ (cM I − AM )−1 M−1 3 0 j=0 A & ' M−1−j 0 s (k + j), y0 ≡ (I − AM )−1 M−1 xi+1 ≡ A xi + Bci x3 (k0 ) j=0 A 2 1 0 & ' 0 for i = 0, 1, . . . , M − 2, and yi+1 ≡ A yi + s (k + i) for i = 0, 1, . . . , 2 1 0 + M − 2, then ∃k0 ≥ s1 (k) = s1 (k + M) ∀k ≥ 0 , 0 and &∃M ∈ Z' such that , , , −1 x1 (k0 ) xi + yi ∞ , for − x0 − y0 , if and only if , , < 1 − ,T x2 (k0 ) i = 0, 1, . . . , M − 1. iii) Define ⎧⎡ ⎫ ⎤ ⎬ ' & & ', ⎨ x1 (k0 ) , , , (k ) x x (k ) x (k ) 1 3 0 3 0 1 0 −1 ,+ <1 , ′0 = ⎣x2 (k0 )⎦ : , − T−1 2 ,T x2 (k0 ) ⎩ c − 2 cos θc + 1 c , c2 − 2 cos θc + 1 ⎭ x3 (k0 ) ′M
⎫ ⎧⎡ ⎤ ' , & ⎬ ⎨ x1 (k0 ) , , , −1 x1 (k0 ) , , ⎦ ⎣ − x0 − y0 , <1 − xi + yi ∞ , for i = 0, 1, . . . M − 1 x2 (k0 ) : ,T = x2 (k0 ) ⎭ ⎩ x3 (k0 )
and ′ ≡ I 3 \
2
′ ∀M≥0 M . Then the trajectory of
&
'
x1 (k) x2 (k) x3 (k)
will converge to
a horizontal plane x3 = 0 and exhibits an elliptical fractal pattern on the plane x3 = 0 if and only if s1 = k is aperiodic ∀k ≥ 0 and if and only if & ' x1 (k0 ) x2 (k0 ) ∈ ′ . x3 (k0 )
Show that the trajectory will converge to the horizontal plane x3 = 0 and xi (k) for i = 1, 2, 3 is never periodic no matter whether θ is a rational multiple of π or not. As a result, show that the spectrum of xi (k) for i = 1, 2, 3 is continuous.
7 SINUSOIDAL RESPONSE OF DIGITAL FILTERS WITH TWO’S COMPLEMENT ARITHMETIC
In Chapter 6 we looked at nonlinear behaviors exhibited in the step response of bandpass digital filters associated with two’s complement arithmetic. However, for real situations bandpass signals are usually the input for the bandpass filters. One of the simplest bandpass signals is the sinusoidal signal. We now look at nonlinear behaviors exhibited in the sinusoidal response of bandpass digital filters associated with two’s complement. There are necessary and sufficient conditions linking the trajectory behaviors, periodic properties of the symbolic sequences and the sets of initial conditions corresponding to various types of behaviors (see Chapter 6). Therefore, different types of behavior can be studied by examining the visual appearances of the trajectories. However, this is not the case for the sinusoidal response. Also, the method of affine transformation and the state space technique employed for the step response analysis is not sufficient to efficiently explain the trajectory behaviors and derive the sets of initial conditions for various types of behaviors for the sinusoidal response. This chapter, therefore, examines the frequency domain technique.
NO OVERFLOW CASE Referring back to Section 5.1, for a marginally stable bandpass filter, the filter coefficients are as follows: b = −1
(7.1)
|a| ≤ 2.
(7.2)
and
114
115
No Overflow Case
In this section, we consider the sinusoidal response case; that is: u(k) = c sin(θk)v(k) ∀k ≥ 0, where c ∈ ℜ\{0}, θ ∈ ℜ\{kπ: k ∈ Z} and v(k) =
(7.3)
1 0
k≥0 . otherwise
For c = 0 or θ = kπ where k ∈ Z, the input signal is zero and the system reduces to the autonomous response case (detailed analysis is given in Chapter 5). The behavior for the sinusoidal response is different from (and more complicated than) those of the autonomous and step response cases. The trajectory equation, the condition for its periodicity, the corresponding set of initial conditions and the set of filter and input parameters for the no overflow case follows. Trajectory equation For the autonomous and step response cases, there is a single ellipse exhibited on the phase plane if overflow does not occur. For the sinusoidal response, this is not the case and the analysis is shown as follows. Define cos =
a , 2
(7.4)
&
' 0 , sin
(7.5)
&
' 0 , sin θ
(7.6)
1 T = cos 1 Tθ = cos θ ⌢
A =
&
cos −sin
' sin , cos
(7.7)
Aθ =
&
' sin θ , cos θ
(7.8)
x1∗ =
& ' c sin θ 1 , 2 cos θ − a 0
(7.9)
⌢
cos θ −sin θ
116
7 Sinusoidal Response of Digital Filters with Two’s Complement Arithmetic
and &
' xˆ 1 (k) x(k) = . xˆ 2 (k)
⌢
(7.10)
Since s(k) = 0 ∀k ∈ Z, the total response of the system x(k) can be represented as the sum of the zero state response xZS (k) and the zero input response xZI (k), respectively. That is x(k) = xZI (k) + xZS (k),
(7.11)
xZI (k) = Ak x(0)v(k).
(7.12)
where
Since |a| < 2 and is not integer multiples of π because only bandpass filter is considered, T−1 exists and ⌢
A = T A T−1 .
(7.13)
We have ⌢k
xZI (k) = T A T−1 x(0)v(k),
(7.14)
this implies that xZI (k) =
& ' 1 −sin((k − 1))x1 (0) + sin(k)x2 (0) sin −sin(k)x1 (0) + sin((k + 1))x2 (0)
(7.15)
∀k ≥ 1. xZS (k) =
k−1 #
Ak−1−j Bu(j)
(7.16)
j=0
∀k ≥ 1. For u(k) = c sin(θk)v(k), ⎡
⎢ ⎢ xZS (k) = ⎢ ⎣
⎤ cv(k − 1) sin θ sin((k − 1)) − sin((k − 1)θ) sin a − 2 cos θ ⎥ ⎥ ⎥. ⎦ sin θ sin(k) cv(k) − sin(kθ) sin a − 2 cos θ
(7.17)
(7.18)
117
No Overflow Case
Hence, ' & 1 −sin((k − 1))x1 (0) + sin(k)x2 (0) x(k) = v(k) sin −sin(k)x1 (0) + sin((k + 1))x2 (0) ⎤ ⎡ cv(k − 1) sin θ sin((k − 1)) − sin((k − 1)θ) ⎢ sin a − 2 cos θ ⎥ ⎥ ⎢ +⎢ ⎥. (7.19) ⎦ ⎣ cv(k) sin θ sin(k) − sin(kθ) sin a − 2 cos θ According to eqn (7.6), T−1 θ exists and we have
⌢k
⌢k
−1 ∗ ∗ x(k) = T A T−1 (x(0) + x1 ) − Tθ Aθ Tθ x1
(7.20)
∀k ≥ 1. Since x(k) is a superposition of two signals with different frequencies, this causes a rich set of trajectory patterns on the phase plane. Figure 7.1 shows some examples of the different types of trajectories. As shown in Figure 7.1, the trajectory patterns are different from (and more complicated than) those of the autonomous and step response cases. It can also be seen from Figure 7.1(a) that there are several ellipses exhibited on the phase plane even when overflow does not occur. This trajectory pattern appears to correspond to the type II trajectory (overflow case) for the autonomous and step response cases. Hence, we cannot classify the types of trajectories based on the visual appearances of the trajectories. As a result, we must employ other properties, such as the periodicity of symbolic sequences, for the classification of the types of trajectories.
Example 7.1 Consider
the
with a = 1 and b = −1. Assume that second order digital filter 5πk x(0) = 0.3 ∀k ≥ 0. Compute the state response of and u(k) = 0.01 sin 0 6 the system.
0.4
0.3
0.3
0.2
0.2
0.1
0.1
x2
x2
0.4
0
0
⫺0.1
⫺0.1
⫺0.2
⫺0.2
⫺0.3
⫺0.3
⫺0.4 ⫺0.4 ⫺0.3 ⫺0.2 ⫺0.1
(a)
0
0.1
0.2
0.3
⫺0.4 ⫺0.4 ⫺0.3 ⫺0.2 ⫺0.1
0.4
x1
0.8
1
0.6
0.8
x2
x2
⫺0.6
⫺0.6
⫺0.8 0
0.2
0.4
0.6
⫺1 ⫺1 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
0.8
x1
(d)
1
0.8
0.8
0.6
0.6
x2
x2
0.2
0.4
0.6
0.8
1
0.2
0.2 0
⫺0.2
0
⫺0.2
⫺0.4
⫺0.4
⫺0.6
⫺0.6
⫺0.8 0
0.2
0.4
0.6
0.8
⫺0.8 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
1
x1
(f) 0.4
0.3
0.3
0.2
0.2
0.1
0.1
x2
0.4
0
⫺0.1
⫺0.2
⫺0.2
⫺0.3
⫺0.3 0
x1
0.1
0.2
0.3
0.4
0
0.2
0.4
0.6
0.8
0.1
0.2
0.3
0.4
x1
0
⫺0.1
(g)
0
x1
0.4
0.4
x2
0
⫺0.4
⫺0.4
⫺0.4 ⫺0.4 ⫺0.3 ⫺0.2 ⫺0.1
0.4
⫺0.2
⫺0.2
(e)
0.3
0.2
0
⫺1 ⫺1 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
0.2
0.4
0.2
(c)
0.1
0.6
0.4
⫺0.8 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
0
x1
(b)
⫺0.4 ⫺0.4 ⫺0.3 ⫺0.2 ⫺0.1
(h) &
0
x1
' 0.3 , and different values of c, θ 0 and . (a) c = 0.01, θ = −π + 5 and = −π − 1.3; (b) c = 0.01, θ = −π + 6 and = −π − 1.9; (c) c = 0.01, θ = −π + 5 and = −π − 0.5; (d) c = 0.01, θ = −π + 6 and = −π − 0.4; (e) c = 0.01, θ = −π + 0.4 and = −π − 0.3; (f) c = 0.01, θ = −π + 5.5 and = −π + 0.5; (g) c = 0.01, θ = −π + 4.8 and = −π − 1.6; (h) c = 0.01, θ = −π + 4.5 and = −π − 1.5;
Figure 7.1 Phase portrait of the system when b = −1, x(0) =
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
x2
x2
0.2 0
⫺0.2
0
⫺0.2
⫺0.4
⫺0.4
⫺0.6
⫺0.6
⫺0.8 ⫺1 ⫺1 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
(i)
0
0.2
0.4
0.6
0.8
1
x1
⫺0.8 ⫺0.8
0.3
0.2
0.2
0.1
0.1
x2
0.4
0.3
x2
0.4
0
⫺0.1
⫺0.2
⫺0.2
⫺0.3
⫺0.3 ⫺0.3
⫺0.2
⫺0.1
(k)
0
0.1
0.2
0.3
0.4
x1
⫺0.4 ⫺0.4
0.5
0.3
0.4
x2
x2
⫺0.1
0.4
0.6
0.8
0
0.1
0.2
0.3
0.4
x1
0.1
0
0
⫺0.1
⫺0.1
⫺0.2
⫺0.2
⫺0.3
⫺0.3
⫺0.4 ⫺0.3
⫺0.2
⫺0.1
(m)
0
0.1
0.2
0.3
0.4
x1
⫺0.5 ⫺0.5 ⫺0.4 ⫺0.3 ⫺0.2 ⫺0.1
(n)
0.4
0.5
0.3
0.4
0
0.1
0.2
0.3
0.4
0.5
0.1
0.2
0.3
0.4
0.5
x1
0.3
0.2
0.2
0.1
0.1
x2
x2
⫺0.2
0.2
0.2
0.1
0
0
⫺0.1
⫺0.1
⫺0.2
⫺0.2
⫺0.3
⫺0.3
(o)
⫺0.3
0
x1
0.3
0.2
⫺0.4 ⫺0.4
⫺0.2
(l)
0.4
⫺0.4 ⫺0.4
⫺0.4
0
⫺0.1
⫺0.4 ⫺0.4
⫺0.6
(j)
⫺0.4 ⫺0.3
⫺0.2
⫺0.1
0
x1
0.1
0.2
0.3
0.4
⫺0.5 ⫺0.5 ⫺0.4 ⫺0.3 ⫺0.2 ⫺0.1
(p)
0
x1
Figure 7.1 (continued ) (i) c = 0.1, θ = −π + 1.5 and = −π + 0.3; (j) c = 0.1, θ = −π + 1 and = −π + 0.3; (k) c = 0.1, θ = −π + 5.4 and = −π + 1.8; (l) c = 0.1, θ = −π + 4.2 and = −π + 1.4; (m) c = 0.1, θ = −π + 6 and = −π + 1.2; (n) c = 0.1, θ = −π + 4.5 and = −π + 1.5; (o) c = 0.1, θ = −π + 5.1 and = −π + 1.7; (p) c = 0.1, θ = −π + 3.8 and = −π + 1.9;
0.8
0.5
0.6
0.4 0.3
0.4
0.2 0.1
x2
x2
0.2 0
⫺0.2
⫺0.4
⫺0.3
⫺0.6 ⫺0.8 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
⫺0.4 0
0.2
0.4
0.6
0.8
x1
(q)
0
⫺0.1
⫺0.2
⫺0.5 ⫺0.5 ⫺0.4 ⫺0.3 ⫺0.2 ⫺0.1
0.4
0.6
0.3
0.4
0.2
0
0.1
0.2
0.3
0.4
0.5
x1
(r)
0.2
0.1
x2
x2
0 0
⫺0.2
⫺0.1
⫺0.4
⫺0.2
⫺0.6
⫺0.3 ⫺0.4 ⫺0.4 ⫺0.3 ⫺0.2 ⫺0.1
0.1
0.2
0.3
0.4
x1
(s)
⫺0.8 ⫺0.8
1
0.5 0.4
0.6
0.3
0.4
0.2
0.2
0.1
0
⫺0.1
⫺0.4
⫺0.2
⫺0.6
⫺0.3
⫺0.8
⫺0.4
(u)
0.4
0.6
0.8
1
⫺0.5 ⫺0.5 ⫺0.4 ⫺0.3 ⫺0.2 ⫺0.1
0.4
0.8
0.3
0.6
0.2
0.4
0.1
0.2
0
⫺0.2
⫺0.2
⫺0.4
⫺0.3
⫺0.6
(w)
0
x1
0.1
0.2
0.3
0.4
⫺0.8 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
(x)
0.4
0.8
0
0.1
0.2
0.3
0.4
0.5
0
⫺0.1
⫺0.4 ⫺0.4 ⫺0.3 ⫺0.2 ⫺0.1
0.2
x1
(v)
x2
x2
0.2
x1
0
⫺0.2
0
⫺0.2
0
⫺0.4
x1
0.8
⫺1 ⫺1 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
⫺0.6
(t)
x2
x2
0
0
0.2
0.4
0.6
x1
Figure 7.1 (continued ) (q) c = 0.1, θ = −π + 5 and = −π + 1; (r) c = 0.1, θ = −π + 6.2 and = −π + 1; (s) c = 0.1, θ = −π + 5.5 and = −π + 1.1; (t) c = 0.1, θ = −π + 0.9 and = −π + 0.3; (u) c = 0.1, θ = −π + 0.7 and = −π + 0.2; (v) c = 0.1, θ = −π + 5.7 and = −π + 0.9; (w) c = 0.1, θ = −π + 5 and = −π + 1.6; (x) c = 1, θ = −π + 3.6 and = −π + 1.2;
0.8
0.6
0.4
0.4
0.2
0.2
x2
0.8
0.6
x2
0.8
0
0
⫺0.2
⫺0.2
⫺0.4
⫺0.4
⫺0.6
⫺0.6
⫺0.8 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
(y)
0
0.2
0.4
0.6
0.8
x1
⫺0.8 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
(z)
0.8
1
0.6
0.8
0.4
0.6
0.8
0.4
0.2
0.2
x2
x2
0.2
0.6
0.4
0
0
⫺0.2
⫺0.2
⫺0.4
⫺0.4
⫺0.6
⫺0.6
⫺0.8
⫺0.8 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
(aa)
0
0.2
0.4
0.6
⫺1 ⫺0.1 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
0.8
x1
(bb) 1 0.8
0.6
0.6
0.4
0.4
0.2
0.2
x2
1 0.8
x2
0
x1
0
⫺0.2
⫺0.4
⫺0.4
⫺0.6
⫺0.6
⫺0.8
⫺0.8
⫺1 ⫺0.1 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
0
0.2
0.4
0.6
0.8
⫺1 ⫺0.1 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
1
x1
0.2
0.4
0.6
0.8
1
0.2
0.4
0.6
0.8
1
0
⫺0.2
(cc)
0
x1
(dd)
0.6
0.8
0.4
0.6
0
x1
0.4
0.2
0.2
x2
x2
0 ⫺0.2 ⫺0.4
⫺0.4
⫺0.6 ⫺0.8 ⫺0.8
(ee)
0
⫺0.2
⫺0.6 ⫺0.6
⫺0.4
⫺0.2
0
x1
0.2
0.4
0.6
⫺0.8 ⫺0.8 ⫺0.6 ⫺0.4 ⫺0.2
(ff)
0
0.2
0.4
0.6
x1
Figure 7.1 (continued ) (y) c = 1, θ = −π + 2.8 and = −π + 0.4; (z) c = 1, θ = −π + 3 and = −π + 0.5; (aa) c = 1, θ = −π + 1.8 and = −π + 0.6; (bb) c = 1, θ = −π + 5.5 and = −π + 3.3; (cc) c = 1, θ = −π + 1.9 and = −π + 0.1; (dd) c = 1, θ = −π + 6 and = −π + 2.8; (ee) c = 1, θ = −π + 5.1 and = −π + 2.7; (ff) c = 1, θ = −π + 3.1 and = −π + 1.
0.8
122
7 Sinusoidal Response of Digital Filters with Two’s Complement Arithmetic
Solution: Since x(k) =
we have
& ' 1 −sin((k − 1))x1 (0) + sin(k)x2 (0) v(k) sin −sin(k)x1 (0) + sin((k + 1))x2 (0) ⎤ ⎡ sin θ sin((k − 1)) cv(k − 1) − sin((k − 1)θ) ⎢ sin a − 2 cos θ ⎥ ⎥ ⎢ +⎢ ⎥, ⎣ ⎦ cv(k) sin θ sin(k) − sin(kθ) sin a − 2 cos θ
⎡ π(k − 1) ⎤ √ −sin 3⎢ ⎥ 3 x(k) = ⎦ v(k) ⎣ πk 5 −sin 3 ⎤ ⎡ 5π(k − 1) 1 π(k − 1) − sin v(k − 1)⎥ ⎢ √ sin 3 6 1 3 ⎥ ⎢ + √ ⎢ ⎥. ⎦ ⎣ 5πk 1 πk 100(1 + 3) − sin v(k) √ sin 3 6 3 Periodicity of state vector
0.5
0.5
0.4
0.4
0.3
0.3
0.2
0.2
0.1
0.1
x2
x2
Because x(k) is made up of two different components with frequencies and θ, the frequency spectrum of x(k) consists of a finite set of impulses. If and θ are rational multiples of π, that is, ∃p1 , p2 ∈ Q such that = p1 π and θ = p2 π, then x(k) is periodic. So, there are finitely many distinct points on the trajectory as shown in Figure 7.2a. However, if or θ are not rational multiples of π,
0
0
⫺0.1
⫺0.1
⫺0.2
⫺0.2
⫺0.3
⫺0.3 ⫺0.4
⫺0.4 ⫺0.5 ⫺0.5 ⫺0.4 ⫺0.3 ⫺0.2 ⫺0.1
(a)
0
0.1
0.2
0.3
x1
0.4
0.5
⫺0.5 ⫺0.5 ⫺0.4 ⫺0.3 ⫺0.2 ⫺0.1
Figure 7.2 Phase portrait of the system when c = 0.01, b = −1, x(0) = values of . (a) =
3π 3π ; (b) = + 0.01. 4 4
0
0.1
0.2
0.3
0.4
0.5
x1
(b) &
' 2π 0.3 , θ= , and different 0 3
No Overflow Case
123
then x(k) is aperiodic. Hence, there are infinitely many distinct points on the trajectory as shown in Figure 7.2b. Similar to the autonomous and step response cases, x(k) is made up of a component with frequency and a DC component. If is a rational multiple of π, that is, ∃p1 ∈ Q such that = p1 π, then x(k) is periodic. So, there are finitely many distinct points on the ellipse. However, if is not a rational multiple of π, then there are infinitely many distinct points on the ellipse. Example 7.2 Refer the Example 7.1, does the state trajectory periodic? Explain why? Solution: Since both and θ are rational multiples of π, the state trajectory is periodic. Set of initial conditions It was found that the set of initial conditions for the autonomous and step response cases when overflow does not occur can be described by an elliptical region. Actually, it is similar for the sinusoidal response case. The analysis is presented as follows. Let x(k) = xf 1 (k) + xf 2 (k)
(7.21)
∀k ≥ 1, where ⌢k
∗ xf 1 (k) = T A T−1 (x(0) + x1 )
(7.22)
∀k ≥ 1, and ⌢k
∗ xf 2 (k) = −Tθ Aθ T−1 θ x1
(7.23)
⌢
xf 1 (k) = T−1 xf 1 (k)
(7.24)
xf 2 (k) = T−1 θ xf 2 (k)
(7.25)
∀k ≥ 1. Define
∀k ≥ 1, and ⌢
∀k ≥ 1.
124
7 Sinusoidal Response of Digital Filters with Two’s Complement Arithmetic
Then we have ⌢k
−1 −1 ∗ ∗ xf 1 (k) = T−1 T A T (x(0) + x1 ) = T (x(0) + x1 ) ⌢
∀k ≥ 1, and
⌢k
−1 ∗ −1 ∗ xf 2 (k) = −T−1 θ Tθ Aθ Tθ x1 = Tθ x1 ⌢
(7.26)
(7.27)
∀k ≥ 1. ⌢
⌢
Since the norm of the trajectories of xf 1 (k) and xf 2 (k) are independent of k, we have circular trajectories. Hence, we can define φf 1 and φf 2 such that & ' cos(φf 1 k) ⌢ ⌢ xf 1 (k) = xf 1 (k) (7.28) sin(φf 1 k) ∀k ≥ 1, and
&
' cos(φf 2 k) xf 2 (k) = xf 2 (k) sin(φf 2 k)
⌢
⌢
(7.29)
∀k ≥ 1. Hence we have
∀k ≥ 1.
&
' & ' 1 0 cos(φf 1 k) ⌢ xf 1 (k) = T xf 1 (k) = xf 1 (k) cos sin sin(φf 1 k) & ' cos(φf 1 k) ⌢ = xf 1 (k) cos(φf 1 k − ) ⌢
(7.30) (7.31)
Similarly, ⌢
xf 2 (k) = xf 2 (k)
&
cos(φf 2 k) cos(φf 2 k − θ)
'
(7.32)
∀k ≥ 1. Since x(k) = xf 1 (k) + xf 2 (k) ∀k ≥ 1, we have ⌢
x(k) = xf 1 (k) ∀k ≥ 1.
&
& ' ' cos(φf 1 k) cos(φf 2 k) ⌢ + xf 2 (k) cos(φf 1 k − ) cos(φf 2 k − θ)
(7.33)
(7.34)
125
No Overflow Case
1 0.8 0.6 0.4
y0
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0 x0
0.2
0.4
0.6
0.8
1
Figure 7.3 Set of initial conditions for no overflow case when a = 0.5, b = −1, c = 1 and θ = 0.001π.
As overflow does not occur, we have −1 ∗ ∗ xf 1 (k) + xf 2 (k) = T−1 (x(0) + x1 ) + Tθ x1 ≤ 1, ⌢
⌢
(7.35)
this implies that −1 ∗ ∗ T−1 (x(0) + x1 ) ≤ 1 − Tθ x1 .
(7.36)
Hence, the set of initial conditions for the no overflow case is −1 ∗ ∗ {x(0): T−1 (x(0) + x1 ) ≤ 1 − Tθ x1 }.
(7.37)
This set of initial conditions can be represented as an elliptical region in the phase plane. The center of the ellipse is located at −x1∗ and the size of the ∗ ellipse depends on 1 − T−1 θ x1 . Figure 7.3 shows an example of the set of initial conditions when overflow does not occur. Example 7.3 Refer the Example 7.1, does overflow occur? Explain why? Solution: −1 ∗ ∗ Since T−1 (x(0) + x1 ) ≤ 1 − Tθ x1 , overflow does not occur.
126
7 Sinusoidal Response of Digital Filters with Two’s Complement Arithmetic
4 3 2
c
1 0 ⫺1 ⫺2 ⫺3 ⫺4 4
3
2
1 θ
0
⫺1
⫺2
⫺3
⫺4
⫺4
⫺3
⫺2
⫺1
0
1
2
3
4
Ω
Figure 7.4 Surface of the parameter region in which overflow may not occur when b = −1.
Necessary conditions on the filter parameters For the autonomous response case, some initial conditions ∀a ∈ {a: |a| < 2} always exist, such that the system is free from overflow. However, this is not the case for the sinusoidal response because there are two more parameters from the input signal, c and θ. In fact, if the set of filter and input parameters fails to satisfy a particular relation, then overflow has to occur regardless of the initial conditions. The details are presented as follows. From the inequality of eqn (7.36), we have ∗ T−1 (x(0) + x1 )
Hence, we have
≤
∗ 1 − T−1 θ x1
c . =1− 2(cos − cos θ)
|c| ≤ | cos − cos θ|. 2
(7.38)
(7.39)
If the relation in eqn (7.39) is not satisfied, overflow will occur regardless of the initial conditions. Figure 7.4 shows the region of the parameter space that satisfies the relation of eqn (7.39). From the analysis, if θ = 2πm ± , then c has to be zero. Therefore, overflow will occur no matter what the initial conditions are and how small the signal
Overflow Case
127
is applied to the system, that is c → 0 for |c| > 0. This phenomenon can be understood by the resonance behavior. Example 7.4 Referring the Example 7.1, can we prove that some initial conditions exist where overflow does not occur? Solution: Since |c| 2 ≤ | cos − cos θ| is satisfied, some initial conditions where overflow does not occur do exist.
OVERFLOW CASE Since the dynamic of the system is so complex, only the analysis on the periodic symbolic sequences are presented here that is, we assume s ∈ α . For eventually periodic or aperiodic symbolic sequences – that is s ∈ β or s ∈ γ – some numerical computer simulations are illustrated in Section 7.2.4. For the trajectory equation (s ∈ α ), the set of initial conditions and the necessary conditions on the filter and input parameters are as follows.
Trajectory equation For the autonomous and step response cases, there is more than one ellipse exhibited on the phase plane. However, the sinusoidal response case is more complicated than that of the autonomous and step response cases, as presented below. Assume the periodic sequences are periodic with period M. By expressing the symbolic sequences as Fourier series, that is
s(k) =
M−1 # p=0
ap sin( pωk) + bp cos( pωk)
(7.40)
∀k ≥ 0, where ω=
2π , M
(7.41)
128
7 Sinusoidal Response of Digital Filters with Two’s Complement Arithmetic
then when M is odd, we have x(k) =
' & 1 −sin((k − 1))x1 (0) + sin(k)x2 (0) v(k) sin −sin(k)x1 (0) + sin((k + 1))x2 (0)
⎡ sin θ sin((k − 1))
⎢ ⎢ +⎢ ⎣
sin
cv(k − 1) ⎤ a − 2 cos θ ⎥ ⎥ ⎥ ⎦ cv(k)
− sin((k − 1)θ)
sin θ sin(k) − sin(kθ) sin a − 2 cos θ
⎡ sin(pω) sin((k − 1))
− sin((k − 1)pω)
ap v(k − 1) ⎤ M−1 sin cos − cos(pω) ⎥ #⎢ ⎥ ⎢ + ⎥ ⎢ ⎣ ⎦ ap v(k) sin(pω) sin(k) p=1 − sin(kpω) sin cos − cos(pω) ⎡ ⎤ bp v(k) sin(k) sin(kpω) − M−1 ⎥ sin sin(pω) cos − cos(pω) #⎢ ⎢ ⎥ + ⎢ ⎥ ⎣ ⎦ bp v(k) (2 cos − cos(pω)) sin(k) cos(pω) sin(kpω) p=1 − sin sin(pω) cos − cos(pω) ⎤ ⎡ sin((k − 1)) sin((k − 1)pω) bp cos(pω)v(k − 1) + − M−1 #⎢ sin sin(pω) cos − cos(pω) ⎥ ⎥ ⎢ + ⎥ ⎢ ⎦ ⎣ bp v(k − 1) sin((k − 1)) sin((k − 1)pω) p=1 + − sin sin(pω) cos − cos(pω)
' & ' & b0 sin((k − 1))v(k − 1) 1 b0 sin(k)v(k) −1 + 1 sin (1 − cos ) sin (1 − cos ) 1 − 2 cos & ' b0 v(k − 1) 1 . + 1 − cos 1 +
When M is even, we have ' & 1 −sin((k − 1))x1 (0) + sin(k)x2 (0) v(k) sin −sin(k)x1 (0) + sin((k + 1))x2 (0) ⎤ ⎡ cv(k − 1) sin θ sin((k − 1)) − sin((k − 1)θ) ⎢ sin a − 2 cos θ ⎥ ⎥ ⎢ +⎢ ⎥ ⎦ ⎣ cv(k) sin θ sin(k) − sin(kθ) sin a − 2 cos θ ⎡ ⎤ ap v(k − 1) sin(pω) sin((k − 1)) − sin((k − 1)pω) M−1 #⎢ sin cos − cos(pω) ⎥ ⎢ ⎥ + ⎢ ⎥ ⎦ ⎣ ap v(k) sin(pω) sin(k) p=1 − sin(kpω) sin cos − cos(pω)
x(k) =
(7.42)
129
Overflow Case
⎤ bp v(k) ⎥ M−1 cos − cos(pω) #⎢ ⎥ ⎢ ⎥ ⎢ + ⎥ ⎢ ⎦ bp v(k) cos(pω) sin(kpω) p=1 ⎣ (2 cos − cos(pω)) sin(k) − p = M 2 sin sin(pω) cos − cos(pω) ⎡
sin(k) sin(kpω) − sin sin(pω)
⎡
⎤ sin((k − 1)) sin((k − 1)pω) bp cos(pω)v(k − 1) − + M−1 sin sin(pω) cos − cos(pω) ⎥ #⎢ ⎥ ⎢ ⎥ ⎢ + ⎥ ⎢ ⎦ p=1 ⎣ bp v(k − 1) sin((k − 1)) sin((k − 1)pω) + − p = M 2 sin sin(pω) cos − cos(pω) +
' & ' & b0 sin((k − 1))v(k − 1) 1 b0 sin(k)v(k) −1 + 1 sin (1 − cos ) sin (1 − cos ) 1 − 2 cos
+
& ' b M sin((k − 1))v(k − 1) & ' b0 v(k − 1) 1 1 + 2 −1 1 − cos 1 sin (1 + cos )
+
' b M (−1)k−1 v(k − 1) & ' 1 −1 + 2 . 1 sin (1 + cos ) 1 + 2 cos 1 + cos b M sin(k)v(k) & 2
Let
& ' ap sin(pω) 1 , cos(pω) − cos 0 & ' bp cos(pω) , = 1 cos(pω) − cos & ' 1 0 = , cos(pω) sin(pω)
∗ x1,p =
(7.44)
∗ x2,p
(7.45)
Tpω ⌢
Apω = x2∗ and
(7.43)
&
' cos(pω) sin(pω) , −sin(pω) cos(pω)
& ' b0 1 , = 1 − cos 1 x3∗ =
&
' −1 . 1 + cos 1 bM 2
(7.46)
(7.47)
(7.48)
(7.49)
130
7 Sinusoidal Response of Digital Filters with Two’s Complement Arithmetic
If M is odd, then we have ⎛
⌢k
⎝x(0) + x1∗ − x2∗ + x(k) = T A T−1 +
M−1 # p=1
⌢k
M−1 # p=1
⎞
⌢k
∗ ∗ ∗ ⎠ (x1,p − x2,p ) − Tθ Aθ T−1 θ x1
∗ ∗ ∗ Tpω Apω T−1 pω (x2,p − x1,p ) + x2
(7.50)
∀k ≥ 1. If M is even, then we have ⎛
⎞
M−1 # ⎜ ⎟ ⌢k ⌢k ∗ ∗ ∗ ⎟ ⎜x(0) + x∗ − x∗ + x∗ + x(k) = T A T−1 (x1,p − x2,p )⎠ − Tθ Aθ T−1 1 2 3 ⎝ θ x1 p=1 p = M 2
+
M−1 # p=1 p = M 2
⌢k
∗ ∗ ∗ k−1 ∗ Tpω Apω T−1 x3 pω (x2,p − x1,p ) + x2 + (−1)
(7.51)
∀k ≥ 1. x(k) is made up of components with frequencies , θ, and pω, where p = 0, 1, · · · , M − 1. This is different from the no overflow case, where only the frequency components and θ are found. Because more sinusoidal signals are superimposed together, the visual appearance of the trajectories corresponding to the periodic symbolic sequence case may be different from that of the no overflow case. For example, if overflow does not occur at a certain initial condition x(0), and gives overflow and generates periodic symbolic sequences for another initial condition x′ (0), while and θ are remained unchanged, the visual appearance of the trajectories corresponding to periodic symbolic sequence case may be different from that of the no overflow case. This change in the visual appearance of the trajectory pattern does not occur in the autonomous and step response cases because only elliptical pattern occurs in both the type I and type II trajectories. Figure 7.5 shows some numerical computer simulations of the sinusoidal response of digital filter associated with two’s complement arithmetic when the symbolic sequences are periodic.
131
1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
x2
x2
Overflow Case
0
0
−0.2
−0.2
−0.4
−0.4
−0.6
−0.6
−0.8 −1 −1 −0.8 −0.6 −0.4 −0.2
0.2
0.4
0.6
0.8
−1 −1 −0.8 −0.6 −0.4 −0.2
1
x1
(a) 1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0
−0.2
−0.4
−0.4
−0.6
−0.6
−1 −1 −0.8 −0.6 −0.4 −0.2
0.4
0.6
0.8
−1 −1 −0.8 −0.6 −0.4 −0.2
1
1
1 0.8
0.6
0.6
0.4
0.4
0.2
0.2
0
0.8
1
−0.2
−0.4
−0.4
−0.6
−0.6
−0.8
−0.8 0
x1
0.2
0.4
0.6
0.8
−1 −1 −0.8 −0.6 −0.4 −0.2
1
(f)
0
0.2
0.4
0.6
0.8
1
0.2
0.4
0.6
0.8
1
0
−0.2
(e)
0.6
x1
(d)
x2
x2
0.2
0.8
−1 −1 −0.8 −0.6 −0.4 −0.2
0.4
−0.8 0
x1
(c)
0.2
0
−0.2
−0.8
0
x1
(b)
x2
x2
−0.8 0
0
x1
Figure 7.5 Phase portrait for & the'system with different initial conditions, input and filter parameters. 0.5 (a) a = 1.3, b = −1, x(0) = , c = 0.09, θ = 0.001π and the period is 2; (b) a = 1.3, b = −1, −0.5 & ' & ' −0.99 −0.616 , c = 0.005, θ = 0.001π and the period is 84; (c) a = 0.5, b = −1, x(0) = x(0) = , −0.99 0.616 & ' −0.616 2π 2π , c = 1.1, θ = 3 and the c = 0.7, θ = 3 and the period is 12; (d) a = 0.5, b = −1, x(0) = 0.616 & ' −0.616 , c = 1, θ = 2π period is 165; (e) a = 0.5, b = −1, x(0) = 3 and the period is 22323; (f) a = 0.5, 0.616 & ' −0.616 , c = 1.2, θ = 2π b = −1, x(0) = 3 and the period is 66. 0.616
132
7 Sinusoidal Response of Digital Filters with Two’s Complement Arithmetic
Example 7.5 Consider the second order marginally stable digital filter associated
two’s com−0.616 plement arithmetic. Assume that a = 0.5, b = −1, x(0) = 0.616 , c = 1.2 and θ = 2π 3 . Calculate the state response of the system.
Solution: π Since = cos−1 41 , M = 66, ω = 33 and ∃ap , bp for p = 0, 1, . . . , 65 such that 65 πpk πpk s(k) = p=0 ap sin( 33 ) + bp cos( 33 ) ∀k ≥ 0, we have x(k) =
+
+
4 5
⎡
sin
cos−1
⎢ 0.616 ⎢ ⎢ sin cos−1 41 ⎣ sin cos−1
⎡% ⎢ ⎢ ⎢ ⎢ ⎣
65 # p=1
+
65 #
+
65 #
p=1 p =33
p=1 p =33
⎤ 1 1 (k − 1) + sin cos−1 k ⎥ 4 4 ⎥ v(k) ⎥ ⎦ 1 1 −1 k + sin cos (k + 1) 4 4
⎤ √ $ 3 −1 1 (k − 1) − sin 2π(k − 1) sin cos v(k − 1) ⎥ ⎥ 4 3 2 sin cos−1 41 ⎥ % √ $ ⎥ 3 2πk 1 ⎦ −1 v(k) k − sin sin cos 1 −1 4 3 2 sin cos 4 ⎞ pπ
⎡⎛ ⎤ sin πp(k − 1) ⎟ 1 33 −1 ⎢⎜ ⎠ v(k − 1)⎥ ⎥ ⎢⎝ sincos−1 1 sin cos 4 (k − 1) − sin 33 ⎥ ⎢ 4 ap ⎥ ⎢ ⎛ ⎞
⎥ ⎢ pπ pπ ⎢ 1 ⎥ sin 4 − cos 33 ⎢ ⎥ πpk 1 ⎜ ⎟ 33 −1 ⎦ ⎣ k − sin ⎝ −1 1 sin cos ⎠ v(k) 4 33 sin cos 4
⎞ ⎤ sin πpk sin cos−1 41 k 33 ⎠ ⎝ ⎥ ⎢ − ⎥ ⎢ sin pπ sin cos−1 41 ⎥ ⎢ 33 bp v(k) ⎥ ⎢% $ pπ ⎢ 1 ⎥ ⎥ ⎢ 2 − cos pπ cos − cos pπ πpk 33 33 1 33 ⎢ −1 ⎥ ⎦ ⎣ sincos−1 1 sin cos 4 k − sin pπ sin 33 33 4 ⎛
⎡
1 4
⎞ ⎡ pπ ⎤ sin πp(k−1) cos sin cos−1 41 (k − 1) bp v(k − 1) 33 33 ⎦ ⎝− pπ ⎠ 1 + pπ ⎣ 1 −1 sin 33 sin cos 4 4 − cos 33 1 ⎛
) *$ % & ' −1 b0 1 −1 1 −1 1 1 (k − 1) v(k − 1) + sin cos k v(k) sin cos 1 3 −1 1 4 4 4 sin cos 4 2 & ' & ' b0 v(k − 1) 1 b33 1 −1 1 (k + sin cos + − 1) v(k − 1) 3 5 1 −1 4 sin cos−1 1 +
4
4
4
) *$ & ' 1 b33 (−1)k−1 v(k − 1) −1 1 v(k) 3 + + sin k cos−1 5 1 4 4 2
133
Overflow Case
Set of initial conditions ⌢k ⌢k M−1 M−1 ∗ ∗ −1 ∗ −1 ∗ Since p=1 Tpω Apω Tpω (x2,p − x1,p ) is p=1 Tpω Apω Tpω (x2,p − x1,p ) or p = M 2
periodic with period M, these terms are dependent on each other. Hence, just the state space technique is not sufficient to efficiently characterize the set of initial conditions. Instead, the set of initial conditions can be characterized using a frequency domain approach as presented below: Let
' ξ1,p ∗ ∗ = T−1 ξp = pω (x2,p − x1,p ). ξ2,p
If M is odd, then we have M−1 #
⌢k
∗ Tpω Apω T−1 pω (x2,p
p=1
−
∗ x1,p )
&
⎡
(7.52) ⎤
M−1 #
⎢ ⎥ (ξ1,p cos(kpω) + ξ2,p sin(kpω)) ⎢ ⎥ ⎢ ⎥ p=1 = ⎢M−1 ⎥. ⎥ ⎢# ⎣ (ξ1,p cos((k + 1)pω) + ξ2,p sin((k + 1)pω))⎦ p=1
(7.53)
By defining the following discrete time signals ξ −(M − 1) ≤ n ≤ −1 ξi (n) = i,−n 0 otherwise
for i = 0, 1,
(7.54)
q1,k (n) = cos(kωn)
(7.55)
q2,k (n) = sin(kωn),
(7.56)
and
we have M−1 # p=1
⌢k
∗ ∗ Tpω Apω T−1 pω (x2,p −x1,p ) =
⎡
&
q1,k (n) ∗ ξ1 (n)|n=0 + q2,k (n) ∗ ξ2 (n)|n=0 q1,k+1 (n) ∗ ξ1 (n)|n=0 + q2,k+1 (n) ∗ ξ2 (n)|n=0
"+π 1 ⎢ Q1,k (̟)Z1 (̟)d̟ + ⎢ 2π ⎢ ̟=−π =⎢ +π ⎢ ⎢ 1 " ⎣ Q1,k+1 (̟)Z1 (̟)d̟ + 2π ̟=−π
1 2π 1 2π
"+π
̟=−π "+π
̟=−π
(7.57) ⎤
⎥ ⎥ ⎥ ⎥, ⎥ ⎥ Q2,k+1 (̟)Z2 (̟)d̟ ⎦ Q2,k (̟)Z2 (̟)d̟
'
(7.58)
134
7 Sinusoidal Response of Digital Filters with Two’s Complement Arithmetic
where Q1,k (̟), Q2,k (̟), Z1 (̟) and Z2 (̟) are the Fourier transforms of q1,k (n), q2,k (n), ξ1 (n) and ξ2 (n), respectively. This implies that M−1 # p=1
⌢k
∗ ∗ Tpω Apω T−1 pω (x2,p − x1,p )
⎡
⎤ Z1 (kω) + Z1 (−kω) Z2 (kω) − Z2 (−kω) + ⎢ ⎥ 2 2j ⎥ =⎢ ⎣ Z1 ((k + 1)ω) + Z1 (−(k + 1)ω) Z2 ((k + 1)ω) − Z2 (−(k + 1)ω) ⎦ . + 2 2j
(7.59)
& ' b0 1 ∗ Since x2 = , the infinity norm of 1 − cos 1 M−1 # p=1
⌢k
∗ ∗ ∗ Tpω Apω T−1 pω (x2,p − x1,p ) + x2
(7.60)
is
Z1 (kω) + Z1 (−kω) Z2 (kω) − Z2 (−kω) b0 . + + max k∈{0,1,··· ,M−1} 2 2j 1 − cos
(7.61)
Similarly, if M is even, the infinity norm of M−1 # p=1 p = M 2
is
⌢k
∗ ∗ ∗ k−1 ∗ x3 Tpω Apω T−1 pω (x2,p − x1,p ) + x2 + (−1)
′ Z1 (kω) + Z1′ (−kω) Z2′ (kω) − Z2′ (−kω) max + k∈{0,1,··· ,M−1} 2 2j (−1)k−1 b M b0 2 + − , 1 − cos 1 + cos
where Zi′ (̟) are the discrete Fourier transform of ⎧ ⎨ξ i,−n −(M − 1) ≤ n ≤ −1 and ξi′ (n) = ⎩ 0 otherwise for i = 0, 1.
n = −
M 2
(7.62)
(7.63)
(7.64)
135
Overflow Case
As −1 ≤ x1 (k) < 1 and −1 ≤ x2 (k) < 1 ∀k ≥ 0, so if M is odd, then we have
, ⎞, ⎛ , , M−1 # , , −1 ∗ ∗ ∗ ∗ , ,T ⎝x(0) + x − x + ⎠ (x − x ) 1,p 2,p 1 2 , , , , p=1 Z1 (kω) + Z1 (−kω) , , Z2 (kω) − Z2 (−kω) b0 ∗, . max < 1 − ,T−1 + + θ x1 − k∈{0,1,··· ,M−1} 2 2j 1 − cos
(7.65)
If M is even, then we have , ⎛ ⎞, , , , , M−1 # , −1 ⎜ ⎟ , ∗ ∗ ⎟, ,T ⎜x(0) + x∗ − x∗ + x∗ + (x1,p − x2,p )⎠, 1 2 3 , ⎝ , , p=1 , , p = M 2 ′ Z1 (kω) + Z1′ (−kω) Z2′ (kω) − Z2′ (−kω) ∗ + < 1 − T−1 max θ x1 − k∈{0,1,··· ,M−1} 2 2j (−1)k−1 b M b0 2 + − (7.66) . 1 − cos 1 + cos
Hence, the set of initial conditions for the periodic symbolic sequence case is as follows. If M is odd, then we have
, ⎧ ⎞, ⎛ , , M−1 ⎨ # , , −1 ∗ ∗ ⎠, (x1,p − x2,p ) , T ⎝x(0) + x1∗ − x2∗ + x(0): , , ⎩ , , p=1 < 1−
∗ T−1 θ x1
⎫ ⎬ Z1 (kω) + Z1 (−kω) Z (kω) − Z (−kω) b 2 2 0 . − max + + k∈{0,1,··· ,M−1} 2 2j 1 − cos ⎭
(7.67)
If M is even, then we have
, ⎛ ⎞, , , , , M−1 ⎜ , ⎟, # ⎜ , ∗ ∗ ∗ ∗ ∗ ⎟, x(0) + x − x + x + x(0): ,T−1 (x − x ) ⎜ ⎟, 1 2 3 1,p 2,p , ⎪ ⎝ ⎠, ⎪ p=1 , ⎪ , ⎩ , , p = M ⎧ ⎪ ⎪ ⎪ ⎨
2
′ (−1)k−1 b M Z1 (kω) + Z1′ (−kω) Z′ (kω) − Z2′ (−kω) b0 ∗ 2 + 2 + − < 1 − T−1 x − max 1 θ 2 2j 1 − cos 1 + cos k∈{0,1,··· ,M−1}
⎫ ⎪ ⎪ ⎪ ⎬ . ⎪ ⎪ ⎪ ⎭
(7.68)
This corresponds to a set regions. If M is odd, then the centers are of elliptical ∗ − x∗ ) and the sizes of those ellipses depend located at −x1∗ + x2∗ − M−1 (x p=1 1,p 2,p
136
7 Sinusoidal Response of Digital Filters with Two’s Complement Arithmetic
Z1 (kω) + Z1 (−kω) Z2 (kω) − Z2 (−kω) b0 + + . 2 2j 1−cos k∈{0,1,··· ,M−1} ∗ ∗ If M is even, then the centers are located at −x1∗ + x2∗ − x3∗ − M−1 p=1 (x1,p − x2,p )
∗ on 1 − T−1 θ x1 −
max
and the sizes of those ellipses depend on
p = M 2
′ (−1)k−1 b M Z1 (kω) + Z1′ (−kω) Z′ (kω) − Z2′ (−kω) b0 ∗ 2 1 − T−1 x − max + 2 + − k∈{0,1,··· ,M−1} 1 θ 2 2j 1 − cos 1 + cos
.
Example 7.6 Referring the Example 7.5, we can question if limit cycle occur? Solution: Since , ⎛ ⎞, , , , , M−1 , ⎜ ⎟,
# , , −1 ⎜ ⎟ ∗ ∗ x1,p − x2,p ,T ⎜x(0) + x1∗ − x2∗ + x3∗ + ⎟, , ⎝ ⎠, p=1 , , , , p = M 2
, , , ∗, < 1 − ,T−1 θ x1 , −
′ (−1)k−1 b M Z1 (kω) + Z1′ (−kω) Z′ (kω) − Z2′ (−kω) b0 2 max + 2 + − k∈{0,1,··· ,M−1} 2 2j 1 − cos 1 + cos
limit cycle occurs.
,
Necessary conditions on filter parameters The necessary conditions on filter parameters for the periodic symbolic sequence case can be investigated by examining the conditions when the relation of either eqn (7.67) or eqn (7.68) is satisfied. To understand the expression of eqns (7.67) and (7.68) better, we can look at the expression term M−1 ∗ ∗ ∗ ∗ by term. For the first term, T−1 p=1 (x1,p − x2,p )) or (x(0) + x1 − x2 + M−1 −1 ∗ ∗ ∗ ∗ ∗ T (x(0) + x1 − x2 + x3 + p=1 (x1,p − x2,p )), if those centers discussed p = M 2
in Section 7.2.2 are inside the unit square, then one can select the initial condition x(0) as close to those centers as possible so that the above ∗ norms are close to zero. The second term T−1 θ x1 is directly proportional to the amplitude of the input sinusoidal signal. If the amplitude of the input sinusoidal signal is small, then this norm is also small. How- Z1 (kω) + Z1 (−kω) Z2 (kω) − Z2 (−kω) 0 + + 1 − bcos ever, the last term, max 2 2j k∈{0,1,...,M−1} (−1)k−1 b M Z′ (kω)+Z′ (−kω) Z′ (kω)−Z′ (−kω) b0 2 2 2 1 1 or max + + − 2 2j 1 − cos 1 + cos , k∈{0,1,...,M−1}
137
Overflow Case
depends on ξp , and from eqn (7.52), we have & ' 1 bp cos(pω) − ap sin(pω) ξp = . cos(pω) − cos bp sin(pω) + ap cos(pω)
(7.69)
This implies that = 2πk ± pω for p ∈3 {1,4· · · , M − 1} and for M is odd, or = 2πk ± pω for p ∈ {1, · · · , M − 1}\ M2 and for M is even. In other words, the natural frequency of the digital filter is not equal to one of the harmonic frequencies of the symbolic sequences. Example 7.7 Referring to Example 7.5, do initial conditions exist where limit cycle occurs? Solution: 3 4 Since = 2πk ± pω for p ∈ {1, · · · , M − 1}\ M2 , there exist initial conditions such that limit cycle occurs. Numerical computer simulations for aperiodic symbolic sequence case
1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0
0
−0.2
−0.2
−0.4
−0.4
−0.6
−0.6
−0.8
−0.8
−1 −1 −0.8 −0.6 −0.4 −0.2
(a)
x2
x2
When the symbolic sequences are eventually periodic (s ∈ β ) or aperiodic (s ∈ γ ) the dynamic of the system is so complex that only a few numerical computer simulations are illustrated here. For the autonomous and step response cases (discussed in Chapters 5 and 6) there is an elliptical fractal pattern on the phase plane if the symbolic sequences are aperiodic. However, both an elliptical fractal pattern and a rather random-like chaotic behavior may be exhibited for the sinusoidal response case. Figure 7.6 illustrates some numerical computer simulations.
0
x1
0.2
0.4
0.6
0.8
−1 −1 −0.8 −0.6 −0.4 −0.2
1
(b)
0
0.2
0.4
0.6
0.8
1
x1
Figure 7.6 Phase portrait for with different initial conditions, input and filter parameters. & & the system ' ' −0.6135 −0.9999 , (a) a = 0.5, b = −1, x(0) = , c = 1 and θ = 0.001π; (b) a = 0.5, b = −1, x(0) = 0.6135 0.9999 −6 c = 10 and θ = 0.001π.
138
7 Sinusoidal Response of Digital Filters with Two’s Complement Arithmetic
Example 7.8 Consider the second order marginally stable digital filter associated
two’s com−0.9999 plement arithmetic. Assume that a = 0.5, b = −1, x(0) = 0.9999 , c = 1 and θ = 0.001π. Is the symbolic sequence periodic? Solution: Since the system exhibits chaotic behaviors, the symbolic sequence is aperiodic.
SUMMARY This chapter presents the analysis of second order digital filters associated with two’s complement arithmetic for the sinusoidal inputs via the frequency domain approach. For the autonomous and step response cases, the trajectories can be classified by their visual appearances. However, such classification is not applicable for the sinusoidal response case because there are rich trajectory patterns exhibited on the phase plane. Instead, the system behaviors can be classified by means of the periodicity of the symbolic sequences.
EXERCISES 1. Consider
the second order digital filter with a = 1 and b = −1. Assume that 0.3 x(0) = 0 , c = 0.1, θ = −π + 3.8 and = −π + 1.9. Compute the state response of the system. 2. Refer to Question 1, does overflow occur? 3. Refer to Question 1, are the state variables periodic?
4. Consider the second order digital filter with a = 0.5, b = −1, x(0) = −0.616 0.616 ,
c = 1 and θ = 2π 3 . Compute the state response of the system. 5. Refer to Question 4, does overflow occur? 6. Refer to Question 4, are the state variables periodic?
8 TWO’S COMPLEMENT ARITHMETIC IN COMPLEX DIGITAL FILTERS
In previous chapters (for instance, see Chapter 5), we concentrated on the state space matrices of digital filters and worked on the assumption that the realizations were in the direct form. Since digital filters realized in the normal form are insensitive to quantization effects, they would be more useful from a practical point of view. Nonlinear behavior of digital filters realized in the normal form is now presented. FIRST ORDER COMPLEX DIGITAL FILTERS System model Consider the following first order difference equation: y(k) + ay(k − 1) = u(k) ∀k ≥ 0,
(8.1)
where a is a complex number, u(k) and y(k) are, respectively, the input and output of the difference equation. Let us assume that u(k) = 0 ∀k ≥ 0 and the whole system is only influenced by the initial state. Let yreal (k) and yimag (k) be, respectively, the real and imaginary parts of y(k); areal and aimag be, respectively, the real and imaginary parts of a. Then eqn (8.1) implies that: yreal (k) + areal yreal (k − 1) − aimag yimag (k − 1) = 0
∀k ≥ 0
(8.2)
yimag (k) + aimag yreal (k − 1) + areal yimag (k − 1) = 0
∀k ≥ 0.
(8.3)
and T
T
Define x(k) ≡ [x1 (k) x2 (k)] ≡ [yreal (k − 1) yimag (k − 1)] . When the accumulators are implemented via the two’s complement arithmetic, then the complex digital filter associated with two’s complement arithmetic can be implemented by the following state space equation: x(k + 1) = Ax(k) + 2s(k) ∀k ≥ 0, 139
(8.4)
140
8 Two’s Complement Arithmetic in Complex Digital Filters
s1 (k) −areal aimag is represented in the normal form, s(k) ≡ where A ≡ −a s2 (k) is the imag −areal vector consisted of the corresponding symbolic sequences si (k) ∈ Z for i = 1, 2 and Z denotes the set of integers. Example 8.1 Consider a first order complex digital filter associated with two’s √ complement √ , where j = −1. Calculate arithmetic. Assume that u(k) = 0 ∀k ≥ 0 and a = 1+j 2 the state space matrices of the system. What are the differences between the state space matrices of real and complex digital filters associated with two’s complement arithmetic? Solution: & ' & 1 −1 1 1 A= √ and B = 2 0 2 −1 −1
' 0 . 1
For real digital filters associated with two’s complement arithmetic, A is in the direct form and there is only one symbolic sequence. However, for first order complex digital filters associated with two’s complement arithmetic, A is in the normal form and there are two symbolic sequences. Linear property Define r and θ in such a way that areal = −r cos θ and aimag = −r sin θ. Let the eigenvalues of A be, respectively, λ1 and λ2 . Then λ1 = re jθ and λ2 = re−jθ . Denoting Z + as the set of positive integers, then we have the following linear property of the system. Theorem 8.1 For r ≤ 1 and ∀x(0) ∈ I 2 ≡ [−1, 1) × [−1, 1), ∃k1 ∈ Z + ∪ {0} such that s(k) = 0 ∀k ≥ k1 . Proof: + 0 1 −1 0 1 −1 Since r ≤ 1, s(k) ∈ 00 , 01 , −1 0 , 1 , 1 , 1 , −1 , −1 , −1 . Consider
φ the case when s(k0 ) = 0. Denoting x(k0 ) ≡ ρ cos then x(k0 + 1) = sin φ ,
+ φ) rρ cos(θ sin (θ + φ) and we have x(k0 + 1)2 = rρ ≤ ρ = x(k0 )2 . Now consider
cos(θ + φ) 2 the case when s(k0 ) = −1 and 0 . We have x(k0 + 1) = rρ sin (θ + φ) − 0 5 2 2 x(k0 + 1)2 = r ρ + 4(1 − rρ cos(θ + φ)). Since rρ cos(θ + φ) > 1 because of the occurrence of overflow, we have x(k0 + 1)2 < rρ ≤ ρ = x(k0 )2 .
First Order Complex Digital Filters
141
For other values of s(k0 ), using the same argument, it can be shown that x(k0 + 1)2 < rρ ≤ ρ = x(k0 )2 . Hence x(k0 + n)2 ≤ r n ρ ∀n ≥ 0. For r < 1, ∃n0 ≥ 0 such that r n0 ρ < 1, so s(k) = 0 ∀k ≥ k0 + n0 . For r = 1, since x(k0 + 1)2 = x(k0 )2 only when s(k0 ) = 0 and 0 ≤ x(k0 + 1)2 < x(k0 )2 for s(k0 ) = 0, so ∃n0 ≥ 0 such that s(k) = 0 ∀k ≥ k0 + n0 . This completes the proof.
Theorem 8.1 tells us that overflow does not occur at the steady state if r ≤ 1, even though it may occur during the transient state or oscillation is exhibited at the steady state. This phenomenon is different from that discussed in Chapter 6 in which chaotic behaviors of real digital filters associated with two’s complement arithmetic may occur even though the system matrix is strictly stable. Hence, it can be concluded that the occurrence of nonlinear behaviors of digital filters associated with two’s complement arithmetic depend on the realization of the system. In Chapter 5, the system matrix is realized in the direct form, while in this chapter it is realized in the normal form.
Example 8.2 Consider a complex digital filter associated
with two’s complement arithmetic. 1+j √ Assume that u(k) = 0 ∀k ≥ 0, x(0) = −0.9 −0.8 and a = 2 . Plot the phase portrait of the system. Solution: The system trajectory is shown in Figure 8.1. Although overflow does not occur, the system exhibits oscillation.
Chaotic property Now, let’s consider the case when the system matrix is unstable. Theorem 8.2 For r > 1, there does not exist k0 ∈ Z + ∪ {0}, M ∈ Z + and x(k0 ) ∈ I 2 \{0} such that s(k) = s(k + M) ∀k ≥ k0 . Proof: Suppose ∃k0 ∈ Z + ∪ {0}, M ∈ Z + and x(k0 ) ∈ I 2 \{0} such that s(k) = s(k + M) M−1−j ∀k ≥ k0 . Define v ≡ 2 j=0 AM−1−j s(k0 + j) and D ≡ λ01 λ02 . Let T be a
142
8 Two’s Complement Arithmetic in Complex Digital Filters
0.8
0.6
0.4
x2
0.2
0
⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1
⫺0.8
⫺0.6
⫺0.4
0
⫺0.2
0.2
0.4
0.6
0.8
x1 Figure 8.1 Phase portrait of a first order complex digital filter associated with two’s complement arithmetic.
2 × 2 matrix such that A = TDT−1 . Then we have: x(k0 + kM) = AkM x(k0 ) + 2 & kM λ =T 1 0
kM−1−j # j=0
AkM−1−j s(k0 + j)
⎡ kM 1−λ1 ' M −1 ⎣ T x(k0 ) + T 1−λ1 λkM 2 0 0
0 1−λkM 2 1−λM 2
⎤
⎦T−1 v
(8.5)
∀k ≥ 1. Since M is finite, v is a vector with finite magnitude. Since T and x(k0 ) λkM 0 1 are independent of r, if T 0 λkM T−1 x(k0 ) = 0, then the first term will grow 2 faster than the second will eventually be
kM term because r > 1. As a result, x(k) + φ) 0 T−1 x(k0 ) = r kM ρ cos(kMθ unbounded. As T λ10 λkM sin(kMθ + φ) = 0 for x(k0 ) = 0, so 2
x(k) will eventually unbound. However, x(k) ∈ I 2 ∀k ≥ 0, there is a contradiction. This implies that for r > 1, ∃k0 ∈ Z + ∪ {0}, M ∈ Z + and x(k0 ) ∈ I 2 \{0} such that s(k) = s(k + M) ∀k ≥ k0 , and this completes the proof. Theorem 8.2 says that the symbolic sequences are aperiodic for r > 1 no matter what values of θ and initial conditions are (except when the initial state is at the origin). Hence, chaotic behaviors occur and the trajectory will
143
First Order Complex Digital Filters 1 0.8 0.6 0.4
x2
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0 x1
0.2
0.4
0.6
0.8
1
Figure 8.2 Phase portrait of a first order complex digital filter associated with two’s complement arithmetic.
neither converge to some fixed point nor exhibit limit cycle behavior. This phenomenon is also different from that discussed in Chapter 5, in which the trajectory may converge to some fixed point, or limit cycle behavior may occur even though the eigenvalues of the system matrices are unstable. The importance of Theorems 8.1 and 8.2 is that they provide information for engineers to avoid or utilize chaotic behavior because chaotic behavior can be guaranteed to be avoided if the system matrix is strictly or marginally stable and occurs if the system matrix is unstable. Also, these behaviors are independent of the initial condition (except in the case of the zero initial condition). Example 8.3 Consider a first order complex digital filter associated complement
with two’s √ −0.9 arithmetic. Assume that u(k) = 0 ∀k ≥ 0, x(0) = −0.8 and a = 2(1 + j). Plot the phase portrait of the system. Solution: The system trajectory is shown in Figure 8.2. As can be seen from Figure 8.2, chaotic behavior occurs.
144
8 Two’s Complement Arithmetic in Complex Digital Filters
SECOND ORDER COMPLEX DIGITAL FILTERS System model Now consider the following second order difference equation: y(k) + ay(k − 1) + by(k − 2) = u(k)
∀k ≥ 0,
(8.6)
where a and b are complex numbers and u(k) = 0 ∀k ≥ 0. Let breal and bimag be, respectively, the real and imaginary parts of b. Then we have: yreal (k) + areal yreal (k − 1) − aimag yimag (k − 1) + breal yreal (k − 2) − bimag yimag (k − 2) = 0
(8.7)
∀k ≥ 0 and
yimag (k) + aimag yreal (k − 1) + areal yimag (k − 1) + bimag yreal (k − 2)
∀k ≥ 0.
+ breal yimag (k − 2) = 0
(8.8)
Define x(k) ≡ [x1 (k) x2 (k) x3 (k) x4 (k)]T ≡ [yreal (k − 2) yreal (k − 1) yimag (k − 2) yimag (k − 1)]T ;
the second order complex digital filter associated with two’s complement arithmetic can be represented by the following state space equation: x(k + 1) = Ax(k) + 2Bs(k) ∀k ≥ 0,
where ⎡
⎡ ⎤ 0 1 0 0 0 ⎢ −breal −areal bimag aimag ⎥ ⎢1 ⎥, B ≡ ⎢ A≡⎢ ⎣ 0 ⎣0 0 0 1 ⎦ 0 −bimag −aimag −breal −areal
⎤ 0 0⎥ ⎥ 0⎦ 1
(8.9)
&
' s1 (k) and s(k) ≡ . s2 (k)
Example 8.4 Consider a second order complex digital filter associated with two’s complement √ and b = 1√+ j . Calculate the arithmetic. Assume that u(k) = 0 ∀k ≥ 0, a = 1+j 2 3 state space matrices of the system. Solution:
⎡
0 ⎢− √1 ⎢ 3 A=⎢ ⎣ 0 − √1 3
1 − √1 2 0 − √1 2
0
⎤
0
√1 3
0 − √1
3
⎡
0 ⎥ ⎢1 ⎥ ⎥ and B = ⎢ ⎣0 1 ⎦ 1 0 −√ √1 2
2
⎤ 0 0⎥ ⎥. 0⎦ 1
145
Second Order Complex Digital Filters
Linear property It is worth noting that the system matrix A is neither represented in the direct form nor in the normal form. Let the eigenvalues of A be λi , for i = 1, 2, 3, 4. Then it can be shown easily that:
λ1 =
λ2 =
λ3 =
aimag j − areal +
aimag j − areal −
6
2 − a2 areal imag − 4breal − 2jareal aimag + 4jbimag
2
(8.10)
6 2 − a2 areal imag − 4breal − 2jareal aimag + 4jbimag 2
,
,
(8.11) 6 2 − a2 −aimag j − areal + areal imag − 4breal + 2jareal aimag − 4jbimag 2
(8.12)
and
λ4 =
−aimag j − areal −
6
2 − a2 areal imag − 4breal + 2jareal aimag − 4jbimag
2
. (8.13)
In this chapter we are only consider the case when |λi | = 1 for i = 1, 2, 3, 4. This implies that θ1 ∈ [−π, π] and θ2 ∈ [−π, π] exists, such that the set of eigenvalues {λ1 , λ2 , λ3 , λ4 } can be represented by the set {e jθ 1 , e−jθ1 , e jθ2 , e−jθ2 }. Assuming that A is diagonalizable, then a real matrix T ≡ TT31 TT24 and another
θ1 sin θ1 real matrix R ≡ R01 R02 exist, such that A = TRT−1 , R1 ≡ −cos sin θ1 cos θ1 ,
θ2 sin θ2 R2 ≡ −cos sin θ2 cos θ2 and x(n) = An x(0) + 2
n−1 # k=0
An−k−1 Bs(k) ∀n ≥ 1.
(8.14)
Theorem 8.3 If s(k) = 0 ∀k ≥ 0, then by plotting the phase portraits xi (k) against xj (k) for i = j, there are two ellipses centered at the origin exhibited on the phase portraits.
146
8 Two’s Complement Arithmetic in Complex Digital Filters
Proof: Since T
−1
&
−1 −1 −T−1 3 T4 (T2 − T1 T3 T4 ) = −1 −1 (T2 − T1 T3 T4 )
−1 −1 −T−1 1 T2 (T4 − T3 T1 T2 ) −1 −1 (T4 − T3 T1 T2 )
'
(8.15)
and s(k) = 0 ∀k ≥ 0, then
* ) T2 R2k p1 − T1 R1k p2 x(k) = , T4 R2k p1 − T3 R1k p2
(8.16)
where −1 −1 p1 ≡ (T2 −T1 T−1 [x1 (0) x2 (0)]T + (T4 −T3 T−1 [x3 (0) x4 (0)]T 3 T4 ) 1 T2 ) (8.17) and −1 −1 T p2 ≡ T−1 3 T4 (T2 − T1 T3 T4 ) [x1 (0) x2 (0)] −1 −1 + T−1 1 T2 (T4 − T3 T1 T2 ) [x3 (0)
x4 (0)]T .
(8.18)
Since p1 and p2 are real vectors, R1 and R2 are rotation matrices, and each of the signals xi (k) for i = 1, 2, 3, 4 is a superposition of two sinusoidal signals. Hence, by plotting the phase portrait xi (k) against xj (k) for i = j, there are two ellipses centered at the origin. And this completes the proof. As the orientations of the ellipses depend on the matrices Ti , the orientations of these two ellipses may be different. Example 8.5 Consider a second order complex digital filter associated with two’s complement arithmetic. Assume that u(k) = 0 ∀k ≥ 0, x(0) = [0.1 0.2 −0.2 −0.1]T , a = 0.5j and b = −1. Plot the phase portrait of the system. Solution: The system trajectory is shown in Figure 8.3. It can be seen from the figure that chaotic behavior occurs. Limit cycle behavior Assume that there exists M ∈ Z + such that s(k) = s(k + M) ∀k ≥ 0. Let x0∗ ≡ 2(I − AM )−1
M−1 # j=0
AM−1−j Bs( j),
(8.19)
147
Second Order Complex Digital Filters
0.2
0.2
0.2
0 ⫺0.2
x4
0.4
x3
0.4
x2
0.4
0
⫺0.2
⫺0.2
⫺0.4 ⫺0.4 ⫺0.2
0
0.2
⫺0.4 ⫺0.4 ⫺0.2
0.4
0
x1
0
0.2
⫺0.4 ⫺0.4 ⫺0.2
0.4
x1
(a)
(b)
0.2
0.2 x4
0.2 x4
0.4
x3
0.4
⫺0.2
0
0
0.2
⫺0.4 ⫺0.4 ⫺0.2
0.4
x2
0.2
0.4
0
0
0.2
⫺0.4 ⫺0.4 ⫺0.2
0.4
x2
(d)
0.4
⫺0.2
⫺0.2
⫺0.4 ⫺0.4 ⫺0.2
0.2
(c)
0.4
0
0 x1
(e)
0 x3
(f)
Figure 8.3 Phase portrait of a second order complex digital filter associated with two’s complement arithmetic.
∗ xi+1 ≡ Axi∗ + 2Bs(i) for i = 0, 1, . . . , M − 2
(8.20)
and xˆ i (k) ≡ T−1 (x(kM + i) − xi∗ ) for i = 0, 1, . . . , M − 1 and ∀k ≥ 0. (8.21) Then xˆ i (k + 1) = RM xˆ i (k) for i = 0, 1, . . . , M − 1 and ∀k ≥ 0.
(8.22)
This implies that x(kM + i) = TRkM xˆ i (0) + xi∗ for i = 0, 1, . . . , M − 1 and ∀k ≥ 0. The trajectories x(k) can be grouped into M sub-trajectories x(kM + i) for i = 0, 1, . . . , M − 1. Denoting x(kM + i) = [x1 (kM + i)]
x2 (kM + i) x3 (kM + i) x4 (kM + i)]T (8.23)
for i = 0, 1, . . . , M − 1 and ∀k ≥ 0, and ∗ xi∗ = [xi,1
∗ xi,2
∗ xi,3
∗ T xi,4 ]
for i = 0, 1, . . . , M − 1,
(8.24)
the plot of the phase portraits of the sub-trajectory xm (kM + i) against xn (kM + i) ∗ ∗ ]T exhibited on the phase for m = n consist of two ellipses centered at [xi,m xi,n
8 Two’s Complement Arithmetic in Complex Digital Filters
1
1
0.5
0.5
0.5
0 ⫺0.5 ⫺1 ⫺1 ⫺0.5
0 x1
0.5
⫺1 ⫺1 ⫺0.5
1
0
⫺0.5
0 x1
0.5
⫺1 ⫺1 ⫺0.5
1
(b)
1
0.5
0.5
0.5
0
0
0
⫺1 ⫺1 ⫺0.5
x4
1
⫺0.5
⫺0.5
0 x2
0.5
⫺1 ⫺1 ⫺0.5
1 (e)
0 x1
0.5
1
0 x3
0.5
1
(c)
1
x4
x3
0 ⫺0.5
(a)
(d)
x4
1
x3
x2
148
⫺0.5
0 x2
0.5
⫺1 ⫺1 ⫺0.5
1 (f)
Figure 8.4 Phase portrait of a second order complex digital filter associated with two’s complement arithmetic.
portraits. And, the plots of the phase portraits of the trajectory xm (k) against xn (k) for m = n consist of no more than 2 M ellipses exhibited on the phase portraits. Compared to the case of second order real digital filters associated with two’s complement arithmetic, there are exactly M ellipses exhibited on the phase portrait. Since xi∗ = xj∗ for i = j, these ellipses are distinct. However, where complex digital filters associated with two’s complement arithmetic exist, it is found that some of the ellipses ‘overlapped’ in the plot of phase portraits of xi (k) against xj (k) for i = j. These ‘overlapped’ ellipses will also correspond to different ellipses in the other plots of the phase portraits of xm (k) against xn (k), where m = n and m, n ∈ {i, j}. For example, when areal = 0, aimag = 0.5, breal = −1, bimag = 0 and x(0) = [−0.616 0.616 0.616 −0.616]T , M = 20. However, by plotting the phase portraits of x1 (k) against x2 (k), and that of x3 (k) against x4 (k), there are only 12 ellipses exhibited on the phase portraits as shown in Figure 8.4. Example 8.6 Consider a second order complex digital filter associated with two’s complement arithmetic. Assume that u(k) = 0 ∀k ≥ 0, x(0) = [−0.616 0.616 0.616 −0.616]T ,
149
1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2 s1(k)
s1(k)
Second Order Complex Digital Filters
0
0
⫺0.2
⫺0.2
⫺0.4
⫺0.4
⫺0.6
⫺0.6
⫺0.8
⫺0.8
⫺1
0
20
40
60
80
⫺1
100
(a)
0
20
40
60
80
100
Clock cycle k
Clock cycle k (b)
Figure 8.5 Responses of symbolic sequences of a second order complex digital filter associated with two’s complement arithmetic.
a = 0.5j and b = −1. Plot the responses of the symbolic sequences of the system and what are the periods of them? Solution: The responses of the symbolic sequences of the system are shown in Figure 8.5. As can be seen from Figure 8.5, both s1 (k) and s2 (k) are period 20. Chaotic behavior When s(k) is aperiodic, fractal behaviors may exhibit on some phase variables, at the same time, irregular chaotic behaviors may occur in other phase variables. For example, when areal = 0, aimag = 0.5, breal = −1, bimag = 0 and x(0) = [−0.6135 0.6135 0.6135 −0.6135]T , when x1 (k) is plotted against x4 (k) or x2 (k) is plotted against x3 (k), then fractal patterns may exhibit on these phase portraits. However, random-like chaotic patterns are exhibited on the phase portraits plotting other phase variables as shown in Figure 8.6. This phenomenon is also different from that of second order real digital filters associated with two’s complement arithmetic, in which only fractal patterns are
8 Two’s Complement Arithmetic in Complex Digital Filters
1
1
0.5
0.5
0.5
0
0
0
⫺0.5 ⫺1 ⫺1 ⫺0.5
⫺0.5
⫺0.5
0 x1
0.5
⫺1 ⫺1 ⫺0.5
1
(a)
0 x1
0.5
⫺1 ⫺1 ⫺0.5
1
(b)
1
0.5
0.5
0.5
0
0
0
⫺1 ⫺1 ⫺0.5 (d)
x4
1
⫺0.5
0.5
⫺1 ⫺1 ⫺0.5
1 (e)
0.5
1
0 x3
0.5
1
⫺0.5
⫺0.5
0 x2
0 x1
(c)
1
x4
x3
x4
1
x3
x2
150
0 x2
0.5
⫺1 ⫺1 ⫺0.5
1 (f)
Figure 8.6 Phase portrait of a second order complex digital filter associated with two’s complement arithmetic.
exhibited on the phase portrait. This is because there are only two state variables in the system. Example 8.7 Consider a second order complex digital filter associated with two’s complement arithmetic. Assume that u(k) = 0 ∀k ≥ 0, x(0) = [−0.6135 0.6135 0.6135 −0.6135]T , a = 0.5j and b = −1. Plot the frequency spectra of the symbolic sequences of the system. Are they periodic? Solution: The frequency spectra of the symbolic sequences of the system are shown in Figure 8.7. As can be seen from Figure 8.7, both s1 (k) and s2 (k) are aperiodic. SUMMARY In this chapter nonlinear behaviors of both first and second order complex digital filters associated with two’s complement arithmetic are presented. If the eigenvalues of the system matrix of first order digital filters are inside or on the
151
Exercises
300
300
250
250
200
200 |S2(ω)|
350
|S1(ω)|
350
150
150
100
100
50
50
0 ⫺4
⫺2
0
2
0 ⫺4
4
Frequency ω (a)
⫺2
0
2
4
Frequency ω (b)
Figure 8.7 Frequency spectra of symbolic sequences of a second order complex digital filter associated with two’s complement arithmetic.
unit circle, then overflow does not occur at the steady state. If the eigenvalues are outside the unit circle, then chaotic behavior occurs. Hence, chaotic behaviors can be avoided or utilized easily. EXERCISES 1. Consider a second order complex digital filter associated with two’s complement arithmetic. Assume that u(k) = 0 ∀k ≥ 0, x(0) = [0.9 0.8 −0.9 −0.8]T , a = 0.1 + 0.5j and b = −0.8 + 0.1j. Does the system matrix stabilize? Plot the state trajectory of the system. 2. Consider a second order complex digital filter associated with two’s complement arithmetic. Assume that u(k) = 0 ∀k ≥ 0, x(0) = [0.9 0.8 −0.8 −0.9]T , a = −0.01 + 0.5j and b = −0.99 − 0.01j. Does the system matrix stabilize? Plot the state trajectory of the system. 3. Consider a second order complex digital filter associated with two’s complement arithmetic. Assume that u(k) = 0 ∀k ≥ 0, x(0) = [0.9 0.8 −0.8 −0.9]T , a = 0.01 + 0.5j and b = −1.01 + 0.01j. Does the system matrix stabilize? Plot the state trajectory of the system.
9 QUANTIZATION AND TWO’S COMPLEMENT ARITHMETIC IN DIGITAL FILTERS
Throughout Chapters 5 to 8 we assume that signals are implemented via an infinite state machine. However, in a real situation signals are implemented via a finite state machine. Hence, the nonlinearity function of the two’s complement arithmetic for a real situation is not smooth within the no overflow region. Instead, the nonlinear function is a periodic staircase function. In this chapter nonlinear behavior, due to both the quantization and two’s complement arithmetic, is presented. NONLINEAR BEHAVIORAL DIFFERENCES OF FINITE AND INFINITE STATE MACHINES System model A block diagram for a second order digital filter associated with both quantization and two’s complement arithmetic is shown in Figure 9.1, where the input–output characteristic of L bit two’s complement arithmetic function is shown in Figure 9.2. Nonlinear behavior Theoretically, chaotic behavior could not occur in the finite state machine because the state vectors would eventually be periodic. However, if the number of states of the machine is large enough and the period is very long, then the system may exhibit near chaotic behaviors and the phase portrait may visually exhibit a near fractal pattern if chaotic behavior is exhibited in the corresponding infinite state machine for the same filter parameters and initial conditions. L. O. Chua and T. Lin (Chaos in Digital Filters, IEEE Transactions on Circuits and Systems, Vol. 35, no. 6, pp. 648–658, 1988) found that if the finite 152
Input u(k) ⫽ 0
⫹
Output y(k)
fL(⭈) Delay z ⫺1 a ⫽ 0.5
⫻
fL(⭈)
⫹
Delay z ⫺1 b ⫽ ⫺1
⫻
fL(⭈)
⫻ ⫹ fL(⭈)
⫽ Ideal multiplier ⫽ Ideal adder ⫽ 2⬘ complement L-bit quantizer
Figure 9.1 Block diagram for a second order digital filter associated with both quantization and two’s complement arithmetic.
fL(v )
2⫺L⫹1 v
2⫺L⫹1
Figure 9.2 Input output characteristic of L bit two’s complement arithmetic function.
154
9 Quantization and Two’s Complement Arithmetic in Digital Filters
1
Nonlinear: Phaser diagram for b ⫽ ⫺1, a ⫽ 0.5, x ⫽ [⫺0.6124 0.6123] 31 bits
0.8 0.6 0.4
x2
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0 x1
0.2
0.4
0.6
0.8
1
Figure 9.3 State trajectory of a 31 bit second order digital filter associated with two’s complement arithmetic.
state machine has at least 16 bits, then for the same filter parameters and initial conditions there is visually indistinguishable on the phase portraits between an infinite and finite state machine when chaotic behavior is exhibited in the corresponding infinite state machine. On the other hand, if linear or limit cycle behaviors are exhibited in the corresponding infinite state machine, one would intuitively expect that for the same filter parameters and initial conditions the finite state machine would also exhibit linear or limit cycle behaviors. However, this intuitive expectation is not true and a counter intuitive phenomenon is stated in the following observation. Observation 9.1 A finite state machine may exhibit a near chaotic behavior even when its corresponding infinite state machine does not exhibit any chaotic behavior. To illustrate this phenomenon, a 31 bit second order digital filter associated with two’s complement arithmetic is employed as an illustration of an infinite state machine because a second order digital filter with at least 16 bits is enough for the representation of a near chaotic behavior. Figure 9.3 shows that the 31 bit second
155
Nonlinear Behavioral Differences of Finite and Infinite State Machines
1
Nonlinear: Phaser diagram for b ⫽ ⫺1, a ⫽ 0.5, x ⫽ [⫺0.6124
0.6123] 16 bits
0.8 0.6 0.4
x2
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0
0.2
0.4
0.6
0.8
1
x1 Figure 9.4 State trajectory of a 16 bit second order digital filter associated with two’s complement arithmetic.
order digital filter associated with two’s complement arithmetic does not exhibit chaotic behavior because a single ellipse is exhibited on the phase plane. Since a second order digital filter with at least 16 bits is enough for the representation of near chaotic behavior, Figure 9.4 shows the phase portrait of the 16 bit second order digital filter associated with two’s complement arithmetic for the same filter parameters and initial conditions. As can be seen from Figure 9.4, a near chaotic behavior is exhibited on the phase plane. Similarly, Figure 9.5 shows the phase portrait of the 13 bit second order digital filter associated with two’s complement arithmetic for the same filter parameters and initial conditions. As can be seen from Figure 9.5, a near chaotic behavior is also exhibited on the phase plane. Hence, these examples illustrate that the intuitive expectation is not true. Example 9.1 Consider a 16 bit second order digital filter associated with two’s complement arithmetic. Assume that a = 0.5, b = −1 and x(0) = [−0.6135 0.6135]T . Plot the state trajectory of the system.
156
9 Quantization and Two’s Complement Arithmetic in Digital Filters
1
Nonlinear: Phaser diagram for b ⫽ ⫺1, a ⫽ 0.5, x ⫽ [⫺0.6124 0.6123] 13 bits
0.8 0.6 0.4
x2
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0
0.2
0.4
0.6
0.8
1
x1 Figure 9.5 State trajectory of a 13 bit second order digital filter associated with two’s complement arithmetic.
Solution: The system trajectory is shown in Figure 9.6. As can be seen from Figure 9.6, the system exhibits a near chaotic behavior because there is visually indistinguishable on the phase portraits between an infinite and finite state machine if chaotic behaviors are exhibited in the corresponding infinite state machine and the finite state machine has at least 16 bits for the implementation. NONLINEAR BEHAVIOR OF UNSTABLE SECOND ORDER DIGITAL FILTERS For the infinite state machine, when the filter parameters (a, b) are in the set {(a, b) : |a| > 2 and b = −1}, the phase portrait exhibits a dense countable set of discontinuous lines, and shows a random-like chaotic pattern, illustrating that the state vector x(k) is aperiodic. One typical example is that when a = 3 and b = −1, the infinite state machine will correspond to the Arnold Sinai cat map. When the filter parameters (a, b) are in the set {(a, b) : (b = a + 1 and |b| > 1) or (b = −a + 1 and |b| > 1)}, the phase portrait of the infinite state machine would exhibit some straight lines on the phase plane and
157
Nonlinear Behavior of Unstable Second Order Digital Filters
1 0.8 0.6 0.4
x2
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0 x1
0.2
0.4
0.6
0.8
1
Figure 9.6 State trajectory of a 16 bit second order digital filter associated with two’s complement arithmetic.
the state vector x(k) is aperiodic for most of the initial conditions. These examples illustrate that when the filter parameters (a, b) are on the extended boundaries of the stability triangle, that is, {(a, b) : (|a| > 2 and b = −1) or (b = a + 1 and |b| > 1) or (b = −a + 1 and |b| > 1)}, then the state vector x(k) of the infinite state machine is aperiodic for most of the initial conditions because one of the eigenvalues of the system matrix has a magnitude greater than one. However, for the finite state machine, chaotic and aperiodic behaviors would not occur due to the finite wordlength effect. The question, therefore, is: what are the behaviors of an unstable second order digital filter associated with both quantization and two’s complement arithmetic? Some nonlinear behaviors of this type of system is discussed in Section 9.3.2. Observation 9.2 For a high bit second order digital filter associated with two’s complement arithmetic, if (i) b = −1 and |a| = 2n + 21n where n ∈ Z \ {0}, or (ii) b = a + 1, |b| > 1 and a is an odd number, or (iii) b = −a + 1, |b| > 1 and a is an odd number,
9 Quantization and Two’s Complement Arithmetic in Digital Filters
1 0.8 0.6 0.4 0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1
1 0.5 x2
x2
158
⫺0.5
⫺0.5
0 x1
0.5
⫺0.5
0
0.5
1
0.5
1
x1 (b)
1
1
0.5
0.5
0
0
x2
x2
⫺1 ⫺1
1
(a)
⫺0.5 ⫺1 ⫺1
⫺0.5
⫺0.5
0
0.5
⫺1 ⫺1
1
x1 (c)
0
⫺0.5
0 x1
(d)
Figure 9.7 Phase portraits of high bit second order digital filters associated with two’s complement arithmetic when b = −1, x(0) = [0.1 0.2]T and different values of a. (a) a = 2.5; (b) a = −4.25; (c) a = 3; (d) a = 4.
then ∃k0 ∈ Z++ ∪ {0} and ∃M ∈ Z+ such that x(k + M) ≈ x(k) ∀k ≥ k0 and ∀x(0) ∈ I 2 ≡ x(k) :−1 ≤ x1 (k) < 1 and −1 ≤ x2 (k) < 1, where x(k) = xx12 (k) (k) . Figure 9.7 shows the phase portraits of this type of systems when b = −1, initial 0.1 condition x(0) = 0.2 and with different values of a. As can be seen from Figure 9.7, the number of points in the phase portrait when a = 2.5 or a = −4.25 is much less than that of the case when a = 3 or a = 4. One can verify that when a = 2.5, x(k + 214) ≈ x(k) ∀k ≥ 163, and when a = −4.25, x(k + 54) ≈ x(k) ∀k ≥ 191. Because of this quasi periodic property, the state vector x(k) will be found in a very small neighborhood of the same point on the phase plane after one period, so the phase portrait only shows a finite number of different points. However, there is no such quasi periodic property when a = 3 or a = 4. Instead, there is an infinite amount of points on the phase portrait and a random-like chaotic pattern is exhibited.
159
1
4
0.5
2 s(k)
x2
Nonlinear Behavior of Unstable Second Order Digital Filters
0 ⫺0.5 ⫺1 ⫺1
⫺2 ⫺0.5
0 x1
0.5
⫺4
1
0
20
40
60
80
100
Time index k
(a)
(b) 1
2
0.5
1 s(k)
x2
0
0 ⫺0.5 ⫺1 ⫺1
0 ⫺1
⫺0.5
0 x1
0.5
⫺2
1
(c)
0
20
40 60 Time index k
80
100
0
20
40 60 Time index k
80
100
(d) 1
5 s(k)
x2
0.5 0
0
⫺0.5 ⫺1 ⫺1 (e)
⫺0.5
0 x1
0.5
⫺5
1 (f)
Figure 9.8 Phase portraits and symbolic sequences of high bit second order digital filters associated with two’s complement arithmetic when b = a + 1, x(0) = [0.1 0.2]T and different values of a. (a) phase portrait when a = 4; (b) symbolic sequences when a = 4; (c) phase portrait when a = 3; (d) symbolic sequences when a = 3; (e) phase portrait when a = 5; (f) symbolic sequences when a = 5.
Similarly, Figure 9.8 shows the phase portrait and the symbolic sequences of such a system with the same initial condition as those in Figure 9.7, but now b = a + 1 and with different values of a. As can be seen from Figure 9.8, when a = 3 or a = 5, the symbolic sequences become zero and only a finite number of points are on the straight lines of the phase portrait. One can verify that when a = 3, x(k + 2) ≈ x(k) ∀k ≥ 28, and when a = 5, x(k + 2) ≈ x(k) ∀k ≥ 90. On the other hand, there is no such quasi periodic property when a = 4. Hence, there is an infinite amount of points on those straight lines of the phase portrait. For b = −a + 1, a similar phenomenon is obtained, as shown in Figure 9.9. It is worth noting that the above phenomenon is true for such systems regardless of the initial conditions. Figure 9.10 shows the phase portrait of such a system
9 Quantization and Two’s Complement Arithmetic in Digital Filters
1
4
0.5
2 s(k)
x2
160
0
⫺2
⫺0.5 ⫺1 ⫺1
0
⫺0.5
0
0.5
⫺4
1
0
20
x1
1
3
0.5
2
0
80
100
⫺1 ⫺1
80
100
80
100
1 0
⫺0.5 ⫺0.5
0
0.5
⫺1
1
0
20
40
60
Time index k
x1 (c)
(d) 1
4
0.5
2 s(k)
x2
60
(b)
s(k)
x2
(a)
0 ⫺0.5 ⫺1 ⫺1
⫺0.5
0
0.5
0 ⫺2 ⫺4 ⫺6
1
0
20
40
60
Time index k
x1 (e)
40
Time index k
(f)
Figure 9.9 Phase portraits and symbolic sequences of high bit second order digital filters associated with two’s complement arithmetic when b = −a + 1, x(0) = [0.1 0.2]T and different values of a. (a) phase portrait when a = −4; (b) symbolic sequences when a = −4; (c) phase portrait when a = −3; (d) symbolic sequences when a = −3; (e) phase portrait when a = −5; (f) symbolic sequences when a = −5.
when b = −1, a = 2.5 and with different initial conditions generated by a random number generator. As can be seen from Figure 9.10, the state vector x(k) converges to a quasi periodic orbit for those initial conditions. A similar phenomenon has been observed in the case of b = a + 1 and a = 3, or b = −a + 1 and a = −3, as shown in Figures 9.11 and 9.12, respectively. Observation 9.3 For the high bit second order digital filters with two’s complement arithmetic, if b = −1 and |a| = 2n + 21n where n ∈ {−3, −2, −1, 1, 2, 3, 4}, then a new pattern, which looks like a rotated letter ‘X’, is exhibited on the phase portrait, no matter what the values of the initial conditions are. The center of the rotated letter is located at the origin, and the slopes of the
161
1
1
0.5
0.5 x2
x2
Nonlinear Behavior of Unstable Second Order Digital Filters
0 ⫺0.5 ⫺1 ⫺1
0 ⫺0.5
⫺0.5
0
0.5
⫺1 ⫺1
1
⫺0.5
x1
0.5
1
0.5
1
(b) 1
1
0.5
0.5 x2
x2
(a)
0 ⫺0.5 ⫺1 ⫺1
0 ⫺0.5
⫺0.5
0
0.5
⫺1 ⫺1
1
x1 (c)
0 x1
⫺0.5
0 x1
(d)
Figure 9.10 Phase portraits of high bit second order digital filters associated with two’s complement arithmetic when b = −1, a = 2.5 and different initial conditions. (a) x(0) = [−0.7222 −0.4556]T ; (b) x(0) = [−0.5945 −0.6024]T ; (c) x(0) = [−0.6026 −0.9625]T ; (d) x(0) = [0.2076 0.4936]T .
‘straight lines’ of the rotated letter ‘X’ are equal to the values of the pole locations. Figures 9.7 and 9.10 show examples in which a rotated letter ‘X’ is exhibited on the phase portrait centered at the origin and with slopes of the ‘straight lines’ being the values of the pole locations. Example 9.2 Consider a high bit second order digital filter associated with two’s complement arithmetic. Assume that a = 8.125, b = −1 and x(0) = [−0.6135 0.6135]T . Plot the state trajectory of the system. Solution: The system trajectory is shown in Figure 9.13. As can be seen from Figure 9.13, the system exhibits a quasi periodic behavior, so the phase portrait only shows a finite number of different points.
162
9 Quantization and Two’s Complement Arithmetic in Digital Filters 3
1
2 1
0
s(k)
x2
0.5
⫺0.5 ⫺1 ⫺1
0 ⫺1
⫺0.5
0
0.5
⫺2
1
0
10
x1
1
50
60
50
60
50
60
3 2 1
0
s(k)
x2
40
(b)
0.5
⫺0.5 ⫺1 ⫺1
0 ⫺1 ⫺2
⫺0.5
0
0.5
⫺3
1
0
10
x1
20
30
40
Time index k (d)
(c) 1
3 2
0.5
1
0
s(k)
x2
30
Time index k
(a)
⫺0.5 ⫺1 ⫺1
0 ⫺1 ⫺2
⫺0.5
0
0.5
⫺3
1
x1 (e)
20
0
10
20
30
40
Time index k (f)
Figure 9.11 Phase portraits of high bit second order digital filters associated with two’s complement arithmetic when a = 3, b = a + 1 and different initial conditions. (a) x(0) = [−0.5947 −0.9607]T ; (b) x(0) = [0.3443 0.3626]T ; (c) x(0) = [0.6762 −0.2410]T .
NONLINEAR BEHAVIORS OF DIGITAL FILTERS WITH ARBITRARY ORDERS AND INITIAL CONDITIONS Chaotic behavior may occur in a third order digital filter associated with two’s complement arithmetic when an infinite number of bits are employed for the representation and the dynamics of the third order system is more complicated than that of the second order system (see Chapter 6). Intuitively, when the order of the digital filter associated with two’s complement arithmetic increases, the dynamics of the system should be more complicated, and chaotic behaviors would be expected for infinite state machines; in particular, when some of the eigenvalues of the system matrix is unstable. However, when
163
1
2
0.5
1
0
0
s(k)
x2
Nonlinear Behaviors of Digital Filters
⫺0.5
⫺1
⫺1 ⫺1
⫺0.5
0
0.5
⫺2
1
0
10
x1
40
50
60
50
60
50
60
(b) 1
3 2
0.5
1
0
s(k)
x2
30
Time index k
(a)
⫺0.5
0 ⫺1 ⫺2
⫺1 ⫺1
⫺0.5
0
0.5
⫺3
1
0
10
20
30
40
Time index k
x1 (c)
(d) 1
2 1
0.5
0 0
s(k)
x2
20
⫺0.5
⫺1 ⫺2
⫺1 ⫺1
⫺0.5
0
0.5
⫺3
1
x1 (e)
0
10
20
30
40
Time index k (f)
Figure 9.12 Phase portraits of high bit second order digital filters associated with two’s complement arithmetic when a = −3, b = −a + 1 and different initial conditions. (a) x(0) = [0.6636 −0.1422]T ; (b) x(0) = [0.0056 −0.3908]T ; (c) x(0) = [0.4189 −0.6207]T .
only finite number of bits is employed for the representation, then chaotic behavior could not occur. We can then ask: what are the behaviors of a high order digital filter associated with both quantization and two’s complement arithmetic? Some nonlinear behaviors of this type of system is discussed below. System model Consider a high bit Nth order digital filter associated with two’s complement arithmetic as follows: xj (k + 1) = xj+1 (k)
for j = 1, 2, . . . , N − 1 and ∀k ≥ 0.
(9.1)
164
9 Quantization and Two’s Complement Arithmetic in Digital Filters
1 0.8 0.6 0.4 0.2 x2
0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
0 x1
⫺0.2
0.2
0.4
0.6
0.8
1
Figure 9.13 Phase portrait of a high bit second order digital filter associated with two’s complement arithmetic.
and ⎛
xN (k + 1) = f ⎝
N # j=1
where
⎞
aj xj (k)⎠ =
f (v) = v − 2n
and
j=1
aj xj (k) + 2s(k) ∀k ≥ 0,
such that −1 ≤ f (ν) < 1 and n ∈ Z,
aj ∈ ℜ
−1 ≤ xj (k) < 1
N #
for j = 1, 2, . . . , N,
for j = 1, 2, . . . , N and ∀k ≥ 0,
s(k) ∈ {−m, . . . , −1, 0, 1, . . . , m} ∀k ≥ 0,
(9.2)
(9.3) (9.4) (9.5) (9.6)
in which m is the minimum integer satisfying −2m − 1 ≤
N # j=1
aj xj (k) < 2m + 1.
(9.7)
Nonlinear Behaviors of Digital Filters
165
Nonlinear behaviors When all the filter parameters are even numbers, then whatever the initial conditions, the order, and the stability of digital filter are, the state trajectory would converge to the origin. This phenomenon is summarized in Observation 9.4. Observation 9.4 For a high bit digital filter associated with two’s complement arithmetic, if aj is an even number and |xj (0)| < 1 for j = 1, 2, . . . , N, then ∃k0 ∈ Z + ∪ {0} such that xj (k) = 0 and s(k) = 0 ∀k ≥ k0 and for j = 1, 2, . . . , N. If ∃j ∈ {1, 2, . . . , N} such that aj is not an even number, and the system matrix of the high bit digital filter associated with two’s complement arithmetic is unstable, then near chaotic behavior may occur. To explain this phenomenon, the filtering process can be modeled as a sum of Bernoulli shift operations. Assume that the initial condition can be represented in a binary form as follows: P #
|xj (0)| = where
pn,j 2−n ,
(9.8)
n=1
pn,j ∈ {0, 1}
for j = 1, 2, . . . , N,
(9.9)
and P is the number of bits not including the sign bit for the representation of the state variables. Since aj are even numbers, we can let: |aj | =
M #
αn,j 2n ,
(9.10)
for j = 1, 2, · · · , N,
(9.11)
n=1
where αn,j ∈ {0, 1}
and M is the number of bits not including the sign bit for the representation of the filter coefficients. Then we have $$ $% P %% M N N # # # # −n n pn,j 2 αn,j 2 (9.12) aj xj (k) = j=1
j=1
=
N # j=1
where
n=1
n=1
%
sj′ +
P−1 #
$
βi,j 2−i ,
i=1
sj′ ∈ Z+ ∪ {0}.
(9.13) (9.14)
9 Quantization and Two’s Complement Arithmetic in Digital Filters 1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
x2(k)
x1(k)
166
0
⫺0.2
0 ⫺0.2
⫺0.4
⫺0.4
⫺0.6
⫺0.6
⫺0.8
⫺0.8
⫺1
0
50
100
150
200
⫺1
250
0
50
Time index k
150
200
250
(b) 1
6
0.8
5
0.6
4
0.4
3
0.2
2
s(k)
x3(k)
(a)
0
1
⫺0.2
0
⫺0.4
⫺1
⫺0.6
⫺2
⫺0.8 ⫺1
⫺3 0
50
100
150
200
⫺4
250
Time index k (c)
100
Time index k
0
50
100
150
200
Time index k (d)
Figure 9.14 State variables and symbolic sequences of a high bit third order digital filter associated with two’s complement arithmetic when a 1 = −2, a 2 = 4, a 3 = −6 and x(0) = [0.8436 0.4764 −0.6475]T . (a) State variable x 1 (k ); (b) State variable x 2 (k ); (c) State variable x 3 (k ); (d) Symbolic sequence s(k ).
P−1 Since the summation in i=1 βi,j 2−i is from i = 1 to i = P − 1, the most sig′ nificant bit is absorbed in sj after the first iteration, and all the bits will vanish after P iterations. Therefore, the state trajectories will eventually converge to the origin. To demonstrate this observation, Figure 9.14 shows the state variables and symbolic sequence of a high bit third order digital filter associated with two’s complement arithmetic when the filter parameters and the initial conditions are randomly generated from a set of even numbers and the set [−1, 1), respectively. As can be seen from Figure 9.14, when the filter parameters are even numbers, though the system matrix is unstable, the values of the symbolic sequence and the state variables will eventually be zero. Similarly, Figure 9.15 shows the same initial condition as those in Figure 9.14, but the filter parameters deviate slightly. In this case, near chaotic behavior occurs. A similar phenomenon for the fourth order cases are observed is shown in Figures 9.16 and 9.17.
167
1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2 x2(k)
x1(k)
Nonlinear Behaviors of Digital Filters
0
0
⫺0.2
⫺0.2
⫺0.4
⫺0.4
⫺0.6
⫺0.6 ⫺0.8
⫺0.8 ⫺1
0
2000
4000
6000
8000
10000
⫺1
12000
0
2000
4000
Time index k
6000
8000
10000
12000
Time index k
(a)
(b) 6
1 0.8
4
0.6 0.4
2 s(k)
x3(k)
0.2 0
0
⫺0.2 ⫺2
⫺0.4 ⫺0.6
⫺4
⫺0.8 ⫺1
0
2000
4000
6000
8000
10000
⫺6
12000
2000
0
Time index k
4000
6000
8000
10000
Time index k
(c)
(d)
1 0.8 0.6 0.4
x3
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 1 0.5 x2
0 ⫺0.5 ⫺1 ⫺1
⫺0.4 ⫺0.2 ⫺0.8 ⫺0.6
0
0.2
0.4
0.6
0.8
1
x1
(e)
Figure 9.15 State variables, symbolic sequences and phase portrait of a high bit third order digital filter associated with two’s complement arithmetic when a 1 = −1.99, a 2 = 4.01, a 3 = −5.99 and x(0) = [0.8436 0.4764 −0.6475]T . (a) State variable x 1 (k ); (b) State variable x 2 (k ); (c) State variable x 3 (k ); (d) Symbolic sequence s(k ); (e) Phase portrait.
168 1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
x2(k)
x1(k)
9 Quantization and Two’s Complement Arithmetic in Digital Filters
0
0
⫺0.2
⫺0.2
⫺0.4
⫺0.4
⫺0.6
⫺0.6
⫺0.8
⫺0.8
⫺1
0
100
200
300
400
500
⫺1
600
0
100
Time index k
400
500
600
(b) 1
10
0.8
0.8
8
0.6
0.6
6
0.4
0.4
4
0.2
0.2
2
0
s(k)
1
x 4 (k)
x 3 (k)
300
Time index k
(a)
0
0
⫺0.2
⫺0.2
⫺2
⫺0.4
⫺0.4
⫺4
⫺0.6
⫺0.6
⫺6
⫺0.8
⫺0.8
⫺8
⫺1
⫺1
0 100 200 300 400 500 600
Time index k (c)
200
⫺10
0 100 200 300 400 500 600
Time index k (d)
0
100 200 300 400 500
Time index k (e)
Figure 9.16 State variables and symbolic sequences of a high bit fourth order digital filter associated with two’s complement arithmetic when a 1 = −2, a 2 = 4, a 3 = −6, a 4 = 8 and x(0) = [0.6428 −0.1106 0.2309 0.5839]T . (a) State variable x 1 (k ); (b) State variable x 2 (k ); (c) State variable x 3 (k ); (d) State variable x 4 (k ); (e) Symbolic sequence s(k ).
169
1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0
⫺0.2
⫺0.4
⫺0.4
⫺0.6
⫺0.6
⫺0.8
⫺0.8
2000
4000
6000
⫺1 8000
10000 12000
0
2000
4000
(b)
Time index k
6000
10
0.8
0.8
0.8
0.6
0.6
0.6
0.4
0.4
0.4
0.2
0.2
0.2
s(k)
1
0
0
⫺0.2
⫺0.2
⫺0.4
⫺0.4
⫺0.4
⫺0.6
⫺0.6
⫺0.6
⫺0.8
⫺0.8
⫺0.8
⫺1
Time index k
⫺10 0 2000 4000 6000 8000 10000 12000
(d)
10000 12000
0
⫺0.2
0 2000 4000 6000 8000 10000 12000
8000
Time index k
1
x4(k)
x3(k)
0
⫺1
(c)
0
⫺0.2
⫺1
(a)
x2(k)
x1(k)
Nonlinear Behaviors of Digital Filters
Time index k
0
(e)
2000 4000 6000 8000 10000
Time index k
Figure 9.17 State variables and symbolic sequences of a high bit fourth order digital filter associated with two’s complement arithmetic when a 1 = −2.01, a 2 = 4.01, a 3 = −6.01, a 4 = 8.01 and x(0) = [0.6428 −0.1106 0.2309 0.5839]T . (a) State variable x 1 (k ); (b) State variable x 2 (k ); (c) State variable x 3 (k ); (d) State variable x 4 (k ); (e) Symbolic sequence s(k ).
Example 9.3 Consider a high bit second order digital filter associated with two’s complement arithmetic. Assume that a = 0, b = −2 and x(0) = [0.2137 −0.0280]T . Plot the state and symbolic responses of the system.
9 Quantization and Two’s Complement Arithmetic in Digital Filters 1
1
0.8
0.8
0.8
0.6
0.6
0.6
0.4
0.4
0.4
0.2
0.2
0.2
0
s1(k)
1
x2(k)
x1(k)
170
0
0
⫺0.2
⫺0.2
⫺0.2
⫺0.4
⫺0.4
⫺0.4
⫺0.6
⫺0.6
⫺0.6
⫺0.8
⫺0.8
⫺0.8
⫺1
0
50
100
150
⫺1
200
Clock cycle k
(a)
0
50
100
150
⫺1
200
Clock cycle k
(b)
0
50
100
150
200
Clock cycle k
(c)
Figure 9.18 State and symbolic responses of a high bit second order digital filter associated with two’s complement arithmetic when a = 0, b = −2 and x(0) = [0.2137 −0.0280]T . (a) State variable x 1 (k ); (b) State variable x 2 (k ); (c) Symbolic sequence s(k ).
Solution: The state and symbolic responses of the system is shown in Figure 9.18. As can be seen from Figure 9.18, even though the system matrix is unstable, both the state and symbolic responses become zero after certain number of iterations.
SUMMARY In this chapter we have looked at the nonlinear behaviors of digital filters associated with both quantization and two’s complement arithmetic. A finite state machine may exhibit a near chaotic behavior. Even for the same filter parameters and initial conditions, its corresponding infinite state machine exhibits linear or limit cycle behaviors. Also, for some filter parameters in the extended boundaries of the stability triangle, the state vector of a high bit digital filter associated with two’s complement arithmetic will converge to a quasi periodic orbit after a number of iterations no matter what the initial conditions are. Hence, a new trajectory pattern, which looks like a rotated letter ‘X’, is exhibited on the phase plane. The center of the rotated letter is located at the origin, and the slopes of the ‘straight lines’ of the rotated letter are equal to the values of the pole locations. Moreover, when all the filter parameters are even numbers, no matter what initial conditions, order and the stability of the system matrix of the system
Exercises
171
are, the symbolic sequences and the state variables of a high bit digital filter associated with two’s complement arithmetic will eventually be zero.
EXERCISES 1. Consider a 13 bit second order digital filter associated with two’s complement arithmetic. Assume that a = 0.5, b = −1 and x(0) = [−0.616 0.616]T . Plot the state trajectory of the system. What is the corresponding behavior if the system is implemented via an infinite state machine? 2. Consider a high bit second order digital filter associated with two’s complement arithmetic. Assume that a = 16.0625 and b = −1. Generate a random initial condition and plot the state trajectory of the system. 3. Consider a high bit second order digital filter associated with two’s complement arithmetic. Assume that a = 2 and b = 4. Generate a random initial condition and plot the state and symbolic responses of the system. Is the system matrix stable? Will the trajectory eventually move to the origin?
10 PROPERTIES AND APPLICATIONS OF DIGITAL FILTERS WITH NONLINEARITIES
In previous chapters techniques for the analysis of digital filters associated with various nonlinearities have been discussed. We now move onto properties and applications of digital filters associated with various nonlinearities are presented. ADMISSIBILITY OF SYMBOLIC SEQUENCES Chapter 6 discusses how the set of initial conditions corresponding to the autonomous or step, responses of a marginally stable second order digital filter associated with two’s complement arithmetic is elliptic if linear or limit cycle behaviors are exhibited. That is, by denoting λ1 and λ2 as the eigenvalues of the system matrix A, if |λi | = 1 ∀i ∈ {1, 2} and imag(λi ) = 0, where imag(·) denotes the imaginary part of a complex number, then the admissible set of periodic symbolic sequences with period M is given by 7 8 M M−1 j=0 s(mod(i + j, M)) cos 2 −j−1 θ s : −1 ≤ <1 in θ sin Mθ 2 for i = 0, 1, . . . , M − 1,
where
θ = cos−1 mod( p, q) denotes the remainder of
p q
a
2
,
(10.1)
(10.2)
and s = (s(0), s(1), . . . ). 172
(10.3)
173
Admissibility of Symbolic Sequences
Since the set of initial conditions corresponding to periodic symbolic sequences is elliptic, the map from the set of initial conditions to the set of symbolic sequences is neither injective nor surjective. However, when the system matrix is unstable, then chaotic behaviors may occur. In this section, the map from the set of initial conditions to the set of symbolic sequences for an unstable system matrix is investigated. We assume that |λ1 | > 1
(10.4)
|λ2 | > 1.
(10.5)
= {s : s(k) ∈ {−m, . . . , −1, 0, 1, . . . , m}}
(10.6)
S : I 2 → .
(10.7)
and
Define
and
Obviously, S is not surjective and the set is not admissible. Theorem 10.1 + Define b ≡ s : +∞ j=n
2s( j) λ1 − λ2
n−j−1
λ2
n−j λ2
then the set b is admissible and Sb :
n−j−1
− λ1 n−j − λ1
∈ I 2 for n = 0, 1, . . .
I 2 → b
is surjective.
-
⊂ ,
Proof: Since ∀s ∈ b , we have:
* ) +∞ −j−1 # 2s( j) λ−j−1 − λ1 2 ∈ I 2. −j −j λ1 − λ 2 λ − λ 2 1 j=n
(10.8)
* ) +∞ −j−1 # 2s( j) λ−j−1 − λ1 2 x(0) = . −j −j λ − λ2 λ2 − λ1 j=n 1
(10.9)
& ' 0 ′ s ( j) 2
(10.10)
Let
Then k
x(k) = A x(0) +
k−1 # j=0
A
k−1−j
174
=
10 Properties and Applications of Digital Filters with Nonlinearities
k−1 # 2(s′ ( j) − s( j)) j=0
λ2 − λ 1
∀k ≥ 0.
⎡ ⎣
k−j−1
− λ1
k−j
− λ1
λ2
λ2
k−j−1
k−j
⎤
⎤ ⎡ k−j−1 k−j−1 +∞ # λ2 − λ1 2s( j) ⎦ + ⎦ ⎣ k−j k−j λ2 − λ 1 λ2 − λ1 j=k (10.11)
Since ) * +∞ k−j−1 # 2s( j) λk−j−1 − λ 2 1 ∈ I2 k−j k−j λ2 − λ1 λ − λ 2 1 j=k
∀k ≥ 0,
(10.12)
|λ1 | > 1
(10.13)
|λ2 | > 1,
(10.14)
and x(k) ∈ I 2
∀k ≥ 0,
(10.15)
we have s′ ( j) = s( j) ∀j ∈ {0, 1, . . . , k − 1} and ∀k ≥ 0.
(10.16)
This implies that s′ = s
(10.17)
S(x(0)) = s ∈ b .
(10.18)
and
Hence, the set b is admissible and Sb : I 2 → b is surjective. This completes the proof. Now consider the injective property of the map Sb : I 2 → b . Theorem 10.2 Sb : I 2 → b is injective. Proof: Let
x1 (0), x2 (0) ∈ I 2 .
(10.19)
x1 (0) = x2 (0)
(10.20)
Assume that
175
Admissibility of Symbolic Sequences
and Sb (x1 (0)) = Sb (x2 (0)) = s ∈ b .
(10.21)
Since 1
k 1
x (k) = A x (0) +
k−1 #
& ' 0 s( j) 2
∀k ≥ 0
(10.22)
& ' 0 s (j) 2
∀k ≥ 0,
(10.23)
k−1−j
A
j=0
and 2
k 2
x (k) = A x (0) +
k−1 # j=0
A
k−1−j
we have x1 (k) − x2 (k) = Ak (x1 (0) − x2 (0)) ∀k ≥ 0.
(10.24)
|λ1 | > 1
(10.25)
|λ2 | > 1,
(10.26)
Since
and x1 (k), x2 (k) ∈ I 2
∀k ≥ 0,
(10.27)
we have x1 (0) = x2 (0).
(10.28)
This contradicts equation (10.20). Hence, Sb is injective and it completes the proof.
Theorem 10.3 According to Theorem 10.1 and Theorem 10.2, Sb is bijective. Proof: The proof follows directly from Theorem 10.1 and Theorem 10.2. Since Sb is bijective, then given s ∈ b , what is the corresponding initial condition and the state response?
176
10 Properties and Applications of Digital Filters with Nonlinearities
Theorem 10.4 Define Tb : b → I 2 ,)then Tb is bijective * and −j−1 −j−1 − λ1 λ2 2s( j) = x(0). Tb (s) = +∞ −j −j j=0 λ1 −λ2 λ2 − λ1 Proof: By applying similar methods in Theorem 10.1 and Theorem 10.2, we can easily prove that Tb is bijective. To show * ) +∞ −j−1 # 2s( j) λ−j−1 − λ1 2 Tb (s) = , (10.29) −j −j λ − λ2 λ2 − λ1 j=0 1 since ∀x(0) ∈ I 2 , we have k
x(k) = A x(0) +
k−1 #
& ' 0 s( j) 2
k−1−j
A
j=0
∀k ≥ 0.
(10.30)
This implies that −1 k
x(0) = (A
) x(k) −
k−1 #
−1−j
A
j=0
& ' 0 s (j) 2
∀k ≥ 0.
(10.31)
This further implies that x(0) = lim (A k→+∞
−1 k
) x(k) − lim
k→+∞
k−1 #
−1−j
A
j=0
& ' 0 s( j) 2
* ) +∞ −j−1 # 2s( j) λ−j−1 − λ1 2 = . −j −j λ − λ2 λ2 − λ1 j=0 1
(10.32)
(10.33)
This completes the proof. Theorem 10.5 * ) +∞ n−j−1 # 2s( j) λn−j−1 − λ1 2 x(n) = n−j n−j λ − λ2 λ2 − λ1 j=n 1 Proof: Since x(k) = Ak x(0) +
k−1 # j=0
Ak−1−j
) * 0 2
∀n ≥ 0.
s( j) ∀k ≥ 0
(10.34)
177
Admissibility of Symbolic Sequences
and * ) +∞ −j−1 # 2s( j) λ−j−1 − λ1 2 Tb (s) = x(0) = , −j −j λ − λ2 λ2 − λ1 j=0 1 we have
* ) +∞ n−j−1 # 2s( j) λn−j−1 − λ 2 1 x(n) = n−j n−j λ1 − λ2 λ − λ 2 1 j=n
∀n ≥ 0.
(10.35)
(10.36)
This completes the proof.
For a one-dimensional case, any number x ∈ [−1, 1) can be represented as an M-ary number with each bit b( j) ∈ {1 − M, . . . , −1, 0, 1, . . . , M − 1}, that is: x=
+∞ #
b( j)M −(1+j) .
(10.37)
j=0
Define b = {b(0), b(1), . . .}
(10.38)
one = {b}.
(10.39)
and
Since +∞ # M −1 j=0
M j+1
= 1,
(10.40)
this implies that +∞ # b( j) −1 ≤ ≤ 1. M j+1
(10.41)
j=0
Hence, the mapping Sone : [−1, 1) → one
(10.42)
is surjective. It is well known that Sone is injective, so Sone is bijective. However, this is not true for the two-dimensional case. Given an arbitrary initial condition in the
178
10 Properties and Applications of Digital Filters with Nonlinearities
unit square, the map from the two-dimensional unit square to the set of binary symbolic sequences are not bijective. Since: * ) & ' +∞ −j−1 −j−1 # 2m 2m 1 λ2 − λ1 = (10.43) −j −j λ1 − λ 2 (λ1 − 1)(λ2 − 1) 1 λ2 − λ1 j=0
and |a + b| < 2m + 1,
(10.44)
2m > 1. (λ1 − 1)(λ2 − 1)
(10.45)
we have
Hence, S is not surjective and the set is not admissible. However, if we confine the set by its subset b , then this guarantees that x(0) ∈ I 2 exists. Hence, Sb is surjective and the set b is admissible. Although an infinite number of bits is required to represent a number x with infinite precision, we may truncate the representation by a finite number of bits and the quantization error is bounded by the magnitude represented by the last bit. That is +∞ # M −1 j=k
Mj
=
1 M k−1
.
(10.46)
However, for the two-dimensional case, the truncation error is * ) ' & & −k ' # +∞ −j−1 −j−1 2 2m λ2 − λ−k e1 (k) − λ1 λ2 1 . − = −j −j e2 (k) − λ1−k λ1 − λ 2 λ1 − λ2 λ1−k λ2 − λ1 2 1 j=k
(10.47)
Since lim ei (k) = 0
(10.48)
ei (k) > 0
(10.49)
k→+∞
and
∀i ∈ {1, 2}, ∃k0 ∈ Z + such that ∀i ∈ {1, 2} ei (k) are monotonically decreasing with respect to k ∀k ≥ k0 . Hence, we can still truncate the representation of x(0) using a finite number of symbols and the error is monotonic, decreasing as the number of bits for the representation increases.
Statistical Property
179
This property suggests that any information can be coded using the successive approximation technique. Compared to the existing successive approximation coding technique where it is usual to code the information directly, this technique codes the symbolic sequence. As a result, the new coding scheme improves the security of communication. Example 10.1 Consider a second order digital filter associated with two’s complement arithmetic. Assume that a = 2, b = 4 and x(0) = [0.1 0.2]T . Calculate the error of the initial condition represented using 40 bits of symbolic sequences. Solution: Since the estimated initial condition is xˆ (0) = [0.1006 error is 10−3 × [0.5534 0.6840]T .
0.1993]T , hence the
STATISTICAL PROPERTY In Section 10.1, a possibility of applying digital filters associated with two’s complement arithmetic in the security communication was discussed. However, for real applications, the statistics of the symbolic sequences and the state variables need to be examined and these statistical properties are presented here. First order digital filters When the pole of first order digital filters associated with two’s complement arithmetic is between 1 and 2, the system matrix is unstable and so the digital filters exhibit chaotic behavior. One would expect that the state variables might reach any value between the maximum and minimum numbers in the possible region, and uniform probability distribution of the state variable is obtained. However, this expectation is not true, and a counter intuitive phenomenon will now be examined. Denote a as the pole of first order digital filters associated with two’s complement arithmetic, then we have the following theorem: Theorem 10.6 If 1 < a < 2, the possibility of occurrence of the state variable in the region (a − 2, 2 − a) is close to zero no matter what the initial condition is. Proof: Although the first order digital filters associated with two’s complement arithmetic are deterministic systems – that is, the values of the state variable and
180
10 Properties and Applications of Digital Filters with Nonlinearities
the symbolic sequence at any particular time index can be calculated exactly once the initial condition and the filter parameter are known – we can always plot the histogram of the state variable and compute the possibility of occurrence of different values of the symbolic sequences. Let the normalized histogram of 1 the state variable be pX (x), that is −1 pX (x) dx = 1. Define q(x) =
7
pX (x) −
r(x) =
7
pX (x)
t(x) =
7
1 pX (x) −1 ≤ x < − , a 0 otherwise
1 1 ≤x< a a otherwise
0
(10.50)
1 ≤x<1 , a otherwise
0
(10.51)
y = f (ax),
(10.52)
(10.53)
and the normalized histogram of y be pY (y), where have:
1
−1 pY (y) dy = 1,
pX (x) = q(x) + r(x) + t(x) and 1 x 1 pY (x) = q + r a a a
x+2 a
then we (10.54)
x−2 . a
(10.55)
1 ≤ x < a − 2, a
(10.57)
1 + t a
For the first order digital filters associated with two’s complement arithmetic, we can assume that pY (x) = pX (x). Hence we have: x+2 1 1 x 1 + r (10.56) for − 1 ≤ x < − , t(x) = q a a a a a 1 x 1 + r q(x) = q a a a q(x) =
q(x) =
x+2 a
1 x
q a a
1 x 1 + t q a a a
for −
for a − 2 ≤ x < 2 − a,
x−2 a
for 2 − a ≤ x <
(10.58)
1 , a
(10.59)
181
Statistical Property
⫻10⫺3 1
3
0.8 2.5 Normalized histogram of x
0.6 0.4
x(k)
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6
2 1.5 1 0.5
⫺0.8 ⫺1
0
0.5
1
1.5
2
0 ⫺1
2.5
⫺0.5
4
Time index k
⫻ 10
(a)
0
0.5
1
x (b)
Figure 10.1 (a) x(k); (b) The normalized histogram of the state variable when a = 1.5 and x (0) = 0.8.
and 1 x 1 r(x) = q + t a a a
x−2 a
for
1 ≤ x < 1. a
(10.60)
c According to eqn (10.58), we have q(x) = |x| where c is a constant, or c q(x) = 0. Since q(x) = |x| is not a valid normalized histogram function because 2−a a−2 q(x) dx diverges, so we have q(x) = 0. This implies that the possibility of occurrence of the state variable in the region (a − 2, 2 − a) is close to zero.
This completes the proof. Figure 10.1 shows the normalized histogram of the state variable when a = 1.5 and x(0) = 0.8. As can be seen from Figure 10.1a, although the first order digital filter associated with two’s complement arithmetic exhibits random-like chaotic behavior, the possibility of occurrence of the state variable in the region (a − 2, 2 − a) is close to zero, as shown in Figure 10.1b. It is worth noting that even though the state trajectory depends on the initial condition, the proof of Theorem 10.6 does not involve the initial condition. So, Theorem 10.6 is still true no matter what the initial conditions are. Figure 10.2 shows the normalized histogram of the state variable when a = 1.5 and x(0) is generated randomly. We can see that Figure 10.2 depicts the same phenomenon as that of Figure 10.1.
182
10 Properties and Applications of Digital Filters with Nonlinearities
⫻10⫺3 1
2.5
0.8 Normalized histogram of x
0.6 0.4
x(k)
0.2 0 ⫺0.2 ⫺0.4
2
1.5
1
0.5
⫺0.6 ⫺0.8 ⫺1
0
0.5
1
1.5
Time index k (a)
2
0 ⫺1
2.5 4
⫺0.5
0
0.5
1
x
⫻10
(b)
Figure 10.2 (a) x(k); (b) The normalized histogram of the state variable when a = 1.5 and the initial condition is generated randomly.
Example 10.2 Consider a first order digital filter associated with two’s complement arithmetic. Assume that a = 1.8 and the initial condition x(0) = 0.1. Plot the histogram of the state variable. Solution: The histogram of the state variable is shown in Figure 10.3. As can be seen from Figure 10.3, that the possibility of occurrence of the state variable in the region (a − 2, 2 − a) is close to zero. Second order digital filters We now proceed on to the investigation of the statistical property of second order digital filters associated with two’s complement arithmetic. To explore the statistical property of state variables and symbolic sequences, Shannon entropies are employed. Since the state variables will converge to zero, and no overflow will occur if both the eigenvalues of the second order digital filters associated with two’s complement arithmetic are real and inside the unit circle, the Shannon entropies of the symbolic sequences are therefore zero. When the eigenvalues are complex and inside or on the unit circle, three types of trajectories are exhibited on the phase plane. Since the symbolic sequences are constant if the system exhibits the type I trajectory, the Shannon entropies of the symbolic sequences
183
Statistical Property
0.08
1 0.8
0.07
0.6 0.06 0.4 0.05 Px (x)
x(k)
0.2 0 ⫺0.2
0.04
0.03
⫺0.4 0.02 ⫺0.6 0.01
⫺0.8 ⫺1
0
0.5
1 Time index k
(a)
0 ⫺1
2
1.5 ⫻104
⫺0.5
0
0.5
1
x (b)
Figure 10.3 (a) x(k); (b) The normalized histogram of the state variable.
are also zero for the type I trajectory. But what are the Shannon entropies for the type II and type III trajectories? Since the type III trajectory exhibits chaotic fractal patterns on the phase plane and the symbolic sequences are aperiodic, in contrast to the type II trajectory in which only limit cycle behaviors are exhibited on the phase plane and the symbolic sequences are periodic, one may intuitively expect that the Shannon entropies of the symbolic sequences for the type III trajectory may be higher than that for the type II trajectory. But this intuitive expectation is not true and this counter intuitive phenomenon is presented in the following observation: Observation 10.1 The Shannon entropies of the symbolic sequences for the type II trajectories may be higher than those for the type III trajectories, even though the symbolic sequences of the type II trajectories are periodic and have limited cycle behavior, while those of the type III trajectories are aperiodic and have chaotic behavior. To illustrate this counter intuitive observation, the plot of the types of trajectories, as well as the Shannon entropies of the symbolic sequences of a
184
10 Properties and Applications of Digital Filters with Nonlinearities
second order digital filter associated with two’s complement arithmetic versus the initial conditions, are shown in Figure 10.4a and 10.4b, respectively. As can be seen from Figure 10.4, the Shannon entropies of the symbolic sequences for the type II trajectory may be higher than that for the type III trajectory, even though the symbolic sequences of the type II trajectory are periodic and have limit cycle behaviors – those of the type III trajectory are aperiodic and have chaotic behavior. So it is difficult to determine the type of trajectories by the Shannon entropies when the eigenvalues of the system matrix are complex and inside or on the unit circle. When both the eigenvalues of the second order digital filters associated with two’s complement arithmetic are outside the unit circle, random-like chaotic patterns are typically exhibited all over the phase plane and the Shannon entropies of the state variables are independent of the initial conditions and the filter parameters. However (as discussed in Chapter 9), the quasi periodic behaviors are exhibited for some exceptional filter parameters. Hence, what are the Shannon entropies of the state variables at these filter parameters? What features will such phase portraits exhibit? To address these issues, we have the following observation. Observation 10.2 When both the eigenvalues of the second order digital filters associated with two’s complement arithmetic are outside the unit circle, the Shannon entropies of the state variables are independent of the initial conditions and the filter parameters, except for some special values of a and b. At these special values of a and b, the Shannon entropies of the state variables are relatively small. The state trajectories corresponding to these filter parameters either exhibit randomlike chaotic behaviors in some local regions or converge to some fixed points on the phase plane. To illustrate the first part of Observation 10.2, initial conditions are generated randomly, and the Shannon entropies of the state variables of second order digital filters associated with two’s complement arithmetic versus the filter parameters are plotted (see Figure 10.5). As can be seen from Figure 10.5, when both the eigenvalues of the second order digital filters associated with two’s complement arithmetic are outside the unit circle, the Shannon entropies of the state variables are independent of the initial conditions and the filter parameters, except for some special values of a and b. To illustrate the second part of Observation 10.2, phase portraits and state responses of different systems are shown in Figure 10.6.
185
Type of trajectories
Statistical Property
3 2 1 1 0.8 0.6 0.4 0.2 x2
0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
0.2
0 x1
⫺0.2
0.4
0.6
1
0.8
(a)
1.6 1.4
Entropy of s(k)
1.2 1 0.8 0.6 0.4 0.2 0 1 0.5 0 x2
⫺0.5 ⫺1
⫺1
⫺0.2 ⫺0.8 ⫺0.6 ⫺0.4
0
0.2
0.4
0.6
0.8
1
x1
(b)
Figure 10.4 (a) Set of initial conditions for different types of trajectories when b = −1 and a = 0.5; (b) Shannon entropies of symbolic sequences for different initial conditions when b = −1 and a = 0.5.
186
10 Properties and Applications of Digital Filters with Nonlinearities
8
Entropy of x(k)
7 6 5 4 3 2 1 0 5
4
3
2
1
0
⫺1 ⫺2 ⫺3 ⫺4 ⫺5
⫺5
⫺4
⫺3
⫺2
⫺1
0
1
2
3
4
5
Figure 10.5 Shannon entropies of the state variables for different filter parameters when ' & 0.9003 x(0) = . −0.5377
As discussed in Chapter 9, and illustrated in Figure 10.6c and 10.6d, when a and b are multiples of 2, the phase portraits will converge to some fixed point. Hence, the Shannon entropies of the state variables are relatively small, as shown in Figure 10.5. Besides, for other special values of the filter parameters, such as when a = −0.1 and b = −1.6, it can be seen from Figure 10.5 that the Shannon entropies of the state variables are relatively small. By plotting the corresponding phase portrait as shown in Figure 10.6b, it can be seen from the figure that the state trajectory exhibits a random-like chaotic behavior in some local regions. The implication of Observation 10.2 is that special state trajectory patterns can be detected by measuring the Shannon entropies of the state variables. If the Shannon entropies of the state variables are relatively small, then the corresponding filter parameters may be special ones that exhibit some special types of state trajectories on the phase plane. Example 10.3 Consider a second order digital filter associated with two’s complement arithmetic. Assume that a = 3, b = −1 and x(0) = [0.1 0.2]T . Calculate the Shannon entropy of the corresponding symbolic sequences.
187
Statistical Property
1 0.8 0.6 0.4
x2
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0 x1
0.2
0.4
0.6
0.8
1
⫺0.8
⫺0.6
⫺0.4
⫺0.2
0 x1
0.2
0.4
0.6
0.8
1
(a) 1 0.8 0.6 0.4
x2
0.2 0 ⫺0.2 ⫺0.4 ⫺0.6 ⫺0.8 ⫺1 ⫺1 (b) Figure 10.6 (a) Phase portraits of a second order digital filter associated with two’s complement arith' & 0.9003 , a = 4.2 and b = 4.6; (b) Phase portraits of a second order digital filter −0.5377 ' & 0.9003 associated with two’s complement arithmetic when x(0) = , a = −0.1 and b = −1.6. −0.5377
metic when x(0) =
10 Properties and Applications of Digital Filters with Nonlinearities
1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0
0
⫺0.2
⫺0.2
⫺0.4
⫺0.4
⫺0.6
⫺0.6
⫺0.8
⫺0.8
⫺1 (c)
x2(k)
x1(k)
188
0
20
40
60
80
Time index k
⫺1
100 (d)
0
20
40
60
80
100
Time index k
Figure 10.6 (Continued ) (c) and (d) State responses of a second order digital filter associated with & ' 0.9003 , a = −4 and b = −4. −0.5377
two’s complement arithmetic when x(0) =
Solution: By iterate the state space equation 50000 iterations, it is found that s(k) = −2 have occurred 2066 times, s(k) = −1 have occurred 14650 times, s(k) = 0 have occurred 16543 times, s(k) = 1 have occurred 14705 times, and (k) = 2 have occurred 2036 times. Hence, the entropy of the symbolic sequences is S = 2s=−2 −ps log2 ps = 1.9441 bits, where ps is the probability of the occurrence of the symbol s. COMPUTER CRYPTOGRAPHY VIA DIGITAL FILTERS ASSOCIATED WITH NONLINEARITIES As the statistical property of digital filters associated with two’s complement arithmetic has been discussed in Section 10.2, we now proceed to an application of digital filters associated with nonlinearities to computer cryptography. To achieve this goal, a chaotic filter bank is employed. By encrypting and decrypting signals via a chaotic filter bank, the following advantages are enjoyed: 1) we can embed signals in different frequency bands by employing different chaotic functions; 2) the number of chaotic generators to be employed, and their corresponding functions, can be selected and designed in a flexible manner
Computer Cryptography via Digital Filters Associated with Nonlinearities
t0[n] H0(z)
↓2
K0
v0[n]
w0[n]
1 K0
↑2
F0(z)
a0(.) ⫺a1(.) a1(.) ⫺a0(.)
x[n] H1(z)
↓2
K1
t1[n]
v1[n]
w1[n]
189
y[n] 1 K1
↑2
F1(z)
Figure 10.7 A chaotic filter bank system.
because perfect reconstruction does not depend on the invertibility, causality, linearity and time invariance of the corresponding chaotic functions; 3) the ratios of the subband signal powers to the chaotic subband signal powers can be easily changed by the designers and perfect reconstruction is still guaranteed no matter how small these ratios; 4) the proposed cryptographical system can be easily adapted to international multimedia standards (such as JPEG 2000 and MPEG4). A block diagram of the system is shown in Figure 10.7. Let x[n] and y[n] be the input and the reconstructed signal of the filter bank system; t0 [n] and t1 [n] be the subband signals decomposed by the analysis bank; v0 [n] and v1 [n] be the encrypted subband signals; w0 [n] and w1 [n] be the decrypted subband signals; Hi (z) and Fi (z) for i = 0, 1 be the analysis filters and synthesis filters; ↓ 2 and ↑ 2 be a 2 fold decimator and 2 fold expander; K0 and K1 be the gains multiplied on each channels; and αi ( · ) for i = 0, 1 be the chaotic functions, respectively. The various signals in Figure 10.7 can be expressed as follows: # x[m]h0 [2n − m], t0 [n] = K0
(10.61)
∀m
t1 [n] = K1
# ∀m
x[m]h1 [2n − m],
(10.62)
v0 [n] = t0 [n] + α0 (t1 [n]),
(10.63)
v1 [n] = t1 [n] − α1 (v0 [n]),
(10.64)
w1 [n] = v1 [n] + α1 (v0 [n]) = t1 [n],
(10.65)
w0 [n] = v0 [n] − α0 (w1 [n]) = t0 [n],
(10.66)
190
10 Properties and Applications of Digital Filters with Nonlinearities 0.04
2.5
0.035 2
0.03 0.025
x[n]
t0[n]
1.5
1
0.02 0.015 0.01
0.5
0.005 0
0
50
100
150
200
250
0
300
0
20
40
60
80
100
120
140
100
120
140
100
120
140
Time index k
Time index k
(a)
(b) 0.04
1.4
0.035
1.2
0.03 1
0.025 v0[n]
t1[n]
0.02 0.015
0.8
0.01
0.6
0.005
0.4
0 0.2
⫺0.005 ⫺0.01 0
20
40
60
80
100
120
0
140
0
20
40
Time index k
60
80
Time index k
(c)
(d) 4
0
3.5 3 2.5
⫺1
w0[n]
v1[n]
⫺0.5
⫺1.5
2 1.5 1
⫺2 0.5 ⫺2.5
0 0
20
40
60
80
100
120
140
0
20
40
60
80
Time index k
Time index k
(e)
(f) 2.5
1.2 1
2
0.8
1.5 y [n]
w1[n]
0.6 0.4
1
0.2 0
0.5
⫺0.2 ⫺0.4
0 0
20
40
60
80
100
120
0
140
Time index k
(g)
50
100
150
200
250
300
Time index k
(h)
Figure 10.8 Subband, input and output signals for a standard one-dimensional test input. (a) x [n]; (b) t 0 [n]; (c) t 1 [n]. (d) v 0 [n]. (e) v 1 [n]. (f) w 0 [n]. (g) w 1 [n]. (h) y [n].
191
Computer Cryptography via Digital Filters Associated with Nonlinearities 1
0.02
0.8
0.015
0.6
0.01
0.4
0.005 t0[n]
x[n]
0.2 0 ⫺0.2 ⫺0.4
⫺0.01
⫺0.6
⫺0.015
⫺0.8 ⫺1
0
⫺0.005
0
50
100
150
200
250
⫺0.02
300
0
20
40
Time index k
60
80
100
120
140
100
120
140
100
120
140
Time index k
(a)
(b) 2
⫻ 10⫺3
1.4
1.5
1.2
1
1 v0[n]
t1[n]
0.5 0 ⫺0.5
0.6 0.4
⫺1
0.2
⫺1.5 ⫺2
0.8
0
20
40
60
80
100
120
0
140
0
20
40
(c)
80
(d) 0
2
⫺0.2
1.5
⫺0.4
1
⫺0.6
0.5
⫺0.8
w0[n]
v1[n]
60
Time index k
Time index k
⫺1 ⫺1.2 ⫺1.4
⫺1
⫺1.6
⫺1.5
⫺1.8 ⫺2
0 ⫺0.5
0
20
40
60
80
100
120
⫺2
140
0
20
40
60
80
Time index k
Time index k
(e)
(f) 1.5
0.05 0.04
1
0.03 0.02
0.5 y[n]
w1[n]
0.01 0
0
⫺0.01 ⫺0.02 ⫺0.03
⫺0.5
⫺0.04 ⫺0.05
0
20
40
60
80
100
120
⫺1
140
Time index k
(g)
0
50
100
150
200
250
Time index k
(h)
Figure 10.9 Subband, input and output signals for a simple sinusoidal input. (a) x [n]; (b) t 0 [n]; (c) t 1 [n]; (d) v 0 [n]; (e) v 1 [n]; (f) w 0 [n]; (g) w 1 [n]; (h) y [n].
300
192
10 Properties and Applications of Digital Filters with Nonlinearities
and y[n] =
1 # 1 # w0 [m]f0 [n − 2m] + w1 [m]f1 [n − 2m]. K0 K1 ∀m
(10.67)
∀m
Since a perfect reconstruction filter bank is important for computer cryptography because this guarantees the decryption is lossless, a perfect reconstruction filter bank is considered. That is ∃c ∈ ℜ and ∃m0 ∈ Z such that y[n] = cx[n − m0 ] ∀n ∈ Z. This property can be achieved if and only if '& ' & −m ' & 1 H0 (z) H1 (z) F0 (z) cz 0 = , (10.68) 0 2 H0 (−z) H1 (−z) F1 (z)
no matter αi (·) for i = 0, 1 are noninvertible, noncausal, nonlinear and time varying functions. This property provides great flexibility in design because signals can be embedded in different frequency bands by employing different chaotic functions, and the number of chaotic generators as well as their corresponding functions can be selected and designed in a more flexible manner. By expressing the filters in the polyphase representation, that is Hi (z) =
and Fi (z) =
1 #
z−l Ei,l (z2 )
(10.69)
zl−1 Rl,i (z2 ),
(10.70)
l=0
1 # l=0
for i = 0, 1, the perfect reconstruction condition becomes where I is an identity matrix.
R(z)E(z) = cz−m0 I,
It is found that if E(z) is a paraunitary matrix, that is ˜ E(z)E(z) = dI,
(10.71)
(10.72)
˜ where d is a constant and E(z) denotes E∗T (z−1 ) in which E∗ (z) represents the conjugation of the coefficients of E(z), then the wavelets generated by the binary tree structure filter bank is orthonormal. The Haar wavelet is the only wavelet function that is orthogonal, symmetrical and of compact support. This wavelet function is chosen here as an illustration. The mother wavelets function of Haar transform and the corresponding polyphase matrix are: ⎧ ⎨ 1 0 < t < 0.5 ψ(t) = −1 0.5 < t < 1 (10.73) ⎩ 0 otherwise
193
Computer Cryptography via Digital Filters Associated with Nonlinearities
and E (z) =
&
1 1
' 1 , −1
(10.74)
respectively. In order to generate uncorrelated signals, we employ the logistic maps as the chaotic functions. The nonlinear functions are xi (k + 1) = λi xi (k)(1 − xi (k))
(10.75)
yi (k) = xi (k) + ui (k),
(10.76)
and
for i = 0, 1, where λi , xi (k), ui (k) and yi (k) are the parameters, state variables, inputs and outputs of the function αi (·), respectively. It is worth noting that αi (·) is, in general, not invertible, and chaotic behaviors are exhibited if 0 < xi (0) < 1 and 3 < λi < 4. Hence, the parameters and the initial conditions are selected in these ranges. In the cryptographical system, λi is used as the public keys and xi (0) is used as the private key. Since the logistic map is very sensitive to both λi and xi (0) because of its chaotic nature, different users will get very different encrypted signals and they cannot decrypt other users’ signals by using their own private keys. To test the performance of the system, a standard one-dimensional test signal, a simple sinusoidal signal, and a random Gaussian noise with zero mean and unit variance are employed as test inputs. The parameters are selected as K0 = 0.01, K1 = 0.04, λ0 = 3.98, λ1 = 4, x0 (0) = 0.7, x1 (0) = 0.9, c = 1 and m0 = 0, respectively. Figures 10.8–10.10 show the subband, input and $ % output signals for these inputs, respectively. The correlation coefficients
σt v 6 i j σt 2 σ v 2 i
j
are summarized in Table 10.1. As can be seen from Table 10.1, the encrypted subband signals are almost uncorrelated to the subband signals decomposed by the analysis bank, which implies that the encryption performance is very good.
2 to Table 10.2 summarizes the ratios of subband signal power ∀n |ti [n]| 2 the subband chaotic signal power ∀n |vi [n] − ti [n]| for each channel in the filter bank system. It is interesting to note that although these ratios are very low, perfect reconstruction is still guaranteed. Also, the designers can easily change these ratios by changing the values of K0 and K1 , respectively.
194
10 Properties and Applications of Digital Filters with Nonlinearities 2.5
0.04
2
0.03
1.5
0.02
1
0.01 t0[n]
x[n]
0.5 0 ⫺0.5 ⫺1
⫺0.02
⫺1.5
⫺0.03
⫺2 ⫺2.5
0
⫺0.01
0
50
100
150
200
250
⫺0.04
300
0
20
40
(a)
0.8
0
0.6
v0[n]
t1[n]
1
0.05
⫺0.05
120
140
100
120
140
100
120
140
0.4 0.2
⫺0.15
0
⫺0.2
⫺0.2
0
20
40
60
80
100
120
140
0
20
40
Time index k
60
80
Time index k
(c)
(d) 0
4
⫺0.2
3
⫺0.4
2
⫺0.6
1
⫺0.8
w0[n]
v1[n]
100
1.2
0.1
⫺0.1
⫺1 ⫺1.2
⫺2
⫺1.6
⫺3
⫺1.8 ⫺2
0 ⫺1
⫺1.4
0
20
40
60
80
100
120
⫺4
140
0
20
40
60
80
Time index k
Time index k
(e)
(f) 4
2.5 2
3
1.5
2
1
1
0.5 y[n]
w1[n]
80
(b) 0.15
0
0 ⫺0.5
⫺1
⫺1
⫺2
⫺1.5
⫺3
⫺2
⫺4
⫺2.5
0
20
40
60
80
100
120
140
Time index k
(g)
60
Time index k
Time index k
0
50
100
150
200
250
300
Time index k
(h)
Figure 10.10 Subband, input and output signals for a random Gaussian noise with zero mean and unit variance. (a) x [n]; (b) t 0 [n]; (c) t 1 [n]; (d) v 0 [n]; (e) v 1 [n]; (f) w 0 [n]; (g) w 1 [n]; (h) y [n].
195
Summary
Table 10.1 Correlation coefficients of subband signals decomposed by analysis bank and encrypted subband signals One-dimensional test signal 6 6 6 6
σt0 v0 σt 2 σv 2 0
Simple sinusoidal signal
Random Gaussian noise
−0.0002
0.0572
0.1177
0.0352
−0.0073
0.0038
0.2011
−0.0001
0.2582
−0.0908
−0.0014
0.0292
0
σt0 v1 σt 2 σv 2 0
1
σt1 v0 σt 2 σv 2 1
0
σt1 v1 σt 2 σv 2
1
1
Table 10.2 Ratios of subband signal power to the subband chaotic signal power
One-dimensional test signal
Simple sinusoidal signal
Random Gaussian noise
0.0011
0.00047599
0.00042144
0.000019036
0.0000014244
0.0019
2 ∀n |t0 [n]| |v [ [n]|2 n ] − t 0 0 ∀n
∀n
2 ∀n |t1 [n]| |v1 [n] − t1 [n]|2
Example 10.4 Consider the chaotic filter bank system with K0 = 0.1, K1 = 0.004, λ0 = 3.98, λ1 = 4, x0 (0) = 0.7, x1 (0) = 0.9, c = 1 and m0 = 0. Assume a sinusoidal input. Plot the subband, input and output signals of the system. Calculate the ratios of subband signal power to the subband chaotic signal power. Solution: The subband, input and output signals are shown in Figure 10.11. The ratios of subband signal power to the subband chaotic signal power are 2 ∀n |t0 [n]| |v [n] − t [n]|2 0 0 ∀n
= 0.0476 and
2 ∀n |t1 [n]| |v [n] − t [n]|2 1 1 ∀n
= 1.4067 × 10−8 .
SUMMARY In this chapter properties and applications of digital filters associated with nonlinearities were discussed. When the system matrix is unstable, then the initial conditions of the system can be computed using the symbolic sequences. Hence, signals can be coded and transmitted in a security manner. Statistical properties of state variables have also been discussed. For certain unstable first
196
10 Properties and Applications of Digital Filters with Nonlinearities 1
0.2
0.8
0.15
0.6
0.1
0.4
0.05 t0[n]
x[n]
0.2 0 ⫺0.2 ⫺0.4
⫺0.1
⫺0.6
⫺0.15
⫺0.8 ⫺1
0 ⫺0.05
0
50
100
150
200
250
⫺0.2
300
0
20
40
Time index k
60
80
100
120
140
100
120
140
100
120
140
Time index k
(a)
(b) 2
⫻ 10⫺4
1.2
1.5
1
1
0.8 v0[n]
t1[n]
0.5 0 ⫺0.5
0.6 0.4 0.2
⫺1 ⫺1.5
0
⫺2
⫺0.2
0
20
40
60
80
100
120
140
0
20
40
60
80
Time index k
Time index k
(c)
(d) 0
2 1.5 1 0.5
⫺1
w0[n]
v1[n]
⫺0.5
⫺1.5
0 ⫺0.5 ⫺1
⫺2
⫺1.5 ⫺2.5
0
20
40
60
80
100
120
⫺2
140
0
20
40
60
80
Time index k
Time index k
(e)
(f) 1.5
0.05 0.04
1
0.03 0.02
0.5 y1[n]
w1[n]
0.01 0
0
⫺0.01 ⫺0.5
⫺0.02 ⫺0.03
⫺1
⫺0.04 ⫺0.05
0
20
40
60
80
100
120
⫺1.5
140
Time index k
(g)
0
50
100
150
200
250
300
Time index k
(h)
Figure 10.11 Subband, input and output signals for a random Gaussian noise with zero mean and unit variance. (a) x [n]; (b) t 0 [n]; (c) t 1 [n]; (d) v 0 [n]; (e) v 1 [n]; (f) w 0 [n]; (g) w 1 [n]; (h) y [n].
Exercises
197
order digital filters associated with two’s complement arithmetic, the possibility of occurrence of the state variable in certain regions is very close to zero, whatever the initial conditions. When the eigenvalues of the second order digital filters associated with two’s complement arithmetic are complex and inside or on the unit circle, the Shannon entropies of the symbolic sequences for the type II trajectory may be higher than that for the type III trajectory. When both the eigenvalues of the second order digital filters associated with two’s complement arithmetic are outside the unit circle, the Shannon entropies of the state variables are almost constant and independent of the initial conditions and the filter parameters, except for some special filter parameter values. In these special cases, the state trajectories either exhibit random-like chaotic behavior in some local regions or converge to fixed points on the phase plane. Based on these statistical properties, computer cryptography can be implemented via a chaotic filter bank system. The system provides good performances for cryptography and also provides high design flexibility.
EXERCISES 1. Consider a second order digital filter associated with two’s complement arithmetic. Assume that a = 2, b = 4 and x(0) = [−0.7 0.7]T . Calculate the error of the initial condition represented using 40 bits of symbolic sequences. 2. Consider a second order digital filter associated with two’s complement arithmetic. Assume that a = 3, b = 5 and x(0) = [0.1 0.2]T . Calculate the Shannon entropy of the corresponding symbolic sequences based on 50000 iterations. ⎧ & ' ⎨ 1 0 < t < 0.5 1 1 Show that if ψ(t) = −1 0.5 < t < 1 , then E(z) = . 1 −1 ⎩ 0 otherwise
This page intentionally left blank
FURTHER READING
Allwright, D. J. (1977) “Harmonic balance and the Hopf bifurcation,” Mathematical Proceedings of Cambridge Philosophical Society, vol. 82, pp. 453–467. Barnes, C. W. and Fam, A. T. (1977) “Minimum norm recursive digital filters that are free of overflow limit cycles,” IEEE Transactions on Circuits and Systems, vol. CAS-24, no. 10, pp. 569–574. Barnes, C. W. (1985) “A parametric approach to the realization of second-order digital filter sections,” IEEE Transactions on Circuits and Systems, vol. CAS-32, no. 6, pp. 530–539. Bauer, P. H. and Leclerc, L. J. (1992) “Bounded-input-bounded-output properties of nonlinear discrete difference equations—applications to fixed-point digital filters,” IEEE Transactions on Circuits and Systems—I: Fundamental Theory and Applications, vol. 39, no. 8, pp. 662–666. Bose, T. and Brown, D. P. (1990) “Limit cycles in zero input digital filters due to two’s complement quantization,” IEEE Transactions on Circuits and Systems, vol. 37, no. 4, pp. 568–571. Bose, T. and Chen, M. Q. (1991) “Overflow oscillations in state-space digital filters,” IEEE Transactions on Circuits and Systems, vol. 37, no. 7, pp. 807–810. Bose, T. and Chen, M. Q. (1992) “Stability of digital filters implemented with two’s complement truncation quantization,” IEEE Transactions on Signal Processing, vol. 40, no. 1, pp. 24–31. Bose, T. and Trautman, D. A. (1992) “Two’s complement quantization in two-dimensional statespace digital filters,” IEEE Transactions on Signal Processing, vol. 40, no. 10, pp. 2589–2592. Bose, T. (1994) “Asymptotic stability of two-dimensional digital filters under quantization,” IEEE Transactions on Signal Processing, vol. 42, no. 5, pp. 1172–1177. Bose, T., Chen, M. Q. and Trautman, D. A. (1994) “Two’s complement quantization in orthogonal biquad digital filters,” Circuits, Systems and Signal Processing, vol. 13, no. 5, pp. 601–614. Bose, T. (1995) “Stability of the 2-D state-space system with overflow and quantization,” IEEE Transactions on Circuits and Systems—II: Analog and Digital Signal Processing, vol. 42, no. 6, pp. 432–434. Chua, L. O. and Lin, T. (1988) “Chaos in digital filters,” IEEE Transactions on Circuits and Systems, vol. 35, no. 6, pp. 648–658. Chua, L. O. and Lin, T. (1990) “Chaos and fractals from third-order digital filters,” International Journal of Circuit Theory and Applications, vol. 18, pp. 241–255. Chua, L. O. and Lin, T. (1990) “Fractal pattern of second-order non-linear digital filters: a new symbolic analysis,” International Journal of Circuit Theory and Applications, vol. 18, pp. 541–550. Claasen, T., Mecklenbräuker, W. F. G. and Peek, J. B. H. (1975) “Frequency domain criteria for the absence of zero-input limit cycles in nonlinear discrete-time systems, with applications to digital filters,” IEEE Transactions on Circuits and Systems, vol. CAS-22, no. 3, pp. 232–239. Claasen, T. A. C. M., Mecklenbräuker, W. F. G. and Peek, J. B. H. (1975) “On the stability of the forced response of digital filters with overflow nonlinearities,” IEEE Transactions on Circuits and Systems, vol. CAS-22, no. 8, pp. 692–696. Claasen, T. A. C. M. and Kristiansson, L. O. G. (1975) “Necessary and sufficient conditions for the absence of overflow phenomena in a second-order recursive digital filter,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. ASSP-23, no. 6, pp. 509–515. 199
200
Further Reading
Claasen, T. A. C. M., Mecklenbräuker, W. F. G. and Kristiansson, L. O. G. (1976) “Effects of quantization and overflow in recursive digital filters,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. ASSP-24, no. 6, pp. 517–529. Dachselt, F., Kelber, K. and Schwarz, W. (1998) “Discrete-time chaotic encryption systems—part III: cryptographical analysis,” IEEE Transactions on Circuits and Systems—I: Fundamental Theory and Applications, vol. 45, no. 9, pp. 983–988. D’Amico, M. B., Moiola, J. L. and Paolini, E. E. (2002) “Hopf bifurcation for maps: a frequencydomain approach,” IEEE Transactions on Circuits and Systems—I: Fundamental Theory and Applications, vol. 49, pp. 281–288. Delgado-Restituto, M., Liñán, M. and Rodríguez-Vázquez, A. (1996) “CMOS 2.4 µm chaotic oscillator: experimental verification of chaotic encryption of audio,” Electronic Letters, vol. 32, no. 9, pp. 795–796. Dettmer, R. (1993) “Chaos and engineering,” IEE Review, vol. 39, no. 5, p. 199–203. Devaney, R. L. (1986) An introduction to chaotic dynamical systems, Addison-Wesley Publishing Company, Inc. Felderhoff, T. (1994) “Simulation of nonlinear circuits with period doubling and chaotic behavior by wave digital filter principles,” IEEE Transactions on Circuits and Systems—I: Fundamental Theory and Applications, vol. 41, no. 7, pp. 485–491. Fettweis, A. and Meerkötter (1975) “Suppression of parasitic oscillations in wave digital filters,” IEEE Transactions on Circuits and Systems, vol. CAS-22, no. 3, pp. 239–246. Frey, D. R. (1993) “Chaotic digital encoding: an approach to secure communication,” IEEE Transactions on Circuits and Systems—II: Analog and Digital Signal Processing, vol. 40, no. 10, pp. 660–666. Galias, Z. and Ogorzalek, M. J. (1990) “Bifurcation phenomena in second-order digital filter with saturation-type adder overflow characteristic,” IEEE Transactions on Circuits and Systems, vol. 37, no. 8, pp. 1068–1070. Galias, Z. and Ogorzalek, M. J. (1992) “On symbolic dynamics of a chaotic second-order digital filter,” International Journal of Circuit Theory and Applications, vol. 20, pp. 401–409. Götz, M., Kelber, K. and Schwarz, W. (1997) “Discrete-time chaotic encryption systems—part I: statistical design approach,” IEEE Transactions on Circuits and Systems—I: Fundamental Theory and Applications, vol. 44, no. 10, pp. 963–970. Green, B. D. and Turner, L. E. (1988) “New limit cycle bounds for digital filters,” IEEE Transactions on Circuits and Systems, vol. 35, no. 4, pp. 365–374. Hwang, S. Y. (1977) “Minimum uncorrelated unit noise in state-space digital filtering,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. ASSP-25, no. 4, pp. 273–281. Jackson, L. B. (1976) “Roundoff noise bounds derived from coefficient sensitivities for digital filters,” IEEE Transactions on Circuits and Systems, vol. CAS-23, no. 8, pp. 481–485. Jenkins, W. K. and Leon, B. J. (1975) “An analysis of quantization error in digital filters based on interval algebras,” IEEE Transactions on Circuits and Systems, vol. CAS-22, no. 3, pp. 223–232. Johnson, K. K. and Sandberg, I. W. (1995) “A separation theorem for finite precision digital filters,” IEEE Transactions on Circuits and Systems—I: Fundamental Theory and Applications, vol. 42, no. 9, pp. 541–545. Kar, H. and Singh, V. (2001) “Stability analysis of 1-D and 2-D fixed-point state-space digital filters using any combination of overflow and quantization nonlinearities,” IEEE Transactions on Signal Processing, vol. 49, no. 5, pp. 1097–1105. Kaszkurewicz, E. and Bhaya, A. (1992) “Comments on ‘overflow oscillations in state-space digital filters’,” IEEE Transactions on Circuits and Systems—II: Analog and Digital Signal Processing, vol. 39, no. 9, pp. 675–677. Kocarev, L. and Chua, L. O. (1993) “On chaos in digital filters: case b = −1,” IEEE Transactions on Circuits and Systems—II: Analog and Digital Signal Processing, vol. 40, no. 6, pp. 404–407.
Further Reading
201
Kocarev, L., Wu, C. W. and Chua, L. O. (1996) “Complex behavior in digital filters with overflow nonlinearity: analytical results,” IEEE Transactions on Circuits and Systems—II: Analog and Digital Signal Processing, vol. 43, no. 3, pp. 234–246. Leclerc, L. J. and Bauer, P. H. (1994) “New criteria for asymptotic stability of one- and multidimensional state-space digital filters in fixed-point arithmetic,” IEEE Transactions on Signal Processing, vol. 42, no. 1, pp. 46–53. Lepschy, A., Mian, G. A. and Viaro, U. (1988) “Effects of quantization in second-order fixed-point digital filters with two’s complement truncation quantizers,” IEEE Transactions on Circuits and Systems, vol. 35, no. 4, pp. 461–466. Lin, T. and Chua, L. O. (1991) “On chaos of digital filters in the real world,” IEEE Transactions on Circuits and Systems, vol. 38, no. 5, pp. 557–558. Ling, B. W. K., Chan, A. Y. P., Wong, T. P. L. and Tam, P. K. S. (2002) “Autonomous response of a third-order digital filter with two’s complement arithmetic realized in parallel form,” Communications in Information and Systems, vol. 2, no. 4, pp. 435–454. Ling, B. W. K., Luk, F. C. K. and Tam, P. K. S. (2003) “Further investigation on chaos of real digital filters,” International Journal of Bifurcation and Chaos, vol. 13, no. 2, pp. 493–495. Ling, B. W. K. and Tam, P. K. S. (2003) “Some new trajectory patterns and periodic behaviors of unstable second-order digital filter with two’s complement arithmetic,” International Journal of Bifurcation and Chaos, vol. 13, no. 8, pp. 2361–2368. Ling, B. W. K. and Tam, P. K. S. (2003) “New results on periodic symbolic sequences of second order digital filters with two’s complement arithmetic,” International Journal of Circuit Theory and Applications, vol. 31, no. 4, pp. 407–421. Ling, B. W. K., Hung, W. F. and Tam, P. K. S. (2003) “Chaotic behaviors of stable second-order digital filters with two’s complement arithmetic,” International Journal of Circuit Theory and Applications, vol. 31, no. 6, pp. 541–554. Ling, B. W. K., Tam, P. K. S. and Yu, X. (2003) “Step response of a second-order digital filter with two’s complement arithmetic,” IEEE Transactions on Circuits and Systems—I: Fundamental Theory and Applications, vol. 50, no. 4, pp. 510–522. Ling, B. W. K. and Tam, P. K. S. (2003) “Sinusoidal response of a second-order digital filter with two’s complement arithmetic,” IEEE Transactions on Circuits and Systems—I: Fundamental Theory and Applications, vol. 50, no. 5, pp. 694–698. Ling, B. W. K., Ho, C. Y. F. and Tam, P. K. S. (2004) “Detection of chaos in some local regions of phase portraits using Shannon entropies,” International Journal of Bifurcation and Chaos, vol. 14, no. 4, pp. 1493–1499. Ling, B. W. K., Hung, W. F. and Tam, P. K. S. (2004) “Chaotic behaviors of a digital filter with two’s complement arithmetic and arbitrary initial conditions and order,” International Journal of Bifurcation and Chaos, vol. 14, no. 7, pp. 2425–2430. Ling, B. W. K., Ho, C. Y. F., Leung, R. S. K. and Tam, P. K. S. (2004) “Oscillation and convergence behaviors exhibited in an ‘unstable’second-order digital filter with saturation-type nonlinearity,” International Journal of Circuit Theory and Applications, vol. 32, no. 2, pp. 57–64. Ling, B. W. K., Hung, W. F. and Tam, P. K. S. (2004) “Autonomous response of a third-order digital filter with two’s complement arithmetic realized in cascade form,” International Journal of Circuit Theory and Applications, vol. 32, no. 2, pp. 65–67. Ling, B. W. K., Ho, C. Y. F. and Tam, P. K. S. (2004) “Admissibility of unstable second-order digital filter with two’s complement arithmetic,” International Journal of Circuit Theory and Applications, vol. 32, no. 3, pp. 97–104. Ling, B. W. K., Ho, C. Y. F. and Tam, P. K. S. (2005) “Normalized histogram of the state variable of first-order digital filters with two’s complement arithmetic,” International Journal of Bifurcation and Chaos, vol. 15, no. 8, pp. 2583–2586.
202
Further Reading
Ling, B. W. K., Ho, C. Y. F. and Tam, P. K. S. (2007) “Chaotic filter bank for cryptography,” Chaos, Solitons and Fractals (in press). Ling, B. W. K., Ho, C. Y. F. and Tam, P. K. S. (2006) “Nonlinear behaviors of first and second order complex digital filters with two’s complement,” IEEE Transactions on Signal Processing, vol. 54, no. 10, pp. 4052–4055. Liu, D. and Michel, A. N. (1992) “Asymptotic stability of discrete-time systems with saturation nonlinearities with applications to digital filters,” IEEE Transactions on Circuits and Systems—I: Fundamental Theory and Applications, vol. 39, no. 10, pp. 798–807. Liu, V. C. and Vaidyanathan, P. P. (1988) “Circulant and skew-circulant matrices as new normalform realization of IIR digital filters,” IEEE Transactions on Circuits and Systems, vol. 35, no. 6, pp. 625–635. Macchi, O. and Jaidane-Saidane, M. (1989) “Adaptive IIR filtering and chaotic dynamics: application to audiofrequency coding,” IEEE Transactions on Circuits and Systems, vol. 36, no. 4, pp. 591–599. Mallat, S. and Hwang, W. L. (1992) “Singularity detection and processing with wavelets,” IEEE Transactions on Information Theory, vol. 38, no. 2, pp. 617–643. Mao, J. S., Chan, S. C., Liu, W. and Ho, K. L. (2000) “Design and multiplier-less implementation of a class of two-channel PR FIR filterbanks and wavelets with low system delay,” IEEE Transactions on Signal Processing, vol. 48, no. 12, pp. 3379–3394. Maria, G. A. and Fahmy, M. M. (1975) “Limit cycle oscillations in first-order two-dimensional digital filters,” IEEE Transactions on Circuits and Systems, vol. CAS-22, no. 3, pp. 246–251. McLernon, D. C. (1997) “Finite wordlength effects in two-dimensional multirate periodically time-varying filters,” IEE Proceedings:—Circuits, Devices and Systems, vol. 144, no. 5, pp. 277–283. Mees, A. I. and Chua, L. O. (1979) “The Hopf bifurcation theorem and its applications to nonlinear oscillations in circuits and systems,” IEEE Transactions on Circuits and Systems, vol. CAS-26, pp. 235–254. Mills, W. L., Mullis, C. T. and Roberts, R. A. (1978) “Digital filter realizations without overflow oscillations,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. ASSP-26, no. 4, pp. 334–338. Mitra, D. (1977) “Large amplitude, self-sustained oscillations in difference equations which describe digital filter sections using saturation arithmetic,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. ASSP-25, no. 2, pp. 134–143. Mullis, C. T. and Roberts, R. A. (1976) “Synthesis of minimum roundoff noise fixed point digital filters,” IEEE Transactions on Circuits and Systems, CAS-23, vol. 9, pp. 551–562. Mullis, C. T. and Roberts, R. A. (1976) “Roundoff noise in digital filters: frequency transformations and invariants,” IEEE Transactions on Acoustics, Speech, and Signal Processing, ASSP-24, vol. 6, pp. 538–550. Munson, D. C., Strickland, J. H. and Walker, T. P. (1984) “Maximum amplitude zero-input limit cycles in digital filters,” IEEE Transactions on Circuits and Systems, CAS-31, vol. 3, pp. 266–275. Oppenheim, A. L. and Willsky, A. S. (1997) Signals and systems, Prentice Hall International, Inc. Parker, S. R. and Hess. S. F. (1971) “Limit-cycle oscillations in digital filters,” IEEE Transactions on Circuit Theory, vol. CT–18, no. 6, pp. 687–697. Phoong, S. M., Kim. C. W., Vaidyanathan, P. P. and Ansari, R. (1995) “A new class of two-channel biorthogonal filter banks and wavelet bases,” IEEE Transactions on Signal Processing, vol. 43, no. 3, pp. 649–665. Premaratne, K., Kulasekere, E. C., Bauer, P. H. and Leclerc, L. J. (1996) “An exhaustive search algorithm for checking limit cycle behavior of digital filters,” IEEE Transactions on Signal Processing, vol. 44, no. 10, pp. 2405–2412.
Further Reading
203
Rader, C. M. and Gold, B. (1967) “Effects of parameter quantization on the poles of a digital filter,” Proceedings of the IEEE, vol. 55, no. 5, pp.688–689. Redmill, D. W. and Bull, D. R. (1996) “Nonlinear perfect reconstruction critically decimated filter banks,” Electronic Letters, vol. 32, no. 4, pp. 310–311. Ritzerfeld, J. H. F. (1989) “A condition for the overflow stability of second-order digital filters that is satisfied by all scaled state-space structures using saturation,” IEEE Transactions on Circuits and Systems, vol. 36, no. 8, pp.1049–1057. Sandberg, I. W. and Kaiser, J. F. (1972) “A bound on limit cycles in fixed-point implementations of digital filters,” IEEE Transactions on Audio and Electroacoustics, vol. AU–20, no. 2, pp. 110–112. Sir Peter Swinnerton-Dyer (1977) “The Hopf bifurcation theorem in three dimensions,” Mathematical Proceedings of Cambridge Philosophical Society, vol. 82, pp. 469–483. Soman, A. K. and Vaidyanathan, P. P. (1993) “On orthonormal wavelets and paraunitary filter banks,” IEEE Transactions on Signal Processing, vol. 41, no. 3, pp. 1170–1183. Thô´ng, T. and Liu, B. (1976) “Limit cycles in the combinatorial implementation of digital filters,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. ASSP-24, no. 3, pp. 248–256. Vaidyanathan, P. P. (1990) “Multirate digital filters, filter banks, polyphase networks, and applications: a tutorial,” Proceedings of the IEEE, vol. 78, no. 1, pp. 56–93. Willson, A. N. JR., (1972) “Limit cycles due to adder overflow in digital filters,” IEEE Transactions on Circuit Theory, vol. CT–19, no. 4, pp. 342–346. Willson, A. N. JR., (1976) “Computation of the periods of forced overflow oscillations in digital filters,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. ASSP-24, no. 1, pp. 89–97. Wu, C. W. and Chua, L. O. (1993) “Properties of admissible symbolic sequences in a secondorder digital filter with overflow non-linearity,” International Journal of Circuit Theory and Applications, vol. 21, pp. 299–307. Xu, G. F. and Bose, T. (1997) “Elimination of limit cycles due to two’s complement quantization in normal form digital filters,” IEEE Transactions on Signal Processing, vol. 45, no. 12, pp. 2891–2895. Yang, T., Wu, C. W. and Chua, L. O. (1997) “Cryptography based on chaotic systems,” IEEE Transactions on Circuits and Systems—I: Fundamental Theory and Applications, vol. 44, no. 5, pp. 469–472. Yen, J. C. and Guo, J. I. (2000) “Efficient hierarchical chaotic image encryption algorithm and its VLSI realisation,” IEE Proceedings—Vision, Image and Signal Processing, vol. 147, no. 2, pp. 167–175. Yu, X. and Galias, Z. (2001) “Periodic behaviors in a digital filter with two’s complement arithmetic,” IEEE Transactions on Circuits and Systems—II: Analog and Digital Signal Processing, vol. 48, no. 10, pp. 1177–1190.
This page intentionally left blank
Index
Absolute stability, 7, 28 Admissibility, 10, 172–179 Aliasing, 16, 26, 27, 36, 41, 48 Analysis bank, 189, 193, 195 Arnold Sinai cat map, 156 Asymptotically stable, 16, 17, 58 Autonomous response, 61–71
Ellipse, 79, 82, 86, 87, 92, 96, 97, 103, 106, 108, 109, 112, 115, 117, 123, 125, 127, 135, 136, 145, 148, 155 Equilibrium point, 28, 55, 59 state, 16 Exponential stability, 17
Bandlimited, 25, 31, 36, 39, 41, 43 Bandpass, 17, 17, 78, 92, 114, 116 BIBO stability, 8, 20 Bifurcation theorem, 7, 27, 5–57, 59 Bijective, 8, 175, 176, 178
Filter bank, 16, 26–27, 188, 189, 192–195, 197 Fractals, 104–109 filters, 108, 109 patterns, 6, 79, 112, 113, 137, 149, 152, 183 Fuzzifier, 13 Fuzzy composition, 12 Fuzzy membership function, 9, 10, 12 Fuzzy relations, 12 Fuzzy rules, 12, 13 Fuzzy set, 8–10, 12, 13
Chaotic behavior, 6, 61, 57–56, 108, 137, 138, 141–144, 149–157, 162–165, 170, 173, 179, 181, 186, 193, 197 filter bank, 188, 189, 195, 197 fractal pattern, 106, 183 functions, 189, 192, 913 generators, 188, 192 pattern, 146, 156, 158, 184 signal power, 193, 195 stable, 108 Controllability, 24 Criticality, 58 Cryptography, 7, 188–195, 197
Gradient decent method, 42, 43, 51, 52 Haar wavelets, 192 Histograms, 49–51, 180–183 Hopf bifurcation, 28, 55, 57, 59 Incompatible nonuniform filter bank, 16, 27 Injective, 2, 8, 173, 174, 175 Invertibility, 8, 16, 20, 22, 189
Decryption, 192 Defuzzifier, 13 Demodulation, 3 Dense orbit, 6, 156 DFT matrix, 37 Direct form, 53, 54, 61, 109, 110, 139, 140, 141, 145
Jacobian matrix, 28, 58 JPEG, 189 Limit cycle, 6, 53, 58, 61, 70–74, 77, 92–103, 106, 136, 137, 142, 146–149, 154, 170, 172, 183, 184 Linguistic variables, 12
Eigen decomposition, 8 Encryption, 193 205
206 Lloyd Max quantizer, 2 Local optimal, 43 Logistic maps, 193 Lyapunov stability theorem, 6 Midrise quantizer, 2, 3, 32, 33 Midthread quantizer, 2 Modulation, 6, 40 MPEG, 189 Nonuniform quantizer, 2 filter bank, 16, 27 Normal form, 139, 140, 141, 145 Nyquist frequency, 25 Observability, 24, 25, 28, 31 Overflow, 1, 78, 82, 84, 86, 92, 101, 114–138, 141, 151, 152, 182 Oversampling, 36 Paraunitary, 192 Perfect reconstruction, 25–27, 189, 192, 193 Phase plane, 6, 64, 67, 69, 73, 79, 84, 86, 88, 90, 92, 96, 104, 106, 109, 110, 115, 117, 125, 127, 137, 138, 155, 159, 170, 183–186, 197 Phase portrait, 64–69, 81–84, 96, 99–100, 105–110, 118, 119, 131, 137, 141–150, 152–167, 186, 187 Polyphase representation, 192 Private keys, 193 Public keys, 193 Quantization, 1, 2, 5–7, 32–53, 139, 152–171, 178 step size, 32, 35 Quasi periodic, 158–161, 170, 184
Index
Rank, 24, 25, 36 Region of convergence, 23 Resonance, 127 Saturation level, 2–4, 32, 43, 47, 49 Semi–infinite programming, 34, 36, 42, 44 Shannon entropies, 182–186, 197 Sigma delta modulator, 6, 52 Signal–to–noise ratio, 6, 7, 36 Sinusoidal response, 7, 43, 44, 47, 48, 112, 114–138, 146, 191, 193, 195 State trajectory, 6, 86, 99, 109, 154–157, 165, 181, 186 Step response, 20, 78–109, 114, 115, 117, 123, 127, 130, 137, 138, 172 Subband, 189, 191, 193, 194, 195, 197 Surjective, 8, 173–176 Symbolic sequences, 62, 73, 79, 82, 83, 86, 92, 96–98, 103–106, 111, 114, 117, 127, 130, 135–138, 140, 142, 149–151, 159, 160, 166–171, 172–178, 182–188, 195, 197 Synthesis bank, 31, 189 Taylor expansion, 33 Tree structure filter bank, 192 TSK fuzzy system, 13 Two’s complement arithmetic, 1, 3, 4, 61–77, 78–113, 114–151, 152–171, 172, 179, 181–188, 197 Uniform quantizer, 2 Unimodular filter bank, 27 µ law quantizer, 2