100% found this document useful (7 votes)
161 views

PDF Computational Methods for Electric Power Systems 2nd Edition Mariesa L. Crow download

Electric

Uploaded by

siammadushie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (7 votes)
161 views

PDF Computational Methods for Electric Power Systems 2nd Edition Mariesa L. Crow download

Electric

Uploaded by

siammadushie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 81

Download the full version of the ebook at

https://ebookultra.com

Computational Methods for Electric Power


Systems 2nd Edition Mariesa L. Crow

https://ebookultra.com/download/computational-
methods-for-electric-power-systems-2nd-edition-
mariesa-l-crow/

Explore and download more ebook at https://ebookultra.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Computational Methods for Electric Power Systems 3rd


Edition Mariesa L. Crow (Author)

https://ebookultra.com/download/computational-methods-for-electric-
power-systems-3rd-edition-mariesa-l-crow-author/

ebookultra.com

Computational Methods for Electromagnetic and Optical


Systems Second Edition Banerjee

https://ebookultra.com/download/computational-methods-for-
electromagnetic-and-optical-systems-second-edition-banerjee/

ebookultra.com

Electric Machines Electric Power Engineering Series 1st


Edition Gross

https://ebookultra.com/download/electric-machines-electric-power-
engineering-series-1st-edition-gross/

ebookultra.com

Power Systems 3rd Edition Leonard L. Grigsby (Editor)

https://ebookultra.com/download/power-systems-3rd-edition-leonard-l-
grigsby-editor/

ebookultra.com
Electric Power Industry in Nontechnical Language 2nd
Edition Denise Warkentin-Glenn

https://ebookultra.com/download/electric-power-industry-in-
nontechnical-language-2nd-edition-denise-warkentin-glenn/

ebookultra.com

Renewable and Efficient Electric Power System 2nd Edition


Gilbert M. Masters

https://ebookultra.com/download/renewable-and-efficient-electric-
power-system-2nd-edition-gilbert-m-masters/

ebookultra.com

Wind Power in Power Systems 2nd Edition Thomas Ackermann

https://ebookultra.com/download/wind-power-in-power-systems-2nd-
edition-thomas-ackermann/

ebookultra.com

Iterative methods for sparse linear systems 2nd Edition


Yousef Saad

https://ebookultra.com/download/iterative-methods-for-sparse-linear-
systems-2nd-edition-yousef-saad/

ebookultra.com

Electric Power Distribution 6th Edition A.S. Pabla

https://ebookultra.com/download/electric-power-distribution-6th-
edition-a-s-pabla/

ebookultra.com
Computational Methods for Electric Power Systems 2nd
Edition Mariesa L. Crow Digital Instant Download
Author(s): Mariesa L. Crow
ISBN(s): 9781420086607, 142008660X
Edition: 2
File Details: PDF, 2.12 MB
Year: 2009
Language: english
COMPUTATIONAL
METHODS for
ELECTRIC POWER
SYSTEMS
SECOND EDITION
The ELECTRIC POWER ENGINEERING Series
Series Editor Leo L. Grigsby

Published Titles

Computational Methods for Electric Power Systems, Second Edition


Mariesa L. Crow
Electric Energy Systems: Analysis and Operation
Antonio Gómez-Expósito, Antonio J. Conejo, and Claudio Cañizares
Distribution System Modeling and Analysis, Second Edition
William H. Kersting
Electric Machines
Charles A. Gross
Harmonics and Power Systems
Francisco C. De La Rosa
Electric Drives, Second Edition
Ion Boldea and Syed Nasar
Power System Operations and Electricity Markets
Fred I. Denny and David E. Dismukes
Power Quality
C. Sankaran
Electromechanical Systems, Electric Machines,and Applied Mechatronics
Sergey E. Lyshevski
Linear Synchronous Motors: Transportation and Automation Systems
Jacek Gieras and Jerry Piech
Electrical Energy Systems, Second Edition
Mohamed E. El-Hawary
The Induction Machine Handbook
Ion Boldea and Syed Nasar
Electric Power Substations Engineering
John D. McDonald
Electric Power Transformer Engineering
James H. Harlow
Electric Power Distribution Handbook
Tom Short
SECOND EDITION

COMPUTATIONAL
METHODS for
ELECTRIC POWER
SYSTEMS
MARIESA L. CROW

Boca Raton London New York

CRC Press is an imprint of the


Taylor & Francis Group, an informa business
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742

© 2010 by Taylor and Francis Group, LLC


CRC Press is an imprint of Taylor & Francis Group, an Informa business

No claim to original U.S. Government works

Printed in the United States of America on acid-free paper


10 9 8 7 6 5 4 3 2 1

International Standard Book Number-13: 978-1-4200-8661-4 (Ebook-PDF)

This book contains information obtained from authentic and highly regarded sources. Reasonable efforts
have been made to publish reliable data and information, but the author and publisher cannot assume
responsibility for the validity of all materials or the consequences of their use. The authors and publishers
have attempted to trace the copyright holders of all material reproduced in this publication and apologize to
copyright holders if permission to publish in this form has not been obtained. If any copyright material has
not been acknowledged please write and let us know so we may rectify in any future reprint.

Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmit-
ted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented,
including photocopying, microfilming, and recording, or in any information storage or retrieval system,
without written permission from the publishers.

For permission to photocopy or use material electronically from this work, please access www.copyright.
com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood
Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and
registration for a variety of users. For organizations that have been granted a photocopy license by the CCC,
a separate system of payment has been arranged.

Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used
only for identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com

and the CRC Press Web site at


http://www.crcpress.com
To
Jim, David, and Jacob
Preface to the Second Edition
This new edition has been updated to include new material. Specifically,
this new edition has added sections on the following material:
• Generalized Minimal Residual (GMRES) methods
• Numerical differentiation
• Secant method
• Homotopy and continuation methods
• Power method for computing dominant eigenvalues
• Singular-value decomposition and pseudoinverses
• Matrix pencil method
and a significant revision of the Optimization chapter (Chapter 6) to include
linear and quadratic programming methods.
A course structure would typically include the following chapters in se-
quence: Chapter 1, 2, and 3. From this point, any of the chapters can follow
without loss of consistency. I have tried to structure each chapter to give the
reader an overview of the methods with salient examples. In many cases how-
ever, it is not possible to give an exhaustive coverage of the material; many
topics have decades of work devoted to their development.
Many of the methods presented in this book have commercial software
packages that will accomplish their solution far more rigorously with many
failsafe attributes included (such as accounting for ill-conditioning, etc.). It is
not my intent to make students experts in each topic, but rather to develop an
appreciation for the methods behind the packages. Many commercial packages
provide default settings or choices of parameters for the user; through better
understanding of the methods driving the solution, informed users can make
better choices and have a better understanding of the situations in which the
methods may fail. If this book provides any reader with more confidence in
using commercial packages, I have succeeded in my intent.
As before, I am indebted to many people: my husband Jim and my children
David and Jacob for making every day a joy, my parents Lowell and Sondra
for their continuing support, and Frieda Adams for all she does to help me
succeed.
Mariesa L. Crow
Rolla, Missouri
2009
Preface to the First Edition
This book is the outgrowth of a graduate course that I’ve taught at the
University of Missouri-Rolla for the past decade or so. Over the years, I’ve
used a number of excellent textbooks for this course, but each textbook was
always missing some of the topics that I wanted to cover in the class. After
relying on handouts for many years, my good friend Leo Grigsby encouraged
me to put them down in the form of a book (if arm-twisting can be called
encouragement . . . ). With the support of my graduate students, who I used
as testbeds for each chapter, this book gradually came into existence. I hope
that those who read this book will find this field as stimulating as I have found
it.
In addition to Leo and the fine people at CRC Press, I’m grateful to the Uni-
versity of Missouri-Rolla administration and the Department of Electrical and
Computer Engineering for providing the environment to nurture my teaching
and research and giving me the latitude to pursue my personal interests in
this field.
Lastly, I don’t often get the opportunity to publicly acknowledge the people
who’ve been instrumental in my professional development. I’d like to thank:
Marija Ilic, who initially put me on the path; Peter Sauer, who encouraged
me along the way; Jerry Heydt, for providing inspiration; Frieda Adams, for
all she does to make my life easier; Steve Pekarek, for putting up with my
grumbling and complaining; and Lowell and Sondra Crow for making it all
possible.

Mariesa L. Crow
Rolla, Missouri
2003
Contents

1 Introduction 1

2 The Solution of Linear Systems 3


2.1 Gaussian Elimination . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 LU Factorization . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.1 LU Factorization with Partial Pivoting . . . . . . . . . 16
2.2.2 LU Factorization with Complete Pivoting . . . . . . . 20
2.3 Condition Numbers and Error Propagation . . . . . . . . . . 22
2.4 Relaxation Methods . . . . . . . . . . . . . . . . . . . . . . . 23
2.5 Conjugate Gradient Methods . . . . . . . . . . . . . . . . . . 28
2.6 Generalized Minimal Residual Algorithm (GMRES) . . . . . 34
2.7 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

3 Systems of Nonlinear Equations 45


3.1 Fixed Point Iteration . . . . . . . . . . . . . . . . . . . . . . . 46
3.2 Newton-Raphson Iteration . . . . . . . . . . . . . . . . . . . . 53
3.2.1 Convergence Properties . . . . . . . . . . . . . . . . . 56
3.2.2 The Newton-Raphson for Systems of Nonlinear Equa-
tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
3.2.3 Modifications to the Newton-Raphson Method . . . . 60
3.3 Continuation Methods . . . . . . . . . . . . . . . . . . . . . . 62
3.4 Secant Method . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.5 Numerical Differentiation . . . . . . . . . . . . . . . . . . . . 68
3.6 Power System Applications . . . . . . . . . . . . . . . . . . . 72
3.6.1 Power Flow . . . . . . . . . . . . . . . . . . . . . . . . 72
3.6.2 Regulating Transformers . . . . . . . . . . . . . . . . . 80
3.6.3 Decoupled Power Flow . . . . . . . . . . . . . . . . . . 84
3.6.4 Fast Decoupled Power Flow . . . . . . . . . . . . . . . 86
3.6.5 PV Curves and Continuation Power Flow . . . . . . . 89
3.6.6 Three-Phase Power Flow . . . . . . . . . . . . . . . . . 96
3.7 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

4 Sparse Matrix Solution Techniques 103


4.1 Storage Methods . . . . . . . . . . . . . . . . . . . . . . . . . 104
4.2 Sparse Matrix Representation . . . . . . . . . . . . . . . . . . 109
4.3 Ordering Schemes . . . . . . . . . . . . . . . . . . . . . . . . . 111
4.3.1 Scheme 0 . . . . . . . . . . . . . . . . . . . . . . . . . 119
4.3.2 Scheme I . . . . . . . . . . . . . . . . . . . . . . . . . . 120
4.3.3 Scheme II . . . . . . . . . . . . . . . . . . . . . . . . . 126
4.3.4 Other Schemes . . . . . . . . . . . . . . . . . . . . . . 129
4.4 Power System Applications . . . . . . . . . . . . . . . . . . . 130
4.5 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

5 Numerical Integration 139


5.1 One-Step Methods . . . . . . . . . . . . . . . . . . . . . . . . 140
5.1.1 Taylor Series-Based Methods . . . . . . . . . . . . . . 140
5.1.2 Forward-Euler Method . . . . . . . . . . . . . . . . . . 141
5.1.3 Runge-Kutta Methods . . . . . . . . . . . . . . . . . . 141
5.2 Multistep Methods . . . . . . . . . . . . . . . . . . . . . . . . 142
5.2.1 Adams Methods . . . . . . . . . . . . . . . . . . . . . 148
5.2.2 Gear’s Methods . . . . . . . . . . . . . . . . . . . . . . 151
5.3 Accuracy and Error Analysis . . . . . . . . . . . . . . . . . . 152
5.4 Numerical Stability Analysis . . . . . . . . . . . . . . . . . . . 156
5.5 Stiff Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
5.6 Step-Size Selection . . . . . . . . . . . . . . . . . . . . . . . . 167
5.7 Differential-Algebraic Equations . . . . . . . . . . . . . . . . . 170
5.8 Power System Applications . . . . . . . . . . . . . . . . . . . 173
5.8.1 Transient Stability Analysis . . . . . . . . . . . . . . . 173
5.8.2 Mid-Term Stability Analysis . . . . . . . . . . . . . . . 181
5.9 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

6 Optimization 191
6.1 Least Squares State Estimation . . . . . . . . . . . . . . . . . 192
6.1.1 Weighted Least Squares Estimation . . . . . . . . . . . 195
6.1.2 Bad Data Detection . . . . . . . . . . . . . . . . . . . 198
6.1.3 Nonlinear Least Squares State Estimation . . . . . . . 201
6.2 Linear Programming . . . . . . . . . . . . . . . . . . . . . . . 202
6.2.1 Simplex Method . . . . . . . . . . . . . . . . . . . . . 203
6.2.2 Interior Point Method . . . . . . . . . . . . . . . . . . 207
6.3 Nonlinear Programming . . . . . . . . . . . . . . . . . . . . . 212
6.3.1 Quadratic Programming . . . . . . . . . . . . . . . . . 213
6.3.2 Steepest Descent Algorithm . . . . . . . . . . . . . . . 215
6.3.3 Sequential Quadratic Programming Algorithm . . . . 220
6.4 Power System Applications . . . . . . . . . . . . . . . . . . . 223
6.4.1 Optimal Power Flow . . . . . . . . . . . . . . . . . . . 223
6.4.2 State Estimation . . . . . . . . . . . . . . . . . . . . . 234
6.5 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
7 Eigenvalue Problems 243
7.1 The Power Method . . . . . . . . . . . . . . . . . . . . . . . . 244
7.2 The QR Algorithm . . . . . . . . . . . . . . . . . . . . . . . . 246
7.2.1 Shifted QR . . . . . . . . . . . . . . . . . . . . . . . . 253
7.2.2 Deflation . . . . . . . . . . . . . . . . . . . . . . . . . 254
7.3 Arnoldi Methods . . . . . . . . . . . . . . . . . . . . . . . . . 254
7.4 Singular Value Decomposition . . . . . . . . . . . . . . . . . . 261
7.5 Modal Identification . . . . . . . . . . . . . . . . . . . . . . . 264
7.5.1 Prony Method . . . . . . . . . . . . . . . . . . . . . . 266
7.5.2 The Matrix Pencil Method . . . . . . . . . . . . . . . 268
7.5.3 The Levenberg-Marquardt Method . . . . . . . . . . . 269
7.5.4 The Hilbert Transform . . . . . . . . . . . . . . . . . . 272
7.5.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 273
7.6 Power System Applications . . . . . . . . . . . . . . . . . . . 278
7.6.1 Participation Factors . . . . . . . . . . . . . . . . . . . 278
7.7 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

