Sample Rate Conversion in Software Configurable Radios
For a listing of recent titles in the Artech House Mobile Comm...
29 downloads
500 Views
2MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
Sample Rate Conversion in Software Configurable Radios
For a listing of recent titles in the Artech House Mobile Communications Series, turn to the back of this book.
Sample Rate Conversion in Software Configurable Radios
Tim Hentschel
Artech House Boston London www.artechhouse.com *
iv
Sample Rate Conversion in Software Configurable Radios
Library of Congress Cataloging-in-Publication Data Hentschel, Tim. Sample rate conversion in software configurable radios / Tim Hentschel. p. cm.—(Artech House mobile communications series) Includes bibliographical references and index. ISBN 1-58053-336-1 (alk. paper) 1. Software radio. 2. Telecommunication—Traffic—Management. 3. Sampling (Statistics). I. Title. II. Series. TK5103.4875 .H45 2002 621.384—dc21 2002074697 British Library Cataloguing in Publication Data Hentschel, Tim Sample rate conversion in software configurable radios.—(Artech House mobile communications series) 1. Signal processing—Digital techniques 2. Digital filters (Mathematical) 3. Sampling (Statistics) 4. Mobile communication systems 5. Radio—Receivers and reception I. Title 621.3’822 ISBN 1-58053-336-1 Cover design by Gary Ragaglia Ó 2002 ARTECH HOUSE, INC. 685 Canton Street Norwood, MA 02062 All rights reserved. Printed and bound in the United States of America. No part of this book may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system without permission in writing from the publisher. All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Artech House cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. International Standard Book Number: 1-58053-336-1 Library of Congress Catalog Card Number: 2002074697 10
9 8 7 6 5
4 3 2 1
Contents
v
Contents Preface 1
xi
Sample Rate Conversion in the Context of Software Radio
1
1.1
Introduction
1
1.2
Software Radio
1
1.3
Critical Functionality of a Software Radio Terminal Analog-to-Digital Conversion SRC Channelization Application of SRC Summary and Conclusion
7 7 20 22 25 25
References
26
Basic Principles of SRC and Multirate Systems
29
2.1
Introduction
29
2.2 2.2.1 2.2.2 2.2.3
Basic Considerations of SRC Resampling After Reconstruction Irrational Factor SRC Rational Factor SRC
30 30 38 43
1.3.1 1.3.2 1.3.3 1.3.4 1.3.5
2
v
vi
Sample Rate Conversion in Software Configurable Radios
2.2.4 2.2.5 2.2.6 2.2.7 2.2.8
Integer Factor SRC Up- and Downsampling with Phase Offset Polyphase Decomposition Modulation Representation Summary
2.3
Linear Periodically Time-Varying Systems and Block Filtering Introductory Remarks The Raising Procedure Block-Filtering and Multirate Systems Frequency Behavior of Multirate Systems: The Bifrequency Approach
2.3.1 2.3.2 2.3.3 2.3.4 2.3.5
45 52 55 60 61 61 61 62 71 76
Summary
82
References
82
A Concept for SRC in Software Radio Terminals
85
3.1
Introduction
85
3.2
Review of the OSR of a Signal
85
3.3
The Conversion Factor: Integer Factor and Fractional SRC
86
3.4
Processing Issues
89
3.5
Summary
95
References
96
4
Systems for Integer Factor SRC
99
4.1
Introduction: The Direct Approach
99
4.2 4.2.1 4.2.2
Parallelization: Polyphase Filters Introductory Remarks Increasing the Sample Rate
3
100 100 100
Contents
4.2.3 4.2.4
Reducing the Sample Rate Reducing the Size of the Coefficient Memory
4.3
Efficient Realization of FIR Filters on Periodically Time-Varying Systems Computing All Coefficients from One Polyphase Component Storing More Than One Polyphase Component Alternative Interpretation of Polynomial Polyphase Filters
4.3.1 4.3.2 4.3.3 4.4
vii
106 110 113 113 124 133
Conclusion
141
References
141
Comb Filters: Special Systems for Integer Factor SRC
143
5.1
Introduction
143
5.2
Basic Considerations of Comb Filters
143
5.3
Cascaded Comb Filters
145
5.4 5.4.1 5.4.2 5.4.3 5.4.4
147 147 149 152
5.4.5
CIC Filters The Structure of CIC Filters Noise Shaping with CIC Decimators CIC Interpolators The Frequency-Sampling Structure of FIR-Filters Raising a CIC Decimator
5.5 5.5.1 5.5.2 5.5.3 5.5.4 5.5.5
Recursive Multirate Filters The Idea of Recursive Multirate Filters A Second-Order Decimator A Second-Order Interpolator Higher-Order Structures Higher-Order Integrate and Dump
155 155 156 158 161 164
5
152 153
viii
Sample Rate Conversion in Software Configurable Radios
5.6 5.6.1 5.6.2 5.6.3
Generalizing Recursive Multirate Filters Motivation Arbitrary Poles of the Filter G ðzÞ Designing Generalized Recursive Multirate Filters
165 165 165
Conclusion
185
References
185
6
Systems for Fractional SRC
187
6.1
Introduction: The Direct Approach
187
6.2 6.2.1
188
6.2.2
Polyphase and Block Realization Block Filtering and Conventional Polyphase Structures Time-Varying Polyphase Structures
188 191
6.3 6.3.1 6.3.2 6.3.3
Time-Varying CIC Filters CIC Filters for Fractional SRC State-Space Equations Simplification of the State Equation
197 197 198 204
6.4
A Note on Irrational Factor SRC
208
6.5
Summary
209
References
210
7
Applications of SRC
211
7.1
Introduction
211
7.2
Scenario of the Application
212
7.3
Requirements on SRC in the Context of Mobile Communications
213
Conventional Filters Direct Implementation Direct-Block Implementation
216 216 217
5.7
7.4 7.4.1 7.4.2
172
Contents
7.4.3 7.4.4 7.4.5 7.5 7.5.1 7.5.2
Time-Varying Polyphase/Block Implementation Filter Characteristics Conclusion
ix
217 218 219 219 219
7.5.5
Polynomial Filters Review The Conventional and Transposed Farrow Structures The Generalized (Time-Varying) Conventional Farrow Structure and the Transposed Farrow Structure Antialiasing with the Generalized Conventional Farrow Structure Conclusion
7.6
Time-Varying CIC Filters
229
7.7
Comparison of Methods for SRC
230
7.8
Summary
232
References
232
8
Conclusions
235
8.1
Summary
235
8.2
SRC Questionnaire
237
Appendix: Derivations and Calculations
239
Polyphase Decomposition of the Transfer Function
239
A.2
The Modulation Representation
241
A.3 A.3.1
The Raising Procedure The State-Space Description of Raised Systems
243
7.5.3
7.5.4
A.1
220
224 226 229
243
x
Sample Rate Conversion in Software Configurable Radios
A.3.2
The Transfer Matrix of Raised Time-Invariant Systems
244
A.4 A.4.1 A.4.2 A.4.3
Time-Varying Comb Filters Time-Varying Differentiator Second-Order Case R th-Order Case
245 245 246 247
A.5
Simplification of the State Equation of Time-Varying CIC Filters
250
References
252
Symbols and Abbreviations
253
About the Author
259
Index
261
Preface A whole book on sample rate conversion? When working in the field of software radio, I quickly became aware of a new problem in communications terminal design. One main property of software radio terminals is the independence from existing standards defining an air interface. Thus, software radio terminals have the ability to process many various communications standards. These standards are generally based on different master clock rates and therefore employ different bit/chip rates. A solution to cope with the diversity of master clock rates in one terminal is to have a dedicated master clock for each standard of operation. This kind of solution is not only costly, it limits the applicability of a realized terminal to what is defined by the implemented clock rates. Hence, it is much more elegant to run the terminal on a fixed clock rate and perform digital sample rate conversion controlled by software. But is sample rate conversion not a well-investigated field with lots of solutions? Indeed, there are many solutions. However, none of them serves the requirements of an application in communications terminals. Complexity and power consumption are the main issues in terminal design. On the other hand, often only one channel out of a wide-receive bandwidth needs to be processed. Hence, I sought solutions to perform sample rate conversion where certain errors are allowed. This led to an investigation of the topic of sample rate conversion from its beginning. Sample rate conversion can be tackled with the idea of resampling after reconstruction. This is a theoretical approach based on the ideal reconstruction of the discrete-time input signal and on resampling of the reconstructed continuous-time signal. From this idea, a mathematical description can be derived that enables a realization by means of digital signal processing. xi
xii
Sample Rate Conversion in Software Configurable Radios
The idea of resampling after reconstruction shows that sample rate conversion is a process of sampling. Hence, the two fundamental effects of sampling, imaging and aliasing, must be expected. Because it is aliasing that destroys possibly interesting signal components, we can conclude that antialiasing is the most important property to be obeyed by any sample rate conversion system. Antialiasing can be achieved by means of filtering. In order to have a flexible hardware platform for sample rate conversion, it is sensible to implement a continuous time impulse response rather than samples of the impulse response of the antialiasing filter (i.e., a conventional digital filter). This enables us to sample the impulse response arbitrarily at run time and, thus, accommodate any sample rate or master clock rate. Polynomial filters have a continuous time impulse response whose samples can be calculated with moderate effort. Therefore, they are a candidate for realizing the necessary antialiasing behavior of a flexible sample rate conversion system. Systems for sample rate conversion belong to the class of linear periodically time-varying systems. Due to this fact, it is not possible to directly apply the well-known methods of system analysis and synthesis of linear time-invariant systems. The nature of systems for sample rate conversion is even better described by the name (L,M )-shift-invariant system. This name means that a shift of the input signal by M samples causes a shift of the output signal by L samples. On this basis, a time-invariant multiple-input multiple-output (MIMO) system with M inputs and L outputs can be constructed that has exactly the same transfer characteristics as the single-input single-output (L,M )-shift-invariant system (given the proper construction of the input and output signals of the MIMO system). Hence, it is possible to analyze the (L,M )-shift-invariant system by means of analyzing the equivalent timeinvariant MIMO system. Signal processing with such MIMO systems is called block-signal processing. There is a strong relationship between block-processing systems and the polyphase representation of systems and signals. Combining the ideas of polynomial filtering and block processing yields the well-known Farrow structure for sample rate conversion. It turns out that the Farrow structure does not have the capability to perform sufficient antialiasing filtering. Still, the transposed Farrow structure provides a means for antialiasing filtering. It is presented as a novel structure in this book. The power of the block-processing approach is further demonstrated by deriving novel time-varying structures for fractional sample rate conversion
Preface
xiii
on the basis of the well-known cascaded-integrator comb filters for integer factor sample rate conversion. Moreover, this book illustrates how the blockprocessing framework can be used to design recursive filters with time-varying feedback loops for integer factor sample rate conversion. The presented solutions have been derived in the context of software radio but are not limited to this application. This book provides a general overview on the problem of sample rate conversion. The book is based on the Ph.D. thesis that I wrote at the Mannesmann Mobifunk Chair for Mobile Communications Systems of Technische Universita¨t Dresden. I would like to thank Professor Gerhard Fettweis for his supervision and my colleagues Matthias Henker and Michael Lo¨hning for our numerous fruitful discussions and their invaluable critical comments. Moreover, I would like to thank Professor Hans-Joachim Jentschel of Technische Universita¨t Dresden and Professor Jeffrey H. Reed of Virginia Polytechnic Institute, Blacksburg, Virginia, and State University for their opinions and comments. I would like to thank the people at Artech House and the anonymous reviewer whose comments helped to improve the book. Finally, I cannot forget the support provided by my wife.
1 Sample Rate Conversion in the Context of Software Radio 1.1 Introduction This chapter briefly presents some concepts related to software radio to introduce the reader to particular aspects of sample rate conversion (SRC) in the context of software radio. This chapter does not attempt to investigate receiver structures and the respective digital signal processing algorithms in any depth. The chapter is organized as follows. First, the idea of software radio is introduced. After that, the main part of this chapter is dedicated to the critical functionality of software radio. It is the very part of a software radio transceiver that is difficult to realize with current technology (e.g., for reasons of power consumption or dynamic range). Analog-to-digital conversion, SRC (in brief ), and channelization are covered. The chapter is completed with a note on applications of SRC that are different from software radio.
1.2 Software Radio Software radio is a notion that comes from applying the computer industry’s qualitative step from calculator to computer to communications systems business. Initiated by the rapid development of digital signal processing, and specifically its enabling technologies (above all, semiconductor technology), the idea of defining a radio by means of software has arisen. It is as simple as: 1
2
Sample Rate Conversion in Software Configurable Radios
Receiver—the radio frequency (RF) signal is digitized close to the antenna and fed to a software-programmable digital signal processor, which will do the rest. Transmitter—the transmit signal is created in the signal processor and constructed (digital-to-analog converted) directly before the antenna (or a power amplifier). The aim is to have a terminal that has multipersonal capabilities. Any combination of RF band, air interface, protocol, coding, and related functions [1] must be realized on a common software-programmable hardware platform. Thus, the hardware platform is an enabling component of the software radio concept. In many publications, only the receiver side of the platform is investigated, as the receiver is generally the more demanding design problem. In a similar way, this book concentrates on investigations into the receiver only. However, most of the solutions to SRC are just as applicable to the transmitter. Due to the success and high penetration of mobile communications systems, the idea of software radio is strongly related to mobile terminals and base stations of mobile communications systems. The ideal software radio approach is shown in Figure 1.1. It is the most rigorous approach. However, restrictions with respect to bandwidth and dynamic range render this approach infeasible, at least with today’s technologies. Therefore trade-offs between the ideal software radio and the available technology must be made. In most cases, the trade-offs are made with a special focus. A network operator is concerned about the downloadability of new software, while an equipment manufacturer is interested in multimode terminals that could reduce the product diversity and thus reduce cost. A semiconductor manufacturer might be interested in the software configurability itself, which would allow him to extensively use digital signal processors instead of application-specific integrated circuits (ASICs).
Figure 1.1 Ideal software radio receiver.
Sample Rate Conversion in the Context of Software Radio
3
It is important to note that software radio is qualitatively more than just a digital radio. Shifting the analog-to-digital interface towards the antenna is certainly a main issue and a requirement of software radio. Reconfigurability and programmability of the processing platform are just as important. There are several stages in a software radio receiver where reconfigurability can be introduced. Ultimately, in such an evolution, the whole receiver should be reconfigurable. Finally, this evolution could yield a design similar to the ideal software radio. To start with, one could concentrate on the very part of a receiver that is realized by digital signal processing already today (i.e., the baseband processing). By increasing the computational power of the baseband processor, it becomes possible to run different algorithms on it and thus serve different mobile communications standards. New fields are opened for the application of digital signal processing and the design of a reconfigurable hardware platform as the analog-to-digital interface is shifted towards the antenna. In this context, the requirements on the analog-to-digital converter (ADC) are analyzed. In the ideal software radio concept of Figure 1.1, a system filter selects a bandwidth covering all of the services the software radio should support. Within this bandwidth, there are signals of different air interfaces (standards) possibly used by several operators. This is, in principle, shown in Figure 1.2, where three different services are suggested. These are the global system for telecommunications (GSM) as a typical single carrier system
Figure 1.2 Software radio–supported services sketched over frequency, adapted from [2]. Ó 1999 by Kluwer Academic Publishers.
4
Sample Rate Conversion in Software Configurable Radios
based on frequency division multiple access (FDMA), the Universal Mobile Telecommunications System (UMTS) as a representative of a pure spreadspectrum system, and HIPERLAN/2 as a multicarrier system based on orthogonal frequency division multiplex (OFDM). The bandwidth of each service is split again into several channels, in the case of FDMA or multicarrier transmission, or is wholly occupied by each channel of the service, in the case of pure spread-spectrum systems. Due to the typical characteristics of mobile communications signals (defined by [3]), the power levels of different frequency-divided channels in a particular air interface can vary considerably. Thus, mobile communications signals comprising several channels (i.e., multichannel signals) or multiple services can have a very high dynamic range. This, and the very large bandwidth that a software radio terminal might have to support, makes it impossible to receive and process (especially analog-to-digital conversion) the whole bandwidth of the software radio service at once. In realizable software radio receivers, the signal bandwidth must be reduced. Thus, two digitization concepts of a software radio receiver can be distinguished. The concept of the ideal software radio of Figure 1.1 is termed full-band digitization. A more practical concept employing bandwidth reduction is termed partial-band digitization. Both concepts are illustrated in Figure 1.3.
Figure 1.3 (a) Full-band and (b) partial-band digitization principle, adapted from [2]. Ó 1999 by Kluwer Academic Publishers.
Sample Rate Conversion in the Context of Software Radio
5
The reduction of bandwidth in the case of partial-band digitization can be realized with conventional receiver techniques (i.e., with frequency conversion to a low or high intermediate frequency and filtering). Two example architectures are shown in Figure 1.4. The well-known heterodyne receiver is shown in Figure 1.4(a). Its main feature is the intermediate frequency (IF), to where the signal of interest is mixed, and at which it is then filtered. The reason for mixing the signal to a fixed intermediate frequency is that the IF filter can have a fixed center frequency. This simplifies the realization of the filter considerably. Depending on the current frequency of the local oscillator (LO), different partial bands (e.g., channels or channel bundles) are passed through the IF filter. Due to the nature of mixing with a real LO (i.e., multiplication with a cosine or sine signal), an image-rejection filter is required before mixing (see [4, 5]). This filter can be avoided with the low-IF receiver where the signal is mixed with a complex LO frequency, as shown in Figure 1.4(b). Saving the image-rejection filter must be paid for with a complex mixer that poses its own realization problems. A consequence of partial-band digitization is that an analog front end is necessary. Although it might have less functionality than in conventional terminals (where, more or less, the complete channel selection is done in
Figure 1.4 (a) Heterodyne receiver concept and (b) low-IF receiver concept.
6
Sample Rate Conversion in Software Configurable Radios
the analog front end), the requirements are heavily increased due to the higher bandwidth and dynamic range of the multichannel signal a software radio receiver must process. In both full-band and partial-band digitization, the signal is processed digitally, after digitization. Before baseband processing can be performed, the channel of interest must be selected from the digitized multichannel signal and shifted to baseband. To perform baseband processing, the sample rate of the selected signal must be in accordance with the air interface. Hence, there is some digital signal processing necessary before baseband processing. This digital signal processing is done traditionally through analog techniques in the analog front end. Due to the shifting of the ADC towards the antenna, this functionality is realized digitally. It is termed the digital front end (DFE) [6, 7]. The functionality of the DFE is channelization (i.e., digital downconversion and channel filtering) and possibly SRC (necessary to provide the correct symbol or chip rate). The DFE is usually not implemented on programmable digital signal processor (DSP) devices. This is due to the very high sample rates resulting from the high dynamic range and bandwidth of the signals. In general, it can be stated that today’s DSPs cannot provide the processing capacity needed for processing wideband and high-bit-rate signals [8]. To illustrate this statement, the functionality of digital downconversion (see Section 1.3.3) is examined. As with analog mixing (see Figure 1.4), digital downconversion is realized by multiplying the signal with an LO signal. If both the signal and the LO are complex, digital downconversion requires four real multiplications per signal sample. With a sample rate of 80 million samples per second (MSps), which is state of the art for high resolution ADCs, this results in 320 million multiplications per second (Mmps). There are certainly DSPs that can serve this demand. However, digital downconversion would occupy a considerable portion of the processing power of a DSP without really requiring its flexiblity. The only thing that must be tuned with digital downconversion is the frequency of the LO (i.e., the signal at one of the inputs of each of the four multipliers). Hence, it is more sensible to implement digital downconversion on a dedicated hardware platform. Yet this does not violate the software radio idea. Such considerations are the motivation for regarding the DFE as a separate entity. The challenge of designing this DFE lies in the requirement of reconfigurability and/or programmability in the presence of very high data rates. Hence, the DFE can be regarded as an extremely critical part of a software radio receiver. Other critical parts are the wideband analog front
Sample Rate Conversion in the Context of Software Radio
7
end and the ADC. All of these components are enabling components of a software radio terminal. Given all of these considerations, the architecture of today’s feasible software radio receiver can be derived. It is shown in Figure 1.5 and comprises a minimal analog front end, the ADC, a DFE, and the digital signal processor. The next section is dedicated to the critical parts analog-digital-analog (A/D/A) interface (specifically the ADC) and the DFE with its functionality channelization and SRC.
1.3 Critical Functionality of a Software Radio Terminal 1.3.1 Analog-to-Digital Conversion The placement of the A/D/A interface in a software radio is the key [9]. This means that shifting the A/D/A interface closer and closer to the antenna theoretically enables the realization of more and more functionality by means of software, thus approaching the ideal software radio. On the receiver side, the shift of the ADC towards the antenna implies an increase of the digitization bandwidth and eventually a shift from partial-band digitization to full-band digitization. However, technology limits the performance of ADCs and digital-to-analog converters (DACs), thus slowing down their ‘‘move’’ towards the antenna.
Figure 1.5 Feasible software radio receiver.
8
Sample Rate Conversion in Software Configurable Radios
As this book deals with sampled signals, it is necessary to understand how these signals are obtained. Therefore, some fundamentals on analog-todigital conversion are given. There are several classifications of ADCs. When regarding the ADC as a black box and having interest only for different concepts that have fundamentally different performance, it is opportune to distinguish between memoryless ADCs and sigma-delta (SD) ADCs. The analog-to-digital conversion process takes place in two steps: quantization (i.e., the allocation of the signal amplitude to discrete levels) and sampling (i.e., capturing a signal at an instant in time). When designing a system, it is vital to have models of all of the signal processing steps. The mathematical models of quantization and sampling are briefly introduced. For a detailed treatment on analog-to-digital conversion, the reader is referred to [10, 11]. 1.3.1.1
Sampling
Sampling means taking amplitude values of the signal xðt Þ at certain timeinstances (e.g., sampling at t0 , t1 , t2 , etc., yields xðt0 Þ, xðt1 Þ, xðt2 Þ, etc.). We only want to consider the case when the time difference between two sample times is constant (i.e., t1 t0 ¼ t2 t1 ¼ ¼: T ). This type of sampling is called equidistant sampling, and T is the sampling period. The mathematical model of sampling is the multiplication of the signal with a Dirac impulse train. The Dirac impulse dðt Þ is a function (also called Dirac’s delta function) introduced by the physicist Paul Dirac. It has the following properties: dðt Þ ¼ Z1
0 1
t¼ 6 0 t ¼0
dðt Þdt ¼ 1
ð1:1Þ ð1:2Þ
1
dðt Þ ¼ dðt Þ
ð1:3Þ
Since there is no classical function with the property of (1.1) it is—strictly speaking—mathematically intractable. However, physicists and engineers have been successfully working with this function. Therefore, mathematicians have redefined Dirac’s delta function as the limit of a function series. This definition belongs to the mathematical apparatus of distribution theory. Still, even without this theory the engineer can work with the Dirac impulse on the basis of (1.1) to (1.3). An important property of the Dirac impulse is xðt Þ dðt T Þ ¼ xðT Þ dðt T Þ
ð1:4Þ
Sample Rate Conversion in the Context of Software Radio
9
where xðt Þ is a function (e.g., describing a signal). From (1.4) the sifting property of the Dirac impulse can be derived by using (1.2): Z1
xðt Þ dðt T Þdt ¼ xðT Þ
ð1:5Þ
1
The sum of an infinite number of T -shifted Dirac impulses is called a Dirac impulse train. Multiplying a signal with this Dirac impulse train yields the mathematical description of a sampled signal: xa ðt Þ ¼ xðt Þ T
1 X
dðt kT Þ
ð1:6Þ
xðkT Þdðt kT Þ
ð1:7Þ
k¼1
¼T
1 X k¼1
From (1.7) it can be seen that besides the Dirac impulse, only the desired samples of xðt Þ are used to describe the sampled signal. Due to (1.2) the dimension of dðt Þ must be time1 . Therefore the coefficient T is introduced in (1.6), which ensures the same dimension for xðt Þ and xa ðt Þ. One question remains: how to choose T ? The sampling theorem states that the signal xðt Þ can be perfectly reconstructed from its samples xðkT Þ; k ¼ 0; 1; 2; . . . if the sample rate 1=T is higher than the so-called Nyquist rate (i.e., twice the highest frequency component of the signal to be sampled). Otherwise, irreversible distortions result known as aliasing. This can easily be seen from frequency domain considerations. The spectrum Xa ð f Þ of xa ðt Þ can be obtained by employing the Fourier-transform1 Xa ð f Þ ¼ FT fxa ðt Þg ¼
Z1
xa ðt Þ e j2pft dt
ð1:8Þ
1
Before substituting (1.6) into (1.8), it is useful to replace the Dirac impulse train in (1.6) by its Fourier-series representation. 1 X k¼1
dðt kT Þ ¼
1 1 X k e j2pT t T k¼1
ð1:9Þ
1. It is assumed that xa ðt Þ fulfills the necessary conditions to ensure convergence of the integral.
10
Sample Rate Conversion in Software Configurable Radios
Now, (1.6) is substituted into (1.8), thereby using (1.9) for the Diracimpulse train. Xa ð f Þ ¼ FT fxa ðt Þg ¼
Z1 X 1 1
¼
Z1 1 X k¼1
¼
1 X
k
k¼1
f
k T
ð1:10Þ
k¼1
xðt Þ e j2pð f T Þt dt
1
X
k
xðt Þ e j2pT t e j2pft dt
ð1:11Þ
ð1:12Þ
Equation (1.12) has been obtained from (1.11) by using (1.8) with xa ðt Þ replaced by xðt Þ, and thus Xa ð f Þ replaced by X ð f Þ . It can be concluded that the introduction of the scaling factor T in (1.6) is necessary to maintain the original spectrum X ð f Þ as part of Xa ð f Þ for k ¼ 0 in (1.12). From (1.12) the typical characteristics of sampling can be identified: Sampling the signal xðt Þ with sampling period T causes a repetition of the spectrum X ð f Þ at integer multiples of 1=T . This effect is called imaging, the spectral copies are called images. The previously mentioned sampling theorem can easily be understood when inspecting Figure 1.6. As long as the sample rate is larger than twice the highest frequency component of X ð f Þ, there is no overlap of the images. Thus the spectrum X ð f Þ can be separated from Xa ð f Þ (which is done by lowpass filtering). If the sampling theorem is not obeyed, the images overlap. This irreversible effect is called aliasing. It can be concluded that in general, aliasing must be avoided. This will be discussed in Section 1.3.2 and in Chapter 2. 1.3.1.2
Quantization
Having discussed sampling, the second part of analog-to-digital conversion, namely quantization, is examined. Quantization is a nonlinear operation. It is a mapping of the signal values (from a possibly continuous set) to quantized signal values (of a limited set). There are uniform and nonuniform quantizer characteristics. Quantizer characteristics are uniform if the quantization step DV is constant independent of the current signal value: DV ¼
Vpp Vpp ¼ b q 2
with q ¼ 2b
ð1:13Þ
Sample Rate Conversion in the Context of Software Radio
11
Figure 1.6 Spectral characteristics of sampling, with two different sampling periods TB > TA :
where Vpp is the peak-to-peak voltage of the quantizer, and q is the number of quantization steps, here regarded as being the bth power of two. Thus, the amplitudes of the quantized signal samples can be coded with b bits. Two typical uniform quantization characteristics are shown in Figure 1.7. Nonuniform quantization characteristics are also used. They are not treated here. The quantization process causes distortions of the sampled signal. These distortions are described by the error signal that is the difference between the quantized signal xQ ðnT Þ and the signal xðnT Þ eðnT Þ ¼ xQ ðnT Þ xðnT Þ
ð1:14Þ
Due to the nonlinear character of quantization, ‘‘new’’ frequency components are created ði.e., xQ ðnT Þ consists of frequency components that were not necessarily part of x (nT )Þ. These new frequency components are harmonics and intermodulation products of the frequency components of xðnT Þ. In case of a so-called busy signal at the input of the quantizer
12
Sample Rate Conversion in Software Configurable Radios
Figure 1.7 Quantization characteristics: (a) midtread quantizer with q ¼ 9, and (b) midrise quantizer with q ¼ 8 quantization steps.
(meaning that the signal has sufficiently high amplitudes and comprises a sufficiently large number of different frequencies), the quantization error is modeled as additive white noise that is uncorrelated with the signal xðnT Þ. Thus, eðnT Þ represents white noise, called quantization noise. Obviously, there are always cases where this model is not sufficient. Nonetheless, it helps very much to estimate the theoretical performance of a quantizer in a very simple way. For a system designer, the most interesting figure resulting from modeling the quantization error as additive white noise is the signal-toquantization-noise ratio (SNR) of a quantizer and, thus, of an ADC. To determine the SNR, the signal power and the quantization-noise power must be known. Assuming a busy signal at the input of the quantizer, the quantization error eðnT Þ is a stochastic process e with constant probability density of the amplitude, as shown in Figure 1.8. With Figure 1.8, the quantization noise power Pe can be calculated as the variance s2e of the error process e (assuming an impedence level of 1O):
Sample Rate Conversion in the Context of Software Radio
13
Figure 1.8 Probability density function of the quantization error e.
Pe ¼ s2e ¼
Zemax
DV
e 2 pðeÞde ¼
emin
Z2
e2
1 1 de ¼ ðDV Þ2 DV 12
ð1:15Þ
DV 2
The signal power Px depends on the signal and on the exitation of the ADC. In general, the signal power is equal to the variance of the signal: Px ¼ s2x
ð1:16Þ
With this knowledge, we can write down the logarithmic ratio of noise power and signal power (i.e., the SNR): Px Pe 12 s2x ¼ 10 log ðDV Þ2 12 22b 2 ¼ 10 log sx Vpp2 s2 ¼ 10 log x2 þ 10 log 12 þ 10 log 22b Vpp sx ¼ 20 log þ 10:8 þ 6:02b Vpp
SNR ¼ 10 log
ð1:17Þ ð1:18Þ ð1:19Þ ð1:20Þ ð1:21Þ
Thus, the SNR rises with approximately 6 dB per additional bit quantizer resolution. sx =Vpp is the ratio between the standard deviation of the signal amplitude and the peak-to-peak voltage of the quantizer. Assuming maximum exitation of the quantizer (i.e., the maximum amplitude of the signal is Vpp =2), the ratio sx =Vpp can be interpreted as a characteristic of the signal—namely a relation between its power and its highest amplitude.
14
Sample Rate Conversion in Software Configurable Radios
pffiffiffiffiffi For a signal with equiprobable amplitudes, it is sx =Vpp ¼ 1= 12; for a pffiffiffi pure sine wave, it is sx =Vpp ¼ 1= 8. sx =Vpp results in a signal-dependent offset of the SNR, which does not influence the fundamental relation between SNR and the number of bits b. Because the quantization noise is assumed to be white, the noise power is uniformly distributed in the frequency interval ½fS =2; fS =2, where fS is the sample rate. If the quantized signal covers only a fraction of this interval, namely a bandwidth B < fS , then only the noise power within this bandwidth B really distorts the signal. The remaining noise components can be removed by filtering (see Figure 1.9). This is called oversampling (i.e., the sample rate is higher than twice the highest frequency component of the signal). The oversampling ratio (OSR) is defined as: OSR ¼
fS B
ð1:22Þ
Usually the bandwidth B is located symmetrically at frequency f ¼ 0. Because only the noise power inside the bandwidth B is of interest, the relevant noise power is reduced by OSR if the power spectral density (PSD) of the noise is constant (Figure 1.9). It is Pe ðOSRÞ ¼
1 Pe OSR
ð1:23Þ
Thus, the SNR in the relevant frequency interval is SNROSR
Px ¼ 10 log OSR Pe
SNROSR ¼ 20 log
sx þ 10:8 þ 6:02b þ 10 log OSR Vpp
ð1:24Þ ð1:25Þ
Figure 1.9 Illustrating the effect of oversampling. (Note that PSD refers to power spectral density.)
Sample Rate Conversion in the Context of Software Radio
15
When referring to memoryless ADCs, it is this SNR that is referred. From (1.25) it can be concluded that 1. The SNR rises with 6.02 dB per additional bit of quantizer resolution. 2. The SNR rises with 3.01 dB per doubling the oversampling ratio, which is equivalent to 1/2-bit quantizer resolution. Thus, oversampling by a factor OSR leads to a gain of quantizer resolution of 1 b ¼ log2 OSR 2
bit
ð1:26Þ
It can be concluded that the resolution gain obtained from oversampling is comparatively low. Before leaving the subject of quantization, a generalized type of oversampling is introduced. It is called generalized oversampling. The idea behind this is that the signal at the input of the quantizer can be a multichannel mobile communications signal (i.e., the available bandwidth fS =2 < f fS =2 is fully occupied by the multichannel signal). There is no oversampling in the conventional way. However, a certain channel of bandwidth b (i.e., the channel of interest) covers only a fraction of the available bandwidth (see Figure 1.10, which illustrates the generalized oversampling ratio (GOSR) of a signal). Thus, the channel of interest is oversampled by the factor
Figure 1.10 Illustrating the GOSR of a signal.
16
Sample Rate Conversion in Software Configurable Radios
GOSR ¼
fS b
ð1:27Þ
The difference between conventional and generalized oversampling is that in the case of generalized oversampling, the power of the channel of interest is lower than the total signal power. The total signal power is the one that determines peak-to-peak excitation of the ADC, while the power of the channel of interest equals the signal power in the SNR calculations. A very rough estimate is to assume that the signal power Px ðGOSRÞ (i.e., the power of the channel of interest) is GOSR times lower than the total signal power Px Px ðGOSRÞ ¼
1 Px GOSR
ð1:28Þ
and the quantization-noise power inside the bandwidth b is Pe ðGOSRÞ ¼
1 Pe GOSR
ð1:29Þ
Thus, we can conclude that the SNR with generalized oversampling is Px =GOSR SNRGOSR ¼ 10 log ð1:30Þ Pe =GOSR SNRGOSR ¼ SNR
ð1:31Þ
Hence, there is no gain from generalized oversampling if the quantization error can be regarded as additive white noise, as introduced earlier. 1.3.1.3
Sigma-Delta Modulation
Noise-shaping techniques can be employed to increase the resolution gain from oversampling. Sigma-delta modulators (SDMs) are such noise shapers. They are part of sigma-delta ADCs, which are commonly regarded as a combination of an SDM and a decimator. The latter is a digital filter that attenuates aliasing components before the sample rate of the highly oversampled signal is reduced (this is covered comprehensively in Chapter 4). This combined view might be good for a chip manufacturer, but in the context of signal processing it is not advantageous. Instead, a separated view will be discussed here. The SDM is the analog-to-digital interface and is therefore a separate unit that itself can be called an ADC. Everything that follows the modulator is digital signal processing and should therefore be looked at in conjunction with the other digital signal processing functionality.
Sample Rate Conversion in the Context of Software Radio
17
The SDM usually comprises a noise-shaping filter and a quantizer, together in a feedback loop. More generally, it can be modeled as shown in Figure 1.11 [12, 13]. It should be noted that this is a discrete-time model, which is a relevant model because SDMs can be realized by discrete-time switched capacitor technology. The quantizer in the feedback loop is nonlinear. Therefore, an SDM is a nonlinear system. In order to estimate its behavior in terms of SNR, a linearized model is obtained by replacing the quantizer by an additive white noise source with noise characteristics as described earlier. This leads to a system with two inputs, namely signal X ðzÞ and noise E ðzÞ, and one output Y ðzÞ. Thus, two transfer functions of the discrete-time system can be derived: the signal-transfer function STF ðzÞ and the noise-transfer function NTF ðzÞ: Y ðzÞ AðzÞ ¼ X ðzÞ 1 BðzÞ Y ðzÞ 1 ¼ NTF ðzÞ ¼ E ðzÞ 1 BðzÞ STF ðzÞ ¼
ð1:32Þ ð1:33Þ
By properly selecting AðzÞ and BðzÞ, it becomes, in principle, possible to separate signal and noise. AðzÞ and BðzÞ can be merged to form the socalled loop filter. Thus, designing the loop filter is the key. For our short excursion to SDMs, the classical double-integrating SDM as shown in Figure 1.12 is chosen, resulting in
Figure 1.11 Generic SDM, adapted from [2]. Ó 1999 by Kluwer Academic Publishers.
Figure 1.12 Second-order lowpass SDM with double-integration (quantizer modeled as additive noise source), adapted from [2]. Ó 1999 by Kluwer Academic Publishers.
18
Sample Rate Conversion in Software Configurable Radios
STF ðzÞ ¼ z 1
ð1:34Þ
NTF ðzÞ ¼ ð1 z
1 2
Þ
ð1:35Þ
Evaluating the NTF on the unit circle yields the frequency characteristics:
f 2 j2pf S ð1:36Þ NTF e j2pf =fS ¼ 1 e 2 f pf j2pf S sin ¼ 4e ð1:37Þ fS This represents highpass filtering. Hence, the quantization noise is highpass filtered. If the signal is highly oversampled (i.e., it covers only a small bandwidth B around f ¼ 0), not much quantization noise can distort the signal. The resulting noise power within the bandwidth B is equal to the integral over the power spectral density of the quantization noise multiplied with the squared magnitude of the frequency characteristics of (1.37): B
Pe jSDM
Z 2 4 Pe pf ¼ 16 sin df fS fS B2
3 1 1 p sin ¼ Pe 16 8 OSR 2p OSR Pe
p4 5 OSR 5
ð1:38Þ !
! 1 2p sin þ 16p OSR
for OSR 4
ð1:39Þ ð1:40Þ
Equation (1.40) has been obtained by approximating the sine function of (1.39) with a third-order Taylor series that holds if the OSR is larger than 4. Finally, the SNR of the second-order SDM of Figure 1.12 is SNRSDM ¼ 20 log
sx 5 þ 10:8 þ 6:02b þ 10 log 4 þ 50 log OSR p Vpp
for OSR 4 sx ¼ 20 log 2:1 þ 6:02b þ 50 log OSR Vpp for OSR 4
ð1:41Þ
ð1:42Þ
The presented technique can be extended to Lth order SDMs employing integrators as loop filters [14]:
Sample Rate Conversion in the Context of Software Radio
SNROSR ¼ 20 log
19
sx 2L þ 1 þ 10:8 þ 6:02b þ 10 log 2L p Vpp
þ ð2L þ 1Þ10 log OSR
for OSR 4
ð1:43Þ
From (1.43) it can be concluded that: 1. The SNR rises with 6.02 dB per additional bit of quantizer resolution. 2. The SNR rises with 6ðL þ 1=2Þ dB per doubling of the OSR, equivalent to L þ 1=2 bit quantizer resolution. Hence, oversampling by a factor OSR with an Lth order SDM leads to a resolution gain equivalent to 1 ð1:44Þ log2 OSR bit b¼ Lþ 2 In the case of generalized oversampling, (1.27) and (1.28) can be employed leading to SNRGOSR ¼ 20 log
sx 2L þ 1 þ 10:8 þ 6:02b þ 10 log 2L p Vpp
þ ð2LÞ10 log GOSR
for GOSR 4
ð1:45Þ
The resulting gain from generalized oversampling is b ¼ L log2 GOSR
bit
ð1:46Þ
The main advantage of sigma-delta modulation is that quantizer resolution (number of bits b) can be traded off against the oversampling ratio, with much greater effect than in the case of memoryless ADCs. By choosing a higher-order loop filter in the modulator or by choosing a very high OSR, the resolution gain from oversampling becomes so high that the quantizer can have a small number of bits, typically only 1 bit. However, it should be mentioned that loop filters of an order higher than 2 cannot analytically be designed to be stable. So far, only simulations have lead to ‘‘practically stable’’ higher-order modulators. The possibility of using simpler quantizers increases linearity and reduces cost and power consumption. A drawback of SDMs is that the high SNR is only achievable in the stopband of the noise-shaping filter. In the context of mobile communications, this means that only one (or very few) channel of interest can be digitized. As long as parameterizable loop filters
20
Sample Rate Conversion in Software Configurable Radios
are not available, this channel of interest must be centered in the stopband of the noise-shaping filter that can be a lowpass filter, as in Figure 1.12, or a bandpass filter. Concluding the remarks on sigma-delta analog-to-digital conversion, it should be mentioned that a comprehensive overview on this topic can be found in [14, 15]. The application to digitization in mobile communications terminals has been proposed in [2, 16]. 1.3.1.4
Conclusion
Concluding the discussion on ADCs, it should be mentioned that the quantizer resolution and the sampling frequency are limited by technology. Beside quantization noise, the following technology-dependent mechanisms limit the achievable SNR [17]: 1. Input-referred circuit noise (equivalent thermal noise); 2. Aperture uncertainty (sampling jitter); 3. Comparator ambiguity. As claimed in [17], aperture uncertainty is the most limiting factor, with only small improvements in terms of SNR over the last few years.
1.3.2 SRC Having discussed the issues with analog-to-digital conversion, we now know that the sample rate is an important concern that is vital to properly interpret and reconstruct the analog signal from its samples. Moreover, we have learned that as long as the sampling theorem is obeyed, the actual known sample rate can be varied to meet other system requirements. Therefore, it is possible that two digital signals with different sample rates represent the same continuous-time signal (i.e., both signals carry the same information). Audio signals are used as an example. If the audio-signal spectrum is limited to an upper frequency of 20 kHz, it does not matter if the music is recorded on a compact disc (CD) recorder with a sample rate of 44.1 kHz or on a digital audio tape (DAT) recorder with a sample rate of 48 kHz. However, what happens if the signal is recorded with 44.1 kHz on a CD recorder and we want to copy it to the DAT recorder that works with a sample rate of 48 kHz? This question can be formulated more generally: How can a digital signal be represented at a different sample rate than that at which it was first acquired? The answer is SRC.
Sample Rate Conversion in the Context of Software Radio
21
In software radio terminals, the problem of SRC emerges if the sample rate of the ADC is different from the symbol, chip, or bit rate (i.e., the target rate) of the air interface whose signals are processed. This is a problem because baseband processing is usually carried out at the target rate and not at an arbitrary sample rate. Because a software radio terminal should support a great variety of air interfaces, many different target rates must be supported. This can, in principle, be realized by clocking the ADC at a rate specific to the actual air interface, which means that a tunable oscillator of high quality (low jitter) must be designed to the terminal. Complex analog components must be avoided in mass production. Therefore, a tunable sample rate of the ADC is not the best choice. Alternatively, a digital signal with the target sample rate can be obtained directly from the first digital signal provided by the ADC. SRC is the solution. In the case of equidistant sampling with two different sampling periods T1 ; T2 2 R, and k; m 2 Z, SRC can be defined as follows: A discrete-time signal xðmT2 Þ shall be derived from the signal xðkT1 Þ, which is the result of sampling a continuous-time signal xðt Þ with period T1 , where the signal xðmT2 Þ shall equal the result of hypothetically sampling xðt Þ with period T2 .
This target can only be achieved under certain conditions. However, it must be noted that in some cases it might not be necessary to absolutely achieve this target. Instead it can be sufficient to merely maintain certain characteristics of the signal xðt Þ. This will be investigated in Chapter 2. Throughout this book, only equidistant sampling periods are considered. Hence, SRC can be characterized by a factor relating both the sample rate of the original (input) signal and that of the new (output) signal. Generally, this factor is a real number. Considering certain subsets of the real numbers, special types of SRC result (e.g., integer factor SRC that can be used for increasing or reducing the sample rate of a signal by integer factors). As will be seen, SRC is a special process of sampling. Therefore, all characteristics and rules known from sampling theory also apply to SRC, especially the two fundamental effects imaging and aliasing. 1.3.2.1
Notation
Discrete-time signals are defined as sequences. Sampling a signal xðt Þ with a period T1 yields the sequence s½k j s½k ¼ xðkT1 Þ ; k 2 Z
22
Sample Rate Conversion in Software Configurable Radios
The relationship between the elements of s½k and the sampling period T1 is lost with such a definition. However, in the context of SRC and multirate signal processing, this timing relationship is vital for understanding, as one sees from the earlier definition of SRC. Therefore, instead of writing s½k in this book, all signals are described as samples xðkT1 Þ of a continuous-time signal xðt Þ. In cases where the relationship to a continuous-time signal is not obvious, or where the timing relationship is evident from the context, the sampling period is omitted. 1.3.3 Channelization First a definition of what will be understood by channelization is given: Channelization is the function that comprises all necessary tasks to extract one or more user channels for further processing at baseband, thus involving downconversion, channel filtering, and possibly despreading. 1.3.3.1
Digital Downconversion
The point of downconversion is to shift a signal by fIF in the frequency domain. A channel of interest centered around the intermediate frequency f IF is thus shifted to baseband. Downconversion of a signal to baseband is realized by multiplying the IF (or RF) signal with a rotating complex phasor. xBB ðt Þ ¼ xðt Þ e j2pfIF t
ð1:47Þ
Digital downconversion (DDC) is the digital equivalent of (1.47). xBB ðnT Þ ¼ xðnT Þ e j2pfIF nT
ð1:48Þ
Obviously, each sample xBB ðnT Þ of the downconverted signal is the result of a complex multiplication. The complex samples e j2pfIF nT of the rotating phasor can be: Stored in memory; Calculated on-line (e.g., by using the coordinate rotation digital computer (CORDIC) algorithm [18], which has the great advantage of providing the samples of the respective sine and cosine functions simultaneously). An alternative to implementing the complex multiplication is to use the CORDIC algorithm as a vector rotator [19]. In this case, the CORDIC algorithm provides the complex samples of the rotating phasor and performs the multiplication all at once.
Sample Rate Conversion in the Context of Software Radio
23
DDC can be simplified considerably if the center frequency of the signal equals a certain fraction of the sample rate. If the center frequency of the channel of interest before digitization equals an odd multiple of a quarter of the sample rate, at a quarter of the sample rate the channel is centered after digitization i.e., fIF ¼ 1=ð4T Þ . Hence, p
xBB ðnT Þ ¼ xðnT Þ e j 2n with e
j p2n
¼ f1; j; 1; j; . . .g
ð1:49Þ ð1:50Þ
Thus, in this case, downconversion can be accomplished by simply multiplying the digital IF signal with the sequences f1; 0; 1; 0g and f0; 1; 0; 1g, representing the real and imaginary part of the complex rotating phasor at a quarter of the sample rate. This technique is well documented [20, 21]. Other simplifications (e.g., downconversion of signals centered about 1/8 of the sample rate [22]) are also possible. All of these solutions are based on multiplying the signal with sequences comprising the factors f0; 1; 1g and scaling the result with a fixed factor if required [23]. For more details on DDC, the reader is referred to [7]. 1.3.3.2
Channel Filtering
Apart from downconversion, channel filtering is required to extract frequency divided channels from a wideband signal. The channel filter must attenuate adjacent-channel interferers and meet the so-called blocking characteristic requirements of the particular air interface. Dynamic range leads to requirements similar to those that the ADC has to meet. In software radio terminals where the channel filter must be tunable to the application requirements, it is possible to follow two fundamentally different approaches: 1. The filters can be implemented on reconfigurable hardware (e.g., on field programmable gate arrays (FPGAs) that enable a complete reconfiguration for different air interfaces). Thus, the filters can be optimized for each air interface individually. 2. Another approach is to find a common hardware platform that can serve all of the filter requirements in the context of channel filtering in software radio terminals. This hardware platform is not reconfigurable but parameterizable. It can be realized as an ASIC. While the first approach does not bear challenges for the designer (as to the filter algorithms themselves), the latter requires sophisticated solutions due
24
Sample Rate Conversion in Software Configurable Radios
to the possibly great diversity of filter characteristics that must be supported. However, this is rewarded with a much more efficient realization than the FPGA-based one. Conventional solutions (e.g., direct finite-length impules response (FIR) filters or polyphase filters), are not well suited for the second approach. Because the filter characteristics depend not only on the coefficient values but also on the number of coefficients, it is difficult to decide how many coefficients must be foreseen. A possible solution to overcome this problem is the application of multirate filters, which can be parameterized easily by choosing the ratechange factor [24]. 1.3.3.3
Despreading
In spread-spectrum systems (e.g., wideband code division multiple access (W-CDMA)) the user-channel selection is done by despreading. The rake receiver is a prominent solution in a typical multipath environment. It employs several identical parallel rake fingers, which themselves are realized by a correlator and a decimator. Each rake finger can be regarded as a symbol-matched filter. The different fingers ‘‘collect’’ the same symbol arriving from different propagation paths. A final combination of the results of all the rake fingers yields the received symbol sample. The correlator is usually realized by a multiplier for multiplying the spreading code with the signal, followed by an integrate-and-dump circuit. Because the spreading code is binary or ternary, the multiplier can often be realized by a simple switch. 1.3.3.4
Multiple-Channel Versus Single-Channel Reception
There are two possible areas of application for channelization. In a mobile terminal, only one channel must be selected, while a base station needs to select many channels. As to the first case, downconversion and filtering/ despreading can be applied, as briefly described earlier. The result is a one-channel channelizer. If several channels must be selected, it is possible to use the per-channel approach, which essentially is a parallel realization of M one-channel channelizers, if M is the number of channels. An alternative approach is the filter bank channelizer. Among others, Zangi and Koilpillai [25] have favored this solution, which is based on the discrete Fourier transform (DFT) filter bank and polyphase filter framework [24, 26]. A characteristic of these DFT filter banks is that the sample rate of the incoming signal must be an integer multiple of the channel spacing. Simultaneously, the output sample rate is an integer multiple of the channel
Sample Rate Conversion in the Context of Software Radio
25
spacing. Consequently, there is a dependency between input sample rate, channel spacing, and output sample rate. The number of channels is determined by the number of polyphase branches of the filter, which, moreover, is a power of 2 if the DFT is implemented by means of a fast Fourier transform (FFT). In a fixed hardware platform with a fixed number of polyphase branches, SRC must be performed before and after channelization. While the latter is no problem, SRC before channelization is difficult to realize due to the high dynamic range and the wideband character of the signal (see also Section 7.3). For details on multiple-channel reception, see [27]. 1.3.4 Application of SRC At the end of this chapter it should be stressed that SRC is used in many applications. It is not limited to digital radio. Whenever two digital systems with different sample rates are connected, SRC is required. As mentioned in Section 1.3.2, digital audio signal processing is an area in which SRC is widely used. Digital control is another field of application for SRC [28]. Although SRC is treated with respect to digital radio (specifically, software radio) in this book, it should be stressed that any of the presented techniques and methods can also be used in other applications. The material in Chapter 2 prepares the reader both for the remainder of this book and to exploit other areas of application of SRC.
1.3.5 Summary and Conclusion Analog-to-digital conversion, channelization, and SRC have been identified as critical functions of a software radio receiver. The critical functions of analog-to-digital conversion and channelization are part of every conventional digital communications receiver. Although problems arise with their realization for software-defined radio, especially with analog-to-digital conversion, their theoretical foundation has been well investigated. However, there are still many outstanding research issues concerned with the efficient implementation of SRC. The necessity for SRC in communications receivers arises with the need to implement different air interfaces (e.g., in a software radio terminal). It is well known that readily available solutions to SRC are based on interpolation, which is a well-investigated mathematical problem. Interpolation is not a generally applicable solution to SRC. A considerable part
26
Sample Rate Conversion in Software Configurable Radios
of this book is dedicated to prove this claim, and moreover, to suggest solutions that perform better than interpolation. Chapter 2 deals with the theoretical background of sampling and SRC. Moreover, the idea of block processing is introduced, which greatly simplifies and harmonizes the derivations of solutions for SRC. Besides very few conference publications, this is the first time that SRC is comprehensively tackled on the basis of block processing. Before dealing with systems for SRC, the concept for SRC in software radio terminals is introduced in Chapter 3. In conjunction with the theoretical background, the treatment of systems for integer factor SRC in Chapters 4 and 5 represents a main part of this book. Well-known concepts for SRC are repeated in the context of the block-processing framework. Moreover, several novel concepts are presented. Based on the concepts for integer factor SRC, systems for fractional SRC are investigated in Chapter 6. Finally, selected solutions are compared in the context of an application.
References [1]
Mitola III, J., ‘‘Software Radio Architecture: A Mathematical Perspective,’’ IEEE Journal on Selected Areas in Communications, Vol. 17, April 1999, pp. 514–538.
[2]
Hentschel, T., and G. P. Fettweis, ‘‘Software Radio Receivers,’’ in CDMA Techniques for Third Generation Mobile Systems, Swarts, Pieter van Rooyen et. al. (eds.), Boston, MA: Kluwer Academic Publishers, 1999, pp. 257–283.
[3]
‘‘Digital Cellular Telecommunications System (Phase 2+),’’ Radio Transmission and Reception (GSM 05.05 version 5.9.0 Release 1996), European Telecommunication Standard pr ETS 300 910, July 1998. DRAFT.
[4]
Beach, M., ‘‘Radio Frequency Design for SDR,’’ in Software Radio: Enabling Technologies, Walter Tuttlebee (ed.), Chichester, West Sussex, England: John Wiley & Sons Limited, 2002.
[5]
Mirabbasi, S., and K. Martin, ‘‘Classical and Modern Receiver Architectures,’’ IEEE Communications Magazine, Vol. 38, No. 11, November 2000, pp. 132–139.
[6]
Hentschel, T., M. Henker, and G. P. Fettweis, ‘‘The Digital Front-End of Software Radio Terminals,’’ IEEE Personal Communications, Vol. 6, No. 4, August 1999, pp. 40–46.
[7]
Hentschel, T., and G. Fettweis, ‘‘The Digital Front-End — Bridge Between RF- and Baseband-Processing,’’ in Software Radio: Enabling Technologies, Walter Tuttlebee (ed.), Chichester, West Sussex, England: John Wiley & Sons Limited, 2002.
[8]
Gunn, J. E., K. S. Barron, and W. Ruczczyk, ‘‘A Low-Power DSP Core-Based Software Radio Architecture,’’ IEEE Journal on Selected Areas in Communications, Vol. 17, No. 4, April 1999, pp. 574–590.
Sample Rate Conversion in the Context of Software Radio
27
[9]
Mitola III, J., ‘‘The Software Radio Architecture,’’ IEEE Communications Magazine, May 1995, pp. 26–38.
[10]
Oppenheim, A. V., and R. W. Schafer, Discrete-Time Signal Processing, Englewood Cliffs, NJ: Prentice-Hall, 1989.
[11]
Proakis, J. G., and D. G. Manolakis, Digital Signal Processing, Englewood Cliffs, NJ: Prentice-Hall, Inc., 1996.
[12]
Jantzi, S. A., W. M. Snelgrove, and P. F. Ferguson, Jr., ‘‘A Fourth-Order Bandpass Sigma-Delta Modulator,’’ IEEE Jounal of Solid State Circuits, Vol. 28, No. 3, March 1993, pp. 282–291.
[13]
Shoaei, O., and W. M. Snelgrove, ‘‘Optimal (Bandpass) Continuous-Time SD Modulator,’’ in Proceedings of the ISCAS, London, England, May 30–June 2, 1994, pp. 489–492.
[14]
Aziz, P. M., H. V. Sorensen, and J. van der Spiegel, ‘‘An Overview of Sigma-Delta Converters,’’ IEEE Signal Processing Magazine, January 1996, pp. 61–84.
[15]
Norsworthy, S. R., R. Schreier, and G. C. Temes, Delta-Sigma Data Converters — Theory, Design and Simulation, Piscataway, NJ: IEEE Press, 1996.
[16]
Hentschel, T., and G. P. Fettweis, ‘‘AD Conversion and Channelization for MultiMode Terminals,’’ in MTT-S European Wireless 98, Amsterdam, The Netherlands, October 8–9, 1998, pp. 169–174.
[17]
Walden, R. H., ‘‘Analog-to-Digital Converter Survey and Analysis,’’ IEEE Jounal on Selected Areas in Communications, Vol. 17, No. 4, April 1999, pp. 539–550.
[18]
Edwards, B. H., R. T. Jackson, and J. M. Underwood. ‘‘How Do Calculators Calculate?’’ in Proceedings of the 9th Annual International Conference on Technology in Collegiate Mathematics, Reno, NV, November 1996.
[19]
Lo¨hning, M., T. Hentschel, and G. P. Fettweis, ‘‘Digital Down Conversion in Software Radio Terminals,’’ in Proceedings of the 10th European Signal Processing Conference (EUSIPCO), Vol. 3, Tampere, Finland, September 5–8, 2000, pp. 1517–1520.
[20]
Boehm, K., et. al., ‘‘An IF Digitizing Receiver for a Combined GPS/GSM Terminal,’’ in IEEE Radio and Wireless Conference (RAWCON), August 1998, pp. 39–42.
[21]
Mu¨ller, T., K. Boehm, and T. Hentschel, ‘‘A GSM/GPS Receiver With a Bandpass Sigma-Delta Analog to Digital Converter,’’ in Proceedings of the European Microwave Conference, Munich, Germany, Vol. 2, October 1999, pp. 295–298. Also published in Proc. of the European Wireless 1999, Munich, Germany, pp. 27–30.
[22]
Schreier, R., and W. Martin Snelgrove, ‘‘Decimation for Bandpass Sigma-Delta Analog-to-Digital Conversion,’’ in IEEE International Symposium on Circuits and Systems (ISCAS), May 1990, pp. 1801–1804.
[23]
Fettweis, A., ‘‘Method and Apparatus for Frequency Division Multiplex System,’’ U.S.-patent US4326288, April 1982.
[24]
Crochiere, R. E., and L. R. Rabiner, Multirate Digital Signal Processing, Englewood Cliffs, NJ: Prentice-Hall, 1983.
28
Sample Rate Conversion in Software Configurable Radios
[25]
Zangi, K. C., and R. D. Koilpillai, ‘‘Software Radio Issues in Cellular Base Stations,’’ IEEE Jounal on Selected Areas in Communications, Vol. 17, No. 4, April 1999, pp. 561–573.
[26]
Vaidyanathan, P. P., Multirate Systems and Filter Banks, Englewood Cliffs, NJ: Prentice Hall 1993.
[27]
Hentschel, T., ‘‘Channelization for Software Defined Base-Stations,’’ Annales des Te´le´communications, special issue on software radio, May/June 2002.
[28]
Feuer, A., and G. C. Goodwin, Sampling in Digital Signal Processing and Control, Boston, MA: Birkha¨user, 1996.
2 Basic Principles of SRC and Multirate Systems 2.1 Introduction As discussed in Section 1.3.2, the problem of SRC arises when a discrete-time signal whose samples are located at well-defined positions in time has to be processed in a way that a new discrete-time signal is generated with its samples located at different positions. This process should maintain the key information of the original signal. In this chapter, the necessary fundamentals are discussed. Well-known approaches to SRC are discussed. The discussion starts with an analog interpretation of SRC. From this, it is possible to derive the equations describing digital SRC. The obtained general result will be used to derive SRC by a rational factor as well as integer factor SRC (i.e., decimation and interpolation). A second part of this chapter deals with signal processing concepts that will be used in Chapters 4, 5, and 6. It will be seen that systems for SRC are linear periodically time-varying systems. The analysis of such systems can be simplified when transforming them into linear time-invariant block systems. This approach is strongly related to the polyphase concept. To fully exploit this, a polyphase description of general transfer functions and impulse responses (i.e., not limited to finite-length impulse responses) is given based on the state-space description of linear time-invariant systems.
29
30
Sample Rate Conversion in Software Configurable Radios
2.2 Basic Considerations of SRC 2.2.1 Resampling After Reconstruction 2.2.1.1
An Analog Interpretation
The starting point of SRC is a discrete-time signal. In order to perform SRC, some intersample values must be calculated. It is an open question how to do this. The sampling theorem may be applied. It states that a bandlimited signal of finite energy can be reconstructed from its samples as long as the sample rate is higher than two samples per period of the highest frequency of the signal. This condition can be formulated as: the sample rate must be higher than the ‘‘two-sided’’ bandwidth of the signal (see Section 1.3.1). Hence, if it is possible to reconstruct a continuous-time signal from the discrete-time signal, the reconstructed signal can be newly sampled with a new sample rate. A system realizing this approach, resampling after reconstruction, is sketched in Figure 2.1. Resampling after reconstruction is a model that helps us to analyze and understand SRC. However, it is not a pragmatic means of realizing SRC. The signal xa ðt Þ is defined according to (1.6) and (1.7). xa ðt Þ ¼ T1
1 X
x ðkT1 Þdðt kT1 Þ
k ¼ 1
¼ xðt Þ T1
1 X
ð2:1Þ dðt kT1 Þ
k ¼ 1
with x ðkT1 Þ representing samples of the analog signal xðt Þ. The spectrum Xa ðf Þ of xa ðt Þ can be calculated by applying the Fourier-transform (see (1.8) to (1.12)):
Figure 2.1 Resampling of a reconstructed discrete-time signal, adapted from [1]. Ó 1999 by IEEE.
Basic Principles of SRC and Multirate Systems
Xa ð f Þ ¼ FTfxa ðt Þg ¼
1 X
X
k ¼ 1
k f T1
31
ð2:2Þ
where X ð f Þ is the Fourier transform of xðt Þ. Equation (2.2) describes the well-known spectral repetition due to sampling. It is assumed that the sampling period T1 is sufficiently short to cause no aliasing: jX ð f Þj ¼ jFTfxðt Þgj ¼ 0
for j f j
1 2T1
ð2:3Þ
In this case xðt Þ can be reconstructed from its samples xðkT1 Þ according to the Cardinal series [2] 1Þ 1 sin pðt kT X T1 x ðkT1 Þ pðt kT Þ ð2:4Þ xðt Þ ¼ 1
k ¼ 1
T1
This can also be interpreted as filtering with an ideal lowpass filter having its cut-off frequency at half the sample rate [3]. Equation (2.4) can be generalized by introducing a reconstruction filter with the impulse response hc ðt Þ. Hence, the output signal yðt Þ of this reconstruction filter is yðt Þ ¼
¼
Z1
xa ðtÞhc ðt tÞd t
t ¼ 1 Z1
1 X
T1 t ¼ 1 1 X
¼ T1
x ðkT1 Þdðt kT1 Þhc ðt tÞd t
k ¼ 1
x ðkT1 Þhc ðt kT1 Þ
ð2:5Þ
k ¼ 1
With (2.4) it can be concluded that yðt Þ ¼ xðt Þ for
hc ðt Þ ¼
sin Tpt1 pt
1 t ¼ sinc T1 T1
ð2:6Þ
Resampling the reconstructed signal yields: y ðmT2 Þ ¼ T1
1 X k ¼ 1
x ðkT1 Þ hc ðmT2 kT1 Þ
ð2:7Þ
32
Sample Rate Conversion in Software Configurable Radios
For reasons of simplicity, the following normalization of the impulse response of the reconstruction filter is introduced: hðt Þ :¼ T1 hc ðt Þ
ð2:8Þ
Note, that hðt Þ has no dimension. Thus, (2.7) can be rewritten as y ðmT2 Þ ¼
1 X
x ðkT1 Þ h ðmT2 kT1 Þ
ð2:9Þ
k ¼ 1
Equation (2.9) is a convolution. It involves samples of the impulse response hðt Þ at positions ðmT2 kT1 Þ. The understanding of (2.9) can be facilitated when rearranging the arguments of x and h: mT2 x ðkT1 Þ h T1 k y ðmT2 Þ ¼ T1 k ¼ 1 1 X mT2 x ðkT1 Þ h T1 þ mm k ¼ T1 k ¼ 1 1 X
mT2 n h T1 ðn þ mm Þ x T1 ¼ T1 n ¼ 1 1 X
ð2:10Þ
ð2:11Þ
with mT2 mT2 mm ¼ T1 T1 mT2 n¼ k T1
ð2:12Þ ð2:13Þ
For mm the following inequality holds: 0 mm < 1
ð2:14Þ
The quantity mm reflects the position of the current sample within the sample period T1 . It is called the intersample position. From (2.11) some obvious points can be derived:
Equation (2.11) is a direct digital representation of SRC.
The impulse response hðt Þ is sampled with period T1 of the input signal, and then with different time offsets mm T1 , which depend on
Basic Principles of SRC and Multirate Systems
33
the position of the output sample with respect to the input samples.
Thus, to calculate different output samples, different sets of samples of the filter impulse response hðt Þ are used.
For T1 ¼ T2 ¼ T , (2.11) reduces to the well-known discrete convolution 1 X
x T ðm nÞ hðnT Þ ð2:15Þ yðmT Þ ¼ n ¼ 1
Thus, we have obtained a description of SRC for arbitrary sample periods T1 and T2 . However, it is still open if the signal after SRC contains the same information as the signal before SRC. For the case
jX ð f Þj ¼ jFTfxðt Þgj ¼ 0
1 1 ; for j f j min 2T1 2T2
ð2:16Þ
and perfect reconstruction according to (2.6) it can be concluded that perfectly reconstructing xðkT1 Þ will yield the same result as perfectly reconstructing yðmT2 Þ. A deeper insight in the characteristics of SRC can be obtained when considering the spectra of the individual signals of Figure 2.1. For that purpose ya ðt Þ ¼ T2
1 X
y ðmT2 Þdðt mT2 Þ
ð2:17Þ
m¼1
is defined following (2.1). 2.2.1.2
Spectral Interpretation of Resampling
In Figure 2.2, the spectral interpretation of the different steps of signal processing, from sampling the signal xðt Þ to resampling yðt Þ, is sketched. The reconstruction filter hc cancels all signal components resulting from spectral repetition (images), thus yielding a band-limited signal and avoiding aliasing. However, a perfect reconstruction filter cannot be realized. For practical applications, the constraints on hc can be relaxed if certain amounts of aliasing and passband attenuation are allowed. For example, 8 > < ¼ 1 d 0 j f j < fc fc j f j < fstop ð2:18Þ jHc ð f Þj ¼ jFTfhc ðt Þgj 1 > : H 1 fstop j f j < T2 stop
34
Sample Rate Conversion in Software Configurable Radios
Figure 2.2 Spectral interpretation of resampling of a reconstructed signal, adapted from [1]. Ó 1999 by IEEE.
Basic Principles of SRC and Multirate Systems
35
with d being the passband ripple, fc the cut-off frequency, fstop the stopband frequency, and 1=Hstop the stopband attenuation. After resampling, only the frequency band 0 j f j < T12 fstop is free of aliasing, depending on the stopband attenuation 1=Hstop and the characteristics of the signal x ðkT1 Þ. However, especially when considering only one channel of a multichannel communications signal—if there is a GOSR > 1 for the channel of interest (see Section 1.3.1)—it is not necessary to reconstruct (interpolate) the complete multichannel signal. Instead, the amount of aliasing in the channel of interest must be controlled in order to preserve the interesting information. This is shown in Figure 2.3. Substituting this spectrum to Figure 2.2 immediately reveals that there is only a very small region that must be kept free from aliasing. This has direct influence on the design constraints of the filter hc . Concluding this short discussion leads to the following remark. 2.2.1.3
Key Note
Antialiasing is the most prominent constraint to be obeyed by an SRC system.
The reconstruction filter hc can be regarded as a filter that attenuates distorting components of xa ðt Þ. These distorting components are those signal components that potentially cause aliasing. With the applicationdependent definition of the frequency band that has to be kept free from aliasing, the antialiasing filter hc can be designed. All aliasing components
Figure 2.3 Wideband signal comprising several channels (multichannel signal) with channel of interest and region of allowed aliasing.
36
Sample Rate Conversion in Software Configurable Radios
that do not fall in the frequency band that has to be kept aliasing-free can be removed by filtering after SRC. On the basis of this antialiasing constraint, the filter hc can be simplified considerably. 2.2.1.4
Some Notes on Interpolation
Very often, SRC is equated with interpolation. Historically, interpolation is a mathematical problem of calculating in-between values of tabulated functions. The interpolation problem can be formulated as follows: n þ 1 numbers a t0 < t1 < t2 < . . . < tn b are given in the interval ½a; b. Moreover, n þ 1 real numbers yi ði ¼ 0; 1; . . . ; nÞ (e.g., representing the samples of a function yðtÞ) are given. The interpolation problem is then generally defined as finding a polynomial In ðtÞ of maximum degree n, so that In ðti Þ ¼ yi for 0 i n, thus finding a polynomial that takes the originally given samples at the positions defined by the numbers ti ði ¼ 0; 1; . . . ; nÞ. Under these constraints, exactly one polynomial In ðtÞ exists [4].
The representation of this polynomial can vary. It can be based upon different interpolation formulas (e.g., the Lagrange, Newton, Stirling, or Gau interpolation formulas). Usually, signals are equidistantly sampled in the context of communications. Moreover, the number of samples ðn þ 1Þ of a signal is generally very large, which makes the application of interpolation (as defined earlier) infeasible. Therefore, piecewise polynomial interpolation can be applied to such equidistantly sampled signals. An alternative approach is spline interpolation [5]. Splines are piecewise polynomials that are smoothly connected together. Piecewise polynomial interpolation including spline interpolation can be interpreted as a filtering operation [5–7]. The following fundamental property of the impulse response of interpolation filters can be derived from this interpretation and the definition of interpolation [8]: 1 if k ¼ 0 ð2:19Þ h ðkT1 Þ ¼ 0 if k ¼ 1; 2; . . . Obviously, (2.19) does not limit the impulse response to be derived from polynomial interpolation of given samples. It is interesting to note that the ideal lowpass filter of (2.6) and any derivatives of it obtained by windowing are interpolation filters with respect to (2.19). Although polynomial filters are not the only filters fulfilling (2.19), interpolation in the digital domain is usually related to the application
Basic Principles of SRC and Multirate Systems
37
of polynomial filters. This is because the sampled impulse response of polynomial filters can be calculated with relatively low effort in real time, thus providing a means to avoid large coefficient memories. Polynomial interpolation filters derived from Lagrange’s interpolation formula have zeros of the transfer function that tend to be clustered about integer multiples of 1=T1 [8]. The spectral interpretation of SRC with such polynomial filters is in principle shown in Figure 2.4. It can be seen that the polynomial filter achieves high attenuation at integer multiples of 1=T1 . This is also referred to as anti-imaging. However, the aliasing components at integer multiples of 1=T2 are only poorly attenuated, which results in severe
Figure 2.4 Spectral interpretation of resampling of a reconstructed signal with a polynomial interpolation filter.
38
Sample Rate Conversion in Software Configurable Radios
aliasing. On the other hand, if there are no signal components beside the interesting ones, the only source for aliasing are the images. Therefore it can be concluded that these polynomial filters are only applicable to SRC of oversampled and band-limited signals, which means that the sample rate of the signals must be several times higher than the Nyquist rate. In this case, the relatively small notches of the transfer function of these interpolation filters attenuate the images sufficiently to avoid severe aliasing. Another area of application for such filters is the case T1 T2 , where the required antialiasing filter can be approximated by an interpolation filter. This is possible because the first few transfer zeros at integer multiples of 1=T1 are very close to integer multiples of 1=T2 (areas of potential aliasing components) in this case. Further inside the stopband, the attenuation is usually high enough to avoid aliasing, even outside the transfer zeros. Other types of interpolation filters that obey (2.19) might perform better than polynomial filters. However, if they are not built on the antialiasing constraint, it is not possible to easily control the amount of aliasing as early as during filter design. This is possible with true antialiasing filters, as sketched in Figure 2.5. At this point it should be reminded that the aim of SRC is a signal at a new sample rate with well-defined and limited distortions in the frequency band of interest. Restrictions are not acceptable regarding band limitation of the signal, oversampling, or conversion factor. However, interpolation filters provide sufficient aliasing attenuation only in the case of certain oversampling ratios and SRC factors as we have learned. Therefore, they cannot meet this requirement. Hence, it is certainly sensible to refrain from interpolation (antiimaging) and stick to the spectral interpretation given in Section 2.2.1.2. The spectral interpretation of SRC and the resulting antialiasing constraint provide a means to directly estimate the aliasing distortions in a certain frequency band. This cannot be achieved as easily with the interpolation approach, which is basically a time-domain approach. Other time-domain methods, such as minimizing the quadratic error between the impulse response of an ideal interpolation filter and its approximation as suggested in [9], also have to be disqualified for their lack of direct spectral interpretation of the error.
2.2.2 Irrational Factor SRC Irrational factor SRC is the case if T1 ¼ nT2
n 2 RnQ:
ð2:20Þ
Basic Principles of SRC and Multirate Systems
39
Figure 2.5 Spectral interpretation of resampling of a reconstructed signal with a polynomial antialiasing filter.
This means that T1 and T2 are related by an irrational number. In reality, this type of SRC is rather theoretical. It is covered here for reason of completeness. The irrational relation between T1 and T2 requires a different set of samples of the analog impulse response hðt Þ for each calculation of an output sample (see Section 2.2.1). Systems with those characteristics have been named continuous-time digital filters [10]. Since generally an infinite number of different sets is used, a digital realization is only feasible if: 1. The impulse response of the analog filter (or an approximation of it) is available so that the samples can be calculated on demand.
40
Sample Rate Conversion in Software Configurable Radios
2. The number of sets can be limited, which is equivalent to approximating n by a rational factor L=M . The first case can be met if the impulse response of the filter is composed of functions that enable a simple evaluation of their values (e.g., polynomial representations). This is the reason that polynomial interpolation is so popular, although it is not satisfactory unless the signals are sampled at rates considerably higher than the Nyquist rate, as explained in Section 2.2.1. If the OSR (see (1.22)) can be chosen to be very high, simple interpolation schemes like sample and hold or linear interpolation are sufficient. However, in many applications, the signals cannot be oversampled. This is the case, for example, if wideband signals must be processed at relatively high sample rates or in simulation environments where high oversampling is not possible due to limited memory size for storing the signals. In the case where n is approximated by a rational factor L=M , n¼
T1 L ¼ þe T2 M
ð2:21Þ
an approximation error e remains. Obviously, a desired accuracy can lead to very large values of L and M making the implementation expensive. Starting from a synchronized position, it can be written after m output samples m
M M T1 ¼ mT2 þ m T2 e L L
ð2:22Þ
Thus, after m¼
L 1 jej M
ð2:23Þ
times the output period, the accumulated error equals T2 and can theoretically be compensated by dropping or repeating one output sample, depending on whether e is negative or positive, respectively. Likewise, input samples can theoretically be dropped or repeated after k times the input sample period. In this case n1 could be approximated by a rational number n1 ¼ leading after k input samples to
T2 M ¼ þ e L T1
ð2:24Þ
Basic Principles of SRC and Multirate Systems
k
L L T2 ¼ kT1 þ k T1e M M
41
ð2:25Þ
Thus, after k¼
M 1 jej L
ð2:26Þ
times the input sample period the accumulated error equals T1 and could be compensated by repeating or dropping one input sample, depending on whether e is positive or negative, respectively. Comparing (2.21) and (2.24) yields e ¼
M 2e L 2 þ MLe
ð2:27Þ
As both e and e are irrational numbers, (2.23) and (2.26) do not yield integer numbers. Hence, the exact time instance for dropping or repeating samples is not available. It lies in between the time instances defined by the input or output sample periods, respectively. Therefore, this time has to be approximated. However, the time instances defined by (2.23) and (2.26) must be taken into consideration as average values with respect to the output sample rate or the input sample rate, respectively. Exact timing is possible if both periods T1 and T2 are known, for example, if two digital systems fed from different clock sources are connected [3]. In this case, a digital continuous-time zero-order-hold circuit can be applied: The source system writes its samples to a register. Each new sample overwrites the old one. The sink system simply reads the contents of the register at the new clock rate. Hence, samples are dropped or repeated automatically at appropriate time instances. Due to the irrational nature of the ratio between T1 and T2 , the occurrence of dropping and repeating samples is generally nonperiodic. Having discussed how the error of approximating an irrational rate change factor by a rational one can be dealt with, it is necessary to discuss the effect of the sample drop or repeat. In [3] this error is estimated on the basis of the energy of the signal. However, this does not say anything about the spectral distribution of the error, which is important in many applications as we have learned in Section 2.2.1. Thus, the resulting distortions caused by dropping or repeating samples should be estimated in the frequency domain. The dropping and repeating process can be realized by a system equivalent to Figure 2.1 with the filter h being a zero-order-hold circuit—having the impulse response
42
Sample Rate Conversion in Software Configurable Radios
hðt Þ ¼
n
1 0
0 t < T1 else
ð2:28Þ
Its transfer function is the sinc function having zeros of first order at integer multiples of the sample rate 1=T1 (see Figure 2.4). The zero-order-hold filter is an interpolation filter (it fulfills (2.19)). Its first-order zeros only poorly suppress image components. Moreover, it is clear that the filter h does not suppress potential aliasing components. Therefore, the dropping (or repeating) process causes aliasing and thus inband distortions to a channel of interest of a multichannel signal. The interpolation filter can be exchanged by an equivalent antialiasing filter (see Figure 2.5 for its basic spectral performance). According to (2.28) its impulse response would be hðt Þ ¼
n
1 0
0 t < T2 else
ð2:29Þ
It is a continuous-time integrate-and-dump circuit. The samples of the input signal are integrated until the output picks up the current content of the accumulator, thus clearing it. It should be noted that a filter according to (2.29) does not avoid aliasing. However, it minimizes aliasing in a certain frequency band, namely around f ¼ 0. From this discussion, we have learned that approximating an irrational rate change factor by a rational one shifts the task of irrational factor SRC to the zero-order-hold (or integrate-and-dump) circuit, which performs the residual irrational factor SRC determined by e or e, respectively. Thus, irrational factor SRC by n can be divided into two steps: rational factor SRC by n1 ¼ L=M and remaining irrational factor SRC by n2 . The sequential order of performing both steps does not matter in principle. L þe M L M 1þ e ¼ M L ¼ n1 n2
n¼
ð2:30Þ
As an alternative to performing the two steps separately, SRC by n2 can be put inside the rational factor SRC by first interpolating by L, then performing SRC by n2 , and finally decimating by M . A system realizing this approach is sketched in Figure 2.6 (details on rational and integer factor SRC are discussed in Sections 2.2.3 and 2.2.4). Depending on the value of L, this solution
Basic Principles of SRC and Multirate Systems
43
Figure 2.6 Irrational factor SRC.
provides an oversampled signal, which ensures that the aliasing error due to SRC by n2 is small. The larger L is, the higher is the OSR of the signal, and thus, the smaller is the aliasing error, especially when using an antialiasing filter according to (2.29). It should be noted that the case T1 T2 might result in infeasibly large values for L. In that case, it is possible to interpolate by any L that ensures sufficient oversampling for the subsequent SRC by n 1. Finally, the signal is decimated by L. Thus, we have approximated n by n1 ¼ LL ¼ 1 and set n2 ¼ n. This is exactly what Crochiere and Rabiner [3] have suggested except that we do suggest to use an antialiasing filter instead of the zero-orderhold interpolation filter. Concluding this section, it should be stressed that the realization of irrational factor SRC requires the availability of two clock signals, with the period T1 of the input signal and the period T2 of the output signal. These clock signals control an asynchronous interface (e.g., continuous-time sample and hold or integrate and dump). Strictly speaking, such systems are not discrete time and thus not digital. They are two separate discrete-time systems with a continuous-time interface, which, however, can be implemented on digital hardware. 2.2.3 Rational Factor SRC Rational factor SRC is the case if the sample periods of the input signal and the output signal are related by two positive integers. T1 L ¼ T2 M
L; M 2 Nþ
First, (2.11) and (2.12) are rewritten as: 1 X
mM y ðmT2 Þ ¼ x T1 n h T1 ð n þ mm Þ L n ¼ 1 1 X mM x T1 n hm ðnT1 Þ ¼ L n ¼ 1
ð2:31Þ
ð2:32Þ ð2:33Þ
44
Sample Rate Conversion in Software Configurable Radios
with
hm ðnT1 Þ ¼ h T1 ðn þ mm Þ mM mM ðmM Þðmod LÞ ¼ mm ¼ L L L
ð2:34Þ ð2:35Þ
For mm (2.14) still holds: 0 mm < 1 The intersample position mm can only take L distinct values. Thus, the number of different sets of samples of hðt Þ used for the calculation of y ðmT2 Þ is limited to L. Because, moreover, mm is periodic in L, mmþL ¼
ðmM þ LM Þðmod LÞ ðmM Þðmod LÞ ¼ ¼ mm L L
ð2:36Þ
the filter h can be implemented as a periodically time-varying filter with period LT2 ¼ MT1 . A different view can be obtained by using (2.31) and rewriting (2.10) to 1 X T1 x ðkT1 Þ h ðmM kL Þ ð2:37Þ y ðmT2 Þ ¼ L k ¼ 1 which is interpreted in the following. First the signal vðnT0 Þ ¼
1 X
w ðkT0 Þ h T0 ðn k Þ
ð2:38Þ
k ¼ 1
with T0 ¼ and
w ðnT0 Þ ¼
T1 T2 ¼ L M
x Ln T1 0
ð2:39Þ n ¼ 0; L; 2L; . . . else
is defined. Then, (2.38) can be rewritten by using (2.40): 1 X
kL T1 h T0 ðn kL Þ x v ðnT0 Þ ¼ L k ¼ 1 1 X T1 x ðkT1 Þ h ¼ ðn kL Þ L k ¼ 1
ð2:40Þ
ð2:41Þ ð2:42Þ
Basic Principles of SRC and Multirate Systems
45
Comparing (2.42) with (2.37) leads to y ðmT2 Þ ¼ v ðmMT0 Þ
ð2:43Þ
Equation (2.38) reflects the implementation of rational factor SRC by a time-invariant digital filter with the impulse response h ðnT0 Þ, while (2.40) and (2.43) describe time-varying operations necessary before and after filtering. The discrete-time impulse response h ðnT0 Þ can be obtained by sampling the continuous-time impulse response of the analog reconstruction filter hðt Þ with the period T0 . It is interesting to note that the different filter sets hm ðnT1 Þ of (2.34) are the polyphase components (see Section 2.2.6) of h ðnT0 Þ. Finally, it should be mentioned that systems realizing (2.40) are called upsampler or sample rate expander [3]. Often they are called interpolator, which is very misleading, because an interpolator consists of an upsampler and a filter, as will be seen in the next section. The process of upsampling is realized by zero filling (also called zero padding). Likewise, systems realizing (2.43) are called downsampler or sample rate compressor [3]. Both the upsampler and downsampler, together with the filter h ðnT0 Þ, realize a system for rational factor SRC shown in Figure 2.7. It can also be obtained from Figure 2.6 by leaving out the integrate-and-dump circuit and combining hint and hdec into h. By applying the discrete-time Fourier transform (DTFT) to the different signals shown in Figure 2.7, their spectra can be estimated. This will be dealt with in the next section. A typical constellation of these spectra for L ¼ 3 and M ¼ 5 is shown in Figure 2.8.
2.2.4 Integer Factor SRC By setting L or M to one, integer factor SRC as a special case of rational factor SRC can be achieved. Although all considerations made with respect to rational factor SRC can directly be applied to integer factor SRC, there
Figure 2.7 Rational factor SRC, adapted from [11]. Ó 2000 by IEEE.
46
Sample Rate Conversion in Software Configurable Radios
Figure 2.8 Spectra of signals in Figure 2.7 for L ¼ 3 and M ¼ 5.
Basic Principles of SRC and Multirate Systems
47
are some additional interesting characteristics that should be named in this section. 2.2.4.1
Sample Rate Increase by an Integer Factor L
Setting M ¼ 1 leads to an output signal of an SRC system with the reconstruction filter h according to (2.37) to (2.43): T1 ¼ T2 L
x Ln T1 n ¼ 0; L; 2L; . . . w ðnT2 Þ ¼ 0 else 1 X
yðnT2 Þ ¼ vðnT2 Þ ¼ w ðkT2 Þ h T2 ðn k Þ T0 ¼
k ¼ 1 1 X
T1 x ðkT1 Þ h ¼ ðn kLÞ L k ¼ 1
ð2:44Þ
ð2:45Þ
Clearly, the input signal x ðkT1 Þ is upsampled by zero filling, thereby creating the signal w ðnT2 Þ, which is filtered by a filter having the impulse response h ðnT2 Þ. The output signal y ðnT2 Þ equals the signal v ðnT2 Þ at the output of the filter h. A system performing integer factor sample rate increase, comprising the upsampler L " and the filter h, is sketched in Figure 2.9. Although the filter h does not have to be an interpolation filter (fulfilling (2.19)), such a system is usually called an interpolator. The best way to characterize the upsampler is to calculate the DTFT of an upsampled signal in order to estimate its spectral properties: 1 X
w ðnT2 Þe jn2pfT2 W e j2pfT2 ¼ n ¼ 1
By exploiting (2.44) it can be rewritten as:
Figure 2.9 Sample rate increase by an integer factor: interpolation.
ð2:46Þ
48
Sample Rate Conversion in Software Configurable Radios
1 X j2pfT
2 W e x ðkT1 Þe jk2pfT1 ¼
ð2:47Þ
k ¼ 1
Hence
W e j2pfT2 ¼ X e j2pfT1 ¼ X e j2pfLT2
ð2:48Þ
From (2.48) it can be concluded that the spectrum of the signal is not changed by upsampling. Just the timing relation, specifically the sample rate, is changed. Graphically, this can be achieved by renaming the frequency axis, specifically by exchanging L=T1 with 1=T2 . The L 1 images of the original signal x ðkT1 Þ at multiples of the sample rate are part of the fundamental spectrum of w ðnT2 Þ. They can be removed by the filter h, which (in the context of upsampling) is called an anti-imaging filter. Removing these images (in the frequency domain) is equivalent to interpolating the signal (in the time domain). The anti-imaging filter has the same purpose as the reconstruction filter of a DAC, yet the anti-imaging filter has only to interpolate L 1 values in contrast to the continuous function (infinite number of values), which the reconstruction filter of a DAC has to interpolate. Thus, the spectrum of the signal after upsampling and filtering is
ð2:49Þ Y e j2pfT2 ¼ H e j2pfT2 W e j2pfT2 j2pfT j2pfLT
2 2 ¼H e X e ð2:50Þ Often a gain factor L is introduced to interpolation filters (e.g., [3]). This can be understood when considering the reconstruction of an upsampled signal according to the definition of (2.1) (e.g., wðnT2 Þ in Figure 2.9): wa ðt Þ ¼ T2
1 X
wðkT2 Þdðt kT2 Þ
k ¼ 1
With (2.44) it is wa ðt Þ ¼ T2
1 X
xðnT1 Þdðt nT1 Þ
n ¼ 1
¼
xa ðt Þ L
ð2:51Þ
In order to compensate the attenuation by L, the interpolation filter following the upsampling process can be given a gain of L. However, digital signal processing is determined by quantization, scaling, and normalization
Basic Principles of SRC and Multirate Systems
49
of the signal. Therefore, this gain factor is of secondary importance. It is only of theoretical interest. It should be noted that by deriving rational or integer factor SRC as done in this book, the scaling factor is taken into account by (2.8). For reasons of completeness, it should be mentioned that the filter h can be designed as a bandpass filter, which selects one of the images centered at k=ðLT2 Þ with k ¼ 1; 2; . . . ; L 1. This version of interpolation can be named integer-band interpolation [3] or generalized interpolation [12]. Clearly, integer-band interpolation achieves upconversion of the signal. 2.2.4.2
Sample Rate Reduction by an Integer Factor M
Setting L ¼ 1 leads to an output signal of an SRC system according to (2.37) to (2.43): T0 ¼ T1 ¼ v ðnT1 Þ ¼ y ðmT2 Þ ¼ v ðmMT1 Þ ¼
1 X
T2 M
k ¼ 1 1 X
x ðkT1 Þ h T1 ðn kÞ
ð2:52Þ
x ðkT1 Þ h T1 ðmM kÞ
ð2:53Þ
k ¼ 1
Clearly, the input signal x ðnT1 Þ is filtered by a filter having the impulse response h ðnT1 Þ leading to the signal v ðnT1 Þ; whose sample rate is finally reduced by the factor M , eventually yielding the signal y ðmT2 Þ. The system performing integer factor sample rate reduction, comprising the filter h and the downsampler M #, is sketched in Figure 2.10. Such a system is usually called a decimator. When considering the delayed Kronecker impulse 1 n ¼ n0 ð2:54Þ dKr ðn n0 Þ ¼ 0 n 6¼ n0
Figure 2.10 Sample rate reduction by an integer factor: decimation.
50
Sample Rate Conversion in Software Configurable Radios
as an input signal to the downsampler v ðnT1 Þ ¼ dKr ðn n0 Þ its output signal is ( y ðmT2 Þ ¼ dKr ðmM n0 Þ ¼
1 0
n0 2Z if m ¼ M else
ð2:55Þ
Thus, the output depends on the value n0 and, thus, on the delay n0 T1 of the input signal, which clearly indicates that the downsampler M # is a timevarying system (specifically, a periodically time-varying system). Delaying the input signal by Mn0 T1 causes the output to be delayed by n0 T2 . The periodically time-varying nature of the downsampler can also be observed if it is implemented by multiplying the input signal with the M -periodic Kronecker-impulse train ZKr ðn; M Þ, sketched in Figure 2.11. y ðnT1 Þ ¼ v ðnT1 Þ ZKr ðn; M Þ
ð2:56Þ
with ZKr ðn; M Þ :¼
1 X
dKr ðn kM Þ
ð2:57Þ
k ¼ 1
Equations (2.56) and (2.57) indicate that a downsampler is a resampler. It is the discrete-time representation of the second sampler in Figure 2.1. For further calculations it is useful to describe the Kronecker-impulse train by means of its Fourier series:
Figure 2.11 Kronecker-impulse train.
Basic Principles of SRC and Multirate Systems
ZKr ðn; M Þ ¼
1 X 1 M k ck e j2pnM M k ¼0
51
ð2:58Þ
with ck ¼
M 1 X
1 X
n
dKr ðn lM Þ e j2pk M ¼ 1
ð2:59Þ
1 X 1 M k e j2pnM M k ¼0
ð2:60Þ
n ¼ 0 l ¼1
Thus, ZKr ðn; M Þ ¼
In order to estimate the spectrum of the decimated signal y ðmT2 Þ, its DTFT is calculated. 1 X
yðmT2 Þe jm2pfT2 Y e j2pfT2 ¼
¼
m ¼ 1 1 X
v ðkT1 Þ ZKr ðk; M Þe jk2pfT1
ð2:61Þ ð2:62Þ
k ¼ 1
¼
1 X k ¼ 1
v ðkT1 Þ
1 X 1 M n e j2pk M e jk2pfT1 M n¼0
ð2:63Þ
Equation (2.63) has been obtained by substituting (2.60) into (2.62). Finally, we get
1 1 X X
n 1 M Y e j2pfT2 ¼ v ðkT1 Þ e j2pkT1 f MT1 M n¼0 k ¼ 1
1 X n 1 M ¼ V e j2pT1 f MT1 M n¼0
ð2:64Þ ð2:65Þ
Equation (2.65) indicates the well-known aliasing property of sampling: M -times downsampling causes spectral repetition of the original spectrum at multiples of an M th of the original sample rate. Because the signal vðkT1 Þ is a discrete-time signal, its spectrum V e j2pT1 f is not band limited. Thus, spectral components are aliased into the frequency band between 1=ð2T1 Þ and 1=ð2T1 Þ. Irreversible distortions of the decimated signal occur if the bandwidth of the original (lowpass) signal extends 1=T2
52
Sample Rate Conversion in Software Configurable Radios
(considering the region 1=ð2T1 Þ < f 1=ð2T1 Þ). Such distortions caused by aliasing can be avoided if the signal to be decimated is band limited to 1=T2 before decimation. The band limitation is realized by the antialiasing filter h. There is a decimation complement to integer-band interpolation. It can be called integer-band decimation [3] or bandpass decimation. In this case, the antialiasing filter h is designed as a bandpass filter, which selects a 1=T2 -wide frequency band centered at k=ðMT1 Þ with k ¼ 1; 2; . . . ; M 1. This frequency band is aliased to baseband by the decimation process. Thus, bandpass decimation achieves down conversion. Bandpass decimation is the discrete version of harmonic subsampling.
2.2.5 Up- and Downsampling with Phase Offset Generalizing (2.40), a signal w 0 ðnT0 Þ can be defined. nL
x L 0 T1 if n L0 ¼ 0; L; 2L; . . . w ðnT0 Þ ¼ 0 else with L0 2 f0; 1; . . . ; L 1g 0
ð2:66Þ ð2:67Þ
It reflects upsampling with a phase offset L0 —the sample xð0Þ is taken as w 0 ðL0 T0 Þ. In equivalence to (2.38) the signal v 0 ðnT0 Þ is defined. v 0 ðnT0 Þ ¼
1 X
w 0 ðkT0 Þ h T0 ðn kÞ
k ¼ 1
¼
1 X
w ðk L0 ÞT0 h T0 ðn kÞ
k ¼ 1
¼
1 X
wðkT0 Þ h T0 ðn L0 k Þ
k ¼ 1
¼ v ðn L0 ÞT0
ð2:68Þ
Likewise, the downsampling process can be the object of an offset M0 . Then, (2.43) can be rewritten (see also (2.82)).
yM0 ðmT2 Þ ¼ v ðmM þ M0 ÞT0
with M0 2 f0; 1; . . . ; M 1g ð2:69Þ
Basic Principles of SRC and Multirate Systems
53
From (2.69) it can be concluded that yM0 ð0Þ ¼ vðM0 T0 Þ. Thus, every M th sample is taken from vðnT0 Þ starting with vðM0 T0 Þ. Still the time instance M0 T0 is in the future compared to t ¼ 0. Consequently, a system realizing (2.69) would be noncausal. Nevertheless (2.69) is very important as a mathematical model. For an implementation, causality can be obtained by replacing M0 by M0 M . Introducing both L0 and M0 to a system for SRC by a rational factor, (2.43) changes to
yM0 L0 ðmT2 Þ ¼ v 0 ðmM þ M0 ÞT0
¼ v ðmM þ M0 L0 ÞT0
ð2:70Þ
Thus, the L-times upsampled and filtered signal vðnT0 Þ is downsampled with a phase offset ðM0 L0 Þ. Causality is maintained for L0 M0 . The signal y ðmT2 Þ can be expressed with (2.41) and (2.70) T1 x ðkT1 Þ h ðmM þ M0 L0 kL Þ yM0 L0 ðmT2 Þ ¼ L k ¼ 1 1 X ðmM þ M0 L0 Þðmod LÞ ¼ x ðkT1 Þ h T1 L k ¼ 1 mM þ M0 L0 k þ L 1 X mM þ M0 L0 x ¼ n T1 L n ¼ 1 lm h T1 n þ ð2:71Þ L 1 X
with
mM þ M0 L0 k n¼ L mM þ M0 L0 L lm ¼ mM þ M0 L0 L ¼ ðmM þ M0 L0 Þðmod LÞ
ð2:72Þ
ð2:73Þ
The processes of upsampling, filtering, and downsampling with offsets L0 and M0 , respectively, are sketched in Figure 2.12.
54
Sample Rate Conversion in Software Configurable Radios
Figure 2.12 Upsampling with offset L0 , filtering, and downsampling with offset M0 .
Basic Principles of SRC and Multirate Systems
55
Although it seems as if L0 and M0 do not have great importance, it will be seen in Chapters 4, 5, and 6 that they are design parameters that can be used to simplify the implementation of filters for SRC.
2.2.6 Polyphase Decomposition Up- and downsampling of discrete-time signals are closely related to the polyphase concept. Multiplying the discrete-time signal x ðkT Þ with N impulse trains ZKr ðn; N Þ having different phase-offsets yields the so-called polyphase components of the signal x ðkT Þ:
½P xl ðkT Þ ¼ xðkT Þ ZKr ðk lÞ; N ;
l ¼ 0; 1; . . . ; N 1
ð2:74Þ
Although the polyphase components are always related to the number of phases N , this N is omitted in the notation because it should always be clear from the context. The original signal xðkT Þ can be composed from its polyphase components as follows: xðkT Þ ¼
N 1 X
½P
xl ðkT Þ
ð2:75Þ
xðkT Þ ZKr ðk lÞ; N
ð2:76Þ
l¼0
¼
N 1 X l¼0
¼
N 1 X
1 X
xðkT Þ
¼ xðkT Þ
dKr ðk nN lÞ
n ¼ 1
l¼0 1 X
dKr ðk nÞ ¼ xðkT Þ
n ¼ 1
Equations (2.75) and (2.76) are called the polyphase representation [12] or polyphase decomposition [13] of xðkT Þ. The z-transform of the polyphase components (or, the polyphase components of the z-transform) of xðkT Þ can be derived by inserting (2.76) into the z-transform of xðkT Þ, which yields (2.77). By definition (see (2.57)), ZKr ðn l; N Þ is different from zero only at defined points n ¼ kN þ l, which yields (2.78). In equivalence to (2.75), the addends of (2.79) are called the polyphase components of the z-transform of xðkT Þ.
56
Sample Rate Conversion in Software Configurable Radios
X ðzÞ ¼
1 X
xðnT Þ z n
n ¼ 1
¼
1 N 1 X X
xðnT Þ ZKr ðn l; N Þ z n
ð2:77Þ
n ¼ 1 l ¼ 0
¼
N 1 X
1 X
x ðkN þ lÞT z ðkN þlÞ
ð2:78Þ
l ¼ 0 k ¼ 1
¼
N 1 X
z l Xl z N
ð2:79Þ
l¼0
¼
N 1 X
½P
Xl ðzÞ
ð2:80Þ
l¼0
with the polyphase components 1 X
½P Xl ðzÞ ¼ z l Xl z N ¼ z l x ðnN þ lÞT z nN
ð2:81Þ
n ¼ 1
The signals
½P xl ðk NT Þ :¼ x ðkN þ lÞT ¼ xl ðkN þ lÞT
ð2:82Þ
are the time-shifted and downsampled polyphase components of xðkT Þ. In order to clearly distinguish them from the ‘‘ordinary’’ polyphase components, ½P xl ðkT Þ of (2.74), they are termed the normalized polyphase components. Originally introduced in [14], the notion polyphase component is understood differently by later authors. Here the approach of [12] is used. In addition to that, in this book we strictly distinguish between polyphase components and normalized polyphase components. Many authors, including [3, 15], simply regard the normalized polyphase components as polyphase components. Having decomposed xðkT Þ into its (normalized) polyphase components, it is also useful to (re)compose a signal from polyphase components. To derive a specification of how to compose xðkT Þ from its polyphase components, it is useful to recall (2.35), which says k N þ ðkÞðmod N Þ k; N 2 Z k¼ N
Basic Principles of SRC and Multirate Systems
57
Thus, with (2.82) the signal xðkT Þ can be described by its (normalized) polyphase components as k xðkT Þ ¼ x N þ ðkÞðmod N Þ T N k NT ¼ xðkÞðmod N Þ N
ð2:83Þ
½P
¼ xðkÞðmod N Þ ðkT Þ
ð2:84Þ
This directly reflects the behavior of a rotating switch (commutator). It is very often used for describing signal processing with polyphase components and will be employed in the following chapters. Typical network structures for polyphase decomposition (also known as analysis) and polyphase recomposition (also known as synthesis) are sketched in Figure 2.13. Different types of the polyphase decomposition are known from the literature. The one introduced here is commonly called the Type 1 polyphase decomposition. For further details, the reader is referred to [12, 16]. The following relationship between the polyphase components in time- and transform-domain can be concluded by inspection of (2.74), (2.77) and (2.79): n o
½P ½P Z xl ðkT Þ ¼ Xl ðzÞ ¼ z l Xl z N ;
l ¼ 0; 1; . . . ; N 1
ð2:85Þ
From (2.81) and (2.82) it follows: Zfxl ðk NT Þg ¼ Xl ðzÞ;
l ¼ 0; 1; . . . ; N 1
ð2:86Þ
The N polyphase components as well as the normalized polyphase components can be combined in a vector. By definition it is X ½P ðzÞ :¼ X0 ðz N Þ z 1 X1 ðz N Þ . . . XðzÞ :¼ ½ X0 ðzÞ
X1 ðzÞ
...
z ðN 1Þ XN 1 ðz N Þ
XN 1 ðzÞ T
T
ð2:87Þ ð2:88Þ
Especially, the latter will be of great importance in the context of linear periodically time-varying systems (see Section 2.3). The relationship between the two vectors is given by a simple matrix equation:
X z N ¼ LðzÞ X ½P ðzÞ
ð2:89Þ
58
Sample Rate Conversion in Software Configurable Radios
Figure 2.13 Typical structures for (a) polyphase decomposition and (b) polyphase recomposition.
with 2
1 60 6 6 LðzÞ ¼ 6 0 6 .. 4. 0 2.2.6.1
0 0 z 0 0 z2 .. . 0
0
... ... ..
0 0 0 .. .
. . . . z N 1
3 7 7 7 7 7 5
ð2:90Þ
A Note on Impulse Responses of Filters
From system theory, it is known that impulse responses of filters can be treated as signals. Consequently, impulse responses of filters also can be decomposed to their polyphase components. It does not matter if the impulse response is infinite length impulse response (IIR) or FIR. With respect to system analysis, the polyphase components of an impulse response and its z-transform can be expressed by means of the statespace matrices describing the linear time-invariant system S ðA; B; C ; D Þ with one input and one output
Basic Principles of SRC and Multirate Systems
zðk þ 1Þ ¼ AzðkÞ þ BxðkT Þ
59
ð2:91Þ
yðkT Þ ¼ C zðkÞ þ DxðkT Þ
The normalized polyphase components hl ðkT Þ of the impulse response of a linear time-invariant system S are: n D if k ¼ 0 and l ¼ 0 hl ðk NT Þ ¼ ð2:92Þ kN þl1 B else CA while its z-transform is: l
Hl ðzÞ ¼ CA zI A
N 1 N 1 A
Bþ
D CA l1 B
l¼0 l ¼ 1;2;. . .; N 1 ð2:93Þ
Equation (2.93) gives the normalized polyphase components Hl ðzÞ of H ðzÞ. ½P In order to derive the polyphase components Hl ðzÞ, (2.85) can be used ½P resulting in Hl ðzÞ ¼ z l Hl ðz N Þ. For the derivation of (2.92) and (2.93), see the Appendix at the end of the book. Example 2.1
To illustrate (2.92) and (2.93), the N ¼ 4 polyphase components of the impulse response of the filter shown in Figure 2.14 are calculated. First, the state-space equations are derived by inspection: zðk þ 1Þ ¼ 0:5 zðkÞ þ xðkT Þ yðkT Þ ¼ zðkÞ The system has one state. The system matrices are A ¼ 0:5
B¼1
C ¼1
D¼0
Figure 2.14 A simple recursive filter.
60
Sample Rate Conversion in Software Configurable Radios
With (2.92) it is
h0 ðk 4T Þ ¼
8 > > <
h1 ðk 4T Þ ¼ ð0:5Þ4kþ1
0 for k ¼ 0 h2 ðk 4T Þ ¼ ð0:5Þ4kþ2 4k else ð0:5Þ > > : h3 ðk 4T Þ ¼ ð0:5Þ4kþ3
and with (2.93) it is ð0:5Þ3 z 0:54 0:5 z H2 ðzÞ ¼ z 0:54
H0 ðzÞ ¼
z z 0:54 0:52 z H3 ðzÞ ¼ z 0:54 H1 ðzÞ ¼
The reader may substitute the Hl ðzÞ to (2.79) for a proof.
2.2.7 Modulation Representation The modulation representation of a signal [12] is introduced here and used in subsequent sections. By multiplying the independent variable z with the number k
wNk ¼ e j2p N
ð2:94Þ
the modulation of a z-transform X ðzÞ is accomplished leading to the modulated z-transform
½M X k ðzÞ :¼ X z wNk ;
k ¼ 0; 1; . . . ; N 1
ð2:95Þ
Considering the modulated z-transform in the frequency domain of the DTFT by substituting z ! e j2pfT reveals that (2.95) corresponds to a frequency shift of 2pk=N on the normalized frequency axis, which is what usually is understood by the notion modulation. All N modulation components of a signal can be combined in a vector that is defined as: h X ½M ðzÞ :¼ X0½M ðzÞ
½M
X1 ðzÞ
½M
. . . XN 1 ðzÞ
iT
ð2:96Þ
As in the case of the polyphase components, the N representing the number of components is omitted in the notation because it should always be clear from the context. The [M] indicates that these components are the modulation
Basic Principles of SRC and Multirate Systems
61
components and should not be confused with the upsampling factor M which is widely used in this book. The importance of the modulation components stems from their relationship to the polyphase components. Thus, it is possible to relate the characteristics of individual polyphase components to the signal to which they belong and its modulated versions. This relationship is derived in the Appendix (see Section A.2). It is X ½P ðzÞ ¼
1 WN X ½M ðzÞ N
ð2:97Þ
where WN is the DFT matrix, which is also given in the Appendix (see Section A.2). Inspecting (2.97) and evaluating the first component of X ½P ðzÞ yields the well-known aliasing property of (2.65). Combining (2.89) and (2.97) yields a relationship between the normalized polyphase components and the modulation components of a signal:
1 X z N ¼ LðzÞ WN X ½M ðzÞ N
ð2:98Þ
2.2.8 Summary Based upon an analog interpretation, a discrete-time representation of resampling after filtering has been given by (2.11). Subsequently, the basic characteristics of this equation (and the filter h as a main part of it) have been derived for different types of SRC. While irrational factor SRC requires the complete continuous-time impulse response of h to be available, rational and integer factor SRC can be realized on periodically time-varying systems with only a limited set of samples of the impulse response of h required. Finally, the polyphase concept has been introduced. A representation of the polyphase components of the impulse response of an LTI system and its z-transform was derived.
2.3 Linear Periodically Time-Varying Systems and Block Filtering 2.3.1 Introductory Remarks In Sections 2.2.3 and 2.2.4 the periodically time-varying nature of systems for rational and integer factor SRC have been covered as outline only.
62
Sample Rate Conversion in Software Configurable Radios
There are several ways of analyzing linear periodically time-varying (LPTV) systems. One particularly interesting approach is to transform the LPTV system into an equivalent linear time-invariant (LTI) system. The advantage of this method is that the comprehensive apparatus of LTI system theory can be applied to the transformed system. Different approaches have been introduced that transform LPTV systems to LTI systems [17–20]. The basic idea that connects all of these methods is to form blocks of data of the input and the output signals. The size of these blocks is directly related to the periodicity of the LPTV system. The ideas presented in [17] and [20] are based on the so-called lifting isomorphism or raising technique. Because there are strong relationships to the concepts of Section 2.2, the raising technique is introduced next. Although they were introduced to digital signal processing years ago, these techniques have only come to bloom in the field of control theory and its applications. Evident relationships to well-established signal-processing concepts (e.g., polyphase decomposition) have not been revealed. In [21] relationships between LPTV systems, polyphase filtering, and block filtering are explained, while [16] has introduced the relationships between polyphase and modulation descriptions of multirate systems on the basis of block signal processing. However, the relationships between block filtering and the raising technique are not covered. This might be because the basis of the raising technique is the state-space description of systems, which is not widely used in digital signal processing. Therefore, besides being an introduction to the raising technique, this section aims to highlight the relationships between these signal-processing concepts. It will be seen that these are not different concepts but are different formulations of a common signal processing framework. It will be used in subsequent chapters of this book. 2.3.2 The Raising Procedure The raising procedure has been widely applied to the design and analysis of N -periodic controllers. Its application to signal processing has been proposed in [17], but limited to an introduction and a short discussion of its potential. All applications are given with respect to digital control rather than signal processing. Because the raising technique bears great potential for analysis and synthesis of digital signal processing systems for SRC, it is introduced in this section. The raising technique transforms a linear periodically time-varying system of period N to a linear time-invariant system. This technique is generally applicable. However, if not explicitly stated, in this book it will
Basic Principles of SRC and Multirate Systems
63
only be applied to single-input single-output (SISO) systems which are raised to MIMO systems, and more specifically N -input N -output systems. A discrete time N -periodically time-varying SISO system is considered. It can be expressed in state-space form: zðk þ 1Þ ¼ Ak zðkÞ þ Bk xðkT Þ yðkT Þ ¼ Ck zðkÞ þ Dk xðkT Þ
ð2:99Þ
where xðkT Þ, yðkT Þ, and zðkÞ are the input signal, the output signal, and the state-vector of the system, respectively, and Ak , Bk , Ck , and Dk are the N -periodically time-varying system matrices. Ak þ iN ¼ Ak Ck þ iN ¼ Ck
Bk þ iN ¼ Bk Dk þ iN ¼ Dk
for i 2 Z
ð2:100Þ
The following raised vectors are defined:1 xðk NT Þ :¼ xðkNT Þ
x ðkN þ 1ÞT
...
T x ðkN þ N 1ÞT ð2:101Þ
yðk NT Þ :¼ yðkNT Þ
y ðkN þ 1ÞT
T . . . y ðkN þ N 1ÞT ð2:102Þ
which are composed by the normalized polyphase components xl ðk NT Þ and yl ðk NT Þ of the signals xðkT Þ and yðkT Þ, respectively (see (2.82)). Thus, xðk NT Þ ¼ ½ x0 ðk NT Þ x1 ðk NT Þ
xN 1 ðk NT Þ T
ð2:103Þ
yðk NT Þ ¼ ½ y0 ðk NT Þ y1 ðk NT Þ yN 1 ðk NT Þ T ð2:104Þ
The response of the N -periodic system S Ak ; Bk ; Ck ; Dk can then be described by the raised system Sð A; B; C; DÞ which is clearly time invariant: zðk þ 1Þ ¼ A zðkÞ þ B xðk NT Þ yðk NT Þ ¼ C zðkÞ þ D xðk NT Þ
ð2:105Þ
where 1. All matrices and vectors related to the raised formulation of the system are printed in bold face.
64
Sample Rate Conversion in Software Configurable Radios
zðkÞ :¼ zðkN Þ
ð2:106Þ
is the raised state vector. The raised system matrices are given by: A ¼ AN 1 AN 2 A0
ð2:107Þ
B ¼ ½AN 1 . . . A1 B0 ; AN 1 . . . A2 B1 ; . . . ; AN 1 BN 2 ; BN 1 ð2:108Þ 3 2 C0 7 6 C1 A0 7 6 7 6 C2 A1 A0 ð2:109Þ C¼6 7 7 6 .. 5 4 . CN 1 AN 2 . . . A0 3 2 D0 0 ... 0 6 D1 ... 0 7 C1 B0 7 6 6 C2 B1 0 7 C2 A1 B0 D¼6 7 6 .. 7 .. .. 4 . 5 . . CN 1 AN 2 . . . A1 B0 CN 1 AN 2 . . . A2 B1 . . . DN 1 ð2:110Þ An outline of a proof of (2.105) to (2.110) is given in the Appendix (Section A.3). The transfer-matrix HðzÞ establishes the well-known relationships between the z-transforms of the input and the output signal of an LTI system in the transform domain YðzÞ ¼ HðzÞ XðzÞ
ð2:111Þ
HðzÞ ¼ CðzI A Þ1 B þ D
ð2:112Þ
HðzÞ is given as
The components of the raised input and output signals of the system are the normalized polyphase components of the respective signals. Their z-transform is given by (2.88): XðzÞ ¼ ½ X0 ðzÞ
X1 ðzÞ
XN 1 ðzÞ T
YðzÞ ¼ ½ Y0 ðzÞ
Y1 ðzÞ
YN 1 ðzÞ T
ð2:113Þ
Basic Principles of SRC and Multirate Systems
65
Linearity is not touched by the raising procedure. The great advantage is that the large apparatus of tools and methods available for time-invariant systems can be applied to the raised system and, thus, indirectly also to the LPTV system. In [17] it is mentioned that raised systems may behave ‘‘nicely’’ in the time domain. However, when implemented sequentially as an LPTV system, ‘‘intra-period oscillations and sensitivity to high frequency modeling errors’’ must be expected. As will be seen, the intra-period behavior is simply a result from aliasing being caused by the periodicity of the LPTV system. Detailed characteristics of the relation between LPTV systems and their LTI counterpart can be found in [17] and [22]. In particular, the latter deals with the problem of how to realize LPTV systems from a given transfer matrix of an LTI MIMO system. Example 2.2
To illustrate the raising concept, a simple periodically time-varying system is raised in the following. A digital mixer is a periodically timevarying system. It is just a multiplier that multiplies the signal with the sample sequence of a sine or cosine function. If the frequency of this sine function is exactly a quarter of the sample rate this sequence is f0; 1; 0; 1g. The period of the system is N ¼ 4. The system is shown in Figure 2.15. The system has no states. Thus, 8k : Ak ¼ 0; Bk ¼ 0; Ck ¼ 0 D0 ¼ 0; D1 ¼ 1; D2 ¼ 0; D3 ¼ 1 8k : Dk ¼ Dk þ 4 With (2.107) to (2.110) it is 2
A ¼ 0;
B ¼ 0;
Figure 2.15 Simple digital mixer.
C ¼ 0;
0 4 C¼ 0 0 0
0 1 0 0
0 0 0 0
3 0 0 5 0 1
66
Sample Rate Conversion in Software Configurable Radios
and with (2.112) 2
0 4 HðzÞ ¼ D ¼ 0 0 0
0 1 0 0
0 0 0 0
3 0 0 5 0 1
This is a transfer matrix of a linear time-invariant system with four inputs and four outputs. 2.3.2.1
Raising a Linear Time-Invariant System
Of paramount importance is the fact that any time-invariant system is periodic with arbitrary period. This trivial fact enables us to raise time-invariant systems in addition to the periodically time-varying ones. The raised transfer matrix of a linear time-invariant system is (see the Appendix, Section A.3) HðzÞ ¼ CðzI A Þ1 B þ D 2 H0 ðzÞ z 1 HN 1 ðzÞ 6 H ðzÞ H0 ðzÞ 1 6 ¼6 .. .. 6 4 . . HN 1 ðzÞ
HN 2 ðzÞ
3
z 1 HN 2 ðzÞ
. . . z 1 H1 ðzÞ
z 1 HN 1 ðzÞ .. .
. . . z 1 H2 ðzÞ 7 7 7 .. 7 5 .
HN 3 ðzÞ
...
H0 ðzÞ ð2:114Þ
where Hl ðzÞ are the z-transforms of the normalized (type 1) polyphase components of the time-invariant transfer function H ðzÞ given in (2.93). The structure of HðzÞ in (2.114) is called (type 1) pseudocirculant.2 It is also called the polyphase matrix of the LTI SISO system S ðA; B; C ; D Þ having the transfer function H ðzÞ. Example 2.3
The system of Example 2.1 is linear time invariant. It should be raised to N ¼ 4. It should be noted that the system matrices are time invariant. Thus, 8k : Ak ¼ A ¼ 0:5; Bk ¼ B ¼ 1; Ck ¼ C ¼ 1;
Dk ¼ D ¼ 0
2. In [15], a pseudocirculant matrix is defined as a circulant matrix [23] with the additional feature that the elements below the main diagonal are multiplied by z 1 . However, this additional feature depends on the type of polyphase description. An exact description can be found in [16]. In type 1 polyphase pseudocirculant matrices, the elements above the main diagonal are multiplied by z 1 .
Basic Principles of SRC and Multirate Systems
67
With (2.107) to (2.110) it is A ¼ A 4 ¼ 0:54 B ¼ ½A 3 B; A 2 B; AB; B ¼ ½0:53 ; 0:52 ; 0:5; 1 3 2 3 3 2 2 1 D 0 0 0 C 6 CA 7 6 0:5 7 6 CB D 0 07 7 6 7 7 6 6 D ¼ C ¼6 27¼ 6 7 7 6 4 CA 5 4 0:52 5 4 CAB CB D 05 2
CA 3
0:53 3 0 0 0 0 0 07 7 7 1 0 05
0 6 1 6 ¼6 4 0:5 0:52
0:5
CA 2 B
CAB
CB
D
1 0
and with (2.112) 2 HðzÞ ¼
3
1
6 0:5 7 1 7 6 7 ½0:53 ; 0:52 ; 0:5; 1 6 z 0:54 4 0:52 5 2
0:53 0 0
6 1 6 þ6 4 0:5 2
0:5 2
3
0
0
0
0
1
0
07 7 7 05
0:5 1
0:53 6 z 1 6 ¼ 6 4 z 0:5 4 0:5z 0:52 z
0
0:52 0:53 z 0:5z
0:5 0:52 0:53 z
3 1 0:5 7 7 2 7 0:5 5 0:53
This result can also be obtained by substituting the result of Example 2.1 into (2.114). In conclusion, it is noted that a (type 1) pseudocirculant transfer matrix can always be implemented as a SISO system having the following transfer function: H ðzÞ ¼
N 1 X l¼0
z l Hl z N
ð2:115Þ
68
Sample Rate Conversion in Software Configurable Radios
Because any LTI SISO system results in a raised MIMO system with a pseudocirculant transfer matrix, it can further be concluded that a given transfer matrix HðzÞ can be reduced to an LTI SISO system if and only if HðzÞ is pseudocirculant. This has also been concluded in [21]. With the possibility of raising LTI systems to any period N , it is possible to analyze systems that comprise LPTV and LTI subsystems on the basis of these subsystems. The subsystems can be raised individually and be combined to yield the transfer characteristics of the complete system. An example will follow after the discussion of multirate systems in the context of block signal processing (Section 2.3.3). 2.3.2.2
Raising Multirate Systems
Generalizing the results of the previous sections, linear periodically timevarying systems with signals of different sample rates at the input and output are investigated. Initially, the system depicted in Figure 2.7 is considered. With respect to the intermediate period T0 , (2.37) can be rewritten as y ðm MT0 Þ ¼
1 X
x ðk LT0 Þ h T0 ðmM kLÞ
ð2:116Þ
k ¼ 1
Obviously, this system is not time invariant for L 6¼ M . A shift of the input signal by one sample does not cause a shift of the output signal by one sample. However, a shift of the input signal by M samples causes a shift of the output signal by L samples. More generally, such systems have been named ðL; M Þ shift invariant [24], or just ðL; M Þ systems [25], where L and M are relative prime (i.e., the greatest common divisor of L and M is one). Thus, only after a period of time of MT1 ¼ MLT0 ¼ LT2 , the behavior of the SRC system is the same again. It can be concluded that the system exhibits a generalized periodicity with the period N ¼ LM with respect to the intermediate sample rate 1=T0 . Thus, aiming for a timeinvariant description, multirate systems of the type shown in Figure 2.7 can be raised to the period N ¼ LM
ð2:117Þ
From this periodicity, it is obvious that systems for irrational factor SRC cannot be raised to a finite period. The description of the raised version of the filter h can be found by applying (2.105) to (2.110). Special care must be given to the specific
Basic Principles of SRC and Multirate Systems
69
definition of the raised input and output signals of the filter. These signals are related by the upsampling and downsampling processes at the input and the output, respectively, of the complete system. Here, the generalized upand downsampling with a phase offset should be applied, as introduced in Section 2.2.5. The raised input and output signals of the filter can be defined as: 2 3 w 0 ðmLMT0 Þ
6 7 w 0 ðmLM þ 1ÞT0 6 7 ð2:118Þ w ðm LMT0 Þ ¼ 6 7 .. 4 5 .
w 0 ðmLM þ LM 1ÞT0 3 2 v 0 ðmLMT0 Þ
7 6 v 0 ðmLM þ 1ÞT0 7 6 ð2:119Þ vðm LMT0 Þ ¼ 6 7 .. 5 4 .
v 0 ðmLM þ LM 1ÞT0 with the elements of w ðmLMT0 Þ being defined by (2.66).
w 0 ðmLM þ iÞT0 ¼
x ðmM þ kÞT1 i ¼ L0 þ kL; k ¼ 0; 1; . . . ; M 1 0
ð2:120Þ
else
The output signal of the whole system is given by certain components of the raised output signal of the filter
y ðmL þ kÞT2 ¼ v 0 ðmLM þ M0 þ kM ÞT0 ; k ¼ 0; 1; . . . ; L 1 ð2:121Þ It should be noted that if the filter h is periodically time varying itself, the system might be ðLJ ; MJ Þ shift invariant, with J 2 Nþ relating to the periodicity of the filter processing the L-times upsampled input signal. This is dealt with in Section 2.3.3, where the somewhat complicated description of (2.120) and (2.121) will also be simplified. 2.3.2.3
Frequency Behavior of Raised Systems
The frequency behavior of a discrete-time system can be analyzed by evaluating the z-transform of the transfer matrix. This applies also to raised systems. Equation (2.111) can serve as a starting point. Because the frequency behavior is of interest, the modulation representation of the input and output signals
70
Sample Rate Conversion in Software Configurable Radios
of the system is advantageous (see Section 2.2.7). A relationship between the modulation and the normalized polyphase representation of a signal has been given in (2.98). Exploiting this, the input–output relationship of the raised system with respect to the modulation components of the signals can be expressed by means of two equivalence transforms of Hðz N Þ. The latter is obtained by substituting z ! z N in HðzÞ.
Y ½M ðzÞ ¼ WN1 L1 ðzÞ H z N LðzÞ WN X ½M ðzÞ |fflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl}
ð2:122Þ
H ½M ðzÞ
The DFT-matrix WN and its inverse are given in the Appendix (see Section A.2). LðzÞ is given in (2.90). Its inverse exists for z 6¼ 0. Equation (2.122) already suggests to write Y ½M ðzÞ ¼ H ½M ðzÞ X ½M ðzÞ
ð2:123Þ
with
H ½M ðzÞ ¼ WN1 L1 ðzÞ H z N LðzÞ WN
ð2:124Þ
The N N matrix H ½M ðzÞ is called the alias component matrix or modulation matrix. The notion alias component matrix should be clear from the following considerations. Because the frequency behavior is of interest, (2.123) can be evaluated on the unit circle:
Y ½M e j2pfT ¼ H ½M e j2pfT X ½M e j2pfT ð2:125Þ
½M Usually only one component of Y ½M e j2pfT , namely Y0 e j2pfT —the baseband component—is of interest. It is ½M j2pfT
Y0
e
¼
N 1 X
½M j2pfT
½M H0;i e j2pfT Xi e
ð2:126Þ
i ½M H0;i e j2pfT X e j2pðfT N Þ
ð2:127Þ
i¼0
¼
N 1 X i¼0
Comparison of (2.127) and (2.65) reveals that the spectrum of the output signal of an N -periodic linear time-varying system equals a sum of frequency-shifted spectra of the original signal, as in the case of decimation. A difference to decimation is that the sum comprises the frequency-shifted spectra of the input signal, where each can be regarded as being filtered by
Basic Principles of SRC and Multirate Systems
71
a different filter. The transfer functions of these filters are the components of the alias component matrix. They determine the amount of aliasing due to the superposition of the different spectra. The derivation of the frequency characteristics of multirate systems— substituting the signals XðzÞ and YðzÞ by the signals defined in (2.118) to (2.121)—in conjunction with a further generalization of ðL; M Þ-shiftinvariant systems to ðLJ ; MJ Þ-shift-invariant systems ( J 2 Nþ ) will be dealt with in the next section. In case the underlying SISO system is LTI there is no source of aliasing. Therefore H ½M ðzÞ should be expected to have a diagonal structure. This is true because a pseudocirculant matrix (with z ! z N ) is similar to a circulant matrix with the similarity-transform matrix LðzÞ [21], with all matrices having the order N . Any circulant matrix of order N , however, is similar to a diagonal matrix with the similarity-transform matrix WN [23, 25]. Hence (2.124) yields a diagonal matrix if and only if HðzÞ is pseudocirculant. However, the pseudocirculant nature of HðzÞ has been derived to be a necessary and sufficient characteristic of the raised transfer matrix of an underlying LTI SISO system.
2.3.3 Block-Filtering and Multirate Systems The block-filtering concept [21, 24] is introduced here in order to unveil its strong relationships to multirate filtering and the raising technique. Special emphasis will be given to the block-filtering description of ðLJ ; MJ Þ-shiftinvariant filters that has been presented in [24]. Still, here it will be derived on the basis of the raised ðLJ ; MJ Þ-shift-invariant system. Block versions of the input and output signals of a SISO system (as given in (2.103) and (2.104)) are defined. While the so far scalar transfer function H ðzÞ has related the scalar input signal to the scalar output signal, the block versions are related by the transfer matrix H½B ðzÞ. However, the size of the block input and output vectors do not necessarily have to be the same. This is the case if an ðLJ ; MJ Þ-shift-invariant system ðJ 2 Nþ ) is described by its block version with the input signal block length MJ and the output signal block length LJ . Such a description is very graphical: The system generates LJ output samples from MJ input samples. This is exactly what an SRC system does. While L and M are the up- and downsampling factors, respectively, J 2 Nþ represents a possible periodicity of the filter h itself. It is introduced for reasons of generality. The system of Figure 2.7 employs a filter that is not time varying. Thus, for this system, J ¼ 1 holds. However, because any
72
Sample Rate Conversion in Software Configurable Radios
ðL; M Þ-shift-invariant system is also ðLJ ; MJ Þ shift invariant, J can also be used as a design parameter for block implementations, if an integer increase of the block length is the issue. The raising procedure as defined here is only valid for LPTV single-rate systems (i.e., the input sample rate equals the output sample rate). Therefore, it was necessary to relate the signals with different sample rates to the raised single-rate system by means of (2.118) to (2.121). This can be simplified by generalizing to ðLJ ; MJ Þ-shift-invariant systems. A compact description can be achieved by means of rewriting (2.118) to (2.121) in matrix form. A downsampler will take LMJ samples and just pass every M th sample, thus letting LJ samples pass. In contrast to that, an upsampler takes MJ samples and introduces L 1 zero samples between each of the input samples, thus delivering LMJ samples at its output. Hence, the respective matrices describing these processes must have the dimensions LJ LMJ and LMJ MJ , respectively. Downsampling is achieved by taking a vector of length LMJ and multiplying it from the left with the downsampling matrix, which yields a vector of length LJ . Upsampling works equivalently. As both up- and downsamplers are memoryless, their transfer matrices describe a simple mapping of elements of the input vector to elements of the output vector. By inspection the up- and downsampling matrices H½up and H½down can be found: ½up HðLMJ ;MJ Þ ¼ li;k ð2:128Þ with li;k ¼
n
1 0
k ¼ 0; 1; . . . ; MJ 1; i ¼ L0 þ kL; 0 L0 < L else ð2:129Þ
where L is the upsampling factor, L0 the number of zeros inserted before the first signal element (i.e., the upsampling offset), and MJ the size of the input signal vector. h i ½down ð2:130Þ HðLJ ;LMJ Þ ¼ mi;k with mi;k ¼
n
1 0
i ¼ 0; 1; . . . ; LJ 1; k ¼ M0 þ iM ; 0 M0 < M else ð2:131Þ
where M is the downsampling factor, M0 the offset of the downsampling process, and LJ the size of the output signal vector. A similar approach was proposed in [16], still without the offsets L0 and M0 .
Basic Principles of SRC and Multirate Systems
73
In order to describe the complete ðLJ ; MJ Þ-shift-invariant SISO system in its block form, the following MJ - and LJ -raised vectors are defined: 2 6 6 6 xðMJ Þ ðm MJT1 Þ :¼ 6 6 4
xðmMJT1 Þ
x ðmJM þ 1ÞT1 .. .
x ðmJM þ MJ 1ÞT1 3 2 yðmLJT2 Þ 6 y ðmLJ þ 1ÞT 7 7 6 2 7 6 y ðLJ Þ ðm LJT2 Þ :¼ 6 7 .. 7 6 . 5 4
y ðmLJ þ LJ 1ÞT2
3 7 7 7 7 7 5
ð2:132Þ
ð2:133Þ
which are the block input and output signals, respectively, of the MJ -input LJ -output block system. It should be noted that MT1 ¼ LT2 . Eventually, the ðLJ ; MJ Þ-shift-invariant SISO system can be described by the raised LMJ -input LMJ -output version of the system with the MJ - and LJ -raised vectors as input and output signals, respectively: zðk þ 1Þ ¼ A zðkÞ þ B H½up xðMJ Þ ðk MJT1 Þ h i y ðLJ Þ ðk LJT2 Þ ¼ H½down C zðkÞ þ D H½up xðMJ Þ ðk MJT1 Þ ð2:134Þ This is equivalent to
y ðLJ Þ
~ zðkÞ þ B ~ xðMJ Þ ðk MJT1 Þ zðk þ 1Þ ¼ A ~ zðkÞ þ D ~ xðMJ Þ ðk MJT1 Þ ðk LJT2 Þ ¼ C
ð2:135Þ
with ~¼A ~ ¼ B H½up A B ½down ~ ~ ¼ H½down D H½up C D C¼H
ð2:136Þ
Finally we get the block-transfer matrix of the system as H½B ðzÞ ¼ H½down HðzÞ H½up
ð2:137Þ
74
Sample Rate Conversion in Software Configurable Radios
The description of an ðLJ ; MJ Þ-shift-invariant SISO system on the basis of block processing and the raising procedure is sketched in Figure 2.16. It should be noted that the signal flow is from right to left. This shows nicely how the ðLJ ; MJ Þ-shift-invariant SISO system is composed from an ðLJ ; 1Þshift-invariant system, a (1,1)-shift-invariant system, and a ð1; MJ Þ-shiftinvariant system. Moreover it can be realized that the concept of analyzing general ðLJ ; MJ Þ-shift-invariant systems on the basis of time-invariant blockprocessing systems is basically a shift of the time-varying characteristics into two well-known time-varying systems (polyphase decomposition and recomposition) at the input and the output of a time-invariant block system. Example 2.4
As an example, the decimator of Figure 2.10 should be analyzed using the block-filtering concept based on the raising technique. Obviously the system is (1,M )-shift-invariant (i.e., L ¼ J ¼ 1). First the raised transfer matrix of the filter is determined using (2.114): 3 2 H0 ðzÞ z 1 HM 1 ðzÞ z 1 HM 2 ðzÞ .. . z 1 H1 ðzÞ 6 H1 ðzÞ H0 ðzÞ z 1 HM 1 ðzÞ .. . z 1 H2 ðzÞ 7 7 6 HðzÞ ¼ 6 7 .. .. .. .. 5 4 . . . . HM 1 ðzÞ
HM 2 ðzÞ
HM 3 ðzÞ
.. .
H0 ðzÞ
Figure 2.16 Illustrating the block-filter concept with up- and downsampling matrices and raised filter (L0 ¼ 2, L ¼ 4, M0 ¼ 1; M ¼ 3).
Basic Principles of SRC and Multirate Systems
75
As to the downsampler, we employ (2.130) to (2.131) with M0 ¼ M 1 to obtain the transfer matrix: ½down
Hð1;M Þ ¼ ½ 0
... 0
1
Finally we can combine the transfer matrices of the filter and the downsampler to obtain the transfer matrix of the decimator. Hdecimator ðzÞ ¼ H½down HðzÞ Because the matrix product is not commutative, the sequential order of the two matrices in the product must be observed. Hence, we have Hdecimator ð1;M Þ ðzÞ ¼ ½ HM 1 ðzÞ
HM 2 ðzÞ
HM 3 ðzÞ
...
H0 ðzÞ
Another example will be given in Section 6.2.1. From the example, the following conclusion can be drawn: The block implementation of a system for integer factor SRC that is given by (2.137), with either up- or downsampling (M ¼ 1 or L ¼ 1, respectively) and a linear time-invariant filter given by the pseudocirculant matrix HðzÞ of (2.114), is nothing but the well-known polyphase implementation [3, 12] (see also Chapter 4). Concluding this section, it should be mentioned that the raising technique has been introduced in the literature to simplify the analysis of periodically time-varying systems [17], while block filtering has been introduced for several reasons. Among those are the increased noise immunity [25]3 and reduction in computational effort [24]. Apparently, the raising technique can be used to easily find block descriptions of multirate and single rate filters. We shall employ the raising technique in subsequent sections to derive block-processing structures for SRC.
3. The noise immunity results from the fact that raising an LTI system leads to the eigenvalues of the system matrix A being raised to the same power to which the system, and thus the matrix A, is raised. However, these eigenvalues are the poles of the transfer matrix, which have to be inside the unit circle to ensure stability (jzpoles j < 1). Raising these poles causes them to move further to the center of the unit circle. Thus, quantization effects that originally could have caused the poles to move outside the unit circle, therefore making the system unstable, might not do so anymore.
76
Sample Rate Conversion in Software Configurable Radios
2.3.4 Frequency Behavior of Multirate Systems: The Bifrequency Approach Extending the results obtained in Section 2.3.2, the frequency behavior of multirate systems, precisely ðLJ ; MJ Þ-shift-invariant systems, is investigated in the following section. With respect to SRC, these could be systems employing a J -periodic filter enclosed by an upsampler L " at the input and a downsampler M # at the output. In order to properly write down the equation for the frequency behavior of multirate systems, the vectors XðzÞ, YðzÞ, X ½M ðzÞ, and Y ½M ðzÞ, as well as the matrix LðzÞ are written with an index indicating their dimension. Equivalent to (2.123) and (2.124), the input-output relationship between the modulation components of the input signal and the modulation components of the output signal can be formulated as follows (see also Figure 2.16). With LMJ being the periodicity of the system, and thus LMJ being the block size of the raised version of the system, it is ½B
Y ðLJ Þ ðzÞ ¼ HðLJ ;MJ Þ ðzÞ X ðMJ Þ ðzÞ ½down
ð2:138Þ ½up
¼ HðLJ ;LMJ Þ HðLMJ ;LMJ Þ ðzÞ HðLMJ ;MJ Þ X ðMJ Þ ðzÞ Setting z ! z LMJ yields
½B Y ðLJ Þ z LMJ ¼ HðLJ ;MJ Þ z LMJ X ðMJ Þ z LMJ
ð2:139Þ
ð2:140Þ
which relates the LMJ -times upsampled normalized polyphase components4 of Y ðzÞ and X ðzÞ. With (2.98) it can be written
1 ½M
X ðMJ Þ z LMJ ¼ L z L WMJ X ðMJ Þ z L MJ LMJ
1 ½M L z M WLJ Y ðLJ Þ z M Y ðLJ Þ z ¼ LJ
ð2:141Þ ð2:142Þ
Equations (2.141) and (2.142) relate the upsampled modulation components to the upsampled normalized polyphase components of these signals. Substituting (2.141) and (2.142) to (2.140) yields
1
1 ½M ½B L z M WLJ Y ðLJ Þ z M ¼ HðLJ ;MJ Þ z LMJ L zL LJ MJ ½M
WMJ X ðMJ Þ z L 4. The upsampled polyphase components of a signal X ðzÞ are fundamentally different from the polyphase components of the upsampled signal.
Basic Principles of SRC and Multirate Systems
L ½M ½B Y ðLJ Þ z M ¼ WLJ1 L1 z M HðLJ ;MJ Þ z LMJ L z L M ½M
WMJ X ðMJ Þ z L
77
ð2:143Þ
Hence,
½M ½M ½M
Y ðLJ Þ z M ¼ H ðLJ ;MJ Þ ðzÞ X ðMJ Þ z L
ð2:144Þ
with ½M
HðLJ ;MJ Þ ðzÞ ¼
L ½B WLJ1 L1 z M HðLJ ;MJ Þ z LMJ L z L WMJ M ð2:145Þ
and H½B ðzÞ being defined in (2.137). LJ (M -times upsampled) modulation components of Y ðzÞ are obtained from MJ (L-times upsampled) modulation components of X ðzÞ. They are related by H ½M ðzÞ. Note that H ½M ðzÞ is not a square matrix in general, though in the case of the input and the output of the system having the same sample rate (L ¼ M ¼ 1, and J representing the periodicity of the underlying time-varying SISO system), it is a square matrix (see Section 2.3.2). The spectrum of the output signal of the multirate system can be obtained by evaluating the first component of Y ½M ðz M Þ on the unit circle (see (2.126) and (2.127)). It should be noted ½B that by writing HðLJ ;MJ Þ ðz LMJ Þ in (2.145) the variable z is related to the period T0 at which the periodicity LMJ of the system can be observed. Thus,
½M ½M Y e j2pfT2 ¼ Y0 e j2pfT2 ¼ Y0 e j2pfMT0 ¼
MJ 1 X
i ½M H0;i e j2pfT0 X e j2pðfLT0 MJ Þ
ð2:146Þ
i¼0
Equation (2.146) describes the frequency behavior of ðLJ ; MJ Þ-shiftinvariant systems. The summation of different frequency components of the input signal after filtering reflects aliasing. Although (2.146) is not only sufficient but also very nicely describes the frequency behavior of multirate systems, we shall further elaborate this result to derive a relationship to the bifrequency approach that plays an important role in many publications [3, 25]. By exploiting the sifting property of the Dirac impulse (see (1.5))
78
Sample Rate Conversion in Software Configurable Radios
xðt Þ ¼
Z
1
xðtÞdðt tÞd t
1
Equation (2.146) can be rewritten, which yields (2.147). The integral can be split then into an infinite sum of integrals over a finite region (Equation (2.148)). By changing variables F ¼ f 0 þ k=ðLT0 Þ, (2.149) results. By setting l ¼ i þ kMJ , with the equivalence i ¼ ði þ kMJ Þðmod MJ Þ ¼ ðl Þðmod MJ Þ, and by realizing that l covers the range from 1 to þ1, which enables us to combine the two sums into one, (2.150) can be obtained. Rearranging the terms and noting that T1 ¼ LT0 leads to (2.151) and (2.152). 1 X
MJ
½M Y e j2pfT2 ¼ H0;i e j2pfT0 i¼0
Z
1
j2pFLT
0 X e d f
1
¼
MJ 1 X
i F dF LMJT0
ð2:147Þ
½M H0;i e j2pfT0
i¼0 1 X
Z
k ¼ 1
kþ1 LT0
X e
j2pFLT0
k LT0
i F dF d f LMJT0 ð2:148Þ
¼
MJ 1 X
1 X
½M H0;i e j2pfT0
i¼0 k ¼ 1
Z
1 LT0
j2pLT0 f 0 þLTk
X e
0
0
¼
MJ 1 X
1 X
i þ kMJ 0 d f f df 0 LMJT0 ð2:149Þ
½M H0;i e j2pfT0
i¼0 k ¼ 1
Z
1 LT0
X e
j2pLT0 f
0
¼
1 X
0
df
0
¼1
1 LT0
0
!
i þ kMJ e|fflfflfflffl{zfflfflfflffl}0 d f f LMJT0 j2pLT0 LTk
½M H0;ðl Þðmod MJ Þ e j2pfT0
l ¼1
Z
0
X e
j2pf 0 LT0
d f
l f LMJT0
0
df
0
ð2:150Þ
Basic Principles of SRC and Multirate Systems
79
Thus, with 0
K ðf ; f Þ ¼
1 X
½M H0;ðl Þðmod MJ Þ
l ¼1
e
j2pf
T1 L
l f d f MJT1
0
ð2:151Þ
it is
Y e j2pfT2 ¼
Z
1 T1
0 K ð f ; f 0 Þ X e j2pf T1 df
0
ð2:152Þ
0
K ð f ; f 0 Þ is the transmission function or the bifrequency system function [3]. It defines the mapping of frequency components of the input signal to frequency components of the output signal. In case of multirate systems with a rational SRC factor, this bifrequency system function has specific characteristics. Graphically, the addends of K ð f ; f 0 Þ form planes that are arranged mutually parallel and orthogonal to the plane being spread by the two frequency axes. The projections of these planes onto the P ðf ; f 0 Þ plane 1 are straight lines that are defined by the Dirac train l ¼1 dð f l =ðMJT1 Þ f 0 Þ. This property has been noted also in [25]. K ð f ; f 0 Þ also reflects the previously mentioned phenomena, aliasing and imaging. This is illustrated in the following example. Example 2.5
The frequency characteristics are derived of a system for SRC by L=M ¼ 2=3 as shown in Figure 2.7. The time-invariant filter h ( J ¼ 1) that is clocked at the high intermediate sample rate T0 is supposed to have the following transfer function: H ðzÞ ¼ 1 þ z 1 It is a simple first-order comb filter, which is used for interpolation often (see Chapter 5), also known as a sample-and-hold device. The four state-space matrices of this filter are: A¼0 C ¼1
B¼1 D¼1
The overall system is periodic with N ¼ LMJ ¼ 6 with respect to the intermediate sample rate T0 . Thus, the filter must be raised at least to N ¼ 6. Because the filter itself is time invariant, the transfer
80
Sample Rate Conversion in Software Configurable Radios
matrix is composed by the polyphase components of H ðzÞ. With (2.93) the polyphase components of H ðzÞ are: H0 ðzÞ ¼ 1 H3 ðzÞ ¼ 0
H1 ðzÞ ¼ 1 H4 ðzÞ ¼ 0
H2 ðzÞ ¼ 0 H5 ðzÞ ¼ 0
Thus, HðzÞ can be derived (see (2.114)), as well as (2.128) and (2.129)) and H½down (see (2.130) and (2.131)) L0 ¼ M0 ¼ 0 : 3 2 1 0 0 0 0 z 1 61 1 0 0 0 0 7 7 6 60 1 1 0 0 0 7 7 6 HðzÞ ¼ 6 7 60 0 1 1 0 0 7 40 0 0 1 1 0 5 0 0 0 0 1 1 2 1 0 60 0 6 % & 60 1 1 0 0 0 0 0 ½down ½up H ¼ H ¼6 60 0 0 0 0 1 0 0 6 40 0 0 0
H½up (see by setting
3 0 07 7 07 7 07 7 15 0
With (2.137) the block-transfer matrix can be calculated: % & 1 0 0 H½B ðzÞ ¼ 0 1 0 Eventually, with (2.145) the alias-component matrix of the system is: #" " #" # 1 0 0 1 0 2 0:5 0:5 ½M H ðzÞ ¼ 3 0:5 0:5 0 z 3 0 1 0 2 32 3 1 1 1 1 0 0 2 4 7 6 76 4 0 z 2 0 54 1 e j 3p e j 3p 5 0
0
" 1 1 þ z 1 ¼ 3 1 z 1
z4
1
4
e j 3p
8
e j 3p
2
1 þ z 1 e j 3p
2
1 z 1 e j 3p
1 þ z 1 e j 3p 1 z 1 e j 3p
4 4
#
Basic Principles of SRC and Multirate Systems
81
The components of the first row of H ½M ðzÞ determine the mapping of the input signal to the output signal as indicated in (2.146). Evaluating them on the unit circle reveals that different modulation components of the input signal are filtered by a filter with a cosine-like transfer function having its only transfer zero at half the sample rate (with respect to the intermediate sample rate). Hence, the image component resulting from two-times upsampling is attenuated by this transfer zero, which is the reason that this filter acts as an interpolation filter. Potential aliasing components are not explicitly suppressed. This behavior can be seen from Figure 2.17, where one period of the bifrequency system function (obtained by substituting H ½M ðzÞ to (2.151)) is shown inside the area spread by the input- and the output-signal frequency axis over the interval 0 f < 1=T0 .
Figure 2.17 Bifrequency system function magnitude of a sample rate converter L=M ¼ 2=3.
82
Sample Rate Conversion in Software Configurable Radios
The transfer characteristics of the system of this example at a certain frequency (with respect to the output) equals a superposition of three different signal components of the input signal weighted with three different transfer functions. This is exactly what (2.152) describes. Somewhat simpler is the description of (2.146).
2.3.5 Summary Based on the raising technique, the block-processing concept has been introduced. It can serve as a basis for the understanding of LPTV systems, and thus ðLJ ; MJ Þ-shift-invariant systems, which exhibit a generalized periodicity with period LMJ . Multirate systems (whose different sample rates are related by rational factors) are ðLJ ; MJ Þ-shift-invariant. Hence, the block-processing concept enables the investigation and analysis of multirate systems. Since LTI systems belong to the class of LPTV systems with arbitrary period, the block-processing concept can also be applied to this class of systems. In that case, the transfer matrix has a specific structure called pseudocirculant. The well-known polyphase filter structures for interpolation and decimation can easily be derived from this pseudocirculant transfer matrix by introducing up- and downsampling matrices, which select one column or row of the pseudocirculant transfer matrix, respectively. This is a very plausible approach to polyphase interpolation and decimation filters. The frequency characteristics of block-processing systems can generally be estimated by means of the alias component matrix and the bifrequency system function, which inherently reveal the two phenomena of multirate systems, imaging and aliasing. Finally, it should be noted that the block-processing concept is extensively exploited in the context of filter banks. Some relationships between filter banks and block filtering have been unveiled in [21, 26].
References [1]
Hentschel, T., M. Henker, and G. P. Fettweis, ‘‘The Digital Front-End of Software Radio Terminals,’’ IEEE Personal Communications, Vol. 6, No. 4, August 1999, pp. 40–46.
[2]
Marks II, R. J., Introduction to Shannon Sampling and Interpolation Theory, New York: Springer-Verlag, 1991.
[3]
Crochiere, R. E., and L. R. Rabiner, Multirate Digital Signal processing, Englewood Cliffs, NJ: Prentice-Hall, 1983.
Basic Principles of SRC and Multirate Systems
83
[4]
Bronstein, I. N., and K. A. Semendjajew, Teubner-Taschenbuch der Mathematik, Vol. 1, Leipzig, Germany: B.G. Teubner Verlagsgesellschaft, 1996.
[5]
Unser, M., ‘‘Splines, A Perfect Fit for Signal and Image Processing,’’ IEEE Signal Processing Magazine, Vol. 16, No. 6, November 1999, pp. 22–38.
[6]
Henker, M., ‘‘Abtastratenanpassung in Software-programmierbaren Mobilfunkempfa¨ngern,’’ Master’s thesis, Technische Universita¨t Dresden — Fakulta¨t Elektrotechnik — Institut fu¨r Nachrichtentechnik, October 1998.
[7]
Henker, M., and G. Fettweis, ‘‘Extended Algorithms for Sample Rate Conversion,’’ in 2nd Karlsruhe Workshop on Software Radios (WSR-2002), Karlsruhe, Germany, March 2002.
[8]
Schafer, R. W., and L. R. Rabiner, ‘‘A Digital Signal Processing Approach to Interpolation,’’ Proc. of the IEEE, Vol. 61, No. 6, June 1973, pp. 692–702.
[9]
Meyr, H., M. Moeneclaey, and S. A. Fechtel, ‘‘Digital Communication Receivers: Synchronization, Channel Estimation and Signal Processing, New York: John Wiley & Sons, 1998.
[10]
Menkhoff, A., ‘‘Interpolationsverfahren fu¨r unbeschra¨nkte Abtastratenwandlungen,’’ Ph.D. thesis, Universita¨t Fridericiana Karlsruhe, Fakulta¨t Elektrotechnik, March 1996.
[11]
Hentschel, T., and G. P. Fettweis, ‘‘Sample Rate Conversion for Software Radio,’’ IEEE Communications Magazine, Vol. 38, No. 8, August 2000, pp. 142–150.
[12]
Fliege, N. J., Multirate Digital Signal Processing: Multirate Systems, Filter Banks, Wavelets, New York: John Wiley & Sons, 1994.
[13]
Vaidyanathan, P. P., ‘‘Multirate Digital Filters, Filter Banks, Polyphase Networks, and Applications: A Tutorial,’’ Proc. of the IEEE, Vol. 78, No. 1, January 1990, pp. 56–93.
[14]
Bellanger, M. G., G. Bonnerot, and M. Coudreuse, ‘‘Digital Filtering by Polyphase Network: Application to Sample-Rate Alteration and Filter Banks,’’ IEEE Transactions on Acoustics, Speech, and Signal Processing, Vol. 24, No. 2, April 1976, pp. 109–114.
[15]
Vaidyanathan, P. P., Multirate Systems and Filter Banks, Englewood Cliifs, NJ: Prentice Hall, 1993.
[16]
Reng R. L., ‘‘Polyphase and Modulation Descriptions of Multirate Systems — A Systematic Approach,‘‘ in International Conference on Digital Signal Processing, Limassol, Cyprus, June 1995, pp. 212–217.
[17]
Feuer, A., and G. C. Goodwin, Sampling in Digital Signal Processing and Control, Boston, MA: Birkha¨user, 1996.
[18]
Misra, P., ‘‘Time-Invariant Representation of Discrete Periodic Systems,’’ Automatica, Vol. 32, No. 2, 1996, 267–272.
[19]
Van Dooren, P., and J. Sreedhar, ‘‘When Is a Periodic Discrete-Time System Equivalent to a Time-Invariant One?,’’ Linear Algebra and its Applications, No. 212/ 213, 1994, pp. 131–151.
84
Sample Rate Conversion in Software Configurable Radios
[20]
Meyer, R. A., and C. S. Burrus, ‘‘A Unified Analysis of Multirate and Periodically Time-Varying Digital Filters,’’ IEEE Transactions on Circuits and Systems, Vol. 22, No. 3, March 1975, pp. 162–168.
[21]
Vaidyanathan, P. P., and S. K. Mitra, ‘‘Polyphase Networks, Block Digital Filtering, LPTV Systems, and Alias-Free QMF Banks: A Unified Approach Based on Pseudocirculants,‘‘ IEEE Transactions on Acoustics, Speech, and Signal Processing, Vol. 36, No. 3, March 1988, pp. 381–391.
[22]
Colaneri, P., and S. Longhi, ‘‘The Realization Problem for Linear Periodic Systems, Automatica,’’ Vol. 31, No. 5, 1995, pp. 775–779.
[23]
Davis, P. J., Circulant Matrices, New York: Chelsea Publishing, 1994.
[24]
Miyawaki, T., and C. W. Barnes, ‘‘Multirate Recursive Digital Filters — A General Approach and Block Structures,’’ IEEE Transactions on Acoustics, Speech, and Signal Processing, Vol. 31, No. 5, October 1983, pp. 1148–1154.
[25]
Schu¨ler, H. W., Digitale Signalverarbeitung 1, Analyse diskreter Signale und Systeme, Berlin, Germany: Springer-Verlag, 1994.
[26]
Shenoy, R. G., ‘‘Multirate Specifications Via Alias-Component Matrices,’’ IEEE Transactions on Circuits and Systems-II: Analog and Digital Signal Processing, Vol. 45, No. 3, March 1998, pp. 314–320.
3 A Concept for SRC in Software Radio Terminals 3.1 Introduction To enable a comprehensive treatment using SRC, this chapter sets the scene further by bringing together the fundamentals of SRC addressed in Chapter 2 and the concept of software radio covered in Chapter 1. The intention of this chapter is to introduce the idea of separating integer factor and fractional SRC and to discuss briefly the ordering of these two in a cascaded structure realizing rational factor SRC.
3.2 Review of the OSR of a Signal The OSR and the GOSR of a signal have been introduced in Chapter 1. In Section 2.2.1, it has been suggested that with (generalized) oversampled signals, aliasing is acceptable in certain frequency bands. Thus, the OSR/ GOSR is very important in the context of SRC. The GOSR is the ratio between the sample rate fS of the signal and the bandwidth b of the signal of interest (i.e., the region to be kept free from aliasing). In the case where the signal of bandwidth b is ‘‘conventionally’’ oversampled (i.e., there are no signal components outside the bandwidth b), the GOSR equals the OSR. The GOSR after the SRC process directly determines the relative bandwidth (compared to the sample rate) of the potential aliasing components that have to be attenuated by the SRC filter (see Figure 2.5). The higher the GOSR is, the smaller the passband and the stopbands of the filter. Hence, a high GOSR (after SRC) relaxes the design constraints. Simpler filter structures result. A consequence of this is that SRC is 85
86
Sample Rate Conversion in Software Configurable Radios
advantageously implemented on a cascaded multirate system (i.e., a cascade of filters with relaxed requirements at high sample rates, where the GOSR of the signal of interest is high, and strong requirements at low sample rates) [1, 2]. Example 3.1
The requirements on systems for rational factor SRC are compared. GSM is taken as an example air interface. In the first case, the output sample rate of the SRC system should be close to its input sample rate. However, it should be an integer multiple of the bit rate of GSM. In the second case, it should be twice the bit rate. The input sample rate is assumed to be 80 MSps. Table 3.1 lists all of the relevant parameters. Because the filter in a system for SRC should attenuate potential aliasing components, the stopbands of the respective filter are placed at integer multiples of 79:9 MHz or 541:6 kHz, respectively. This is sketched in Figure 3.1. The transition band is much wider in case 1 than in case 2. Thus, a filter fulfilling constraints as to aliasing attenuation in a certain application can be realized with considerably lower effort in case 1, where the GOSR after SRC is significantly higher than in case 2.
3.3 The Conversion Factor: Integer Factor and Fractional SRC In order to reduce the cost of analog components in mobile communications terminals, the ADC should be clocked at a fixed rather than a tunable rate (see Section 1.3.2). Therefore, the conversion between the digitization rate and the variable target rate (symbol/chip rate) should be realized digitally. This process is referred to as SRC. Table 3.1 Parameters of an SRC Example Case 1
Case 2 fS ¼ 80 MSps
Input sample rate
b ¼ 200 kHz
Signal bandwidth Target rate (after SRC)
767 768 0:9987 13295 48 79:9 MSps
1 147:7 541:6 kSps
GOSR after SRC
400
2:7
Conversion factor
13 1920
A Concept for SRC in Software Radio Terminals
87
Figure 3.1 Tolerance scheme of antialiasing filters for SRC according to Table 3.1.
Because both the digitization rate and the target rate can be expressed as an integer number of samples per time unit, the rate change (conversion) factor is a rational number. The ratio of the output sample rate f2 and the input sample rate f1 is f2 T1 L ¼ ¼ M f1 T2
ð3:1Þ
with L and M being relative prime (i.e., the greatest common divisor of L and M is one). It can be distinguished between effective reduction (L < M ) and effective increase (L > M ) of the sample rate. Although they are similar, integer factor SRC and fractional SRC also have differences, especially in implementation. Therefore, it is sensible to separate fractional SRC and integer factor SRC. To do this, the rate-change factor can be factorized to a fractional part ðL=M Þfrac and an integer part Lint (or Mint ): 8L < M frac Lint L ¼ M : L 1 M frac Mint
effective increase of the sample rate ð3:2Þ effective reduction of the sample rate
It should be noted that the fractional factor ðL=M Þfrac is limited to the interval
88
Sample Rate Conversion in Software Configurable Radios
0:5 <
L M
<2
ð3:3Þ
frac
If the overall conversion is an effective reduction of the sample rate, this factor can be limited further to L <1 ð3:4Þ 0:5 < M frac or in case of an effective increase of the sample rate to 1<
L M
<2
ð3:5Þ
frac
Whether this further limitation is sensible or not depends on the specific algorithm for SRC and its implementation. It might, for instance, be a problem to increase temporarily the sample rate in a system realizing an overall sample rate reduction (e.g., to increase the sample rate by ðL=M Þfrac ¼ 4= 3 1:3 followed by integer factor SRC by ð1=M Þint ¼ 1=6 in order to achieve an overall SRC by L=M ¼ 2=9). In this case, it is certainly more sensible to first reduce the sample rate by ðL=M Þfrac ¼ 2=3, followed by a further reduction of ð1=M Þint ¼ 1=3. The order of arranging the fractional and the integer part is an open question (e.g., ðL=M Þfrac ¼ 2=3 followed by ð1=M Þint ¼ 1=3 or vice versa). From (3.3) to (3.5), it should be clear that fractional SRC does not change the order of magnitude of the sample rate of the signal. Hence, it can be concluded that the input sample rate to integer factor SRC is also of the same order of magnitude when placing fractional SRC before or after integer factor SRC. Thus, the constraints on integer factor SRC remain principally unchanged regardless of whether the fractional part is placed before or after it. However, because the sample rates at the input and the output of the integer part of SRC can differ considerably, the order of arranging fractional and integer factor SRC has great influences on the design of the system for fractional SRC. Example 3.2
Case 2 of Example 3.1 is realized as a cascade of integer factor and fractional SRC, shown in Figure 3.2. From Table 3.2, it can be seen that the GOSR after integer factor SRC is similar in both cases, namely 2.7 in case 2(a) where integer
A Concept for SRC in Software Radio Terminals
89
Figure 3.2 Case 2(a) and case 2(b) of Example 3.2. Table 3.2 Parameters of SRC of Example 3.2 Case 2(a)
Case 2(b)
Target rate
541:6 kSps
Conversion factor
13 1920
¼ 2713 35 1 128 13 15
Integer conversion factor Fractional conversion factor Sample rate after 1st stage
fS ¼ 69:3 MSps
fS ¼ 625 kSps
GOSR after 1st stage
347
3:1
GOSR after 2nd stage
2:7
2:7
factor SRC is the second stage and 3.1 in case 2(b) where integer factor SRC is the first stage of the two-stage cascade for rational factor SRC. Thus, the system for integer factor SRC must fulfill similar requirements in both cases. This is completely different with fractional SRC. The GOSR is more than 100 times higher if fractional SRC is performed before integer factor SRC (i.e., case 2(a)). Hence, in this case the transition band of the respective filter is much wider and consequently much simpler filters can be used.
3.4 Processing Issues The previous sections have shown that digital SRC involves digital filtering. The clock rate of the filter directly determines the multiplication rate and, thus the effort and cost of the system for SRC. The multiplication rate and
90
Sample Rate Conversion in Software Configurable Radios
the hardware effort are determined by the type of the filter. The filter itself (i.e., its parameters passband, transition band, and stopband widths) is influenced by the GOSR of the signal of interest. For many types of FIR filters (including equiripple FIR filters, FIR filters based on window designs, and Chebychev FIR filters), the number of coefficients N can be related to the transition bandwidth Df of the filter and the sample rate at which it operates. Here we restrict ourselves to rational SRC by L=M . As we have learned from Section 2.2.3, this can, in principle, be achieved by upsampling L ", filtering, and downsampling M #. The resulting sample rate is the target rate fS . Thus, the filter operates at the rate MfS . It is applied to an upsampled signal in which it must attenuate potential aliasing components around integer multiples of the target sample rate fS ¼ 1=T2 (see Figures 2.2 and 2.5). According to [2, 3] we can write down a relationship between the number of coefficients N , the clock rate MfS of the filter, and the transition bandwidth Df . N
MfS ; Df
Df < MfS
ð3:6Þ
where stands for a proportionality between the right-hand and the lefthand side of (3.6). If a lowpass filter is applied, its transition band is determined by the passband edge and the lower stopband edge of the first aliasing region. This is depicted in Figure 3.3.
Figure 3.3 Relationship between transition bandwidth Df of a filter and target sample rate fS ¼ 1=T2 .
A Concept for SRC in Software Radio Terminals
91
While the passband width of the filter is the region where the interesting components of the signals lie, the stopband width is the region where signal components that can alias to and thus distort the interesting components lie. Therefore, it is sensible to assume fpass ¼ fS fstop
ð3:7Þ
and thus Df ¼ fS 2fpass Df ¼ fS b
ð3:8Þ
where b is the bandwidth of the channel of interest (see Figure 1.10). Substituting (1.27) and (3.8) to (3.6) and neglecting the factor M yields N
GOSR GOSR 1
ð3:9Þ
Hence, as the GOSR approaches one (no oversampling after SRC), the number of coefficients explodes (see Figure 3.4(a)). Although in contrast to (3.9), the number cannot be infinite in practice, it can be concluded that placing the fractional part of SRC at a very low sample rate (i.e., very low GOSR) in the cascade of a multirate system is not the optimal solution to minimizing the number of coefficients of the filter for fractional SRC. Also the multiplication rate of these filters can be related to the GOSR by simply multiplying the number of coefficients with the clock rate. With (1.27) it can be concluded that the multiplication rate Rmult (of the earliermentioned filter types) obeys the following proportionality. Rmult b
GOSR 2 GOSR 1
ð3:10Þ
Assuming a fixed signal bandwidth b, this is sketched in Figure 3.4(b). The minimum can be found at GOSR ¼ 2. Although the filter order decreases with an increasing GOSR according to (3.9), the multiplication rate has a minimum at a low GOSR. Thus, it is a simple matter to decide where to apply fractional SRC in a cascaded structure, if either the number of coefficients (i.e., the hardware effort) or the multiplication rate is of interest. Unfortunately, in many cases both figures are important. Since (3.9) and (3.10) have a conflicting behavior, it is therefore not so easy to decide where to place fractional SRC in practical applications.
92
Sample Rate Conversion in Software Configurable Radios
Figure 3.4 (a) Proportionality between number of coefficients and GOSR, and (b) multiplication rate and GOSR, assuming a fixed signal bandwidth b.
Although it has been demonstrated in Example 3.2, it is, in fact, difficult to compare the two extremes of placing fractional SRC at a sample rate where the signal of interest is highly oversampled or not oversampled. This is because different filter types would be used for either approach. Placing fractional SRC first in the cascade would lead to applying another type of filter, compared to the type that would be used in the case of placing fractional SRC last in the cascade. If the GOSR is high, the narrow aliasing components can be sufficiently suppressed with comb filters (see Chapter 5). Comb filters have particularly low complexity. However, for low GOSR s, the transition bandwidth must be very small compared to the passband width and the bandwidth of the aliasing components. In this case, comb filters do not fulfill the requirements. Generally, the advantages of placing fractional SRC at a high sample rate (where the GOSR is high) are:
A Concept for SRC in Software Radio Terminals
93
Lower complexity (comb) filters can be used due to relaxed requirements.
If noise-shaping ADCs (see Section 1.3.1) with low output word length feed the filter, coefficient multipliers can be realized by simple switches or look-up tables of relatively small size, thus reducing the hardware effort. The disadvantages are:
The high clock rate at which the filters have to run.
The air-interface-dependent GOSR after SRC (due to different channel bandwidth b) might result in different filter design constraints for different air interfaces.
The required high aliasing attenuation of the filter due to the high dynamic range of multichannel signals (a high-power adjacent channel interferer can be an aliasing component—see Figures 2.3 and 2.5). From these advantages and disadvantages, we can also derive the pros and cons of placing fractional SRC at a lower sample rate. We have seen that the lower the GOSR is, the stronger the requirements on the filters (in terms of transition bandwidth) are. Hence, the hardware effort for implementing fractional SRC at a low GOSR is in general higher than the one required for implementing fractional SRC at a high GOSR. This hardware effort is mainly reflected by the number of coefficients of the filter, and thus the number of multipliers. If the sample rate is comparatively low, time-division hardware sharing might be possible. Consequently, several filter coefficients can be realized by a small number of multiply-accumulate (MAC) units of a digital signal processor (DSP). In an FPGA- or ASIC-based implementation, each coefficient is usually realized by its own multiplier. Therefore, in this case it can be more advantageous to place fractional SRC at a high sample rate, thus reducing the chip size. In addition, placing fractional SRC at a high sample rate where the GOSR is high enables the application of simple comb filters whose implementation requires only a small number of multipliers. This reduces the hardware effort even further. Sometimes there is no choice. If a certain digital signal processor with a clock rate of, say, 30 MHz is to be used, the resulting GOSR might be too low to realize fractional SRC with simple comb filters. In this case, the available hardware platform determines the algorithm [4].
94
Sample Rate Conversion in Software Configurable Radios
To summarize this discussion, a cascaded multirate structure for SRC is sketched in Figure 3.5, indicating the increase of hardware effort and cost as the sample rate and thus the GOSR decreases. A minimization of the hardware effort and cost for fractional SRC can be achieved by placing it first in the cascade where the GOSR is highest. However, this does not yield a minimum multiplication rate, as Figure 3.4(b) indicates. Example 3.3
Further developing Example 3.2, let us design the filters required for fractional SRC. The relevant parameters as well as the results of the design are collected in Table 3.3. We require an aliasing attenuation of 80 dB for the filters. The length of the filters has been estimated with the MATLAB (Ó 1984–1999 The Mathworks, Inc.) routine Kaiserord. The resulting figure stands for the length of a Kaiser-windowed FIR filter that fulfills the requirements. The two MATLAB commands are
Kaiserord([0.1,69], [1,0], [0.0001, 0.1], 1040) for case 2(a);
Kaiserord([0.1,0.44], [1,0], [0.0001, 0.1], 8.125) for case 2(b). According to MATLAB, the estimation of case 2(a) is of poor quality due to the very small passband. Nonetheless, the ratio between the number of coefficients shown in Table 3.3 for both cases is fully in accordance with (3.9), as the reader can easily reproduce.
Figure 3.5 Effort versus sample rate in cascaded SRC system realizing an effective sample rate reduction, T1 < T2 (with suggestion of placing fractional SRC at a high sample rate).
A Concept for SRC in Software Radio Terminals
95
Table 3.3 Parameters of SRC of Example 3.3 Case 2(a)
Case 2(b) L
13 M frac ¼ 15
Fractional conversion factor Input sample rate to fractional SRC
f1 ¼ 80 MSps
Virtual sample rate at input of filter
Lfrac f1 ¼ 13 80 MSps
Estimated filter length (Kaiser window) Estimated CIC-filter order
Lfrac f1 ¼ 13 625 kSps
b ¼ 200 kHz
Width of passband Lower edge of stopband for first-aliasing region (i.e., ðL=MÞfrac fS b=2)
f1 ¼ 625 kSps
69 MHz
440 kHz
76
120
2 (equivalent to 2Mfrac ¼ 30 coefficients)
6 (equivalent to 6Mfrac ¼ 90 coefficients)
Alternatively to this conventional filter design, cascaded-integrator-comb (CIC) filters are applied (see Chapter 5 for details). To estimate their order the tables in [5] have been used. The transfer function magnitudes of the filters are plotted in Figure 3.6. In case 2(a), the passband and the stopbands are very narrow (too narrow to be shown in the figure) so that the notches of the second-order CIC filter provide enough aliasing attenuation. This filter fulfills the constraints with the least effort, as can be seen from Table 3.3. The highest hardware effort is required for the conventional FIR filter of case 2(b). Because the passband and the stopbands are considerably wider than in case 2(a), the aliasing attenuation of second-order CIC filters does not suffice. Thus, sixth-order CIC filters have been suggested in Table 3.3. Their drawback is the passband droop, as can be seen from Figure 3.6(b).
3.5 Summary A concept for SRC in software radio terminals has been introduced. Based on the idea of separating integer factor and fractional SRC, the impact of placing fractional SRC before or after integer factor SRC has been discussed.
96
Sample Rate Conversion in Software Configurable Radios
Figure 3.6 Transfer function magnitude of filters for case 2(a) and case 2(b) of Example 3.3.
The hardware effort can be minimized when placing fractional SRC before integer factor SRC where the (generalized) OSR of the signal is high. In order to minimize the multiplication rate, an OSR of two yields a minimum. In an application, the designer must make a trade-off between hardware effort and multiplication rate, which can lead to a cascade of three stages— integer factor SRC, fractional SRC, and again integer factor SRC. Hence, fractional SRC is neither placed at the highest nor at the lowest OSR.
References [1]
Henker, M., ‘‘Abtastratenanpassung in Software-programmierbaren Mobilfunkempfa¨ngern,’’ Master’s thesis, Technische Universita¨t Dresden — Fakulta¨t Elektrotechnik — Institut fu¨r Nachrichtentechnik, October 1998.
[2]
Crochiere, R. E., and L. R. Rabiner, Multirate Digital Signal Processing, Englewood Cliffs, NJ: Prentice-Hall, 1983.
A Concept for SRC in Software Radio Terminals
97
[3]
Hess, W., Digitale Filter–Eine Einfu¨hrung, Stuttgart, Germany: B.G. Teubner, 1993.
[4]
Lundheim, L., and T. A. Ramstad, ‘‘An Efficient and Flexible Structure for Decimation and Sample Rate Adaptation in Software Radio Receivers,’’ in Proc. of the ACTS Mobile Communications Summit (AMOS ’99), June 1999, pp. 663–668.
[5]
Hogenauer, E. B., ‘‘An Economical Class of Digital Filters for Decimation and Interpolation,’’ IEEE Transactions on Acoustics, Speech and Signal Processing, Vol. 29, No. 2, April 1981, pp. 155–162.
4 Systems for Integer Factor SRC 4.1 Introduction: The Direct Approach Systems employing oversampling usually require integer factor SRC (i.e., the conversion between an oversampled rate and the current processing rate), which can be the chip or symbol rate of a certain communications standard. Basically, there are two issues that determine the application of integer factor SRC. 1. Analog-to-digital and digital-to-analog conversion benefit from oversampling because the antialiasing filter in the case of analogto-digital conversion and the reconstruction filter in the case of digital-to-analog conversion can be simplified. Moreover, there is an SNR improvement to be gained from oversampling, especially with noise-shaping ADCs (see Section 1.3.1). A signal from an oversampling ADC must be decimated in most cases, while a signal feeding an oversampling DAC must be interpolated first. 2. The bandwidth of a discrete-time signal might be much higher than the bandwidth of interest. This is the case if, for example, the signal at the output of the ADC comprises several frequency multiplexed channels from which only a certain channel is to be processed (i.e., it is GOSR 1). After channel-selection filtering, such a signal is (conventionally) oversampled (i.e., it is OSR 1). Decimating this signal reduces the sample rate and thus the processing load of the following DSP engine, ultimately reducing the power consumption of a system processing this signal. 99
100
Sample Rate Conversion in Software Configurable Radios
The direct approach of realizing integer factor SRC can be concluded from Section 2.2.4 and is determined by the fact that downsampling has to be preceded by filtering in order to avoid aliasing (decimation filter), while upsampling must be followed by filtering in order to remove the images (interpolation filter). The filter is always placed at the high sample rate. Principally, any kind of filter can be used, as long as it observes the required magnitude and phase-response specification. The signal at the input to an interpolation filter comprises L 1 zeros between two consecutive nonzero samples dictated by the required interpolation factor. At the output of the decimation filter M 1 out of M samples are deleted dictated by the required decimation factor. Exploiting this, the filters can be combined with the downsampler or the upsampler, respectively. This leads to solutions being much more efficient that the direct approach. These solutions are based on the polyphase representation of both the signal and the impulse response of the filter and can be derived from the corresponding block-processing structure. In this chapter, polyphase filters for decimation and interpolation are derived based on block signal processing. Furthermore, concepts are investigated that enable a reduction in the number of coefficients of polyphase filters by implementing a continuous-time impulse response rather than implementing the samples of it (i.e., the coefficients of an FIR filter).
4.2 Parallelization: Polyphase Filters 4.2.1 Introductory Remarks In Section 2.3.2 it was argued that ðL; M Þ-shift-invariant systems are periodic with N ¼ LM , with respect to a high intermediate sample rate. These systems can be raised to N in order to find time-invariant realizations. Obviously, systems for increasing and reducing the sample rate by integer factors L or M , respectively, are ðL; 1Þ- and ð1; M Þ-shift-invariant systems. They are periodic with L or M , respectively. Thus, these systems can be implemented in a block structure according to (2.135) and (2.136) with up- and downsampling matrices according to (2.128) to (2.131), respectively. 4.2.2 Increasing the Sample Rate Systems for increasing the sample rate are ðL; 1Þ shift invariant. Thus, raising such a system to L results in a time-invariant system. Setting L0 ¼ 0, the
Systems for Integer Factor SRC
101
up- and downsampling matrices (2.128) to (2.131) of an ðL; 1Þ-shiftinvariant system are: ½up
HðL;1Þ ¼ ½ 1 0
0 T
½down
HðL;LÞ ¼ IðLÞ
ð4:1Þ
with IðLÞ being the identity matrix of Lth order. With (A.27) the following state-space description results: zðk þ 1Þ ¼ A L zðkÞ þ A L1 Bx ðkT1 Þ 3 2 3 2 D C 6 CB 7 6 CA 7 7 6 7 6 7zðkÞ þ 6 CAB 7 y ðkT1 Þ ¼ 6 7x ðkT1 Þ 6 . 6 . 7 7 6 .. 4 . 5 5 4 . L1 CA CA L2 B
ð4:2Þ
ð4:3Þ
The output signal is formed by interleaving the components of y ðkT1 Þ— the normalized polyphase components of y ðkT2 Þ (see (2.83)).
k y ðkT2 Þ ¼ ykðmod LÞ LT2 L
k ð4:4Þ T1 ¼ ykðmod LÞ L with T2 ¼
T1 L
ð4:5Þ
A polyphase implementation of a system for increasing the sample rate can be based upon (4.2) and (4.3). Separating the individual components of y ðkT1 Þ establishes the definition of the polyphase components of an LTI system as given in (2.93). Hence, two implementations can be derived: 1. A separate implementation of the polyphase components (branches) of the filter; 2. A block implementation (i.e., a direct implementation of (4.2) to (4.3)). As mentioned in Section 2.3.3, block implementations of recursive filters show enlarged noise immunity, which provides the opportunity to reduce the coefficient word length of the filter [1].
102
Sample Rate Conversion in Software Configurable Radios
With (2.114), (2.139), and (4.1), the input–output relation (in the z-domain) of the block system for increasing the sample rate is: YðzÞ ¼ ½ H0 ðzÞ
H1 ðzÞ
HL1 T X ðzÞ
ð4:6Þ
where Hl ðzÞ are the z-transforms of the normalized polyphase components of the time-invariant transfer function H ðzÞ given in (2.93). YðzÞ (given in (2.113)) contains the z-transforms of the normalized polyphase components of the signal yðkT2 Þ. Often, the construction of the output signal from the polyphase components is described as being realized by a rotating switch (commutator), which samples all polyphase branches in a defined order once for each input sample of the system. The order of sampling the branches (clockwise or counterclockwise) depends on the type of polyphase definition being used (see Section 2.2.6). In case of type 1 polyphase decomposition, a counterclockwise commutator must be used, as given in (4.4) and shown in Figure 4.1. It should be noted that the state equation (4.2) is the same for all polyphase components of H ðzÞ. The output signals of the different branches are realized by the different output maps. Hence, by sharing the same state space and realizing the output map in a time-varying manner using the same coefficient multiplier platform, a reduction of hardware can be achieved. Thus, the block implementation is more efficient than the conventional polyphase implementation of Figure 4.1.
Figure 4.1 Sample rate increase with polyphase filter and counterclockwise output commutator (polyphase interpolator).
Systems for Integer Factor SRC
4.2.2.1
103
State-Space Reduction with Nonrecursive Filters
If the filters are nonrecursive, further reductions of hardware are possible by means of a reduction of the state space. This reduction can easily be found by inspection of the well-known polyphase structure of a transversal interpolation filter [2]. However, these polyphase structures can also be derived mathematically as a result of a state-space reduction of the respective block filter by means of removing nonobservable or noncontrollable states. This is sketched in the following. The system matrices of the SISO direct form (transversal) FIR filter of Figure 4.2 [2, 3] of order K 1 (K coefficients) are: " # 0ð1;K 2Þ 0ð1;1Þ BðK 1;1Þ ¼ ½1 0 0T AðK 1;K 1Þ ¼ IðK 2Þ 0ðK 2;1Þ ð4:7Þ Cð1;K 1Þ ¼ ½ c1
c2
cK 1
Dð1;1Þ ¼ c0
with IðmÞ being the identity matrix of order m and 0ðm;nÞ being the zeromatrix with m rows and n columns. Raising this system to L, the matrices of the raised system can be calculated by applying (A.27). The task of the filter is the removal of imaging components, which is equivalent to smoothing the signal. In this case, the length K of finitelength impulse responses is generally larger than the upsampling factor L. In order to simplify the calculations, the filter should be zero-padded in order to fulfill K ¼ q L; q ¼ 1; 2; . . .
Figure 4.2 Direct form (transversal) FIR filter of order K 1 (K coefficients).
ð4:8Þ
104
Sample Rate Conversion in Software Configurable Radios
Then the system matrices of the L-raised FIR filter are:
0ðL;K 1LÞ 0ðL;LÞ A ðK 1;K 1Þ ¼ ð4:9Þ IðK 1LÞ 0ðK 1L;LÞ
JðLÞ ð4:10Þ BðK 1;LÞ ¼ 0ðK 1L;LÞ 3 2 c2 cK 3 cK 2 cK 1 c1 7 6 c3 cK 2 cK 1 0 7 6 c2 7 6 7 ð4:11Þ c CðL;K 1Þ ¼ 6 c c 0 0 3 4 K 1 7 6 7 6 4 5
DðL;LÞ
cK 1 3 0 07 7 .. .. 7 7 . .5
cL cLþ1 c0 0
2 6 6 ¼6 6 4
c1 .. .
c0 .. .
cL1
cL2
0
0
ð4:12Þ
c0
with JðLÞ being the counter-identity matrix of order L: 2
JðLÞ
0 60 ¼6 4 ... 1
. ..
0 1
3 1 07 .. 7 .5
0
0
ð4:13Þ
In order to further characterize the system, the controllability matrix can be calculated. This is a common method in system theory. For an insight to these methods, any book on system theory can serve (e.g., [4]). The controllability matrix U can be calculated by applying (4.1), (4.9), and (4.10). h i ½up UðK 1;K 1Þ ¼ B H½up A B H½up . . . A K 2 B H ð4:14Þ ð4:15Þ ¼ ui;k with ui;k ¼
1 k ¼ 0; 1; . . . ; q 2; i ¼ ðk þ 1ÞL 1 0 else
ð4:16Þ
Systems for Integer Factor SRC
105
Thus, 2
UðK 1;K 1Þ
0 6 6 6 0 6 6 1 6 6 6 0 6 6 6 6 0 6 ¼6 6 0 6 0 6 6 6 6 6 0 6 6 0 6 6 0 6 4 0
0 0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
3 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 5
ð4:17Þ
The rank1 of U is q 1 < K 1, which indicates that the system is not controllable. It can be concluded that the system can be realized with a state space of order q 1 without affecting the input–output behavior [4]. The new system is given by the matrices " # 0ð1;q2Þ 0ð1;1Þ ~ ðq1;q1Þ ¼ ð4:18Þ A Iðq2Þ 0ðq2;1Þ ~ ðq1;1Þ ¼ ½ 1 0 0 T B 3 2 cL c2L cðq1ÞL 7 6 cðq1ÞLþ1 7 6 cLþ1 c2Lþ1 7 6 ~ ðL;q1Þ ¼ 6 C 7 . . . 7 6 .. .. .. 5 4 c2L1 c3L1 cqL1
ð4:19Þ
ð4:20Þ
1. The rank of U depends on the choice of L0 as a parameter of H½up . It is q 1 only for L0 ¼ 0. In all other cases, it is q. This can also be seen by inspecting the transfer matrix H ðzÞ of raised time-invariant systems in (2.114), where in all columns at least one element is multiplied by z 1 , except for the first column. This extra z 1 must be implemented by a delay (i.e., an additional state).
106
Sample Rate Conversion in Software Configurable Radios
~ ðL;1Þ ¼ ½ c0 D
c1
cL1 T
ð4:21Þ
which are derived from (4.9) to (4.21) by means of linearly transforming the original state vector zðkÞ with a matrix being derived from the controllability matrix U yielding ~zðkÞ [4]. The new system is both controllable and observable.2 ~ ðq1;q1Þ ~zðkÞ þ B ~ ðq1;1Þ x ðkT1 Þ ~zðk þ 1Þ ¼ A ~ ðL;q1Þ~zðkÞ þ D ~ ðL;1Þ x ðkT1 Þ y ðkT1 Þ ¼ C
ð4:22Þ ð4:23Þ
A resulting structure implementing (4.18) to (4.21) is given in Figure 4.3 for K ¼ 3L coefficients. As in Figure 4.1, the composition of the output signal at the high sample rate out of the components of the block-output signal is realized by a counterclockwise commutator. A time-varying implementation with a reduced number of coefficient multipliers can be obtained by foreseeing only one set of coefficient multipliers and changing the current set of coefficients for each output sample. Finally, it should be mentioned that if the number of coefficients is not an integer multiple of the upsampling factor (i.e., (4.8) is not fulfilled), the ~ of (4.20) is not fully occupied (the last column is partially empty). matrix C This means that at given time instances, the last state of the state space is not observable (from (4.18) it can be seen that it is not needed for the state update, either). Thus, the minimal dimension of the state space is time varying. The problem of minimal realizations with a time-varying state space has been investigated in [5]. 4.2.3 Reducing the Sample Rate For decimation (i.e., decimation/antialiasing filtering and downsampling), principally the same ideas used when discussing systems for sample rate increase and subsequent interpolation/anti-imaging filtering apply. Systems for reducing the sample rate by M are ð1; M Þ-shift-invariant. Thus, raising them to M yields a time-invariant system. If M0 ¼ M 1, the upsampling and downsampling matrices (2.128) to (2.131) of a ð1; M Þ-shift-invariant system are: ½up
HðM ;M Þ ¼ IðM Þ
½down
Hð1;M Þ ¼ ½ 0
0
1
ð4:24Þ
2. The observability depends on the coefficients ci . However, it is not farfetched to assume that they are chosen to enable observability of the new system.
Systems for Integer Factor SRC
107
Figure 4.3 Sample rate increase with FIR filter with reduced state-space and counterclockwise output commutator.
with IðM Þ being the identity matrix of M th order. With (A.27), the following state space description results: zðm þ 1Þ ¼ A M zðmÞ þ A M 1 B A M 2 B B xðmT2 Þ y ðmT2 Þ ¼ CA M 1 zðmÞ þ CA M 2 B CAB CB D xðmT2 Þ
ð4:25Þ ð4:26Þ
The implementation of a system for reducing the sample rate can be based upon (4.25) and (4.26). As in the case of systems for increasing the sample rate, two basic implementations are possible: 1. A separate implementation of the polyphase components of the filter; 2. A block implementation (direct implementation of (4.25) and (4.26)). With (2.114), (2.139), and (4.24), the input–output relation (in the z-domain) of the block system for reducing the sample rate is: Y ðzÞ ¼ ½HM 1 ðzÞ HM 2 ðzÞ H0 ðzÞ XðzÞ
ð4:27Þ
where Hl ðzÞ are the z-transforms of the normalized polyphase components of the time-invariant transfer function H ðzÞ given in (2.93). In practical systems
108
Sample Rate Conversion in Software Configurable Radios
xðmT2 Þ is often created by a counterclockwise commutator, as shown in Figure 4.4. The common state space of all polyphase components enables a time-varying implementation of the mapping of the input signal to the state vector. 4.2.3.1
State-Space Reduction with Nonrecursive Filters
For nonrecursive filters, a block implementation with reduced state space can be found, as in the case of the interpolation filters. The resulting structure, with a counterclockwise commutator at the input, is shown in Figure 4.5 (K ¼ 3M coefficients). It can be found by inspection in a similar way as the equivalent structure of the polyphase interpolator of Figure 4.3 has been found. The mathematical derivation of the implementation with reduced state space is also equivalent to the one given for the system for sample rate increase. It is sketched next. Again, it is certainly sensible to limit the number of coefficients K of the respective FIR filter to be larger than the decimation factor M . By zero padding, the following relationship should always hold: K ¼ q M ; q ¼ 1; 2; . . .
ð4:28Þ
Then, the system matrices of the M -raised FIR filter are given by (4.9) to (4.13) by exchanging L by M . The state space representation is:
Figure 4.4 Sample rate reduction with polyphase filter and counterclockwise input commutator (polyphase decimator), adapted from [6]. Ó 2002 John Wiley & Sons Limited. Reproduced with permission.
Systems for Integer Factor SRC
109
Figure 4.5 Sample rate reduction: block-filter with reduced state space and counterclockwise input commutator.
zðk þ 1Þ ¼ A z ðkÞ þ B xðkT2 Þ y ðkT2 Þ ¼ H½down C zðkÞ þ H½down D xðkT2 Þ
ð4:29Þ
There are single states in the state vector zðkÞ that never have any contribution to the output. Hence, the system is not observable. The observability matrix V [4] is: 3 2 H½down C 7 6 6 H½down C A 7 7 6 ð4:30Þ V ðK 1;K 1Þ ¼ 6 .. 7 5 4 . H½down C A K 1 3 cM cM þ1 cM þ2 cK 1 0 0 6 c2M c2M þ1 cK 1 0 07 7 6 6 7 7 6 ¼6 0 ......... 07 7 6 cK M cK M þ1 . . . . . . cK 1 6 0 . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0 7 7 6 4 5 0 0 2
ð4:31Þ
110
Sample Rate Conversion in Software Configurable Radios
Its rank3 is q 1, which enables the removal of K q states from the system without affecting the input–output behavior (if the initial states are assumed to be zero). To find the reduced description, the original state vector zðkÞ must be linearly transformed yielding ~zðkÞ. The transform matrix can be derived from V ðK 1;K 1Þ [4]. A resulting state-space description of order q 1 is: ~ ðq1;q1Þ ~zðkÞ þ B ~ ðq1;M Þ xðkT2 Þ ~zðk þ 1Þ ¼ A ~ ð1;q1Þ zðkÞ þ D ~ ðM ;1Þ xðkT2 Þ y ðkT2 Þ ¼ C
ð4:32Þ ð4:33Þ
with " ~ ðq1;q1Þ ¼ A 2
0ð1;q2Þ
0ð1;1Þ
Iðq2Þ
0ðq2;1Þ
cqM 1
6 cðq1ÞM 1 6 ~ Bðq1;M Þ ¼ 6 .. 6 4 .
# ð4:34Þ
cqM 2
cðq1ÞM
3
cðq1ÞM 2 .. .
cðq2ÞM .. .
7 7 7 7 5
c2M 1 c2M 2 ~ Cð1;q1Þ ¼ ½0 0 1 ~ ðM ;1Þ ¼ ½ cM 1 cM 2 c0 D
ð4:35Þ
cM ð4:36Þ ð4:37Þ
This system is both controllable4 and observable. It should be noted that the reduction of the state space in both cases, sample rate increase and reduction, is possible if the original filter is an FIR filter. This is due to the specific structure of matrix A in (4.7), whose rank is reduced when being raised to a given power. This is not necessarily so for other types of filters. 4.2.4 Reducing the Size of the Coefficient Memory Generally, the number of coefficients in the systems of Sections 4.2.2 and 4.2.3 is not changed compared to the original interpolation or decimation filter. 3. See Footnote 1. In the case of the polyphase decimator, the rank is q 1 only for M0 ¼ M 1. All other values for M0 yield a rank of q. 4. The controllability depends on the coefficients ci . However, as in the case of the polyphase interpolator, it is not farfetched to assume that the coefficients are chosen in a way to enable controllability.
Systems for Integer Factor SRC
111
Thus, the hardware effort for implementing (4.2) and (4.3), and (4.25) and (4.26), is generally of the same order as the effort for implementing the original filter, except for possible state-space reductions (i.e., fewer registers). However, a direct implementation of the original filter would have to be clocked at a rate being L or M times higher, respectively. Having found implementations that do not need to be clocked at high (intermediate) rates (see Section 2.2.3), however, the hardware effort (i.e., number of coefficients) could not be reduced yet. 4.2.4.1
Recursive Filters
The number of coefficients of recursive filters is principally much lower than the number of coefficients of a nonrecursive filter meeting the same requirements. Often, the order of a recursive filter is less than 10. Therefore, a reduction of the size of the necessary coefficient memory is not really an issue with recursive filters. 4.2.4.2
Nonrecursive Filters
In case of nonrecursive filters, the number of coefficients can easily extend to many hundreds. A straightforward alternative to storing all coefficients (samples of the impulse response) of the filter is their on-line computation. In this case, a description of the continuous-time impulse response hðt Þ must be stored, which allows the computation of any sample of it. Still, the computational effort must be kept low if the overall effort should be decreased compared to storing the coefficients themselves. Moreover, it must be noted that an optimization of the coefficients of the thus obtained digital filter is not feasible at runtime. Many types of impulse responses can be described piecewise or approximated by a piecewise description. Generally, the higher the number of pieces into which the impulse response is cut, the simpler is the resulting description of each piece. If the pieces are small enough, straight lines or even rectangular pulses can be used to describe a desired impulse response. Basically, cutting the continuous-time impulse response hðt Þ into N pieces of length D, each piece can be described by a function h ½i ðt Þ with hðt Þ ¼
N 1 X
h½i ðt iDÞ
ð4:38Þ
if t 2 = ½0; DÞ
ð4:39Þ
i¼0
h½i ðt Þ ¼ 0
112
Sample Rate Conversion in Software Configurable Radios
Although a limiting generality, it is sensible to assume that all h½i ðt Þ are of the same type. A classical example are polynomial filters, where each piece of the impulse response is given as a polynomial of order n 1 (see also Chapter 9 in [7]): 8 n1 > < P ck;i t k D h½i ðt Þ ¼ k¼0 > : 0
0t
ð4:40Þ
else
Thus, n coefficients ck;i , k ¼ 0; 1; . . . ; n 1 have to be stored for each of the N pieces of the impulse response (i ¼ 0; 1; . . . ; N 1). Implementing such a description of an impulse response is advantageous if the memory space for storing the N n polynomial coefficients and the hardware effort for the computation of the current filter coefficients (multipliers, adders) is less than the memory space for storing the filter coefficients themselves. As an extension to the classical polynomial functions, the argument t =D in (4.40) can be replaced by a function of t =D (e.g., the cosine/sine functions that result in a function F being equal to a weighted sum of harmonic cosine functions).
h½i ðt Þ ¼
8 n1 P > > ck;i cosk Dt 0t < k¼0
> > > :
else t o ¼ F cos n ; n ¼ 0; 1; . . . ; n 1 D n
ð4:41Þ
0
ð4:42Þ
Principally, other functions could be used for predistorting the argument t . However, two issues limit the variety of functions that can be used: computational complexity and the ability to approximate the desired impulse response. The cosine/sine functions can be realized with relatively low effort (e.g., by means of a CORDIC [8, 9], which simultaneously calculates the sine and the cosine of an argument). As well as the approximation of a function (impulse response) by polynomials, the approximation by sine and cosine functions is also a wellknown approach (i.e., the Fourier series). It should be noted that it is not necessary to approximate the complete impulse response by a Fourier series, but each of the N pieces can be dealt with separately. Equation (4.41) can be
Systems for Integer Factor SRC
113
regarded as a specific example of a Fourier series representation of one piece of a piecewise impulse response. Because a Fourier series is a periodic function, it is necessary to find a generalization of (4.38) and (4.39) that does not restrict the behavior of the individual pieces h½i ðt Þ outside the interval ½0; DÞ. The following can be used: jt k D ; 0t
n1 X k¼0
ck;bDt c
t D
j t kk D
;
0t
ð4:44Þ
Finally, it has to be mentioned that the application of computable impulse responses is a process of sampling a continuous-time impulse response. Thus, aliasing errors should be expected, which limit the applicability of the approach to bandpass and lowpass filters. In the case of sampling impulse responses of bandpass or lowpass filters, the aliasing errors cause distortions of the transfer characteristics of the filter. However, these distortions are negligible if the sampling theorem is obeyed (i.e., if the stopband attenuation of the filter is sufficiently high and the sample rate is high enough with respect to the passband width). The remaining part of this chapter will deal with the application of piecewise polynomial impulse responses to polyphase filters for decimation and interpolation.
4.3 Efficient Realization of FIR Filters on Periodically Time-Varying Systems 4.3.1 Computing All Coefficients from One Polyphase Component Previously it has been shown that only a part of the coefficients of an impulse response of nonrecursive filters needs to be stored in memory if the remaining ones can be computed from the stored ones. In order to perform this computation, the respective algorithm must be stored also. If the impulse response can be described by piecewise polynomials of order n 1, the n polynomial coefficients for each piece of the impulse response must be held in memory. However, the number of sufficient pieces is an open question.
114
Sample Rate Conversion in Software Configurable Radios
An impulse response of length KT0 can be broken into N pieces of equal length D. Each piece can be approximated (or directly described) by means of a polynomial of a certain order. The larger the number of pieces, the shorter they can be. A large number of pieces leads to a large number of coefficient sets to be stored describing the pieces. However, the shorter the polynomial pieces, the simpler they can be (i.e., having lower order). In the extreme case of sampling the continuous-time prototype impulse response with a very short period (i.e., making the polynomial pieces very short), zero-order polynomials (staircase) can approximate a prototype impulse response sufficiently well. How should the impulse response be partitioned? The coefficients required to calculate one output sample with the system of Figure 4.3 lie T1 ¼ LT2 ¼ LT0 apart. Correspondingly, all coefficients processing the same input sample in Figure 4.5 lie T2 ¼ MT1 ¼ MT0 apart. Thus, the systems for SRC of Section 4.2 indicate the length D of each polynomial piece h½i ðt Þ should be set to LT0 (or MT0 ). It will become clear immediately why this choice is very sensible. With N D being the length of the impulse response, the number of coefficients of the filter obtained from sampling hðt Þ with period T0 is K ¼ NL
or K ¼ NM
ð4:45Þ
Here, only the parameter L will be used in the context of a polyphase interpolator with L branches. However, the results of these investigations are also valid for the polyphase-decimator case with M polyphase branches. Choosing the 0th polyphase component h0 ðk LT0 Þ of an impulse response hðkT0 Þ of a filter as the reference component means that each element of h0 ðk LT0 Þ ¼ hðk LT0 Þ marks a starting point of a polynomial piece of length LT0 . Hence, the samples of all other polyphase components can be calculated from the 0th polyphase component. With (4.40) and (4.43), and noting that l < L, the samples of the impulse response hðt Þ at positions ðkL þ lÞT0 can be calculated as follows: h ðkL þ lÞT0 ¼ h½k ðlT0 Þ ð4:46Þ
2 n1 l l l ¼ c0;k þ c1;k þ þ cn1;k þ c2;k L L L for
k ¼ 0; 1; . . . ; N 1; l ¼ 0; 1; . . . ; L 1
ð4:47Þ
From (4.46) it becomes clear why it is sensible to set the length of the polynomial pieces to LT0 (or MT0 ). In order to calculate the samples of the lth polyphase component of hðkT0 Þ, each polynomial piece must be
Systems for Integer Factor SRC
115
evaluated exactly once at the same position lT0 . This simplifies the implementation of the system. The approximation hðt Þ of a prototype impulse response hproto ðt Þ by piecewise polynomials h½i ðt Þ is sketched in Figure 4.6, where the reference polyphase component h0 ðk LT0 Þ ¼ hðk LT0 Þ is given by the gray discs. The approximated impulse response has been purposefully chosen to be discontinuous in order to easily realize that the reference component marks the starting points of the polynomial pieces. Each starting point of a polynomial piece lies on the prototype impulse response: hðk LT0 Þ ¼ hproto ðk LT0 Þ
ð4:48Þ
It should be noted that polynomial impulse responses do not necessarily have to be a result of an approximation of a prototype impulse response. Likewise, it is possible to directly construct an impulse response from polynomial pieces. Although the following explanations are made with respect to approximating a prototype impulse response by means of polynomial pieces, the resulting structures are applicable to all piecewise polynomial impulse responses of the investigated type.
Figure 4.6 Approximating (or constructing) an impulse response by piecewise polynomials.
116
Sample Rate Conversion in Software Configurable Radios
With the choice of the 0th polyphase component as the reference component, some of the polynomial coefficients are readily available. By setting l ¼ 0 in (4.47) and using (4.48), it is c0;k ¼ h ðk LT0 Þ ¼ hproto ðk LT0 Þ
ð4:49Þ
The other coefficients ci;k have to be found with respect to the intended transfer characteristics of the filter. Usually, several conditions (e.g., the interpolation condition of (2.19), a continuous course of the impulse response, or frequency domain constraints) can be applied. The final result can be obtained by an optimization procedure [7, 10]. 4.3.1.1
Sample Rate Increase
Suppose the minimum state space of a system for increasing the sample ~, B ~ , and D ~, C ~ in (4.18) to (4.21). In the rate is given by the matrices A ~ and D ~ can be case of a piecewise polynomial filter, the matrices C ~ expressed as a sum of matrices Ci . Note that q ¼ N with respect to (4.8) and (4.45). With the assumption that the samples hðkT0 Þ of a finitelength impulse response equal the coefficients ck of the corresponding transversal filter—that is, hðkT0 Þ ¼ ck
ð4:50Þ
and with (4.47): 2 ~ ðL;N 1Þ C
cL
6 6 cLþ1 6 ¼6 6 .. 6 . 4 c2L1
c2L
c2Lþ1 .. . c3L1
~0 þ C ~1 þ C ~ n1 :¼ C 3 2 0i 6 1i 7 7 6 6 L 7 6 7 6 2 i 7 7 ~ with Ci :¼ 6 6 L 7 ½ ci;1 ci;2 7 6 6 .. 7 6 . 7 5 4 L1i L
cðN 1ÞL
3
7 cðN 1ÞLþ1 7 7 7 7 .. 7 . 5
ð4:51Þ
cNL1 ð4:52Þ
ci;N 1
ð4:53Þ
Systems for Integer Factor SRC
117
~: The same principle applies to D ~ ðL;1Þ ¼ ½ c0 c1 cL1 T D ~0 þ D ~1 þ D ~ n1 :¼ D 3 0i 6 1i 7 6 L 7 6 i 7 2 7 ~ i :¼ 6 with D 6 L 7 ci;0 6 . 7 6 . 7 4 . 5 L1i
ð4:54Þ ð4:55Þ
2
ð4:56Þ
L
From (4.52) and (4.53), and (4.55) and (4.56), a structure that implements the polynomial filter very efficiently can be derived. It is commonly called the Farrow structure [11], which is shown in Figure 4.7. The quantity m¼
l 2 ½0; 1Þ; l ¼ 0; 1; . . . ; L 1 L
ð4:57Þ
Figure 4.7 Farrow structure for interpolation with piecewise polynomial filters (stepping through l ¼ 0; 1; . . . ; L 1 yields the upsampled and filtered output signal).
118
Sample Rate Conversion in Software Configurable Radios
is the intersample position (see (2.35) and (2.73)). If the 0th polyphase component is used as the reference component, the lth polyphase component is directly related to the intersample position m ¼ l=L. Note that the ~ and D ~ is coefficients ci;k in Figure 4.7 are fixed. Selecting the lth row of C simply done by varying the signal m ¼ l=L. The upsampled and filtered signal is obtained by stepping through all l ¼ 0; 1; . . . ; L 1 sequentially for each new input sample. Thus, for each input sample, L output samples are generated. It is also possible to choose any other than the 0th polyphase component as the reference component, from which all other components are derived. In this case the intersample position m covers a different interval of the same length, and (4.49) changes. The principal behavior and structure do not change, though. Example 4.1
We derive the Farrow structure for a piecewise polynomial filter with the following two polynomial pieces: h½0 ðt Þ ¼
t T1
h½1 ðt Þ ¼ 1
t T1
The impulse response (see (4.43)) is h½0 ðt Þ 0 t < T1 hðt Þ ¼ h½1 ðt Þ T1 t < 2T1 ( ¼
t T1
0 t < T1
1 Tt1
T1 t < 2T1
ð4:58Þ
ð4:59Þ
ð4:60Þ
Thus, with D ¼ LT0 ¼ T1 , the coefficients of (4.40) are: c0;0 ¼ 0
c1;0 ¼ 1
c0;1 ¼ 1
c1;1 ¼ 1
ð4:61Þ
c0;0 and c0;1 are the samples of hðt Þ at t ¼ 0 and t ¼ D ¼ T1 , respectively. c1;0 and c1;1 are necessary to completely describe the polynomial pieces. hðt Þ is the impulse response of a linear interpolator. It is sketched in Figure 4.8(a). The transfer function magnitude is shown in Figure 4.8(b). Employing the coefficients of (4.61) in (4.51) through (4.56) and consequently in (4.18) through (4.21), yields the Farrow structure of the linear interpolator. It is shown in Figure 4.9.
Systems for Integer Factor SRC
119
Figure 4.8 (a) Impulse response and (b) transfer function magnitude of a linear interpolator.
Figure 4.9 Linear interpolator on the Farrow structure.
4.3.1.2
Sample Rate Reduction
~, B ~ , and D ~, C ~ in (4.34) to (4.37) is the The system given by the matrices A ~ can be starting point. In case of piecewise polynomial filters, the matrix B ~ expressed as a sum of matrices Bi . Note that q ¼ N . With (4.47) and (4.50) it is:
120
Sample Rate Conversion in Software Configurable Radios
2
~ ðN 1;M Þ B
cðN 1ÞM þðM 1Þ
6 6 cðN 2ÞM þðM 1Þ 6 6 ¼6 .. 6 6 . 4
cðN 1ÞM þðM 2Þ
cðN 2ÞM þðM 2Þ
cM þðM 1Þ
cðN 1ÞM
7 cðN 2ÞM 7 7 7 7 .. 7 7 . 5
.. .
cM þðM 2Þ
~0 þ B ~1 þ B ~ n1 :¼ B 3 2 ci;N 1 7 6 6 ci;N 2 7 7 h 6 i 7 ~ i :¼ 6 with B 6 . 7 MM1 6 . 7 6 . 7 5 4
3
ð4:62Þ
cM ð4:63Þ
M 2i M
1 i M
0i
i
ð4:64Þ
ci;1 ~: The same principle applies to D ~ ð1;M Þ ¼ ½ cM 1 cM 2 c0 D ~1 þ D ~ n1 ~0 þ D :¼ D h ~ i :¼ ci;0 M 1i M 2i with D M M
ð4:65Þ 1 i M
0i
i
ð4:66Þ ð4:67Þ
The following signal is defined: ~ xðmT2 Þ xB~ ðmT2 Þ :¼ B 2 n1 3 P PM 1 M 1i j c x ð mT Þ i 2 M 7 6 j¼0 j;N 1 i¼0 7 6 7 6 6 n1 7 7 6P PM 1 M 1i j 6 xi ðmT2 Þ 7 M 7 6 j¼0 cj;N 2 i¼0 7 ¼6 7 6 7 6 . 7 6 .. 7 6 7 6 6 n1 7 PM 1 M 1i j 5 4 P cj;1 i¼0 xi ðmT2 Þ M j¼0
where each component of xB~ ðmT2 Þ can be written as
ð4:68Þ
ð4:69Þ
Systems for Integer Factor SRC
xB~ ;l ðmT2 Þ ¼
M 1 X
121
M 1i M 1i c1;N 1l þ M M i¼0
M 1i cn2;N 1l þ cn1;N 1l xi ðmT2 Þ M c0;N 1l þ
ð4:70Þ l ¼ 0; 1; . . . ; N 2
for Likewise: ~ xðmT2 Þ xD~ ðmT2 Þ :¼ D ¼
n1 X
cj;0
j¼0
¼
ð4:71Þ
i¼0
M 1 X
c0;0 þ
i¼0
M 1 i j xi ðmT2 Þ M
M 1 X
ð4:72Þ
M 1i M 1i c1;0 þ M M
M 1i cn1;0 xi ðmT2 Þ cn2;0 þ M
ð4:73Þ
The state-space description of the polynomial polyphase-decimator is: ~ zðmÞ þ x ~ ðmT2 Þ zðm þ 1Þ ¼ A B ~ y ðmT2 Þ ¼ CzðmÞ þ x ~ ðmT2 Þ
ð4:74Þ
D
A realization can be derived directly from (2.83), (4.70), (4.73), and (4.74). It is shown in Figure 4.10. Realizing polynomial filtering on a polyphase interpolator (Figure 4.1) yields the well-known Farrow structure. The structure of Figure 4.10 is a result of realizing a polyphase decimator with polynomial filtering. Because the polyphase decimator is the transposed system of the polyphase interpolator [3], the structure of Figure 4.10 is named the transposed Farrow structure.5 5. In order to distinguish between the Farrow structure of Figure 4.7 and the transposed Farrow structure, the first is named conventional Farrow structure from now on.
122
Sample Rate Conversion in Software Configurable Radios
Figure 4.10 Efficient structure for decimation with piecewise polynomial filters PM1 (transposed Farrow structure). The boxes kðmod MÞ ¼ 0 represent an integrate-and-dump circuit starting integration at k(mod M) ¼ 0 (integrating over a period T2 ), thus realizing decimation. Adapted from [6]. Ó2002 John Wiley & Sons Limited. Reproduced with permission.
Example 4.2
As in Example 4.1, we derive the transposed Farrow structure for a polynomial filter whose impulse response is composed from the following two pieces: h½0 ðt Þ ¼
t T2
h½1 ðt Þ ¼ 1
The impulse response ((see 4.43)) is
t T2
ð4:75Þ
Systems for Integer Factor SRC
hðt Þ ¼ ¼
h½0 ðt Þ h½1 ðt Þ t T2
1 Tt2
123
0 t < T2 T 2 t < 2T 2 0 t < T2 T 2 t < 2T 2
ð4:76Þ ð4:77Þ
Thus, with D ¼ MT0 ¼ T2 , the coefficients of (4.40) are identical to those of Example 4.1: c0;0 ¼ 0
c1;0 ¼ 1
c0;1 ¼ 1
c1;1 ¼ 1
ð4:78Þ
c0;0 and c0;1 are the samples of hðt Þ at t ¼ 0 and t ¼ D ¼ T2 , respectively. c1;0 and c1;1 are necessary to describe the polynomial pieces completely. hðt Þ is similar to the impulse response of Example 4.1; however, it covers the interval t 2 ½0; 2T2 Þ instead of t 2 ½0; 2T1 Þ of Example 4.1. Thus, it has different transfer characteristics. This is achieved by setting D ¼ T2 instead of D ¼ T1 . The impulse response and the transfer function magnitude are equivalent to Figure 4.8. Employing the coefficients of (4.78) in Figure 4.10 yields the transposed Farrow structure for hðt Þ of (4.77). It is sketched in Figure 4.11. What we
Figure 4.11 Linear polynomial decimator on the transposed Farrow structure, adapted from [6]. Ó 2002 John Wiley & Sons Limited. Reproduced with permission.
124
Sample Rate Conversion in Software Configurable Radios
have thus obtained is a system for decimation with antialiasing properties that are identical to the anti-imaging properties of the linear interpolator of Example 4.1. 4.3.1.3
Anti-Imaging and Antialiasing with Lagrange-Polynomial Filters
The main characteristic of the polynomial polyphase filters in this section is that all coefficients of the impulse response are calculated from one polyphase component. Although limiting the class of realizable transfer functions, this characteristic still enables a great variety of transfer function types to be realized. Depending on the selection of the coefficients of the reference polyphase component and the degree of the polynomials being used for calculating the remaining coefficients, most different transfer functions can be realized. However, if (2.19) n h ðk LT0 Þ ¼ 1 if k = 0 0 if k = 1, 2, ... should be fulfilled, Lagrange interpolation polynomials and those polynomials that are composed from Lagrange interpolation polynomials result as a subset of the set of possible solutions. These filters have been the subject of intensive study (for the mathematical foundation see [12]; for a classical paper see [13]; applications are given in [11, 14]; and an overview including applications is provided in [10]). Their main characteristic is that they have transfer zeros that tend to be equidistantly clustered. The actual distance is determined by the length of the polynomial pieces with respect to the sampling period (see Figures 2.4, 2.5, and 4.8). Specifically, if the filter is used for interpolation, the zeros tend to be clustered about integer multiples of 1=ðLT0 Þ [13], which provides high attenuation of the images being caused by upsampling. Implementing polynomial filters on the transposed Farrow structure requires (and enables) a length of the individual polynomial pieces of MT0 (where M is the decimation factor). Thus, in this case the transfer zeros are clustered about integer multiples of 1=ðMT0 Þ, which are exactly the positions of potential aliasing components. This novel application of polynomial filters to decimation has great impact on the design of systems for fractional SRC, as will be seen in Chapter 6. 4.3.2 Storing More Than One Polyphase Component The starting point of the previous section was the idea of just storing one polyphase component of a polyphase filter and calculating the remaining
Systems for Integer Factor SRC
125
ones by means of polynomial definitions. This has turned out to be advantageous. The reasons for this are that the number of samples of one polyphase component is generally relatively low (low memory size for storing the coefficients) and the controlling overhead can be kept at a minimum, which results in the very regular and simple conventional Farrow structure for interpolation and the transposed Farrow structure for decimation. However, the necessary number of multipliers is proportional to the degree of the piecewise polynomials, which can be quite high for certain impulse responses. To reduce the degree of the polynomial pieces they must be shorter, if the approximation of a given impulse response (and the transfer characteristics in general) should not degrade. The ultimate goal could be zero-order interpolation simply being realized by a sample-andhold function, or linear interpolation. Thus, a trade-off between the number of coefficients (memory size) and the number of multipliers (chip size, power consumption) can be made. If the number of coefficients is increased to an integer multiple of the number of coefficients of one polyphase component of the impulse response, the structures of Figures 4.7 and 4.10 can still be used. Again, the 0th and additionally every pth polyphase component are used as reference components. Thus, the number of reference coefficients per original piece of length LT0 (or MT0 ) is r. For r ¼ 2, this is sketched in Figure 4.12. With p r ¼ L ðor M Þ; p; r 2 Nþ
ð4:79Þ
equations (4.47) and (4.49) change to
l h ðkL þ lÞT0 ¼ h k þ LT0 L
¼ c0;k
j k
l p
j k
l lðmod pÞ þ c1;k p p
j k
l lðmod pÞ 2 þ c2;k þ p p j k
l lðmod pÞ n1 þ cn1;k p p for k ¼ 0; 1; . . . ; N 1
and l ¼ 0; 1; . . . ; L 1
ð4:80Þ
126
Sample Rate Conversion in Software Configurable Radios
Figure 4.12 Approximating (or constructing) an impulse response by piecewise polynomials of a length of pT0 ¼ LT0 =2.
with c0;i ðl Þ ¼ h ðiL þ pl ÞT0 ¼ hproto ðiL þ pl ÞT0 ;
l ¼ 0; 1; . . . ; r 1; i ¼ 0; 1; . . . ; N 1 ð4:81Þ
Equations (4.80) and (4.81) look a bit complicated compared to (4.47) and (4.49). This is because each piece of the impulse response of length LT0 (formerly realized by one polynomial piece) is composed from an integer number of shorter polynomial pieces connecting the r reference samples. Thus, selecting a polyphase component (i.e., sampling the continuous-time impulse response with a sampling period LT0 and an offset lT0 ), involves a selection of one of the short polynomial pieces additionally to evaluate the intersample position on these shorter polynomials. This is represented by the floor and modulo operations and involves a more sophisticated control if it is implemented. As (4.80) suggests, the coefficients ci;k are time varying (i.e., they depend on l). An example with L ¼ 9, p ¼ r ¼ 3, and l ¼ 5 is shown in Figure 4.13. In order to evaluate hðt Þ at the position t ¼ lT0 ¼ 5T0 , it is necessary to first
Systems for Integer Factor SRC
127
Figure 4.13 Evaluating hðt Þ at t ¼ lT0 (l ¼ 5; hðt Þ is a piecewise polynomial impulse response with r ¼ 3 polynomial pieces per interval LT0 with L ¼ 9; p ¼ 3).
select one of the r ¼ 3 polynomial pieces, which eventually results in the selection of one of the r ¼ 3 sets of coefficients ci;k ðl Þ, l ¼ 0; 1; 2. This is done by means of the floor operation bl=pc ¼ b5=3c ¼ 1, selecting the short 1 . Secondly, the position lT0 on this very polynomial piece number W polynomial piece is calculated by means of the modulo operation lðmod pÞ ¼ 5ðmod 3Þ ¼ 2. Supposing the coefficients that describe the polynomials are available, hðlT0 Þ can be evaluated. It should be noted that setting p ¼ L (r ¼ 1) establishes (4.47) and (4.49). Depending on the necessary degree of the polynomials, the remaining coefficients have to be found by considering the intended transfer characteristics of the impulse response. The number of polynomial coefficients to be stored is rnN . This is r times the number of coefficients that are necessary if only one polyphase component is stored as a reference component (Section 4.3.1). Additionally, the necessary effort for control has increased. However, the increasing effort can be made up for by a lower degree of the polynomials, which allows reduction of the number of coefficients as well as reduction of the number of necessary multipliers.
128
4.3.2.1
Sample Rate Conversion in Software Configurable Radios
Sample Rate Increase
The minimum state space of a system for sample rate increase is given by the ~, B ~ , and D ~ and ~, C ~ in (4.18) to (4.21). With (4.80) the matrices C matrices A ~ D can be partitioned into horizontal bands of height p. The first line of each band represents the known coefficients (i.e., the reference components), while the remaining ones comprise the coefficients that must be calculated by the respective polynomial functions. 3 2 ~ ðp;N 1Þ ð0Þ C 7 6 ~ 6 Cðp;N 1Þ ð1Þ 7 7 6 ~ ð4:82Þ CðL;N 1Þ ¼ 6 .. 7 5 4 . ~ ðp;N 1Þ ðr 1Þ C with 2
cLþip
6 cLþipþ1 ~ ðp;N 1Þ ðiÞ ¼ 6 C 6 .. 4 . cLþipþp1
c2Lþip c2Lþipþ1 .. . c2Lþipþp1
cðN 1ÞLþip cðN 1ÞLþipþ1 .. .
3 7 7 7 5
ð4:83Þ
cðN 1ÞLþipþp1
~ ðL;N 1Þ can be decomposed into a sum of matrices. In equivalence Again, C to (4.51) to (4.53), it is 3 2 3 3 2 2 ~ 1 ð0Þ ~ n1 ð0Þ ~ 0 ð0Þ C C C 7 6 ~ ð1Þ 7 7 6 C 6 C 7 6 ~ 0 ð1Þ 7 6 C 6 ~ n1 ð1Þ 7 1 7þ6 7 þ þ 6 7 ~ ðL;N 1Þ :¼ 6 C .. .. .. 7 6 7 7 6 6 5 4 5 5 4 4 . . . ~ 0 ðr 1Þ ~ 1 ðr 1Þ ~ n1 ðr 1Þ C C C 2
i
ð4:84Þ
3
0 6 1i 7 7 6 p 7 6 6 i 7 6 2 7 7 ½ ci;1 ðl Þ ~ i ðl Þ :¼ 6 p with C 7 6 6 . 7 6 . 7 6 . 7 4 i 5 p1 p
~ can be written as The matrix D
ci;2 ðl Þ
ci;N 1 ðl Þ
ð4:85Þ
Systems for Integer Factor SRC
2
~ ðL;1Þ D
6 6 6 6 ¼6 6 6 6 4
~ ðp;N 1Þ ð0Þ 3 D 7 ~ ðp;N 1Þ ð1Þ 7 7 D 7 7 7 .. 7 7 . 5
129
ð4:86Þ
~ ðp;N 1Þ ðr 1Þ D 2
with
cip
3
7 6 7 6 c 6 ipþ1 7 7 6 7 ~ ðp;1Þ ðiÞ ¼ 6 D 6 . 7 6 .. 7 7 6 5 4 cipþp1
ð4:87Þ
and as in (4.54) through (4.56) as a sum of matrices 3 2 ~ 3 3 2 ~ 2 ~ D1 ð0Þ Dn1 ð0Þ D0 ð0Þ 7 6 ~ ð1Þ 7 7 6 D 6 D 1 7 6 ~ 0 ð1Þ 7 6 D 6 ~ n1 ð1Þ 7 7 7 7 6 6 6 ~ DðL;1Þ :¼ 6 .. .. .. 7þ6 7 þ þ 6 7 5 4 5 5 4 4 . . . ~ 0 ðr 1Þ ~ 1 ðr 1Þ ~ n1 ðr 1Þ D D D 3 2 i 0 6 1 i 7 6 p 7 7 6 6 i 7 7 6 ~ i ðl Þ :¼ 6 2p 7 ci;0 ðl Þ with D 7 6 7 6 6 .. 7 6 . 7 4 i 5
ð4:88Þ
ð4:89Þ
p1 p
If the lth polyphase component is selected, l has to be projected to the p < l positions within the r different polynomial pieces (i.e., one of the r ~ and D ~ must be selected, as well as the respective row bands of the matrices C inside these matrices). Mathematically, this can be described by the floor and the modulo operations (see Figure 4.13). Thus, with the state update according to (4.22), the lth normalized polyphase component of the interpolated output signal is:
130
Sample Rate Conversion in Software Configurable Radios
yl ðkT1 Þ
n1 j k j k i X lðmod pÞ i h jlk ~zðkT1 Þ ci;1 p ¼ ci;2 lp ci;N 1 lp p i¼0 þ
n1 X lðmod pÞ i i¼0
p
ci;0
j k
l p
x ðkT1 Þ
ð4:90Þ
The implementation of such a system is principally the same as shown in Figure 4.7, where a fixed set of polynomial coefficients and the quantity l for calculating the outputs of the different polyphase branches were used. Here, a time-varying set of polynomial coefficients ci;k ðl Þ is used. The conventional Farrow structure with time-varying coefficients is also called the generalized Farrow structure [15, 16]. 4.3.2.2
Sample Rate Reduction
As in the case of interpolation, the number of coefficients can be traded off against the order of the polynomials with polyphase decimation. This is based on increasing the number of stored coefficients by increasing the number of reference components to an integer number r. Hence, the ~ and D ~ can be separated into bands as it has been done with matrices B ~ and D ~ in (4.82) and (4.86). With matrices C p r ¼ M ; p; r 2 Nþ
ð4:91Þ
p different polyphase components are calculated from one of the r sets of coefficients. This enables (4.62) to (4.73) to be written as ~ ðN 1;M Þ ¼ B ~ ðN 1;pÞ ðr 1Þ B ~ ðN 1;pÞ ð1Þ B ~ ðN 1;pÞ ð0Þ ð4:92Þ B with 2
cðN 1ÞM þpiþp1 cðN 1ÞM þpiþ1 cðN 1ÞM þpi
3
7 6c 6 ðN 2ÞM þpiþp1 cðN 2ÞM þpiþ1 cðN 2ÞM þpi 7 7 6 ~ ðN 1;pÞ ðiÞ ¼ 6 B 7 ð4:93Þ .. .. .. 7 6 . . . 5 4 cM þpiþp1 cM þpiþ1 cM þpi ~ ðN 1;M Þ into a sum of matrices yields a result equivalent to Decomposing B (4.62) and (4.64):
Systems for Integer Factor SRC
~ ðN 1;M Þ :¼ B ~ 0 ðr 1Þ B ~ 0 ðr 2Þ B ~ 0 ð0Þ B ~ 1 ðr 1Þ B ~ 1 ðr 2Þ B ~ 1 ð0Þ þ B þ ~ n1 ðr 1Þ B ~ n1 ðr 2Þ B ~ n1 ð0Þ þ B 3 2 ci;N 1 ðl Þ 6 ci;N 2 ðl Þ 7 i i i 7 6 p1 p2 ~ with Bi ðl Þ :¼ 6 7 1p 0i .. p p 5 4 . ci;1 ðl Þ
131
ð4:94Þ
ð4:95Þ
~ (as in (4.65) through (4.67)): The same principle applies to D ~ ðM ;1Þ :¼ D ~ 0 ðr 1Þ D ~ 0 ðr 2Þ D ~ 0 ð0Þ D ~ 1 ðr 2Þ D ~ 1 ð0Þ ~ 1 ðr 1Þ D þ D þ ~ n1 ðr 1Þ D ~ n1 ðr 2Þ D ~ n1 ð0Þ þ D
i i i p2 1 i ~ i ðl Þ :¼ ci;0 ðl Þ p1 with D 0 p p p
ð4:96Þ
ð4:97Þ
The following signal is defined: ~ xðmT2 Þ xB~ ðmT2 Þ:¼ B
3 2 n1 M 1 j k j P P ðp1iÞðmod pÞ i xi ðmT2 Þ 7 p 6 j¼0 i¼0 cj;N 1 p 7 6 7 6
7 6 n1 j k 1 j 7 6 P MP ðp1iÞðmod pÞ i cj;N 2 p xi ðmT2 Þ 7 6 p 7 6 j¼0 i¼0 ¼6 7 7 6 7 6 .. 7 6 . 7 6
7 6 n1 M 1 j k j 5 4P P ðp1iÞðmod pÞ i cj;1 p xi ðmT2 Þ p j¼0
i¼0
where each component of xB~ ðmT2 Þ can be written as
ð4:98Þ
ð4:99Þ
132
Sample Rate Conversion in Software Configurable Radios
M 1 X
j k
i ðp 1 iÞðmod pÞ xB~ ;l ðmT2 Þ ¼ c0;N 1l þ p p i¼0 j k
i ðp 1 iÞðmod pÞ c1;N 1l þ p p
j k
i ðp 1 iÞðmod pÞ cn2;N 1l þ p p j k
i cn1;N 1l xi ðmT2 Þ p
l ¼ 0; 1; . . . ; N 2
ð4:100Þ
Likewise can be defined: ~ xðmT2 Þ xD~ ðmT2 Þ:¼ D ¼
n 1 M 1 X X j¼0
¼
i¼0
M 1 X i¼0
ð4:101Þ
j k i ðp 1 iÞðmod pÞj cj;0 xi ðmT2 Þ ð4:102Þ p p
c0;0
j k
i
c1;0
p j k
i p
þ
ðp 1 iÞðmod pÞ p
þ
ðp 1 iÞðmod pÞ p
ð4:103Þ
j k
i ðp 1 iÞðmod pÞ þ p p j k
i cn1;0 xi ðmT2 Þ p
cn2;0
An implementation can directly be derived from (4.74) and (4.100) to (4.103). It is principally the same as that given in Figure 4.10, but with time-varying sets of coefficients ci;k ðl Þ.
Systems for Integer Factor SRC
133
4.3.3 Alternative Interpretation of Polynomial Polyphase Filters Earlier considerations are based on implementing polyphase filters for interpolation and decimation with a reduced number of coefficients. By employing computable impulse responses, only a fraction of the original number of coefficients has to be stored in memory. A hardware structure realizing these filters is the conventional Farrow structure in the case of interpolation and the transposed Farrow structure in the case of decimation. As far as interpolation is concerned, the conventional Farrow structure has been found originally in another way: By starting with the interpolation problem, and determining proper interpolation polynomials, the conventional Farrow structure can be derived by rearranging the polynomial impulse response [7, 14, 17]. Substituting (4.44) to (2.9) and setting D ¼ T1 ¼ LT2 yields yðmT2 Þ ¼
1 X
xðkT1 Þ
n 1 X i¼0
k¼1
jm kL k i m $ % c mkL k i; L L L ð4:104Þ
0 m kL < NL which can be simplified to yðmT2 Þ ¼
n 1 X
x~i ðmT2 Þ ðmm Þi
ð4:105Þ
i¼0
where xi ðmT2 Þ ¼ ~
1 X
xðkT1 Þ ci;bmLck
ð4:106Þ
k¼1
and mm according to (2.12) mm ¼ Equation (4.106) can be In fact, it describes the signals x~i ðmT2 Þ remain ðj þ 1ÞL 1 with j 2 Z. (4.105).
m jm k L L
regarded as a conventional FIR-filter operation. individual rows of Figure 4.7. Note that the constant for each period m ¼ jL; jL þ 1; . . . ; The signals x~i ðmT2 Þ are combined according to
134
Sample Rate Conversion in Software Configurable Radios
In contrast to this, it has been described in Sections 4.3.1 and 4.3.2 that the (generalized) Farrow structure is simply a consequence of implementing polynomial-like6 filters on a polyphase structure. Another interpretation of the approach of Section 4.3.2 is given next. A polynomial polyphase filter can be represented by the L (or M ) impulse responses of the individual polyphase components, as described by (4.80):
l LT0 h ðkL þ lÞT0 ¼ h k þ L j k
j k
l l lðmod pÞ þ c1;k ¼ c0;k p p p j k
l lðmod pÞ 2 þ c2;k þ p p j k
l lðmod pÞ n1 þ cn1;k p p for l ¼ 0; 1; . . . ; L 1 A filter with this impulse response hðt Þ (piecewise polynomials of length pT0 ) can be used for interpolation by L ¼ pr. Rather than doing this in one step, it can also be done in two steps—interpolation by r and p separately. In this case, the impulse response hðt Þ can be obtained from a convolution of hðk pT0 Þ and h int ðt Þ (rather than the more general concatenation of polynomial pieces of (4.38) or (4.43)). hðt Þ ¼
1 X
hðk pT0 Þ h int ðt k pT0 Þ
ð4:107Þ
k¼1
Hence, L-times interpolation of a signal can be accomplished by r-times interpolation with a filter having the impulse response hðk pT0 Þ, and p-times interpolation with a filter having the impulse response h int ðnT0 Þ. Because h int ðt Þ can be regarded as interpolating the model filter hðk pT0 Þ, 6. We speak of ‘‘polynomial-like filters,’’ because in Section 4.2.4, not only polynomials in t but also polynomials in cosðt Þ and sinðt Þ have been mentioned. They can be implemented on the Farrow structure as well as all other polynomials of a function of time (intersample position).
Systems for Integer Factor SRC
135
a filter according to (4.107) is called an interpolated FIR filter. This class of filters has been proposed in [18], based on [19]. hðk pT0 Þ represents an FIR filter that is constructed by properly interleaving the r reference polyphase components of hðnT0 Þ (see Figure 4.14). They can be obtained by restricting l to
Figure 4.14 Constructing the impulse response hðt Þ of (a), an interpolation filter by convolving (b), the impulse response hðk pT0 Þ of a model filter with (c), the impulse response of a polynomial interpolation filter hint(t ); with r ¼ 2 and L ¼ 2p (in (b) the two reference polyphase components are indicated by the black and gray discs).
136
Sample Rate Conversion in Software Configurable Radios
l ¼ 0; p; . . . ; ðr 1Þp and substituting (4.108) into (4.80). Then we have
l ; l ¼ 0; p; . . . ; ðr 1Þp h ðkL þ lÞT0 ¼ c0;k p
ð4:108Þ
ð4:109Þ
The coefficients c0;k ðl Þ determine the transfer characteristics of the model filter. Instead of processing a signal by the two filters separately, it can be processed on a system that implements the interpolated impulse response of the FIR filter. This is how Ramstad [15, 16] has introduced the generalized Farrow structure which implements these interpolated impulse responses. It is remarkable that not only is pure polynomial interpolation realizable with the Farrow structure, but also a combination of polynomial interpolation and filtering with an FIR filter (i.e., interpolation with interpolated FIR filters). It should be noted that the sequential order of the model filter h ðk pT0 Þ and the polynomial interpolator can be reversed. This is advantageous if decimation is the issue. In this case, hint ðnT0 Þ represents a polynomial antialiasing filter. It can be applied first, before downsampling by p, filtering with h ðk pT0 Þ, and downsampling by r is performed. Interpolated FIR filters for decimation can be implemented on the generalized transposed Farrow structure (i.e., the structure of Figure 4.10 with time-varying coefficients). So far, p was restricted to be a positive integer number (see (4.79)). In order to give up this restriction, a positive integer factor J can be introduced. By multiplying both, p and L (or M ) by J , a possibly rational p is multiplied by J yielding an integer pJ : ðJpÞ r ¼ JL; with J ; r 2 Nþ ; p 2 Q pJ r ¼ JL; with J ; r; pJ 2 Nþ
ð4:110Þ ð4:111Þ
This means that the rate-change factor L (or M ) is increased to JL (or JM ), which must be compensated by an additional downsampling (or upsampling, respectively) by J . Thus, (4.5) becomes T2 J ¼ T1 J L
ð4:112Þ
Systems for Integer Factor SRC
137
This is a special case of rational factor SRC, which can be tackled with the solutions given in Chapter 6. If L (or M ) are prime numbers, this virtual upsampling by J can be especially of interest, as (4.79) cannot be used in this case. Example 4.3
We want to design a system for interpolation by L ¼ 120. The image suppression should be 40 dB. Suppose an FIR filter designed with the MATLAB routine firls(798,[0 0.75/120 1.25/120 1],[1 1 0 0]) is sufficient. It has a cutoff frequency of 0.75 times the Nyquist rate (half the sample rate) before interpolation and a left-edge stopband frequency of 1.25 times the Nyquist rate before interpolation. The number of coefficients resulting from the above MATLAB command is 799. For convenience, we insert a zero at the beginning and the end of the impulse response, thus obtaining an 801-tap FIR filter with the impulse response hðkT0 Þ. The impulse response and the magnitude spectrum are sketched in Figure 4.15. This filter can be implemented as a polyphase interpolator with 120 polyphases h l ðk 120T0 Þ for l ¼ 0; 1; . . . ; 119, each having six or seven coefficients. Because only one polyphase branch is involved in the calculation of an output sample, only six or seven coefficients are used to calculate a single output sample. In order to save coefficient memory, we want to apply the generalized Farrow structure. Because it is 120 ¼ 20 6 (i.e., r ¼ 6 and p ¼ 20), we can first interpolate by 6 with an FIR filter and after that by 20 with a polynomial interpolator. The combination of FIR filter and polynomial interpolator (i.e., the interpolated FIR filter) is implemented on the generalized Farrow structure. Usually the new FIR filter for interpolation by 6 would be directly designed (e.g., with the MATLAB command firls(40, [0 0.75/ 6 1.25/6 1], [1 1 0 0])). However, in order to show that it is also possible to approximate the 801-tap FIR filter with an interpolated FIR filter we derive the new FIR filter from the 801-tap FIR filter. Because interpolation by 6 is 20 times less than the 801-tap FIR filter was designed for, we need only a 20th of the coefficients of the 801-tap FIR-filter, specifically every 20th coefficient of hðkT0 Þ. This can also be regarded as decomposing the 801-tap FIR filter into 20 polyphase components hl ðk 20T0 Þ for l ¼ 0; 1; . . . ; 19 (each a length of 40, except the 0th that has a length of 41) and choosing one of them, for example, h0 ðk 20T0 Þ ¼ hðk 20T0 Þ.
138
Sample Rate Conversion in Software Configurable Radios
Figure 4.15 (a) Impulse response hðkT0 Þ and (b) magnitude spectrum of an 801-tap filter.
In order to maintain the linear-phase characteristics of the 801tap prototype filter, we choose a polyphase component that has linearphase characteristics itself. The 0th polyphase component meets this requirement. Thus, every 20th coefficient of the 801-tap FIR filter starting with the first coefficient (i.e., the leading zero) is selected. Consequently, the resulting FIR filter for interpolation by 6 has 41 coefficients. It is the model filter (see Figure 4.14). The remaining interpolation by 20 can be achieved with a linear interpolator. Thus, the impulse response of our piecewise polynomial filter is the result of linearly connecting the 41 samples of the model filter for interpolation by 6. Because the first and the last samples are zero, this results in 40 polynomial pieces. Sampling this composite impulse response hiFIR ðt Þ yields an approximation of the 801-tap filter hðkT0 Þ. It should be noted that this filter is, in principle, applied to a 120times upsampled signal (see Figure 2.9). Hence, 6 or 7 samples of the impulse response of the filter are required for the calculation of each
Systems for Integer Factor SRC
139
output sample. Consequently, we need to evaluate 6 or 7 polynomial pieces of the interpolated model filter hiFIR ðt Þ. Because we cannot implement 6 or 7 polynomial pieces, we must take the larger value (i.e., 7). In case the seventh polynomial piece is not used, the respective coefficients are zero. The polynomial pieces are straight lines that can be described by their starting point and their slope. Equation (4.80) suggests that the starting points (i.e., the samples of the model filter) directly yield the coefficients c0;i ðl Þ; i ¼ 0; 1; . . . ; 6; l ¼ 0; 1; . . . ; 5 of the generalized Farrow structure. The remaining coefficients c1;i ðl Þ describe the slope of the polynomial pieces and can thus be obtained by calculating the difference of each two adjacent c0;i ðl Þ. With hðk 20T0 Þ being the impulse response of the model filter we have c0;i ðl Þ ¼ h ðl þ 6iÞ 20T0 ð4:113Þ c1;i ðl Þ ¼ h ðl þ 6i þ 1Þ 20T0 h ðl þ 6iÞ 20T0 ð4:114Þ for i ¼ 0; 1; . . . ; 6 and l ¼ 0; 1; . . . ; 5 This results in two times 40 coefficients describing 40 polynomial pieces (actually 6 7 ¼ 42 would result, however the last two of these 42 polynomial pieces are identical to zero, thus the respective coefficients for i ¼ 6 and l ¼ f4; 5g are also zero). c0;i ðl Þ and c1;i ðl Þ are plotted in Figure 4.16. Concatenating the polynomial pieces according to (4.80) yields the interpolated impulse response hiFIR ðt Þ, shown in Figure 4.17. Since only 7 polynomial pieces are used at a time, we can separate the 40 polynomial pieces into six sets (l ¼ 0; 1; . . . ; 5) of 7 pieces
Figure 4.16 Coefficients c0;i ðlÞ and c1;i ðlÞ (with r ¼ 6).
140
Sample Rate Conversion in Software Configurable Radios
Figure 4.17 (a) Impulse response hiFIR ðkT0 Þ and (b) magnitude spectrum of an interpolated FIR filter.
(i ¼ 0; 1; . . . ; 6) each. Implementing these six sets in a time-varying manner yields the generalized Farrow structure, shown in Figure 4.18. In order to describe the arguments of the coefficients in Figure 4.18, we have used (4.79) and (4.80): jl k jl L k ¼ ¼ bm rc p L p With 2 40 ¼ 80 coefficients of the generalized Farrow structure, we have saved 9/10 of the coefficient memory of the 801 tap filter. Still, there is one general purpose multiplier in the generalized Farrow structure that is not necessary in a conventional polyphase interpolator.
Figure 4.18 Generalized (time-varying) Farrow-structure for interpolation by L ¼ 120 with a linearly interpolated model filter (p ¼ 20, r ¼ 6).
Systems for Integer Factor SRC
141
4.4 Conclusion Starting with the block representation of LPTV systems, fundamental structures of systems realizing integer factor SRC have been introduced. They are a direct result of the block implementation of filters. In conjunction with up- or downsampling, this yields the well-known polyphase realization. By implementing computable impulse responses rather than the samples of the impulse response themselves, the conventional Farrow structure (for interpolation) has been derived. As a counterpart for decimation, the transposed Farrow structure was presented. The reader might find the chosen approach highly complicated, compared with existing literature [2, 3, 20]. However, only on the basis of the block-processing concept was it possible to neatly derive the transposed Farrow structure. When using the conventional concepts of deriving the Farrow structure [7, 11] it is very difficult to derive the transposed Farrow structure. One really has to know the result beforehand to properly rearrange the equations. The block-processing concept in connection with polyphase interpolation and decimation will also play an important role in Chapter 6.
References [1]
Meyer, R. A., and C. S. Burrus, ‘‘Design and Implementation of Multirate Digital Filters,’’ IEEE Transactions on Acoustics, Speech, and Signal Processing, Vol. 24, No. (1), February 1976, pp. 53–58.
[2]
Fliege, N. J., Multirate Digital Signal Processing: Multirate Systems, Filter Banks, Wavelets, New York: John Wiley & Sons, 1994.
[3]
Crochiere, R. E., and L. R., Rabiner, Multirate Digital Signal Processing, Englewood Cliffs, NJ: Prentice-Hall, 1983.
[4]
Unbehauen, R., Systemtheorie: Grundlagen fu¨r Ingenieure, Munich, Germany: R. Oldenbourg Verlag 1993.
[5]
Colaneri, P., and S. Longhi, ‘‘The Realization Problem for Linear Periodic Systems,’’ Automatica, Vol. 31, No. (5), 1995, pp. 775–779.
[6]
Hentschel, T., and G. Fettweis., ‘‘The Digital Front-End — Bridge Between RF- and Baseband-Processing,’’ in Software Radio: Enabling Technologies, Walter Tuttlebee (ed.), Chichester, West Sussex, England: John Wiley & Sons Limited, 2002.
[7]
Meyr, H., M. Mocneclacy, and S. A. Fechtel, Digital Communication Receivers: Synchronization, Channel Estimation and Signal Processing, New York: John Wiley & Sons, 1998.
142
Sample Rate Conversion in Software Configurable Radios
[8]
Edwards, B. H., R. T. Jackson, and J. M. Underwood, ‘‘How Do Calculators Calculate?’’ in Proc. of the 9th Annual International Conference on Technology in Collegiate Mathematics, Reno, NV, November 1996.
[9]
Volder, J. E., ‘‘The CORDIC Trigonometric Computing Technique,’’ IRE Transactions on Electronic Computers, Vol. 8, September 1959, pp. 330–334.
[10]
Henker, M. ‘‘Abtastratenanpassung in Software-programmierbaren Mobilfunkempf €angern,’’ Master’s thesis, Technische Universit€at Dresden — Fakult€at Elektrotechnik—Institut f€ur Nachrichtentechnik, October 1998.
[11]
Farrow, C. W., ‘‘A Continuously Variable Digital Delay Element,’’ in Proc. IEEE International Symposium on Circuits and Systems (ISCAS ’88), Espoo, Finland, June 1988, pp. 2641–2645.
[12]
Bronstein, I. N., and K. A. Semendjajew, Teubner-Taschenbuch der Mathematik, Vol. 1, Leipzig, Germany: B. G. Teubner Verlagsgesellschaft, 1996.
[13]
Schafer, R. W., and L. R. Rabiner, ‘‘A Digital Signal Processing Approach to Interpolation,’’ Proc. of the IEEE, Vol. 61, No. 6, June 1973, pp. 692–702.
[14]
Erup, L., F. M. Gardner, and R. A. Harris, ‘‘Interpolation in Digital Modems — Part II: Implementation and Performance,’’ IEEE Transactions on Communications, Vol. 41, No. 6, June 1993, pp. 998–1008.
[15]
Ramstad, T. A., ‘‘Fractional Rate Decimator and Interpolator Design,’’ in Proc. of the IX European Signal Processing Conference (EUSIPCO ’98), Rhodes, Greece, September 1998, pp. 1949–1952.
[16]
Lundheim, L., and T. A. Ramstad, ‘‘An Efficient and Flexible Structure for Decimation and Sample Rate Adaptation in Software Radio Receivers,’’ in Proc. of the ACTS Mobile Communications Summit (AMOS ’99), June 1999, pp. 663–668.
[17]
Hentschel, T., and G. Fettweis, ‘‘Continuous-Time Digital Filters for Sample-Rate Conversion in Reconfigurable Radio Terminals,’’ in Proc. of the European Wireless, Dresden, Germany, September 12–14, 2000, pp. 55–59.
[18]
Hess, W., Digitale Filter—Eine Einf u €hrung, Stuttgart, Germany: B. G. Teubner, 1993.
[19]
Neuvo, Y., D. Cheng-Yu, and S. K. Mitra, ‘‘Interpolated Finite Impulse Response Filters,’’ IEEE Transactions on Acoustics, Speech, and Signal Processing, Vol. 32, No. 3, June 1984, pp. 563–570.
[20]
Vaidyanathan, P. P., Multirate Systems and Filter Banks, Englewood Cliffs, NJ: Prentice Hall, 1993.
5 Comb Filters: Special Systems for Integer Factor SRC 5.1 Introduction In the previous chapter, we discussed systems for integer factor SRC based on block processing, namely polyphase structures. To simplify polyphase filters for interpolation and decimation, the state space can be reduced; to reduce the number of coefficients, polynomial impulse responses can be applied. In this chapter we shall discuss another class of low-effort structures for integer factor SRC. The low effort results from sensible factorizations of the respective transfer functions. However, these factorizations are only possible with certain transfer functions—those of comb filters. This limits the applicability of the resulting systems. Nonetheless, comb filters are widely applied in practical systems. In a second part of this chapter, we shall introduce a novel structure for realizing comb filters for decimation and interpolation. This structure implements a periodically time-varying system that will be analyzed by using the raising procedure introduced in Chapter 2.
5.2 Basic Considerations of Comb Filters The notion comb filters stems from the shape of their transfer-function magnitude, which has transfer zeros equally spaced in frequency. A typical example of a comb filter is the filter of the linear interpolator (see Figure 4.8). As can be seen from Figure 4.8, the transfer zeros attenuate relatively small frequency bands. Therefore, the applicability of these filters is limited to 143
144
Sample Rate Conversion in Software Configurable Radios
oversampled signals. In the case of interpolating oversampled signals, the images resulting from upsampling are narrow enough to be attenuated sufficiently by the comb filter. Moreover, only oversampled signals with a relatively small passband relative to the sample rate are not affected by the typical passband droop of comb filters. If decimation is the issue, the comblike shape of the filters avoids aliasing in a small fraction of the total available bandwidth around DC. Although restrictive, these limitations might be acceptable in some applications. A special class of comb filters are those with a sinc-like transfer function. The simplest example are the boxcar filters [1], having a finitelength impulse response of rectangular shape with all samples equal to one. It should be mentioned that the boxcar filter is the sampled version of a rectangular pulse, also known as zero-order hold filter or B-spline of degree 0. Cascading such B-splines of degree 0 (i.e., convolving rectangular pulses of equal width), yields B-splines of higher degree (for a comprehensive treatment of splines see [2]), or higher-order hold filters [3]. These impulse responses are piecewise polynomials of the respective degree and can thus be implemented on the conventional or transposed Farrow structure for interpolation or decimation, respectively. Cascading boxcar filters yields higher-order boxcar filters. Due to the aliasing distortions resulting from sampling a nonbandlimited function (i.e., the rectangular pulse), higher-order boxcar filters cannot be obtained from sampling a higher-order hold filter of the respective order. However, due to similar characteristics in the frequency domain, higher-order boxcar filters can be used to approximate higher-order hold filters. In the case where higher-order boxcar filters are used for integer factor SRC, they can be implemented as block filters or polyphase filters, as shown in the previous sections. However, exploiting the simplicity of the impulse response of these filters can lead to implementations avoiding coefficients different from one, even for higher-order filters. These implementations are even more efficient than polyphase implementations. The z-domain transfer function of higher-order boxcar filters is
H ðzÞ ¼
N 1 X
!R z i
ð5:1Þ
i¼0
N determines the number of notches (zeros) of the transfer function; R is the order of the filter. H ðzÞ can be rewritten as
Comb Filters: Special Systems for Integer Factor SRC
H ðzÞ ¼
1 z N 1 z 1
145
R ð5:2Þ
which gives a means for estimating the frequency characteristics of these filters by evaluating H ðzÞ on the unit circle:
H e
j2pfT
¼
e
jðN 1ÞpfT
sinðN pfT Þ R sinðpfT Þ
ð5:3Þ
Equation (5.3) illustrates the sinc-like shape of the transfer function magnitude in the frequency domain. The function sinðN pfT Þ=sinðpfT Þ is also called the periodic sinc function. The zeros of order R are equally spaced in frequency at the following positions: f ¼ fzero ¼
i ; i ¼ 1; 2; . . . ; N 1 NT
ð5:4Þ
In systems for integer factor SRC, N is preferably chosen to be an integer multiple of the decimation or interpolation factor. Then, the notches of the transfer function of the comb filter attenuate potential aliasing or imaging components, respectively. Besides the simple coefficients, it is this matching of transfer zeros with the positions of aliasing/imaging components, that makes comb filters interesting for an application to SRC.
5.3 Cascaded Comb Filters The pole-zero plot of a comb filter according to (5.2) with N ¼ 8 and R ¼ 1 is sketched in Figure 5.1. Pole and zero at z ¼ 1 cancel each other. The transfer function is H ðzÞ ¼ 1 þ z 1 þ z 2 þ þ z 7 When separating the zero at z ¼ 1 we obtain a new transfer function that is periodic with period 2: H ðzÞ 1 þ z 1 ¼ 1 þ z 2 þ z 4 þ z 6
H1 ðzÞ ¼
¼ ðz 2 Þ0 þ ðz 2 Þ1 þ ðz 2 Þ2 þ ðz 2 Þ3
146
Sample Rate Conversion in Software Configurable Radios
Figure 5.1 Pole-zero map of a comb filter with N ¼ 8 and R ¼ 1.
Only powers of z 2 are involved, which indicates the periodicity with period 2. Separating the zeros at z ¼ j yields H1 ðzÞ 1 þ z 2 ¼ 1 þ z 4
H2 ðzÞ ¼
¼ ðz 4 Þ0 þ ðz 4 Þ1 Thus, we are left with a transfer function that has a periodicity of 4. Consequently, we have H ðzÞ ¼ ð1 þ z 1 Þð1 þ z 2 Þð1 þ z 4 Þ
ð5:5Þ
Equation pffiffiffiffiffiffiffi (5.5) has been obtained pffiffiffiffiffiffiby ffi successively separating the zeros at 1 and 2 1 leaving the zeros at 4 1. This can be generalized. By limiting N to be a power of 2 N ¼ 2K ; K ¼ 1; 2; . . . Equation (5.2) can be factorized by means of grouping the 2Kffiffiffiffiffiffi ffi 1 transfer p p ffiffiffiffiffiffi ffi 2 4 zeros of H ðzÞ into the groups at the positions 1; 1; 1; . . . . This yields
Comb Filters: Special Systems for Integer Factor SRC
K
1 z 2 1 z 1
H ðzÞ ¼ ¼
KY 1
147
!R
i
1 þ z 2
R
ð5:6Þ
i¼0
Evaluating each of the factors of (5.6) separately on the unit circle reveals a periodicity in the frequency domain with period f ¼ 1=ðT 2i Þ. Hence, the respective factors can be implemented at a 2i -times lower sample rate compared to the rate at which H ðzÞ would have to be implemented directly. This enables a cascaded realization of the factorized comb filter for decimation or interpolation by N [1]. A cascaded comb filter for decimation is sketched in Figure 5.2.
5.4 CIC Filters 5.4.1 The Structure of CIC Filters CIC filters [4] can be derived directly from (5.2). Implementing the numerator and the denominator separately yields two sections, the integrator and the comb (differentiator), from which the naming has been derived. It is important to note that the numerator has N -periodic transfer characteristics. The resulting structure is shown in Figure 5.3.
x(kT1 )
2↓ z –1
2↓ z –1
2↓ z –1
y(mT2 )
Figure 5.2 Cascaded comb filter for decimation by N ¼ 8 and R ¼ 1.
Figure 5.3 Comb filter with a separated integrator section and comb section according to (5.2).
148
Sample Rate Conversion in Software Configurable Radios
If these filters are combined with an upsampler N " or downsampler N #, the periodicity of the numerator enables its implementation on the lower sample rate. This leads to structures as sketched in Figure 5.4, where CIC filters for decimation and interpolation are shown. Separating numerator and denominator of a transfer function means separating poles and zeros. Inspecting (5.2) reveals that there is a pole of Rth order at z ¼ 1. However, the comb filter is an FIR filter without poles. Consequently, the numerator of (5.2) has also zeros of Rth order at z ¼ 1, compensating the poles (see Figure 5.1). Due to the separated implementation of numerator and denominator, a compensation of poles and zeros can be observed at the output of the system, but not necessarily at an intermediate stage. This is important in the case where the CIC filter is used as a decimation filter. Here, the integrator section comes first and might therefore be subjected to severe overflow. However, this overflow of the integrator section can be met with by the application of modulo arithmetic in the entire filter (e.g., two’s complement fixed-point arithmetic). Ensuring that the word length of the registers is in accordance with the largest possible signal value generated by the overall FIR filter, overflow does not influence the transfer characteristics of the filter. Denoting the word length of the input signal with w in , the minimum word length of the output signal wout necessary to avoid distortions by overflow is wout ¼ dR log2 N e þ w in
Figure 5.4 (a) CIC decimator and (b) CIC interpolator.
Comb Filters: Special Systems for Integer Factor SRC
149
This figure can be obtained by calculating the DC gain of R cascaded equivalent first-order comb filters. Each first-order comb filter of length N has a DC gain of N . The word-length growth in the registers can be controlled by wordlength truncation at the individual stages. For that purpose, rounding or truncation can be used. The difference between rounding and truncation is that the truncation error has a DC component even if the signal before rounding or truncation was zero mean. However, because the last stage in a CIC decimator is a differentiator providing infinite attenuation at DC, there is principally no difference if rounding or truncation is used at the internal stages of the filter. A general treatment of the quantization noise can be found in [4].
5.4.2 Noise Shaping with CIC Decimators There is another property of CIC decimators, not addressed in [4], that can be exploited if word-length truncation is the issue. If introduced before a differentiator, any additional signal (e.g., word-length truncation noise) is differentiated (i.e., high-pass filtered). If the word length is truncated before a differentiator, the resulting error is filtered by the following comb (differentiator) section having the transfer function HDiff ðzÞ ¼ ð1 z 1 ÞR HDiff e j2pfT ¼ j2sinðpf T ÞjR
ð5:7Þ ð5:8Þ
This is exactly what happens to the aliasing components, in the CIC decimator, that are introduced before the comb section. Thus, the comb section of CIC filters acts as a noise shaper with sinusoidal characteristics. Obviously, this characteristic is of use only if the signal of interest is sufficiently oversampled after the decimation. Otherwise, the shaped high-pass noise destroys the signal. As can be seen from Figure 5.5, a certain SNR can only be maintained in a relatively narrow frequency band around DC in case word-length truncation noise is filtered with a comb section of a CIC filter. Comparing (5.8) with (1.37) reveals that the sinusoidal noise-shaping characteristic of the comb section is exactly the same as the one of sigmadelta modulators employing integrators as loop filters [5, 6]. Therefore, the results of the SNR estimation after noise shaping with sigma-delta modulators can directly be adopted to CIC filters (see (1.43)). A specific characteristic of the comb section of CIC decimators acting as noise shapers should be mentioned. Any word-length truncation can
150
Sample Rate Conversion in Software Configurable Radios
Figure 5.5 Normalized logarithmic transfer function magnitude of a third-order comb section of a CIC filter (acting as a word-length truncation noise shaper).
be modeled more or less as adding noise. Independent of the statistical characteristics of this noise, the maximum peak-to-peak excursion of the noise is known. It is determined by the number system and the type of word-length truncation used. For two’s complement, it is equal to the quantization step q after word-length truncation. In the worst case, each differentiator may amplify this error by a factor of two. Hence, the maximum peak-to-peak error at the output of an Rth order differentiator section is epp ¼ 2R q Due to the characteristics of the differentiator of removing any DC component of a signal, the maximum error amplitude at the output of the comb section is emax ¼
epp ¼ 2ðR1Þ q 2
The word length of the registers has to cope with this error. Otherwise overflow destroying the signal occurs in the differentiator section. Possibly, an additional bit has to be used. Example 5.1
A second-order CIC decimator (R ¼ 2) is fed with an input signal with a word length of 4 bits. The decimation factor is M ¼ N ¼ 8. Thus, the output word length is wout ¼ d2 log2 8e þ 4 ¼ 10
Comb Filters: Special Systems for Integer Factor SRC
151
This word length should be truncated to 4 bits directly after decimation (i.e., before the comb section). With q ¼ 1 the resulting maximum error amplitude at the output of the comb section is emax ¼ 2 Consequently, we have to expect that at worst case, a þ 2 or a 2 (twice the value of q) is added to the 4-bit output signal at maximum. First, the performance is tested with an input signal to the CIC decimator of x ¼ 7 (i.e., the maximum positive value of a 4-bit two’s complement number). The resulting output signal and error signal (at the output) are sketched in Figure 5.6(a). Obviously, overflow occurs. By downscaling the input signal to x ¼ 5, the overflow can be avoided, as can be seen from Figure 5.6(b). The variation of the output signal in Figure 5.6(b) is a result of the word-length truncation error.
Figure 5.6 Output signal (solid line) and error signal at the output (dotted line) of a second-order CIC filter with word-length truncation after decimation, (a) with overflow, and (b) without overflow.
152
Sample Rate Conversion in Software Configurable Radios
It should be noted that this example illustrates the overflow effect due to word-length truncation noise but does not illustrate the noiseshaping characteristics. The latter is obvious from (5.8) and Figure 5.5.
5.4.3 CIC Interpolators When applying CIC filters to interpolation, the differentiator section comes first in the cascade. Thus, all signal components that might cause overflow in the integrator section are attenuated in the preceding differentiator section. The word-length growth can be determined for each differentiator and integrator individually. In principle, each differentiator has a maximum gain of two, while the combination of K integrators in conjunction with K differentiators and the upsampler N " has a maximum gain of N K 1 . Thus, it is possible to choose the minimum number of registers in each stage [4].
5.4.4 The Frequency-Sampling Structure of FIR Filters Finally, it should be mentioned that CIC filters are a special case of FIR filters realized by the frequency-sampling structure. To derive the frequencysampling structure [7], the desired frequency response is given by a set of samples H ðk=ðTN ÞÞ at equally spaced frequencies k=ðTN Þ; k ¼ 0; 1; . . . ; N 1. From this, the impulse response can be calculated by means of an inverse discrete-time Fourier transform. 1 1 NX k H ðk=ðTN ÞÞe j2pnN N k¼0
hðnT Þ ¼
ð5:9Þ
The thus obtained impulse response is taken as an input to a z-transform. H ðzÞ ¼
N 1 X n¼0
¼
N 1 X n¼0
hðnT Þz n "
# 1 1 NX j2pn Nk z n H ðk=ðTN ÞÞe N k¼0
ð5:10Þ
Interchanging the order of the two summations and calculating the finite sum as in (5.2) yields
Comb Filters: Special Systems for Integer Factor SRC
H ðzÞ ¼
N 1 X
H ðk=ðTN ÞÞ
k¼0
¼
153
1
n 1 NX k e j2pN z 1 N n¼0
1 1 z N NX H ðk=ðTN ÞÞ j2pNk 1 N z k¼0 1 e
ð5:11Þ
The separate implementation of the first term of (5.11) and the sum is called the frequency sampling structure. Due to the periodicity, the first term can be implemented on an N -times lower sample rate. As in the case of CIC filters, poles and zeros are realized separately. By setting n 1 if k ¼ 0 H ðk=ðTN ÞÞ ¼ 0 else we obtain a first-order CIC filter. While the only pole of the CIC filter at z ¼ 1 can exactly be compensated by a zero at z ¼ 1 (because the respective filter coefficients are exactly þ1 or 1), the general frequency-sampling structure requires such a pole-zero compensation at other positions on the unit circle. This, however, cannot be realized because exact pole and zero placement is limited by the finite word length of the coefficients.
5.4.5 Raising a CIC Decimator Due to the periodically time-varying element (upsampler or downsampler), CIC filters are periodically time-varying systems. In Section 2.3.2, we learned that such systems can be equivalently described by a time-invariant block system. The following example is to illustrate the raising procedure and moreover to provide a means of comparison that is used in following sections. Example 5.2
We shall calculate the transfer matrix of a second-order CIC decimator. Because we shall reuse the result of this example in the following section, we use one delaying and one nondelaying integrator in contrast to Figure 5.4. This minor change causes a delay of only one input sample. The resulting structure is shown in Figure 5.7. The block-transfer matrix can be obtained as follows: The only periodically time-varying element of the CIC decimator is the downsampler. It can be raised to its period M . Assuming that every first of M elements of the input signal is fed through, the downsampling matrix is
154
Sample Rate Conversion in Software Configurable Radios
Figure 5.7 Second-order CIC decimator with one delaying and one nondelaying integrator. ½down
Hð1;M Þ ¼ ½ 1 0
0
ð5:12Þ
In order to combine the downsampling matrix with the transfer matrices of the integrator section and the comb section, we have to calculate these matrices considering the proper dimensions. This yields the transfer matrix of the CIC filter HCIC ðzÞ ¼ Hdiff ðzÞ H½down Hinteg ðzÞ To calculate the transfer matrix of the integrator section Hinteg ðzÞ we derive the state-space description of the integrator section. 1 0 1 Ainteg ¼ Binteg ¼ 1 1 1 Cinteg ¼ ½0
1
Dinteg ¼ 0
The block-transfer matrix can be calculated according to (2.114). The individual elements of this matrix are the normalized polyphase components of the transfer function of the integrator section. They can be calculated according to (2.93). For example, H0 ðzÞ ¼ C ðzI A M Þ1 A M 1 B 1 z 1 0 ¼ ½0 1 M z 1 Mz ¼ ðz 1Þ2
1 0 M 1 1
1 1
Likewise, the other polyphase components can be calculated. The transfer function of the comb section Hdiff ðzÞ is Hdiff ðzÞ ¼
z 1 z
2
Comb Filters: Special Systems for Integer Factor SRC
155
Thus, the transfer matrix of the CIC decimator is 1 1 1 HCIC ðzÞ ¼ Hdiff ðzÞ H0 ðzÞ; z HM 1 ðzÞ; z HM 2 ðzÞ; . . . ; z H1 ðzÞ 1 ¼ 2 Mz; ðM 1Þz þ 1; ðM 2Þz þ 2; . . . ; z þ M 1 z ð5:13Þ
5.5 Recursive Multirate Filters 5.5.1 The Idea of Recursive Multirate Filters In Section 4.2, it was shown that the state space of FIR filters can be considerably reduced in connection with upsampling or downsampling. However, from the discussions on the cascaded-comb filters and CIC filters, it is clear that a reduction of effort (particularly coefficient multipliers) does not necessarily coincide with the minimum state space: A fourth-order CIC filter has a state space of order eight, while the equivalent polyphase realization with reduced effort has maximum four states, depending on the decimaton or interpolation offset, respectively (see Sections 4.2.2 and 4.2.3). While the maximum word length of the coefficients of a polyphase filter depends on the decimation/interpolation factor, the CIC filter has only ones as coefficients. The question arises whether other structures of comb filters have a smaller state space than the CIC realization and less coefficients compared to the polyphase implementation. Such structures can be either time invariant (i.e., block-processing structures), or time varying, such as the cascaded-comb and CIC structures. The problem is to find a state space that enables simplified structures. This is not necessarily the minimum state space, as has been explained. Obviously, the simplified structures of the comb filters result from the specific representation of their transfer functions (e.g., the separation of numerator and denominator in the case of CIC filters). Such algorithms must be taken into account when trying to find simplified structures. A comprehensive treatment of these questions is not within the scope of this book. Nonetheless, there are structures that realize a trade-off between the minimum state space of the polyphase implementation with expensive coefficients on one side and the minimum complexity of the CIC filters with an enlarged state space on the other side. In order to demonstrate this, it is advantageous to recall the noise-shaping characteristic of CIC filters, which is equivalent to the noise-shaping property of SDMs.
156
Sample Rate Conversion in Software Configurable Radios
Thus, we have two systems, the CIC filter designed for antialiasing and anti-imaging and the noise-shaping SDM. Because CIC filters can be used for noise shaping also, the question of whether it is possible to exploit structures similar to SDMs for antialiasing or anti-imaging arises. The answer is yes.
5.5.2 A Second-Order Decimator To start with, the well-known second-order SDM (Figure 1.12) employing double integration is reapplied for antialiasing. The proposed structure is shown in Figure 5.8. It is named sigma-delta decimator. The two coefficients c0 and c1 provide a certain degree of freedom in order to obtain the intended transfer characteristics. This system is time varying. In contrast to the CIC filter of Figure 5.4, one delaying and one nondelaying integrator is used. The delaying one is necessary for stabilizing the feedback loop (i.e., to ‘‘break up’’ an otherwise ‘‘closed loop’’). First, the time-varying state-space description is derived from Figure 5.8. It is assumed that the combined down- and upsampler has the following behavior ~y ðkT1 Þ ¼ x~ðkT1 Þ ZKr ðk; N Þ
ð5:14Þ
with x~ðkT1 Þ and ~y ðkT1 Þ being the input and output signal of the combined down and upsampler, respectively. The state-space matrices of the complete system relating ~y ðkT1 Þ to xðkT1 Þ (without the final decimation) are: 8 1 c0 > > for k ¼ 0 < 1 1 c0 c1 1 AðkÞ ¼ B¼ 1 > > : 1 0 for k ¼ 1; 2; . . . ; N 1 1 1 ð5:15Þ
Figure 5.8 Sigma-delta decimator: second-order comb filter for antialiasing based on the second-order SDM structure.
Comb Filters: Special Systems for Integer Factor SRC
C ðkÞ ¼
8 <½0
1
for k ¼ 0
:
0
for k ¼ 1; 2; . . . ; N 1
½0
157
D¼0
The block structure can be obtained by raising the system according to its period N. The resulting matrices are 1 c0 1 1 1 Bð2;N Þ ¼ A ð2;2Þ ¼ N 1 Nc0 c1 N N 1 1 2
CðN ;2Þ
0 60 ¼6 4 ... 0
3 1 07 .. 7 .5
DðN ;N Þ ¼ 0ðN ;N Þ
ð5:16Þ
0
In order to check for uncontrollable or unobservable states in the raised system, the observability matrix V and the controllability matrix U are calculated. 3 2 0 1 7 6 7 60 0 7 6 6 ..................7 7 6 7 6 7 6 0 0 C 7 6 ð5:17Þ V¼ ¼6 CA 1 Nc0 c1 7 7 6N 7 6 7 60 0 7 6 6 ..................7 5 4 0 0 Equation (5.17) reveals that for N > 1 the rank of V is 2. Hence, the system has no unobservable states. The controllability matrix is 2 3 1 1 1 U ¼ ½ B AB ¼ 4 AB 5 ð5:18Þ N N 1 1 and also has a rank of 2 for N > 1. Thus, the block system (A, B, C, D) is a minimal realization. Its transfer matrix is HðN ;N Þ ðzÞ ¼ CðzI A Þ1 B þ D 1 ¼ 2 z þ z ðNc0 þ c1 2Þ c1 þ 1
ð5:19Þ
158
2 6 6 6 4
Sample Rate Conversion in Software Configurable Radios
3 N ðN 1Þ z þ N 1 7 0 0 0 0 7 7 5
Nz ðN 1Þz þ 1 ðN 2Þz þ 2
0
0
0
0
To ensure stability, the poles have to stay inside the unit circle. For simplicity, c1 is chosen as unity. This leads to a stability region of c1 ¼ 1
0 < c0 <
2 N
ð5:20Þ
Choosing c1 ¼ 1
c0 ¼
1 N
yields a transfer matrix, that exactly matches the one of a raised second-order CIC filter with one delaying and one nondelaying integrator,1 and a downsampler that takes the first sample from the output block, as can be seen by comparing with the result of Example 5.2. Thus, at the cost of one coefficient multiplier for c0 , the state space could be reduced in comparison to the respective CIC filter. In fact, it is the minimal state space for a filter with this transfer characteristic, as the observability and controllability matrices suggest. 5.5.3 A Second-Order Interpolator A question arises: can a similar structure performing interpolation (antiimaging filtering) be found, as in the case with CIC filters? There are different ways to derive this structure. The one chosen here tries to harmonize both structures (the CIC- and the SDM-like filters) by highlighting similar characteristics of their subsystems. For this, networkgraphical methods can be used. The basic idea is to divide the sigma-delta decimator of Figure 5.8 into two parts that can be related to the integrator section and the comb section of CIC filters, respectively. By ‘‘shifting’’ the two integrators out of the loop, the structure of Figure 5.9 can be obtained from the structure of Figure 5.8. Both of them have the same input–output behavior. From Figure 5.9 the naming of the system is obvious: first the signal is integrated (S, sigma), and then it is 1. It will be seen that c1 ¼ 1 and c0 ¼ 1=N is the only set of coefficients that enables the structure of Figure 5.8 to implement the behavior of a second-order CIC decimator.
Comb Filters: Special Systems for Integer Factor SRC
159
Figure 5.9 Factorized second-order sigma-delta decimator.
processed by a time-varying loop structure, which—as will be seen—behaves like the comb section of a CIC filter (i.e., it behaves like a differentiator; hence it can be called a D, or delta, section). For comparison with the respective CIC filters, see Figures 5.4 and 5.7. In order to derive the transfer matrix of the time-varying differentiator, its subsystems can be treated separately. This approach reflects a different way for analyzing systems compared to the one used for analyzing the sigma-delta decimator. It employs the well-known method of analyzing LTI systems on the basis of their subsystems. Both subsystems of the time-varying differentiator HD , the resampler F and the integrator-section G, can be raised to N independently. The timeinvariant raised transfer matrix of the complete time-varying differentiator is then 1 HD ðzÞ ¼ I þ FðzÞGðzÞ FðzÞ
ð5:21Þ
with 0
3
6 0 0 0 6 FðzÞ ¼ 6 4
7 7 7 5
2
1
0
0
0
0
ð5:22Þ
160
Sample Rate Conversion in Software Configurable Radios
2 6 6 GðzÞ ¼ 6 4
G 0 ðzÞ G1 ðzÞ .. .
3 z 1 GN 1 ðzÞ z 1 GN 2 ðzÞ z 1 G1 ðzÞ G0 ðzÞ z 1 GN 1 ðzÞ z 1 G2 ðzÞ 7 7 7 .. .. .. 5 . . .
GN 1 ðzÞ
GN 2 ðzÞ
GN 3 ðzÞ
G0 ðzÞ ð5:23Þ
where FðzÞ is the raised transfer matrix of the resampler, and GðzÞ is the raised transfer matrix of the integrator section with Gl ðzÞ being the polyphase components of the time-invariant transfer function G ðzÞ, as derived in Section 2.3.2. Thus, the transfer matrix of the time-varying differentiator is (see the Appendix, Sections A.4.1 and A.4.2): 3 2 1 0 0 6 0 0 0 7 1 7 6 ð5:24Þ HD ðzÞ ¼ 7 6 1 þ G0 ðzÞ 4 5 0 0 0 ¼
z 1 z
2
3 1 0 0 6 0 0 0 7 7 6 4 5 0 0 0 2
ð5:25Þ
To interpret HD ðzÞ; it should be recalled that transfer matrices such as HD ðzÞ relate the polyphase components of the input signal to the polyphase components of the output signal (see also (2.111) and (2.113)). Equation (5.25) reveals that the first polyphase component of the input signal is differentiated twice and fed to the output as the first polyphase component of the output signal. All other polyphase components of the output signal are zero. Obviously, the system realizes a second-order differentiator if its input signal is composed in a way that its first polyphase component comprises the signal to be differentiated. This is exactly what the downsampler and the differentiator section of a CIC filter for decimation do. The behavior is N periodic with respect to the high sample rate, which becomes even clearer when calculating the alias-component matrix (see (2.124)) where z is raised to z N in HðzÞ, and the matrices L1 ðzÞ and LðzÞ have no effect due to the structure of the matrix in (5.24). In a CIC interpolator, this behavior is realized by the differentiator section followed by the upsampler (see Figure 5.4). Hence, HD ðzÞ can, in principle, replace this differentiator section. Similarly to swapping the sequential order of the integrator and the differentiator section of
Comb Filters: Special Systems for Integer Factor SRC
161
CIC filters when turning a CIC decimator into a CIC interpolator, HS and HD of Figure 5.9 are swapped, yielding the factorized second-order SDMlike interpolator (Figure 5.10). Eventually, both the time-varying differentiator and the following integrator section can be combined by ‘‘moving’’ the integrator section in the loop. This yields the second-order SDM-like comb filter realizing interpolation (anti-imaging filtering), which is shown in Figure 5.11. The structure is defined as delta-sigma interpolator. 5.5.4 Higher-Order Structures Are higher-order filters realizable? Rth-order filters with an SDM-like structure (see Figures 5.9 and 5.10 for second-order filters) employ
Figure 5.10 Factorized second-order SDM-like interpolator.
Figure 5.11 Delta-sigma interpolator: a second-order comb filter for anti-imaging.
162
Sample Rate Conversion in Software Configurable Radios
an Rth-order time-varying differentiator section performing R-times differentiation of the first polyphase component of the input signal. Extending (5.25), the transfer matrix of a raised Rth-order time-varying differentiator is HD ðzÞ ¼
z 1 z
R
2 6 6 4
3 1 0 0 0 0 0 7 7 5 0 0 0
ð5:26Þ
Higher-order systems based on the SDM structure are possible if the transfer matrix of (5.26) can be realized by this structure. To prove that this is possible, we start with Figure 5.9 and (5.24). The structure of the timevarying differentiator HD of Figure 5.9 can be regularly expanded by adding an integrator and a coefficient per order. This results in the Rth-order integrator G that is shown in Figure 5.12. The choice of integrators has been based on two constraints: There is a necessary minimum delay of one sample if the Rth-order integrator G is placed in a feedback loop and the overall delay should be as small as possible. Therefore, the first integrator introduces a delay to the signal, while the others do not. With respect to (5.24) the first polyphase component of G ðzÞ has to be calculated. For doing this, the state-space description of G ðzÞ is derived from Figure 5.12: 3 2 2 3 1 0 0 0 1 6 1 1 0 0 7 7 6 607 7 07 BðR;1Þ ¼ 6 ð5:27Þ AðR;RÞ ¼ 6 7 61 1 1 4 ... 5 4 5 0 1 1 1 1
Figure 5.12 Integrator section G of Rth-order time-varying differentiator HD .
Comb Filters: Special Systems for Integer Factor SRC
163
Cð1;RÞ ¼ ½cR1 þ þ c0 ; cR2 þ þ c0 ; . . . ; c1 þ c0 ; c0 ¼ ½cR1 ; cR2 ; . . . ; c1 ; c0 A Dð1;1Þ ¼ 0 With (2.93) the first polyphase component is 1 N 1 G0 ðzÞ ¼ CA 0 zI A N A B þD þ 1 ¼ C zI A N A N 1 B N detðzI A Þ
ð5:28Þ
þ
where ðzI A N Þ is the adjoint matrix2 of A N . It is implicitly given by
þ zI A N zI A N ¼ det zI A N I
ð5:29Þ
and can be calculated as follows [8]:
zI A N
þ
¼ Iz R1 þ Q1 z R2 þ þ QR1
ð5:30Þ
with Qk ¼
I k k1 ðA N Þ p1 ðA N Þ pk I
if k ¼ 0 if k ¼ 1; 2; . . . ; R 1
where pk are the coefficients of the characteristic polynomial det zI A N ¼ z R p1 z R1 pR
ð5:31Þ
ð5:32Þ
Thus, with (5.24) the transfer matrix of the Rth-order time-varying differentiator is 3 2 1 0 0 6 0 0 0 7 detðzI A N Þ 7 6 HD ðzÞ ¼ 7 6 þ N 1 N N 5 4 B detðzI A Þ þ C ðzI A Þ A 0 0 0 ð5:33Þ 2. In many publications, the adjoint matrix is defined as the conjugate transpose of a matrix. Elsewhere, the transpose of the matrix of cofactors of a matrix A is called the adjoint matrix of A. In [8], also, the transpose of the matrix of cofactors of the characteristic matrix of A is called the adjoint matrix of A (see page 82 of [8]). It is also called the adjoint matrix of the system [9]. The last definition is used in this book.
164
Sample Rate Conversion in Software Configurable Radios
2 ¼
1
0 0
3
6 0 0 0 7 7 6 7 6 R þ N 1 N 5 4 ðz 1Þ þ C ðzI A Þ A B ðz 1ÞR
0
0
ð5:34Þ
0
Comparing (5.34) with (5.26) reveals that the numerator of (5.34) matches the one of the Rth-order time-varying differentiator. Further, it can be concluded that þ ðz 1ÞR þ C zI A N A N 1 B ¼ z R
ð5:35Þ
must hold for an exact matching of (5.26) and (5.34). It can be shown (see the Appendix, Section A.4.3) that (5.35) has exactly one solution for (R ¼ 1; 2; . . .) and (N ¼ 1; 2; . . .). Hence, it is possible to realize the behavior of CIC filters of any order R on sigma-delta-like structures with a reduced state space. The coefficients c0 ; . . . ; cR1 can be found by solving (5.35). They are given in Table 5.1 for (R ¼ 1; 2; . . . ; 4). Respective structures can be found by replacing the second-order integrator section G of Figures 5.9 and 5.10 by the Rth-order integrator section of Figure 5.12, and moreover by increasing the order of the integrator HS in Figures 5.9 and 5.10 accordingly. Finally, the individual integrators of G and HS are combined, leading to structures similar to those of Figures 5.8 and 5.11. 5.5.5 Higher-Order Integrate and Dump Inspecting the behavior of the first-order sigma-delta decimator (Figure 5.8 with c0 ¼ 1 according to Table 5.1) shows that it is the classical integrate-
Table 5.1 Coefficients for Recursive Time-Varying Comb Filters Order
c0
1
1
2
1 N 1 N2 1 N3
3 4
c1
c2
c3
1 3N1 2N 2 2N1 N3
1 11N 2 6Nþ1 6N 3
1
Comb Filters: Special Systems for Integer Factor SRC
165
and-dump circuit. Thus, higher-order sigma-delta decimators are higherorder integrate-and-dump circuits.
5.6 Generalizing Recursive Multirate Filters 5.6.1 Motivation In the previous section, we investigated periodically time-varying comb filters for decimation and interpolation that have, in principle, the same input–output behavior as CIC filters. Their transfer zeros can only be placed exactly at multiples of the lower of the two involved sample rates (see (5.4))—that is, they attenuate either aliasing or imaging components. If the bandwidth of the aliasing or imaging bands are widened, there is only the opportunity to increase the order of the filter resulting in multiple transfer zeros. This mainly deepens but also widens the notches of the transfer function magnitude and thus increases the attenuation of aliasing or imaging components, respectively. However, this is somewhat inefficient because, generally, a certain stopband attenuation can only be achieved with a high multiplicity of the transfer zeros, resulting in very deep notches. Deep notches (very high attenuation in a small bandwidth) are not necessary in many cases. But wider notches are really necessary. Spreading the transfer zeros inside the aliasing or imaging bands instead of multiplying them widens rather than deepens the notches and thus can provide a certain attenuation with fewer transfer zeros. In this section, it is shown that an arbitrary placement of the transfer zeros inside the aliasing or imaging bands is possible with recursive multirate filters. This can be achieved by an arbitrary placement of the poles of G ðzÞ. Thus, in contrast to Section 5.5, G ðzÞ can be regarded as the transfer function of a conventional digital filter. It is not restricted to having certain poles or zeros. However, the fundamental comb characteristic of the resulting recursive multirate filters (as introduced in the previous section) is not changed.
5.6.2 Arbitrary Poles of the Filter G(z) In Section 5.5, we learned that the separation of HS and HD helps to get a deeper insight in the behavior of recursive multirate filters. This separation has one fundamental property—the poles of G and HS must be the same—that is, G ðzÞ and HS ðzÞ must have the same denominator DðzÞ.
166
Sample Rate Conversion in Software Configurable Radios
½N
Denoting the numerators of G ðzÞ and HS ðzÞ as G ½N ðzÞ and HS ðzÞ, respectively, we can derive the two structures shown in Figures 5.13 and 5.14. G ðzÞ and HS ðzÞ, with the same denominator DðzÞ, can be exploited to recombine G ðzÞ and HS ðzÞ, yielding the structures of Figures 5.15 and 5.16. Obviously, the decimator employs a filter with two inputs and one output, while the interpolator employs a filter with one input and two outputs. The general structure of a time-varying decimator of Figure 5.13 is chosen as a starting point. Now, the loop filter G is a general filter of Rth order with the state-space description
Figure 5.13 Generalized recursive multirate decimator with separated GðzÞ and HS ðzÞ.
Figure 5.14 Generalized recursive multirate interpolator with separated GðzÞ and HS ðzÞ.
Comb Filters: Special Systems for Integer Factor SRC
167
Figure 5.15 Generalized recursive multirate decimator.
Figure 5.16 Generalized recursive multirate interpolator.
z G ðk þ 1ÞT ¼ A z G ðkT Þ þ B xG ðkT Þ yG ðkT Þ ¼ C z G ðkT Þ þ D xG ðkT Þ
ð5:36Þ
where A, C , and D are given as follows, while B will be dealt with later. 3 2 J0 o o 6 o J1 o 7 7 6 ð5:37Þ A¼J¼6 . 7 .. 5 4 .. . o o Jl C ¼ ½ c0 ; c1 ; ; cl ci 6¼ 0; i ¼ 0; 1; . . . ; l D¼0 2
ð5:38Þ ð5:39Þ
ki 61 6 6 with Ji ¼ 6 0 6 .. 4 .
0 ki 1
0
0
0 0 ki 0
..
.
0 0 0 .. .
3 7 7 7 7 and 7 5
ki ¼ 6 0 6 kj ki ¼
for i 6¼ j
ki ð5:40Þ
168
Sample Rate Conversion in Software Configurable Radios
G ðzÞ is given in its (lower) Jordan form. Vector C has a structure that ensures observability of all states with ðÞ being arbitrary and ci being arbitrary nonzero elements [10]. The poles of G ðzÞ are eigenvalues ki of A and thus the diagonal elements of A. Their order ri equals the size of the Jordan boxes Ji and is equal to the length of the respective subvectors ½ ci of C . Because G ðzÞ is employed in a feedback branch where zero delay is not applicable, D is set to zero. The transfer matrix of the raised time-varying differentiator is given by (5,24). G0 ðzÞ is given by (2.93). It can be written: 2
1 60 6. HD ðzÞ ¼ det zI A N þ C ðzI A N Þþ A N 1 B 4 .. 0 det zI A N
0 0 .. . 0
3 0 07 .. .7 . .. 5 0 ð5:41Þ
Hence, the eigenvalues of A N (i.e., the zeros of detðzI A N Þ) are zeros of HD ðzÞ. Still, the eigenvalues of A N are the N -raised eigenvalues ki of A ¼ J. On the other hand, because G ðzÞ ¼ C ðzI AÞ1 B ¼
C ðzI AÞþ B detðzI AÞ
ð5:42Þ
these ki are the poles of G ðzÞ. It can be concluded that by deliberately placing the poles of G ðzÞ (by influencing detðzI AÞ through modifying A), the zeros of HD ðzÞ and thus, the N -periodic comb shape of HD can be influenced. Supposing a certain C , the zeros of G ðzÞ (i.e., the zeros of the numerator of (5.42)) are determined by the choice of B. Because B, and thus the zeros of G ðzÞ, influence the poles of HD (i.e., the zeros of the denominator of (5.41)), B can be used to influence stability. Moreover, B can be used to alter the transfer characteristics of HD by deliberately placing its poles. The question, which so far has been answered for the CIC filter characteristics only, is whether it is possible to realize any poles of HD ðzÞ by appropriately choosing B regardless of the pole placement of G ðzÞ. Next, we shall show that it is indeed possible to place the poles of HD ðzÞ arbitrarily by solely modifying B. With respect to (5.41), we can formulate the problem as searching for a unique solution to the equation
Comb Filters: Special Systems for Integer Factor SRC
det zI A N b0 þ b1 z þ þ bR1 z R1 þ z R ¼
169
det zI A N
ð5:43Þ det zI A N þ C ðzI A N Þþ A N 1 B
where arbitrary pole placement (determined by b0 ; . . . ; bR1 ) should be realized by a proper choice of B. With ki 6¼ 0 (see (5.40)) and thus det zI A N 6¼ 0, (5.43) is equivalent to b0 þ b1 z þ þ bR1 z R1 þ z R þ ¼ det zI A N þ C zI A N A N 1 B
ð5:44Þ
which can be written as (with (5.30) and (5.32)): b0 þ b1 z þ þ bR1 z R1 þ p1 z R1 þ p2 z R2 þ þ pR1 z þ pR ¼ C Iz R1 þ Q1 z R1 þ þ QR1 A N 1 B ð5:45Þ Now the coefficients of the powers of z can be compared, leading to: CQk A N 1 B ¼ bR1k þ pkþ1 ;
for k ¼ 0; 1; . . . ; R 1
ð5:46Þ
with Q0 ¼ I . Substituting the Qk by (5.31) yields: C
AN
k
k1 p1 A N pk I A N 1 B ¼ bR1k þ pkþ1
ð5:47Þ
With ðk ¼ 0; 1; . . . ; R 1Þ the following matrix equation results: 3 C 3 2 bR1 þ p1 7 6 C ðA N Þ p1 I 7 6 bR2 þ p2 7 6 N 2 7 7 N 1 6 6 C ðA Þ p1 ðA N Þ p2 I A B ¼ 7 7 6 .. 6 5 7 4. 6 . 5 4 .. b0 þ pR R1 R2 C ðA N Þ p1 ðA N Þ pR1 I 2
ð5:48Þ If this equation can be uniquely solved for B regardless of the choice of the bi , we have shown that arbitrary pole placement through B is possible for HD ðzÞ. Because the eigenvalues ki of A are nonzero, A N 1 is invertible. Thus, (5.48) has a unique solution if the matrix
170
Sample Rate Conversion in Software Configurable Radios
3 C 7 6 C ðA N Þ p1 I 7 6 7 6 N 2 N ð Þ p ð A Þ p I C A 7 6 1 2 P ¼6 7 . 7 6 . 5 4 . N R1 N R2 C ðA Þ p1 ðA Þ pR1 I 2
is invertible. In other words, if 3 2 C 7 6 C ðA N Þ p I 7 6 1 7 6 7 6 N 2 N C A ð Þ p ð A Þ p I 7 6 1 2 det P ¼ det6 7 7 6. 7 6 .. 5 4 N R1 N R2 C ðA Þ p1 ðA Þ pR1 I 3 2 C 7 6 6 C ðA N Þ 7 7 6 7 6 N 2 ð Þ C A 7 6¼ 0 ¼ det6 7 6 7 6. 7 6 .. 5 4 N R1 C ðA Þ
ð5:49Þ
The right-hand side of (5.49) has been obtained by employing basic matrix operations that do not change the determinant. Specifically, one can add a multiple of one row to another row. Following [10],3 the rank of P is R, if the matrix C Nm ¼ N kN m I A N has the rank R for all eigenvalues kN i of A . It can easily be seen that the vector C is always independent of the remaining rows of Nm , as there is always one column of Nm where an element ci of C is the only nonzero N element. Due to the structure of A N , the matrix ½kN m I A has a blockdiagonal structure with all diagonal elements being of lower triangular structure.
3. Chapter II.3.4.
Comb Filters: Special Systems for Integer Factor SRC
171
h i N The rank of these diagonal elements of kN I A is m
ri N I J rank kN ¼ m i ri 1
i 6¼ m i¼m
ð5:50Þ
Because the rank of a block-diagonal matrix equals the sum of the ranks of the diagonal elements, and moreover the first row of Nm is independent of the remaining ones, it can be concluded that rankðNm Þ ¼ R;
for m ¼ 0; 1; . . . ; l
ð5:51Þ
Hence det P 6¼ 0, which means that (5.48) has exactly one nontrivial solution for B. Thus, we have shown that the poles of the time-varying differentiator (comb section) employing a general integrator section G can be placed arbitrarily by means of choosing B. It can be concluded that choosing B and ki enables arbitrary pole-zero placement for the N -periodic time-varying differentiator HD . However, the fundamental periodic comb-like shape of the transfer-function magnitude (with respect to the high sample rate) is a fundamental property of this system and cannot be changed. The transfer zeros in the first period (in the frequency domain) of the N periodic differentiator can be canceled by combining the time-varying differentiator with a respective HS ðzÞ, as has been done with the sigma-delta decimator (see Figures 5.8 and 5.9) and the delta-sigma interpolator (Figures 5.10 and 5.11). The result is a system with passband characteristics similar to those of the SDM-like filters with CIC-filter characteristics. The stopband characteristics are determined by the pole-zero placement of the generalized G ðzÞ, though. It should be noted that canceling the zeros of any other than the first period (in the frequency domain) of the N -periodic transfer function of the time-varying differentiator is also possible. In this case, the system performs integer-band decimation or interpolation, respectively (see Section 2.2.4). The passband characteristics of the complete system can further be influenced by introducing transfer zeros to HS ðzÞ. With an Rth-order state space of the system, R additional transfer zeros can be placed without extending the state space, but at the cost of additional coefficient multipliers. By introducing additional transfer zeros, it becomes possible to correct the typical passband droop of simple comb filters. Still, this also affects the aliasing (or image) attenuation. Finally, it should be noted that it is not compulsory to use the Jordan form for G ðzÞ. It has been chosen for reasons of simplicity of the derivation.
172
Sample Rate Conversion in Software Configurable Radios
5.6.3 Designing Generalized Recursive Multirate Filters The direct approach of integer factor SRC (Section 4.1) reveals that the antialiasing filter or the anti-imaging filter is always placed at the higher of the two involved sample rates. Thus, when designing a system for integer factor SRC, it is useful to relate the filter to this higher sample rate. After finishing the design, one can implement the filter as desired (e.g., as a polyphase filter). The advantage of designing the filter at the higher sample rate is that the passband width and the stopband width are known. These figures can directly serve as design constraints. Also, generalized recursive multirate filters for integer factor SRC are best designed with respect to the higher sample rate. However, due to the special structure of the system and its behavior, some particularities must be taken into account. First, we derive the frequency behavior of generalized recursive multirate filters. 5.6.3.1
The Frequency Behavior of Generalized Recursive Multirate Filters for Interpolation
The block-transfer matrix of a generalized recursive multirate filter for interpolation is (see Figure 5.14) ½B
Hint ðzÞ ¼ HS ðzÞ HD ðzÞ H½up
ð5:52Þ
HS ðzÞ is the raised version of the LTI system with the transfer function HS ðzÞ. It is given by (2.114). To determine the frequency behavior, the modulation matrix (alias component matrix) is calculated. With (2.145) ð J ¼ 1Þ, and setting M ¼ 1, it is ½M Hint ðzÞ ¼ L WL1 L1 ðzÞ HS z L HD z L H½up
ð5:53Þ
Thus, with (5.41) and H½up ¼ ½ 1
0
...
0 T
ð5:54Þ
we have with N ¼ L ½M Hint ðzÞ ¼ L WL1 L1 ðzÞ HS z L
2 3 1 L L 6 07 det z I A 6 . 7 ð5:55Þ L þ det z I A L þ C ðz L I A L Þ A L1 B 4 .. 5 0
Comb Filters: Special Systems for Integer Factor SRC
173
Substituting HS ðz L Þ with (2.114) and combining it with the right-hand side vector of (5.55) yields HS;0 ðz L Þ
3
6 HS;1 ðz L Þ 6 L ðzÞ 6 6 .. 4 .
7 7 7 7 5
2 ½M Hint ðzÞ
¼L
WL1
1
HS;L1 ðz L Þ L det z I A L L det z I A L þ C ðz L I A L Þþ A L1 B
ð5:56Þ
With (2.98) we obtain ½M Hint ðzÞ
det z L I A L ¼ det z L I A L þ C ðz L I A L Þþ A L1 B 3 2 HS ðzwL0 Þ 6 HS ðzw 1 Þ 7 7 6 L 7 6 7 6 .. 5 4.
ð5:57Þ
HS ðzwLL1 Þ Usually, only the first modulation component is of interest yielding the output signal. With (2.144) and (5.57) we have L det z L I A L Yint ðzÞ ¼ HS ðzÞ L X z þ det z I A L þ C ðz L I A L Þ A L1 B ð5:58Þ 5.6.3.2
The Frequency Behavior of Generalized Recursive Multirate Filters for Decimation
Likewise, the output signal of the generalized recursive multirate filter for decimation can be calculated. With Figure 5.13 we have ½B
Hdec ðzÞ ¼ H½down HD ðzÞ HS ðzÞ
ð5:59Þ
The modulation matrix is ½M
Hdec ðzÞ ¼
1 H½down HD z M HS z M LðzÞ WM M
ð5:60Þ
174
Sample Rate Conversion in Software Configurable Radios
With (5.41) and H½down ¼ ½ 1
0
0
ð5:61Þ
and N ¼ M we have ½M Hdec ðzÞ ¼
det z M I A M 1 ½ 1 0 0 M det z M I A M þ C ðz M I A M Þþ A M 1 B HS z M LðzÞ WM ð5:62Þ
Substituting HS ðz M Þ with (2.114) and combining it with the left-hand side vector of (5.62) yields ½M
Hdec ðzÞ ¼
1 detðz M I A M Þ M detðz M I A M Þ þ C ðz M I A M Þþ A M 1 B HS;0 ðz M Þ; z M HS;M 1 ðz M Þ; .. .; z M HS;1 ðz M Þ LðzÞ WM
ð5:63Þ M M det z I A 1 ¼ M M det z I A M þ C ðz M I A M Þþ A M 1 B h i HS;0 ðz M Þ; z ðM 1Þ HS;M 1 ðz M Þ; .. .; z 1 HS;1 ðz M Þ WM
..
.
ð5:64Þ M M det z I A 1 ¼ M M det z I A M þ C ðz M I A M Þþ A M 1 B h i HS;0 ðz M Þ; z 1 HS;1 ðz M Þ; .. .; z ðM 1Þ HS;M 1 ðz M Þ 3 2 1 0 0 60 0 17 7 6 6 ð5:65Þ .. 7 7 WM 6 .. .. 4. . .5 0 1 0 Noting that 0 0 .. .
3 0 17 WM ¼ M WM1 .. 7 5 .
0
1
0
..
.
1 60 6. 4 ..
2
ð5:66Þ
Comb Filters: Special Systems for Integer Factor SRC
175
we finally get ½M Hdec ðzÞ ¼
det z M I A M det z M I A M þ C ðz M I A M Þþ A M 1 B h i HS;0 ðz M Þ; z 1 HS;1 ðz M Þ; . .. ;z ðM 1Þ HS;M 1 ðz M Þ WM1
det z M I A M 1 ¼ M M det z I A M þ C ðz M I A M Þþ A M 1 B M 1 HS ðzÞ; HS ðzwM Þ .. . HS zwM
ð5:67Þ
ð5:68Þ
With (2.144) and (5.68) we have det z M I A M 1 Ydec ðzÞ ¼ M M det z I A M þ C ðz M I A M Þþ A M 1 B M 1 ½M HS ðzÞ HS ðzwM Þ HS zwM X ðzÞ 5.6.3.3
ð5:69Þ
Calculating the Matrix B
Assuming that we can derive A from our design constraints (see Example 5.3), we need to calculate B next. This calculation is identical for both decimation and interpolation. The following equations use L, the upsampling factor of a system for interpolation. Replacing L by M yields the same results for a system for decimation. A conventional target when choosing B is to obtain in (5.58) or (5.69), respectively þ det z L I A L þ C z L I A L A L1 B ¼ z LR
ð5:70Þ
Thus, with respect to (5.43) bi ¼ 0;
for i ¼ 0; 1; . . . ; R 1
ð5:71Þ
This places all poles at z ¼ 0. It is recalled that the overall transfer characteristics of the generalized recursive multirate filter should be an FIR comb filter. Hence, it is necessary to place the poles at z ¼ 0. In order to solve (5.48) for B, we need to calculate the pk by solving (5.32) det zI A L ¼ z R p1 z R1 pR
176
Sample Rate Conversion in Software Configurable Radios
Thus, with (5.32) and (5.71), we can solve (5.48) for B. This yields the intended pole placement of HD ðzÞ given by (5.70). Consequently, we have for the interpolator (see (5.58)) det z L I A L Yint ðzÞ ¼ HS ðzÞ X zL LR z ¼ HS ðzÞ HD z L X z L
ð5:72Þ ð5:73Þ
and for the decimator (replacing L by M ) 1 det z M I A M Ydec ðzÞ ¼ z MR M M 1 ½M HS ðzÞ HS ðzwM Þ HS zwM ð5:74Þ X ðzÞ h i M 1 1 ¼ HD z M HS ðzÞ HS ðzwM Þ HS zwM X ½M ðzÞ M ð5:75Þ with det zI A N HD ðzÞ ¼ zR QR1 N i¼0 z ki ; ¼ zR
ð5:76Þ N ¼
L;
interpolation
M;
decimation
ð5:77Þ
To obtain (5.77), we have made use of (5.37) to (5.40). HD ðzÞ is the transfer function of an FIR filter, specifically a comb filter (differentiator). It is of particular importance to note that the zeros of HD ðzÞ are equal to the N th powers of the eigenvalues of A. The transfer characteristics of an Rth-order CIC filter can serve as an example. In this case, A is given by (5.27). All R eigenvalues are k ¼ 1. Thus, all transfer zeros are placed at z ¼ 1N ¼ 1. However, the intention of generalizing recursive multirate filters was to arbitrarily place the transfer zeros—specifically to widen the stopbands. Widening the stopbands means that the transfer zeros must be located on the unit circle near to z ¼ 1, for example, at z ¼ e j2p=K with K > 32 (see Figure 5.17). However, HD ðzÞ is realized via A. Thus, the eigenvalues of A must be ki ¼ e j2p=ðNK Þ in order to ensure the zeros of HD ðzÞ are placed at j2pN =ðNK Þ ¼ e j2p=K . This means that we need to place the z ¼ kN i ¼e eigenvalues of A very near to z ¼ 1 (in fact, N times ‘‘nearer’’ than the
Comb Filters: Special Systems for Integer Factor SRC
177
transfer zeros), which might lead to problems with coefficient quantization (i.e., word length). Nonetheless, choosing A concludes the design of HD ðzÞ. Due to the N th power of z in HD (with N ¼ L in the case of interpolation and N ¼ M in the case of decimation) in (5.73) and (5.75), an N -periodic comb shape of the transfer function is realized. This is a very important property of the generalized recursive multirate filters: By implementing certain poles of a system G via a system matrix A in a feedback loop employing a periodic resampler (i.e., a cascade of a downsampler and an upsampler), periodic transfer characteristics result. It can be interpreted as making the poles periodic through aliasing (resulting from resampling), and
Figure 5.17 (a) Pole-zero plot of a second-order differentiator with two transfer zeros at z ¼ 1, and (b) respective transfer function magnitude; (c) pole-zero plot of two spread transfer zeros at z ¼ e j2p=32 , and (d) respective transfer function magnitude.
178
Sample Rate Conversion in Software Configurable Radios
Figure 5.17 (continued).
inverting the periodic poles to obtain periodic transfer zeros (by placing G and the resampler in a feedback loop). This is illustrated in Figure 5.18. As with CIC filters, HS ðzÞ is required to cancel transfer zeros in the passband of the overall filter (see Figure 5.18). It should be recalled that the general structures of Figures 5.13 and 5.14 are only models. There is no separated HS ðzÞ in Figures 5.8 and 5.11. It is the same with generalized recursive multirate filters. To ensure this, the state space of HS ðzÞ must be equal to the state space of G ðzÞ—both must have the same denominator DðzÞ (see Figures 5.15 and 5.16). Thus, we have z S ðk þ 1Þ ¼ AS z S ðkÞ þ BS xS ðkT Þ y S ðkT Þ ¼ CS z S ðkÞ þ DS xS ðkT Þ
ð5:78Þ
Comb Filters: Special Systems for Integer Factor SRC
179
with AS ¼ A ¼ J (see (5.37))
ð5:79Þ
Hence, the denominator of HS ðzÞ is detðzI AÞ with zeros at z ¼ e j2p=ðNK Þ . These zeros are poles of HS ðzÞ, canceling the first period of the periodic zeros of HD ðz N Þ which are placed at z ¼ e j2p=ðNK Þ . The pole-zero cancellation is illustrated in Figure 5.18. It should be noted that due to the combination of HS ðzÞ and G ðzÞ, both periodic transfer zeros of HD ðz N Þ and the poles of HS ðzÞ are realized with the same state space. Thus, there is always a perfect pole-zero cancellation. This is a great advantage of the generalized recursive multirate filters
Figure 5.18 Developing the transfer characteristics of a generalized recursive multirate filter: (a) transfer function magnitude of GðzÞ with two poles at z ¼ e j2p=ð516Þ with respect to the high sample rate, (b) transfer function magnitude resulting from aliasing with N ¼ 5, (c) inverted transfer function magnitude of (b) (i.e., jHD ðf Þj), and (d) final transfer function magnitude resulting from canceling the zeros near DC with HS ðf Þ ¼ Gðf Þ:
180
Sample Rate Conversion in Software Configurable Radios
Figure 5.18 (continued).
over other structures that employ pole-zero cancellation (see comments on the frequency-sampling structure in Section 5.4). Having chosen the poles of HS ðzÞ, we still have the opportunity to ½N choose the transfer zeros of HS ðzÞ (i.e., HS ðzÞ in Figures 5.15 and 5.16). Their choice is free because they do not influence HD ðzÞ. They can be placed by properly selecting BS in the case of decimation or CS in the case of interpolation. It must be noted that in the case of decimation, it is CS ¼ CG , and in the case of interpolation BS ¼ BG in order to merge the states of HS ðzÞ and G ðzÞ (see Figures 5.15 and 5.16). The additional transfer zeros can be chosen (e.g., to compensate a passband droop). This is illustrated in the example at the end of this section. 5.6.3.4
The Design Procedure
The design of generalized recursive multirate filters for interpolation or decimation can be executed as follows:
Comb Filters: Special Systems for Integer Factor SRC
181
1. Define the transfer-zero placement in the aliasing or imaging bands. 2. Derive A according to (5.73), (5.75), and (5.76). 3. Calculate B according to the intended pole placement (in the case of a finite-length impulse response, this is according to (5.70) and (5.71)). 4. Finally, if desired, choose transfer zeros of HS ðzÞ by designing BS in the case of decimation or CS in the case of interpolation. This design procedure is illustrated in the following example. Example 5.3
A second-order generalized recursive multirate filter for decimation by N ¼ M ¼ 3 is designed and compared to a second-order CIC filter. The second-order CIC filter has second-order transfer zeros at 2p
2p
z ¼ e jN k ¼ e j 3 k;
k ¼ 0; 1; . . . ; N 1
with respect to the (high) input sample rate. These zeros should be slightly spread to z ¼ e j ð N k10N Þ ¼ e j ð 3 k30Þ ; 2p
p
2p
p
k ¼ 0; 1; . . . ; N 1
with respect to the (high) input sample rate. Thus, G ðzÞ of Figure 5.13 is G ðzÞ ¼
b1 z þ b0 p p z e j 30 z e j 30
z2
ð5:80Þ
b1 z þ b0 1:99z þ 1
ð5:81Þ
The state-space matrices of G ðzÞ are A¼
0
1
1
1:99
C ¼ ½0
1
Thus, we have with (5.41)
B¼ D¼0
b0 b1
ð5:82Þ
182
Sample Rate Conversion in Software Configurable Radios
2
1 0 0
60 6 z 2 1:91z þ 1 HD ðzÞ 2 6 . z þ zð1:99b0 þ 2:96b1 1:91Þ þ 1 þ b0 6 4 ..
0 .. . . . .
3
07 7 .. 7 7 .5
0 0 0 ð5:83Þ To make HD behave like a periodic FIR filter that is followed by a downsampler (compare with comb section of CIC filter), we need to shift the poles of HD ðzÞ to zero. This can be accomplished by solving (5.44) for B. In this example the denominator of HD ðzÞ is a polynomial of only the second order. Thus, we can find the solution by inspection (see also (5.70)): z 2 þ zð1:99b0 þ 2:96b1 1:91Þ þ 1 þ b0 ¼ z 2 b0 ¼ 1
b1 1:32
ð5:84Þ
Thus, we have G ðzÞ
z2
1:32z 1 1:99z þ 1
ð5:85Þ
Because HS ðzÞ and G ðzÞ must have the same denominator, we have HS ðzÞ ¼
a2 z 2 þ a1 z þ a0 z 2 1:99z þ 1
ð5:86Þ
Setting a2 ¼ a1 ¼ 0
a0 ¼ 1
ð5:87Þ
yields the simplest HS ðzÞ. The complete generalized recursive multirate decimator is sketched in Figure 5.19. However, as we have learned, the separation of HS and HD is only a model. To obtain the final generalized recursive multirate decimator, we combine the states (registers) of HS and G . The result is shown in Figure 5.20. To illustrate both the attenuation of the aliasing components and the passband characteristics, the system has been fed with filtered white Gaussian noise. The filter (for filtering the noise) is an ideal lowpass filter, which divides the white-noise spectrum into a passband part and a stopband part. Because the system (under test) is linear, the final
Comb Filters: Special Systems for Integer Factor SRC
183
Figure 5.19 Second-order time-varying decimator (M ¼ 3) with spread aliasing transfer zeros (HS and HD separated).
Figure 5.20 Second-order generalized recursive multirate decimator (M ¼ 3) with spread aliasing transfer zeros.
result can be obtained by separately simulating and superimposing the results of these simulations. This enables a separation of the passband and the stopband behavior of the system. In Figure 5.21(a), both, the passband component and the aliasing component of the decimated white Gaussian noise are shown. For comparison, the aliasing component of a second-order CIC filter is also shown. It can be observed that the second-order CIC filter and the second-order generalized recursive multirate filter have similar passband characteristics. However, their antialiasing characteristics differ.
184
Sample Rate Conversion in Software Configurable Radios
Figure 5.21 Passband and aliasing band PSD of white Gaussian noise processed by the system of Figure 5.20: (a) without droop correction, and (b) with droop correction.
The considerable passband droop can be influenced by changing the ai of HS ðzÞ. Inserting an attenuated transfer zero at f ¼ 0 causes a slight pulldown of the passband at f ¼ 0. Thus, the overall passband gets flatter. Because linear phase characteristics are important, we introduce two reciprocal transfer zeros at z 0:326
z 3:07
ð5:88Þ
Comb Filters: Special Systems for Integer Factor SRC
185
Thus, it is ðz 0:326Þðz 3:07Þ z 2 1:99z þ 1 2 z 3:4z þ 1 2 z 1:99z þ 1
HS ðzÞ ¼
The resulting structure is shown in Figure 5.20. Again, the passband characteristics and the antialiasing characteristics are determined by feeding the system with white Gaussian noise. It is sketched in Figure 5.21(b). The flat passband can be seen very well. However, the attenuation at f ¼ 0 due to the additional transfer zeros has reduced the distance between passband power level and aliasingcomponent power level. Thus, better (i.e., flatter) passband characteristics must be paid for with reduced aliasing attenuation.
5.7 Conclusion Comb filters for integer factor SRC (i.e., interpolation and decimation) have been introduced. Besides the well-known CIC filters, a novel structure of recursive multirate filters has been presented. The starting point of the investigations was to reduce the state space of CIC filters. This resulted in the necessity of coefficient multipliers. Generalizing these results led to generalized recursive multirate filters, which are comb filters providing the possibility of arbitrarily placing the periodic transfer zeros. By only realizing one period of the periodic behavior, the state space and thus the effort is minimal.
References [1]
Frerking, M. E., Digital Signal Processing in Communication Systems. New York: Van Nostrand Reinhold, 1994.
[2]
Unser, M., ‘‘Splines, a Perfect Fit for Signal and Image Processing,’’ IEEE Signal Processing Magazine, Vol. 16, No. 6, November 1999, pp. 22–38.
[3]
Menkhoff, A., ‘‘Interpolationsverfahren fu¨r unbeschr€ankte Abtastratenwandlungen,’’ Ph.D. thesis, Universit€at Fridericiana Karlsruhe, Fakult€at Elektrotechnik, March 1996.
[4]
Hogenauer, E. B, ‘‘An Economical Class of Digital Filters for Decimation and Interpolation,’’ IEEE Transactions on Acoustics, Speech and Signal Processing, Vol. 29, No. 2, April 1981, pp. 155–162.
186
Sample Rate Conversion in Software Configurable Radios
[5]
Candy, J. C., ‘‘A Use of Double Integration in Sigma Delta Modulation,’’ IEEE Transactions on Communications, Vol. 33, No. 3, March 1985, pp. 249–258.
[6]
Stantchev, B., ‘‘Digitalisierung von Schmalbandsignalen bei Breitbandempfang,’’ Master’s thesis, Technische Universit€at Dresden, Fakult€at Elektrotechnik, Institut fu¨r Nachrichtentechnik, October 1995.
[7]
Proakis, J. G., and D. G. Manolakis, Digital Signal Processing, Englewood Cliffs, NJ: Prentice-Hall, 1996.
[8]
Gantmacher, F. R., The Theory of Matrices, New York: AMS Chelsea Publishing, 1998.
[9]
Wunsch, G., and H. Schreiber, Analoge Systeme, Berlin, Germany: Springer-Verlag, 1993.
[10]
Unbehauen, R., Systemtheorie: Grundlagen f€ u r Ingenieure, Munich, Germany: R. Oldenbourg Verlag, 1993.
6 Systems for Fractional SRC 6.1 Introduction: The Direct Approach After having discussed systems for integer factor SRC in detail, we devote this chapter to the problem of fractional SRC. The fractional rate-change factor is limited according to (3.3) to (3.5). A straightforward way of realizing fractional SRC is to perform upsampling by L, filtering, and finally downsampling by M , as shown in Figure 2.7. This can be regarded as the direct approach of realizing fractional SRC. Its advantage is its simplicity. The filter is a conventional linear time-invariant system. However, the intermediate sample rate 1=T0 ¼ L=T1 at which it runs can be very high (e.g., several gigahertz). As mentioned in Section 2.2.3, T0 , and thus the intermediate sample rate 1=T0 , is directly determined by the ratio of the two rates at the input and the output of the sample rate converter. Consequently, the direct approach is only feasible in certain applications (i.e., where the rate-change factor L=M is given as a ratio of two relatively small positive integer numbers L and M ). A small L is usually required to realize a filter at an intermediate sample rate. If the reconstruction filter can be a comb filter, an implementation as a CIC filter can result in reduced effort, as in the case of integer factor SRC (see Section 5.4). However, in this case, the integrator section must be clocked at a high intermediate sample rate. Again, this is only feasible with small values for L and M . The limitations of directly implementing time-invariant filters for fractional SRC at an intermediate sample rate suggest the application of time-varying structures that avoid high intermediate sample rates. A straightforward solution is the realization of (2.33) to (2.35). 187
188
Sample Rate Conversion in Software Configurable Radios
As in the case of integer factor SRC, it is very convenient to describe the related signal-processing tasks on the basis of block processing. This simplifies the analysis considerably and provides a means to unveil potential for simplification or reduction of effort.
6.2 Polyphase and Block Realization 6.2.1 Block Filtering and Conventional Polyphase Structures In Section 2.3.3 it was shown how SRC can be interpreted by means of block filtering. M samples with respect to period T1 are combined in a block, yielding a signal at the rate 1=ðMT1 Þ with signal vectors of length M as its samples. The block filter processes these signals and outputs a signal at the same rate 1=ðMT1 Þ, with signal vectors as samples, but now of length L. Rearranging the elements of these vectors by multiplexing them at the rate L=ðMT1 Þ ¼ 1=T2 gives the desired signal at the new sample rate. The block filter can be derived on the basis of the LM -raised reconstruction filter. It is given by (2.135) and (2.136) and has a transfer matrix of H½B ðzÞ ¼ H½down CðzI A Þ1 B H½up þ H½down D H½up
ð6:1Þ
A block filter for SRC by 2=3 is constructed in the following example. The derivation of this block structure is equivalent to the one used for deriving the polyphase filters with reduced state space of Figures 4.3 and 4.5. Example 6.1
Suppose an FIR filter having the impulse response ½c0 c1 c2 c3 c4 c5 c6 c7 c8 is to be used for SRC by 2=3. It can be realized by a block filter with M ¼ 3 inputs and L ¼ 2 outputs. For the construction of the block filter, the original filter is raised to LM ¼ 6. The state-space matrices of the original filter in its transposed direct form are in contrast to (4.7) 0ð7;1Þ Ið7Þ Bð8;1Þ ¼ ½ c1 c2 c8 T Að8;8Þ ¼ 0ð1;1Þ 0ð1;7Þ ð6:2Þ Cð1;8Þ ¼ ½ 1 0 0 Dð1;1Þ ¼ c0 Now, we recall (2.134). With J ¼ 1 it is ~ zðkÞ þ B ~ xð3Þ ðk 3T1 Þ zðk þ 1Þ ¼ A
ð6:3Þ
Systems for Fractional SRC
189
~ zðkÞ þ D ~ xð3Þ ðk 3T1 Þ y ð2Þ ðk 2T2 Þ ¼ C with ~ ¼ B H½up B
~ ¼A A ~ ¼ H½down C C
~ ¼ H½down D H½up D
The matrices A, B, C, and D are given by (A.27). 3 2 1 0 0 60 0 07 7 6 60 1 07 0 0 1 ½up ½down 7 6 H ¼ H ¼6 7 0 0 0 60 0 07 40 0 15 0 0 0 gives 2 " # c6 I2 0 6 c7 ~ ð8;8Þ ¼ ð2;1Þ A 6 0ð6;6Þ 0ð1;2Þ 6 c8 6 60 0 0 1 0 0 0 0 0 ~ Bð8;3Þ ¼ 6 ~ ð2;8Þ ¼ C 60 6 0 0 0 0 0 1 0 0 60 6 c2 c0 0 40 ~ ð2;3Þ ¼ D c5 c3 c1 0
Letting
0 0
0 0
c4 c5 c6 c7 c8 0 0 0
3 c2 c3 7 7 c4 7 7 c5 7 7 c6 7 7 c7 7 7 c8 5 0
0 1
ð6:4Þ
As in the case of integer factor SRC, the controllability and observability matrices can be determined, showing that the system is ~ we find that neither controllable nor observable. By inspection of C only two states are involved in the construction of the output signal, z2 ~ that these two states are not and z5 . Further, we find by inspecting A involved in the state update. The minimum state space turns out to be 2. We can conclude with z2 ðk þ 1Þ ¼ ½ c8
c6
c4 xðkÞ
z5 ðk þ 1Þ ¼ ½ 0 0 c7 xðkÞ z2 ðkÞ c2 c0 yðkÞ ¼ þ z5 ðkÞ c5 c3
0 c1
ð6:5Þ
xðkÞ
The resulting structure is shown in Figure 6.1. It should be noted that the block-filtering principle can also be applied to IIR filters.
190
Sample Rate Conversion in Software Configurable Radios
Figure 6.1 FIR block filter for SRC by 2/3, T ¼ T1 M ¼ T2 L.
Another straightforward approach to realizing fractional SRC is the application of the conventional polyphase filters that have been introduced in Section 4.2. By sensibly concatenating the polyphase filters for samplerate increase and polyphase filters for sample rate reduction, and exploiting the fact that L and M are supposed to be relatively prime, efficient structures result [1]. It should be emphasized that the structures realizing block filters and polyphase filters depend on the values of L and M , which define the number of inputs and outputs, or the number of polyphase branches, respectively. As L and M increase, these structures become infeasible due to the increasing hardware effort. Another consequence from this dependence is that they are unsuitable for software-defined SRC, where the hardware platform must not depend on the current rate-change factor. However, polyphase filters can still be used for SRC in the context of a hardware platform being independent from L and M . In Chapter 4, polyphase filters for increasing and reducing the sample rate were presented. Combining these filters with an additional downsampler (succeeding a polyphase interpolator) or an upsampler (preceding a polyphase decimator), while exploiting the time-varying realizability of polyphase decimators and interpolators yields the desired structures.
Systems for Fractional SRC
191
6.2.2 Time-Varying Polyphase Structures The basic idea of time-varying polyphase structures is to simply use the wellknown polyphase filters for interpolation or decimation. A combination with an additional upsampler (together with a polyphase decimator) or a downsampler (together with a polyphase interpolator) reveals that the structures do not need to be changed at all when using them for fractional SRC. Just the controlling must be adapted to the application to fractional SRC. Therefore, the results of Section 4.2 will be exploited extensively. 6.2.2.1
Polyphase Interpolator Followed by a Downsampler
The output of a polyphase interpolator is given by (4.4) as
k LT0 y ðkT0 Þ ¼ ykðmod LÞ L
ð6:6Þ
with T0 ¼
T1 T2 ¼ L M
ð6:7Þ
Thus, the output of the following downsampler having an offset of M0 is
mM þ M0 ð6:8Þ y ðmMT0 þ M0 T0 Þ ¼ yðmM þM0 Þðmod LÞ T1 L With yl ðkT1 Þ ¼ ðx hl ÞðkT1 Þ 1 X ¼ x ðk l ÞT1 hl ðlT1 Þ
ð6:9Þ
l ¼1
the sample rate converted signal is
1 X mM þM0 y ðmMT0 þM0 T0 Þ¼ x l T1 hðmM þM0 ÞðmodLÞ ðlT1 Þ L l ¼1 ð6:10Þ In the case of M0 ¼ 0; (6.10) equals (2.33), an obvious observation (please note the slightly different meaning of the indexes i of hi in (6.10) and (2.33)).
192
Sample Rate Conversion in Software Configurable Radios
With respect to Figure 4.1 the commutator sweeps over the ring of the outputs of L polyphase branches with a step size of M . Hence, just the proper selection of the polyphase branch delivers the current output sample. Combining (4.2) and (4.3) with (6.8) yields the state-space description of the sample rate converter, which is realized by a polyphase interpolator (L " with L0 ¼ 0) followed by a downsampler (M #): z ðk þ 1ÞT1 ¼ A L zðkT1 Þ þ A L1 B x ðkT1 Þ
kM þ M0 y ðmT2 Þ ¼ C A ðmM þM0 Þðmod LÞ z T1 L
kM þ M0 þ DðmM þM0 Þðmod LÞ x T1 L
ð6:11Þ
with Dl ¼
D C A l1 B
for l ¼ 0 for l ¼ 1; 2; . . . ; L 1
where A; B; C ; D is the state-space description of the original interpolation filter h being clocked at the high intermediate sample rate 1=T0 . In (6.11) the upsampling offset has been chosen to be L0 ¼ 0: A different offset L0 leads to an equivalent behavior, with an additional delay of L0 samples at the output of the interpolator. However, this can yield simpler implementations, as it will be shown for L0 ¼ L 1 in Section 6.3.2 (see (6.22) and (6.23)). It is important to note that (6.22) and (6.23) can replace (6.11) if the additional delay of ðL 1ÞT0 is acceptable. Equation (6.11) describes the application of the system of Figure 4.1 to fractional SRC. The following can be observed: 1. The resulting system is time varying. 2. The timing of both the state equation and the output map is mutually asynchronous. This is not surprising, for L and M are relative prime. The timing relation between input and output is given by the arguments of the signals xðÞ and yðÞ of the output map. 3. For each input sample, the state equation is updated. 4. The output map must be calculated for each output sample. 5. Generally, the number of coefficients and the size of the state space is not changed, compared to the original interpolation filter. Thus,
Systems for Fractional SRC
193
the hardware effort for implementing (6.11) is generally of the same order as the effort for implementing the original filter. However, that would have to be clocked at a rate of L times higher. 6.2.2.2
Upsampler Followed by a Polyphase Decimator
The signal xðkT1 Þ is upsampled by L and then fed to the decimation filter, which is represented by its polyphase components. The number of polyphase branches is determined by the decimation factor, which is M . The output of a polyphase decimation filter (for M0 ¼ M 1) has been given in (4.27): Y ðzÞ ¼ ½ HM 1 ðzÞ HM 2 ðzÞ
H0 ðzÞ XðzÞ
The individual polyphase components of the input signal are filtered by the polyphase components of the filter and finally summed up to form the output signal: Y ðzÞ ¼
M 1 X
HM 1k ðzÞ Xk ðzÞ
ð6:12Þ
k¼0
The state-space description of the upsampler followed by the polyphase decimator can be adopted from (4.25) and (4.26), where M0 ¼ M 1: This enables a minimal state space for filters with finitelength impulse response (see footnote 3 in Chapter 4). However, choosing other values for M0 can result in a simpler description and thus a simpler implementation of the system. For M0 ¼ 0, this is shown in (6.31) in Section 6.3.2. It should be noted that (6.16) and (6.17) can be exchanged by (6.32) and (6.33) if the different delay is acceptable. By using the state-space matrices in a time-domain description (see (4.25) and (4.26)), an implementation can be derived. It is shown in Figure 4.4. Applying it to fractional SRC, the only difference is that the commutator sweeps over the ring of M inputs with a step size of L. This is very graphical, and it is sufficient for most considerations. However, we can also give a rigorous mathematical description of this behavior. It can be found by exploiting the relationship between the M -times downsampled polyphase components xl ðmT2 Þ of the L-times upsampled input signal (i.e., the input signals to the polyphase filter), and the input signal x ðkT1 Þ before upsampling (see Figure 6.2): mM þl T1 if ðmM L0 þ lÞðmod LÞ ¼ 0 ð6:13Þ L x l ðmT2 Þ ¼ x 0 else
194
Sample Rate Conversion in Software Configurable Radios
Figure 6.2 Timing relationships between input signal xðkT1 Þ, its upsampled version w 0 ðnT0 Þ, and the block upsampled input signal xðmT2 Þ (example given for L0 ¼ 2, L ¼ 5, and M ¼ 6).
It should be noted that here l is the intersample position of an input sample with respect to the position of the output samples (i.e., the position inside the block of M polyphase components). The smallest l (for l ¼ 0; 1; . . . ; M 1) not yielding the else-branch in (6.13) is l ¼ ðL0 mM Þðmod LÞ; l ¼ 0; 1; . . . ; M 1
ð6:14Þ
This might not be obvious at first sight. It can be found by inspection of ðmM L0 þ lÞðmod LÞ ¼ 0 in (6.13). Now the behavior of a system for fractional SRC (realized by upsampling and polyphase decimation) can equivalently be described by the following time-varying system:
Systems for Fractional SRC
195
zðm þ 1Þ ¼ A M zðmÞ þ ~xB ðmT2 Þ y ðmT2 Þ ¼ C A M 1 zðmÞ þ x~D ðmT2 Þ
ð6:15Þ
with ~xB ðmT2 Þ ¼ A M 1 B ¼
A M 2 B X
B xðmT2 Þ A
M 1l
B x
l¼ðL0 mM Þðmod LÞ; step L; M 1
mM þ l T1 L ð6:16Þ
x~D ðmT2 Þ ¼ CA M 2 B CAB CB D xðmT2 Þ
X mM þ l M 2l ¼ C A B x T1 L l¼ðL mM ÞðmodLÞ;step L;M 2 0
þ
D x 0
mM þM 1 L
T1
if ðL0 mM ÞðmodLÞ ¼ M 1 else ð6:17Þ
Equations (6.15) to (6.17) describe the application of the system of Figure 4.4 to fractional SRC (upsampler followed by polyphase decimator). The summation over l ¼ ðL0 mM Þðmod LÞ; step L; M 1 can also be guided by l ¼ ðkL þ L0 Þðmod M Þ
ð6:18Þ
if xðkT1 Þ is the input signal. This reflects the generation of output samples determined from the arrival of incoming samples. The system has the following characteristics: 1. The implementation is time varying. 2. Both the state equation and the output map are clocked at the rate of the output signal. Thus, state-update and output calculation are done synchronously. The input signals to both the state equation and the output map have to be precalculated in a time-varying manner. Between two consecutive output samples, all incoming input samples are weighted by the respective time-varying matrices and are integrated.
196
Sample Rate Conversion in Software Configurable Radios
3. The time variance is a direct result of (6.13). At different time instances, different polyphase branches are involved in the calculation of the input signals to the state equation and the output map. 4. Because the elements of the input signal arrive asynchronously with respect to the generation of the elements of the output signal, the number of signal elements changes, which are involved in the precalculation of the input signals to the state equation and the output map. (In case of L > M, there are time instances where no input signal is involved in the calculation of the new state or in the calculation of the output sample.) 6.2.2.3
State-Space Reductions for Nonrecursive Filters
The basic difference between the systems presented in this section and those of Section 4.2 is that the input and the output signal are mutually asynchronous, in contrast to the integer factor relation between the input and the output rate of the systems for integer factor SRC. The polyphase filters themselves are the same. Thus, the same potential for state-space reduction can be exploited if nonrecursive filters are used. Depending on the phases of the upsampler and the downsampler L0 and M0 , respectively, the state space can be reduced. For details, see Section 4.2. 6.2.2.4
Reducing the Size of the Coefficient Memory
As mentioned earlier, the polyphase filters with a time-varying output map or input map for fractional SRC are, in principle, the same as those for integer factor SRC. Thus, all possibilities for reducing the coefficient memory size (as introduced in Sections 4.2.4, and specifically the Farrow structure in Section 4.3.1 and the transposed Farrow structure in Section 4.3.2) are applicable to polyphase filters for fractional SRC as well. 6.2.2.5
Conclusion
In this section, it has been shown that feasible structures for fractional SRC can be obtained by combining the well-known polyphase-interpolator structure with a downsampler or an upsampler with the well-known polyphase-decimator structure. Also the Farrow structure and the transposed Farrow structure, as special cases of polyphase interpolators and polyphase decimators, can be used. It is only the timing that must be adapted.
Systems for Fractional SRC
197
6.3 Time-Varying CIC Filters 6.3.1 CIC Filters for Fractional SRC Combining two CIC filters, one for interpolation and one for decimation, leads to a general architecture of CIC filters for fractional SRC. It is shown in Figure 6.3. The intended degree of image or aliasing suppression can be selected by adapting the order of the two filters independently. The problem with such a cascade is the high intermediate sample rate, as has been explained earlier. A solution to circumvent this high intermediate sample rate is the exploitation of block filtering/polyphase filtering. In CIC filters for fractional SRC, only the integrator section must be clocked at a high intermediate rate. Therefore, the integrator section should
Figure 6.3 CIC filter for fractional SRC as a cascade of a CIC interpolator of order RL , and a CIC decimator of order RM .
198
Sample Rate Conversion in Software Configurable Radios
be replaced by a block filter/polyphase filter. For this purpose, the results of Section 6.2.2 are applied.
6.3.2 State-Space Equations To start with, the state-space description of the integrator section is given. As in Section 5.5, it has to be distinguished between delaying and nondelaying integrators. Without loss of generality, only nondelaying ones will be used here. Henker [2] has used a delaying type for the first integrator, which enables some simplifications (specifically, vectors B and D). However, choosing all integrators of the same type yields similar vectors B and C . This reveals the commonalities between the two different implementations derived in the following equations. With (R ¼ RL þ RM ) the state-space description of the integrator section is 2
AðR;RÞ
1 0 0 61 1 0 6 6 1 1 1 ¼6 6. . . 6. . . 4. . . 1 1 1
..
.
3 0 07 7 7 07 7 7 5 1
BðR;1Þ ¼ ½ 1 1
1
1 T
Cð1;RÞ ¼ ½ 1 1
1
1
ð6:19Þ
Dð1;1Þ ¼ 1
with A having the eigenvalues ki ¼ 1; i ¼ 0; 1; . . . ; R 1
ð6:20Þ
The state-space description of the respective block implementation of the integrator section can be found by raising it (see (2.105)). In Section 6.2.1, it was explained that raising a system for fractional SRC to LM and implementing the resulting block structure is infeasible due to the possible high values of L and M . However, it has been shown that raising the system either to L or M in conjunction with an asynchronous interface at the input or the output, respectively, can yield very efficient solutions. The same approach should be followed with the CIC filters. 6.3.2.1
Raising the Integrator Section to L
The state-space description was derived in Section 4.2.2 and given by (4.2) and (4.3) (with L0 ¼ 0). It should be noted that y Integr ðkT1 Þ is the block output signal of the integrator section before the downsampler M #.
Systems for Fractional SRC
199
zðk þ 1Þ ¼ A L zðkÞ þ A L1 Bx Integr ðkT1 Þ 2
2
3
C 6 6 6 CA 7 6 7 y Integr ðkT1 Þ ¼ 4 .. 5zðkÞ þ 6 6 . 4 CA L1
D CB CAB .. .
3 7 7 7x Integr ðkT1 Þ 7 5
CA L2 B
An equivalent but simpler description can be found by setting L0 ¼ L 1, thus 2 3 0 607 ½up ½down 7 HðL;LÞ ¼ IðLÞ HðL;1Þ ¼ 6 ð6:21Þ 4 ... 5 1 leading to zðk þ 1Þ ¼ A L zðkÞ þ Bx Integr ðkT1 Þ 3 2 C 6 CA 7 6 7 6 y Integr ðkT1 Þ ¼ 6 4 ... 5zðkÞ þ 4 2
CA L1
ð6:22Þ
3 0 .. 7 . 7x Integr ðkT1 Þ 05
ð6:23Þ
D
The M -times downsampled output of the L-raised integrator section can be found by applying (6.8). With 3 2 1 0 0 0 6 c 1 0 07 7 6 1
7 6 L1þi L c c 1 0 7 6 2 1 with ci ¼ A ¼6 L1 .. .. .. .. 7 7 6 .. 4 . . . . .5 cR1
cR2
cR3
1 ð6:24Þ
and C A l ¼ ½ rR1 ðlÞ rR2 ðlÞ with ri ðlÞ ¼ lþi l
rR3 ðlÞ
r0 ðlÞ
ð6:25Þ
200
Sample Rate Conversion in Software Configurable Radios
and M0 ¼ 0; the resulting system is the time-varying CIC filter [2]. It is shown in Figure 6.4, where the dependency of l from m is indicated by writing l ¼ lm : Example 6.2
Letting RL ¼ RM ¼ 1 we have Að2;2Þ ¼
1 1
0 1
Bð2;1Þ ¼ ½ 1 Cð1;2Þ ¼ ½ 1 Dð1;1Þ ¼ 1
1 T 1
ð6:26Þ
Figure 6.4 Time-varying CIC filter for fractional SRC (polyphase interpolator followed by a downsampler).
Systems for Fractional SRC
and consequently 1 L A ¼ c1
C A l ¼ ½ r0 ðlÞ
0 1
201
L ¼L L1
with c1 ¼
r1 ðlÞ with
r0 ðlÞ ¼ 1 r1 ðlÞ ¼ l þ 1
ð6:27Þ
ð6:28Þ
With (6.22) and (6.23), the structure of Figure 6.5 can be derived. 6.3.2.2
Raising the Integrator Section to M
As in Section 6.2.2, the system can be raised to M , which realizes a polyphase decimator. This decimator is preceded by an upsampler. In contrast to Section 4.2.3, the downsampler phase is M0 ¼ 0; which simplifies the system. Thus, the up- and downsampling matrices are (see (2.128) to (2.131)): ½up
HðM ;M Þ ¼ IðM Þ
½down
Hð1;M Þ ¼ ½ 1
The following state-space description results: zðm þ 1Þ ¼ A M zðmÞ þ A M 1 B A M 2 B
0 0
ð6:29Þ
B xIntegr ðmT2 Þ ð6:30Þ
Figure 6.5 Time-varying CIC filter with RL ¼ RM ¼ 1 (polyphase interpolator followed by a downsampler).
202
Sample Rate Conversion in Software Configurable Radios
yIntegr ðmT2 Þ ¼ C zðmÞ þ ½ D
0
0 xIntegr ðmT2 Þ
ð6:31Þ
As in (6.16) and (6.17), the following two signals are defined: X
~xB ðmT2 Þ ¼
A
l¼ðL0 mM Þðmod LÞ;stepL;M 1
M 1l
B x Integr
mM þ l T1 L ð6:32Þ
x~D ðmT2 Þ ¼
D x Integr 0
mM L T1
if ðL0 mM Þðmod LÞ ¼ 0 ð6:33Þ else
With (6.24) and 3 r0 ðlÞ 6 r ðlÞ 7 7 6 1 7 6 l r ðlÞ 7 A B ¼6 7 6 2 .. 7 6 5 4 . rR1 ðlÞ 2
lþi with ri ðlÞ ¼ l
ð6:34Þ
another structure for realizing fractional SRC with time-varying CIC filters can be derived. It is shown in Figure 6.6. The dependency of l from m is given by the interval l ¼ ðL0 mM Þðmod LÞ; step L; M 1 of the summation, which realizes an integrate-and-dump functionality. Although it looks a bit complicated, this structure is not very costly. Because it is an application of (6.15) through (6.17) to the integrator section of CIC filters, all conclusions from (6.15) to (6.17) are also valid for time-varying CIC filters, with an integrator section being realized by an upsampler and a polyphase decimator. Both the filter structures of Figures 6.4 and 6.6 (with L0 ¼ L 1) have the same input–output behavior. The pros and cons of one or the other structure are basically given by the fact that the time-varying part of the system is placed at the output or the input of the integrator section, respectively. The first is advantageous if the overall rate change is a decimation. In this case, less costly multiplications per time unit must be performed. Placing the time-varying multiplications at the input is advantageous if the word length of the input signal is small, which enables us to use simpler multipliers.
Systems for Fractional SRC
203
Figure 6.6 Time-varying CIC filter for fractional SRC (upsampler followed by a polyphase decimator).
Example 6.3
Letting RL ¼ RM ¼ 1 we have Að2;2Þ ¼ and consequently
1 1
0 1
Bð2;1Þ ¼ ½ 1
1 T
Cð1;2Þ ¼ ½ 1
1
Dð1;1Þ ¼ 1
ð6:35Þ
204
Sample Rate Conversion in Software Configurable Radios
A
M
1 ¼ c1
l
A B ¼
0 1
with c1 ¼
r0 ðlÞ r1 ðlÞ
with
M M 1
¼M
r0 ðlÞ ¼ 1 r1 ðlÞ ¼ l þ 1
ð6:36Þ
ð6:37Þ
With (6.30) to (6.33), the structure of Figure 6.7 can be derived. Still, a great disadvantage of both implementations is the necessity of coefficient multipliers. The integrator section of the original CIC filter has only unity coefficients. Raising the system causes a loss of this advantage: the matrix A L (or A M ) contains binomial coefficients as its elements. As to these coefficients, the question of whether the raised integrator section can be modified to keep the unity coefficients of the original integrator section arises. An analysis of this modification will be dealt with in the next section.
6.3.3 Simplification of the State Equation Mathematically, the goal of this simplification is the transformation AL ) A
ð6:38Þ
Figure 6.7 Time-varying CIC filter with RL ¼ RM ¼ 1 (upsampler followed by a polyphase decimator).
Systems for Fractional SRC
205
while keeping the transfer characteristics of the system. This can be realized by a linear transformation of the state z with the matrix U : z¼U z
ð6:39Þ
which eventually leads to a similarity transform of matrix A ¼ A L : A ¼ U 1 A U
ð6:40Þ
One might ask under which conditions the similarity transform of (6.40) is possible. From linear algebra, it is well-known that the eigenvalues ki of a raised square matrix equal the raised eigenvalues of the original matrix [3]. On the other hand, the eigenvalues are not changed by a similarity transform. Thus, it can be concluded that the following equation must hold: 8i : ki ¼ kLi
ð6:41Þ
n pffiffiffio ki 2 0; L1 1
ð6:42Þ
Therefore
Because the eigenvalues of matrix A (see (6.20)) fulfill (6.42), the state space of the raised integrator section of time-varying CIC filters can be transformed to the state space of the original integrator section. In order to transform the complete system, it is necessary to know the matrix U . Still, for each similarity transform, there is an infinite number of matrices U that realize this transform. Principally, any one of them could be chosen. However, there are conditions that, if fulfilled, would further simplify the system. If the transformation of (6.39) is applied to (6.22) and (6.23) the following results: zðk þ 1Þ ¼ A zðkÞ þ U 1 B x Integr ðkT1 Þ 3 2 C 6 CA 7 6 7 6 y Integr ðkT1 Þ ¼ 6 4 ... 5U zðkÞ þ 4 2
CA L1
3 0 .. 7 . 7x Integr ðkT1 Þ 05 D
ð6:43Þ
ð6:44Þ
206
Sample Rate Conversion in Software Configurable Radios
Hence, the matrix B must be multiplied by U 1 , and the output map is changed. The latter simply yields a different set of time-varying coefficients. However, the first might lead to a more complex vector (remember the simple structure of B in (6.19)). Therefore, the condition
)
U 1 B ¼ a B;
a 6¼ 0
ð6:45Þ
1 B; a
a 6¼ 0
ð6:46Þ
U B ¼
could be set in order to maintain a possible simplicity of vector B. Equations (6.45) and (6.46) describe the classical (special) eigenvalue problem. If B is an eigenvector of U , then the second term of the state equation (6.43) equals (6.22) but for the coefficient a, which is the reciprocal eigenvalue of U belonging to the eigenvector B. The same principle applies if (6.30) and (6.31) are used as a basis for an implementation: zðm þ 1Þ ¼ A zðmÞ þ U 1 A M 1 B
A M 2 B
B xIntegr ðmT2 Þ ð6:47Þ
y Integr ðmT2 Þ ¼ CU zðmÞ þ ½ D
0
0 xIntegr ðmT2 Þ
ð6:48Þ
In this case, the matrix C is multiplied by U as well as the processing of the input signal changes. The latter results in a different set of time-varying coefficients if the system is implemented. Equivalently to the first case, it might be desirable to keep the principal structure of matrix C . C U ¼ b C;
b 6¼ 0
ð6:49Þ
Transposing leads to UT CT ¼ b CT;
b 6¼ 0
ð6:50Þ
which is a similar eigenproblem as the one of (6.45) and (6.46). The derivation of U is given in Section A.5 of the Appendix. It is shown that U can be found for any vector B, or C , fulfilling (6.46), or (6.50), respectively. The drawback of these simplifications is that the relatively simple definition of ri of (6.25) and (6.34) cannot be used any longer, as can be seen from (6.44) and (6.47), respectively. While (6.45)
Systems for Fractional SRC
207
suggests just a scaling of B, the involved transformation matrix U changes (6.44) in comparison to (6.23), and thus (6.25) cannot be used any longer. Likewise does (6.49) solely cause a scaling of C . In this case, U changes (6.47) in comparison to (6.30). Hence, (6.34) cannot be used anymore. Moreover, it is possible that the state-space transformation causes an increase of the minimal word length necessary to encode the coefficients with fixed-point numbers. It must be concluded that, although beautiful, the state-space simplification does not necessarily result in a reduction of the effort for the complete system. Example 6.4
We try to simplify the state equation of the result of Example 6.2—that is, 1 0 1 0 ) ð6:51Þ L 1 1 1 Thus, we seek the transformation matrix u1;1 u1;2 U ¼ u2;1 u2;2
ð6:52Þ
so that " " U
1
0
1
1
1
0
1
1
#
" ¼ U 1 "
# ¼
1 L
1
0
#
L 1 # 0 U 1
U ð6:53Þ
Substituting (6.52) to (6.53) yields finally 0¼
u1;2 Lu1;1 u2;2
0 Lu1;2
ð6:54Þ
Thus, we have u1;2 ¼ 0, u2;2 ¼ Lu1;1 , and u2;1 as a free parameter. This can also be obtained from (A.62) and (A.63). As stated previously, the linear transformation of the system with U can cause a more complex vector B. This can be avoided by proper choice of the free parameter u2;1 . With (6.26) and (6.46) we can write
208
Sample Rate Conversion in Software Configurable Radios
u1;1 u2;1 þ Lu1;1
¼
1 1 a 1
ð6:55Þ
We choose u1;1 ¼ a ¼ 1, which yields u2;1 ¼ 1 L. Hence, 1 0 ð6:56Þ U ¼ 1L L Thus, we can substitute U 1 B by B in (6.43). But what about CA U in (6.44)? 1 0 l C A U ¼ ½l þ 1 1 ð6:57Þ 1L L l
¼ ½ l þ 2 L; L
ð6:58Þ
The resulting structure is shown in Figure 6.8.
6.4 A Note on Irrational Factor SRC As stated in Section 2.2.2, an irrational rate-change factor can be approximated by a rational factor with any precision by
Figure 6.8 Time-varying CIC filter of Figure 6.5 with a simplified state update. Although the state update has been simplified, the output map is more complex now (see (6.58)).
Systems for Fractional SRC
209
T1 L ¼ T2 M The higher the required precision, the larger L and M must be. Hence, the coefficients ci and ri ðlÞ in (6.24), (6.25), and (6.34) get large, which results in a large number of bits if the coefficients are represented by fixedpoint numbers in an implementation. In any case, this approximation is a way to realize irrational factor SRC with time-varying CIC filters. This is different with the Farrow structure and the transposed Farrow structure. By inspecting Figures 4.7 and 4.10, it can be seen that these structures do not depend on L or M . There are not even coefficients that depend on L or M . It is only the intersample position m that counts. By substituting L T1 ) T2 M and thus by defining m as done in (2.12), the Farrow structure and the transposed Farrow structure can be used for irrational factor SRC. In this case, the integrate-and-dump functionality of the transposed Farrow structure is to be understood as integrating all intermediate results that appear during one output period T2 before dumping. However, it remains an open problem to derive the timing information (i.e., to calculate m) with a certain precision. On the other hand, it is a very simple matter to derive the timing information for rational factor SRC (e.g., by an accumulator fed with L and overflowing at M ). Therefore, the approximation of the irrational-rate-change factor by a rational one is also sensible when using the Farrow structure or the transposed Farrow structure (although it is, in principle, possible to use these structures for irrational factor SRC).
6.5 Summary Several solutions to fractional SRC have been presented. The obvious solution, direct block-implementations, has turned out to be infeasible. This is due to the possibly high numbers for L and M , which would result in a high number of inputs and outputs of the system. Moreover, such systems are hardly parameterizable and adaptable to different conversion factors. Therefore, time-varying filter structures have been derived from blockfilter structures for integer factor SRC. They implement (2.32). As they
210
Sample Rate Conversion in Software Configurable Radios
are derived from the polyphase structures for integer factor SRC, all considerations regarding state-space reductions and reduction of the coefficient memory size (application of the Farrow structure and the transposed Farrow structure) also apply for the case of fractional SRC. Time-varying CIC filters have been introduced as a special application of time-varying polyphase filters. They have been derived based on a blockprocessing structure for the integrator section. It can be concluded that efficient parameterizable structures for fractional SRC can be found by combining the filter hðnT0 Þ (i.e., the very part that is clocked at the high intermediate sample rate) of Figure 2.7 with either the up- or downsampler and deriving a block implementation. This block implementation, in conjunction with the remaining down or upsampler, is implemented as an SISO system, which is the desired parameterizable system for fractional SRC.
References [1]
Fliege, N. J., Multirate Digital Signal Processing: Multirate Systems, Filter Banks, Wavelets, New York: John Wiley & Sons, 1994.
[2]
Henker, M., T. Hentschel, and G. P. Fettweis, ‘‘Time-Variant CIC-Filters for Sample-Rate Conversion with Arbitrary Rational Factors,’’ in IEEE 6th International Conference on Electronics, Circuits and Systems (ICECS ’99), Paphos, Cyprus, September 5–8, 1999, pp. 67–70.
[3]
Gantmacher, F. R., The Theory of Matrices, New York: AMS Chelsea Publishing, 1998.
7 Applications of SRC 7.1 Introduction In this chapter, different methods (filter types) for SRC are applied to a practical scenario. In conjunction with the theoretical investigations of the previous chapters, this will yield a comparison of the different methods. In accordance with the book title, the example of this chapter is given with respect to the software radio concept. Although SRC can be applied to both the receiver and the transmitter part of a software radio terminal, the following considerations are solely dedicated to the receiver. However, this does not limit the generality of the examples. In Chapter 3, the separation of integer factor and fractional SRC was introduced. As seen in Chapter 6, systems for fractional SRC are based on systems for integer factor SRC and represent a generalization of them. From these investigations, it can be concluded that fractional SRC is the more demanding design problem among the two. Another point regarding fractional SRC should be recalled. Due to the limitations of the rate-change factor (see Chapter 3), fractional SRC does not significantly influence the OSR 1 of the signal of interest. Hence, swapping the order of fractional and integer factor SRC in a cascade for rational factor SRC does not change the constraints on the system for integer factor SRC. However, because the system for integer factor SRC does change the OSR of the signal of interest, the constraints for fractional SRC do change significantly. Hence, both solutions are compared, placing fractional SRC before or after integer factor SRC. 1. When referring to the OSR in this section, the OSR or the GOSR — depending on the application — is meant. 211
212
Sample Rate Conversion in Software Configurable Radios
Comprehensive literature is available on integer factor SRC (e.g. the text books [1–3]). On the other hand, there is a lack of publications that deal with optimal solutions for fractional SRC. Therefore we limit the investigations of this chapter to fractional SRC. First, the scenario of the application will be described. It is derived from current demands for software-defined terminals for different mobile communications air interfaces. Next, the requirements on SRC in the context of mobile communications systems are reviewed. Based on these, different types of systems for fractional SRC are considered, as they were introduced in Chapter 6. Sensible candidates are selected and compared with respect to their implementation effort.
7.2 Scenario of the Application The application scenario is characterized as follows (see also Figure 7.1). A wideband signal is digitized at a rate of 80 MSps at a resolution of 14 bits (this represents state-of-the-art ADC technology). The digitization bandwidth is limited to 10 MHz by a filter preceding the ADC. The signal comprises GSM channels, IS-95 channels, or UMTSFDD channels. Fractional SRC must be realized (i.e., the output rate of the SRC process must be an integer multiple of the bit rate of GSM, or the chip rate of IS-95, or UMTS, respectively).
>
Figure 7.1 Application scenario (n: integer).
Applications of SRC
213
The main parameters of the selected air interfaces are collected in Table 7.1 [4] Some comments might be necessary. The number of IS-95 channels within the digitization bandwidth of 10 MHz has been chosen with respect to practical considerations—for example, guard space (see [5] for details). The minimum required SNR of the channel of interest is an assumption. For GSM, the manufacturers claim 9 to 12 dB. The actual value depends on the performance of the baseband processing. For UMTS and IS-95, the same SNR has been assumed as has been used for GSM. This is to ensure that the SRC process does not cause severe cochannel interference due to aliasing.
7.3 Requirements on SRC in the Context of Mobile Communications Typical characteristics of mobile communications signals at wideband reception are [6]: Table 7.1 Parameters of Mobile Communications Standards, GSM, and IS-95 GSM
IS-95
UMTS-FDD
Channel separation/channel bandwidth
200 kHz
1.25 MHz
5 MHz
Equivalent number of channels in the selected band
50
6
2
Minimum SNR of the channel of interest (not to be deteriorated by SRC)
9 to 12 dB
9 to 12 dB
9 to 12 dB
Maximum adjacent channel (blocker) above the channel of interest (inside digitization bandwidth)
100 dB
60 dB
40 dB
Resulting minimum aliasing attenuation of the filters
110 dB
70 dB
50 dB
Symbol/chip rate (ftarget )
270.83 kSps
1.2288 Mcps
3.84 Mcps
lcm (fs, ftarget Þ (i.e., least common multiple)
1,040 MSps ¼ 13 5 24
3,840 MSps ¼ 28 3 5
480 MSps ¼ 25 3 5
Rate-change factor at fs ¼ 80 MSps
13 3528
24 3 55
23 53
214
Sample Rate Conversion in Software Configurable Radios
The signal contains one or several channels, depending on the ratio between digitization bandwidth and channel spacing of the relevant standard (i.e., the channel OSR). Adjacent channels can have much higher power than the channel of interest (adjacent channel interference characteristics—for example, GSM [7]). The farther away an adjacent channel is located from the channel of interest, the higher is its allowed power level. Hence, the more channels are digitized simultaneously, the higher the dynamic range of the signal. The requirements on a filter for SRC are: Potential aliasing components must be attenuated. Due to the signal characteristics, these components can be of high power compared to the channel of interest. The width of the aliasing components is determined by the channel OSR (Figure 7.2).
Figure 7.2 Relative bandwidth of passband and aliasing band of a filter for SRC.
Applications of SRC
215
Due to the equidistant placing (over frequency) of the aliasing components, the filter can have a comb-like transfer characteristic with the transfer zeros placed at the aliasing components, if the OSR is sufficiently high (Figure 7.2). Narrow stopbands enable a clustering of the transfer zeros and thus high attenuation. Wider stopbands with high attenuation result in high effort and cost, and possibly render the application infeasible. The design constraint is to meet the required transfer characteristics (including minimum phase distortions) at least cost. In Chapter 3 it was concluded that placing fractional SRC at a high sample rate where the OSR is high results in relaxed design constraints for the filters. Table 7.2 summarizes the main parameters of a system for fractional SRC placed first in a cascaded structure for sample rate reduction (i.e., at a high sample rate where the OSR is high). Placing fractional SRC at a lower sample rate sets different requirements on the system. This is reflected in Table 7.3. In order to enable the application of filters with moderate requirements regarding the bandwidth of the transition band, the OSR at the output of the system for fractional SRC should be four (i.e., the system is placed at four times the target rate). When comparing the three air interfaces in Table 7.2, it can be observed that a required higher aliasing attenuation goes with a higher OSR.
Table 7.2 Parameters for SRC, Fractional Part Placed First in a Cascade (Alternative Suggestions Are in Brackets) GSM
IS-95
UMTS
Input sample rate
fS ¼ 80 MSps
Rate-change factor
fS ¼ 80 MSps 24 3 55 96 624 125 625 1 1 50 65
fS ¼ 80 MSps
13 3528 13 13 15 24 1 1 256 160
Rate-change factor, fractional part Rate-change factor, integer part Sample rate after fractional SRC OSR after fractional SRC Necessary aliasing attenuation
69:3 MSps ð43:3 MSps) 346 ð 216Þ
> 110 dB
61:44 MSps ð79:872 MSps) 49 ð 64Þ
> 70 dB
23 53 24 25 1 20
66 125 1 11
76:8MSps ð42:24MSps) 15 ð 8:5Þ
> 50 dB
216
Sample Rate Conversion in Software Configurable Radios
Table 7.3 Parameters for SRC, Fractional Part Placed at a Low Sample Rate (Alternative Suggestions Are in Brackets) GSM
IS-95
Input sample rate
fS = 80 MSps
fS = 80 MSps
fS = 80 MSps
Rate-change factor
13 3528 1 1 464 440
24 3 55 1 1 415 410
23 53 1 1 45 43
Rate-change factor, integer part
5:3 MSps ð8 MSps) 576 384
UMTS
Rate-change factor, fractional part
1:25 MSps ð2 MSps) 13 13 15 24
625 625
OSR after fractional SRC
4
4
4
Necessary aliasing attenuation
> 65 dB
> 70 dB
> 50 dB
Sample rate before fractional SRC
16 MSps ð26:6 MSps) 24 72 25 125
This is because a smaller channel bandwidth goes with a higher OSR on one side, and with a larger number of adjacent channels inside the digitization bandwidth on the other side. Because far-off adjacent channels are generally allowed a higher power level, the aliasing attenuation must be higher for narrowband signals. This property has been referred to as the bandwidth dynamic range trade-off [4, 8]. It can be exploited by comb filters that provide increasing attenuation the smaller the respective bandwidth gets. Realizing such an attenuation in an equiripple manner requires an effort far too high to be feasible in mobile communications terminals.
7.4 Conventional Filters2 7.4.1 Direct Implementation It should be clear from Table 7.1 that a direct implementation of SRC (as shown in Figure 2.7) realized by upsampling, filtering, and downsampling is infeasible. The necessary intermediate sample rates of up to 3.84 billion samples per second (GSps) are too high.
2. In contrast to continuous-time digital filters (e.g., polynomial filters) whose continuous-time impulse response is implemented and sampled at ‘‘run-time,’’ the notion of conventional filters means typical digital filters (e.g., FIR and IIR direct and transposed structures).
Applications of SRC
217
7.4.2 Direct-Block Implementation To avoid high intermediate sample rates, block and polyphase implementations can be used. As to block implementations (e.g., Figure 6.1), the number of outputs equals the numerator of the rate-change factor. In the case of separating fractional from integer factor SRC, the number of inputs of a system for fractional SRC can be twice as high as the number of outputs (see (3.4)). In the current example (Table 7.2), the number of inputs can be chosen to be 15 in the GSM case, 125 in the IS-95 case, and 25 in the UMTS case. However, 125 especially, might be too large for an efficient implementation. To use a block implementation with a reduced number of inputs and outputs, the fractional part of SRC can also be implemented in a cascaded manner. As to the IS-95 case, a cascade of one block filter with five inputs and four outputs, followed by a block filter with 25 inputs and 24 outputs, can be employed. This would reduce the number of inputs/outputs, and, moreover, the second filter can directly be used for the UMTS case. However, the same structures cannot be used for the GSM case. It is generally a problem to design a direct-block implementation hardware structure for SRC that is applicable to different conversion factors, if the structure directly depends on the rate-change factor. 7.4.3 Time-Varying Polyphase/Block Implementation Another implementation of conventional FIR or IIR filters for fractional SRC are time-varying polyphase implementations. Their structure does not depend on the rate-change factor. In Section 6.2.2, two versions of timevarying polyphase filters for fractional SRC were presented: an upsampler followed by a polyphase decimator, and a polyphase interpolator followed by a downsampler. The polyphase decimator or interpolator itself is derived by means of raising the original filter to a block implementation of block length M or L, respectively. Thus, the main design step remains the design of the prototype antialiasing (anti-imaging, if necessary) filter, which would have to be clocked at the high intermediate sample rate if directly implemented. Placing fractional SRC first in a cascaded structure for SRC, this intermediate sample rate equals the least common multiple given in Table 7.1. Generally, the fractional part of the rate-change factor can cover the interval ð0:5; 2Þ. Because the overall rate conversion is a decimation task, it is sensible to limit the fractional part to the interval ð0:5; 1Þ (see Section 3.3). The closer it is to one, the higher the OSR after fractional SRC is, which
218
Sample Rate Conversion in Software Configurable Radios
simplifies the prototype filter (see Section 3.2). This is because a high OSR results in narrower aliasing components, which can be attenuated by simple comb filters of low order. Still, if a fractional rate-change factor close to one can only be achieved by increasing the denominator (as in the IS-95 case, see Table 7.2), the advantage gained has to be traded off against the increase of complexity and effort due to the higher interpolation and decimation factors (number of coefficients, processing word length). 7.4.4 Filter Characteristics If placed first in the cascade (see Table 7.2), fractional SRC requires high aliasing attenuation in conjunction with a possibly very narrow passband. This is due to the possibly high-power adjacent channel interferers. Given these constraints, conventional lowpass filters cannot be realized efficiently. Comb filters providing high attenuation of the aliasing components and low distortion of the passband are a good choice, though. They were introduced in Chapter 5. The necessary order can be found by evaluating jH ðf Þj at f ¼ ð1 B=2Þf2 where f2 is the sample rate after SRC. This is possible because the main contribution to aliasing is determined by the first aliasing component at f2 (see Figure 7.2). H ðf Þ ¼ H ðe j2pf T Þ is given in (5.3). Hogenauer [9] has collected comprehensive tables that facilitate the choice of the required order. In the current application, a second-order comb filter suffices. In the case of the alternative conversion factors (in brackets) a thirdorder comb filter is required to achieve the necessary degree of aliasing attenuation for the lower OSRs. If the fractional part is placed at 4 ftarget (see Table 7.3), the necessary attenuation must be achieved in frequency bands of large relative bandwidth with respect to (4 ftarget ). This makes it impossible to use simple comb filters. Conventional FIR filters can be used instead. Of course, the application of IIR filters is also possible. The main problem encountered with this class of filters is their generally poor phase characteristics. However, by employing a phase equalizer, this problem can be minimized considerably. A sixth-order elliptic IIR filter with a third-order phase equalizer provides enough aliasing attenuation with a fixed-point coefficient quantization of 16 bits in the GSM case.3 Still, for the IS-95 case, as well as for the UMTS case, new filters must be designed. 3. The specific design parameters in this section (e.g., number of coefficients or coefficient quantization) have been found by using QEDesign2000, Digital Filter Design System, Version 5.1, Demo Version, Momentum Data Systems.
Applications of SRC
219
7.4.5 Conclusion It can be concluded that: The direct implementation is infeasible due to the high intermediate sample rate. Direct-block implementations are generally infeasible due to the possibly large block length leading to a large number of inputs and outputs and the dependency of the structure on the rate-change factor. Time-varying polyphase/block structures, as either interpolation or decimation filter, seem to be a good candidate. They are realizable as linear-phase FIR filters with a relatively large number of coefficients to be stored or IIR filters with poor phase characteristics, but a comparably small number of coefficients to be stored. Fractional SRC first in a cascaded structure enables the application of comb filters with lower effort. Fractional SRC at a lower sample rate requires wider stopbands (relative to the sample rate) for aliasing attenuation; simple comb filters are not applicable. All of these filters have one main drawback if a parameterizable but common hardware platform for software-defined terminals is the issue: Each air interface requires a different rate-change factor. Hence, different filters must be designed that result in a generally variable number of coefficients. This makes it difficult to find a common but efficient hardware platform on which all modes of operation can run. Therefore, conventional filters are not a sensible choice for SRC in software radio terminals.
7.5 Polynomial Filters 7.5.1 Review The idea of polynomial filters is to calculate the necessary samples of the impulse response rather than store them (Section 4.2.4), especially if the number of coefficients is large and the number of coefficients in current use is low.
220
Sample Rate Conversion in Software Configurable Radios
This approach leads to more efficient solutions than the conventional approach of storing all coefficients, there are several possibilities to find the target impulse response. A conventional approach is to sample an original impulse response and interpolate the samples by means of Lagrange polynomial interpolation. Another approach is to synthesize directly a polynomial impulse response under certain design constraints [10, 11]. In Sections 4.3.1 and 4.3.2, two different approaches to polynomial filtering were presented in the context of the polyphase framework. 7.5.2 The Conventional and Transposed Farrow Structures Polynomial filters can be implemented on both the conventional and the transposed Farrow structure. In general, these polynomial filters can be seen as discrete-time model filters (one polyphase component of a prototype filter) that are interpolated by continuous-time polynomial interpolators. The fundamental constraint is that this single polyphase component is one out of L polyphase components in the case of the conventional Farrow structure, and one out of M polyphase components in the case of the transposed Farrow structure. The former can only implement polynomial pieces of length LT0 , while the latter can only implement polynomial pieces of length MT0 . Hence, implementing the same first polyphase component (i.e., using the same coefficients ci; j ) on both structures results in two different impulse responses that look similar. However, one is stretched in time in comparison to the other one. The clustered transfer zeros of their spectra are thus placed either at the image components located at multiples of 1=ðLT0 Þ or at the aliasing components located at integer multiples of 1=ðMT0 Þ. This is sketched in Figure 7.3. It can be concluded that the same continuous-time impulse response can be used for either anti-imaging (interpolation) or antialiasing, depending on the platform on which it is implemented, the conventional or the transposed Farrow structure. Thus, the transposed Farrow structure does not require new impulse responses to be designed. In [11], several classes of polynomial filters have been compared. The first class (probably the most common) is polynomial filters resulting from a time-domain approach to the design. This is the classical approach to interpolation, which we have disqualified for SRC (see Section 2.2.1). The main reason was the clustering of the transfer zeros about integer multiples of 1=ðLT0 Þ, which does not provide the necessary aliasing attenuation. For this reason Henker [10], and Vesma [11] have designed polynomial filters based on a frequency approach. This facilitates influencing
Applications of SRC
221
Figure 7.3 (a) A continuous-time impulse response of a comb filter, and (b) its magnitude spectrum; implementing the first polyphase component () on the conventional and the transposed Farrow structure (N ¼ L or N ¼ M, respectively) leads to (c) two different discrete-time impulse responses, and (d) magnitude spectra.
the stopbands of the filter. A result of these investigations is that it is possible to widen the bandwidth of the typical narrow stopbands resulting from the time-domain approach. Still, because the number of transfer zeros is not increased for a certain order of the polynomials, the attenuation in the stopbands gets smaller as the spread between the transfer zeros gets wider. The extreme result of spreading the transfer zeros is a filter characteristic similar to equiripple FIR filters. However, it should be recalled that the requirement for SRC is high attenuation in the aliasing bands. The considered filters achieve image attenuation instead. The reason for this lies solely in how the continuoustime impulse responses are implemented in the digital domain. By employing
222
Sample Rate Conversion in Software Configurable Radios
the Farrow structure, the continuous-time impulse responses of polynomial filters are sampled L times per polynomial piece. This results in L 1 equidistantly spaced stopbands in the frequency interval ½0; 1=T0 Þ, which are the image bands. The works by Vesma [11] and Henker [10] suggest that it is not possible to design a polynomial impulse response that performs antialiasing if sampled L times per polynomial piece, at least with an effort comparable to the one necessary for anti-imaging filters. An example is shown in Figure 7.4, indicating what happens when trying to realize antialiasing on the conventional Farrow structure. A continuous-time impulse response of an antialiasing filter is approximated by polynomials of length LT0 in order to implement it on the conventional Farrow structure. Because the polynomial pieces are still of length LT0 , the filter realizes anti-imaging.
Figure 7.4 Sampling the discrete-time antialiasing impulse response of Figure 7.3 with a length of 2MT0 and a period of LT0 ; (a) resulting impulse response realized by the conventional Farrow structure, and (b) magnitude spectrum.
Applications of SRC
223
Instead, M 1 equidistantly spaced stopbands would be necessary for antialiasing. This can be achieved by sampling the polynomial impulse response M times per polynomial piece. The implementation of such polynomial filters is possible not on the conventional Farrow structure, but on the transposed Farrow structure, which is based on M polyphase branches representing the M samples per polynomial piece. Thus, all investigations made with respect to optimizing polynomial impulse responses for interpolation can directly be adapted to antialiasing. In [10], an optimized third-order Lagrange polynomial filter for interpolation has been presented. It consists of 8 polynomial pieces. By sampling its impulse response with M samples per polynomial piece, this filter can be used for antialiasing. It should serve as an example for employing the transposed Farrow structure for fractional SRC. Its transfer function magnitude is shown in Figure 7.5. It can be seen that 80-dB attenuation can be achieved for OSRs greater than 4, while OSRs greater than 3 yield 60-dB attenuation (with respect to the output sample rate). It can be concluded that polynomial filters are applicable to fractional SRC if implemented on the transposed Farrow structure.
Figure 7.5 Transfer function magnitude of an optimized third-order piecewise Lagrange filter.
224
Sample Rate Conversion in Software Configurable Radios
7.5.3 The Generalized (Time-Varying) Conventional Farrow Structure and the Transposed Farrow Structure The application of filters with more than one stored coefficient per polynomial piece (see Section 4.3.2) should be limited to the case where the continuous-time impulse response is a result of convolving the stored samples with a polynomial interpolation filter—that is, the samples of a finite-length impulse response are interpolated (the interpolated FIR-filter approach of (4.107)). As derived in Section 4.3.3, the two cases, upsampler followed by polyphase decimator and polyphase interpolator followed by downsampler, can be interpreted as follows. Both parts of the filter, the polynomial filter interpolating the impulse response of the model filter and the latter itself, can be separated. With respect to the intermediate sample rate 1=T0 at which the complete filter runs (virtually), the model filter is p-times oversampled. This enables its implementation on a p-times lower rate 1=ðpT0 Þ. With respect to an implementation, it is illustrative to set L ¼ pr or M ¼ pr, respectively. A sensible partitioning of the rate-change factor leads to the following two cases, based on the polyphase decimator and the polyphase interpolator: 1. Performing L-times upsampling, polynomial filtering, p-times downsampling, transversal filtering, and finally r-times downsampling is equivalent to L-times upsampling, combined filtering with the interpolated transversal filter, and finally M -times downsampling (see Figure 7.6). The r-times-increased OSR after the downsampler p # (compared to the OSR after a downsampler M #) enables the application of simpler polynomial filters. With (4.110) and (4.111), r can be chosen arbitrarily. This approach exploits similar advantages of oversampling, as does the placing of the fractional part first in the cascaded structure for SRC.
Figure 7.6 Partitioning of a filter for SRC (first version, M ¼ pr).
Applications of SRC
225
2. The other approach, polyphase interpolation followed by downsampling, equals an upsampling by r, followed by transversal filtering. Thus the r-times oversampled signal is p-times upsampled and filtered by the polynomial filter (see Figure 7.7). Due to the increased OSR of the signal (after r-times upsampling and filtering with the model filter), simpler polynomial filters can be used. Finally, the signal is downsampled by M. Again, the higher the OSR is (before polynomial filtering), the simpler the polynomial filter can be. This results in choosing r very high, which is effectively storing more coefficients per polyphase component. Because the polynomial filter is an anti-imaging filter, the transversal filter (i.e., the stored polyphase components) mainly determines the antialiasing properties of the system. In the first case, the transversal filter is placed after the polynomial filter, and before the polynomial filtering in the second case. In both cases, it is clocked at a lower rate than the polynomial filter. The intermediate sample rates are physically not present in the structures of Figures 4.7 and 4.10. Once more, it is illustrated that due to the different number of polyphase components, L and M , the two structures show inherently different behavior. The generalized (conventional and transposed) Farrow structures are built on the constraint of cutting each of the polynomial pieces of the impulse response into an integer number of smaller pieces. Still, this does not affect the fundamental characteristics of the filter. This becomes clear when interpreting the cutting process as a process of equidistantly sampling the (original) pieces and interpolating these samples. Antialiasing or anti-imaging properties are maintained. The generalized conventional Farrow structure is an architecture for anti-imaging filters, while the generalized transposed Farrow structure is a structure realizing antialiasing filters. Nevertheless, it is possible to implement filters on the generalized conventional Farrow structure that provide enough stopband attenuation for antialiasing purposes.
Figure 7.7 Partitioning of a filter for SRC (second version L ¼ pr).
226
Sample Rate Conversion in Software Configurable Radios
7.5.4 Antialiasing with the Generalized Conventional Farrow Structure What has hindered us from using the conventional Farrow structure for antialiasing so far is that it implements an impulse response constructed from polynomial pieces of length LT0 rather than MT0 . This results in filters with good anti-imaging and poor antialiasing characteristics (see Section 4.3.1). Cutting the pieces of the original piecewise impulse response into smaller pieces provides, in principle, another means of realizing antialiasing on the generalized conventional Farrow structure. The basic idea is to describe or approximate the impulse response of an antialiasing filter (see Section 4.3.3 for the interpolated FIR-filter approach) by polynomial pieces of length LT0 . As Figure 7.4 suggests, this might not result in very good antialiasing characteristics. Still, if oversampled by r, such shorter polynomial pieces of length LT0 =r can approximate the desired impulse response more or less well (see Figure 4.12). Because the constructed impulse response comprises only polynomial pieces of length LT0 =r, the clustered transfer zeros of an antialiasing filter at integer multiples of 1=ðMT0 Þ (for attenuating the aliasing components of a signal) are usually destroyed. Therefore, only filters providing enough attenuation to remove all signal components outside the passband can be used if antialiasing should be realized with the generalized conventional Farrow structure. Example 7.1
As an example, the sample rate of a signal should be converted by L=M ¼ 7=10. Due to the high complexity of both the generalized conventional and the generalized transposed Farrow structure, fractional SRC is placed at 4 ftarget (i.e, where the sample rate is low). Thus, fractional SRC is preceded by integer factor SRC. It is assumed that the signal at 4 ftarget comprises three adjacent channels in addition to the wanted channel. The necessary aliasing attenuation for SRC is supposed to be 40 dB; hence, in case of antiimage filtering, all images must be attenuated by at least 40 dB. A linear interpolator in conjunction with a model filter (see Section 4.3.3) is employed on the generalized conventional Farrow structure. The former achieves an image attenuation of approximately 47 dB for eight-times oversampled signals [9]. In order to use it, the four-times oversampled input signal must be up sampled by r ¼ 2. Because L/M ¼ 7/10, the rate-change factor must be expanded by two to L/M ¼ (2 7)(2 10)—resulting in r ¼ 2, p ¼ 7, and M ¼ 20 (see
Applications of SRC
227
Figure 7.7). After upsampling by two, the model filter must ensure that all signal components outside the channel of interest are attenuated by at least 40 dB. This can be achieved with a conventional 200-tap lowpass filter4 having an upper passband edge of fS =16 and a very steep transition edge. Its magnitude spectrum is shown in Figure 7.8. In fact, the model filter realizes both channel filtering (removing the three adjacent channels) and anti-image filtering on the two-times upsampled input signal, resulting in an 8-times oversampled signal. This enables us to perform polynomial interpolation with simple first-order polynomials. The resulting magnitude spectrum of the transfer function of the interpolated FIR filter with respect to seven times the output rate of the FIR filter (i.e., 14 times the sample rate of the input signal) is shown in Figure 7.8. This composite filter provides more than 40-dB attenuation for all potential aliasing components. The necessary upsampling, the model filter, the polynomial interpolator, and the final downsampling by M (as shown in Figure 7.7) are combined and implemented on the generalized conventional Farrow structure, avoiding any high intermediate sample rate. When using the generalized transposed Farrow structure, this is somewhat different. Because the linear interpolator provides approximately 47-dB image attenuation for an OSR of 8, the respective continuous-time impulse response (see Figure 7.3(a)) can be used also for aliasing attenuation by 47 dB if the OSR at the output of the filter is at least 8. In order to achieve this OSR, the input signal must be upsampled by three, resulting in an OSR of 12 (i.e., the rate-change factor is expanded to L=M ¼ ð3 7Þð3 10Þ). This is followed by SRC by 7=10 with a filter according to Figure 7.3(c) (dotted line). After fractional SRC, the signal of interest has an OSR of 8.4. The remaining decimation by 3 (for compensating the upsampling) is realized by an antialiasing filter, which would be of the same order as that of Figure 7.8 if realized as a conventional FIR lowpass filter. Comb filters with reduced effort or filters with a wider transition bandwidth can also be used. The principle that underlies the transposed Farrow structure is shown in Figure 7.6 (here with L ¼ 21, p ¼ 10, and r ¼ 3). 4. The filter has been designed with the windowed FIR-filter design algorithm provided by MATLAB, using a Kaiser window with b ¼ 3 and a cut-off frequency of fS =16.
228
Sample Rate Conversion in Software Configurable Radios
Figure 7.8 Transfer function magnitude of (a) a model filter and (b) a linearly interpolated model filter.
The L-times upsampling, the polynomial antialiasing filter, and the following model filter followed by the necessary downsampling are combined and implemented on the generalized transposed Farrow structure, avoiding any high intermediate sample rate. Once again, it should be stressed that the principle of both solutions is different. While the polynomial filter of the generalized conventional Farrow structure performs anti-imaging, the model filter must remove all potential aliasing components in advance. These components do not have to be attenuated in advance if the generalized transposed Farrow structure is employed. This is so because the polynomial filter of the generalized transposed Farrow structure performs antialiasing filtering. Still, the effort for the model filter cannot be saved. It is necessary to realize the filtering for the final decimation compensating the initial upsampling. If the model filter is the same in both cases, the effort for realizing both structures is similar.
Applications of SRC
229
7.5.5 Conclusion It can be concluded that the necessary antialiasing properties can be realized with: Polynomial antialiasing filters on the (generalized) transposed Farrow structure; Polynomial interpolated FIR filters on the generalized conventional or transposed Farrow structure. With respect to the application of fractional SRC (placed at a low sample rate) in a software-defined terminal for UMTS, IS-95, and GSM (according to Tables 7.1 and 7.3), the following effort is necessary: A third-order polynomial filter with eight polynomial pieces on the transposed Farrow structure (see the magnitude spectrum in Figure 7.5); A linear polynomial filter at an OSR of 32 (32 times the target rate, i.e., 8 4 ftarget ) combined with a 100-tap standard FIR filter5 on the generalized transposed Farrow structure. The first results in a transposed Farrow structure with 4 8 coefficients ci;j and three general purpose multipliers (see Figure 4.10). The latter requires one general-purpose multiplier for the linear polynomial filter and 2 d100=8e general-purpose multipliers for the time-varying coefficients. Moreover, 2 100 coefficients must be stored in memory. The denominator of 8 stems from the fact that the filter virtually runs at an eight-times higher rate than 4 ftarget (i.e, OSR of 32 for the signal of interest), and thus can exploit the typical savings of polyphase filters in terms of multipliers.
7.6 Time-Varying CIC Filters As mentioned in Section 5.4, CIC filters are a specific implementation of comb filters. Due to the relatively narrow stopbands, CIC filters are only applicable at high OSRs (i.e., first in a cascaded structure for SRC). 5. The filter has been designed with the windowed FIR-filter design algorithm provided by MATLAB, using a Blackman window and a cut-off frequency of fS =32. In contrast to Example 7.1, this 100-tap FIR filter does not need to perform perfect channel filtering. Hence, it does not need to have a very steep cut off, which eventually results in a smaller number of taps.
230
Sample Rate Conversion in Software Configurable Radios
All three applications of the example, GSM, IS-95, and UMTS, can be served with a second-order CIC filter (or third order, to be on the safe side with alternative fractional rate-change factors). In contrast to the direct implementation of comb filters (e.g., as transversal filters), CIC filters can be implemented by two adders and two registers (of the respective word length) per order. Employing them for fractional SRC, several coefficient multipliers and one general-purpose multiplier per order must be added (see Figure 6.4). Realizing a second-order time-varying CIC filter requires one coefficient and one general-purpose multiplier (see Figures 6.5 and 6.7); note that r0 ¼ 1. Shifting the differentiator from the input to the output results in a secondorder antialiasing CIC filter. Finally, it should be mentioned that the transfer characteristics of CIC filters can be approximated by implementing higher-order hold filters of the respective order on the conventional or transposed Farrow structure (see Section 5.2). In this case, the number of polynomial pieces equals the order of the CIC filter. Hence, a second-order CIC filter (i.e., a first-order polynomial can be realized with 2 2 coefficients ci; j and one general purpose multiplier.
7.7 Comparison of Methods for SRC From the previous discussions, the following candidates are compared in Table 7.4 with respect to the necessary effort of implementation: A second-order time-varying CIC filter running at fS ; A third-order time-varying CIC filter running at fS ; An optimized polynomial filter of third order with eight polynomial pieces (Figure 7.5) running at 4 ftarget , implemented on the transposed Farrow structure; An interpolated conventional 100-tap FIR filter running at 4 ftarget , implemented on the generalized transposed Farrow structure. In order to estimate the multiplication rate, the number of multipliers (general-purpose-plus coefficient multipliers) has been multiplied with the clock rate at which they run. It should be noted that parts of the system run at its input rate, and parts at the output rate. However, due to the limitation of the fractional rate-change factor (see Section 3.3) both rates are of the same order. Therefore fS or 4 ftarget can be used to estimate the multiplication rate, which can serve as a rough estimate for the implementation effort.
Applications of SRC
231
Table 7.4 Comparison of Filter Structure for Fractional SRC Running at 4 ftarget
Running at fS
CIC CIC Transposed Generalized (Second Order) (Third Order) Farrow Transposed Structure Farrow Structure Number of general-purpose 1 multipliers
2
3
27
Number of coefficient multipliers
1
3
32
–
Number of coefficients to store
1
3
32
200
Efforts for time-varying control
low
low
low
higher
Multiplication rate in multiplications per second (mps)
2 fS
5 fS
35 4 ftarget 27 4 ftarget
For GSM in Mmps
160
400
38
29
For IS-95 in Mmps
160
400
172
133
For UMTS in Mmps
160
400
538
415
Some obvious conclusions can be drawn from Table 7.4. The hardware effort for a certain implementation is, in principle, independent from the standard. This enables the realization of SRC for an arbitrary standard by simply changing parameters (coefficients) of an otherwise fixed hardware platform. If SRC is realized at 4 ftarget , the multiplication rate is directly proportional to the target rate. If SRC is realized at fS , the clock rate of the system for fractional SRC is independent from the selected air interface. The necessarily different SNRs are achieved by exploiting the different OSRs and the shape of the transfer function magnitude of antialiasing comb filters (bandwidth dynamic range trade-off [4, 8]). Thus, both hardware effort and multiplication rate are standard independent. If the OSR is low (UMTS case), both approaches, placing the system for fractional SRC at fS (with CIC filters) or at 4 ftarget (with polynomials filters), have similar multiplication rates. For narrowband systems, a considerable reduction of the multiplication rate can be achieved
232
Sample Rate Conversion in Software Configurable Radios
when implementing fractional SRC at a low sample rate, at the cost of an increased hardware effort, though. Once again, it should be stressed that the structures of all of the proposed systems are, in principle, independent from the rate-change factor. Hence, also rate-change factors different from those for the three selected air interfaces can be realized. Finally, it should be mentioned that implementing the system at fS enables it to run at a constant clock rate independent from the air interface. Solutions running at 4 ftarget make it necessary to clock the same system at different rates. However, the lower clock rates might allow the implementation of fractional SRC on a digital signal processor. Which approach to favor, comb filtering at fS or more sophisticated filtering at 4 ftarget , depends on the application. As an example, one could assume that GSM is intended to be a kind of basic service. The remaining services are extra. Such a weighting would surely favor the approach of placing fractional SRC at 4 ftarget because it has the lowest multiplication rate and thus lower power consumption in the case of GSM (the basic service). The extra services can be allowed to consume more power. It should be emphasized that the choice among different solutions for fractional SRC and the possible trade-off between hardware effort and multiplication rate has only become possible on the basis of the novel systems introduced in this book: the transposed Farrow structure and the time-varying CIC filters.
7.8 Summary In this chapter, we have applied several methods for fractional SRC to a software radio scenario. The main result is that there is no absolutely optimum solution. A trade-off between chip size and multiplication rate/ power consumption must be made. Hence, it is very important to understand the nature of different techniques for SRC to make the right choice for a given application. This is the intention of this book.
References [1]
Crochiere, R. E., and Lawrence R. Rabiner, Multirate Digital Signal Processing, Englewood Cliffs, NJ: Prentice-Hall, 1983.
[2]
Fliege, N. J., Multirate Digital Signal Processing: Multirate Systems, Filter Banks, Wavelets, New York: John Wiley & Sons, 1994.
Applications of SRC
233
[3]
Vaidyanathan, P. P., Multirate Systems and Filter Banks, Englewood Cliffs, NJ: Prentice Hall 1993.
[4]
Hentschel, T., M. Henker, and G. P. Fettweis, ‘‘The Digital Front-End of Software Radio Terminals,’’ IEEE Personal Communications, Vol. 6, No. 4, August 1999, pp. 40–46.
[5]
Prasad, R., and T. Ojanpera¨, ‘‘An Overview of CDMA Evolution: Toward Wideband CDMA,’’ IEEE Communications Surveys & Tutorials, electronically published journal of the IEEE Communications Society, 1998, http://www.comsoc.org/pubs/surveys/.
[6]
Hentschel, T., and G. P. Fettweis, ‘‘Software Radio Receivers,’’ in CDMA Techniques for Third Generation Mobile Systems, Francis Swarts et. al. (eds.), Vol. 487 of The Kluwer International Series in Engineering and Computer Science, Boston, MA: Kluwer Academic Publishers, 1999, pp. 257–283.
[7]
‘‘Digital Cellular Telecommunications System (Phase 2+),’’ Radio Transmission and Reception (GSM 05.05 version 5.9.0 Release 1996), European Telecommunication Standard pr ETS 300 910, July 1998. DRAFT.
[8]
Hentschel, T., and G. Fettweis, ‘‘The Digital Front-End — Bridge Between RF- and Baseband-Processing,’’ in Software Radio: Enabling Technologies, Walter Tuttlebee (ed.), Chichester, West Sussex, England: John Wiley & Sons Limited, 2002.
[9]
Hogenauer, E. B., ‘‘An Economical Class of Digital Filters for Decimation and Interpolation,’’ IEEE Transactions on Acoustics, Speech and Signal Processing, Vol. 29, No. 2, April 1981, pp. 155–162.
[10]
Henker, M., ‘‘Abtastratenanpassung in Software-programmierbaren Mobilfunkempfa¨ngern,’’ Master’s thesis, Technische Universita¨t Dresden — Fakulta¨t Elektrotechnik — Institut f€ ur Nachrichtentechnik, October 1998.
[11]
Vesma, J., ‘‘Optimization and Applications of Polynomial–Based Interpolation Filters’’, Ph.D. thesis, Tampere University of Technology, P.O.B. 527, FIN-33101, Tampere, Finland, May 1999.
8 Conclusions 8.1 Summary Digital communications standards are generally based upon different master clock rates. Thus: SRC is required in systems that process signals of different communications standards. In the context of software-defined radio, SRC must be realized digitally. SRC is a process of resampling. As in any sampling process, resampling causes aliasing and imaging. These two fundamental characteristics of sampling require filtering. Thus: The design of systems for SRC is mainly a filter design problem. Because aliasing is the very characteristic that can destroy the signal, antialiasing is the most important property of filters for SRC. In principle, filters for SRC run at intermediate clock rates, derived from the least common multiple of the two involved sample rates at the input and the output of the SRC system. Because the intermediate sample rates can be very high, a direct implementation of the necessary filtering operation is infeasible on a high intermediate sample rate. Time-varying structures provide a means of implementing SRC without intermediate sample rates. Transforming periodically time-varying systems to time-invariant block processing systems simplifies their analysis considerably. As to the realization of SRC, direct-block implementations are rarely 235
236
Sample Rate Conversion in Software Configurable Radios
applicable because the number of inputs and outputs is determined by the relationship between the input and the output sample rate. Thus, the same limitations as those for the direct implementation of the filter on the intermediate sample rate apply. Feasible implementations can be found by realizing the block structures in a time-varying manner (e.g., the well-known polyphase decimators and interpolators). Based on these time-varying realizations of block filters for integer factor SRC, systems for fractional SRC can be derived. There is potential for simplification in the reduction of the coefficient memory size by implementing computable impulse responses (e.g., polynomial filters). On the basis of block processing, the well-known Farrow structure has been derived, which also lead to a transposed structure. This novel structure has the advantage of providing a means to implement antialiasing polynomial filters, which is not possible with the conventional Farrow structure. Another class of filters for fractional SRC are time-varying CIC filters. Based on conventional CIC filters for integer factor SRC, they have been introduced by employing the raising technique of the block-processing framework.
For integer factor SRC, comb filters have been intensively investigated. The principal novelty in this respect is the introduction of time-varying recursive filters. These filters provide periodic comb-like transfer characteristics. Their advantage is that the transfer zeros of only one period (in frequency domain) have to be realized by a set of coefficients, which provides a means to reduce the hardware effort considerably. Thus, timevarying recursive filters are comb filters for integer factor SRC (decimation and interpolation) with reduced hardware complexity. The application example of Chapter 7 shows that simple comb filters (including CIC filters) are the most efficient solution to SRC of oversampled signals in terms of hardware effort. The lower the OSR is, the higher the effort for filtering. Hence, there is an advantage of placing fractional SRC at a high sample rate where the OSR is still very high. This simplifies the filters considerably. A benefit of placing fractional SRC at the lowest possible sample rate is a possibly very low multiplication rate, at the cost of an increased hardware effort, though.
Conclusions
237
The book was dedicated to structures for SRC. The goal was not to design impulse responses of filters. These can be found in the references given in the respective sections. Finally, it should be stressed that the techniques and methods presented in this book are not limited to software-radio applications.
8.2 SRC Questionnaire The goal of this section is to use all of the fundamental concepts presented in the previous chapters to implement a simple application. The application is not limited to software radio. The questionnaire can be followed step by step for designing a system for SRC. One of the fundamental ideas to recall is that antialiasing is the most important constraint to be obeyed. With this in mind, one should reply to the following questions when designing a system for SRC: 1. Is the conversion factor large (e.g., larger than 4)? If yes, a cascaded system is advantageous in many cases. Simple filters are employed at high sample rates (see Chapter 3). For each stage, the following questions must be answered. 2. Is the conversion factor fixed? If yes, all filters can be optimized to the conversion factor. Otherwise, filter structures that allow for tuning must be used (e.g., CIC filters, time-varying polyphase filters, or polynomial filters). 3. Is the sample rate to be increased or decreased? The result of sample rate increase is usually an oversampled signal (see Section 1.3.1) with all images removed, while the result of sample rate decrease can be a signal that comprises signal components that are of no interest and that can be removed by filtering after SRC. (a) In the case of sample rate decrease: Is the interesting component of the output signal noticeably (generalized) oversampled? If yes, antialiasing comb filters can be used that attenuate only relatively small frequency bands. Frequency components outside the interesting component may be destroyed. To remove these components after SRC, a conventional lowpass filter can follow. (b) In the case of sample rate increase: Is the output signal oversampled? If yes, it is necessary to remove all imaging components. Hence, anti-imaging filters must be used.
238
Sample Rate Conversion in Software Configurable Radios
4. In the case of rational/fractional SRC: (a) Is the input signal noticeably oversampled? If yes, conventional interpolation can be used. The interpolation filter attenuates all images and thus all aliasing components. (b) Is chip size most important? If yes, and if the output signal of fractional SRC is sufficiently oversampled, simple comb filters (time-varying CIC filters or low-order polynomial filters on the (transposed) Farrow structure) require minimum hardware effort (see Chapter 3).
Appendix: Derivations and Calculations A.1
Polyphase Decomposition of the Transfer Function
This section supports parts of Section 2.2.6. It reflects the derivation of the polyphase components of an arbitrary transfer function of a linear timeinvariant system. A linear time-invariant discrete system can be described by its state equation and output map according to (2.91). To calculate the discrete-time impulse response, the system is fed with a Kronecker impulse: zðk þ 1Þ ¼ A zðkÞ þ B dKr ðkT Þ hðkT Þ ¼ C zðkÞ þ D dKr ðkT Þ
(A.1)
Exploiting the nature of the Kronecker impulse as the input signal and supposing zð0Þ ¼ 0; the state vector can be derived for ðk ¼ 0; 1; 2; . . .Þ: zð1Þ ¼ B zð2Þ ¼ A B zð3Þ ¼ A 2 B .. . zðkÞ ¼ A k1 B
(A.2)
Thus, the following can be concluded: zðkN þ lÞ ¼ A kN þl1 B The first N samples of the impulse response are 239
ðA.3Þ
240
Sample Rate Conversion in Software Configurable Radios
( hðlT Þ ¼ hl ð0Þ ¼
D
if l ¼ 0
C A l1 B
if l ¼ 1; 2; . . . ; N 1
ðA.4Þ
The remaining samples of the impulse response and thus its polyphase components are: h ðkN þ lÞT ¼ hl ðk NT Þ ¼ C A kN þl1 B
for k ¼ 1; 2; . . . ðA.5Þ
¼ C A l Fðk 1Þ A N 1 B
for k ¼ 1; 2; . . . ðA.6Þ
with k FðkÞ ¼ A N
for k ¼ 1; 2; . . .
ðA.7Þ
being the fundamental matrix of the system with respect to A N . Thus, (2.92) is established from (A.4) and (A.5). Applying the z-transform to (A.4) and (A.6) leads to l
Hl ðzÞ¼C A zI A
N 1
A
N 1
B þ
( D
for l ¼ 0
C A l1 B for l¼1;2;...;N 1 ðA.8Þ
which eventually equals (2.93) and where the z-transform Zfg of the fundamental matrix FðkÞ is [1]: Z
n
AN
k o
1 ¼ FðzÞ ¼ z zI A N
ðA.9Þ
The system matrices of the N different systems realizing the polyphase components of S A; B; C ; D are (for l ¼ 0; 1; . . . ; N 1Þ Al ¼ A N Cl ¼ C A l
Bl ¼ A N 1 B ( D Dl ¼ C A l1 B
ðA.10Þ for l ¼ 0 for l ¼ 1; 2; . . . ; N 1
ðA.11Þ
Appendix: Derivations and Calculations
241
Only the output map depends on the current polyphase component, while the state equation is independent from l. Note that A n and FðkÞ (A.6) are commutative for n ¼ 0; 1; 2; . . . ðlikewise A n and FðzÞÞ. By using this fact, (A.4) to (A.6) can be rewritten in several ways: First, it is of interest to make Cl independent from l. By rewriting (A.6) to hl ðk NT Þ ¼ C A N 1 Fðk 1Þ A l B
for k ¼ 1; 2; . . .
ðA.12Þ
the system matrices become Al ¼ A N Cl ¼ C A N 1
Bl ¼ A l B D Dl ¼ C A l1 B
ðA.13Þ for l ¼ 0 for l ¼ 1; 2; . . . ; N 1 ðA.14Þ
Another formulation of (A.4) to (A.6) yields hl ðk NT Þ ¼ C FðkÞ A l1 B
for l ¼ 1; 2; . . . ; N 1
ðA.15Þ
1 l1 Hl ðzÞ ¼ z C zl A N A B for l ¼ 1; 2;. .. ; N 1
ðA.16Þ
whose z-transform is with (A.9)
The formulation of (A.16) will be used in Section A.3.
A.2
The Modulation Representation
This section supports parts of Section 2.2.7. We derive a relationship between the modulation components and the polyphase components of a signal. Because the impulse response characterizes a linear time-invariant system, the considerations discussed are also valid for LTI systems described by their impulse response. In order to derive (2.97), (2.79) is used toNreplace X ðzÞ in the definition of X ½M ðzÞ. It should be noted that w kN ¼ 1.
242
Sample Rate Conversion in Software Configurable Radios
2
½M
X0 ðzÞ
3
7 6 ½M 6 X ðzÞ 7 7 6 1 X ½M ðzÞ ¼ 6 7 . 7 6 .. 5 4 ½M XN 1 ðzÞ 3 2 NP 1 l z l wN0 Xl ð z N Þ 7 6 l¼0 7 6 7 6 NP 7 6 1 l 1 l z wN Xl ð z N Þ 7 6 7 6 ¼ 6 l¼0 7 7 6 . 7 6 .. 7 6 5 4 NP 1 N 1 l l N z wN Xl ð z Þ
ðA.17Þ
l¼0
2
1 61 6 6 ¼ 61 6. 4 .. 1
1 wN1 wN2 .. .
1 wN2 wN4 .. .
ðN 1Þ
2ðN 1Þ
wN
wN
3
2 ðN 1Þ 7 wN 7 6 2ðN 1Þ 7 6 wN 76 7 4 .. 5 .
wN
1
ðN 1Þ2
3 X0 ðz N Þ z 1 X1 ðz N Þ 7 7 7 .. 5 .
z ðN 1Þ XN 1 ðz N Þ
ðA.18Þ ¼ WN X ½P ðzÞ
ðA.19Þ
where WN is the DFT matrix [2] 2 1 1 1 6 1 wN2 wN 61 6 6 1 wN2 wN4 WN ¼ 6 6 6. .. .. 6 .. . . 4 1
ðN 1Þ
wN
2ðN 1Þ
wN
1
3
7 7 7 2ðN 1Þ 7 wN 7 7 7 .. 7 . 5 2 ðN 1Þ wN ðN 1Þ
wN
with the following important property: 1 WN1 ¼ WN N with WN being the conjugate transpose of WN . Equations (A.19) and (A.21) establish (2.97).
ðA.20Þ
ðA.21Þ
Appendix: Derivations and Calculations
A.3
243
The Raising Procedure
This section supports parts of Section 2.3.2.
A.3.1 The State-Space Description of Raised Systems First, based on (2.101) and (2.102), and (2.105) to (2.110)—that is, the state-space description of a raised system—should be proved. The following outline of a proof has been given in [3] and is given here for reasons of completeness: With respect to (2.99), the following can be concluded for an arbitrary input signal: zðkN þ 1Þ ¼ AkN zðkN Þ þ BkN xðkNT Þ zðkN þ 2Þ ¼ AkN þ1 zðkN þ 1Þ þ BkN þ1 x ðkN þ 1ÞT ¼ AkN þ1 AkN zðkN Þ þ BkN xðkNT Þ þ BkN þ1 x ðkN þ 1ÞT ¼ AkN þ1 AkN zðkN Þ þ AkN þ1 BkN xðkNT Þ þ BkN þ1 x ðkN þ 1ÞT zðkN þ 3Þ ¼ AkN þ2 zðkN þ 2Þ þ BkN þ2 x ðkN þ 2ÞT ¼ AkN þ2 AkN þ1 AkN zðkN Þ þ AkN þ2 AkN þ1 BkN xðkNT Þ þ AkN þ2 BkN þ1 x ðkN þ 1ÞT þ BkN þ2 x ðkN þ 2ÞT .. . zðkN þ l Þ ¼ AkN þl 1 AkN þ1 AkN zðkN Þ þ
l 2 X
AkN þl 1 AkN þiþ1 BkN þi x ðkN þ iÞT
i¼0
þ BkN þl 1 x ðkN þ l 1ÞT ; for 1 l N
ðA.22Þ
With (2.100), it can be written zðkN þ l Þ ¼ Al 1 A1 A0 zðkN Þ þ
l 2 X
Al 1 Aiþ1 Bi x ðkN þ iÞT
i¼0
þ Bl 1 x ðkN þ l 1ÞT ;
for 1 l N
ðA.23Þ
244
Sample Rate Conversion in Software Configurable Radios
For l ¼ N , it is z ðk þ 1ÞN ¼ AN 1 A1 A0 zðkN Þ N 2 X þ AN 1 Aiþ1 Bi x ðkN þ iÞT i¼0 þ BN 1 x ðkN þ N 1ÞT
ðA.24Þ
Equations (2.107) and (2.108), as well as the first part of (2.105), can be concluded with (2.106). The second part of 2.105 can be derived by substituting (A.23) into ðA.25Þ y ðkN þ l ÞT ¼ CkN þl zðkN þ l Þ þ DkN þl x ðkN þ l ÞT Setting ðl ¼ 0; 1; . . . ; N 1Þ one after another, and using (2.100), equations (2.109) and (2.110), as well as the second part of (2.105), result. This completes the proof. A.3.2 The Transfer Matrix of Raised Time-Invariant Systems In the following, (2.114) is derived. For a time-invariant system with Ak ¼ A
Bk ¼ B
Ck ¼ C
Dk ¼ D
the matrices A; B; C; D given by (2.107) to (2.110) are A ¼ A N B ¼ A N 1 B A N 2 B AB B 3 3 2 2 D 0 0 C 6 CA 7 6 CB D 0 7 7 6 6 2 7 7 7 6 6 CAB CB 0 CA D ¼ C¼6 7 6 .. .. .. 7 4 ... 5 4 . . . 5 N 1 N 2 N 3 CA CA B CA B D
ðA.26Þ
ðA.27Þ
Thus, with (2.112) and (A.9) the raised transfer matrix is: HðzÞ ¼ Cðz I A Þ1 B þ D 3 2 C 6 CA 7 7 6 N 1 N 1 7 A B ¼6 6 .. 7 z I A 4 . 5 CA N 1
A N 2 B AB B
Appendix: Derivations and Calculations
2
CA N 2 B 2
C z 1 FðzÞ A N 1 B
6 6 CA z 1 FðzÞ A N 1 B 6 ¼6 6 .. 6 . 4
3
0
0
D
07 7 7 07 7 .. 7 . 5
D
6 CB 6 6 CAB þ6 6 .. 6 4 .
245
CB .. . CA N 3 B
ðA.28Þ
D
C z 1 FðzÞ A N 2 B
CA z 1 FðzÞ A N 2 B
.. .
3
C z 1 FðzÞ B
7 CA z 1 FðzÞ B 7 7 7 7 .. 7 . 5
CA N 1 z 1 FðzÞ A N 1 B CA N 1 z 1 FðzÞ A N 2 B CA N 1 z 1 FðzÞ B 2 3 D 0 0 0 6 7 6 CB D 0 0 7 6 7 6 7 6 CAB CB D 07 ðA.29Þ þ6 7 6 7 . . .. 7 .. 6 6 . .7 . 4 5 CA N 2 B CA N 3 B CA N 4 B D
Equation (2.114) is established by applying (A.8) and (A.9) to the lower triangle, and (A.16) to the upper triangle of (A.29).
A.4
Time-Varying Comb Filters
This section supports parts of Section 5.5.
A.4.1 Time-Varying Differentiator The transfer matrix of the time-varying differentiator (given in (5.24)) is derived. For this purpose, (5.21) can be written with (5.22) and (5.23) 1 HD ðzÞ ¼ I þ FðzÞ GðzÞ FðzÞ 2
1 þ G0 ðzÞ
z 1 GN 1 ðzÞ
z 1 GN 2 ðzÞ
0
0
0
ðA.30Þ z 1 G1 ðzÞ
31
7 6 0 1 0 0 7 6 ¼6 7 4 . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1
246
Sample Rate Conversion in Software Configurable Radios
2
3 1 0 0 6 0 0 0 7 7 6 4 . . .. . .. . . . . . . . . . . . 5 0 0 0
2
3 1 0 0 6 0 0 1 0 7 7 Qi;j ðzÞ 6 ðA.31Þ ¼ 4 . . .. . .. . . . . . . . . . . . 5 detðI þ FðzÞ GðzÞÞ 0 0 0 with Qi;j ðzÞ being the matrix of cofactors of the elements of det I þ FðzÞ GðzÞ : Equation (A.31) can be simplified to: 3 2 Q1;1 0 0 6 Q1;2 0 0 7 1 7 ðA.32Þ HD ðzÞ ¼ 6 1 þ G0 ðzÞ 4 . . . . . . . . . . . . . . . . . . 5 Q1;N 0 0 3 2 1 0 0 6 0 0 1 0 7 7 ¼ ðA.33Þ 6 4 . . .. . .. . . . . . . . . . . . 5 1 þ G0 ðzÞ 0 0 0 which establishes (5.24). (Equation (A.33) is established from (A.32) by means of calculating the Q1;i for i ¼ 1; 2; . . . ; N .) A.4.2 Second-Order Case To derive the transfer matrix of a second-order time-varying differentiator, the state-space matrices of G ðzÞ are employed. They are (see Figure 5.9): 1 0 1 Að2;2Þ ¼ Bð2;1Þ ¼ 1 1 0 ðA.34Þ Cð1;2Þ ¼ ½ c1 þ c0
c0
Dð1;1Þ ¼ 0
Thus, with (A.8), G0 ðzÞ is 1 N 1 G 0 ðzÞ ¼ CA 0 zI A N A B þD 1 1 z 1 0 ¼ ½ c1 þ c0 c0 N 1 N z 1
0 1
1 0
Appendix: Derivations and Calculations
¼ ½ c1 þ c0 ¼
" #" z 1 0 1 1 c0 2 ðz 1Þ N z 1 N 1
247
0
#" # 1
1
0
z ðNc0 þ c1 Þ c1 ðz 1Þ2
ðA.35Þ
Hence, with (A.33), it is 2
3 1 0 0 6 0 0 1 0 7 7 HD ðzÞ ¼ 6 4 . . .. . .. . . . . . . . . . . . 5 1 þ G0 ðzÞ 0 0 0 2 3 1 0 0 6 0 0 0 7 ðz 1Þ2 6 7 ¼ 6 7 2 ðz 1Þ þ z ðNc0 þ c1 Þ c1 4 . . .. . .. . . . . . . . . . . . 5 0 0 0
ðA.36Þ
With c1 ¼ 1
c0 ¼
1 N
the poles of HD ðzÞ are both zero, which eventually establishes (5.25).
A.4.3 R th-Order Case It is shown that the behavior of CIC filters of arbitrary order R can be realized on sigma-delta-like structures. The starting point is (5.35) ðz 1ÞR þ C Q ðzÞ A N 1 B ¼ z R where Q ðzÞ is the adjoint matrix of A N . It is given by [4] Q ðzÞ ¼ Q 0 z R1 þ Q 1 z R2 þ þ QR1
ðA.37Þ
with Qk ¼
I k k1 ðA N Þ p1 ðA N Þ pk I
if k ¼ 0 if k ¼ 1; 2;. .. ; R 1
ðA.38Þ
248
Sample Rate Conversion in Software Configurable Radios
where pk are the coefficients of the characteristic polynomial of A N , which is given as DðlÞ ¼ det lI A N ¼ ðl 1ÞR
ðA.39Þ
¼ lR p1 lR1 p2 lR2 pR In the specific case of an integrator section, the pk are given by the binomial coefficients k1
pk ¼ ð1Þ
R ; k
k ¼ 1; 2; . . . ; R 1
ðA.40Þ
Thus, the left-hand side of (5.35) can be rewritten as ðz 1ÞR þ C Q ðzÞ A N 1 B R R1 R R2 R z þ z þ 1 þ C Q ðzÞ A N 1 B ¼ z R ¼ z 1 2 ðA.41Þ which leads to C Q ðzÞ A
N 1
R R1 R R2 B¼ z z þ 1 1 2
ðA.42Þ
With (A.37) and (A.38), it is C Q0 z R1 þ Q1 z R2 þ þ QR1 A N 1 B R R2 R R1 z þ 1 ¼ z 2 1
ðA.43Þ
Comparing coefficients leads to C Qk A
N 1
B ¼ ð1Þ ¼ ak
k
R k þ1
for k ¼ 0; 1; . . . ; R 1
ðA.44Þ
Appendix: Derivations and Calculations
249
Substituting (5.27) C ¼ ½ cR1
cR2
c0 A
into (A.44), and taking into account that Qk and A are permutable, a system of R equations is given. Hence, the R coefficients of C can be calculated. ½ cR1 ¼ ½ a0
cR2 a1
c 0 Q0 A N B aR1
Q1 A N B
QR1 A N B
ðA.45Þ There is exactly one solution for C if and only if the determinant of the system of equations is different from zero. det Q0 A N B
Q1 A N B
6 0 QR1 A N B ¼
ðA.46Þ
This is equivalent to the rank of this matrix being equal to its dimension R. Still, the rank of a matrix is not changed if integer multiples of one column are added to other columns. Hence, with (A.38), the condition of (A.46) can be reformulated as det A N B
2
ðA N Þ B
R 6 0 ðA N Þ B ¼
ðA.47Þ
The rank of a matrix equals its dimension if all column vectors are linearly independent, thus 2 R a0 A N B þ a1 A N B þ þ aR1 A N B 6¼ 0
ðA.48Þ
for any solution ak , k ¼ 0; 1; . . . ; R 1 except the trivial one. (A.48) can be interpreted as an Eigenvalue problem. With A N being nonsingular, it can be written: 2 R1 B 6¼ a0 B a1 A N þ a2 A N þ þ aR1 A N |fflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl}
ðA.49Þ
A^
The Eigenvalues ða0 Þ of A^ can be calculated as follows. det a0 I þ A^ ¼ 0
ðA.50Þ
250
Sample Rate Conversion in Software Configurable Radios
leading to one Eigenvalue of order R at: a0 ¼ a1 þ a2 þ þ aR1
ðA.51Þ
Finally, in order to fulfill (A.49), it has to be shown that B is not an Eigenvector of A^. In order to show this, the following fact will be exploited. Taking (5.29) and exchanging A by A^, and moreover substituting z by the Eigenvalues of A^ yields: Any column of QA^ ða0 Þ that is not zero is an Eigenvector of A^ with respect to the Eigenvalue ða0 Þ (see also [4]). By using (A.51), it is 1 QA^ ðlÞ ¼ det lI A^ lI A^ 2
ðl þ a0 ÞR1 6 6 6 ¼6 6 .. 4 .
0 ðl þ a0 ÞR1 .. .
0 0 0
.. .
0 0 0 .. .
ðl þ a0 ÞR1
0 6 6 Q A^ ða0 Þ ¼ 6 6. 4 ..
0 0 .. .
0 0 0
2
3 0 07 7 07 .. .7 . .. 5 0
ðA.52Þ 3 7 7 7 7 7 5
ðA.53Þ
ðA.54Þ
where ðÞ is a placeholder for a matrix element that is not necessarily zero. Because B (see (5.27)) or any multiple of it is not a column vector of QA^ ða0 Þ, (A.54) reveals that B is not an Eigenvector of A^. Hence, (A.49) holds and thus (A.46). This means that there is exactly one solution to (A.45).
A.5
Simplification of the State Equation of Time-Varying CIC Filters
This section supports parts of Section 6.3.3. In order to show that (6.46) or (6.50) can be fulfilled for any vectors B or C, respectively, (6.40) should be solved for U first. It is supposed that A and thus, A L are known. A ¼ U 1 A L U
ðA.55Þ
Appendix: Derivations and Calculations
251
0 ¼ AL U U A
ðA.56Þ
Equation (A.56) is a two-term matrix equation that can be solved by means of expanding the R 2 equations, which leads to Eu ¼ 0 with the expanded rows u i of 2 u1;1 6 u2;1 6 U ¼6 . 4 .. uR;1
ðA.57Þ
u1;2 u2;2 .. .
uR;2
uR;R
u1;R u2;R .. .
3
3 u1 7 6 u2 7 7 6 7 7 ¼ 6 .. 7 5 4 . 5 2
uR
ui;2 ui;R 2 T3 u1 6 u T2 7 6 7 u¼6 . 7 4 .. 5
u i ¼ ½ ui;1
ðA.58Þ
u TR The expansion matrix of order R 2 R 2 can be found by inspection: 3 2 F 0 0 0 6 L1 F 0 0 7 7 6 6 L2 L1 F 07 ðA.59Þ E ¼6 7 6 .. .. .. .. 7 5 4 . . . . LR1 LR2 LR3 F Equation (A.59) is a block-matrix representation with 3 2 0 1 1 1 6 0 0 1 1 7 7 6 6 F ¼6 0 0 0 1 7 7 4 . . . . . . . . . . . . . . . . .. . . . . . . . . 5 0 0 0 0
ðA.60Þ
and Li ¼ ci IðRÞ where ci are the elements of A L in (6.24).
ðA.61Þ
252
Sample Rate Conversion in Software Configurable Radios
Because E is of lower block-triangular structure, (A.57) can be solved by starting with the first R equations, thus solving for u 1 , and then proceeding with solving for u 2 , and so on: The solution has the following structure 3 2 u1;1 0 0 0 6 u2;1 0 0 7 7 6 07 ðA.62Þ U ¼6 7 6 u3;1 4 . . .. . . . . . . . . . . . . . . . 5 uR;1 The ui;1 are R parameters while ðÞ represents an element that can be derived from the ui;1 . As an example, the main-diagonal elements are given: ui;i ¼ ðc1 Þi1 u1;1
for i ¼ 2; . . . ; R
ðA.63Þ
Due to the structure of E , it turns out that the elements ðÞ of any row i of U depend solely on the elements of the previous rows 1; 2; . . . ; i 1: Hence, by successively choosing the R parameters ui;1 , starting with u1;1 , any vector B or C T can fulfill (6.46) or (6.50), respectively. Because U must be nonsingular, u1;1 must not be zero.
References [1]
Wunsch, G., and H. Schreiber, Analoge Systeme, Berlin, Germany: Springer-Verlag, 1993.
[2]
Schu¨ßler, H. W., Digitale Signalverarbeitung 1, Analyse diskreter Signale und Systeme, Berlin, Germany: Springer-Verlag, 1994.
[3]
Feuer, A., and G. C. Goodwin, Sampling in Digital Signal Processing and Control, Boston, MA: Birkha¨user, 1996.
[4]
Gantmacher, F. R., The Theory of Matrices, New York: AMS Chelsea Publishing, 1998.
Symbols and Abbreviations A/D/A
Analog–digital–analog (interface)
ADC
Analog-to-digital converter
ASIC
Application-specific integrated circuit
CDMA
Code division multiple access
CIC
Cascaded-integrator comb (filter)
CORDIC
Coordinate rotation digital computer
DAC
Digital-to-analog converter
DFE
Digital front end
DFT
Discrete Fourier transform
DTFT
Discrete-time Fourier transform
DSP
Digital signal processor
FDD
Frequency division duplex
FDMA
Frequency division multiple access
FFT
Fast Fourier transform
FT
Fourier transform
FIR
Finite-length impulse response
FPGA
Field-programmable gate array
GOSR
Generalized oversampling ratio
GSM
Global System for Telecommunications 253
254
Sample Rate Conversion in Software Configurable Radios
GSps
Billion samples per second (gigasamples per second)
IF
Intermediate frequency
IIR
Infinite-length impulse response
IS-95
North-American Spread Spectrum Telecommunications System Standard
kSps
Thousand samples per second (kilosamples per second)
LNA
Low noise amplifier
LO
Local oscillator
LPTV
Linear periodically time varying
LTI
Linear time invariant
MIMO
Multiple-input multiple-output
Mmps
Million multiplications per second (megamps)
mps
Multiplications per second
MSps
Million samples per second (megasamples per second)
NTF
Noise transfer function
OFDM
Orthogonal frequency division multiplexing
OSR
Oversampling ratio
PSD
Power spectral density
RF
Radio frequency
Rx
Receiver
SDM
Sigma-delta modulator
SISO
Single-input single-output
SNR
Signal-to-noise ratio, often: signal-to-quantizationnoise ratio
SRC
Sample rate conversion
STF
Signal transfer function
Symbols and Abbreviations
255
Tx
Transmitter
UMTS
Universal Mobile Telecommunications System
W-CDMA
Wideband CDMA
SD
Sigma-delta (in conjunction with modulator, decimator, and interpolator)
DTFTfg
Discrete-time Fourier transform of fg
FTfg
Fourier transform of fg
Zfg
z-transform of fg
dKr ðnÞ
Kronecker impulse
dðt Þ
Dirac impulse
Z Kr ðn; M Þ Z f ; T1
M -times upsampled Kronecker impulse train
xðÞ
Dirac impulse train (with T1 distance between impulses) Time-domain input signal vector of a system
yðÞ
Time-domain output signal vector of a system
X ðzÞ
z-domain input signal vector of an LTI system
Y ðzÞ
z-domain output signal vector of an LTI system
zðkÞ
Discrete-time domain state vector of a linear system
zðkÞ
Discrete-time domain state vector of a linear system
xðk NT Þ
Discrete-time domain input signal vector of a block system
yðk NT Þ
Discrete-time domain output signal vector of a block system
XðzÞ
z-domain input signal vector of an LTI block system
YðzÞ
z-domain output signal vector of an LTI block system
zðkÞ
Discrete-time domain state vector of a linear block system
h½i ðt Þ
ith piece of a piecewise-defined impulse response
256
Sample Rate Conversion in Software Configurable Radios
xl ðk NT Þ ½P
lth normalized polyphase component
xl ðkT Þ
lth polyphase component
Xl ðzÞ
lth normalized polyphase component of X ðzÞ
½P Xl ðz Þ
lth polyphase component of X ðzÞ
X ½P ðzÞ
Column vector of all polyphase components of X ðzÞ
XðzÞ
Column vector of all normalized polyphase components of X ðzÞ
½M
Xk ðzÞ
kth modulation component of X ðzÞ
X ½M ðzÞ
Column vector of all modulation components of X ðzÞ
LðzÞ
See (2.90)
0ðL;M Þ
Zero-matrix of size L M
IðLÞ
Identity matrix of order L
^ IðLÞ
Counteridentity matrix of order L
J
Jordan matrix
WN
DFT matrix of order N
FðkÞ
Fundamental matrix of a discrete-time LTI system (time domain)
FðzÞ
Fundamental matrix of a discrete-time LTI system (z domain)
A; B; C ; D
System matrices (state-space description) of a linear system
H ðzÞ; F ðzÞ; G ðzÞ
Transfer matrices (or transfer functions) of LTI systems
H½B ðzÞ
Block-transfer matrix of a system with generally a different number of inputs and outputs
H ½M ðzÞ
Aliasing component matrix (modulation matrix)
U
Controllability matrix of a linear system
V
Observability matrix of a linear system
Symbols and Abbreviations
257
P
Matrix
A; B; C; D
System matrices (state-space description) of a raised (block-processing) linear system
H½up ; H½down
Block-transfer matrices of an upsampler and a downsampler
HðzÞ; FðzÞ; GðzÞ
Transfer matrices of LTI-block systems
U
Controllability matrix of a linear block system
V
Observability matrix of a linear block system
OSR
Oversampling ratio
L
Upsampling factor (integer)
L0
Upsampling offset (integer)
M
Downsampling factor (integer)
M0
Downsampling offset (integer)
N
Period of a periodically time-varying system, general integer rate-change factor or number of pieces of a piecewise impulse response
l; lm
Number of a certain polyphase component, integer intersample position in an upsampled signal
m; mm
Intersample position
T
General sampling period
T0
Intermediate high sampling period upsampling, before downsampling)
T1
Input sampling period
T2
Output sampling period
fS
Sample rate
ftarget
Target rate of SRC (symbol or chip rate of a certain mobile communications standard)
D
General length of polynomial pieces (usually equal to LT0 or MT0 )
(after
258
Sample Rate Conversion in Software Configurable Radios
wNk
Elements of the DFT matrix (see (2.94))
Nþ
Set of positive natural numbers (natural numbers without zero)
Q
Set of rational numbers
R
Set of real numbers
RnQ
Set of irrational numbers (set of real numbers without set of rational numbers)
Z
Set of integer numbers
Indicates that left-hand side is proportional to the right-hand side
:¼
Indicates that the the left-hand side is defined by the right-hand side
bc x ðmod yÞ
Floor operation (rounds ðÞ to the nearest integer towards minus infinity) Modulo operation, remainder j k after integer division (i.e., (x mod yÞ ¼ x xy y with x; y 2 R and y 6¼ 0)
AT
Transpose of matrix A
A
Conjugate transpose of matrix A
ðzI AÞþ
Adjoint matrix of A, ðzI AÞ ðzI AÞþ ¼ detðzI AÞ I
lcmða; bÞ
Least common multiple of a; b 2 Nþ
minða; bÞ
Minimum of a and b
sincðt Þ
Sinc function sincðt Þ ¼ sinptðpt Þ
About the Author Dr. Tim Hentschel received his M.Sc. in electrical engineering from King’s College London, University of London, United Kingdom, and Technische Universita¨t Dresden, Germany, in 1993 and 1995, respectively. In 2001, he received his Ph.D./Dr.-Ing. from Technische Universita¨t Dresden. From 1995 to 1996, he worked with Philips Communications Industries, Nu¨rnberg, Germany. Since May 1996, he has been with the Vodafone Chair for Mobile Communications Systems of Technische Universita¨t Dresden. His research interests include software radio, specifically the design and investigation of digital signal processing algorithms for reconfigurable front ends.
259
Index Anti-imaging defined, 37 filters, 48, 222 with Lagrange-polynomial filters, 124 Applications, 25, 211–32 air interface parameters, 213 CIC filters, 229–30 comparison of methods, 230–32 conventional filters, 216–19 parameters for SRC fractional part, 215, 216 polynomial filters, 219–29 scenario, 212–13 scenario illustration, 212 summary, 232 Application-specific integrated circuits (ASICs), 2
Alias component matrix, 70, 80 Aliasing, 35, 79 attenuation, 38, 221 band power spectral density, 184 bands, 221 cause, 42 components, 35–36, 37, 81 defined, 9, 10 error, 43 periodic poles through, 177 potential cause of, 35 Analog-digital-analog (A/D/A) interface, 7 Analog-to-digital conversion, 7–20 conclusion, 20 quantization, 10–16 sampling, 8–10 sigma-delta modulation, 16–20 steps, 8 Analog-to-digital converters (ADCs), 3 high-resolution, 6 memoryless, 15 performance, 7 sigma-delta, 16 Antialiasing, 35 conventional Farrow structure, 222 generalized Farrow structure, 226–28 importance, 235 Lagrange-polynomial filters, 124 polynomial filters, 229 prototype, 217 Antialiasing filters, 35 polynomial, 136 tolerance scheme, 87
Bandpass decimation, 52 Bandwidth in application scenario, 212 channel, 91 dynamic trade off, 216 reduction of, 4–5 relative, of passband/aliasing band, 214 transition, 90, 227 Bifrequency system function defined, 79 magnitude of sample rate converter, 81 Block-diagonal matrix, 171 Block filtering, 71–75 concept illustration, 74 IIR filters, 189 multirate systems and, 71–75 261
262
Sample Rate Conversion in Software Configurable Radios
Block filtering (continued) polyphase structures and, 188–90 SRC interpretation by, 188 Block filters, 189–90 illustrated, 190 structures realizing, 190 time-varying realizations of, 236 Block processing, 236 for reducing sample rate, 107 systems, 82 Block-transfer matrix, 73 calculation, 80, 154 CIC decimator, 153 generalized recursive multirate filter for interpolation, 172 Boxcar filters, 144 Cardinal series, 31 Cascaded comb filters, 145–47 Cascaded-integrator-comb (CIC) filters, 95, 147–55 application, 229–30 comb section, 149 derivation, 147 differentiator section, 160 downsampler, 160 first-order, 153 for fractional SRC, 197–98 at high OSRs, 229 structure of, 147–49 time-varying, 197–208 transfer characteristics, 176, 230 See also Comb filters Channel filtering, 23–24 Channelization, 22–25 channel filtering, 23–24 despreading, 24 digital downconversion (DDC), 22–23 multiple-channel reception, 24–25 single-channel reception, 24–25 CIC decimators block transfer matrix, 153 comb section, 149 illustrated, 148 noise shaping with, 149–52 raising, 153–55
second-order, 150, 153, 154 transfer matrix, 155 turning into CIC interpolator, 161 See also Cascaded-integrator-comb (CIC) filters CIC interpolators, 152 CIC decimators turning into, 161 differentiator, 160 illustrated, 148 See also Cascaded-integrator-comb (CIC) filters Clock rate, 230 defined, 89 lower, 232 Coefficients comparing, 248 computing from one polyphase component, 113–24 of generalized Farrow structure, 140 nonrecursive filters, 111–13 polynomial, 112, 127 recursive filters, 111 size reduction, 110–13, 196 time-varying, 130 Comb filters, 143–85 basic considerations, 143–45 boxcar, 144 cascaded, 145–47 CIC, 147–55 continuous-time impulse response, 221 defined, 143–44 introduction, 143 pole-zero plot of, 145, 146 with separated integrator section, 147 time-varying, 245–50 Continuous-time digital filters, 39 Continuous-time impulse response, 111, 114, 220 of comb filter, 221 of polynomial filters, 222 See also Impulse responses Continuous-time integrate-and-dump circuits, 42 Controllability matrix, 157 calculating, 104 determining, 189
Index
matrix derived from, 106 See also Observability matrix Conventional filters, 216–19 characteristics, 218 conclusion, 219 direct-block implementation, 217 direct implementation, 216 time-varying polyphase/block implementation, 217–18 See also Applications Conversion factor, 86–89 CORDIC, 112 Counter-identity matrix, 104 Decimation bandpass, 52 cascaded comb filter for, 147 generalized recursive multirate filters for, 173–75 integer-band, 52 interpolated FIR filters for, 136 overall rate conversion and, 217 with polynomial filters, 122 transposed Farrow structure for, 125 Decimators, 74 CIC, 148, 149–52 defined, 49 generalized recursive multirate, 166, 167 linear polynomial, 123 polynomial polyphase, 121 polyphase, 193–96 second-order, 156–58 second-order generalized recursive multirate, 183 second-order time-varying, 183 sigma-delta, 156 Delta-sigma interpolator, 161 Despreading, 24 Digital downconversion (DDC), 22–23 defined, 22 simplification, 23 Digital front end (DFE), 6 Digital signal processors (DSPs) devices, 6 MAC units of, 93 Digital-to-analog converters (DACs), 7, 48
263
Dirac impulses, 8, 9 sifting property, 77 train, 9, 10, 79 T-shifted, 9 Direct approach, 99–100 def ined, 100 systems for fractional SRC, 187–88 Direct-block implementation, 217 Direct form FIR filters, 103 Direct implementation, 216 Discrete Fourier transform (DFT) filter bank, 24 matrix, 70 Discrete-time antialiasing impulse response, 222 Discrete-time Fourier transform (DTFT), 45 Downconversion digital (DDC), 22–23 point of, 22 Downsamplers, 50 defined, 45 LMJ samples, 72 output, 191 polyphase interpolator followed by, 191–93 as resamplers, 50 time-varying nature of, 50 See also Upsamplers Downsampling factor, 72 matrices, 101, 106, 201 M-times, 51 with offset, illustrated, 54 with phase offset, 52 preceded by filtering, 100 Eigenvalues, 249–50 Equidistant sampling, 8, 21 Expansion matrix, 251 Farrow structure, xii defined, 117 deriving, 118 generalized, 130, 136, 139 for interpolation, 125 for interpolation with piecewise polynomial filters, 117
264
Sample Rate Conversion in Software Configurable Radios
Farrow structure (continued) for irrational factor SRC, 209 of linear interpolator, 118–19 polynomial filters, 220–23 with time-varying coefficients, 130 transposed, 121–22, 123, 224–25 Fast Fourier transform (FFT), 25 Field programmable gate arrays (FPGAs), 23 Filters antialiasing, 35, 87, 136 anti-imaging, 48, 222 block, 189–90, 236 boxcar, 144 CIC, 95, 147–55, 197–208, 229–30 comb, 143–85 conventional, 216–19 FIR, 90, 107–8, 135–36, 152–53, 190 generalized recursive multirate, 165–85 higher-order, 161–64 IIR, 189, 218 interpolation, 38, 48, 100 model, 124, 136, 139, 228 nonrecursive, 103–6, 108–10, 111–13, 196 passband width of, 91 polynomial, 116–19, 133–40, 219–29 polynomial-like, 134 polyphase, 100–113, 133–40 recursive multirate, 155–65 time-invariant digital, 45 transfer function magnitude, 96 FIR filters, 90 block, 190 direct form, 103 frequency-sampling structure, 152–53 interpolated, 135, 136, 140 L-raised, 104 M-raised, 108 realization on periodically time-varying systems, 113–40 sample rate increase with, 107 Floor operation, 126, 127, 129
Fourier transform, 31 discrete (DFT), 24 discrete-time (DTFT), 45 fast (FFT), 25 Fractional rate-change factor, 187, 211 Fractional SRC before integer factor SRC, 96 CIC filters for, 197–98 conversion factor, 86–89 filter structure comparison for, 231 first in cascade, 92 at high sample rate, 92–93, 215 implementation, 87 at low sample rate, 215, 232 parameters, 215, 216 solutions, 209–10, 232 system behavior, 194–95 system characteristics, 195–96 systems, 187–210 Frequency behavior of discrete-time systems, 69 generalized recursive multirate filters for decimation, 173–75 generalized recursive multirate filters for interpolation, 172–73 of raised systems, 69–71 Frequency division multiple access (FDMA), 4 Full-band digitization defined, 4 signal processing, 6 Fundamental matrix, 240 Generalized Farrow structure, 139 antialiasing with, 226–28 coefficients of, 140 defined, 130 for interpolation, 140 introduction, 136 polynomial filters, 224–28 transposed, 136 See also Farrow structure Generalized oversampling ratio (GOSR ), 15–16 after SRC process, 85 approaching one, 91
Index
defined, 85 high, 85, 93 low, 91, 93 number of coefficients and, 92 See also Oversampling ratio (OSR ) Generalized recursive multirate decimator, 166, 167 Generalized recursive multirate filters, 165–85 for decimation, 173–75 design example, 181–85 designing, 172–85 design procedure, 180–81 for integer factor SRC, 172 for interpolation, 172–73 motivation, 165 optimal solutions, 212 passband characteristics, 171 perfect pole-zero cancellation, 179–80 second-order, 181 transfer characteristics, 175, 179 widening stopbands, 176 See also Recursive multirate filters Generalized recursive multirate interpolator, 166, 167 Global system for telecommunications (GSM), 3, 86 Heterodyne receiver concept, 5 Higher-order boxcar filters, 144 Higher-order hold filters, 144 Higher-order integrate-and-dump circuits, 164–65 Higher-order systems, 161–64 based on SDM structure, 162 integrator section, 162 polyphase components, 162–63 IIR filters, 189, 218 Images, 10 Imaging, 79 anti-, 37, 48, 222 defined, 10 Impulse responses of 801-tap filter, 138 approximating, by piecewise polynomials, 115, 126
265
continuous-time, 111, 114, 220 different, 220 discrete-time antialiasing, 222 of filters, 58–60 interpolated, 136 of interpolated FIR filter, 140 length, 114 linear interpolator, 118, 119 of model filter, 139 partitioning, 114 polynomial, 115 polyphase components of, 58 prototype, 115 types of, 111 Integer-band decimation, 52 Integer factor SRC, 45–52, 88 application issues, 99–100 conversion factor, 86–89 defined, 45–47 direct approach, 99–100 fractional SRC before, 96 implementation, 87 literature, 212 sample rate increase, 47–49 sample rate reduction, 49–52 scaling factor and, 49 special systems for, 143–85 systems for, 99–141 Integrate-and-dump circuits, 164–65, 202 Integrator section L-raised, 199 raising, 198–204 realization, 202 state-space description, 198 See also Cascaded-integrator-comb (CIC) filters; Time-varying CIC filters Interpolated FIR filters for decimation, 136 defined, 135 impulse response, 140 magnitude spectrum, 140 See also FIR filters Interpolation defined, 36 generalized Farrow-structure for, 140
266
Sample Rate Conversion in Software Configurable Radios
Interpolation (continued) generalized recursive multirate filters for, 172–73 L-times, 134 piecewise polynomial, 36 polyphase filter structures for, 82 problem, 36 spline, 36 Interpolation filters, 38 gain factor, 48 input signal, 100 Interpolators CIC, 148, 152 defined, 45, 47 delta-sigma, 161 generalized recursive multirate, 166, 167 linear, 118–19 polynomial, 136 polyphase, 121, 191–93 second-order, 158–61 Intersample position, 32, 118 Irrational factor SRC, 38–43, 208–9 defined, 38–39 Farrow/transposed Farrow structures for, 209 illustrated, 43 raising systems for, 68 realization of, 43 residual, 42 steps, 42 Irrational rate-change factor, 41, 42 approximation error, 41 approximation of, 208, 209 See also Rate-change factor Kronecker impulse, 49 exploiting nature of, 239 system feed with, 239 train, 50 Lagrange-polynomial filters antialiasing with, 124 anti-imaging with, 124 third-order piecewise, 223 See also Polynomial filters Linear interpolator, 118–19 Farrow structure, 119 impulse response, 119
transfer function magnitude, 119 See also Interpolators Linear periodically time-varying (LPTV) systems, 61–71 analyzing, 62 block representation, 141 LTI relationship characteristics, 65 transforming, to LTI systems, 62 transforming with raising procedure, 62–71 Linear time-invariant (LTI) systems, 62 LPTV systems relationship characteristics, 65 N-periodic, 70 polyphase components, 101 raising, 66–68 SISO system, 66, 68 Magnitude spectrum of 801-tap filter, 138 of interpolated FIR filter, 140 MATLAB, 94, 137 Model filter, 124 impulse response of, 139 linearly interpolated, 228 sequential order of, 136 transfer characteristics, 136 transfer function magnitude of, 228 Modulation components, 60–61 combining, 60 upsampled, 76 Modulation matrix, 173–74 Modulation representation, 60–61, 241–42 Modulo operation, 126, 129 Multiplication rate defined, 89–90 reduction of, 231 Multirate systems block filtering and, 71–75 frequency behavior, 76–82, 77 frequency characteristics, derivation of, 71 output signal spectrum, 77 raising, 68–69 with rational SRC factor, 79
Index
Noise shaping with CIC decimators, 149–52 SDMs, 17, 155, 156 Nonrecursive filters block implementation, 108 coefficients, 111–13 state-space reduction with, 103–6, 108–10, 196 Normalized polyphase components, 56, 57, 59, 101 lth, 129 defined, 56 in vectors, 57 z-transform, 107 See also Polyphase components Observability matrix, 109, 157 calculating, 157 determining, 189 See also Controllability matrix Orthogonal frequency division multiplex (OFDM), 4 Oversampling effect illustration, 14 by factor OSR, 15 generalized, 15, 19 Oversampling ratio (OSR ), 211 defined, 14 generalized (GOSR ), 15–16, 85 low, 231 of signals, 85–86 Parallelization, 100–113 Partial-band digitization, 4–6 bandwidth reduction, 4, 5 consequence of, 5 defined, 4 signal processing, 6 Periodic poles, 177–78 Periodic sinc function, 145 Piecewise polynomial filters, 112 Farrow structure for interpolation with, 117 sample rate increase, 116–19 sample rate reduction, 119–24 See also Polynomial filters
267
Piecewise polynomials approximating impulse response by, 115 interpolation, 36 length, 126 Pole-zero cancellation, 179–80 Polynomial coefficients, 112, 127 Polynomial filters, xii, 36, 38, 219–29 alternative interpretation of, 133–40 antialiasing, 136, 229 conclusion, 229 continuous-time impulse responses of, 222 decimation with, 122 Farrow structure, 220–23 generalized Farrow structure, 224–28 interpolated FIR, 229 Lagrange, 124 linear, 229 piecewise, 112, 116–19 review, 219–20 third-order, 229 third-order Lagrange, 223 transposed Farrow structure, 122, 220–23, 224–25 See also Applications Polynomial interpolators, 136 Polynomial-like filters, 134 Polyphase components, 55–59, 80 0th, 114, 116, 118 lth, 129 common state space of, 108 defined, 55 higher-order systems, 162–63 of impulse response, 58 of LTI system, 101 normalized, 56, 57, 59, 101 recomposing signals from, 56 as reference component, 114 relationship between, 57 selecting, 126 storing multiple, 124–32 upsampled, 76 z-transform, 55
268
Sample Rate Conversion in Software Configurable Radios
Polyphase decimators output, 193 upsampler followed by, 193–96 See also Decimators Polyphase decomposition, 55–60 defined, 55 structures, 58 of transfer function, 239–41 type 1, 102 Polyphase filters, 100–113 coefficient size reduction, 110–13 polynomial, 133–40 sample rate increase, 100–106 sample rate reduction, 106–10 Polyphase interpolators followed by downsampler, 191–93 polynomial filtering on, 121 Polyphase matrix, 66 Power spectral density (PSD), 14 Processing issues, 89–95 Quantization, 10–16 defined, 10 distortion, 11 error, probability density function, 13 noise, 12 nonlinear character of, 11 nonuniform characteristics, 11, 12 Questionnaire, 237–38 Raising CIC decimator, 153–55 defined, 62 frequency behavior, 69–71 integrator section, 198–204 LTI system, 66–68 multirate system, 68–69 for N-input N-output systems, 63 procedure, 62–71, 243–45 raised state vector, 64 raised system matrices, 64 for SISO systems, 63 state-space description and, 243–44 transfer matrix and, 244–45 Rate-change factor, 136 fractional, 187, 211 irrational, 41, 42, 208, 209 structure independence from, 232
Rational factor SRC, 43–45, 90 defined, 43–44 illustrated, 45 implementation of, 45 multirate systems with, 79 scaling factor and, 49 step, 42 system requirements, 86 timing information, 209 Reconstruction filters, 33, 35, 48 Recursive filters block implementations of, 101 coefficients, 111 Recursive multirate filters, 155–65 generalizing, 165–85 higher-order integrate and dump, 164–65 higher structures, 161–64 idea of, 155–56 second-order decimator, 156–58 second-order interpolator, 158–61 Reference component, 114 Resampling after reconstruction, xi–xii, 30–38 defined, 30 discrete-time signal, 30 interpolation and, 36–38 with polynomial antialiasing filter, 39 with polynomial interpolation filter, 37 spectral interpretation, 33–35, 37, 39 Sample rate, 90 effective increase in, 88 fractional SRC, 92–93 Sample rate conversion (SRC) applications of, 25, 211–32 basic considerations, 30–61 cascaded multirate structure, 94 comparison of methods for, 230–32 direct implementation of, 216 fractional, 86–89, 92–93, 187–210 integer factor, 45–52, 86–89, 99–141 interpretation by block filtering, 188 irrational factor, 38–43, 208–9 necessity for, 25–26
Index
parameters, 86, 89, 95 partitioning of filters for, 224, 225 questionnaire, 237–38 rational factor, 42, 43–45, 90 requirements in context of mobile communications, 213–16 resampling after reconstruction, xi–xii, 30–38 in software radio terminals, 85–96 systems output signal, 47, 49 uses, 20–21 Sample rate increase with FIR filter, 107 multiple polyphase components, 128–30 piecewise polynomial filter, 116–19 polyphase filters, 100–106 Sample rate reduction multiple polyphase components, 130–32 piecewise polynomial filter, 119–24 polyphase filters, 106–10 Sampling, 8–10 branches, order of, 102 defined, 8 equidistant, 8, 21 period, 31 spectral characteristics, 11 spectral repetition due to, 31 theorem, 9, 10, 30 Scaling factor, 49 Second-order decimators, 156–58 Second-order generalized recursive multirate filters, 181 Second-order interpolator, 158–61 Sigma-delta decimator, 156 defined, 156 illustrated, 159 See also Decimators Sigma-delta modulators (SDMs), 16–20 advantages, 19 defined, 16 drawbacks, 19–20 generic, 17 illustrated, 17 integrators as loop filters, 18–19
269
Lth order, 18, 19 noise-shaping, 17, 155, 156 quantizer, 17 second-order lowpass, 17 SNR, 18 Signal-to-noise ratio (SNR ), 12, 231 achievable, 20 determining, 12 offset, 14 in relevant frequency interval, 14 of second-order SDM, 18 Software radio, 1–7 critical functionality of, 1 defined, 1–2 ideal, 2, 3 supported services, 3 transmitter, 2 Software radio receiver defined, 2 feasible, 7 ideal, 2 stages, 3 Software radio terminals, xi critical functionality of, 7–26 SRC concept in, 85–96 Spline interpolation, 36 Stability region, 158 State equations, 198–204 simplification of, 250–52 two-term matrix, 251 State space matrices, 79, 181, 193 minimum, 189 reduction, 103–6, 108–10, 196 System matrices, 240, 241 Time-invariant digital filters, 45 Time-invariant multiple-input multiple-output (MIMO) systems, xii Time-varying CIC filters, 197–208, 210 for fractional SRC, 197–98, 200, 201, 203, 204 simplification of state equation, 204–8 with simplified state update, 208
270
Sample Rate Conversion in Software Configurable Radios
Time-varying CIC filters (continued) state-space equations, 198–204 See also Cascaded-integrator-comb (CIC) filters Time-varying comb filters, 245–50 differentiator, 245–46 Rth-order case, 247–50 second-order case, 246–47 See also Comb filters Time-varying differentiator, 245–46 Time-varying polyphase structures, 191–96 coefficient memory size reduction and, 196 conclusion, 196 polyphase interpolator followed by downsampler, 191–93 state-space reductions and, 196 upsampler followed by polyphase decimator, 193–96 Transfer function, polyphase decomposition of, 239–41 Transfer function magnitude of model filter, 228 of optimized third-order piecewise Lagrange filter, 223 Transfer matrix, 157–58, 158, 162 of CIC decimator, 155 of integrator section, 154 of raised time-invariant systems, 159, 244–45 of raised time-varying differentiator, 168 of Rth-order time-varying differentiator, 163 of time-varying differentiator, 160 Transfer zeros, 165, 166, 176, 180, 236 additional, 171, 185 attenuated, 184
in first period, 171 placement definition, 181 reciprocal, 184–85 second-order differentiator with, 177 spreading, 221 See also Generalized recursive multirate filters Transform matrix, 110 Transmission function, 79 Transposed Farrow structure for decimation, 125 defined, 121 generalized, 136 irrational factor SRC, 209 linear polynomial decimator on, 123 polynomial filters, 122, 220–23, 224–25 See also Farrow structure Universal Mobile Telecommunications System (UMTS), 4 Upsamplers defined, 45 followed by polyphase decimator, 193–96 state-space description, 193 See also Downsamplers Upsampling factor, 72, 175 L-times, 224, 228 matrices, 106, 201 with offset, illustrated, 54 with phase offset, 52 signal spectrum after, 48 White Gaussian noise, 184, 185 Zero-order hold filters, 144