Textbook Digital Signal Processing in Power Electronics Control Circuits 2Nd Edition Krzysztof Sozanski Auth Ebook All Chapter PDF

You might also like

You are on page 1of 53

Digital Signal Processing in Power

Electronics Control Circuits 2nd Edition


Krzysztof Soza■ski (Auth.)
Visit to download the full and correct content document:
https://textbookfull.com/product/digital-signal-processing-in-power-electronics-control-
circuits-2nd-edition-krzysztof-sozanski-auth/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Power Electronics Devices and Circuits May 01 2011


Jagannathan V 2nd Edition Jagannathan V

https://textbookfull.com/product/power-electronics-devices-and-
circuits-may-01-2011-jagannathan-v-2nd-edition-jagannathan-v/

Power system small signal stability analysis and


control 2nd Edition Debasish Mondal

https://textbookfull.com/product/power-system-small-signal-
stability-analysis-and-control-2nd-edition-debasish-mondal/

Conceptual Digital Signal Processing with MATLAB


Keonwook Kim

https://textbookfull.com/product/conceptual-digital-signal-
processing-with-matlab-keonwook-kim/

Radiation Hardened CMOS Integrated Circuits for Time


Based Signal Processing Jeffrey Prinzie

https://textbookfull.com/product/radiation-hardened-cmos-
integrated-circuits-for-time-based-signal-processing-jeffrey-
prinzie/
Think DSP Digital Signal Processing in Python 1st
Edition Allen B. Downey

https://textbookfull.com/product/think-dsp-digital-signal-
processing-in-python-1st-edition-allen-b-downey/

From Algebraic Structures to Tensors Digital Signal and


Image Processing Matrices and Tensors in Signal
Processing Set 1st Edition Gérard Favier (Editor)

https://textbookfull.com/product/from-algebraic-structures-to-
tensors-digital-signal-and-image-processing-matrices-and-tensors-
in-signal-processing-set-1st-edition-gerard-favier-editor/

Digital Image Processing A Signal Processing and


Algorithmic Approach 1st Edition D. Sundararajan
(Auth.)

https://textbookfull.com/product/digital-image-processing-a-
signal-processing-and-algorithmic-approach-1st-edition-d-
sundararajan-auth/

Smartphone based real time digital signal processing


Third Edition Abhishek Sehgal

https://textbookfull.com/product/smartphone-based-real-time-
digital-signal-processing-third-edition-abhishek-sehgal/

Digital Watermarking: Techniques and Trends (Springer


Topics in Signal Processing Book 11) Nematollahi

https://textbookfull.com/product/digital-watermarking-techniques-
and-trends-springer-topics-in-signal-processing-
book-11-nematollahi/
Power Systems

Krzysztof Sozański

Digital Signal
Processing in
Power Electronics
Control Circuits
Second Edition
Power Systems
More information about this series at http://www.springer.com/series/4622
Krzysztof Sozański

Digital Signal Processing


in Power Electronics Control
Circuits
Second Edition

123
Krzysztof Sozański
Institute of Electrical Engineering
University of Zielona Góra
Zielona Góra
Poland

ISSN 1612-1287 ISSN 1860-4676 (electronic)


Power Systems
ISBN 978-1-4471-7331-1 ISBN 978-1-4471-7332-8 (eBook)
DOI 10.1007/978-1-4471-7332-8
Library of Congress Control Number: 2017938127

© Springer-Verlag London Ltd. 2013, 2017


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part
of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations,
recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission
or information storage and retrieval, electronic adaptation, computer software, or by similar or
dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this
publication does not imply, even in the absence of a specific statement, that such names are exempt
from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this
book are believed to be true and accurate at the date of publication. Neither the publisher nor the
authors or the editors give a warranty, express or implied, with respect to the material contained herein or
for any errors or omissions that may have been made. The publisher remains neutral with regard to
jurisdictional claims in published maps and institutional affiliations.

Printed on acid-free paper

This Springer imprint is published by Springer Nature


The registered company is Springer-Verlag London Ltd.
The registered company address is: 236 Gray's Inn Road, London WC1X 8HB, United Kingdom
This book is dedicated to my dear parents
Maria and Kazimierz, and my darling
children, Anna, Mateusz and Andrzej.
Preface

Preface to the Second Edition

The first edition of the book was one of the elements of my habilitation (a quali-
fication above a Ph.D., which is a necessary step for obtaining the title of a
professor in Poland and other European countries), and as a result it was subse-
quently very carefully reviewed by four reviewers. The habilitation was a success.
Using the insightful comments from my reviewers, I have improved the current
version and eliminated some typographic errors that were initially overlooked.
This book is based on the first edition of the book and besides some changes to
the previous material, there are some new elements I include in the new edition. In
particular, I add more MATLAB listings, which would further complement and
enrich the text by providing worked examples of the solutions proposed in the
book.
More figures are added and all the existing ones are revised and in color.
My new solution for a shunt active power filter is also included in the new edition.
All those changes are introduced in the Chapters from the first edition.
This book also includes a new Chapter considering selected problems of sim-
ulation of power electronic systems together with digital control circuits. These
simulations are conducted using MATLAB and PSIM. In the case of the PSIM
programs, the considered methods use C code for describing the digital control
algorithm.
I have written this book in his endeavor to abide by the following maxim nulla
dies sine linea $ nie ma dnia bez kreski $ not a day without a line drawn
(Apelles, Greek painter, flourished 4th century bc). However, this is not always
easily achieved.

Zielona Góra, Poland Krzysztof Sozański


February 2017

vii
viii Preface

Preface to the First Edition

Power electronics circuits are becoming increasingly important in the modern world
due to the rapid progress in developments of microelectronics in areas such as
microprocessors, digital signal processors, memory circuits, complementary
metal-oxide-semiconductors, analog-to-digital converters, digital-to-analog con-
verters and power semiconductors—especially metal-oxide-semiconductor
field-effect transistors and insulated gate bipolar transistors.
Specifically, the development of power transistors has shifted the range of
applications from a few amperes and hundreds of volts to several thousands
of amperes and a few kilovolts, with a switching frequency measured in millions of
hertz. Power electronics circuits are now used everywhere: in power systems,
industry, telecommunications, transportation, commerce, etc. They even exist in
such modern popular devices as digital cameras, mobile phones, and portable media
players. Power electronics are also used in micropower circuits, especially in energy
harvesting circuits.
In the early years of power electronics, in the sixties and seventies, analog
control circuits were most commonly used, meaning that only the simplest control
algorithms could be applied. Some years later, in the eighties and early nineties,
hybrid control circuits were used, which consisted of both analog and digital
components. In subsequent years there followed a slow transition to fully digital-
ized control systems, which are currently widely used and enabled the application
of more complex digital signal processing algorithms.
In this book the author considers signal processing, starting from analog signal
acquisition, through its conversion to digital form, methods of its filtration and
separation, and ending with pulse control of output power transistors. The author
has focused on two applications for the considered methods of digital signal pro-
cessing: an active power filter and a digital class-D power amplifier.
Both applications require precise digital control circuits with very high dynamic
range of control signals. Therefore, in the author’s opinion these applications will
provide very good illustrations for the considered methods. In this book the
author’s original solutions for both applications are presented. In the author’s
opinion the adopted solutions can also be extended to other power electronics
devices.
The discussion of the first application, APF, starts with the analysis of first
harmonic detectors based on: IIR filter, wave digital filters, sliding DFT and sliding
Goertzel, moving DFT. Following that, author’s implementation of classical control
circuits based on p  q algorithm is presented. Next, the dynamics of APF is
considered. Dynamic distortion of APF makes it impossible to fully compensate
line harmonics. In some cases, the line current THD ratio for systems with APF
compensation can reach a value of a dozen or so percent. Therefore the author has
dealt with this problem by proposing APF models suitable for analysis and simu-
lation of this phenomenon. For predictable line current changes, it is possible to
develop a predictable control algorithm to eliminate APF dynamics compensation
Preface ix

errors. In the following sections the author’s modification using a predictive circuit
to eliminate dynamic compensation errors is described. In this book control circuits
with filter banks which allow the selection of compensated harmonics are described.
The considered filter banks are based on sliding DFT, sliding Goertzel, moving
DFT and p  q algorithm.
For unpredictable line current changes the author has developed a multirate APF.
The presented multirate APF has a fast response for sudden changes in the load
current. So, using multirate APF, it is possible to decrease the THD ratio of line
current even for unpredictable loads.
The second application is a digital class-D amplifier. Both APFs and the
amplifiers are especially demanding in terms of the dynamics of processed signals.
However, in the case of a class-D amplifier, the dynamics reach 120 dB, which
results in high requirements for the type of algorithm used and its digital realization.
The author has proposed a modulator with a noise shaping circuit for a class-D
amplifier. Interpolators are also considered that allow for the increasing of the
sampling frequency whilst maintaining a substantial separation of signal from
noise. The author also presents an original analog power supply voltage fluctuation
compensation circuit for the class-D amplifier. The class-D amplifier with digital
click modulation is given special consideration too. Finally, two-way and three-way
loudspeaker systems, designed by the author, are presented, where the signal from
input to output is digitally processed.
The great majority of the presented methods and circuits is the original work
of the author. Listings from MATLAB or in C language are attached to some of the
considered algorithms to make the application of the algorithms easier. The pre-
sented methods and circuits can be successfully applied to the whole range of power
electronics circuits.
The issues concerning digital signal processing are relatively widely described in
the literature. However, in the author’s opinion, there are very few publications
combining digital signal processing and power electronics, due to the fact that these
two areas of knowledge have been developed independently over the years. The
author hopes that this book will, to some extent, bridge the gap between digital
signal processing and power electronics. This book may be useful for scientists and
engineers who implement control circuits, as well as for students of electrical
engineering courses. It may also be of some value to those who create new
topologies and new power electronics circuits, giving them some insights into
possible control algorithms.

Zielona Góra, Poland Krzysztof Sozański


December 2012
Acknowledgements

I would like to thank the reviewers of my habilitation (in alphabetical order)


Andrzej Dzielinski from Warsaw University of Technology, Boguslaw Grzesik
from Silesian University of Technology, Gliwice, Adam Kempski from the
University of Zielona Góra, Jan Mucko from University of Science and
Technology, Bydgoszcz.
Many thanks also to my English consultants, Peter Preston from the University
of Zielona Góra and my daughter Anna Sozanska who is studying at the University
of Cambridge. I hope that I successfully applied all of your comments and
corrections.
I would also like to thank everyone who supported me during the writing of this
book.