Index 283

References 289
1
Introduction

In today’s deregulated environment, the nation’s electric power network is


being forced to operate in a manner for which it was not intentionally de-
signed. Therefore, system analysis is very important to predict and continu-
ally update the operating status of the network. This includes estimating the
current power flows and bus voltages (Power Flow Analysis and State Esti-
mation), determining the stability limits of the system (Continuation Power
Flow, Numerical Integration for Transient Stability, and Eigenvalue Analy-
sis), and minimizing costs (Optimal Power Flow). This book provides an
introductory study of the various computational methods that form the basis
of many analytical studies in power systems and other engineering and sci-
ence fields. This book provides the analytical background of the algorithms
used in numerous commercial packages. By understanding the theory behind
many of the algorithms, the reader/user can better use the software and make
more informed decisions (i.e., choice of integration method and step-size in
simulation packages).
Due to the sheer size of the power grid, hand-based calculations are nearly
impossible and computers offer the only truly viable means for system anal-
ysis. The power industry is one of the largest users of computer technology
and one of the first industries to embrace the potential of computer analy-
sis when mainframes first became available. Although the first algorithms
for power system analysis were developed in the 1940’s, it wasn’t until the
1960’s when computer usage became widespread within the power industry.
Many of the analytical techniques and algorithms used today for the simula-
tion and analysis of large systems were originally developed for power system
applications.
As power systems increasingly operate under stressed conditions, computer
simulation will play a large role in control and security assessment. Commer-
cial packages routinely fail or give erroneous results when used to simulate
stressed systems. Understanding of the underlying numerical algorithms is
imperative to correctly interpret the results of commercial packages. For
example, will the system really exhibit the simulated behavior or is the sim-
ulation simply an artifact of a numerical inaccuracy? The educated user can
make better judgments about how to compensate for numerical shortcom-
ings in such packages, either by better choice of simulation parameters or by
posing the problem in a more numerically tractable manner. This book will
provide the background for a number of widely used numerical algorithms that

1
2 Computational Methods for Electric Power Systems

underlie many commercial packages for power system analysis and design.
This book is intended to be used as a text in conjunction with a semester-
long graduate level course in computational algorithms. While the majority
of examples in this text are based on power system applications, the theory is
presented in a general manner so as to be applicable to a wide range of engi-
neering systems. Although some knowledge of power system engineering may
be required to fully appreciate the subtleties of some of the illustrations, such
knowledge is not a prerequisite for understanding the algorithms themselves.
The text and examples are used to provide an introduction to a wide range
of numerical methods without being an exhaustive reference. Many of the
algorithms presented in this book have been the subject of numerous modifi-
cations and are still the object of on-going research. As this text is intended to
provide a foundation, many of these new advances are not explicitly covered,
but are rather given as references for the interested reader. The examples in
this text are intended to be simple and thorough enough to be reproduced
easily. Most “real world” problems are much larger in size and scope, but the
methodologies presented in this text should sufficiently prepare the reader to
cope with any difficulties he/she may encounter.
Most of the examples in this text were produced using code written in
MatlabT M . Although this was the platform used by the author, in practice,
any computer language may be used for implementation. There is no practical
reason for a preference for any particular platform or language.
2
The Solution of Linear Systems

In many branches of engineering and science it is desirable to be able to math-


ematically determine the state of a system based on a set of physical relation-
ships. These physical relationships may be determined from characteristics
such as circuit topology, mass, weight, or force to name a few. For example,
the injected currents, network topology, and branch impedances govern the
voltages at each node of a circuit. In many cases, the relationship between
the known, or input, quantities and the unknown, or output, states is a linear
relationship. Therefore, a linear system may be generically modeled as

Ax = b (2.1)

where b is the n × 1 vector of known quantities, x is the n × 1 unknown state


vector, and A is the n × n matrix that relates x to b. For the time being, it
will be assumed that the matrix A is invertible, or non-singular; thus, each
vector b will yield a unique corresponding vector x. Thus the matrix A−1
exists and
x∗ = A−1 b (2.2)
is the unique solution to equation (2.1).
The natural approach to solving equation (2.1) is to directly calculate the
inverse of A and multiply it by the vector b. One method to calculate A−1 is
to use Cramer’s rule :
1
A−1 (i, j) =
T
(Aij ) for i = 1, . . . , n, j = 1, . . . , n (2.3)
det(A)

where A−1 (i, j) is the ij th entry of A−1 and Aij is the cofactor of each entry
aij of A. This method requires the calculation of (n + 1) determinants which
results in 2(n + 1)! multiplications to find A−1 ! For large values of n, the
calculation requirement grows too rapidly for computational tractability; thus,
alternative approaches have been developed.
Basically there are two approaches to solving equation (2.1):

• The direct methods, or elimination methods, find the exact solution


(within the accuracy of the computer) through a finite number of arith-
metic operations. The solution x of a direct method would be completely
accurate were it not for computer roundoff errors.

3
4 Computational Methods for Electric Power Systems

• Iterative methods, on the other hand, generate a sequence of (hopefully)


progressively improving approximations to the solution based on the
application of the same computational procedure at each step. The
iteration is terminated when an approximate solution is obtained having
some pre-specified accuracy or when it is determined that the iterates
are not improving.
The choice of solution methodology usually relies on the structure of the
system under consideration. Certain systems lend themselves more amenably
to one type of solution method versus the other. In general, direct methods
are best for full matrices, whereas iterative methods are better for matrices
that are large and sparse. But as with most generalizations, there are notable
exceptions to this rule of thumb.

2.1 Gaussian Elimination


An alternate method for solving equation (2.1) is to solve for x without cal-
culating A−1 explicitly. This approach is a direct method of linear system
solution, since x is found directly. One common direct method is the method
of Gaussian elimination. The basic idea behind Gaussian elimination is to use
the first equation to eliminate the first unknown from the remaining equations.
This process is repeated sequentially for the second unknown, the third un-
known, etc., until the elimination process is completed. The n-th unknown
is then calculated directly from the input vector b. The unknowns are then
recursively substituted back into the equations until all unknowns have been
calculated.
Gaussian elimination is the process by which the augmented n × (n + 1)
matrix
[A | b ]
is converted to the n × (n + 1) matrix

[I | b∗ ]

through a series of elementary row operations, where

Ax = b
−1
A Ax = A−1 b
Ix = A−1 b = b∗
x∗ = b∗

Thus if a series of elementary row operations exist that can transform the
matrix A into the identity matrix I, then the application of the same set of
The Solution of Linear Systems 5

elementary row operations will also transform the vector b into the solution
vector x∗ .
An elementary row operation consists of one of three possible actions that
can be applied to a matrix:

• interchange any two rows of the matrix

• multiply any row by a constant

• take a linear combination of rows and add it to another row

The elementary row operations are chosen to transform the matrix A into
an upper triangular matrix that has ones on the diagonal and zeros in the
sub-diagonal positions. This process is known as the forward elimination
step. Each step in the forward elimination can be obtained by successively
pre-multiplying the matrix A by an elementary matrix ξ, where ξ is the matrix
obtained by performing an elementary row operation on the identity matrix.

Example 2.1
Find a sequence of elementary matrices that when applied to the following
matrix will produce an upper triangular matrix.
⎡ ⎤
1348
⎢2 1 2 3⎥
A=⎢ ⎣4 3 5 8⎦

9274

Solution 2.1 To upper triangularize the matrix, the elementary row oper-
ations will need to systematically zero out each column below the diagonal.
This can be achieved by replacing each row of the matrix below the diagonal
with the difference of the row itself and a constant times the diagonal row,
where the constant is chosen to result in a zero sum in the column under the
diagonal. Therefore row 2 of A is replaced by (row 2 - 2(row 1)) and the
elementary matrix is
⎡ ⎤
1 0 0 0
⎢ −2 1 0 0 ⎥
ξ1 = ⎢ ⎥
⎣ 0 0 1 0⎦
0 0 0 1
and ⎡ ⎤
1 3 4 8
⎢ 0 −5 −6 −13 ⎥
ξ1 A = ⎢
⎣4 3 5

8⎦
9 2 7 4
6 Computational Methods for Electric Power Systems

Note that all rows except row 2 remain the same and row 2 now has a 0 in
the column under the first diagonal. Similarly the two elementary matrices
that complete the elimination of the first column are:
⎡ ⎤
1 0 0 0
⎢ 0 1 0 0⎥
ξ2 = ⎢⎣ −4 0 1 0 ⎦

0 0 0 1
⎡ ⎤
1 0 0 0
⎢ 0 1 0 0⎥
ξ3 = ⎢⎣ 0 0 1 0⎦

−9 0 0 1
and ⎡ ⎤
1 3 4 8
⎢ 0 −5 −6 −13 ⎥
ξ3 ξ2 ξ1 A = ⎢
⎣ 0 −9 −11 −24 ⎦
⎥ (2.4)
0 −25 −29 −68
The process is now applied to the second column to zero out everything below
the second diagonal and scale the diagonal to one. Therefore
⎡ ⎤
1 0 0 0
⎢0 1 0 0⎥
ξ4 = ⎢⎣0 −9 1 0⎦

5
0 0 0 1
⎡ ⎤
1 0 0 0
⎢0 1 0 0⎥
ξ5 = ⎢⎣0

0 1 0⎦
0 − 25
5 0 1
⎡ ⎤
1 0 0 0
⎢0 −1 0 0⎥
ξ6 = ⎢ 5
⎣0 0 1 0⎦

0 0 0 1

Similarly, ⎡ ⎤
1 3 4 8
⎢0 1 65 13 ⎥
ξ6 ξ5 ξ4 ξ3 ξ2 ξ1 A = ⎢
⎣0
5 ⎥ (2.5)
0 − 15 − 53 ⎦
0 0 1 −3
Similarly,
⎡ ⎤
1 00 0
⎢0 10 0⎥
ξ7 = ⎢
⎣0

01 0⎦
0 05 1
The Solution of Linear Systems 7
⎡ ⎤
1 0 0 0
⎢0 1 0 0⎥
ξ8 = ⎢
⎣0

0 −5 0⎦
0 0 0 1

yielding
⎡ ⎤
1 3 4 8
⎢0 1 65 13 ⎥
ξ8 ξ7 ξ6 ξ5 ξ4 ξ3 ξ2 ξ1 A = ⎢
⎣0
5 ⎥ (2.6)
0 1 3⎦
0 0 0 −6
Lastly,
⎡ ⎤
1 0 0 0
⎢0 1 0 0⎥

ξ9 = ⎣ ⎥
0 0 1 0⎦
0 0 0 − 16
and ⎡ ⎤
1 34 8
⎢0 1 65 13 ⎥
ξ9 ξ8 ξ7 ξ6 ξ5 ξ4 ξ3 ξ2 ξ1 A = ⎢
⎣0
5 ⎥ (2.7)
01 3 ⎦
0 00 1
which completes the upper triangularization process.
Once an upper triangular matrix has been achieved, the solution vector x∗
can be found by successive substitution (or back substitution) of the states.

Example 2.2
Using the upper triangular matrix of Example 2.1, find the solution to
⎡ ⎤⎡ ⎤ ⎡ ⎤
1348 x1 1
⎢ 2 1 2 3 ⎥ ⎢ x2 ⎥ ⎢ 1 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎣ 4 3 5 8 ⎦ ⎣ x3 ⎦ = ⎣ 1 ⎦
9274 x4 1

Solution 2.2 Note that the product of a series of lower triangular matrices
is lower triangular; therefore, the product

W = ξ9 ξ8 ξ7 ξ6 ξ5 ξ4 ξ3 ξ2 ξ1 (2.8)

is lower triangular. Since the application of the elementary matrices to the


matrix A results in an upper triangular matrix, then

WA = U (2.9)
8 Computational Methods for Electric Power Systems

where U is the upper triangular matrix that results from the forward elimi-
nation process. Premultiplying equation (2.1) by W yields

W Ax = W b (2.10)
Ux = Wb (2.11)
= b (2.12)

where W b = b .
From Example 2.1: ⎡ ⎤
1
0 0 0
⎢ 2 −1 0 0⎥
W =⎢ 5 5
⎣ 2 9 −5 0 ⎦

1 14 5 1
6 6 −6 −6

and ⎡ ⎤ ⎡ ⎤
1 1
⎢ 1 ⎥ ⎢ 1⎥
b = W ⎢ ⎥ ⎢5⎥
⎣1⎦ = ⎣ 6 ⎦
3
1 2

Thus, ⎡ ⎤⎡ ⎤ ⎡ ⎤
13 4 8 x1 1
⎢ 0 1 6 13 ⎥ ⎢ x2 ⎥ ⎢ 1 ⎥
⎢ 5 5 ⎥⎢ ⎥ ⎢5⎥
⎣ 0 0 1 3 ⎦ ⎣ x3 ⎦ = ⎣ 6 ⎦ (2.13)
3
00 0 1 x4 2

By inspection, x4 = 32 . The third row yields

x3 = 6 − 3x4 (2.14)

Substituting the value of x4 into equation (2.14) yields x3 = 32 . Similarly,

1 6 13
x2 = − x3 − x4 (2.15)
5 5 5

and substituting x3 and x4 into equation (2.15) yields x2 = − 11


2 . Solving for
x1 in a similar manner produces

x1 = 1 − 3x2 − 4x3 − 8x4 (2.16)


1
=− (2.17)
2
Thus, ⎡ ⎤ ⎡ ⎤
x1 −1
⎢ x2 ⎥ 1 ⎢ −11 ⎥
⎢ ⎥= ⎢ ⎥
⎣ x3 ⎦ 2 ⎣ 3 ⎦
x4 3
The Solution of Linear Systems 9

The solution methodology of successively substituting values of x back into


the equation as they are found gives rise to the name of back substitution for
this step of the Gaussian elimination. Therefore, Gaussian elimination con-
sists of two main steps: forward elimination and back substitution. Forward
elimination is the process of transforming the matrix A into triangular factors.
Back substitution is the process by which the unknown vector x is found from
the input vector b and the factors of A. Gaussian elimination also provides
the framework under which the LU factorization process is developed.

2.2 LU Factorization
The forward elimination step of Gaussian elimination produces a series of
upper and lower triangular matrices that are related to the A matrix as given
in equation (2.9). The matrix W is a lower triangular matrix and U is an
upper triangular matrix with ones on the diagonal. Recall that the inverse of
a lower triangular matrix is also a lower triangular matrix; therefore, if

L = W −1
then
A = LU
The matrices L and U give rise to the name of the factorization/elimination
algorithm known as “LU factorization.” In fact, given any nonsingular matrix
A, there exists some permutation matrix P (possibly P = I), such that
LU = P A (2.18)
where U is upper triangular with unit diagonals, L is lower triangular with
nonzero diagonals, and P is a matrix of ones and zeros obtained by rearranging
the rows and columns of the identity matrix. Once a proper matrix P is
chosen, this factorization is unique [6]. Once P, L, and U are determined,
then the system
Ax = b (2.19)
can be solved expeditiously. Premultiplying equation (2.19) by the matrix P
yields
P Ax = P b = b (2.20)
LU x = b (2.21)
where b is just a rearrangement of the vector b. Introducing a “dummy”
vector y such that
Ux = y (2.22)
10 Computational Methods for Electric Power Systems

thus
Ly = b (2.23)
Consider the structure of equation (2.23):
⎡ ⎤⎡ ⎤ ⎡  ⎤
l11 0 0 ··· 0 y1 b1
⎢ l21 l22 0 · · · 0 ⎥ ⎢ y2 ⎥ ⎢ b2 ⎥
⎢ ⎥⎢ ⎥ ⎢  ⎥
⎢ l31 l32 l33 · · · 0 ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ y3 ⎥ = ⎢ b3 ⎥
⎢ .. .. .. . . .. ⎥ ⎢ .. ⎥ ⎢ .. ⎥
⎣ . . . . . ⎦⎣ . ⎦ ⎣ . ⎦
ln1 ln2 ln3 · · · lnn yn bn
The elements of the vector y can be found by straightforward substitution:
b1
y1 =
l11
1 
y2 = (b − l21 y1 )
l22 2
1 
y3 = (b − l31 y1 − l32 y2 )
l33 3
..
. ⎛ ⎞
n−1
1 ⎝ 
yn = bn − lnj yj ⎠
lnn j=1

After the vector y has been found, then x can be easily found from
⎡ ⎤
1 u12 u13 · · · u1n ⎡ x1 ⎤ ⎡ y1 ⎤
⎢ 0 1 u23 · · · u2n ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ x2 ⎥ ⎢ y2 ⎥
⎢ 0 0 1 · · · u3n ⎥ ⎢
⎢ ⎥ ⎢ x3 ⎥ ⎢ ⎥
⎥ = ⎢ y3 ⎥
⎢ .. .. .. . . .. ⎥ ⎢ ⎢ ⎥ ⎢ . ⎥
⎢. . . ⎥ .
⎦ ⎣ .. ⎦ ⎣ .. ⎦
. .

.
0 0 0 .. 1 xn yn

Similarly, the solution vector x can be found by backward substitution:


xn = yn
xn−1 = yn−1 − un−1,n xn
xn−2 = yn−2 − un−2,n xn − un−2,n−1 xn−1
..
.
n
x1 = y1 − u1j xj
j=2

The value of LU factorization is that once A is factored into the upper and
lower triangular matrices, the solution for the solution vector x is straightfor-
ward. Note that the inverse to A is never explicitly found.
The Solution of Linear Systems 11
(2)

(4)
(6)

Q= (1)
(3)

(5)

FIGURE 2.1
Order of calculating columns and rows of Q

Several methods for computing the LU factors exist and each method has its
advantages and disadvantages. One common factorization approach is known
as the Crout’s algorithm for finding the LU factors [6]. Let the matrix Q be
defined as ⎡ ⎤
l11 u12 u13 · · · u1n
⎢ l21 l22 u23 · · · u2n ⎥
⎢ ⎥
⎢ ⎥
Q = L + U − I = ⎢ l31 l32 l33 · · · u3n ⎥

(2.24)
⎢ .. .. .. . . .. ⎥
⎣ . . . . . ⎦
ln1 ln2 ln3 · · · lnn
Crout’s algorithm computes the elements of Q first by column and then row
as shown in Figure 2.1. Each element qij of Q depends only on the aij entry
of A and previously computed values of Q.
Crout’s Algorithm for Computing LU from A
1. Initialize Q to the zero matrix. Let j = 1.
2. Complete the j th column of Q (j th column of L) as
j−1
qkj = akj − qki qij for k = j, . . . , n (2.25)
i=1

3. If j = n, then stop.
4. Assuming that qjj = 0, complete the j th row of Q (j th row of U ) as
j−1

1
qjk = ajk − qji qik for k = j + 1, . . . , n (2.26)
qjj i=1

5. Set j = j + 1. Go to step 2.
12 Computational Methods for Electric Power Systems

Once the LU factors are found, then the dummy vector y can be found by
forward substitution:
⎛ ⎞
k−1
1 ⎝
yk = bk − qkj yj ⎠ for k = 1, . . . , n (2.27)
qkk j=1

Similarly, the solution vector x can be found by backward substitution:


n
xk = yk − qkj xj for k = n, n − 1, . . . , 1 (2.28)
j=k+1

One measure of the computation involved in the LU factorization process


is to count the number of multiplications and divisions required to find the
solution since these are both floating point operations. Computing the j th
column of Q (j th column of L) requires
n n
(j − 1)
j=1 k=j

multiplications and divisions. Similarly, computing the j th row of Q (j th row


of U ) requires
n−1 n
j
j=1 k=j+1

multiplications and divisions. The forward substitution step requires


n
j
j=1

and the backward substitution step requires


n
(n − j)
j=1

multiplications and divisions. Taken together, the LU factorization procedure


requires
1 3 
n −n
3
and the substitution steps require n2 multiplications and divisions. Therefore
the whole process of solving the linear system of equation (2.1) requires a
total of
1 3 
n − n + n2 (2.29)
3
The Solution of Linear Systems 13

multiplications and divisions. Compare this to the requirements of Cramer’s


rule which requires 2(n+1)! multiplications and divisions. Obviously for a
system of any significant size, it is far more computationally efficient to use
LU factorization and forward/backward substitution to find the solution x.

Example 2.3
Using LU factorization with forward and backward substitution, find the so-
lution to the system of Example 2.2.

Solution 2.3 The first step is to find the LU factors of the A matrix:
⎡ ⎤
1348
⎢2 1 2 3⎥
A=⎢ ⎥
⎣4 3 5 8⎦
9274

Starting with j = 1, equation (2.25) indicates that the elements of the first
column of Q are identical to the elements of the first column of A. Similarly,
according to equation (2.26), the first row of Q becomes:

a12 3
q12 = = =3
q11 1
a13 4
q13 = = =4
q11 1
a14 8
q14 = = =8
q11 1

Thus for j = 1, the Q matrix becomes:


⎡ ⎤
1348
⎢2 ⎥
Q=⎢ ⎣4


9

For j = 2, the second column and row of Q below and to the right of the
diagonal, respectively, will be calculated. For the second column of Q:

q22 = a22 − q21 q12 = 1 − (2)(3) = −5


q32 = a32 − q31 q12 = 3 − (4)(3) = −9
q42 = a42 − q41 q12 = 2 − (9)(3) = −25

Each element of Q uses the corresponding element of A and elements of Q


that have been previously computed. Note also that the inner indices of
the products are always the same and the outer indices are the same as the
indices of the element being computed. This holds true for both column and
14 Computational Methods for Electric Power Systems

row calculations. The second row of Q is computed:

1 1 6
q23 = (a23 − q21 q13 ) = (2 − (2)(4)) =
q22 −5 5
1 1 13
q24 = (a24 − q21 q14 ) = (3 − (2)(8)) =
q22 −5 5

After j = 2, the Q matrix becomes:


⎡ ⎤
1 3 4 8
⎢ 2 −5 6 13 ⎥
Q=⎢⎣ 4 −9
5 5 ⎥

9 −25

Continuing on for j = 3, the third column of Q is calculated


 
6 1
q33 = a33 − (q31 q13 + q32 q23 ) = 5 − (4)(4) + (−9) =−
5 5
 
6
q43 = a43 − (q41 q13 + q42 q23 ) = 7 − (9)(4) + (−25) =1
5

and the third row of Q becomes

1
q34 = (a34 − (q31 q14 + q32 q24 ))
q33
   
13
= (−5) 8 − (4)(8) + (−9) =3
5

yielding
⎡ ⎤
1 3 4 8
⎢ 2 −5 6 13 ⎥
Q=⎢ 5 5 ⎥
⎣ 4 −9 − 1 3 ⎦
5
9 −25 1
Lastly, for j = 4, the final diagonal element is found:

q44 = a44 − (q41 q14 + q42 q24 + q43 q34 )


   
13
= 4 − (9)(8) + (−25) + (3)(1) = −6
5

Thus:
⎡ ⎤
1 3 4 8
⎢ 2 −5 6 13 ⎥
Q=⎢ 5 5 ⎥
⎣ 4 −9 − 1 3 ⎦
5
9 −25 1 −6
The Solution of Linear Systems 15
⎡ ⎤
1 0 0 0
⎢2 −5 0 0 ⎥
L=⎢⎣4

−9 − 15 0 ⎦
9 −25 1 −6
⎡ ⎤
1 3 4 8
⎢0 1 65 13 ⎥
U =⎢
⎣0
5 ⎥
0 1 3⎦
0 0 0 1

One method of checking the correctness of the solution is to check if LU =


A, which in this case it does.
Once the LU factors have been found, then the next step in the solution
process is the forward elimination using the L matrix and the b vector to find
the dummy vector y. Using forward substitution to solve Ly = b for y:

b1 1
y1 = = =1
L11 1
(b2 − L21 y1 ) (1 − (2)(1)) 1
y2 = = =
L22 −5 5
  
(b3 − (L31 y1 + L32 y2 )) 1
y3 = = (−5) 1 − (4)(1) + (−9) =6
L33 5
(b4 − (L41 y1 + L42 y2 + L43 y3 ))
y4 =
L44
    
1 − (9)(1) + (−25) 15 + (1)(6) 3
= =
−6 2

Thus ⎡ ⎤
1
⎢1⎥

y=⎣5⎥
6⎦
3
2

Similarly, backward substitution is then applied to U x = y to find the solution


vector x:
3
x4 = y4 =
2  
3 3
x3 = y3 − U34 x4 = 6 − (3) =
2 2
       
1 13 3 6 3 11
x2 = y2 − (U24 x4 + U23 x3 ) = − + =−
5 5 2 5 2 2
x1 = y1 − (U14 x4 + U13 x3 + U12 x2 )
      
3 3 11 1
= 1 − (8) + (4) + (3) − =−
2 2 2 2
16 Computational Methods for Electric Power Systems

yielding the final solution vector


⎡ ⎤
−1
1 ⎢ −11 ⎥
x= ⎢ ⎥
2 ⎣ 3⎦
3

which is the same solution found by Gaussian elimination and backward sub-
stitution in Example 2.2. A quick check to verify the correctness of the solution
is to substitute the solution vector x back into the linear system Ax = b.

2.2.1 LU Factorization with Partial Pivoting


The LU factorization process presented assumes that the diagonal element is
non-zero. Not only must the diagonal element be non-zero, it must be on
the same order of magnitude as the other non-zero elements. Consider the
solution of the following linear system:
 −10     
10 1 x1 1
= (2.30)
2 1 x2 5

By inspection, the solution to this linear system is

x1 ≈ 2
x2 ≈ 1

The LU factors for A are


 
10−10  0 
L=
2 1 − 2 × 1010
 
1 1010
U =
0 1

Applying forward elimination to solve for the dummy vector y yields:

y1 = 1010
 
5 − 2 × 1010
y2 = ≈1
(1 − 2 × 1010 )

Back substituting y into U x = y yields

x2 = y2 ≈ 1
x1 = 1010 − 1010 x2 ≈ 0

The solution for x2 is correct, but the solution for x1 is considerably off. Why
did this happen? The problem with the equations arranged the way they are
The Solution of Linear Systems 17

in equation (2.30) is that 10−10 is too near zero for most computers. However,
if the equations are rearranged such that
    
2 1 x1 5
= (2.31)
10−10 1 x2 1

then the LU factors become


 
2  0 
L= 1
10−10 1 − 2 × 10−10
 1
1 2
U =
01

The dummy vector y becomes

5
y1 =
2 5

1− 2 × 10−10
y2 =  1
 ≈1
1− 2 × 10−10

and by back substitution, x becomes

x2 ≈ 1
5 1
x1 ≈ − (1) = 2
2 2
which is the solution obtained by inspection of the equations. Therefore even
though the diagonal entry may not be exactly zero, it is still good practice to
rearrange the equations such that the largest magnitude element lies on the
diagonal. This process is known as pivoting and gives rise to the permutation
matrix P of equation (2.18).
Since the Crout’s algorithm computes the Q matrix by column and row
with increasing index, only partial pivoting can used, that is, only the rows
of Q (and correspondingly A) can be exchanged. The columns must remain
static. To choose the best pivot, the column beneath the j th diagonal (at the
j th step in the LU factorization) is searched for the element with the largest
absolute value. The corresponding row and the j th row are then exchanged.
The pivoting strategy may be succinctly expressed as:
Partial Pivoting Strategy

1. At the j th step of LU factorization, choose the k th row as the exchange


row such that
|qjj | = max |qkj | for k = j, . . . , n (2.32)

2. Exchange rows and update A, P, and Q correspondingly.


18 Computational Methods for Electric Power Systems

The permutation matrix P is comprised of ones and zeros and is obtained as


the product of a series of elementary permutation matrices P j,k which repre-
sent the exchange of rows j and k. The elementary permutation matrix P j,k ,
shown in Figure 2.2, is obtained from the identify matrix by interchanging
rows j and k. A pivot is achieved by the pre-multiplication of a properly cho-
sen P j,k . Since this is only an interchange of rows, the order of the unknown
vector does not change.

j k

1
1
1

1
0 1 j
1

P jk =
1
1 0 k
1

1
1
1

FIGURE 2.2
Elementary permutation matrix P j,k

Example 2.4
Repeat Example 2.3 using partial pivoting.

Solution 2.4 The A matrix is repeated here for convenience.


⎡ ⎤
1348
⎢2 1 2 3⎥
A=⎢ ⎥
⎣4 3 5 8⎦
9274

For j = 1, the first column of Q is exactly the first column of A. Applying


The Solution of Linear Systems 19

the pivoting strategy of equation (2.32), the q41 element has the largest mag-
nitude of the first column; therefore, rows four and one are exchanged. The
elementary permutation matrix P 1,4 is
⎡ ⎤
0001
⎢0 1 0 0⎥
P 1,4 = ⎢
⎣0 0 1 0⎦

1000
The corresponding A matrix becomes
⎡ ⎤
9 274
⎢2 1 2 3⎥
A=⎢ ⎣4