xi
Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Power Electronics Systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Digital Control Circuits for Power Electronics Systems . . . . . . . . 3
1.2.1 Analog Versus Digital Control Circuit . . . . . . . . . . . . . . 5
1.2.2 Causal and Non-causal Digital Circuits. . . . . . . . . . . . . . 5
1.2.3 LTI Discrete-Time Circuits . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.4 Digital Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2.5 Hard Real-Time Control Systems . . . . . . . . . . . . . . . . . . 10
1.2.6 Sampling Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.2.7 Simultaneous Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.2.8 Number of Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.3 Multirate Control Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.4 Active Power Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.5 Digital Class-D Power Amplifiers . . . . . . . . . . . . . . . . . . . . . . . . 16
1.6 Symbols of Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.7 What Is in This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2 Analog Signals Conditioning and Discretization . . . . . . . . . . . . . . . . . 23
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.2 Analog Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.2.1 Galvanic Isolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.2.2 Common Mode Voltage . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.2.3 Isolation Amplifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.3 Current Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.3.1 A Resistive Shunt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.3.2 Current Transformers . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.3.3 Transformer with Hall Sensor . . . . . . . . . . . . . . . . . . . . . 35
2.3.4 Current Transformer with Magnetic Modulation . . . . . . . 38
2.3.5 Current Transducer with Air Coil . . . . . . . . . . . . . . . . . . 38
2.3.6 Comparison of Current Sensing Techniques . . . . . . . . . . 41

xiii
xiv Contents

2.4 Selected Parameters of Digital Control Circuit . . . . . . . . . . . . . . . 41


2.5 Total Harmonic Distortion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.6 Sampling of Analog Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.6.1 Synchronization of Sampling Process . . . . . . . . . . . . . . . 47
2.6.2 Maximum Signal Frequency Versus Signal
Acquisition Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 49
2.6.3 Errors in Multichannel System . . . . . . . . . . . . . . . . . . .. 50
2.6.4 Amplitude and Phase Errors of Sequential
Sampling A/D Conversion . . . . . . . . . . . . . . . . . . . . . . . 52
2.6.5 Sampling Clock Jitter . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.7 Signal Quantization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
2.7.1 Dynamic Range of Signal . . . . . . . . . . . . . . . . . . . . . . . . 59
2.7.2 Signal Headroom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
2.7.3 Noise Shaping Technique . . . . . . . . . . . . . . . . . . . . . . . . 60
2.7.4 Dither . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
2.7.5 Propagation of Quantization Noise . . . . . . . . . . . . . . . . . 65
2.7.6 Effective Number of Bits . . . . . . . . . . . . . . . . . . . . . . . . 66
2.8 A/D Converters Suitable for Power Electronics Control
Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
2.8.1 A/D Converter with Successive Approximation . . . . . . . 69
2.8.2 A/D Converter with Delta Sigma Modulator. . . . . . . . . . 70
2.8.3 Selected Simultaneous Sampling A/D Converters . . . . . . 70
2.8.4 ADS8364 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
2.8.5 AD7608 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
2.8.6 ADS1278 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
2.8.7 ADS8568 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
2.8.8 A/D Conventer of TMS320F28335 . . . . . . . . . . . . . . . . . 75
2.8.9 A/D Converters of TMS320F2837xD . . . . . . . . . . . . . . . 77
2.9 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
3 Selected Methods of Signal Filtration and Separation
and Their Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
3.2 Digital Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
3.2.1 Digital Filter Specifications . . . . . . . . . . . . . . . . . . . . . . . 84
3.2.2 Finite Impulse Response Digital Filters . . . . . . . . . . . . . 85
3.2.3 Infinite Impulse Response Digital Filters . . . . . . . . . . . . 87
3.2.4 Design of Digital IIR Filters . . . . . . . . . . . . . . . . . . . . . . 90
3.3 Lattice Wave Digital Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
3.3.1 Comparison of Classical IIR Filter and Lattice
Wave Digital Filter . . . . . . . . . . . . . . . . . . . . . . ....... 96
3.3.2 Realization of LWDF . . . . . . . . . . . . . . . . . . . . ....... 97
Contents xv

3.4 Modified Lattice Wave Digital Filters . . . . . . . . . . . . . . . . . . . . . 100


3.4.1 First-Order Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
3.4.2 Second-Order Sections . . . . . . . . . . . . . . . . . . . . . . . . . . 104
3.5 Linear-Phase IIR Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
3.5.1 Example of a Linear-Phase IIR Filter . . . . . . . . . . . . . . . 111
3.5.2 Comparison of FIR and LF IIR . . . . . . . . . . . . . . . . . . . 114
3.6 Multirate Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
3.6.1 Signal Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
3.6.2 Signal Decimation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
3.6.3 Multirate Circuits with Wave Digital Filters . . . . . . . . . . 121
3.6.4 Interpolators with Linear-Phase IIR Filters . . . . . . . . . . . 123
3.7 Digital Filter Banks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
3.7.1 Strictly Complementary Filter Bank . . . . . . . . . . . . . . . . 128
3.7.2 DFT Filter Bank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
3.7.3 Sliding DFT Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 131
3.7.4 Sliding Goertzel Algorithm . . . . . . . . . . . . . . . . . . . . . . . 136
3.7.5 Moving DFT Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 136
3.7.6 Wave Digital Lattice Filter Bank . . . . . . . . . . . . . . . . . . 139
3.8 Implementation of Digital Signal Processing Algorithms . . . . . . . 146
3.8.1 Basic Features of the DSP . . . . . . . . . . . . . . . . . . . . . . . 148
3.9 Selected Microcontrollers Suitable for Power Electronics
Control Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
3.9.1 TMS320F28335 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
3.9.2 TMS320F2837xD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
3.9.3 Digital Signal Processor—TMS320C6xxx Family . . . . . 157
3.9.4 Digital Signal Processors—SHARC Family . . . . . . . . . . 159
3.10 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
4 Selected Simulation Methods and Programs for Power
Electronics Circuits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
4.2 Simulation Using MATLAB® . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
4.2.1 DC and AC Analysis of Analog Circuits . . . . . . . . . . . . 169
4.2.2 DC and AC Nodal and Loop Analysis of Circuits . . . . . 174
4.2.3 Transient Analysis of Analog Circuits . . . . . . . . . . . . . . 177
4.2.4 Simulation of Power Electronics System Together
with Digital Control Circuit . . . . . . . . . . . . . . . . . . . . .. 180
4.2.5 Simulation of the Power Electronics System
Using Simulink® . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
4.3 Simulation Using PSIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
4.3.1 Simulation Using the Typical PSIM Blocks . . . . . . . . . . 184
4.3.2 Simulation Using C Code . . . . . . . . . . . . . . . . . . . . . . . . 185
4.3.3 Simulation with AC Analysis . . . . . . . . . . . . . . . . . . . . . 190
4.3.4 Simulation to Hardware Implementation . . . . . . . . . . . . . 192
xvi Contents

4.4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196


References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
5 Selected Active Power Filter Control Algorithms . . . . . . . . . . . . . . . . 199
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
5.2 Control Circuit of Shunt APFs . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
5.2.1 Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
5.3 Simulation of APF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
5.3.1 Simulation of APF Using MATLAB . . . . . . . . . . . . . . . 204
5.3.2 Simulation of APF Using PSIM . . . . . . . . . . . . . . . . . . . 206
5.4 APF Control with First Harmonic Detector . . . . . . . . . . . . . . . . . 206
5.4.1 Control Circuit with Low-Pass 4-Order Butterworth
Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 208
5.4.2 Control Circuit with Low-Pass 5-Order Butterworth
LWDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
5.4.3 Control Circuit with Sliding DFT . . . . . . . . . . . . . . . . . . 210
5.4.4 Control Circuit with Sliding Goertzel . . . . . . . . . . . . . . . 215
5.4.5 Control Circuit with Moving DFT . . . . . . . . . . . . . . . . . 215
5.5 The Control Circuit for the Shunt APF Based on p  q
Algorithm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
5.6 Shunt APF Classical Control Circuit . . . . . . . . . . . . . . . . . . . . . . 222
5.6.1 High-Pass IIR Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
5.6.2 Improved High-Pass Filter . . . . . . . . . . . . . . . . . . . . . . . 227
5.6.3 DC Bank Voltage Controller . . . . . . . . . . . . . . . . . . . . . 229
5.6.4 The Remaining Part of the p  q Algorithm . . . . . . . . . . 229
5.6.5 Output Current Controller . . . . . . . . . . . . . . . . . . . . . . . . 230
5.6.6 Modernized Digital Controller for the APF. . . . . . . . . . . 231
5.7 Dynamics of Shunt APF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
5.7.1 Methods of Reducing APF Dynamic Distortion . . . . . . . 233
5.7.2 Control Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
5.7.3 APF Output Current Ripple Calculation . . . . . . . . . . . . . 240
5.7.4 Simulation of APF Control Circuit . . . . . . . . . . . . . . . . . 243
5.8 Predictive Control Algorithm for APF . . . . . . . . . . . . . . . . . . . . . 244
5.8.1 Advance Time TA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
5.8.2 Experimental Results for Steady-State . . . . . . . . . . . . . . 248
5.8.3 Step Response of APF . . . . . . . . . . . . . . . . . . . . . . . . . . 248
5.9 Selected Harmonics Separation Methods Suitable for APF . . . . . 254
5.9.1 Control Circuit with MDFT . . . . . . . . . . . . . . . . . . . . . . 255
5.9.2 Control Circuit with p  q Algorithm . . . . . . . . . . . . . . . 255
5.10 Multirate Shunt APF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
5.10.1 Analog Input Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
5.10.2 The Output Inductors . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
5.10.3 APF Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . 264
Contents xvii

5.11 Multirate Shunt APF with Prediction . . . . . . . . . . . . . . . . . . . . . . 270