3 5 8⎦
1 348
and Q at the j = 1 step: ⎡ ⎤
2 7 4
9 9 9 9
⎢2 ⎥
Q=⎢
⎣4


1
At j = 2, the calculation of the second column of Q yields
⎡ 2 7 4⎤
9 9 9 9
⎢2 5 ⎥
Q=⎢ ⎣4
9
19


9
1 25
9

Searching the elements in the j th column below the diagonal, the fourth row of
the j th (i.e., second) column once again yields the largest magnitude. There-
fore rows two and four must be exchanged, yielding the elementary permuta-
tion matrix P 2,4 : ⎡ ⎤
1000
⎢0 0 0 1⎥
P 2,4 = ⎢
⎣0 0 1 0⎦

0100
Similarly, the updated A is ⎡ ⎤
927 4
⎢1 3 4 8⎥
⎢ ⎥
⎣4 3 5 8⎦
212 3
which yields the following Q:
⎡ 2 7 4

9 9 9 9
⎢1 25 29 68 ⎥
Q=⎢
⎣4
9 25 25
19


9
5
2 9
20 Computational Methods for Electric Power Systems

For j = 3, the calculation of the third column of Q yields:


⎡ 2 7 4

9 9 9 9
⎢ 1 25 29 68 ⎥
Q=⎢ 9 25 25 ⎥
⎣ 4 19 − 14 ⎦
9 25
2 59 − 15
In this case, the diagonal element has the largest magnitude, so no pivoting
is required. Continuing with the calculation of the 3rd row of Q yields:
⎡ 2 7 4

9 9 9 9
⎢ 1 25 29 68 ⎥
Q=⎢ 9 25 25 ⎥
⎣ 4 19 − 14 − 12 ⎦
9 25 14
2 59 − 51
Lastly, calculating q44 yields the final Q matrix:
⎡ 2 7 4

9 9 9 9
⎢ 1 25 29 68 ⎥
Q=⎢ 9 25 25 ⎥
⎣ 4 19 − 14 − 12 ⎦
9 25 14
2 59 − 51 3
7

The permutation matrix P is found by multiplying together the two ele-


mentary permutation matrices:
2,4 1,4
P =P
⎡ P I⎤
0001
⎢1 0 0 0⎥
=⎢
⎣0 0 1 0⎦

0100
The results can be checked to verify that P A = LU . The forward and back-
ward substitution steps are carried out on the modified vector b = P b.

2.2.2 LU Factorization with Complete Pivoting


An alternate LU factorization that allows complete pivoting is the Gauss’
method. In this approach, two permutation matrices are developed: one for
row exchange as in partial pivoting, and a second matrix for column exchange.
In this approach, the LU factors are found such that

P1 AP2 = LU (2.33)

Therefore to solve the linear system of equations Ax = b requires that a


slightly different approach be used. As with partial pivoting, the permutation
matrix P1 premultiplies the linear system:

P1 Ax = P1 b = b (2.34)
The Solution of Linear Systems 21

Now, define a new vector z such that

x = P2 z (2.35)

Then substituting equation (2.35) into equation (2.34) yields

P1 AP2 z = P1 b = b
LU z = b (2.36)

where equation (2.36) can be solved using forward and backward substitution
for z. Once z is obtained, then the solution vector x follows from equation
(2.35).
In complete pivoting, both rows and columns may be interchanged to
place the largest element (in magnitude) on the diagonal at each step in the
LU factorization process. The pivot element is chosen from the remaining
elements below and to the right of the diagonal.

Complete Pivoting Strategy


1. At the j th step of LU factorization, choose the pivot element such that

|qjj | = max |qkl | for k = j, . . . , n, and l = j, . . . , n (2.37)

2. Exchange rows and update A, P, and Q correspondingly.


Gauss’ Algorithm for Computing LU from A

1. Initialize Q to the zero matrix. Let j = 1.


2. Set the j th column of Q (j th column of L) to the j th column of the
reduced matrix A(j) , where A(1) = A, and
(j)
qkj = akj for k = j, . . . , n (2.38)

3. If j = n, then stop.
4. Assuming that qjj = 0, set the j th row of Q (j th row of U ) as
(j)
ajk
qjk = for k = j + 1, . . . , n (2.39)
qjj

5. Update A(j+1) from A(j) as


(j+1) (j)
aik = aik − qij qjk for i = j + 1, . . . , n, and k = j + 1, . . . , n (2.40)

6. Set j = j + 1. Go to step 2.
22 Computational Methods for Electric Power Systems

This factorization algorithm gives rise to the same number of multiplications


and divisions as Crout’s algorithm for LU factorization. Crout’s algorithm
uses each entry of the A matrix only once, whereas Gauss’ algorithm updates
the A matrix each time. One advantage of Crout’s algorithm over Gauss’
algorithm is each element of the A matrix is used only once. Since each qjk
is a function of ajk and then ajk is never used again, the element qjk can be
written over the ajk element. Therefore, rather than having to store two n× n
matrices in memory (A and Q), only one matrix is required.
The Crout’s and Gauss’ algorithms are only two of numerous algorithms
for LU factorization. Other methods include Doolittle and bifactorization
algorithms [20], [26], [49]. Most of these algorithms require similar numbers
of multiplications and divisions and only differ slightly in performance when
implemented on traditional serial computers. However, these algorithms differ
considerably when factors such as memory access, storage, and parallelization
are considered. Consequently, it is wise to choose the factorization algorithm
to fit the application and the computer architecture upon which it will be
implemented.

2.3 Condition Numbers and Error Propagation


The Gaussian elimination and LU factorization algorithms are considered di-
rect methods because they calculate the solution vector x∗ = A−1 b in a finite
number of steps without an iterative refinement. On a computer with infinite
precision, direct methods would yield the exact solution x∗ . However, since
computers have finite precision, the solution obtained has limited accuracy.
The condition number of a matrix is a useful measure for determining the level
of accuracy of a solution. The condition number of the matrix A is generally
defined as 
λmax
κ (A) = (2.41)
λmin
where λmax and λmin denote the largest and smallest eigenvalues of the matrix
AT A. These eigenvalues are real and non-negative regardless of whether the
eigenvalues of A are real or complex.
The condition number of a matrix is a measure of the linear independence
of the eigenvectors of the matrix. A singular matrix has at least one zero
eigenvalue and contains at least one degenerate row (i.e., the row can be
expressed as a linear combination of other rows). The identity matrix, which
gives rise to the most linearly independent eigenvectors possible and has every
eigenvalue equal to one, has a condition number of 1. If the condition number
of a matrix is much much greater than one, then the matrix is said to be ill
conditioned. The larger the condition number, the more sensitive the solution
The Solution of Linear Systems 23

process is to slight perturbations in the elements of A and the more numerical


error likely to be contained in the solution.
Because of numerical error introduced into the solution process, the com-
puted solution x̃ of equation (2.1) will differ from the exact solution x∗ by
a finite amount Δx. Other errors, such as approximation, measurement, or
round-off error, may be introduced into the matrix A and vector b. Gaussian
elimination produces a solution that has roughly
t log10 β − log10 κ(A) (2.42)
correct decimal places in the solution, where t is the bit length of the man-
tissa (t = 24 for a typical 32-bit binary word), β is the base (β = 2 for binary
operations), and κ is the condition number of the matrix A. One interpre-
tation of equation (2.42) is that the solution will lose about log10 κ digits of
accuracy during Gaussian elimination (and consequently LU factorization).
Based upon the known accuracy of the matrix entries, the condition number,
and the machine precision, the accuracy of the numerical solution x̃ can be
predicted [35].

2.4 Relaxation Methods


Relaxation methods are iterative in nature and produce a sequence of vectors
that ideally converge to the solution x∗ = A−1 b. Relaxation methods can be
incorporated into the solution of equation (2.1) in several ways. In all cases,
the principal advantage of using a relaxation method stems from not requiring
a direct solution of a large system of linear equations and from the fact that the
relaxation methods permit the simulator to exploit the latent portions of the
system (those portions which are relatively unchanging at the present time)
effectively. In addition, with the advent of parallel-processing technology,
relaxation methods lend themselves more readily to parallel implementation
than do direct methods. The two most common relaxation methods are the
Jacobi and the Gauss-Seidel methods [56].
These relaxation methods may be applied for the solution of the linear
system
Ax = b (2.43)
A general approach to relaxation methods is to define a splitting matrix M
such that equation (2.43) can be rewritten in equivalent form as

M x = (M − A) x + b (2.44)
This splitting leads to the iterative process
M xk+1 = (M − A) xk + b k = 1, . . . , ∞ (2.45)
24 Computational Methods for Electric Power Systems

where k is the iteration index. This iteration produces a sequence of vectors


x1 , x2 , . . . for a given initial guess x0 . Various iterative methods can be de-
veloped by different choices of the matrix M . The objective of a relaxation
method is to choose the splitting matrix M such that the sequence is easily
computed and the sequence converges rapidly to a solution.
Let A be split into L + D + U , where L is strictly lower triangular, D is a
diagonal matrix, and U is strictly upper triangular. Note that these matrices
are different from the L and U obtained from LU factorization. The vector
x can then be solved for in an iterative manner using the Jacobi relaxation
method,  
xk+1 = −D−1 (L + U ) xk − b (2.46)
or identically in scalar form,
n  
aij bi
xk+1
i =− xkj + 1 ≤ i ≤ n, k ≥ 0 (2.47)
aii aii
j=i

In the Jacobi relaxation method, all of the updates of the approximation


vector xk+1 are obtained by using only the components of the previous ap-
proximation vector xk . Therefore this method is also sometimes called the
method of simultaneous displacements.
The Gauss-Seidel relaxation method is similar:
−1  
xk+1 = − (L + D) U xk − b (2.48)

or in scalar form
i−1   n  
aij aij bi
xik+1
=− xj −
k+1
xkj + 1 ≤ i ≤ n, k ≥ 0 (2.49)
j=1
a ii j=i+1
a ii a ii

The Gauss-Seidel method has the advantage that each new update xk+1 i relies
only on previously computed values at that iteration: xk+11 , xk+1
2 , . . . , xk+1
i−1 .
Since the states are updated one-by-one, the new values can be stored in the
same locations held by the old values, thus reducing the storage requirements.
Since relaxation methods are iterative, it is essential to determine under
what conditions they are guaranteed to converge to the exact solution

x∗ = A−1 b (2.50)

It is well known that a necessary and sufficient condition for the Jacobi re-
laxation method to converge given any initial guess x0 is that all eigenvalues
of

MJ = −D−1 (L + U ) (2.51)
must lie within the unit circle in the complex plane [56]. Similarly, the eigen-
values of
 −1
MGS = − (L + D) U (2.52)
The Solution of Linear Systems 25

must lie within the unit circle in the complex plane for the Gauss-Seidel re-
laxation algorithm to converge for any initial guess x0 . In practice, these
conditions are difficult to confirm. There are several more general conditions
that are easily confirmed under which convergence is guaranteed. In particu-
lar, if A is strictly diagonally dominant, then both the Jacobi and Gauss-Seidel
methods are guaranteed to converge to the exact solution.

The initial vector x0 can be arbitrary; however if a good guess of the solution
is available it should be used for x0 to produce more rapid convergence to
within some pre-defined tolerance.

In general, the Gauss-Seidel method converges faster than the Jacobi for
most classes of problems. If A is lower-triangular, the Gauss-Seidel method
will converge in one iteration to the exact solution, whereas the Jacobi method
will take n iterations. The Jacobi method has the advantage, however, that
at each iteration, each xk+1
i is independent of all other xk+1
j for j = i. Thus
k+1
the computation of all xi can proceed in parallel. This method is therefore
well suited to parallel processing [36].

Both the Jacobi and Gauss-Seidel methods can be generalized to the block-
Jacobi and block-Gauss-Seidel methods where A is split into block matrices
L + D + U , where D is block diagonal and L and U are lower- and upper-
block triangular respectively. The same necessary and sufficient convergence
conditions exist for the block case as for the scalar case, that is, the eigenvalues
of MJ and MGS must lie within the unit circle in the complex plane.

Example 2.5

Solve

⎡ ⎤ ⎡ ⎤
−10 2 3 6 1
⎢ 0 −9 1 4 ⎥ ⎢2⎥
⎢ ⎥ ⎢ ⎥
⎣ 2 6 −12 2 ⎦ x = ⎣ 3 ⎦ (2.53)
3 1 0 −8 4

for x using (1) the Gauss-Seidel method, and (2) the Jacobi method.

Solution 2.5 The Gauss-Seidel method given in equation (2.49) with the
initial vector x = [0 0 0 0] leads to the following updates:
26 Computational Methods for Electric Power Systems

k x1 x2 x3 x4
1 0.0000 0.0000 0.0000 0.0000
2 -0.1000 -0.2222 -0.3778 -0.5653
3 -0.5969 -0.5154 -0.7014 -0.7883
4 -0.8865 -0.6505 -0.8544 -0.9137
5 -1.0347 -0.7233 -0.9364 -0.9784
6 -1.1126 -0.7611 -0.9791 -1.0124
7 -1.1534 -0.7809 -1.0014 -1.0301
8 -1.1747 -0.7913 -1.0131 -1.0394
9 -1.1859 -0.7968 -1.0193 -1.0443
10 -1.1917 -0.7996 -1.0225 -1.0468
11 -1.1948 -0.8011 -1.0241 -1.0482
12 -1.1964 -0.8019 -1.0250 -1.0489
13 -1.1972 -0.8023 -1.0255 -1.0492
14 -1.1976 -0.8025 -1.0257 -1.0494
15 -1.1979 -0.8026 -1.0259 -1.0495
16 -1.1980 -0.8027 -1.0259 -1.0496

The Gauss-Seidel iterates have converged to the solution

x = [−1.1980 − 0.8027 − 1.0259 − 1.0496]T

From equation (2.47) and using the initial vector x = [0 0 0 0], the following
updates are obtained for the Jacobi method:
k x1 x2 x3 x4
1 0.0000 0.0000 0.0000 0.0000
2 -0.1000 -0.2222 -0.2500 -0.5000
3 -0.5194 -0.4722 -0.4611 -0.5653
4 -0.6719 -0.5247 -0.6669 -0.7538
5 -0.8573 -0.6314 -0.7500 -0.8176
6 -0.9418 -0.6689 -0.8448 -0.9004
7 -1.0275 -0.7163 -0.8915 -0.9368
8 -1.0728 -0.7376 -0.9355 -0.9748
9 -1.1131 -0.7594 -0.9601 -0.9945
10 -1.1366 -0.7709 -0.9810 -1.0123
11 -1.1559 -0.7811 -0.9936 -1.0226
12 -1.1679 -0.7871 -1.0037 -1.0311
13 -1.1772 -0.7920 -1.0100 -1.0363
14 -1.1832 -0.7950 -1.0149 -1.0404
15 -1.1877 -0.7974 -1.0181 -1.0431
16 -1.1908 -0.7989 -1.0205 -1.0451
17 -1.1930 -0.8001 -1.0221 -1.0464
18 -1.1945 -0.8009 -1.0233 -1.0474
19 -1.1956 -0.8014 -1.0241 -1.0480
20 -1.1963 -0.8018 -1.0247 -1.0485
21 -1.1969 -0.8021 -1.0250 -1.0489
22 -1.1972 -0.8023 -1.0253 -1.0491
23 -1.1975 -0.8024 -1.0255 -1.0492
24 -1.1977 -0.8025 -1.0257 -1.0494
25 -1.1978 -0.8026 -1.0258 -1.0494
The Solution of Linear Systems 27
0
10 Gauss−Seidel
Jacobi

−1
10
Error (x−x*)

−2
10

−3
10

5 10 15 20 25
Number of iterations

FIGURE 2.3
Convergence rates of the Gauss-Seidel and Jacobi methods

The Jacobi iterates have converged to the same solution as the Gauss-Seidel
method. The error in the iterates is shown in Figure 2.3 on a semi-log scale,
where the error is defined as the maximum |(xki − x∗i )| for all i = 1, . . . , 4.
Both the Gauss-Seidel and the Jacobi methods exhibit linear convergence,
but the Gauss-Seidel converges with a steeper slope and will therefore reach
the convergence tolerance sooner for the same initial condition.

Example 2.6
Repeat Example 2.2 using the Jacobi iterative method.

Solution 2.6 Repeating the solution procedure of Example 2.5 yields the
following iterations for the Jacobi method:

k x1 x2 x3 x4
1 0 0 0 0
2 1.0000 1.0000 0.2000 0.2500
3 -4.8000 -2.1500 -1.6000 -2.8500
4 36.6500 22.3500 9.8900 14.9250
5 -225.0100 -136.8550 -66.4100 -110.6950

Obviously these iterates are not converging. To understand why they are
diverging, consider the iterative matrix for the Jacobi matrix:

MJ = −D−1 (L + U )
28 Computational Methods for Electric Power Systems
⎡ ⎤
0.00 −3.00 −4.00 −8.00
⎢ −2.00 0.00 −2.00 −3.00 ⎥
=⎢⎣ −0.80 −0.60 0.00 −1.60 ⎦

−2.25 −0.50 −1.75 0.00


The eigenvalues of MJ are ⎡ ⎤
−6.6212
⎢ 4.3574 ⎥
⎢ ⎥
⎣ 1.2072 ⎦
1.0566
which are all greater than one and lie outside the unit circle. Therefore, the
Jacobi method will not converge to the solution regardless of choice of initial
condition and cannot be used to solve the system of Example 2.2.
If the largest eigenvalue of the iterative matrix MJ or MGS is less than,
but almost, unity, then the convergence may proceed very slowly. In this case
it is desirable to introduce a weighting factor ω that will improve the rate of
convergence. From
 
xk+1 = − (L + D)−1 U xk − b (2.54)
it follows that
 
xk+1 = xk − D−1 Lxk+1 + (D + U ) xk − b (2.55)
A new iterative method can be defined with the weighting factor ω such that
 
xk+1 = xk − ωD−1 Lxk+1 + (D + U ) xk − b (2.56)
This method is known as the successive overrelaxation (SOR) method with
relaxation coefficient ω > 0. Note that if the relaxation iterates converge,
they converge to the solution x∗ = A−1 b. One necessary condition for the
SOR method to be convergent is that 0 < ω < 2 [27]. The calculation of
the optimal value for ω is difficult, except in a few simple cases. The optimal
value is usually determined through trial and error, but analysis shows that
for systems larger than n = 30, the optimal SOR can be more than forty
times faster than the Jacobi method [27]. The improvement on the speed of
convergence often improves as n increases.

2.5 Conjugate Gradient Methods


Another common iterative method for solving Ax = b is the conjugate gradi-
ent method. This method can be considered a minimization method for the
function
E(x) = Ax − b2 (2.57)
The Solution of Linear Systems 29

xk+1
ρk
xk

∆ xk+1
∆ xk

x*

FIGURE 2.4
The conjugate gradient method

along a succession of rays. One attractive feature of this method is that it


is guaranteed to converge in at most n steps (neglecting round-off error) if
the A matrix is positive definite. The conjugate gradient method is most
frequently used instead of Gaussian elimination if the A matrix is very large
and sparse, in which case the solution may be obtained in less than n steps.
This is especially true if the A matrix is well conditioned. If the matrix is ill
conditioned, then round-off errors may prevent the algorithm from obtaining
a sufficiently accurate solution after n steps.
In the conjugate gradient method, a succession of search directions
 ρk is
employed and a parameter αk is computed such that f xk − αk ρk is min-
imized along the ρk direction. Upon setting xk+1 equal to xk − αk ρk , the
new search direction is found. As the conjugate gradient method progresses,
each error function is associated with a specific ray, or orthogonal expansion.
Therefore the conjugate gradient method is reduced to the process of generat-
ing the orthogonal vectors and finding the proper coefficients to represent the
desired solution. The conjugate gradient method is illustrated in Figure 2.4.
Let x denote the exact (but unknown) solution, xk an approximate solution,
and Δxk = xk − x . Given any search direction ρk , the minimal distance from
the line to x is found by constructing Δxk+1 perpendicular to xk . Since the
exact solution is unknown, the residual is made to be perpendicular to ρk .
Regardless of how the new search direction is chosen, the norm of the residual
will not increase.
All iterative methods for solving Ax = b define an iterative process such
that
xk+1 = xk + αk+1 ρk+1 (2.58)

where xk+1 is the updated value, αk is the steplength, and ρk defines the
direction ∈ Rn in which the algorithm moves to update the estimate.
30 Computational Methods for Electric Power Systems

Let the residual, or mismatch, vector at step k be given by


rk = Axk − b (2.59)
and the error function given by
   2
Ek xk = Axk − b (2.60)
Then the coefficient that minimizes the error function at step k + 1 is
 T 2
A rk 
αk+1 = 2 (2.61)
Aρk+1 
This has the geometric interpretation of minimizing Ek+1 along the ray defined
by ρk+1 . Further, an improved algorithm is one that seeks the minimum of
Ek+1 in a plane spanned by two direction vectors, such that
xk+1 = xk + αk+1 (ρk+1 + βk+1 σk+1 ) (2.62)
n
where the rays ρk+1 and σk+1 span a plane in R . The process of select-
ing direction vectors and coefficients to minimize the error function Ek+1 is
optimized when the chosen vectors are orthogonal, such that
Aρk+1 , Aσk+1 = 0 (2.63)
where · denotes inner product. Vectors that satisfy the orthogonality con-
dition of equation (2.63) are said to be mutually conjugate with respect to
the operator AT A, where AT is the conjugate transpose of A. One method
of choosing appropriate vectors is to choose σk+1 as a vector orthogonal to
ρk , thus eliminating the need to specify two orthogonal vectors at each step.
While this simplifies the procedure, there is now an implicit recursive depen-
dence for generating the ρ vectors.
Conjugate Gradient Algorithm for Solving Ax = b
Initialization: Let k = 0, and
r0 = Ax0 − b (2.64)
ρ0 = −AT r0 (2.65)
While rk  ≥ ε
 T 2
A rk 
αk+1 = 2 (2.66)
Aρk 
xk+1 = xk + αk+1 ρk (2.67)
rk+1 = Axk+1 − b (2.68)
 T 
A rk+1 2
Bk+1 = 2 (2.69)
AT rk 
ρk+1 = −AT rk+1 + Bk+1 ρk (2.70)
k = k+1 (2.71)
Exploring the Variety of Random
Documents with Different Content
than the enemy concentrated every gun he could bring to bear upon the
crowded scaling ladders and the gangways.

Fountains of flame and sparks flew skywards, through which the forms
of men came stumbling, each living figure that reached our deck, it seemed
to me, the embodiment of a miracle. The planking flew about me as chips
fly from a woodman's axe. My cap was torn from my head, my monkey-
jacket was ripped and scorched, but there wasn't a scratch on my body that I
was conscious of.

I saw my First Lieutenant forward busy about the slip of the cable; I
saw the top above me shattered by a shell, and after a silence heard the
pom-pom there break out again undismayed. The upper deck was a reeking
shambles, with men pouring down into it from the Mole, exhausted, bloody,
and triumphant. Nearly every man carried a wounded mate slung across his
back, and most of them had a chunk of masonry or a fragment of shell
gripped in his fist to bring back as a "souvenir" of the night's work—as if
their memories or those of their children's children needed any such
reminder.

The Marines fell back at length, and the last to embark was Milsom, one
arm hanging limp and bloody. He laughed as he saw me.

"Thank God you're all right," he panted.

"Ditto," I shouted.

"The Devil looks after his own," he said, and then the business of
getting clear claimed all my attention.

We got out of range of their batteries, and the last fire on board
extinguished before we stopped to transfer our wounded to some of the
Destroyers, to be rushed back to the Base. A battered Motor Launch came
alongside and I recognised the number painted on her bows. It was
Armitage's boat. I went to the gangway and hailed her. A Volunteer Reserve
Sub. with a bandage round his smoke-begrimed face, standing by the wheel,
raised his arm.
"Armitage?" I shouted. The boy shook his head and climbed inboard.
They were passing the wounded down to be transferred to one of the
Destroyers laying off.

"Where is he?" I asked. The youngster jerked his thumb towards the
launch's tiny cabin. "Aft," he said, in the dull tone of utter exhaustion of
body and emotions.

"Five times he was hit an' he wouldn't budge.... Kneeling in a pool of


blood for'ard givin' directions.... Got the last man from Determination
aboard and he said 'Finish,' and rolled over in a heap. Just that one word,
'Finish.'" The dead man's second in command stood with his face working.
"Oh, God!" he said; "he was a man, he was a man!"

We resumed our voyage with four Destroyers to screen us, and the dawn
broke chill and wan; a mist closed down upon us like a pall as the light
strengthened.

Jervis was below having a wounded eye dressed and I was alone, but for
the Quartermaster, on the wreckage of the bridge; but presently I saw
Milsom, with a bandaged arm in splints and a cigar stuck truculently in the
corner of his mouth, climbing stiffly up the ladder.

"Jakes is all right," he said, as he joined me beside the rail.

"Yes," I said. "Hasn't got a scratch. Only got a sniff of gas—but he'll
shake that off in a few hours. The Destroyers say that those Motor Launches
saved all the officers and most of the men from the blockships. How's the
arm?"

"Bit stiff. Broken in two places." Milsom leaned against the rail and
took a deep breath. "But I'm still alive." He repeated the sentence and stared
at the dim outline of one of our escort just visible through the mist. His tone
was like that of a man awakening from sleep. "Oh, damn it!" he said. "No,
no," ... and then he turned abruptly and faced me. "Look here, Bill," he said,
"I was going to play the rottenest trick a man ever was tempted to stoop to."
He was talking as if he was in a desperate hurry, the words coming in a
rush. "This is a funny time to tell a love story, in all conscience, but I—I—
d'you remember that girl, Miss Mayne? I've never looked at a woman in my
life till I saw her. She wasn't in love with me, but I made her say she'd
marry me....

"Oh, I understand her, Bill, as no other man alive could.... I tell you, I
could read every thought that was in her head—and knowing that, I was
going to take her. I told myself I had every right to if I could, and she was
mine—just made for me, body and mind and soul. I'm telling you this now
—you've never heard me talk like this before, Bill, and God knows you
never will again.... Don't stare like that, old thing. I'm not light-headed—I'm
telling you all this, because I—I know who the other man is. You've got to
help him find her again and patch up their silly squabble and make her
happy—happier than ever I could. And I understood her better five minutes
after I'd first set eyes on her than he will with her lying in his arms——"

Somewhere at the back of my brain I heard a far-off drone like the


sound of a distant beehive.

"Well," I said. "What's his name?"

Milsom stood staring past me into the mist that lowered over us.

"I'll tell you," he said, "because I——"

The events of the next few seconds will always remain a blur in my
memory; the bark of a high-angle gun from one of the Destroyers astern cut
short his words. The drone above us seemed suddenly to become a rushing
roar of sound, and a blast of machine-gun fire swept the deck and bridge as
a flight of seaplanes whizzed overhead flying low, so that I could see the
goggled faces of the pilots behind the spurts of flame from their guns. The
next instant they were gone again in the mist. It was the last sting from the
hornets' nest we had been burning out, and Milsom was at my feet leaning
on his one arm and staring stupidly at the thin dark stream trickling across
the planking. The Destroyers on our beam were firing fruitlessly into the
mist.

I bent and put my arms about him and he turned his face towards me.
Twice he tried to speak, and an attempt at a smile, a ghost of the old jaunty
smile, flitted across his grey face. He made one more supreme effort, and
with my ear to the bloody lips I just caught the last whispered breath that
took his soul with it.

13

We passed up harbour to our berth alongside the following afternoon,


and every craft in harbour manned ship and gave us a cheer while the tugs
and ferry craft hooted, and the folk ashore lined the beach and waved flags
and handkerchiefs. I am not ashamed to own that I saw it all through a blur;
and as the off-shore wind carried the thin sound of women's voices, I
couldn't help thinking of the lads below the shattered upper deck, who had
fallen asleep that England on the morrow might wake to a fuller realisation
of her glory.

We dined together that night in the coffee room of the big hotel that had
been converted into the Naval Headquarters of the Base. We had counted on
having a tremendous jamboree—those of us who returned. But somehow
the feeling that predominated was a sort of dazed astonishment that we
were still alive. And our heads ached "fit to split" as housemaids say.

Mouldy was in bed, recovering from a slight gassing, but Thorogood sat
next to me, squeezing my arm at intervals as if to reassure himself that he
wasn't dreaming; and on the other a big subaltern of Marines who seemed to
regard his recent experiences with less emotion that the last Army v. Navy
rugger match, in which I saw him play. Glegg was there with a bandage
over one eye, but Brakespear was in hospital with a piece of shrapnel
somewhere in his anatomy.