5.12 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
6 Digital Signal Processing Circuits for Digital Class-D Power
Amplifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
6.2 Digital Class-D Power Amplifier Circuits . . . . . . . . . . . . . . . . . . 278
6.3 Modulators for Digital Class-D Power Amplifiers . . . . . . . . . . . . 281
6.3.1 Oversampled Pulse Width Modulator . . . . . . . . . . . . . . . 284
6.4 Basic Topologies of Control Circuits for Digital Class-D
Power Amplifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 285
6.4.1 Open Loop Amplifiers . . . . . . . . . . . . . . . . . . . . . . . . .. 285
6.4.2 Amplifiers with Digital Feedback for Supply
Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
6.4.3 Amplifiers with Analog Feedback for Output Pulses . . . 287
6.4.4 Amplifiers with Digital Feedback . . . . . . . . . . . . . . . . . . 290
6.5 Supply Units for Class-D Power Amplifiers . . . . . . . . . . . . . . . . . 291
6.6 Click Modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
6.7 Interpolators for High Quality Audio Signals . . . . . . . . . . . . . . . . 295
6.7.1 Single Stage Interpolators . . . . . . . . . . . . . . . . . . . . . . . . 295
6.7.2 Multistage Interpolators . . . . . . . . . . . . . . . . . . . . . . . . . 296
6.8 Class-D Audio Power Amplifiers . . . . . . . . . . . . . . . . . . . . . . . . . 300
6.8.1 Digital Crossovers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
6.9 Loudspeaker Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
6.10 Class-D Power Amplifier with Digital Click Modulator . . . . . . . . 309
6.10.1 Digital Crossovers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
6.10.2 Realization of Digital Click Modulator . . . . . . . . . . . . . . 314
6.10.3 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
6.11 Digital Audio Class-D Power Amplifier with TAS5508 DSP . . . 321
6.11.1 TAS5508-5121K8EVM . . . . . . . . . . . . . . . . . . . . . . . . . 322
6.11.2 Three-Way Digital Crossover . . . . . . . . . . . . . . . . . . . . . 326
6.11.3 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
6.12 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
7.1 Summary of Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
7.2 Future Work. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Abbreviations and Symbols

Abbreviations

AC Alternating current
A/D Analog-to-digital converter
ALU Arithmetic-logic unit
APF Active power filter
av Average value of signal
BPF Band-pass filter
BSF Band-stop filter
CM Click modulator also called zero position coding
D/A Digital-to-analog converter
D/t Digital-to-time converter
DAI Digital audio interface
dB Decibel, 20 logðU2 =U1 Þ, 10 logðP2 =P1 Þ
DC Direct current
DFT Discrete Fourier transform algorithm
DPWM Digital pulse width modulation
DSM Delta sigma modulator
DSP Digital signal processor
e.g. For example (exempli gratia—Latin)
EMI Electromagnetic interference
etc. And other things, or and so forth (et cetera—Latin)
FFT Discrete fast Fourier transform algorithm
FIR Finite impulse response digital filter
FLOPS Floating-point operations per second
FPGA Field programmable gate array
HPF High-pass filter
i.e. This is (id est—Latin)
IC Integrated circuit
IGBT The insulated gate bipolar transistor
IIR Infinite impulse response digital filter

xix
xx Abbreviations and Symbols

IIS Inter-IC sound, integrated interchip sound, or IIS, is an electrical


serial bus interface standard used for connecting digital audio
devices together
ImðxÞ; ÁðxÞ Imaginary part of x
IPS Instructions per second, MIPS
IPT Instantaneous power theory
LBWDF Lattice bireciprocal wave digital filter
LC LC circuit, circuit composed of capacitor and inductor
LogChrip Logarithmic chirps signal
LPF Low-pass filter
LR Linkwitz–Riley filter
LSB Last significant bit
LTI Linear time-invariant circuit (system)
LWDF Lattice wave digital filter
MAC Multiplication and accumulation, special arithmetic operation
of DSP
MDFT Moving discrete Fourier transform algorithm
MIPS Million instructions per second
MLS Maximal length sequence signal
MOSFET Metal–oxide–semiconductor field-effect transistor
MSB Most significant bit
MWDF Modified wave digital filters
PCB Printed circuit board
PCM Pulse code modulation
PDF Probability density function
PLL Phase locked loop or phase lock loop circuit
PWM Pulse width modulation
QMF Quadrature mirror filter
ReðxÞ; <ðxÞ Real part of x
RLC Circuit, circuit composed of resistor, capacitor and inductor
rms Root mean square
S/PDIF Sony/Philips digital interconnect format (more commonly known as
Sony Philips digital interface)
SA Successive approximation
SC Strictly complementary digital filter bank
SDFT Sliding discrete Fourier transform algorithm
SGDFT Sliding Goertzel discrete Fourier transform algorithm
SH Sample–and–hold circuit, sampling circuit
SOS Second-order section
SPS Sample per seconds
TR Time reversal
U2 Two’s complement binary code
WDF Wave digital filters
ZePoC Zero position coding also called click modulation
lC Microcontroller
lP General-purpose microprocessor
Abbreviations and Symbols xxi

Symbols

C Capacitance
dp Ripple in the passband
dz Ripple in the stopband
fc Filter crossover (cutoff) frequency
fs Sampling rate, sampling frequency
fk Power transistor switching frequency
fM Line voltage frequency
fp Passband frequency
fz Stopband frequency
HðsÞ Analog transfer function
HðzÞ Digital transfer function
iC ; iC ðtÞ Instantaneous value of APF compensation current
iC ðnÞ Discrete signal represents APF compensation current
iM ; iM ðtÞ Instantaneous value of line current, power line current
iM ðnÞ Discrete signal represents power line current
iL ; iL ðtÞ Instantaneous value of load current
iL ðnÞ Discrete signal represents load current
L Inductance
N Length of sample block
NM Number of samples per line voltage period
R Signal oversampling ratio
R Resistance
M Signal decimation ratio
SINAD Signal to noise and distortion ratio
SNR Signal to noise ratio
THD Total harmonic distortion
TM Line voltage period
Ts Sampling period
Qg MOSFET total gate charge
Qrr Diode reverse recovery charge
uC1 ; uC1 ðtÞ Instantaneous value of capacitor voltage
XðsÞ Analog signal transmittance
XðzÞ Digital signal transmittance
Z Impedance
ZC APF compensation circuit output impedance
ZM Power line impedance
ZL Load impedance
z1 Unit delay operator
Chapter 1
Introduction

1.1 Power Electronics Systems

Over the past 30 years, the area of power electronics has expanded greatly. This
has been caused by the extensive development of microelectronics in areas such
as microprocessors, digital signal processors, memory circuits, complementary
metal-oxide-semiconductors (CMOS), analog-to-digital (A/D) converters, digital-
to-analog (D/A) converters and power semiconductors—especially metal-oxide-
semiconductor field-effect transistors (MOSFET) and insulated gate bipolar
transistors (IGBT). Specifically, the development of power transistors has shifted
the range of applications from a few amperes and hundreds of volts to several thou-
sand amperes and a few kilovolts with a switching frequency measured in millions
of hertz. Another area of application of power electronics circuits are micropower
circuits and particularly energy harvesting circuits. Hence, power electronics cir-
cuits are now used everywhere, in power systems, industry, telecommunications,
transportation, commerce, etc. They even exist in such modern popular devices as
smartphones, tablets, laptops, digital cameras, mobile phones, and portable media
players. The background of power electronics is described by many authors for
example Mohan [31], Erickson [17], Bose [11], Trzynadlowski [55] etc.
Power electronics is quite a difficult field of science and technology, requiring
extensive knowledge of related fields. These include areas such as power systems,
electrical machines, signal processing, analog and digital control, electronics, elec-
tromagnetic compatibility, solid-state electronics, embedded software design, circuit
theory, circuit simulation, electromagnetic theory, thermal design, etc. These aspects
are shown in Fig. 1.1. In order to produce properly functioning power electronics
devices, all these aspects should be included. Often, the omission of one of these
factors causes a system malfunction. This is due to the fact that a power electronics
system converts energy and any errors are revealed in energy dissipation, which leads
to the disruption or destruction of components.
A simplified diagram of a power electronics system is shown in Fig. 1.2. The sys-
tem makes the conversion of electric power from input to load. The power input is
typically from a power system, electrochemical battery, solar cells or fuel cells, etc.
The input power can be direct current (DC) or alternating current (AC): single-
phase, two-phase, three-phase or more. The output power depends on the load.

© Springer-Verlag London Ltd. 2017 1


K. Sozański, Digital Signal Processing in Power Electronics Control Circuits,
Power Systems, DOI 10.1007/978-1-4471-7332-8_1
2 1 Introduction

Area of power electronics

Electrical
machines
Power Signal
systems processing

Electronics,
Analog and digital
solid-state electronics
control

Embedded software Electromagnetic


design

Circuit Thermal
theory Circuit design
simulation

Fig. 1.1 Multidisciplinary nature of power electronics circuit

Power input Power output To load or


Power system uin(t), iin(t) Power uout(t), iout(t) power system
or other Electronics or other
Circuit power
power source electronics
Control circuits
signals
Measurements Measurements
feedforward Digital feedback
Controller

Reference
signals

Fig. 1.2 A power electronics system

The power electronics circuit is monitored by a controller which compares the output
power (feedback) and input power (feedforward) with the reference value needed to
achieve the desired results. The controller can be designed to use either an analog
or digital technique. Today the digital approach is most common, while the analog
approach is reserved only for simple power electronics systems. The power flows
through an electronics system from source to output. The output can be connected to
1.1 Power Electronics Systems 3

a load or to another power system or to other power electronics circuits, etc. How-
ever, the power electronics circuit may be reversed and then the energy can flow from
output to source.

1.2 Digital Control Circuits for Power Electronics Systems

The most common power electronics system element is the inverter. Single-phase or
three-phase (or even more in multi-phase or in multilevel devices) inverters are fre-
quently used parts of power electronics systems, in such devices as AC and DC motor
drives, uninterruptible power supplies, harmonic compensators, DC power supplies,
controlled rectifiers, AC and DC power transmission systems, smart grid etc.
A simplified block diagram of an exemplary three-phase inverter with digital
controller is shown in Fig. 1.3. The inverter consists of six power IGBT transistors
Q 1 , Q 2 , Q 3 , Q 4 , Q 5 , Q 6 , controlled by drivers with galvanic isolation. This gal-
vanic isolation should have low input-to-output capacitance and should be highly
resistant to a high output voltage slew rate, in the range from 10 to 30 kV/µ s. One
of the inverter legs consists of two transistors Q 1 and Q 4 , which are connected to
the load Z L1 through the LC low-pass filter (L f 1 , C f 1 ) for suppressing pulse width
modulation (PWM) components. The inverter is controlled by a digital signal proces-
sor (DSP) which performs the control algorithm. The control DSP function can be
realized using one of the following devices: general purpose microprocessors, micro-
controllers, advanced microprocessors and microcontrollers, digital signal processors
and programmable digital devices, etc. As with transistor control signals, analogue
signals representing currents and voltages are galvanically isolated too. The analog
signals are converted into the digital form by an A/D converter. The algorithm con-
trols the output signal value using controlling output transistors by pulses generated
by the same kind of pulse modulator. In the early days of digital control circuits, the
control algorithms were very simple and represented only digital versions of analog
control circuits with a single sampling frequency.
Over time, control algorithms have turned into highly advanced and more compli-
cated solutions. Currently, control circuits designed to increase signal dynamic range
use a few sampling frequencies. Digital circuits using different sampling frequencies
are called multirate digital circuits. There are not many comprehensive publications
dealing with digital control circuits for power electronics systems, though it is possi-
ble to find a lot of limited discussion in many conference papers. The background of
digital control circuits is described by Astrom and Wittenmark [6], Williamson [60],
Kazimerkowski et al. [25, 26], Buso and Mattavelli [12], some aspects of power and
signal processing are discussed by Bollen et al. [10]. Also, some problems of control
circuits for active power filters (APF) are described by the author [42, 46–50]. The
crucial first aspects to be considered during the digital control circuit design include:
• control system functions,
• control algorithm,
• sampling rate,
4