Jervis had shorn his beard, and in the process seemed to have parted
with something of his effervescent vivacity, and when I remembered him as
I had last seen him, as we shoved off from the blazing Mole, stumbling
amid the dead and bawling through his megaphone.... No, we weren't
feeling gay.
It was after dinner that we got really talking. There must have been a
dozen of us altogether, because Shorty had gone home to his wife, and
Selby had gone Home too: a longer journey, but perhaps an even happier
meeting at the end of it.... Anyhow, there were about a dozen of us that lit
cigars and cigarettes and put our elbows on the table, and the scene, as I
remember it, was just like some big family happily reunited, with the
shadow of the Angel's wing still hovering over all.

Messengers were coming and going all the while with signals and
telegrams, and presently the orderly murmured, "The Director of
Offensives, sir, wants to talk to you on the telephone."

I went up to the room I used as an office when ashore, and as I picked


up the receiver of the Admiralty line, heard the Director's voice faintly,
speaking not to me but to someone in his room.

"Tell them I'll be at the War Office at 3 P.M. for that meeting ... that's all
for to-night, Miss Mayne," I heard him say. Then clearer and louder, "Hallo,
that you, Hornby?"

"Yes, sir," I said.

"Well, I'm damned glad to hear it." Then he said a lot of nice things
about what we'd done and being proud of us, and finished off: "Well, I'd
like to see you at 3.30 P.M. to-morrow if you can get to town by then."

"Aye, aye, sir," and as I answered a thought flashed through my brain: it


was one of those brilliant inspirations that come once in a lifetime, and in
the course of a sleepless night (none of us slept that night) I perfected it into
a piece of strategy for which I claim, in all modesty, a place in this already
unduly prolonged narrative.

Mouldy occupied a spare room at my diggings where most of us were


billeted for the night, and when I turned out the following morning, I visited
him. I found him drinking tea and reading the morning, paper.

"How d'you feel?" I asked.


He pointed to a tin of cigarettes with a wry face.

"Dead off baccy," he said lugubriously.

"Well," I replied, "that'll do you no harm. All right otherwise?"

He nodded. "All right last night. Lord knows why I should have been
rammed into bed while all you pirates lapped up bubbly and made a night
of it."

"Doctor's orders. Anyhow, he says you can go to town to-day."

Mouldy sat up. "Damn good of him, 'cos I was goin', anyhow. I'm going
to have a hell of a jamboree." He blinked at me defiantly from under a lank
lock of black hair.

"You've got to come with me to the Admiralty at three o'clock," I said as


sternly as I could. Mouldy groaned.

"Have I got to keep sober till three—an' pubs closing at half-past two?"

"Yes," I said. "You won't have a drink till the evening—and then you
can have as many as you want."

He acquiesced reluctantly, and we caught a train to town that landed us


at the terminus shortly before three; thence we taxied to Whitehall.

"This place gives me the holy pip," said Mouldy, as we threaded our
way through the stuffy-smelling corridors of the Admiralty. "Looks as if the
Navy was run by women from what I can see of the place. Phew! Shockin'
frowst!" We reached the Director's room.

"Never mind that," I said, and opened the door. I breathed a sigh of
relief to find the room was empty, and glanced at my watch. It was ten
minutes past three. Well, if Mouldy couldn't fix things in twenty minutes....
He walked to the open window and stood staring out on the Horse Guards
Parade.
"Humph!" he observed moodily. "I reckon the bounding blue's good
enough for me.... I wouldn't come and work here for a thousand a year.
What the blazes does the Director want to see me for, anyway? He's all
adrift too."

I was hunting about on the paper-strewn desk for the bell press I knew
was there if I could find it. There were three: one marked "Secretary,"
another "Messenger," and a third "Stenographer." I took a long breath and
pressed the third.

"Mouldy," I said, "don't get into mischief. Wait here till I come back. I
shan't be a minute." Then I made tracks for the door.

In the semi-gloom of the passage outside a tall girl brushed past me and
entered the room, pencil and notebook in hand. It was Miss Mayne, and I
waited till the door closed before I looked at my watch. "I'll give them two
minutes," I thought. "And if she doesn't come back——"

I gave them ten minutes, as a matter of fact, then I knocked at the door
and went in.

"Mouldy," I said, "you needn't wait. It's all right. I mean, the Director
doesn't want to see you after all."

They had not apparently heard my knock, because Miss Mayne's head
was resting on Mouldy's shoulder, and he was stroking her hair with his
damaged hand. She was crying softly, with her cheek against his coat.

Mouldy raised his head and glared at me over Miss Mayne's shoulder.
She neither moved nor turned her head.

"Here," he said, "you 'op it!"

I went out into the corridor, closing the door softly behind me.

Then for the Erst time since we landed I felt tired—more tired than I
had ever felt in my life before.
AUTHOR'S NOTE

For purposes of fiction, only the broad outlines of a great achievement


have been sketched into this story; and no attempt has been made to
reproduce faithfully the strategy or events of St. George's Day, 1918.
Indeed, only such ships find their replicas here as the turning-circle of the
tale allows, and if the Author has anywhere endeavoured to be true to facts,
it is in the portrayal of those fearsome and bloody conditions under which
the Navy added so fair a page to History.
II

BEHIND THE VEIL:

THE STORY OF THE Q BOATS


(1918)

FIRST BLOOD

There was a day, now happily past, when the submarine scourge was
broadcast upon the seas; then the country turned for its salvation to the
Navy, upon which, under the good providence of God, it had grown
accustomed to rely in most of the crises of its history. Scientific and
mechanical appliances, on a scale adequate to meet and checkmate the
outrage of unrestricted submarine warfare, could not be produced by
pressing a button. With workshops and laboratories yielding their output at
highest pressure, the German submarine building yards were gaining in the
race. Every day brought its sickening tale of sinking and burning and
murder on the high seas, and in Whitehall offices men studied statistics and
columns of figures with faces ever growing graver.

The irritable tension of those days is best forgotten now. Prices rose,
ships sank, and the Navy said not a word. It was "doing its damnedest" in
silence, according to its wont. And not even in forecastle or Wardroom did
men so much as whisper what was afoot. To-day* the submarine remains
merely as a stern corrective, curbing waste and extravagance, bracing the
nation's nerve. The ingenuity of man is boundless, and science has not yet
said her last word; human courage and devoted valour alone seem to have
reached a point there is no transcending. It was these two factors which
stemmed the flood at the moment of supreme crisis; on these the veil is at
last lifted, and the tale now told in all simplicity and truth.

* Written in August, 1918.

The methods of the German submarine in its war against unarmed


shipping gradually settled down to a routine which varied but little in the
early phases of the conflict. It was the custom to attempt to torpedo at sight,
on the principle of the least said the soonest mended. If the torpedo missed,
as was not infrequently the case, the submarine broke surface a mile or so
away from the ship and fired a shot across her bows. The merchantman had
then two alternatives: to take to his heels and try to escape, or to heave to
and abandon ship. In the latter case the submarine closed the derelict to
within a few hundred yards and summoned the boats alongside. At the
muzzle of a revolver the Captain was ordered into the submarine with his
papers, and the crew of his boat directed to row a party of German sailors,
bearing bombs, back to the ship. These worthies, having placed the bombs
in the ship's vitals and looted the officers' quarters, returned to the
submarine, propelled by the men they had robbed and whose ship they were
engaged in sinking. In due course the bombs exploded and the ship
disappeared. It was an economical method, since bombs cost less than
torpedoes, and the formality of looting the ship helped to preserve its
popularity.

For a while the Navy noted these methods and the little human failings
of the enemy in silence. Then it drew a deep breath and made its plans
accordingly. It argued that a man-of-war could be disguised as a tramp
steamer and carry concealed armament. Such a vessel, by plying on the
trade routes, must inevitably meet a submarine in time, and in her character
of peaceful merchantman be ordered to abandon ship. The ship might be
abandoned to all outward appearances, but still retain sufficient men
concealed on board to fight the hidden guns when the moment came for her
to cast disguise to the winds and hoist the White Ensign. Certain risks had
to be taken for granted, of course; the almost inevitable torpedo sooner or
later, the probability of a little indiscriminate shelling while the submarine
approached, the possibility of being ultimately sunk before assistance could
arrive. Yet the odds were on the submarine being sunk first, and the rest was
on the knees of the gods.

An old collier of some 2,000 tons was selected from among the shipping
at the disposal of the Admiralty and taken to a Dockyard port, where she
unostentatiously underwent certain structural alterations. These included
disappearing mountings for guns concealed beneath hatchway covers, and
masked by deck-houses which collapsed like cards at a jerk of a lever. From
the host of volunteers, among whom were retired Admirals, Captains,
Commanders, and Lieutenants of the Royal Navy, a young Lieutenant-
Commander was selected and appointed in command. His officers were
volunteers from the Royal Naval Reserve, ex-merchant seamen, familiar
enough with the rôle they were required to play, and in some cases with
little mental scores of their own which required adjustment when the time
came. The crew was mostly from the West Country, men of Devon with one
or two traditions to uphold in the matter of brave adventure. It also included
Welshmen and Irish with a pretty taste for a fight, and a few Scots, of the
dour type, hard to frighten. They were picked from the Royal Navy, Fleet
and Royal Reserves—merchant seamen and fishermen the last, many of
whom had formed a nodding acquaintance with Death long before they
received this invitation to a closer intimacy. Their ages ranged between 17
and 52.

They sailed from Queenstown under the Red Ensign; but before they
left some of the crew trudged, as pilgrims to a shrine, and stood awhile
among the mounds in that pathetic God's acre where the women and
children of the Lusitania rest. They were then but freshly turned, those
mounds, in their eloquent diversity of lengths, and men had not begun to
forget....

For five weary months they endured the winter gales of the Atlantic,
wallowing to and fro along the trade routes, outwardly a scallywag tramp,
but behind her untidy bulwarks observing, with certain necessary
modifications, the discipline and customs of his Majesty's Navy. With paint-
pot and sail-cloth they improved the ship's disguise from time to time, and
wiled away the heart-breaking monotony of the days by inventing fresh
devices to conceal their character.

The ship's steward's assistant, when not engaged upon his office as
"dusty boy," was ordered to don female attire over his uniform and recline
in a prominent position on the poop in a deck-chair. This allurement was
calculated to prove an irresistible bait. The Navigator, whose action station
was the abandonment of the ship in the rôle of distracted Master, fashioned
the effigy of a stuffed parrot and fastened it inside a cage which he
proposed to take away with him in the boat, thus heightening the pathos of
the scene and whetting the blood-lust of the enemy....

From time to time watchful patrols swooped down upon them,


exchanged a few curt signals in the commercial code, and bade them pass
on their imaginary occasions. Once a Cruiser, less easily satisfied than the
remainder, bade the rusty-sided collier heave to, and sent an officer to board
her; he climbed inboard at the head of armed men to find himself
confronted, in the person of the "Master," with a term-mate of Britannia
days and a grin he is not likely to forget. Then, early one spring morning,
when the daylight was stealing out of grey skies across the Atlantic waste,
the track of a torpedo bubbled across the bows and passed ahead of the ship.
The moment for which they had waited five weary months had come.

In accordance with her rôle of tramp steamer in the early days of the
War, the ship held steadily on her way, observing the stars in their courses,
but not otherwise interested in the universe. Inboard, however, the alarm
rang along the mess-decks and saloons, and men crawled into hen-coops
and deck-houses to man the hidden guns. A few minutes later the submarine
broke surface half a mile astern of the ship, and fired a shot across her
bows. Whereupon the supposed collier stopped her engines, and lay rolling
in the trough of the seas with steam pouring from her exhausts, while the
crew, who had rehearsed this moment to a perfection never yet realised on
the boards of legitimate drama, rushed to and fro with every semblance of
panic. The Captain danced from one end of the bridge to the other, waving
his arms and shouting; boats were turned out and in again amid a deliberate
confusion that brought blushes to the cheeks of the ex-merchant seamen
called upon to play the part.
In the meantime the submarine had approached at full speed to within
about 700 yards, and, evidently not satisfied with the speed at which the
ship was being abandoned, fired another shot, which pitched 50 yards short
of the engine-room. There was apparently nothing further to be gained by
prolonging the performance for this impatient audience, and the Lieutenant-
Commander on the bridge, cap in hand, and breathless with his pantomimic
exertions, blew a shrill blast on his whistle. Simultaneously the White
Ensign fluttered to the masthead, deck-houses and screens clattered down,
and three minutes later the submarine sank under a rain of shells and
Maxim bullets. As she disappeared beneath the surface the avenger reached
the spot, and dropped a depth-charge over her. A moment after the
explosion the submarine appeared in a perpendicular position alongside the
ship, denting the bilge-keel as she rolled drunkenly among the waves. The
after gun put five more rounds into the shattered hull at point-blank range,
and, as she sank for the last time, two more depth-charges were dropped to
speed her passing.

The Lieutenant-Commander in command had personally been


superintending the administering of the coup de grâce from the stern, and,
as he turned to make his way forward to the bridge, for a few brief moments
the bonds of naval discipline relaxed. His men surged round him in a wildly
cheering throng, struggling to be the first to wring him by the hand. They
then mustered in the saloon, standing bare-headed while their Captain read
the Prayers of Thanksgiving for Victory, and called for three cheers for his
Majesty the King. They cheered as only men can cheer in the first exultant
flush of victory. But as the vessel gathered way and resumed her grim quest,
each man realised, deep down in his heart, that far sterner ordeals lay ahead.

ORDEAL BY FIRE
Because man is mortal, not infallible, and Fortune at her brightest a
fickle jade, it was inevitable that sooner or later a day must come when a
crippled German submarine would submerge beneath a hail of shells,
miraculously succeed in patching up her damaged hull, and, under cover of
darkness, crawl back to port. Word would then go out from Wilhelmshaven
of a British man-of-war disguised as a lumbering tramp, with such and such
a marking on her funnel, with stumpy masts and rusty deck-houses, who
carried guns concealed in wheel-house and hen-coops, whose bulwarks
collapsed, and whose bridge screens masked quick-firers and desperate
men. German submarines would be warned that to approach such a vessel
was to enter a death-trap, unless every precaution was first taken to ensure
she had been abandoned.

Such a day came in due course; misty, windless, with the aftermath of a
great storm rolling eastward beneath a sullen swell. A vessel with the
outward appearance of a merchantman (the fruits of whose labours for the
past six months had doubtless perplexed that section of the Wilhelmshaven
bureaucracy concerned with the non-return of U-boats), sighted towards
evening the periscope and conning-tower of a submarine a mile away on
her beam.

The figure on the bridge of the tramp, who carried, among other papers
in his charge, his commission as a Commander of the Royal Navy, laughed
as Drake might have laughed when the sails of a Spanish galleon broke the
horizon. A tangle of flags appeared at the periscope of the submarine, and
the tramp stopped obediently, blowing off steam in great clouds. Her
Commander turned over the pages of the International Signal Code, smiling
still. "Hoist: 'Cannot understand your signal,'" he said to the signalman, "I
want to waste a few minutes," and moved to the engine-room voice-pipe.
Obedient to his directions, the screws furtively jogged ahead under cover of
the escaping steam, edging the steamer towards the watching enemy. The
latter, however, promptly manned her foremost gun, turned, and slowly
steamed towards them; she opened fire at a range of half a mile, the shell
passing over the funnel of the disguised man-of-war.

In the tense excitement of that moment, when men's nerves and faculties
were stretched like banjo-strings, the report of the submarine's gun rang
loud through the still air. One of the man-of-war's gun-layers, lying
concealed within his collapsible deckhouse, heard the report, and, thinking
that the ship herself had opened fire without the customary warning gongs,
flung down the screens which masked his weapon. Any further attempt at
concealment was useless. The fire-gongs rang furiously at every gun
position, the White Ensign was triced up to the mast-head in the twinkling
of an eye, and the action started. After the first few hits the submarine lay
motionless, with her bows submerged and her stern in the air for upwards of
five minutes, while shells burst all about her. The heavy swell made
shooting difficult, but eventually she sank in a great commotion of the
water and dense clouds of vapour that hung over the surface for some
minutes. Two depth-charges were dropped over her, and if ever men had
cause for modest self-congratulation on having ridded the seas of yet
another scourge, it would seem that the officers and crew of The King's
Ship might have laid claim to their share. Yet, by ways unknown and
incredible, it was claimed by the enemy that the submarine contrived to
return, with shot-holes plugged, to tell the tale.

Once the cat was out of the bag, it was obvious that in the future the
enemy would not rise to the surface until his torpedo had found its mark,
and it became part of this grim game of bluff for the victim to ensure that
she was hit. Then, when the "panic party" had abandoned the ship, the
remainder must wait concealed and unresponsive beside their hidden guns,
while the submarine rose to the surface and either closed within range or
shelled them with sufficient thoroughness to convince him—who judged
endurance and self-control by no mean standards—that the limit of human
courage had been reached; that there could be no one concealed on board,
and that he might with safety approach to loot and burn. Now this, as Mr.
Kipling would put it, "was a damned tough bullet to chew." They were no
demi-gods, nor yet fanatics, these three-score or so sailor-men. They were
just ordinary human beings, with the average man's partiality for life and a
whole skin, and the love of wife and bairn or sweetheart plucking at the
heart-strings of most of them. But they shared what is not given to all men
in this world of human frailty—a whole-souled confidence in a fellow-man,
which would have carried them at his lightest nod through the gates of hell.
Under his command, then, they sailed with a cargo of timber in each
hold, and in due course, about 9.45 one morning, a torpedo was seen
approaching the starboard beam. Observing his rôle as Master of a careless
tramp, with poor look-outs, the Commander held on his course. At the last
moment, however, the helm was imperceptibly altered to ensure the ship
being struck abaft the engine-room, where the torpedo might do least
damage. Those whom fate has afforded the opportunity of studying the trail
of an approaching torpedo will, if they recall their sensations, appreciate to
some extent the iron nerve requisite to such a manœuvre. The torpedo burst
abreast No. 3 hold, hurling a wall of water and wreckage to the height of the
mast, and blowing a hole in the ship's side 40 feet wide. Half-stunned and
deafened by the concussion, the Commander raised himself on his hands
and knees, where he had been flung, and shouted to the Navigator: "They've
got us this time!" The Navigator, who was inside the chart-house, thrust his
head out for a moment, moistening a lead pencil with his lips. "I reckon I've
got time to finish working out this sight, sir," he replied with a grin, and
withdrew his head.

The alarm-gongs had already sent the guns' crews to their invisible
guns, and immediately after the explosion "Panic stations" was ordered,
followed in due course by "Abandon ship." The Navigator, having finished
his "sight," and now acting as "Master," abandoned ship with the "panic
party." No sooner had the boats been lowered and shoved off from the ship's
side, however, than the Chief Engineer rang up from below and reported
that the after bulkhead had gone and that the engine-room was filling fast.
Peering, on all fours, through a slit in the bridge-screen, waiting for the
inevitable periscope to appear, the Commander bade him hold on as long as
he could and keep enough steam to work the pumps; when the water had
extinguished the fires, and then only, the engines were abandoned and the
staff remained concealed. This they did, crawling eventually on to the
cylinders to escape from the rising flood.

Shortly after the torpedo struck the ship the periscope of a submarine
broke the surface a couple of hundred yards distant, evidently watching
proceedings with a deliberate, cautious scrutiny. Moving slowly through the
water, like the fin of a waiting shark, the sinister object came gradually
down the ship's side, within five yards of the breathless boats, and not ten
yards from where the Commander lay beside the voice-pipes that connected
him with the Assistant-Paymaster, R.N.R., who, concealed in the gun
control position, was awaiting the order to open fire. From the altitude of
the bridge, the submerged whale-back hull was plainly visible to the figure
crouched behind the bridge-screens, and the temptation to yield to the
impulse of the moment, to open fire and end the suspense, shook even his
iron nerves. A lucky shot might pierce the lead-grey shadow that moved 15
feet beneath the surface; but water plays strange tricks with projectiles,
deflecting them at unexpected ricochets, at angles no man can foretell;
moreover, the submarine was in diving trim. The odds against a broadside
overwhelming her before she could plunge into the depths and escape were
too great. So the Commander waited, with self-control that was almost
superhuman, and, prone beside their guns, unseeing and unseen, his men
waited too.

The ship had then sunk by the stern until it was awash, and the crew of
the gun masked by the wheelhouse were crouched up to their knees in
water. A black cat, the ship's mascot, that had been blown off the forecastle
by the explosion of the torpedo, swam aft and in over the stern, whose
counter rose normally 20 feet above the surface. Still the periscope
continued its unhurried observation; it travelled past the ship, across the
bow, and then slowly moved away, as if content that the task was done. For
the space of nearly a minute bitter disappointment and mortification rose in
the Commander's heart. His ship had been torpedoed and was sinking. Their
quarry had all but been within their grasp, and was now going to escape
unscathed. Then, when hope was flickering to extinction, the submarine
rose to the surface 300 yards on the port bow, and came slowly back
towards the ship.

Up to this juncture, although the ship was settling deeper every moment,
the Commander had purposely refrained from summoning assistance by
wireless, lest interruption should come before his grim work was done.
Now, however, he saw at one quick glance that the Lord had indeed "placed
the enemy upon his lee bow," and the rest was only a matter of a few bloody
moments. Accordingly he gave orders for an urgent wireless signal to be
sent out forthwith summoning assistance, and waited until the submarine
was on a line when all his guns would bear. She reached the desired spot at
the moment when the German Commander was complacently emerging
from the conning-tower; up went the White Ensign, and the first shot
beheaded him; he dropped back into the interior of the submarine, and his
wholly unexpected reappearance imparted a shock of surprise to the
remainder of the inmates from which they never recovered. The submarine
lay motionless as a dead whale, while the avenging broadside shattered the
hull, and the grizzled pensioner inside a hen-coop scientifically raked her
deck with a Maxim to prevent her gun from being manned. She finally sank
with her conning-tower open and the crew pouring shrieking out of the
hatchway.

From the swirling vortex of oil and blood and air bubbles in which the
majority vanished, two dazed prisoners were rescued by the exultant "panic
party" in the boats, and brought back to the ship. Once on board, however,
the imperious necessities of the moment overwhelmed even the elation of
victory. Bulkheads were shored in all compartments still accessible,
confidential documents destroyed in anticipation of the worst, and then all
but the Commander and a handful of men took to the boats and awaited
succour. It came at noon in the guise of a congratulatory and businesslike
Destroyer, and was augmented later by a couple of Sloops. By 5 P.M. the
water had ceased to gain and the ship was in tow, heading for port; there she
arrived, and was safely beached after dark the following day.

Thus her crew, emerging triumphant from the ordeal, added at the last a
feat of seamanship which saved the ship. It required no great power of
imagination to foretell what lay ahead; yet, when the time came for a fresh
venture under the command of the man who had brought them victorious
through the ordeals that were past, they sailed with light hearts and
unafraid. As if for a pledge of that devotion, he wore thenceforward, on the
left breast of his ancient monkey-jacket, the scrap of ribbon which it is the
King's pleasure men shall wear "For Valour."
3

WON BY WAITING

The disguise adopted by such of his Majesty's ships as were selected to


cope with the U-boat menace, varied according to the changing fashions. In
the early days of the war the rôle of care-free tramp, steering a steady
course, and minus look-outs or gun, was sufficient to lure the enemy to
close quarters on the surface. But as the peculiar methods of warfare
adopted by the German Government harked back to piracy and rape, so the
custom of the seas reverted to the arming of merchantmen for defensive
purposes.

For purpose of offence against the enemy, with which this story of a
King's ship is concerned, a dummy gun sufficed; at all events for
preliminaries. It was mounted prominently aft, attended by a conspicuously
vigilant gunner. To outward appearances the ship was then an armed British
merchant vessel, steering a zigzag course for home at a good speed,
conscious that she was in the danger zone, and, by virtue of her
unmistakable gun and position, liable to be torpedoed at sight according to
the code of customs and chivalry of the sea—as revised by Germany.
Torpedoed at sight she was, at eight o'clock of a misty summer morning, in
a blinding rain storm and heavy sea. The torpedo was fired at apparently
close range, since it jumped out of the water when one hundred yards from
the ship; it struck the engine-room near the water-line, flooding the boiler-
room, engine-room, and adjacent hold. The Stoker Petty Officer on duty in
the engine-room was killed outright by the explosion, and the Third
Engineer, who held a commission as Engineer Sub-Lieutenant, in the Naval
Reserve, was half-stunned and badly wounded by flying splinters and
fragments of coal. Despite the inrush of water, he contrived to reach the
hatchway, and arrived on deck reeling with shock, half-flayed, and
bleeding, to stagger to his post in the second act of the grim drama.

One of the lifeboats had been blown to smithereens, fragments of it


being lodged even in the wires of the aerial between the masts, so great was
the force of the explosion. Under the command of the Navigator, acting the
part of Master, the "panic party" abandoned the ship in the remaining three
boats as the ship settled deeper in the water. The officers and men whose
station was on board were already motionless at their invisible guns; in the
majority of cases they were concealed by screens, but the crew of the
foremost gun were compelled to lie prone on their faces on the exposed
forecastle, unable to stir a muscle until the order came to open fire.

Then for thirty-five leaden minutes, followed the savage ordeal of


waiting for the unknown. For aught these motionless figures knew, the
submarine might torpedo them again at any moment, might break surface
and shell them at extreme range till they sank, or, an even more nerve-
racking possibility, might set off in pursuit of a fresh victim and escape.
Withal was the consciousness that a single movement on board, so much as
a finger raised above screen or coaming, would betray their true character
and bring the game of bluff to a swift and tragic conclusion. The periscope
of the submarine had broken surface a quarter of an hour after the torpedo
struck, about 400 yards distant on the port beam. It turned after a while and
steered towards the ship, but the Captain and Signalman, prone at each end
of the bridge, with their eyes glued to the observation slits, alone were
aware of their quarry's movements. It was in the tense stillness of those
moments, a stillness only disturbed by the lapping of the waves round the
water-logged hull, and by the hiss of escaping steam, that from the little
group of prostrate figures round the foremost gun rose a man's whistle,
executing a gay, if somewhat tremulous, ditty of the sea. For a moment
those in the immediate vicinity of the performer listened to the eerie music
without comment. Then a motionless officer, moved by a sense of what was
seemly at such a time and what was not, rebuked the minstrel. "I dursn't
stop, sir," said the boy—he was only seventeen—"cos if I stops whistlin' I
gits scared."

As the submarine drew nearer to the ship the Commander on the bridge
of the disguised man-of-war cast a swift glance round to see that all was
well, and saw the old and trusted Quartermaster lying face downwards
beside the wheel. "For God's sake," he called, "don't show yourself, he's
nibbling...." "Aye, aye, sir," said the faithful seaman. And then, so ingrained
apparently had become the habit of disguise on board, he furtively dragged
a lifebelt over the most prominent portion of his anatomy.

When fifty yards off the ship the periscope vanished, to reappear a few
minutes later directly astern. Very deliberately, as a cat plays with a mouse
before dealing the last stroke, the periscope travelled on to the starboard
quarter, turned, and came back round the stem to the port beam, where the
boats were lying. The stage management of the drama then passed into the
hands of the Navigator in charge of the boats. His task was not lightened by
a disposition on the part of the "panic party" to regard the affair in the light
of high comedy, despite the cold scrutiny of the periscope. In no measured
terms he reminded them that they were presumed by the Teutonic
intelligence beneath the waves to be terrified mariners, not a boat-load of
grinning buffoons; and then, mindful of the shortness of the visibility and
the known weakness of the enemy for light banter with castaways in boats,
he began pulling towards the ship. As he had foreseen, the submarine
promptly rose to the surface and followed in pursuit, closing to within a few
yards of the masked guns on board. An angry Hun shouted abuse through a
megaphone from the top of the submarine's conning tower, and was
reinforced a moment later by an equally abusive and impatient gentleman of
the good old Prussian school, clasping a Maxim in his hands.

The prospect of being shot by either party at this juncture of the


performance was none too remote. Yet the boat continued pulling as if
manned by deaf mutes until the submarine had been lured into the desired
position. Then suddenly the eagerly awaited White Ensign shot up to the
masthead. Screens clattered down along the length of the ship's side, and a
broadside of yellow flame leaped out over their heads. The submarine was
suddenly plastered by bursting shell and half hidden by leaping
waterspouts, as she slowly listed over to her side, with oil spouting from the
rents in her hull. Her crew scrambled wildly out of the conning tower and
waved their hands above their heads in token of surrender. Fire instantly
ceased on board the British man-of-war, when unexpectedly the crippled
enemy, her stern submerged, shot ahead and made off at high speed. The
would-be "Kamerads" on her deck were swept into the sea by her last wild
rush through the water, and the British guns broke out again in vengeful
chorus. Fire was continued until she blew up and sank, one wretch clinging
to her bows as she disappeared.

In spite of the heavy sea, the boats succeeded in rescuing two prisoners
from the water before returning to the ship. An American Destroyer arrived
a few hours later, accompanied by two Sloops. With their assistance the
ship was brought safely into port, and of all who had passed through the
soul-stirring events of the day none exhibited greater satisfaction or surprise
at living to see it close than the late upholders of German freedom of the
seas.