Q1 Q2 Q3
3x400V
The power G2
Isolation G1 Isolation Isolation G3 Isolation
lines
Amplifier Gate Driver Gate Driver Gate Driver
iL1(t) RB1 iL2(t) RB2 iL3(t) RB3
C1
uDC(t)
uMDC(t) Q4 Q5 Q6
Isolation Isolation Isolation
G4 Amplifier G5 Amplifier G6 Amplifier
Isolation Isolation Isolation
Gate Driver Gate Driver Gate Driver
iML1(t) iML2(t) iML3(t)

G1, G2, G3,


Digital control circuit G4, G2, G3 LF1 LF2 LF3

PWM uML1(t) uML2(t) Isolation uML3(t) Isolation


Isolation ZL1
Amplifier CF1 Amplifier CF2 ZL2 Amplifier CF3 ZL3

To host
iML1(t), iML2(t), iML3(t),
system
Interface DSP A/D uML1(t), uML2(t),
uML3(t), uMDC(t)

Fig. 1.3 Exemplary three-phase inverter with digital controller


1 Introduction
1.2 Digital Control Circuits for Power Electronics Systems 5

• number of bits,
• type of digital circuit for realization,
• fixed-point or floating-point implementation of control algorithm.
Discussion of these problems is found in this book.
Examples of digital control circuit applications include active power filters and digital
class-D power amplifiers. Both applications require precise digital control circuits
with very high dynamic range of control signals. Therefore, in the author’s opinion,
these applications will provide very good illustrations for the considered methods.
This book presents the author’s original solutions for both applications. In the author’s
opinion, the adopted solutions can also be extended to other electronics devices.

1.2.1 Analog Versus Digital Control Circuit

Historically the control circuit of a power electronics device was analog. Therefore
in the literature, even today, a lot of digital control circuits are described using analog
transfer functions H (s). This may be acceptable if the sampling frequency f s and
power transistor switching frequency f k are much bigger than the frequency of the
higher component of the band of interest. Figure 1.4a shows a magnitude frequency
response of an analog circuit and Fig. 1.4b shows a magnitude frequency response
of its digital representation. The relation between analog frequency and digital fre-
quency for the most commonly used bilinear transform is nonlinear, and especially for
high frequencies near f s /2 the frequency characteristic is compressed. The frequency
response of an analog circuit is spanned between zero and infinity and it should be
compressed from zero to f s /2 for the digital domain. Therefore characteristics of
analog and digital circuits are different especially near f s /2. This problem is consid-
ered in Chap. 3. In the author’s opinion, this is the most appropriate way to consider
a digital circuit in contradistinction to an analog circuit. This helps to avoid errors
and instability in high-frequency components. Another problem concerns algorithm
computation, for which simulation research should use the same arithmetic resolu-
tion as in a real control circuit. This will help to avoid unexpected associations with
the instability caused by the limited resolution of the arithmetic. These problems are
also considered in Chap. 3. The problems of digital signal processing are described
in many publications, and as basic books (“bricks”) the following books can be rec-
ommended [7, 15, 29, 33, 34, 36–38, 59, 61, 62]. The author presents some selected
solutions of digital signal processing useful for power electronics circuits.

1.2.2 Causal and Non-causal Digital Circuits

A circuit (system) for which the output signals at any instant depends only on the
past or/and present values of the input signals is called a causal system (circuit) e.g.,
6 1 Introduction

Fig. 1.4 Frequency response (a)


of equivalent analog and 0

|H(j )| [dB]
digital circuits: a analog,
b digital for f s = 10 Hz -50