By command of his Majesty the King, one officer and one man were
selected by ballot for the honour of the Victoria Cross from among the
ship's company in recognition of the fact that, where all played so valiant a
part, the distinction was earned by the ship rather than by the individual. Yet
their task, the task required of them by the England which reads these lines
at a well-found breakfast table, was still unfinished. They sailed again in
another ship, knowing full well that they alone could never accomplish it
entirely. But the name of that ship* shall be a household word some day
wherever the English tongue is spoken, because of the ordeal these men
endured behind her shattered bulwarks for England's sake.

* H.M.S. Dunraven.

THE SPLENDID FAILURE

To travel hopefully, said Robert Louis Stevenson, is better than to


arrive; and therein he summed up the whole attitude of the Anglo-Saxon
race towards human endeavour. It is our custom to honour the achievement
less than the spirit, in the wistful hope, perhaps, that thus may we, too, be
judged in our turn at the last. This is a record of failure, if the venture is to
be judged by its material result. Yet the lesson it will carry to succeeding
generations is concerned with neither success nor failure, but with those
shining heights of the Spirit (attainable by every mother's son) where no
fear is.

The King's ship to which this story relates was a steamer of some 3,000
tons, to outward appearances an armed merchantman with a light gun
mounted on her poop. To make plain what happened on board it is
necessary, however, that the uninitiated should be admitted into certain
secrets of her construction. A wooden structure on the poop, common to
merchantmen of her type, concealed a gun of effective calibre behind
collapsible covers. Beneath this gun position, and occupying much of the
space below the poop, were the magazine and shell rooms. Four depth-
charges were fitted at her stern; any one of these dropped over the position
of a submerged submarine was calculated on detonating to do all that was
necessary. In addition, a smaller gun was mounted on the forecastle on a
disappearing mounting, while hen-coops and deck fittings concealed similar
armament at other points of vantage. To complete her offensive capabilities,
she carried a masked torpedo tube on either beam.

This, then, was the true character of the ship which a German submarine
sighted on the horizon at eleven o'clock one morning. She noted the small
gun displayed defensively aft, and started in pursuit, firing as she went. The
submarine was sighted directly she rose to the surface, whereupon the
Captain of the man-of-war ordered the after gun to be manned and the
remainder of the crew to take shell cover, tactics which differed in no
respect from those customary to merchantmen under the circumstances. On
the other hand, speed was imperceptibly decreased, and the crew of the
light gun at the stern directed to shoot short in order to encourage the
adversary to draw closer. It says much for the discipline on board that men
thus prominently exposed to the fire of the pursuing enemy could
deliberately continue to reply to it in the consciousness that their shots were
not required to hit. German submarine commanders at this phase of the war
were growing notoriously "nervy"; hysterical appeals for help were
therefore sent out by wireless, in the hope that the enemy would intercept
them and gain confidence.

The heavy sea gradually rendered it impossible for the submarine to


maintain the pursuit and man her gun. She therefore abandoned the
bombardment and came on at full speed, until after a chase of about an hour
she turned broadside on and again opened fire. Shots were then falling
close, and at 12.40 the steamer stopped, as great clouds of steam emerging
from the engine-room showed she was disabled, and the "panic party"
proceeded to abandon ship. To lend colour to the general atmosphere of
demoralisation and confusion, one of the boats was purposely dropped by a
single fall, and remained hanging from the davit in a vertical position. In the
meantime the enemy had closed nearer and continued methodically shelling
the ship. A shell struck the poop, exploding one of the depth-charges and
blowing the officer in charge of the after concealed gun out of his control
position; on recovering consciousness, however, he crawled inside the gun
hatch, where his crew of seven men were hidden. The seaman
superintending the depth-charges was badly wounded by this explosion and
lay motionless. Seeing his condition, the hidden crew of the after gun
attempted to drag him within their place of concealment, but the injured
man stubbornly refused to be moved. "I was put here in charge of these
things," he replied, indicating the remaining depth-charges, "and here I
stop." And stop he did until subsequent events proved stronger than even
his indomitable spirit. Two more shells burst inside the poop in quick
succession, and a few moments later dense clouds of smoke and flames
disclosed the disquieting fact that the after part of the ship was heavily on
fire.

From his customary place at the end of the bridge, peering through slits
in his armoured coign of observation, the Captain watched the submarine
turn and come slowly past the ship 400 yards away. The next moment, as he
was about to open fire on an easy target, the wind caught the smoke from
the conflagration aft and blew it like a curtain across his vision. The Captain
was confronted with two alternatives. One was to open fire there and then
on a partially obscured target, or wait until the submarine should round the
stern and come past the weather side, where the smoke did not interfere
with the accuracy of the shooting. At the same time he was conscious that
the fire raging aft must very soon engulf the magazine. It could only be a
matter of moments before the magazine blew up, and with it the masked
gun and its crew.

Nothing but utter confidence in the devotion of that gun's crew, the
conviction that even in the direst extremity they would remain concealed
and motionless, enabled the Captain to choose the second of these
alternatives. Yet he chose it, determined at all costs to make sure of his
quarry, and waited; and while he waited the deck on which this gun's crew
were crouched grew slowly red-hot, so that they were compelled to cling to
the mounting of the gun and to hold the cartridges in their arms. Their
ordeal ended as the submarine was rounding the stern. The magazine and
two more depth-charges blew up with a deafening roar, hurling gun, gun's
crew, fragments of wreckage, and unexploded shells high in the air. One
member of the crew fell into the water, where he was picked up by the
"panic party"; the remainder, including the depth-charge keeper, landed in
the well-deck, with the gun.

The concussion of the explosion had, however, started the electrically


controlled fire-gongs at the remaining gun positions. Thereupon the White
Ensign fluttered automatically up to the masthead, and one gun—the only
one that would bear—opened an unavailing fire on the enemy, who had
begun to dive immediately the explosion had taken place. The ruse had
failed, and every man on board realised on the instant that what must follow
was to be the supreme test. The wounded were removed out of sight with all
speed, hoses were turned on to the burning part of the ship, and wireless
signals sent out warning all men-of-war to divert traffic for a radius of 30
miles, that nothing should interrupt the last phase of this savage duel a
entrance.

To borrow a phrase from sporting parlance, they ensured that the ring
was kept, but in so doing they deprived themselves of any hope of succour
from the savagery of the enemy, should the ship sink and leave them at the
submarine's mercy. In this comfortable reflection, therefore, they settled
down and awaited the inevitable torpedo.

It must be remembered that the ship was now openly a man-of-war,


flying the White Ensign, with guns unmasked. At 1.20 P.M., two hours and
twenty minutes after first sighting the submarine, a torpedo struck the ship
abreast the engine-room, hurling blazing wreckage and water in all
directions. With far-seeing thoroughness of organisation this moment had
been anticipated sooner or later for months past. Accordingly, at the order
of "Abandon ship," the men previously detailed launched the remaining
boat and a raft, and paddled clear of the doomed vessel. The Captain and
crews of two guns and both torpedo tubes, the Navigator, Assistant
Paymaster, and Quartermaster remained on board. For the ensuing eighty
minutes, while the fire in the poop continued to blaze furiously, and the
ammunition in the vicinity detonated like a succession of gigantic Chinese
crackers, the periscope circled suspiciously round the ship and boats. At
2.30 the submarine rose to the surface in a position on which none of the
guns on board would bear, and began once more shelling the ship and boats
with vindictive fury.

For twenty minutes the remnant on board endured this ordeal, lying face
downwards and motionless on the splintered planking. It is recorded that
during the hottest of the fire one of the foremost gun's crew requested, in a
hoarse whisper, to be allowed to take his boots off. The officer in his
vicinity inquired the reason for this strange request, to which the man
replied that he didn't think he had much longer to live, and, on the whole,
thought he'd prefer not to die with his boots on. He subsequently explained
that he came of a respectable family.

By means of the voice-pipe connecting him with the guns' control, the
Captain cheered and encouraged his men through that long agony. Small
wonder they loved an officer who exhorted them in such a pass to "keep
merry and bright"; who quoted Bairnsfather to the boyish officer in the
control when shells were bursting all about his head ("If you know of a
better 'ole, go to it!"); who, when the wounded Navigator, blinded with
blood at the opposite end of the bridge, called that he was done, replied:
"You're all right! Hang on, 'cos we've got him cold!" and found time to
steady the guns' crews with, "Remember the V.C. The King has given the
ship, lads."

At 2.50 P.M. the submarine abruptly ceased shelling and submerged.


Then, with only a periscope showing, he steamed once more past the ship.
As he came abeam under-water, the British Captain played one of his few
remaining trump cards, and discharged a torpedo; it missed by inches, and
passed unnoticed. Going very slowly, the enemy then crossed the bow and
came down the starboard side. One last desperate chance remained, and the
second torpedo was fired. In an agony of suspense they watched the trail of
bubbles flicker towards the periscope, held their breath for the explosion,
and saw the tell-tale wake pass a foot astern of the periscope. They had shot
their bolt, and the game was up. A wireless signal was immediately sent out
for urgent assistance, as the wary enemy had sighted the last torpedo and
promptly dived. The ship was sinking fast, and to wait for another torpedo
or further shelling would have meant the useless sacrifice of life. A United
States destroyer, an armed yacht, and two British destroyers that had been
hovering below the horizon, rushed up at full speed and took charge of the
wounded. The ship sank thirty-four hours later, with her colours flying,
after strenuous endeavours had been made to save her.

Despite the almost incredible gruelling the crew had undergone, all
survived the action. The officer in charge of the after-gun received the
Victoria Cross, and one of the gun's crew was selected by ballot for a
similar honour. The remainder, including the hand told off for the depth-
charges, who has since succumbed to his wounds, were awarded the
Conspicuous Gallantry Medal.

Much of the tale remains untold, but it is best brought to an all too brief
conclusion in the words of the official report written by the officer, who, as
his head and shoulders appeared above the bridge screen at the conclusion
of the action, brought forth the following ecstatic shout from one of the
"panic party": "Blimey! there's the Skipper still alive! Gawd, wouldn't them
perishin' 'Uns give ninepence an inch for 'im!" This officer's report
concludes as follows:

It is hardly necessary for me again to refer to the behaviour of my crew


—the tactics I carried out were only possible through the utmost confidence
I had in my ship and my crew. I would especially bring to your notice the
extreme bravery of Lieutenant Bonner, R.N.R., the officer in charge, and
the 4-in. gun's crew. Lieutenant Bonner, having been blown out of his
control by the first explosion, crawled into the gun hatch with the crew.
They there remained at their posts with a fire raging in the poop below and
the deck getting red hot. One man tore up his shirt to give pieces to the
gun's crew to stop the fumes getting into their throats, others lifted the
boxes of cordite off the deck to keep them from exploding, and all the time
they knew they must be blown up, as the secondary supply and magazine
were immediately below. They told me afterwards that communication with
the bridge was cut off, and although they would be blown up, they also
knew they would spoil the show if they moved, so they remained until
actually blown up with their gun.

Then, when, as wounded men, they were ordered to remain quiet in


various places during the second action, they had to lie there unattended and
bleeding, with explosions continually going on aboard and splinters from
the enemy's shell-fire penetrating their quarters. Lieutenant Bonner, himself
wounded, did what he could for two who were with him in the wardroom.
When I visited them after the action they thought little of their wounds, but
only expressed their disgust that the enemy had not been sunk. Surely such
bravery is hard to equal. The strain for the men who remained on board
after the ship had been torpedoed, poop set on fire, cordite and shells
exploding, and then the enemy shell-fire can easily be imagined. I much
regret that two officers and seven men were wounded, and am very grateful
to U.S.S. Noma for taking charge of the two most dangerous cases. I—we—
deeply regret the loss of one of H.M. ships, and still more the escape of the
enemy. We did our best, not only to destroy the enemy and save the ship,
but also to show ourselves worthy of the Victoria Cross the King recently
bestowed on the ship.

I have the honour to be, Sir, your obedient servant,

(Signed) GORDON CAMPBELL,


Captain, R.N.
III

"NOT IN THE PRESENCE OF THE


ENEMY"
(1918)

THE GLEANER

The motor-launch chugged to the limit of her beat and wheeled with her
bows to a rusty sunset. The wind had been freshening steadily since noon
and the steep grey seas were edged with spray, streaked like the flanks of an
over-spurred horse. The motor-launch, from a monotonous corkscrew roll,
changed to a jerky see-saw that enveloped her in a bitterly cold cascade at
every downward plunge.

The R.N.V.R. Lieutenant in command leaned with one broad shoulder


against the side of the wheel-shelter, his legs braced far apart and his oilskin
flapping wetly against his leather sea-boots. As each successive welter of
spray drove past his head he raised a pair of glasses and searched the
horizon to the westward where the sombre November sunset was fast
fading.

Somewhere below that horizon the homeward-bound convoy was


approaching, and his orders were to patrol a given length of the swept
channel up the coast on the look-out for floating mines that might have
drifted by chance currents from distant mine-fields. Twice since dawn the
sweepers had passed over that water and reported the fair-way clear; but
with a dozen shiploads of wheat to pass up it in the morning, no one was
taking any chances. "Patrol till dark; floating mines to be sunk by gun or
rifle fire," said his orders. The R.N.V.R. Lieutenant had been reckoned a
good shot with a rifle in the days when he was an Admiralty clerk, and
spent his Saturday afternoons on a rifle range at Wormwood Scrubs; he
glanced from the bucking deck of his command to the rifle hanging in
slings over the Coxswain's head, and smiled rather doubtfully to himself. As
if in challenge to that smile, the Signalman on the other side of the
Coxswain suddenly extended his telescope and arm in a straight line to
seaward.

"Mine awash, sir," he shouted. "Two points on the port bow." The
Coxswain raised his eye from the binnacle and moved the wheel through
half a turn.

The Lieutenant stared through his glasses. "Umph," he said. The crew of
the muffled six-pounder in the bows emerged from the fore hatchway and
began to cast off the clips securing the lid of the ammunition box.

In silence they stared at the dull green globular object that bobbed past
them in the trough of a sea, the soft lead horns projecting ominously as the
waves washed over the rounded surface.

"One of ours," said the Lieutenant, with a swift expert glance. He


stepped inboard a pace and studied a chart. "Hell! It's come a long way—
must ha' been Tuesday's gale."

The launch held on her course till she had reached the limit of the safety
zone of a bursting mine; stopped, and brought the gun to the ready. The
gun-layer adjusted his sight, and the tiny gun platform rolled in sickening
lurches.

"She may steady for a moment," said the Lieutenant, without


conviction. "Choose your time." The gunlayer chose it.

"Bang! A puff of smoke dissolved about the muzzle and the shell sent
up a column of foam a yard beyond the preposterous target.

You might also like