-100
0 2 4 6 8 10
fa [Hz]
(b)
0

)| [dB]
-50
|H(
-100
0 2 4 6 8 10
fd [Hz]

y(n) = x(n) − 0.3x(n − 1) + 0.1x(n − 3). All real-time physical systems are causal
because time only moves forward.
A circuit (system) for which the output at any instant depends also on future
values of the input signals, is called a non-causal system (circuit) e.g., y(n) =
x(n) − 0.5x(n + 1) + 0.1x(n + 3), y(n) = x(−n), y(n) = y(n 2 ). A non-causal
circuit (system) is also called a non-realizable circuit (system). A circuit (system)
depending only on future input signal values is an anti-causal circuit (system), e.g.
y(n) = x(n + 1).
This book mainly considers causal circuits (systems), because they are easier to
work with and understand, and because most practical systems are causal in nature.
However, non-causal circuits in some applications are very attractive e.g., the real-
ization of a linear-phase IIR filter uses a non-causal zero-phase IIR filter. Similarly,
the author uses a non-causal circuit in the control circuit for an APF.

1.2.3 LTI Discrete-Time Circuits

This book mainly considers linear time-invariant (LTI) discrete-time circuits. Let
x(n) be the discrete input signal, y(n) be the discrete output signal and h(n) be a
discrete impulse response from the discrete unit impulse δ(n), which is the impulse
response. Discrete impulse δ(n) is also called Kronecker delta

1 n=0
δ(n) = . (1.1)
0 n = 0

It plays the same role as the Dirac delta in continuous-time circuits. A block diagram
of the LTI discrete-time circuit is shown in Fig. 1.5. Time domain LTI discrete-time
circuits can be described by the following equations, for a non-causal circuit,
1.2 Digital Control Circuits for Power Electronics Systems 7

Fig. 1.5 LTI Discrete-time fs fs


circuit

x(nTs) y(nTs)
h(nTs)

X(ejωTs) H(ejωTs) Y(ejωTs)


X(z) H(z) Y(z)



y(n) = h(k)x(n − k) , (1.2)
k=−∞

and for a casual circuit,




y(n) = h(k)x(n − k) . (1.3)
k=0

For a frequency domain LTI discrete-time circuit

Y (ejωTs ) = H (ejωTs )X (ejωTs ) , (1.4)

where: X (ejωTs ), Y (ejωTs )—Fourier transformation of discrete signals, H (ejωTs )—


LTI discrete-time circuit frequency transfer function, and

jωTs = j2π/ f s . (1.5)

A LTI discrete circuit may also be described by a Z-transform

Y (z) = H (z)X (z) , (1.6)

where: X (z), Y (z)—Z-transform of discrete signals, H (z)—transfer function. There-


fore for LTI discrete-time circuits it is possible to write relations as

x(n) ↔ x(nTs ) ↔ X (ejωTs ) ↔ X (z) (1.7)

For a description of LTI discrete-time circuits it is important to know their impulse


response. Substituting for input signal discrete impulse x(n) = δ(n), it is possible
to calculate the circuit impulse response


y(n) = h(k)δ(n − k) = h(n) , (1.8)
k=−∞
8 1 Introduction

Fig. 1.6 LTI Discrete-time fs fs


circuit impulse response

δ(nTs) h(nTs)
h(nTs)

Δ(ejωTs)=1 H(ejωTs) Y(ejωTs)=H(ejωTs)


X(z) H(z) Y(z)=H(z)

and for frequency domain (Δ(ejωTs ) = 1)

1
  
Y (ejωTs ) = H (ejωTs ) X (ejωTs ) = H (ejωTs ) . (1.9)

A block diagram of a LTI discrete circuit for impulse response is depicted in Fig. 1.6
A highly detailed description of LTI discrete circuits can be found in many books,
e.g.: Oppenheim et al. [33], Rabiner and Gold [38], Proakis and Manolakis [37],
Mitra [30], Zielinski [61], Chen [13], Wanhammar [59], Venezuela and Constanti-
ndes [57], Orfanidis [34], Tantaratana [54].
As can be seen in the Eqs. (1.2, 1.3, 1.8), in digital signal processing, the multiply-
accumulate (MAC) operation is a basic operation that computes the product of two
numbers and adds that product to an accumulator.

1.2.4 Digital Filters

In engineering practice, there is often a common problem of the presence of noise in


digital measuring signals. If the frequency of the noise is higher than the frequency
of the signal, in the first approach, the most common remedy is the use of averaging.
Typically N + 1 signal samples are summed and the result is divided by the number
of samples N + 1. A diagram of such a circuit for calculating the average of four
current samples, also called the moving average, is shown in Fig. 1.7. The input signal
is stored in the input buffer and the output signal is stored in the output buffer, but
only four (N + 1) current input samples should be stored. A diagram of a N -order
moving average circuit is depicted in Fig. 1.8. The operation of such a circuit can be
described by the equation

1 
N
y(n) = x(n − k) , (1.10)
N + 1 k=0
1.2 Digital Control Circuits for Power Electronics Systems 9

x(n-5) y(n-5)
x(n-4) y(n-4)
Memory x(n-3) + y(n-3)
of input x(n-2) + y(n-2)
* 1/4
signal x(n-1) + y(n-1)
samples Memory of
x(n) + y(n) output signal
x(n+1) y(n+1) sample
x(n+2) y(n+2)

Input signal Output signal

Fig. 1.7 3-Order moving average circuit

X(z)z-1 X(z)z-2 X(z)z-3 X(z)z-(N-1)


X(z) X(z)z-(N)
-1 -1 -1
z z z z-1

x(n) x(n-1) x(n-2) x(n-3) x(n-(N-1))

+ 1/(N+1)

Y(z)
x
y(n)

Fig. 1.8 Block diagram of N -order moving average circuit

where: N + 1—number of signal samples.


The N -order moving average transfer function can be described by the equation

1  −k
N
Y (z)
H (z) = = z . (1.11)
X (z) N + 1 k=0

Figure 1.9 shows the frequency characteristics for the moving average of the orders:
8, 16, 64, 128. As can be seen from the graph, this method does not allow the
obtaining of very high attenuation. Achieving greater attenuation is possible thanks
to the use of more complex circuits than the moving average. These problems are
further described in Chap. 3, with special attention being paid to the wave digital
filter (WDF), which is very suitable for the realisation of low resolution arithmetics
[18, 19, 21].
10 1 Introduction

Fig. 1.9 Frequency 0


responses of moving average
circuits -10

-20

Magnitude [dB]
-30

-40

-50

-60

-70
0 0.1 0.2 0.3 0.4 0.5
Frequency f/fs

1.2.5 Hard Real-Time Control Systems

The control circuit for a power electronics system should be a hard real-time system.
What this means is that a control system function (hardware, software, or a combina-
tion of both) is considered hard real-time if, and only if, it has a hard deadline for the
completion of an action or task [35]. This deadline must always be met, otherwise,
the task has failed and in power electronics circuits there is a high risk of damage. A
block diagram of an exemplary control circuit with one analog input and one analog
output is shown in Fig. 1.10. Analog input signal x(t) is converted into digital form
with sampling rate f s , and is then processed by a digital signal processor (DSP).
Finally, output signal y(n) is converted by a PWM modulator to pulses controlling
output inverter switches S1 and S2 . In this circuit all digital circuits have the same
sampling frequency f s . A typical timing diagram for such a control circuit for power
electronics is depicted in Fig. 1.11. During the sampling period Ts all operations
(calculation, conversion, communication etc.) must be completed. A control system
may have more than one hard real-time task as well as other nonreal-time tasks. This
is possible, as long as the system can properly schedule these tasks in such a way
that the hard real-time tasks always meet their deadlines. The control system should
ensure that the system still operates under worst-case response time to events. The
control circuit should also be stable, even under transient overload when the system
is overloaded by events and it is impossible to meet all deadlines, yet the deadlines
of selected critical tasks must still be guaranteed.
1.2 Digital Control Circuits for Power Electronics Systems 11

fs fs fs fc

+UDCp

S1
Dead LC
x(t) Analog x(n) y(n) i(t)
A/D DSP Digital Time
Low-pass
Converter b2 PWM Logic
Filter b1 b3
CC RL u(t)
S2
Power D/A converter
-UDCn

Fig. 1.10 Block diagram of exemplary control circuit for power electronics system

Ts
Input signal Sampling
n n+1 n+2 n+3
t
A/Dconverter New ADC New ADC
New ADC
interrupts data data
data
t
Processor core
tasks Calcula- Calcula- Calcula-
tions tions tions

New PWM New PWM New PWM New PWM t


data data data data
PWM output

Fig. 1.11 Timing diagram for power electronics control circuit

1.2.6 Sampling Rate

A continuous analogue signal is sampled at discrete intervals, Ts = 1/ f s , which must


be carefully chosen to ensure an accurate representation of the original analogue sig-
nal. It is clear that the more samples taken (i.e., faster sampling rates), the more
accurate the digital representation, while if fewer samples are taken (i.e., lower sam-
pling rates), a point is reached where critical information about the signal is actually
lost. In the classical system for analogue signal band 0 · · · f b , half of the sampling
frequency f s /2 is only a little bit higher than f b . A rule of sampled data systems
is that the input signal’s spectrum gets folded around a frequency one-half that of
the sampling clock. An ideal anti-aliasing filter would pass all signals in the band
of interest and block all signals outside of that band. The quality of the anti-aliasing
filter is the major factor in the signal-to-noise ratio (SNR). Problems of choosing the
correct sampling rate are discussed in Chaps. 2 and 3.
Another random document with
no related content on Scribd:
[669] Thirty-eight palmos long. Herrera, dec. ii. lib. x. cap. iii.

[670] According to Bernal Diaz this commission was arranged by the combined
influence of Olmedo and Duero, during Olmedo’s second visit to the camp. The
friar appears, however, to have been there but once, when he was expelled.
Knowing Salvatierra to be a blusterer, Bermudez, the alguacil mayor, proposed
that he should join the commission, but his intended victim, not caring to trust
himself within the power of Cortés, pleaded sickness and a dislike to speak with a
traitor. ‘Señor Veedor,’ chimed in Olmedo, ironically, ‘best it is to be prudent, and
you may have him prisoner before long.’ Hist. Verdad., 93.

[671] Duero was to receive the share of treasures claimed, a command in the
expedition equal to that of Cortés, and after the conquest a grant of towns similar
to his own. As a further inducement, sufficient gold was given to load his two
Cuban servants. On taking leave of the general, on pentecost morning, Duero
asked: ‘What has your worship to say, before I leave?’ ‘God be with you,’ was the
reply, ‘and see to it, Señor Duero, that it be done as arranged, or by my
conscience [Cortés’ favorite oath] I’ll be in your camp within three days, with all my
companions, and the first to receive the lance will be your worship, if I see aught
contrary.’ Bernal Diaz, Hist. Verdad., 94. Monjaras states that Duero and Leon
warned Cortés against opposing Narvaez’ army and commission. Cortés,
Residencia, ii. 49.

[672] Cortés to remain governor of the part to be allotted him till the king should
decide. Tapia, Rel., in Icazbalceta, Col. Doc., ii. 588. According to Gomara, who
sends Veedor Álvarez Chico, Juan Velazquez, and Juan del Rio, to carry the
message, Cortés proposed a private interview for the discussion of two points,
whether Narvaez would leave Mexico to him and go to Pánuco or elsewhere,
aided by Cortés with gold and supplies, or whether Narvaez preferred to take
Mexico and give him 300 or 400 men wherewith to pass on to new conquests.
Hist. Mex., 144. The last proposal could only have been a trap to secure Narvaez’
men. Prescott chooses to omit the proposal for an interview, and sends instead
the ultimatum with Duero, a glaring disregard of Cortés’ own text, as confirmed by
others. Cortés, Cartas, 121-2; Oviedo, iii. 314.

[673] ‘Dize Narvaez, y en todo su Real ay fama, qui si U. merced [Velazquez] vá


allâ, que luego yo [Cortés] soy deshecho.’ Bernal Diaz, Hist. Verdad., 95.

[674] Bernal Diaz states that Cortés made the request in a manner that appeared
to Velazquez an attempt to probe his loyalty. He therefore refused to take any
valuables with him, but was finally persuaded. Juan del Rio, Cortés’ equerry, kept
him company.
[675] Bernal Diaz adds that, these efforts being observed by Salvatierra, Narvaez
was urged to seize Velazquez, and this would have been done but for the
representations of Duero and others. During the dinner given in his honor, Captain
Diego Velazquez, nephew of the Cuban governor, alluded in one of his remarks to
Cortés as a traitor. The guest appealed to Narvaez against such expressions.
Diego repeated the term, and added that Juan did not deserve to bear the name
Velazquez. Grasping his sword the latter retorted, calling him a liar. He would
prove himself a better man than either uncle or nephew, if permission was
granted. The others had to interfere to prevent the clashing of swords, and
Narvaez was persuaded to order the turbulent visitor away. At leave-taking the
general showed his annoyance, and said that it would have been better had he not
come. Diego Velazquez, who stood by his side, added a threat, to which Juan
rashly retorted, with a twirl of his beard: ‘Before many days I shall see if your
prowess equals your boast.’ Alarmed at his want of self-control, Duero and other
sympathizers hurried him away before he could utter any more indiscretions. He
and the equerry had hardly left camp before some horsemen appeared, as if in
pursuit, and caused them to increase their pace. Hist. Verdad., 95-6; Herrera, dec.
ii. lib. x. cap. i.

[676] Cartas, 122. Bernal Diaz assumes that the proposal for an interview came
from Narvaez, through Duero, to whom he also confided the intended treachery.
Olmedo, who had pretended to be won over, was also informed. Hist. Verdad., 93.
Herrera supposes that Sandoval warns Cortés, who, according to Gomara, is still
at Mexico when the proposal comes. Hist. Mex., 144. Solis is more correct in
ascribing the warning to Duero. Hist. Mex., ii. 83.

[677] The fact that he allowed such dangerous men as Velazquez de Leon and
Olmedo to go free indicates that he harbored no treachery.

[678] Gomara sends them with Velazquez de Leon. Hist. Mex., 144. ‘Chico, é
Pedro Hernandez, escribano.’ Demanda de Ceballos, in Icazbalceta, Col. Doc., i.
440. Velazquez having gone on a mediatory mission, Chico must have been sent
after his departure.

[679] ‘La respuesta ... fué prender al escribano y á la persona que con mi poder ...
los cuales estuvieron detenidos hasta que llegó otro mensajero que yo envié.’
‘Escribí una carta al dicho Narvaez y otra á los terceros, diciéndoles cómo yo
habia sabido su mala intencion.’ Cortés, Cartas, 122-3. The reference to a
messenger indicates Cortés’ meaning to be that Chico preceded Velazquez de
Leon. Gomara assumes that Cortés’ pretext for withdrawing the proposal for an
interview was that Narvaez had declined to entertain the points to be there
discussed. See note 19. Chico had warned him of the intended treachery. Hist.
Mex., 144. ‘Y que supiesse que no auian de cantar dos gallos en vn muladar, y
que aparejasse las manos.’ Herrera, dec. ii. lib. ix. cap. xxi. Bernal Diaz sends the
message with Olmedo, ‘since no royal notary dare carry it,’ and gives Narvaez
three days in which to send in any commission he may possess signed by the
king. Without such commission he must leave the country, or Cortés will seize him
and inflict punishment for the outrage on Aillon and on the Indians. This ultimatum
was signed also by the captains and some soldiers, including Bernal Diaz. Hist.
Verdad., 92-3. An answer was demanded through the same messengers. Tapia,
Rel., in Icazbalceta, Col. Doc., ii. 588.

[680] ‘Daria dos mil pesos, a quien matasse a Hernando Cortes, o a Gonçalo de
Sandoual.’ Herrera, dec. ii. lib. x. cap. i. ‘Traia mandado de Diego Velazquez que
á mí y á ciertos de los de mi compañía que ... nos ahorcase.’ Cortés, Cartas, 121.
‘Hizo proceso en forma contra Cortés, y por su sentencia, le condenó á muerte.’
Ixtlilxochitl, Hist. Chich., 300; Gomara, Hist. Mex., 143, 146.

[681] ‘Dende a dos horas que se partiô el Juan Velazquez,’ says Bernal Diaz, Hist.
Verdad., 95.

[682] Implying that since Narvaez would not listen to reason, Cortés or he should
die. ‘Velazquez dixo al ... Cortés que adonde yva que yva a la carnesceria.’
Testimonio, in Cortés, Residencia, i. 249; ii. 9, 50, 185-6. On the way to Rio de
Canoas, where they arrived the day after leaving camp, two hogs, with navel on
the back, were killed, an incident which many interpreted as a sign of victory.
Velazquez having arrived with the messenger who carried the ultimatum, the army
proceeded. Bernal Diaz, Hist. Verdad., 95. ‘Anduvimos aquel dia casi diez leguas.’
Tapia, in Icazbalceta, Col. Doc., ii. 588.

[683] Two men were drowned in crossing the stream. Herrera, dec. ii. lib. x. cap. ii.

[684] ‘Dos leguas de los contrarios.’ Tapia, Rel., in Icazbalceta, Col. Doc.. ‘Fuimos
a dormir a vn riachuelo, adõde estava en aquella sazon vna puẽte obra de vna
legua de Cẽpoal.’ Bernal Diaz, Hist. Verdad., 96. Prescott here evidently follows
the erroneous topography of Solis, who confuses this creek with Rio Canoas. Hist.
Mex., ii. 85; Cortés, Residencia, i. 249; ii. 50.

[685] ‘Como yo deseaba evitar todo escándalo, parecióme que seria el menos, yo
ir de noche, sin ser sentido ... y prenderlo [Narvaez]; ... porque los demás querian
obedecer á la justicia, en especial que los mas dellos venian por fuerza.’ Cortés,
Cartas, 123-4.

[686] He also stated that offers had been made favorable to him alone, not to
them, hence he had declined them. ‘Muera el asno ó quien lo aguija.’ Any other
course will disgrace us, was the concluding remark, whereupon we lifted him upon
our shoulders and carried him round. Tapia, Rel., in Icazbalceta, Col. Doc., ii. 588-
9. ‘Hizo muchas ofertas, y prometimiẽtos, que seriamos todos muy ricos.’ Bernal
Diaz, Hist. Verdad., 98. It would be his fault, not theirs, if success failed. Herrera,
dec. ii. lib. x. cap. ii.

[687] ‘Gonzalo de Sãdoual, Alguazil mayor desta Nueua España, por su


Magestad, yo os mando q prendays el cuerpo de Panfilo de Narvaez, e si se os
defendiere, matadle, que assi conviene al servicio de Dios, y de su Magestad, y le
prendió a vn Oidor.’ Countersigned by Secretary Pedro Hernandez. Bernal Diaz,
Hist. Verdad., 98; Tapia, Rel., in Icazbalceta, Col. Doc., ii. 590.

[688] Herrera writes 3000, 1500, and 1000 pesos de oro. Cortés’ acts are said by
the men of Velazquez to have been prompted by ‘un diabólico pensamiento é
infernal osadía.’ Demanda de Ceballos, in Icazbalceta, Col. Doc., i. 441.

[689] The above agrees chiefly with Herrera, who assigns Sandoval 60 men, and
names a number of the leading members of each party. The parties were to keep
a stone’s throw apart. One of Cortés’ squads was to look to the cacique’s palace,
and another to Alcalde Yuste’s quarters. dec. ii. lib. x. cap. iii. He is evidently
confused on many points, and several names are guessed at. Bernal Diaz states
that Pizarro, with 60 young men, including himself, was charged to capture the
artillery; Sandoval received 60 men; Velazquez de Leon also a force of 60,
wherewith to attack Diego Velazquez’ quarters; Cortés remained with a reserve of
20. It is more likely that a higher officer, like Olid, received the order to capture the
artillery, rather than the comparatively unknown Pizarro. Velazquez de Leon does
not appear to have been detailed for his charge till afterward. Cortés names only
Sandoval as the leader of one party of 80 men, he himself following with the
remaining 170. Cartas, 123. Solis reverses Herrera’s order. Hist. Mex., ii. 91-2.

[690] The stout cacique had remonstrated with the general on his carelessness,
assuring him that Malinche with his Teules was far different. ‘When you least
expect it he will be here and will kill you.’ Although the warning was received with
laughter, yet the hint was not lost. Bernal Diaz, Hist. Verdad., 96.

[691] Eighty horsemen and 500 infantry. ‘Y llegó casi una legua de donde yo
estaba.’ Cortés, Cartas, 123.

[692] Laet, Nov. Orb., 221; Hakluyt’s Voy., iii. 467.

[693] Botello, known as the Astrologer, who had made several successful
predictions, had assured Cortés that a night attack would secure him the victory.
Herrera, dec. ii. lib. x. cap. xi.

[694] Cortés rallied him upon his capture, and addressed him as compadre. After
obtaining certain information, more was demanded. The prisoner declared that he
knew nothing more. ‘Well, then, you will swing,’ said Cortés, half jestingly. The two
pikemen who held the rope round his neck took this for a command, and hoisted
him. Rangel rode up, however, and saved his life, but the compression of the
throat troubled him for some time. dec. ii. lib. x. cap. ii.-iii. Carrasco warned him
against attacking the powerful Narvaez. Vetancvrt, Teatro Ecles., pt. iii. 137; Tapia,
Rel., in Icazbalceta, Col. Doc., ii. 589. Prescott says that he with ‘Spartan heroism’
remained silent, Mex., 257-8; but Prescott has evidently not understood his
authorities.

[695] At a cross-road a little farther on, says Herrera.

[696] May 28th. Chimalpain, Hist. Conq., 277. Clavigero and others assume it to
be the night between Saturday and Sunday, but the authorities are pretty clear in
mentioning the following night.

[697] Estimated by various authorities at from twelve to nineteen pieces.


Testimonio, in Cortés, Residencia, ii. 12, 168.

[698] Expressing the belief that Cortés would be foolhardy enough to attack in the
morning. Tapia, Rel., in Icazbalceta, Col. Doc., ii. 589.

[699] ‘Llegamos junto á las centinelas sin que nos sintiesen, é iban huyendo é
diciendo: Arma, arma!’ Id., 590. ‘Auisado Naruaez, y se estaua vistiendo vna cota:
y dixo aqui ẽ le auisò, no tengays pena, y mandò tocar al arma.’ Herrera, dec. ii.
lib. x. cap. iii.

[700] Bernal Diaz, Hist. Verdad., 99, calls the flies cocayos.

[701] Prescott, following Herrera, makes Cortés shout the password ‘Espíritu
Santo,’ which Bernal Diaz says was given as a secret word for mutual recognition.

[702] So say all the original authorities that refer to it, except Bernal Diaz, who
claims that four guns were fired, three balls passing overhead and the fourth killing
three men. Cortés acknowledges no casualties from it. Tapia even intimates that
no discharge took place, owing to the fact that to protect the touch-holes from rain
they had been covered with wax and tiles. Confused by the sudden alarm the
artillerists applied the match, forgetful of the wax, and ‘we saw that the charges
failed to go off.’ Rel., in Icazbalceta, Col. Doc., ii. 590. Perhaps he would have
been more correct in saying that the men were confused by the glittering bribes of
Usagre. Bachiller A. Perez testifies: ‘Dixo al artillero poned fuego a estos tiros ...
puso fuego e no salieron los tiros e oyo dezir este testigo que avian puesto cera
en los dichos tiros.’ Cortés, Residencia, ii. 85. This implies that the wax had been
smeared on by accomplices.
[703] With from 40 to 100 men, are the different estimates.

[704] ‘Vinien los contrarios á nuestra gente, creyendo que eran de los suyos, á
preguntar, “¿qué es esto?” é así los prendien.’ Tapia, Rel., in Icazbalceta, Col.
Doc., ii. 590. ‘De las otras dos torres ... no le acudierõ, porq̄ dizen algunos que se
hizieron sordos, otros que no pudieron llegar, por el impedimento de las tropas de
Cortes.’ Herrera, dec. ii. lib. x. cap. iii.; Cardona, in Cortés, Residencia, i. 181-2.

[705] ‘Uitoria, vitoria por los del nõbre del Espíritu Sãto, q muerto es Narvaez!’
Bernal Diaz, Hist. Verdad., 98. Even this authority now shouts forth the password!

[706] Solis assumes that Farfan gave also the thrust. Bernal Diaz’ text leads one
to suppose that Narvaez received the thrust before his followers were driven into
the building, but the other authorities state clearly: ‘al salir de su camara, le dieron
vn picaço.... Echaronle luego mano.’ Gomara, Hist. Mex., 147; Oviedo, iii. 510.
Monjaras states that Narvaez supplicated for his life: ‘Hidalgos, por amor de Dios
no me mateys!’ Testimonio, in Cortés, Residencia, ii. 51, 85, 107; i. 365. ‘Alonso
Dávila le sacó dichas provisiones reales de V. M. del seno, teniéndolo preso é
abrazado el dicho Pero Sanchez Farfán.’ Demanda de Ceballos, in Icazbalceta,
Col. Doc., i. 442. This occurred some time after the capture. Narvaez called upon
his fellow-prisoners to witness the deed, but Ávila shouted that the papers were
merely letters. They were given to Cortés. ‘Las avian quemado.’ Testimonio, in
Cortés, Residencia, i. 345, 365, 250; ii. 52, 187.

[707] He died, however, says Bernal Diaz, Hist. Verdad., 99. Herrera calls him
Diego de Rojas, whom Bernal classes as a captain.

[708] ‘Se retrajeron á una torre alta de un ídolo de aquel pueblo casi cuatrocientos
hombres, é muchos de los de caballo ... salieron al campo.’ Tapia, Rel., in
Icazbalceta, Col. Doc., 590. Herrera says that 300 intrenched themselves till the
morning. dec. ii. lib. x. cap. iv. Cortés reached the battery just in time to prevent a
catastrophe, as Tapia relates. A hot-blooded young companion of the latter,
carried away by excitement, rushed to powder barrels, eight in number, and
shouted, ‘Let us fire the powder and spoil it for the enemy!’ Cleaving a barrel, he
cast a brand into it, and threw himself flat upon the ground, commending his life to
God. It happened, fortunately, that this barrel contained sandals, which by some
mistake had been mixed up with the ammunition. After waiting in vain a while for
the explosion, the madcap discovered the reason and began to open another
barrel. At this moment Cortés came up, and learning of his intention he rushed
forward and snatched away the brand.

[709] Including also Juan Yuste, Juan Bono, and Gomara.


[710] Oviedo, iii. 510. Bernal Diaz lengthens Cortés’ reply: He thanked God for the
victory and for giving him such valiant gentlemen and companions to aid him. One
of the smallest things he had done in New Spain was to secure and defeat him; it
appeared more daring to seize an oidor of his majesty. Las Casas relates that
Narvaez had a not dissimilar surprise by night from Cuban Indians, during his
campaign for Velazquez, and had a narrow escape. Hist. Ind., iv. 6-8.
CHAPTER XXII.
ALVARADO’S MERCILESS MASSACRE.

May, 1520.

After the Battle—Victory Made Secure—Conduct of the Conquered—A


General Amnesty—Disposition of the Forces—Affairs at the Capital—
Insurrection Threatened—The Spaniards Hold a Council—Alvarado’s
Resolve—The Great Day of the Feast—The Spaniards Proceed to the
Temple—The Grand Display there Witnessed—The Attack of the
Spaniards—Horrors upon Horrors.

Cortés was exultant. During the last brief hour how completely
had his fortunes changed! Again was his star ascendant, filling the
whole heavens with its brightness. Alas now for Montezuma and
Mexico! And Velazquez; this was his fourth attempt on Mexico, and
in some respects his greatest failure. Instead of annihilating the
outlaw with his grand army, the outlaw in one fell swoop had secured
the grand army, and was now master of all the ships, and men, and
munitions of war, which he so much needed in consummation of his
further designs. It seemed to be the fate of the fat governor out of his
solid substance to feed his enemy with wealth and honors.
Before it was fairly light Cortés had seized and placed in
confinement such persons as might question his rights as victor; the
remainder on surrendering their arms were permitted to go at large.
[711] In order to make more secure his magnificent prize before the
all-searching sun should disclose the paucity and poverty of the
victors, Cortés seated himself in state, arrayed in a wide orange-
colored robe, and ordered the conquered troops to pass before him,
and swear allegiance to the king, and fealty to him as captain-
general and justicia mayor. This was done by nearly all, some
humbling themselves and kissing his hand, while the late hostile
leaders and old acquaintances were recognized with friendly
greetings and embraces.[712]
Meanwhile Olid and Ordaz, each with a corps, set out on the
captured horses to summon stragglers and seek the forty troopers in
the field. Duero and other friends of Cortés being among them, little
persuasion was needed to win the party over, and shortly after dawn
the whole cavalcade came in to the sound of fife and drum, shouting
vivas for Cortés.[713] High above this noise were heard from a
window the voices of two women, named Ordaz, filling the air with
their loud philippics. “Villainous Dominicanos!” they cried to the
soldiers of their own party, “the distaff would better suit you than the
sword. A good account have you given of yourselves! Unfortunate
women we to have come to the wars with such men!” Truly might
Narvaez exclaim with Xerxes, as he beheld his fair ally, Queen
Artemisia, outwit her Athenian pursuers, “My men fight like women,
and my women like men.” The Ordaz women, however, fought only
with their tongues, and that after the issue of battle. And thus
relieved they immediately descended and did homage to the victor.
The general did all he could to check this excess of zeal, which he
feared might engender ill feeling, and he even seized some of the
noisiest enthusiasts, although they were afterward rewarded.
The cacique of Cempoala, who had been slightly wounded
during the battle, appeared like the rest to offer fealty to the victor by
crowning him with flowers. Cortés received his demonstrations as if
nothing had taken place to mar their intercourse, and took up his
abode with Catalina, whose hand he had accepted during his
previous occupation of the place. The chiefs vied with one another to
obliterate their unfortunate mistake by increased attention and
hospitality, while many among Narvaez’ men thought it necessary to
excuse their tardy surrender by pleading that they had been
deceived by their principals, who had assured them that Cortés was
a traitor. Great was their chagrin in the morning on discovering how
few the victors were and how poorly they were armed. And where
were the much talked of native auxiliaries? At the same time they
could not but admire a leader who had achieved such results with
such means. Narvaez and his supporters declared that the victory
was due wholly to treachery, particularly noticeable in the action of
the artillerists.[714] In this there was much truth, but the consummate
tact and soldierly qualities of Cortés shine no less brightly for all that.
And the cost of this glory and advantage, how insignificant it was!
Four of his own men and fifteen of the enemy, including a captain,
beside a number wounded on both sides; this was all.[715]
In his report to the king Cortés seeks to gloss over the
occurrence by stating that only two men were killed, intimating that it
was on both sides. There was a deeper reason for this and other
falsehoods than the wish to hide the bloody result of fratricidal
conflict. He was still doubtful as to the view taken in Spain of his
conduct, and could not afford to prejudice his case by laying bare
every misfortune. He was aware that even to the impartial observer
he must appear as a defaulter in the duty owing by him to a principal,
and in the agreement or partnership which he had formed, and also
as the usurper of an expedition fitted out in the name and under the
auspices, at least, of Velazquez. His plea rested on his brave and
masterly conquest of a rich country, and on his election to
independent command by a party formed on the pretence that the
superior interests of the sovereign demanded the immediate
subjugation of the country. But his acceptance of that command was
a breach of duty and of contract; the right of the party to act as it did
was doubtful, and its pretence hasty, or perhaps usurped from
Velazquez, who had first entertained it; while the commission to
undertake the conquest had already been conferred on the latter.
Velazquez held besides the right of a discoverer to this coast, and
above all the royal grant to it, vaguely worded though it was so far as
indicating the situation and extent of territory. He had a right to claim
his own; though circumstances had so changed, Cortés claimed, as
to render this perilous to the interests of God, the king, and the
people, which rose above those of individuals; and in ignoring the
orders of the audiencia to desist from war on his countrymen he
followed only natural law and justifiable impulse. In this respect
Cortés was equally guilty, since his duty was to yield to the rightful
claimant. He pleads in his letter to the king, however, that self-
preservation obliged him to resist, for Narvaez had determined to
hang him and several of his followers. Here he again hides the fact
that favorable terms were at one time offered. “Had Narvaez carried
off the victory,” he continues, “it would have been with a great loss,
which must have so weakened him as to surely enable the Indians to
succeed in their meditated revolt. This would have lost the country to
the king and to the faith, and twenty years would not have sufficed to
regain it.”[716] In brief, howsoever we admire Cortés, however much
we would prefer his banner to that of Velazquez or Narvaez, we must
admit that he had hardly a shadow of right on his side, and that no
position in which he could possibly place himself was tenable. He
was a defaulter, pirate, usurper, renegade, traitor, outlaw, hypocrite;
but he was a most lovable villain, an admirable soldier, a rare hero.
On the other hand, Velazquez was right. But, though deeply injured,
he was disagreeable; though foully wronged, he was vanquished.
And the Spanish monarch was not the first or last to smile on
iniquitous success, or turn the cold shoulder to whining, disappointed
virtue.
In the course of the morning the soldier Barrientos, who had
been staying in Chinantla, arrived with the promised Chinantec
warriors, two thousand in number.[717] They had reached the
rendezvous on pentecost day, as ordered, but Cortés had found it
convenient to advance on Cempoala sooner than he had intended.
An imposing sight they presented as they marched by amidst vivas
in a file of three abreast, gorgeous with plumes and shields, the
centre man with bow and arrows, while his companions on either
side carried the formidable pike, tipped with glistening iztli. It was
fortunate that they had failed to arrive in time, since much bloodshed
was saved thereby. In fact the soldiers of Narvaez expressed a fear
that they would have fared badly with such opponents. Cortés was
nevertheless delighted with their coming, since this proved not only
the sincerity of their friendship, but showed the conquered that he
did indeed control native armies. Distributing some beads and
trinkets, he bade them return peaceably under the supervising care
of Barrientos.
One of the first measures after the fight was to secure the fleet;
and for this purpose a suitable force was sent down to the port to
take the vessels to Villa Rica, and remove the sails and rudders, so
as to prevent the escape of any to Cuba.[718] Shortly after, when the
masters and crews had tendered allegiance, the vessels were
placed in charge of Pedro Caballero, captain of one of the vessels
under Narvaez, in whom Cortés had great confidence.[719] The
fortress was again garrisoned, with a larger force,[720] and thither
were sent Narvaez and Salvatierra in chains.[721]
As for the rest, Cortés applied himself with his usual skill to
recompense those who had remained true, and to conciliate the yet
unreconciled. He reminded them that they had come not to risk their
lives for Velazquez, but to gain honor and wealth under the banner of
the king, and he was prepared to aid in this by offering them equal
terms with his veterans. As an earnest he restored within two days
their arms to all except a few leaders, and ordered his men to return
the horses, weapons, and other effects taken by them as spoils of
war.[722] What with their admiration of the liberality and soldierly
qualities of Cortés, and the prospect of speedy advancement, there
were but few who did not immediately and cheerfully accept the
terms. But this was by no means to the taste of the aforesaid
veterans. They had seen with envy that rich presents were made to
the conquered, while they, whose courage and devotion had
achieved such magnificent results, received nothing, and were even
told to return what they regarded as lawful spoils; and, further, to
share with these late comers and intended despoilers the fruits of
their years of toil and victories. A general murmur arose, and many
soldiers refused to surrender the appropriated effects. Captain Ávila
and Father Olmedo being requested to remonstrate, did so
earnestly, and told Cortés that he acted like Alexander, who honored
more the conquered than those who won the battle. He and all he
possessed belonged to his comrades, was the reply, but at present it
was necessary to conciliate their invaluable acquisition, whose aid
was needed to overcome the threatening danger in Mexico, and who
being the more numerous party might otherwise rise against them.
Their aims effected, the entire resources of a vast and rich country
were theirs. Olmedo was convinced of the wisdom of the course,
although he considered that too great liberality had been shown. The
headstrong Ávila pressed the point with his natural haughtiness,
whereupon Cortés said: “I am for Mexico; those who please may
follow; those who do not, may leave it alone. There are yet women in
Spain to bear soldiers.” “Yes, and captains and governors,” retorted
Ávila. Cortés deemed it discreet to bandy no further words at
present. So spirited a tongue must be curbed with gifts; but Cortés
awaited his opportunity. He never forgot anything.
With a view chiefly to divert the troubled spirits two expeditions
were sent out, each of two hundred men, mostly from the ranks of
the late enemy. One was directed to Goazacoalco, as before, under
the command of Velazquez de Leon, who had already held this
commission, and two vessels were placed at his disposal to send to
Jamaica for live-stock, seeds, and other requirements of the
proposed colony. The other expedition was intrusted to Ordaz for the
occupation of Pánuco, with a view to anticipate Garay. Two vessels
were given him to explore the coast.[723]
While Cortés was thus risking all on the cast of fortune at
Cempoala the troops at Mexico had been exposed to even greater
perils. At the time of his departure for the coast, Toxcatl, the fifth
month, had begun, and with it the most solemn festival of the year. It
was in honor of Tezcatlipoca, the highest of the divinities, and
identified with a supreme god, although less conspicuous in the daily
worship of the people, for they appealed rather to the nearer minor
deities, whom they regarded as intercessors, than to their supreme
divinity, whom they greatly feared, and who was very far away. The
Mexicans had been permitted to hold the celebration in the great
temple, which had been partly dedicated to Christian worship, on
condition that no human sacrifices should take place.[724] A festival
of this prominence could not fail to recall with all its force to the
natives the indignities to which they and their gods had been
subjected. We have seen how narrowly an uprising on account of the
occupation of the great temple by strange religious emblems was
escaped, and how it was restrained only by the promise of the
speedy departure of the Spaniards. Before Cortés had left the capital
he saw the smouldering fire, and it was this that led him to
strengthen the defences of the fort, to obtain extra supplies from
Tlascala, and to enjoin the strictest watchfulness and moderation.
The hostile feeling was by no means diminished by the tidings of
another larger host of invaders with doubtful motives. At a meeting of
native leaders it was admitted that the promises and statements of
the newly arrived Spaniards could no more be relied upon than those
of the deceitful Malinche, and the deferred proposition to drive out or
to kill the Spaniards was renewed with ardor. A better opportunity for
carrying out such a measure could never again be found. The great
Cortés with his cunning controlling mind was absent. There
remained only a small force in charge of the city, and the troops on
the seaboard were divided against each other. On the other hand a
multitude of pilgrims were pouring in for the festival; and what better
subjects to be worked upon for an uprising than these, and what
better incentive than religion? Beside the appeal for vengeance on
the desecrators of their altars came the patriotic call for the release
of an oppressed sovereign, whose influence was still supreme with
many, and the alluring prospect of securing the rich spoils in
possession of the Spaniards and the Tlascaltecs, the latter still more
detested as an inferior race which after years of contest had now
assumed the galling attitude of master. The preparations made
during the late fermentation required only to be perfected. More arms
were made, the people were stirred by passionate appeals, warriors
were enrolled, and other measures taken.[725]
The utmost secrecy had been observed by the conspirators, but
with so many confidants, actuated by race jealousy, by ties of
friendship, by interest, and by one above all others, the love of
woman, that the rumor was whispered in Alvarado’s ear.[726] Yet to
the mistress, who in her devotion to the lover forgot her duty to home
and kindred, must not be charged more than is her due. Sharpened
by the remembrance of past wrongs suffered on battle-field and
stone of sacrifice, the wits of the Tlascaltecs discovered evidence
which their hatred failed not to magnify. Warnings were hardly
required, however, to indicate that something unusual was stirring,
for the demeanor of the Indians had undergone a yet more marked
change. Supplies were further diminished; servants sent to market
were abused and ill-treated, and insolence was shown even to the
Spaniards themselves.[727] A still more alarming sign was the
discovery of an undermined wall,[728] and after obtaining further
particulars from a devoted Tezcucan chief,[729] afterward known as
Don Hernando, Alvarado resolved to inspect the adjacent temple
where the chief celebration was held. Here a number of suspicious
circumstances were noticed, which the Castilians readily wrought
into threatening realities; among them several victims destined for
sacrifice, regardless of the promises given, while some bloody hearts
which they saw testified to the work already done by the knife.[730]
With the victims Alvarado seized their attendants and certain of the
emperor’s courtiers, from some of whom he tortured a confession. In
this manner he learned what he already partially knew, namely, that
many arms were prepared; that during the Incensing of
Huitzilopochtli, as the festival was called, the Christian emblems
would be cast out of the temple, and that the uprising was to take
place at the conclusion of the feast.[731]
A seeming confirmation of the proposed sacrilege came from
Montezuma himself, who sent to request the removal of the Christian
emblems from the summit of the great temple, pleading as high-
priest that the presence of strange images must prove irritating to the
worshippers of other gods. Alvarado indignantly refused; he would
rather fight. The Mexicans did not choose to see their festival broken
up before the appointed time, and so the point was waived. It was
then arranged that the Spaniards should attend the ceremonies, so
as to be assured that no indignities would be offered their images.
[732]

And now comes another of those diabolical deeds which, done in


the name of civilization, or religion, or any other entity or idea, fills us
with horror toward the gods and men for whom or by whom such
acts are consummated. The lion and the tiger are humane and
gentle beside the Spaniard, harboring thoughts born of bigoted zeal
or blind apprehension. And what are his thoughts? These: He would
enter the sanctuary, the holy temple of his god and their gods, and
while all the people, while priests and nobles, the flower of the Aztec
race, were celebrating the highest service of the highest festival, he
and his men would fall upon them and hew them in pieces! And this
because they had tired of harboring and feeding them. They desire
to be relieved of the self-invited guests, and since dismissal does not
avail they must be driven out or killed. But the intruders do not wish
to be exterminated, and if there is striking to be done, they propose
to strike first.
Pedro de Alvarado was no such man as Hernan Cortés. He was
scarcely fit to be his servant. There were a dozen prominent qualities
that combined to make up the great man in Cortés which were
absent in Alvarado. Both of them were loyal, brave, and merciless,
but there was a method in the excesses of Cortés which those of
Alvarado lacked. Cortés was deep, Alvarado shallow; Cortés was
patient under affront, Alvarado was violent; Cortés was cool in time
of danger, Alvarado was excited—and so on. And yet Alvarado was
a gallant cavalier.
The Spaniards now held a council, before which Alvarado placed
the information thus far obtained of the plot, and the necessity of
prompt measures was at once recognized. They did not believe
Montezuma to be taking any active part in the conspiracy, but that
swayed by hopes and fears he was allowing himself, with his usual
want of resolution, to yield to the stronger will of his courtiers a
passive consent to the efforts for his release.[733]
Less prudent than his chief, and less fertile in resources,
Alvarado did not look for preventives to check the conspiracy, but to
what he regarded as a decisive blow to crush it, such as that
administered at Cholula. He had not the foresight of his general with
regard to the proper adjustment of means to ends, nor his magic
influence over those around him, friend or foe. He remembered only
the good effect of the massacre on the effeminate Cholultecs, and
felt convinced that so excellent a measure must answer also for the
apparently abject Aztecs. It thoroughly suited his rash daring and
cruel disposition. To attack is to win, was his maxim. The difference
in circumstances hardly entered into consideration, chief among
which was the smaller force, unsupported by the neutrality of half the
city, as at Cholula, and without allies close at hand. The gathering of
so many nobles and military leaders in connection with the war-god
celebration provided the opportunity desired, since this would permit
the blow to be directed against those who were looked on as the
promoters of the revolt; and deprived of their leaders the people
would be likely to abandon any further attempt. This plan met with
general approval.[734]

The hour[735] having arrived for the visit to the temple,[736]


Alvarado selects half the force to accompany him,[737] and proceeds
thither, armed with more than usual care. Upon those who remain in
charge of the fort, says Tapia, devolves the safer, though even more
cruel task of slaughtering the greater part of the courtiers and
attendants,[738] who have this day presented themselves in larger
numbers than usual.
The Spaniards with their Tlascaltec followers are welcomed at
the sanctuary with great demonstrations by the unsuspecting nobles,
who see nothing to apprehend in the gleaming arms, since the
Spaniards never go forth without weapons. We must remember it is
a gala day, and the court presents a magnificent scene with its
festive decking of garlands, festoons, and drapery, and its gayly
attired audience. A procession of plumed priests and pages march
by with swinging censers, chanting weird music before the hideous
idols. Behind comes a file of nuns and novices, with red feathers and
painted faces, surmounted by garlands of toasted maize, and
bearing in their hands flags with black bars. Hidden musicians strike,
and the dance begins. Joining the priests, the consecrated women
and the tyros whirl round a large brazier, while two shield-bearers
with blackened faces direct their motions. A conspicuous figure is the
ixteocale, the living representative of the god, for whom he is fated to
die, like the more prominent proxy of Tezcatlipoca. Dressed like a
warrior ready for the fray, and prepared to lead in the chief dances
as is his duty, he seems to impersonate the omen of evil which
hovers over the scene.
Presently the Spaniards are conducted to a separate court,
wherein are assembled several hundred nobles and leading men,
arrayed in rich costumes glittering with gold and precious stones.
The centre of attraction is the new image of Huitzilopochtli, of tzoalli
dough, its jacket wrought with human bones. Before this image the
mazehualiztli dance now begins.[739] Rings are formed round the
music-stand, where two leaders direct the movements, the highest
nobles and the most aged composing the inner circles, and the
younger men the outer. When all is ready the music strikes up lightly
to a well known tune, and the dancers move off, chanting a song
bearing on the event of the day, and on gods and kings.[740]
Forewarned as the Spaniards are, they see treason in every act and
word, and many who understand somewhat the Aztec language
declare that the songs bear distinct allusions to the intended
uprising.
As the dance progresses a few of the soldiers, together with a
number of Tlascaltecs, take possession of the different entrances,
while the rest distribute themselves in suitable positions and watch
for the signal.[741] Instructed by his native allies, Alvarado waits the
time when the Indians shall install the war-god image in the chapel.
And now the sanguinary moment has come. Falling on the assembly
with pike and sword, some strike the idol and some its worshippers.
They hew down the priests and drive the cruel steel through the
bodies of the nobles. Few of the Indians possess any weapons with
which to defend themselves from the sharp Toledo blades. Taken
thus by surprise, panic-stricken, they tread one upon another, and
then fall helpless under the merciless thrusts of the enemy. Their first
impulse has been to rush for the gates, but lines of bristling pikes
oblige them to press back against the crowd, thereby increasing the
confusion. Some attempt to climb over the high walls, some to hide
in the temple buildings, even burrowing beneath the heaps of the
slain. Before an hour has passed there is nothing left in sight
deemed worthy of Spanish swords, so suddenly has this brilliant
assembly been transformed into loathsome masses of mangled
bodies. The pathway of the conquerors is everywhere slippery with
the blood of their victims.
In this horrible butchery, as we have seen, the lower classes
suffered less than the nobles. Desolation was brought home to
nearly every prominent family in the city. Their grief, shared by
dependants and adherents throughout the provinces, was
commemorated in plaintive ballads, by which the people kept alive
the hatred of their oppressors long after the conquest. The estimates
of the killed vary from four hundred to over three thousand, the most
common number being six hundred; and as this generally refers to
prominent personages it may be accepted as not too low.[742]
Finding no more to kill, or rather no more worth the killing, the
Spaniards and the Tlascaltecs proceeded to plunder. The reward
was rich, but even in the eyes of their national historians odium
attached to every trinket, for by such action, as Herrera observes,
they gave currency to the charge that the deed had been prompted
by avarice. But this interesting occupation was destined to be
interrupted. Shouts from the maddened multitude without were soon
heard, roaring in response to the death clamor of their countrymen.
Warned by the guard at the gates, the plunderers hastened to regain
the fort. Yells of execration greeted them as they issued from the
temple, and showers of stones and darts fell thick, while the front

You might also like