Digital Signal Processing With Matlab Examples Volume 3 Model Based Actions and Sparse Representation 1st Edition Jose Maria Giron-Sierra (Auth.)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

Digital Signal Processing with Matlab

Examples Volume 3 Model Based


Actions and Sparse Representation 1st
Edition Jose Maria Giron-Sierra (Auth.)
Visit to download the full and correct content document:
https://textbookfull.com/product/digital-signal-processing-with-matlab-examples-volum
e-3-model-based-actions-and-sparse-representation-1st-edition-jose-maria-giron-sierr
a-auth/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Conceptual Digital Signal Processing with MATLAB


Keonwook Kim

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

Understanding Digital Signal Processing with MATLAB®


and Solutions. First Edition. Edition Poularikas

https://textbookfull.com/product/understanding-digital-signal-
processing-with-matlab-and-solutions-first-edition-edition-
poularikas/

Digital Signal Processing-A Primer With MATLAB® 1st


Edition Samir I. Abood (Author)

https://textbookfull.com/product/digital-signal-processing-a-
primer-with-matlab-1st-edition-samir-i-abood-author/

Real Time Digital Signal Processing from MATLAB to C


with the TMS320C6x DSPs Third Edition Morrow

https://textbookfull.com/product/real-time-digital-signal-
processing-from-matlab-to-c-with-the-tms320c6x-dsps-third-
edition-morrow/
Smartphone based real time digital signal processing
Third Edition Abhishek Sehgal

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

Digital Signal Processing and Spectral Analysis for


Scientists Concepts and Applications 1st Edition Silvia
Maria Alessio (Auth.)

https://textbookfull.com/product/digital-signal-processing-and-
spectral-analysis-for-scientists-concepts-and-applications-1st-
edition-silvia-maria-alessio-auth/

MATLAB Signal Processing Toolbox User s Guide The


Mathworks

https://textbookfull.com/product/matlab-signal-processing-
toolbox-user-s-guide-the-mathworks/

Digital Image Processing A Signal Processing and


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

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

From Algebraic Structures to Tensors Digital Signal and


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

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

Jose Maria Giron-Sierra

Digital Signal
Processing with
Matlab Examples,
Volume 3
Model-Based Actions and Sparse
Representation
Signals and Communication Technology
More information about this series at http://www.springer.com/series/4748
Jose Maria Giron-Sierra

Digital Signal Processing


with Matlab Examples,
Volume 3
Model-Based Actions and Sparse
Representation

123
Jose Maria Giron-Sierra
Systems Engineering and Automatic Control
Universidad Complutense de Madrid
Madrid
Spain

ISSN 1860-4862 ISSN 1860-4870 (electronic)


Signals and Communication Technology
ISBN 978-981-10-2539-6 ISBN 978-981-10-2540-2 (eBook)
DOI 10.1007/978-981-10-2540-2

Library of Congress Control Number: 2016951678

MATLAB® is a registered trademark of The MathWorks, Inc., and is used with permission. The
MathWorks does not warrant the accuracy of the text or exercises in this book. This book’s use or
discussion of MATLAB software or related products does not constitute endorsement or sponsorship by
the MathWorks of a particular pedagogical approach or particular use of the MATLAB software.

© Springer Science+Business Media Singapore 2017


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

Printed on acid-free paper

This Springer imprint is published by Springer Nature


The registered company is Springer Nature Singapore Pte Ltd.
The registered company address is: 152 Beach Road, #22-06/08 Gateway East, Singapore 189721, Singapore
Preface

This is the third book of a trilogy. As in the other books, a series of MATLAB
programs are embedded in the chapters for several purposes: to illustrate the
techniques, to provide implementation examples, to encourage for personal
exploration departing from a successful start.
The book has two parts, each having just one chapter. These chapters are long
and have a considerable number of bibliographic references.
When using a GPS on a car, sometimes it is not possible to keep contact with
satellites, like for instance inside tunnels. In this case, a model of the car motion—a
dynamic model—can be used for data substitution. The adequate combination of
measurements and models is the key idea of the Kalman filter, which is the central
topic of the first part of the book. This filter was formulated for linear conditions.
There are modifications for nonlinear conditions, like the extended Kalman filter, or
the unscented Kalman filter. A new idea is to use particle filters. These topics are
covered in the chapter under an important perspective: Bayesian filtering.
Compressed sensing has emerged as a promising idea. One of the intended
applications is networked devices or sensors, which are becoming a reality. This
topic is considered in the second part of the book. Some experiments that
demonstrate image denoising applications were included.
For easier reading of the book, the longer programs have been put in an
appendix. And a second appendix on optimization has been added to support some
contents of the last chapter.
The reader is invited to discover the profound interconnections and common-
alities that exist behind the variety of topics in this book. This common ground
would become surely the humus for the next signal processing future.
As said in the preface of the other books, our particular expertise on signal
processing has two main roots: research and teaching. I belong to the Faculty of
Physics, University Complutense of Madrid, Spain. During our experimental
research on autonomous vehicles, maritime drones, satellite control, etc., we
practiced main methods of digital signal processing, for the use of a variety of
sensors and for prediction of vehicle motions. From years ago, I teach Signal
Processing in a Master of Biomedical Physics, and a Master on New technologies.

v
vi Preface

The style of the programs included in the book is purposively simple enough.
The reader is invited to typeset the programs included in the book, for it would help
for catching coding details. Anyway, all programs are available from the book web
page: www.dacya.ucm.es/giron/SPBook3/Programs.
A lot of different materials have been used to erect this book: articles, blogs,
codes, experimentation. I tried to cite with adequate references all the pieces that
have been useful. If someone has been forgotten, please contact me. Most of the
references cited in the text are available from Internet. We have to express our
gratitude to the public information available in this way.
Please, send feedback and suggestions for further improvement and support.

Acknowledgments

Thanks to my University, my colleagues and my students. Since this and the other
book required a lot of time taken from nights, weekends and holidays, I have to
sincerely express my gratitude to my family.

Madrid, Spain Jose Maria Giron-Sierra


Contents

Part I Model-Based Actions: Filtering, Prediction, Smoothing


1 Kalman Filter, Particle Filter and Other Bayesian Filters . . . . . . . . . 3
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.1 A Basic Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.2 Prediction with the Gauss-Markov Model . . . . . . . . . . . . . 10
1.2.3 Continuation of a Simple Example of Recursive
Wiener Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.3 Kalman Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.3.1 The Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.3.2 Evolution of Filter Variables . . . . . . . . . . . . . . . . . . . . . . . 21
1.3.3 Several Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.3.4 Some Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
1.3.5 Numerical Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.3.6 Information Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
1.4 Nonlinear Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
1.4.1 Propagation and Nonlinearity . . . . . . . . . . . . . . . . . . . . . . 32
1.4.2 Jacobian. Hessian. Change of Coordinates. . . . . . . . . . . . . 39
1.4.3 Local Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
1.4.4 Example of a Body Falling Towards Earth . . . . . . . . . . . . 43
1.5 Extended Kalman Filter (EKF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
1.5.1 The EKF Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
1.5.2 Assessment of the Linearized Approximation . . . . . . . . . . 58
1.6 Unscented Kalman Filter (UKF) . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
1.6.1 The Unscented Transform . . . . . . . . . . . . . . . . . . . . . . . . . 63
1.6.2 The Unscented Kalman Filter (UKF) . . . . . . . . . . . . . . . . . 70
1.7 Particle Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
1.7.1 An Implementation of the Particle Filter . . . . . . . . . . . . . . 77
1.7.2 Resampling Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
1.7.3 Multinomial Resampling . . . . . . . . . . . . . . . . . . . . . . . . . . 84

vii
viii Contents

1.7.4 Systematic Resampling . . . . . . . . . . . . . . . . . . . . . . . . . . . 86


1.7.5 Stratified Resampling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
1.7.6 Residual Resampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
1.7.7 Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
1.7.8 Roughening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
1.7.9 Basic Theory of the Particle Filter . . . . . . . . . . . . . . . . . . . 89
1.7.10 Sequential Monte Carlo (SMC) . . . . . . . . . . . . . . . . . . . . . 90
1.7.11 Proposal Importance Functions . . . . . . . . . . . . . . . . . . . . . 93
1.7.12 Particle Filter Variants . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
1.7.13 Marginalized Particle Filter (Rao-Blackwellized
Particle Filter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
1.7.14 Regularized Particle Filters . . . . . . . . . . . . . . . . . . . . . . . . 99
1.8 The Perspective of Numerical Integration . . . . . . . . . . . . . . . . . . . . 100
1.8.1 Geometry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
1.8.2 Quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
1.8.3 Other Approximations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
1.8.4 Gaussian Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
1.8.5 Assumed Density. Expectation Propagation . . . . . . . . . . . . 112
1.9 Other Bayesian Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
1.9.1 Ensemble Kalman Filter (EnKF) . . . . . . . . . . . . . . . . . . . . 114
1.9.2 Iterative Kalman Filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
1.9.3 Gaussian Particle Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
1.9.4 Divide and Conquer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
1.9.5 Combinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
1.9.6 Algorithms with Special Characteristics . . . . . . . . . . . . . . 118
1.10 Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
1.10.1 Optimal Prediction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
1.10.2 One-Stage Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
1.10.3 Three Types of Smoothers . . . . . . . . . . . . . . . . . . . . . . . . 122
1.10.4 Bayesian Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
1.11 Applications of Bayesian Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
1.11.1 Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
1.11.2 Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
1.11.3 Information Fusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
1.11.4 SLAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
1.11.5 Speech, Sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
1.11.6 Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
1.11.7 Earth Monitoring and Forecasting . . . . . . . . . . . . . . . . . . . 137
1.11.8 Energy and Economy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
1.11.9 Medical Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
1.11.10 Traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
1.11.11 Other Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Contents ix

1.12 Frequently Cited Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139


1.12.1 Bearings-Only Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . 139
1.12.2 Other Tracking Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
1.12.3 Univariate Non-stationary Growth Model . . . . . . . . . . . . . 140
1.12.4 Financial Volatility Model . . . . . . . . . . . . . . . . . . . . . . . . . 141
1.12.5 Nonlinear Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
1.12.6 The Pendulum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
1.13 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
1.13.1 MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
1.13.2 Internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

Part II Sparse Representation. Compressed Sensing


2 Sparse Representations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
2.2 Sparse Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
2.2.1 The Central Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
2.2.2 Norms and Sparsity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
2.2.3 Solving Sparsity Optimization Problems . . . . . . . . . . . . . . 156
2.3 Compressed Sensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
2.3.1 Statement of the Approach . . . . . . . . . . . . . . . . . . . . . . . . 182
2.3.2 Compression and Recovery. The Matrix A . . . . . . . . . . . . 184
2.3.3 Incoherence and Sensing . . . . . . . . . . . . . . . . . . . . . . . . . . 189
2.3.4 Stable and Robust Recovery . . . . . . . . . . . . . . . . . . . . . . . 190
2.3.5 Phase Transitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
2.3.6 Some Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
2.4 Image Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
2.4.1 Texture + Cartoon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
2.4.2 Patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
2.4.3 Morphological Components . . . . . . . . . . . . . . . . . . . . . . . . 208
2.5 An Additional Repertory of Applicable Concepts
and Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
2.5.1 Sparse Representation in MATLAB . . . . . . . . . . . . . . . . . 215
2.5.2 Diffusion in 2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
2.5.3 Bregman-Related Algorithms. . . . . . . . . . . . . . . . . . . . . . . 228
2.6 Matrix Completion and Related Problems . . . . . . . . . . . . . . . . . . . 233
2.6.1 Matrix Completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
2.6.2 Decomposition of Matrices . . . . . . . . . . . . . . . . . . . . . . . . 238
2.7 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
2.7.1 Signal Denoising Based on Total Variation (TV) . . . . . . . 241
2.7.2 Picture Reconstruction Based on Matrix Completion. . . . . 244
2.7.3 Text Removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
x Contents

2.8 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250


2.8.1 MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
2.8.2 Internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Appendix A: Selected Topics of Mathematical Optimization . . . . . . . . . . 263
Appendix B: Long Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
List of Figures

Figure 1.1 Keeping the car at a distance from the road border . . . . . . . . . 7
Figure 1.2 Prediction (P), measurement (M) and update (U) PDFs . . . . . . 9
Figure 1.3 Variation of K in function of σ y =σ x . . . . . . . . . . . . . . . . . . . . 10
Figure 1.4 The algorithm is a cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Figure 1.5 A two-tank system example . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Figure 1.6 System outputs (measurements) . . . . . . . . . . . . . . . . . . . . . . . . 19
Figure 1.7 System states, and states estimated by the Kalman filter . . . . . 19
Figure 1.8 Error evolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Figure 1.9 Evolution of the Kalman gains . . . . . . . . . . . . . . . . . . . . . . . . 23
Figure 1.10 Evolution of the state covariance . . . . . . . . . . . . . . . . . . . . . . . 24
Figure 1.11 The prediction step, from left to right . . . . . . . . . . . . . . . . . . . 25
Figure 1.12 The measurement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Figure 1.13 Estimation of the next state . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Figure 1.14 Bayes net corresponding to Kalman filter . . . . . . . . . . . . . . . . 27
Figure 1.15 Satellite position under disturbances . . . . . . . . . . . . . . . . . . . . 33
Figure 1.16 Example of nonlinear function: arctan(). . . . . . . . . . . . . . . . . . 34
Figure 1.17 Original and propagated PDFs . . . . . . . . . . . . . . . . . . . . . . . . . 35
Figure 1.18 Propagation of a PDF through nonlinearity . . . . . . . . . . . . . . . 36
Figure 1.19 Propagated PDFs for sigma ¼ 0:7; 1; 2 . . . . . . . . . . . . . . . . . . 37
Figure 1.20 Propagation of a shifted PDF through nonlinearity . . . . . . . . . 38
Figure 1.21 Basic linear approximation using tangent . . . . . . . . . . . . . . . . 42
Figure 1.22 Falling body example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Figure 1.23 System states (cross marks) . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Figure 1.24 Distance measurement and drag . . . . . . . . . . . . . . . . . . . . . . . 45
Figure 1.25 The three non-zero components of the o f=o x Jacobian . . . . . 47
Figure 1.26 Propagation of ellipsoids (state N=43 -> 44)s . . . . . . . . . . . . . 49
Figure 1.27 System states (cross marks) under noisy conditions. . . . . . . . . 51
Figure 1.28 Distance measurement. Drag . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Figure 1.29 System states (cross marks), and states estimated
by the EKF (continuous) . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 54

xi
xii List of Figures

Figure 1.30 Error evolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 56


Figure 1.31 Evolution of matrix P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 57
Figure 1.32 Evolution of the altitude and velocity Kalman gains . . . . . . .. 57
Figure 1.33 Propagation of a PDF through nonlinearity and through
tangent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 58
Figure 1.34 Propagated PDFs for sigma ¼ 0:2; 0:4; 0:6 . . . . . . . . . . . . . .. 60
Figure 1.35 Propagation of a shifted PDF through nonlinearity,
and through tangent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Figure 1.36 Example of sigma points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Figure 1.37 Example of sigma points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Figure 1.38 Propagation of sigma points . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Figure 1.39 Uncertainty on the angle-radius plane (satellite example),
and sigma points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 69
Figure 1.40 The uncertainty on the Cartesian plane, and sigma points . . .. 69
Figure 1.41 The UT approximation and propagated data points . . . . . . . .. 70
Figure 1.42 System states (cross marks), and states estimated
by the UKF (continuous) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Figure 1.43 Error evolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Figure 1.44 Evolution of matrix P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Figure 1.45 Evolution of the altitude and velocity Kalman gains . . . . . . . . 77
Figure 1.46 System states (cross marks), and states estimated
by the particle filter (continuous) . . . . . . . . . . . . . . . . . . . . . . . 79
Figure 1.47 Error evolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Figure 1.48 Histogram of weights, resampling example . . . . . . . . . . . . . . . 83
Figure 1.49 Cumsum() of weights, resampling example . . . . . . . . . . . . . . . 84
Figure 1.50 Zoom on the cumsum() plot . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Figure 1.51 Histograms of prior and resampled particles . . . . . . . . . . . . . . 85
Figure 1.52 Histograms of systematic, stratified, multinomial,
residual resampling example . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Figure 1.53 A possible situation of prior and likelihood PDFs . . . . . . . . . . 94
Figure 1.54 Using Gaussian kernel for filter regularization . . . . . . . . . . . . . 100
Figure 1.55 Organigram of the section . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Figure 1.56 Approximations of Student’s T PDF: (top) Laplace's
method, (bottom) KLD minimization . . . . . . . . . . . . . . . . . . . . 107
Figure 1.57 Organigram of the section . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Figure 1.58 System estimated states (cross marks), and fixed-interval
smoothed states (continuous) . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Figure 1.59 System estimated states (cross marks), and fixed-lagl
smoothed states (continuous) . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Figure 1.60 Smoothing of states with fixed-point smoothing . . . . . . . . . . . 132
Figure 1.61 Evolution of covariances in the fixed-point smoothing
example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Figure 1.62 Bearings only tracking scenario . . . . . . . . . . . . . . . . . . . . . . . . 139
List of Figures xiii

Figure 2.1 The line L and, a the ball B1=2 , b the ball B1 ,
c the ball B2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Figure 2.2 An example of the solution paths obtained with LARS . . . . . . 159
Figure 2.3 Solution paths using LARS for diabetes set . . . . . . . . . . . . . . 162
Figure 2.4 Solution paths using LASSO for diabetes set . . . . . . . . . . . . . 162
Figure 2.5 Soft-thresholding operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Figure 2.6 Application of ISTA for a sparse signal recovery
example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Figure 2.7 Evolution of objective function along ISTA iterations . . . . . . . 172
Figure 2.8 A BP sparsest solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Figure 2.9 Evolution of objective function k xk1 along ADMM
iterations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Figure 2.10 Sparse solution obtained with OMP . . . . . . . . . . . . . . . . . . . . 180
Figure 2.11 Evolution of the norm of the residual . . . . . . . . . . . . . . . . . . . 181
Figure 2.12 The CS scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Figure 2.13 An sparse signal being measured . . . . . . . . . . . . . . . . . . . . . . . 186
Figure 2.14 Recovered signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Figure 2.15 Evolution ofkxk1 along iterations . . . . . . . . . . . . . . . . . . . . . . 187
Figure 2.16 A phase transition curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Figure 2.17 Original image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Figure 2.18 (right) Chan-Vese segmentation, (left) level set . . . . . . . . . . . . 197
Figure 2.19 A patch dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Figure 2.20 The dictionary problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Figure 2.21 Original picture, and image with added Gaussian noise. . . . . . 207
Figure 2.22 Patch dictionary obtained with K-SVD . . . . . . . . . . . . . . . . . . 207
Figure 2.23 Denoised image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Figure 2.24 A synthetic image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Figure 2.25 Example of figure during MCA process . . . . . . . . . . . . . . . . . 211
Figure 2.26 The original composite signal and its components . . . . . . . . . . 212
Figure 2.27 Visualization of banded matrix using spy() . . . . . . . . . . . . . . . 216
Figure 2.28 Visualization of the Bucky ball matrix structure . . . . . . . . . . . 217
Figure 2.29 Visualization of the bucky ball graph . . . . . . . . . . . . . . . . . . . 217
Figure 2.30 Visualization of HB/nnc1374 matrix using spy() . . . . . . . . . . . 218
Figure 2.31 Visualization of heat diffusion example . . . . . . . . . . . . . . . . . . 220
Figure 2.32 Effect of Gaussian diffusion, original on top . . . . . . . . . . . . . . 222
Figure 2.33 Effect of Gaussian anti-diffusion, original on top . . . . . . . . . . . 224
Figure 2.34 The diffusion coefficient and the corresponding
flux function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Figure 2.35 Denoising of image with salt & pepper noise,
using P-M method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Figure 2.36 Example of Bregman distance . . . . . . . . . . . . . . . . . . . . . . . . . 228
Figure 2.37 ROF total variation denoising using split Bregman . . . . . . . . . 233
Figure 2.38 Evolution of nuclear norm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Figure 2.39 A test of reconstruction quality . . . . . . . . . . . . . . . . . . . . . . . . 236
xiv List of Figures

Figure 2.40 A low-rank matrix and a sparse matrix . . . . . . . . . . . . . . . . . . 238


Figure 2.41 The observed matrix M = L+S . . . . . . . . . . . . . . . . . . . . . . . . 239
Figure 2.42 The recovered matrices L and S . . . . . . . . . . . . . . . . . . . . . . . 239
Figure 2.43 Signal to be denoised . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Figure 2.44 TV denoising: (left) convergence, (right) denoised signal . . . . 243
Figure 2.45 Original image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Figure 2.46 Evolution of nuclear norm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Figure 2.47 Image reconstruction by matrix completion . . . . . . . . . . . . . . . 246
Figure 2.48 Simulated graffiti image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Figure 2.49 Image decomposition into low-rank and sparse matrices . . . . . 249
Listings

1.1 Combining prediction and measurement . . . . . . . . . . . . . . . . . . . . 9


1.2 K in function of sigmay/sigmax. . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3 Kalman filter example, in noisy conditions . . . . . . . . . . . . . . . . . . 20
1.4 Example of satellite position at T0. . . . . . . . . . . . . . . . . . . . . . . . 33
1.5 Propagation through nonlinearity . . . . . . . . . . . . . . . . . . . . . . . . . 35
1.6 Propagation through nonlinearity . . . . . . . . . . . . . . . . . . . . . . . . . 36
1.7 Propagation through nonlinearity . . . . . . . . . . . . . . . . . . . . . . . . . 38
1.8 Radar monitoring of falling body . . . . . . . . . . . . . . . . . . . . . . . . . 45
1.9 Radar monitoring of falling body: Jacobians . . . . . . . . . . . . . . . . . 48
1.10 Radar monitoring of falling body: ellipsoids . . . . . . . . . . . . . . . . . 50
1.11 Extended Kalman filter example . . . . . . . . . . . . . . . . . . . . . . . . . 54
1.12 Linearized propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
1.13 Propagation: variances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
1.14 Propagation: asymmetrical result . . . . . . . . . . . . . . . . . . . . . . . . . 62
1.15 Example of sigma points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
1.16 Example of sigma points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
1.17 Unscented Kalman filter example. . . . . . . . . . . . . . . . . . . . . . . . . 72
1.18 Particle filter example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
1.19 Resampling (multinomial). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
1.20 Resampling (systematic) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
1.21 Resampling (stratified) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
1.22 Resampling (residual). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
1.23 Fixed-interval smoothing example . . . . . . . . . . . . . . . . . . . . . . . . 124
1.24 Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
1.25 Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
2.1 LARS/LASSO example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
2.2 ISTA example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
2.3 Example of ADMM for Basis Pursuit . . . . . . . . . . . . . . . . . . . . . 177
2.4 Example of OMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
2.5 Example of Douglas-Rachford. . . . . . . . . . . . . . . . . . . . . . . . . . . 188
2.6 Example of Chan-Vese algorithm . . . . . . . . . . . . . . . . . . . . . . . . 197

xv
xvi Listings

2.7 MCA example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212


2.8 Create a tri-banded sparse matrix. . . . . . . . . . . . . . . . . . . . . . . . . 216
2.9 Load and visualize the bucky matrix . . . . . . . . . . . . . . . . . . . . . . 218
2.10 Load and visualize HB nnc1374 . . . . . . . . . . . . . . . . . . . . . . . . . 219
2.11 Example of heat diffusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
2.12 Example of picture diffusion blurring . . . . . . . . . . . . . . . . . . . . . . 223
2.13 Example of picture anti-diffusion sharpening . . . . . . . . . . . . . . . . . 223
2.14 Perona-Malik diffusivity function and flux function . . . . . . . . . . . . 226
2.15 Example of picture denoising using Perona-Malik diffusion . . . . . . 227
2.16 Example of Matrix Completion . . . . . . . . . . . . . . . . . . . . . . . . . . 236
2.17 Decomposition into low-rank (L) and sparse (S) matrices . . . . . . . . 240
2.18 Example of TV denoising. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
2.19 Example of Picture Completion . . . . . . . . . . . . . . . . . . . . . . . . . . 246
2.20 Decomposition into low-rank (L) and sparse (S) matrices . . . . . . . . 249
B.1 Kalman filter example, in noisy conditions . . . . . . . . . . . . . . . . . . 370
B.2 Kalman filter ellipsoids. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
B.3 Propagation through nonlinearity . . . . . . . . . . . . . . . . . . . . . . . . . 378
B.4 Influence of perturbations and noise . . . . . . . . . . . . . . . . . . . . . . . 381
B.5 Extended Kalman filter example . . . . . . . . . . . . . . . . . . . . . . . . . 385
B.6 Propagation of sigma points through nonlinearity . . . . . . . . . . . . . 389
B.7 Unscented Transformation example . . . . . . . . . . . . . . . . . . . . . . . 392
B.8 Unscented Kalman filter example. . . . . . . . . . . . . . . . . . . . . . . . . 397
B.9 Particle filter example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
B.10 Resampling methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
B.11 Example of Laplace’s and KLD approximations . . . . . . . . . . . . . . 413
B.12 Fixed-lag smoothing example . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
B.13 Fixed-point smoothing example . . . . . . . . . . . . . . . . . . . . . . . . . . 417
B.14 K-SVD denoising example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
B.15 spc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
B.16 Example of picture denoising using Anisotropic TV. . . . . . . . . . . . 425
Part I
Model-Based Actions: Filtering,
Prediction, Smoothing
Chapter 1
Kalman Filter, Particle Filter and Other
Bayesian Filters

1.1 Introduction

Consider the case of satellite tracking. You must determine where is your satellite,
using a large antenna. Signals from the satellite are noisy. Measurements of antenna
angles have some uncertainty margins. But you have something that may help you:
the satellite follows a known orbit, so at time T must be at position P. However this
help should be taken with caution, since there are orbit perturbations.
Satellite tracking is an example of a more general scenario. The target is to estimate
the state of a dynamic system, a state that is changing along time. The means you
have are measurements and a mathematical model of the system dynamics. These
two means should be combined as best as possible.
Some more examples could be useful to capture the nature of the problem to be
considered in this chapter.
According with the description given in a scientific conference, a research team
was developing a small UAV (unmanned aerial vehicle) to fly on their university
campus. They used distance measurement with an ultrasonic sensor, for flight altitude
control. Sometimes the altitude measurements were lost or completely wrong. In
such moments, these measurements were substituted by a reasonable value. At least
a simplistic (or even implicit) model should be used here for two reasons: to determine
that there is a wrong measurement, and to obtain a reasonable value.
Nowadays a similar problem is found with vehicular GPS. In certain circumstances
of the travel—for instance, a tunnel—the connection with satellites is lost, but the
information to the driver should continue.
Another example is the case of biosignals. When measuring electroencephalo-
grams (EEG) or electrocardiograms (ECG), etc., sometimes artifacts appear due to
bad electrodes contact, eye blinking, interferences, etc. These bad measurements
should be correctly identified as outliers, and some correction procedure should be
applied.
This chapter deals with optimal state estimation for dynamic systems. The
Bayesian methodology provides a general framework for this problem. Along time,

© Springer Science+Business Media Singapore 2017 3


J.M. Giron-Sierra, Digital Signal Processing with Matlab Examples, Volume 3,
Signals and Communication Technology, DOI 10.1007/978-981-10-2540-2_1
4 1 Kalman Filter, Particle Filter and Other Bayesian Filters

a set of important practical methods, which can be seen as Bayesian instances, have
been developed, such as the Kalman filter and the particle filter.
Given a dynamic system, the Bayesian approach to state estimation attempts
to obtain the posterior PDF of the sate vector using all the available information.
Part of this information is provided by a model of the system, and part is based
on measurements. The state estimation could be done with a recursive filter, which
repeats a prediction and an update operation.
Denote the posterior PDF at time step k as p(xk | Yk ), where Yk is the set of all
previous measurements Yk = { y j , j = 1, 2, . . . , k}.
The prediction operation propagates the posterior PDF from time step k − 1 to k,
as follows: 
p(x | Y ) = p(x | x ) p(x | Y ) dx (1.1)
 k  k−1  k k−1  k−1 k−1 k−1
A B C

where A is the prior at k, B is given by the system model, and C is the posterior at
k − 1.
The update operation takes into account the new measurement yk at k:
⎛ ⎞

p(xk | Yk ) = ⎝ p(yk | xk ) p(xk | Yk−1 )⎠ / p(yk | Yk−1 ) (1.2)


           
D L A N

where D is the posterior, L is the measurement likelihood, and N is a normalizing


denominator.
The system model could be of the form:

x(k + 1) = f(x(k), u(k), w(k)) (1.3)

y(k) = h(x(k), v(k)) (1.4)

where w(k) is the process noise, and v(k) is the observation noise.
The first equation of the system model can be used for the term B, and the second
equation for the term L.
If some cases, with linear dynamics and measurement, the system model can be
a Gauss-Markov model:

x(n + 1) = A x(n) + B u(n) + w(n) (1.5)

y(n) = C x(n) + v(n) (1.6)

Notice that, in order to align with the notation commonly employed in the Bayesian
filters literature, we denote vectors in boldface letters (in previous chapters we used
bars over letters).
1.1 Introduction 5

The Kalman filter [55] offers an optimal solution for state estimation, provided
the system is linear, and noises are Gaussian. It is a particular case of the Bayesian
recursive filter.
In more general cases with non-linear dynamics, the system model is based on
the two functions f(·) and h(·). A linearization strategy could be applied to still use
the Kalman filter algorithm, and this is called ‘Extended Kalman Filter’ (EKF). An
alternative is to propagate a few special points (‘sigma points’) through the system
equations; with these points it is possible to approximate the prior and posterior PDFs.
An example of this alternative is the ‘Unscented Kalman Filter’ (UKF). For non-
linear/non-Gaussian cases that do not tolerate approximations, the ‘Particle Filter’
could be used; the filter is based on the propagation of many points.
The chapter starts with the standard Kalman filter, after some preliminaries. Then
nonlinearities are considered, and there are sections on EKF, UKF, and particle
filters. All these methods are naturally linked to the use of computers or digital
processors, and so the world of numerical computation must be visited in another
section. Smoothing is another important field that is treated in Sect. 1.10. The last
sections intend to at least introduce important extensions and applications of optimal
state estimation.
Some limits should be admitted for this chapter, and therefore there is no space for
many related topics, like H-infinity, game theory, exact filters, etc. The last section
offer some links for the interested reader.
The chapter is mainly based on [8, 15, 19, 40, 72, 96].
In general, many problems related with state estimation remain to be adequately
solved. The field is open for more research.

1.2 Preliminaries

The main stream of this chapter is estimation. Therefore, it is convenient to harvest


relevant concepts and results about it.
In particular, the Kalman filter is concerned with joint distributions of states x and
observations y (both are stochastic variables).
The basic mathematical treatment of stochastic variables uses the following mag-
nitudes:

• Scalar case:

mean : μx = E(x(n))

variance : σx2 = E((x(n) − μx )2 )

• Vector case (vectors in column format):

covariance matri x : Σx = E((x(n) − μx )(x(n) − μx )T )


6 1 Kalman Filter, Particle Filter and Other Bayesian Filters

A typical element σi j of a covariance matrix is:

σi j = E((xi (n) − μxi )(x j (n) − μx j )T )

• Two processes:

cr oss − covariance matri x : Σx y = E((x(n) − μx )(y(n) − μ y )T )

Suppose there is a function f(y) that gives us an estimation of x, the variance of


the estimation (a scalar value) would be:

E(|| f(y) − x||2 )

It can be shown that this variance is minimized when:

f(y) = E(x|y)

Therefore, the minimum variance estimate (MVE) of x, given y is the conditional


expectation:
x̂ = E(x|y)

In other words, the conditional mean gives the MVE.


The Kalman filter is a linear minimum variance estimator (LMVE). If the process
and observation noises are Gaussian, the filter gives the MVE.
Note that the MAP estimate is the mode of the a posteriori PDF, while the MVE
is the mean of the a posteriori PDF. In some applications there are several modes,
and specific filters–modal filters-should be employed. In other applications, it may
happen that the mean differs from the mode. Bayesian estimation obtains the MAP
estimation. In the case of linear systems with process and observation Gaussian
noises, the mode and the mean are coincident.
Starting from an initial state, the state of dynamic systems evolves along time.
The estimation of this state is linked to propagation of states and noises. It would be
a good exercise for the reader to simulate this propagation using a linear state model
with noises.
When taking data for humanoid robot research, it is common to record from top the
motion of a walking man. It is not purely straight, even trying to follow a line. There
are state oscillations. The same happen with satellites, it was supposed to follow a
precise orbit, but there are oscillations. Notice that these are real oscillations. Process
noise corresponds to real perturbations.
Measurement noise tends to confound you, not giving the real state. A main
target of state estimation is to filter out this problem. And speaking of problems,
when possible it is better to use good measurements, avoiding sources of noise, and
trying to obtain linear measurements. As it would be demonstrated in this chapter,
nonlinearities usually cause estimation difficulties. Sometimes change of variables
could help to obtain linear conditions.
1.2 Preliminaries 7

1.2.1 A Basic Example

This is an example taken from [95]. It is the case of driving a car, keeping a distance
x from the border of the road (Fig. 1.1).
In this example is useful to take into account that:

N (μ1 , Σ1 ) × N (μ2 , Σ2 ) = const × N (μ, Σ) (1.7)

with:
μ = Σ Σ1−1 μ1 + ΣΣ2−1 μ2
(1.8)
Σ −1 = Σ1−1 + Σ2−1

(it is usual in the literature to denote the Gaussian PDF as N (μ, Σ)).
At time 0, a passenger guess that the distance to the border is y(0). It could be
considered as an inexact measurement with a variance σ 2y0 . One could assume a
Gaussian conditional density f (x|y(0)) with variance σ 2y0 . In this moment, the best
estimate is x̂(1|0) = y(0).
At time 1, the driver also takes a measurement y(1), which is more accurate.
Assume again a Gaussian conditional density f (x|y(1)), with σ 2y1 < σ 2y0 . The joint
distribution that combines both measurements (product of Gaussians) would have:

σ 2y1 σ 2y0
μx = y(0) + y(1) (1.9)
σ 2y0 + σ 2y1 σ 2y0 + σ 2y1

1 1 1
= 2 + 2 (1.10)
σx2 σ y0 σ y1

The new estimate of the distance would be μx . The corresponding variance, σx2 , is
smaller than either σ 2y0 or σ 2y1 . The combination of two estimates is better.

Fig. 1.1 Keeping the car at a


distance from the road border
8 1 Kalman Filter, Particle Filter and Other Bayesian Filters

By the way, the so-called ‘Fisher information’ of a Gaussian distribution is the


inverse of the variance: 1/σ 2 . Large uncertainty means poor information.
Now, write the new estimate as follows:

σ 2y0
x̂(1|1) = μx = y(0) + (y(1) − y(0)) = x̂(1|0) + K (1)(y1 − x̂(1|0))
σ 2y0 + σ 2y1
(1.11)
where:
σ 2y0
K (1) = (1.12)
σ 2y0 + σ 2y1

Equation (1.11) has the form of a Kalman filter; K () is the Kalman gain. The equation
says that the best estimate can be obtained using the previous best estimate and a
correction term. This term compares the latest measurement with the previous best
estimate.
Likewise, the variance could be written as follows:

σx2 (1|1) = σx2 (1|0) − K (1) σx2 (1|0) (1.13)

so the variance decreases.


The car moves. A simple model of the lateral motion, with respect to the border
of the road, could be:
dx
= u +w (1.14)
dt

The term w is random perturbation with variance σw2 . The lateral velocity is u, set
equal to zero. After some time T , the best estimate (prediction) would be:

x̂(2|1) = x̂(1|1) + T u (1.15)

The variance of the estimate increases:

σx2 (2|1) = σx2 (1|1) + T σw2 (1.16)

The increase of variance is not good. A new measurement is welcome. Suppose that
at time 2 a new measurement is taken. Again the product of Gaussians appears, as
we combine the prediction x̂(2|1) and the measurement y(2). Therefore:

x̂(2|2) = x̂(2|1) + K (2)(y2 − x̂(2|1)) (1.17)

σx2 (2|2) = σx2 (2|1) − K (2) σx2 (2|1) (1.18)

where:
σx2 (2|1)
K (2) = (1.19)
σx2 (2|1) + σ 2y2
1.2 Preliminaries 9

Fig. 1.2 Prediction (P), 0.35


measurement (M) and update
(U) PDFs 0.3
U
0.25

0.2

P
0.15
M
0.1

0.05

0
-10 -5 0 5 10 15
x

The philosophy of the Kalman filter is to obtain better estimates by combining pre-
diction and measurement (the combination of two estimates is better). The practical
procedure is to update the prediction with the measurement.
Figure 1.2 shows what happens with the PDFs of the prediction (P), the measure-
ment (M) and the update (U). The update PDF has the smallest variance, so it is a
better estimation.

Program 1.1 Combining prediction and measurement


%Combining prediction and measurement
%
xiv=0.1;
x=-10:xiv:15;
%prediction pdf
pmu=4; psig=1.8;
ppdf=normpdf(x,pmu,psig);
%measurement pdf
mmu=0; msig=2.5;
mpdf=normpdf(x,mmu,msig);
%combine pdfs
cpdf=ppdf.*mpdf;
%area=1
KA=1/(sum(cpdf)*xiv);
cpdf=KA*cpdf;
figure(1)
plot(x,ppdf,'b'); hold on;
plot(x,mpdf,'r'); plot(x,cpdf,'k');
title('combine prediction and measurement: update');
xlabel('x');
10 1 Kalman Filter, Particle Filter and Other Bayesian Filters

Fig. 1.3 Variation of K in


function of σ y /σx 1

0.8

0.6

K
0.4

0.2

0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
sigy/sigx

Another aspect of the Kalman filter philosophy is that, in order to estimate the
present system state, the value of K () is modulated according with the confidence
offered by measurements or by prediction. Suppose that the prediction variance is
constant, then, if measurement uncertainty increases, K decreases: it could be said
that the correction exerted by K becomes more ‘prudent’.
Figure 1.3 shows how K depends on σ y /σx . The figure has been generated with
the Program 1.17.

Program 1.2 K in function of sigmay/sigmax


%K in function of sigmay/sigmax
%
%values of sigmay/sigmax
r=0.1:0.1:2;
%reserve space
K=zeros(1,length(r));
figure(1)
K=1./(1+r.^2); %vectorized code
plot(r,K,'k');
title('K vs. sigy/sigx');
xlabel('sigy/sigx'); ylabel('K');
axis([0 2.1 0 1.1]);

1.2.2 Prediction with the Gauss-Markov Model

This subsection focuses on the propagation of mean and covariance. The basis of the
next study is an important lemma, which applies to a partition of a set of Gaussian
variables:
1.2 Preliminaries 11

x1
x =
x2

With:
μx1 S11 S12
μx = ; Sx =
μx2 S21 S22

Lemma: the conditional distribution of x1 (n), given a x2 (n) = x∗2 (n) is Gaussian
with:
−1
mean = μx1 + S12 S22 (x2 − μx2 )
−1
cov = Σ11 − Σ12 Σ22 Σ21

Now, let us focus on dynamic systems described with Gauss-Markov models.


The Gauss-Markov model deals with states x(n) and observations y(n) (also
denoted as outputs or measurements). Here is the model:

x(n + 1) = A x(n) + B u(n) + w(n) (1.20)

y(n) = C x(n) + v(n) (1.21)

Let us use the following notation:


• x̂(n + 1) is the conditional mean of x(n + 1) given a set of observations {y(0), y(1),
. . . y(n)}.
• The state error is:

er(n) = x(n) − x̂(n)

• The state error covariance is:

Σ(n) = E(er(n) · er(n)T )

Now, consider the following partition:

x(n + 1)
(1.22)
y(n)

Taking into account the model, the four covariance components are:

Σx x = A Σ(n) A T + Σw (1.23)

Σx y = A Σ(n) C T + Σwv (1.24)


12 1 Kalman Filter, Particle Filter and Other Bayesian Filters

Σ yx = C Σ(n) A T + Σwv
T
(1.25)

Σ yy = C Σ(n) C T + Σv (1.26)

Thus, the mean and the variance of the partitioned process are the following:

A x̂(n) B
μp = + u(n) (1.27)
C x̂(n) 0

A Σ(n) A T + Σw A Σ(n) C T + Σwv


Σp = (1.28)
C Σ(n) A T + Σwv
T
C Σ(n) C T + Σv

Now, according to the lemma, the conditional mean is:

x̂(n + 1) = A x̂(n) + B u(n) + K (n) (y(n) − C x̂(n)) (1.29)

And the conditional covariance is:

Σ(n + 1) = [A Σ(n) A T + Σw ] − K (n) [C Σ(n) C T + Σv ] K T (n) (1.30)

where:
−1
K (n) = Σx y · Σ yy = [A Σ(n) C T + Σwv ] · [C Σ(n) C T + Σv ]−1 (1.31)

The last three equations provide a one-step prediction. The term K (n) is called the
Kalman gain.
And the important point is that since we know the conditional mean, then we have
the minimum variance estimate (MVE) of the system state: this is the Kalman filter.

1.2.3 Continuation of a Simple Example of Recursive


Wiener Filter

This subsection links with subsection (5.2.5) where a simple example of Wiener
filter was described. In that example, no model of x(n) was considered. A recursive
estimation was obtained, with the following expression:

x̂(n + 1) = x̂(n) + g(n + 1) (y(n + 1) − x̂(n)) (1.32)

As it was said in the second book, the above expression has the typical form of
recursive estimators, where the estimation is improved in function of the estimation
error.
1.2 Preliminaries 13

In the preceding subsection the Kalman filter was derived by studying the propa-
gation of means and variances. Notice that x̂(n + 1) was obtained using y(n). This
is prediction.
Now, let us establish a second version of the filter where x̂(n + 1) is obtained using
y(n + 1). This is filtering. A scalar Gauss-Markov example will be considered. The
derivation of the Kalman filter will be done based on minimization of estimation
variance. This is a rather long derivation borrowed from [8]. Although long, it is an
interesting deduction exercise that exploits orthogonality relations.
Let us proceed along three steps:

1. Problem statement
The scalar system is the following:

x(n + 1) = A x(n) + w(n) (1.33)

y(n) = C x(n) + v(n) (1.34)

where A and C are constants (they are not matrices, however we prefer to use
capital letters).
Assumptions:
x(0) = 0; w(0) = 0

x(n) and w(n) are uncorrelated

v(n) and w(n) are uncorrelated, and zero-mean


The following recursive estimation is proposed:

x̂(n + 1) = f (n + 1) x̂(n) + k(n + 1) y(n + 1) (1.35)

(it will reach the typical form, after the coming development)
The estimation variance is:

Σ(n + 1) = E {(x̂(n + 1) − x(n + 1))2 } (1.36)

To obtain the MVE:


∂ Σ(n + 1)
= 2 E {(x̂(n + 1) − x(n + 1)) · x̂(n) } = 0 (1.37)
∂ f (n + 1)

∂ Σ(n + 1)
= 2 E {(x̂(n + 1) − x(n + 1)) · y(n + 1) } = 0 (1.38)
∂ k(n + 1)
Another random document with
no related content on Scribd:
itself. The details of the process have not, however, been well
ascertained.

Trematoda digenea (endoparasitica).

Occurrence and Habits of Digenea.—Endoparasitic Trematodes


have been found in almost all the organs of Vertebrate hosts
excepting in the nervous, skeletal, and reproductive systems. The
alimentary canal, however, is the most usual habitat. From the
buccal cavity to the large intestine, or even to the cloaca, its different
regions are the resorts of various Trematodes. No Digenea have
been found in the mouth, pharynx, or oesophagus of Mammals; but
in Birds, Reptiles, Amphibia, and especially in Fishes, these parts
are largely affected. It is a striking fact that Trematodes should occur
in the stomach of (chiefly) large predaceous fishes, such as the Pike,
Sharks, the Angler-fish, and others, considering the powerful
digestive action of the gastric juice of these carnivores. The peculiar
nature of the defence which must be employed by the parasites
against this digestive action, becomes still more marked when it is
considered that if a Trematode normally living in the stomach of one
host be transferred to that of another, it is usually speedily digested,
as is shown (p. 65) in the case of Distomum macrostomum. From
these considerations the suggestion has been made that the
cutaneous secretions of these Trematodes must act, not only as a
protection against digestive or other ferments, but that the action in
each case must be a specific one (Frenzel, Braun).

Fig. 30.—Distomum luteum v. Baer (immature), to show the


arrangement of the excretory vessels. × 50. ex.o, Excretory
aperture by which the terminal contractile duct opens—the finer
vessels end in flame-cells; int, intestine; m, mouth-sucker; ph,
pharynx; vs, ventral sucker. (After la Valette.)

It is, however, in the small intestine that most Trematodes occur, as


the examination of the common Frog[75] will readily demonstrate.
Both this and the edible Frog are attacked by a dozen Distomatidae,
only a few of which, however, are common to both hosts, and a
number of Holostomatidae also pass a stage of their development
within these Amphibia. Some idea of the extent to which animals,
whose habits lead to infection, may be attacked by Trematodes (to
say nothing of Cestodes and Nematodes, which often occur also)
may be gathered from the fact that in dissecting a black stork,
Nathusius found several hundred Holostomum excavatum and about
a hundred Distomum ferox in the small intestine, twenty-two D. hians
in the oesophagus, five others in the stomach, and one D. echinatum
in the intestine. Snipe, Woodcock, Sandpipers, Dunlin, Gulls, Bittern,
Geese, and Wild Ducks are, to mention a few cases, greatly infested
by members of this group.

The following Trematodes have occurred in man[76]:—

Distomum hepaticum Abild.


" lanceolatum Mehlis.
" conjunctum Cobbold.
" spathulatum Leuckart (= D. sinense Cobb., D.
japonicum R. Blanch.).
" rathouisi Poir. (probably = D. crassum Busk, D. buskii
Lank.).
" heterophyes v. Sieb.
" pulmonale Bälz (= D. ringeri Cobb., D. westermanni
Kerb.).
" oculi humani Ammon (= D. ophthalmobium Dies.).
Monostomum lentis v. Nord.
Amphistomum hominis Lewis and M‘Connell.
Bilharzia haematobia Cobb.
Life-histories of the Digenea.—The classification of Trematodes
according to their life-histories, expressed in the divisions
Monogenea and Digenea, though a very useful one, breaks down
entirely in the case of certain forms. Thus the life-history of
Gyrodactylus is probably digenetic rather than monogenetic.
Aspidogaster conchicola,[77] which lives in the pericardial cavity of
the fresh-water mussel (possibly the only case of a Trematode
becoming normally mature in an Invertebrate host, since other
species of Aspidogaster live in Chelonia), produces larvae which
enter another Anodonta and develop directly into the sexual form. In
other words, Aspidogaster, though structurally a digenetic form,
possesses a life-history which is direct and simple, i.e. monogenetic.

The Holostomatidae, which live in birds of prey and aquatic birds,


give rise to eggs from which a minute larva escapes. The fate of this
aquatic larva is not directly known, but in all probability after entering
a host (Fish, Amphibian, Mollusc), it undergoes a gradual change
into what has long been known as a Tetracotyle, from the frequent
presence of four (sometimes only three) adhering organs. Fig. 31
exhibits a species which is abundant in the lens and vitreous humour
of the eye of the Perch. Its further history is not known, but
presumably the Perch is presently devoured by the final host in
which the Diplostomum attains maturity. Thus the Holostomatidae
are "metastatic" (Leuckart), their (probably) direct development
requiring the presence of two hosts.[78]

The other Digenea, the life-histories of which are known, belong to


the Distomatidae and Amphistomatidae, and we may distinguish the
steps by which the complex life-history of the liver-fluke (Distomum
hepaticum) has been brought about, by a consideration of that of
Distomum macrostomum.
Fig. 31.—Diplostomum (Tetracotyle) volvens. (After v. Nordmann.) ×
130. cv, Contractile excretory vesicle; d, intestine; e, calcareous
bodies in excretory tubules; ex.o, excretory aperture; gl, glandular
adhesive body; ms, oral sucker; ph, pharynx; vs, ventral sucker.

Distomum macrostomum.—This form occurs in the intestine of


several common Passerine birds. It is remarkable not only for the
large oral sucker, but also on account of the position of the common
genital pore at the hinder, and not as usual, at the anterior, end of
the body (Fig. 32, A). The eggs pass out through this pore, and are
discharged with the bird's excrement. Should a certain snail
(Succinea putris) happen to rasp off the epidermis of a leaf upon
which the faeces have fallen, the eggs are swallowed and a minute
active larva is set free (Fig. 32, B). This penetrates through the thin
wall of the digestive tract of the snail, and passing into the
connective tissue, throws off its cilia and assumes the shape of Fig.
32, C. This sporocyst, as the larva is now termed, grows rapidly in all
directions (Fig. 32, D) at the expense of the snail's tissues, until it
becomes impossible to separate parasite and host completely.

Fig. 32.—Life-history of Distomum macrostomum Rud. A, Immature


Distomum (really a tailless Cercaria) found in the swollen terminal
parts of Leucochloridium (Fig. 33, B) and enclosed in two
protective membranes, × 40; B, larva which hatches out of the
egg of D. macrostomum, × 125; C, the metamorphosed larva
(sporocyst) fourteen days after having entered Succinea putris,
and pierced through its intestinal wall; D, actively growing
sporocyst. (After Heckert.) go, Genital aperture; int, intestine; ms,
mouth sucker; n, nervous system; ov, ovary; ps, ventral sucker;
te, testis.

Those branches which lie superficially in the cephalic region of the


snail become greatly swollen, cylindrical, and contractile. They are
banded with green and white, ornamented with red terminal spots,
and pulsate rapidly. Hence these fertile branches of the sporocyst
(which in this condition was known as Leucochloridium paradoxum,
Fig. 33, B) naturally attract the attention of insectivorous birds, which
peck off the tentacles of the snail, and with it the swollen sporocyst-
branch. A sphincter muscle closes the cut end of the fertile sac when
the bird's bill nips it off. The sac contains large numbers of young D.
macrostomum (Fig. 32, A), produced by the division of embryonic
cells of the larva (Fig. 32, B), which are apparently blastomeres of
the egg reserved for this future use. It is a remarkable circumstance
that the old bird itself is immune from infection, and if it swallows
these young Distomes, they are digested. Should, however, the
snail's tentacle and its contents be offered as food to the nestlings,
their weaker digestive powers merely set the Distomes free from the
protective membranes (Fig. 32, A), and thus the Blackcaps,
Sparrows, and other birds infested by D. macrostomum have
acquired the parasite when they were nestlings by the unintentional
agency of their parents.[79] The snail regenerates its lost tentacles
only for the sporocyst to again bud off fertile branches into them.
Fig. 33.—A, Succinea putris, infested by B, Leucochloridium
paradoxum, or the fully-formed sporocyst of Distomum
macrostomum. (After Heckert.) A, Natural size; B, × 7.

The egg of this Distome thus gives rise to a larva which enters the
tissues of one particular Mollusc. Here it becomes a branched
sporocyst within which the sexual worms are formed, apparently
each from a single embryonic blastomere ("Keimzelle"), by a process
comparable with the development of a parthenogenetic ovum, and
the whole cycle has been termed Alloiogenesis, i.e. alternation of
sexual and parthenogenetic generations (Grobben).[80] Leuckart[81]
and Looss,[82] however, consider that what was once a
metamorphosis of an individual (as in the Holostomatidae) has now
become, by maturation of the Cercaria in the comparatively modern
warm-blooded bird, a metamorphosis extending over two or more
generations.

Distomum (Fasciola) hepaticum.—The liver-fluke of the Sheep,


which produces the disastrous disease, liver-rot, has a distribution as
wide as that of a small water-snail, Limnaea truncatula, the
connexion between the two being, as Thomas[83] and Leuckart
discovered, that this snail is the intermediate host in which the earlier
larval, sporocyst, and redia stages are passed through, and a vast
number of immature flukes (Cercariae) are developed. These leave
the snail and encyst upon grass, where they are eaten by the sheep.
Over the whole of Europe, Northern Asia, Abyssinia, and North
Africa, the Canaries, and the Faroes, the fluke and the snail are
known to occur, and recently the former has been found in Australia
and the Sandwich Islands, where a snail, apparently a variety of
Limnaea truncatula, is also found.[84] Over these vast areas,
however, the disease usually only occurs in certain marshy districts
and at certain times of the year. Meadows of a clayey soil, liable to
be flooded (as in certain parts of Oxfordshire), are the places where
this Limnaea occurs most abundantly, and these are consequently
the most dangerous feeding-grounds for sheep. The wet years 1816,
1817, 1830, 1853, and 1854—memorable for the occurrence of
acute liver-rot in England, Germany, and France—showed that the
weather also plays a considerable part in extending the suitable
ground for Limnaea over wide areas, which in dry years may be safe
pastures. In 1830 England lost from this cause,[85] one and a half
million sheep, representing some four millions of money, while in
1879-80 three millions died. In 1862 Ireland lost 60 per cent of the
flocks, and in 1882 vast numbers of sheep perished in Buenos Ayres
from this cause. In the United Kingdom the annual loss was formerly
estimated at a million animals, but is now probably considerably less.
After infection during a wet autumn, it is usually in the succeeding
winter that the disease reaches its height.
The symptoms of "rot" appear about a month after infection, more acutely in
lambs than in sheep, and again, less in oxen than in sheep. At first, death may
result from cerebral apoplexy, but if the first few weeks are passed through, a
pernicious anaemia sets in, the sheep are less lively and fall at a slight touch,
the appetite diminishes, and rumination becomes irregular. The conjunctiva is of
a whitish-yellow colour, the dry, brittle wool falls off, and there is sometimes fever
and quickened respiration. In January, about three months after infection, the
wasting, or fatal, period sets in. Oedemas or swellings, usually visible before,
become larger at the dependent parts of the body, a large one in the
submaxillary region being especially well marked, and this is considered one of
the most characteristic symptoms ("watery poke"). Through this period few of the
infected sheep survive, but should they do so, the flukes begin to migrate,
though some remain much longer within the liver. Migration is effected through
the bile-duct into the duodenum and outwith the faeces, in which the altered
remains of the Distomum are sometimes scarcely recognisable. Under these
circumstances (or owing to death of the fluke in situ) the sheep recover more or
less fully.

The preventive measures seem to be: (1) Destruction of the eggs and of the
manure of rotten sheep; (2) slaughter of badly fluked sheep; (3) adequate
drainage of pastures; (4) an allowance of salt and a little dry food to the sheep;
and (5) dressings of lime or salt on the ground to destroy the embryos.[86]

Distomum hepaticum, contrary to most Trematodes, enjoys a wide range of


hosts. Man himself occasionally falls a victim; thus in Dalmatia, in the Narenta
Valley, the disease is endemic but slight in its effects. The horse, deer, camel,
antelopes, goat, pig, rabbit, kangaroo, beaver, and squirrel have all been known
to harbour this fluke occasionally. In the Italian deer-parks at Mandria a large
species, D. magnum, decimated the herds some years ago; and this species,
probably imported from Italy, is now almost as dangerous a parasite on the
western plains of the United States as D. hepaticum.

Bilharzia haematobia.[87]—This formidable parasite was discovered by Bilharz in


1853 in the veins of the bladder of patients at the Cairo Hospital, and is
remarkable from its abundance on the east coast and inland countries of Africa
from Egypt to the Cape, as well as in the districts bordering Lake Nyassa and
the Zambesi river, while westwards it occurs on the Gold Coast. Mecca is a
source of infection whence Mohammedans carry the disease to distant places.
In Egypt about 30 per cent of the native population is affected by the serious
disease known as Haematuria, resulting from the attacks of Bilharzia, so that, of
the many scourges from which in Africa man suffers, this one is perhaps the
most severe.
Fig. 34.—Bilharzia haematobia Cobb. × 10. The female ( ♀ ) lying in the
gynaecophoric canal of the male (♂). d, Alimentary canal; ms, oral sucker of
male; vs, ventral suckers. (After Leuckart.)

The worm is found usually in couples, which have been proved to be male and
female individuals (Fig. 34), often in considerable numbers in the veins of the
pelvic region, chiefly the veins of the bladder and of the large intestine, and it is
tolerably certain that Bilharzia enter these vessels from the portal vein. Their
long slender bodies enable them to penetrate into the finer vessels, which get
partially or entirely choked up, and the circulation accordingly impeded. But the
most serious consequences are observed in the urinary bladder. The mucous
membrane is swollen and inflamed here and there, chiefly on the dorsal surface,
the capillaries appear varicose and covered with mucus, mixed with blood-
extravasations in which Bilharzia-eggs are noticeable. The eggs also cause
numerous swollen knots in the submucous tissue. Should the disease not pass
beyond this stage (and such is usually the case, especially in South Africa), a
temporary haematuria ensues. The urine, which is only expelled with great effort,
accompanied by intense pain, is mixed with blood, mucous clots, and masses of
Bilharzia-eggs, from which some of the embryos have already hatched out. The
symptoms, however, may gradually pass away, and a more or less complete
recovery accomplished. The disease may indeed be of a far less severe
character, and may not interfere with the usual occupations of the patient; but,
on the other hand, a far more extensive thickening of the wall of the bladder
sometimes occurs; hard masses of eggs, uric acid crystals, and other deposits,
may lead to the formation of stones, degeneration of the substance of the ureter,
and eventually to that of the kidney itself. The stone, indeed, has long been
known to be a prevalent disease in Egypt, and it is now known to arise from
concretions formed round masses of Bilharzia eggs. From the portal vein, again,
other Bilharzia may gain access to the rectum, or the liver, and it has also been
found in the lungs, and may give rise to most serious complications, if indeed the
patient lives.

How infection occurs is a question to which at present no satisfactory answer


can be made. The attempt to introduce embryos of Bilharzia into the common
fresh-water animals of Alexandria has hitherto proved fruitless (Looss[88]),
although there seems little doubt that the comparative immunity of Europeans
from the disease is in some way owing to their drinking purer water than the
natives. Possibly, as Leuckart suggests, the embryo becomes a sporocyst in
man himself, somewhat as Taenia murina is known to develop in the rat without
an intermediate host.[89] The immense numbers of the parasite in one host
would then readily receive an explanation.

A Bilharzia, possibly B. haematobia, was found by Cobbold in the portal vein of


Cercopithecus fuliginosus; and B. crassa infests the cattle of Egypt, Sicily, and
certain parts of India, but does not produce haematuria.

Of the other Trematodes of man and domestic animals there is not room to
speak fully. Distomum pulmonale, which occurs in the lungs of the cat, tiger, and
dog, as well as in man, is especially common in Japan, China, Corea, and
Formosa. D. sinense and D. rathouisi have been also found in inhabitants of
these countries.

Bisexual Trematodes.—Zoologically, Bilharzia is interesting from its bisexual


condition. It is not, however, the only bisexual Trematode. In cysts in the
branchial chamber of Ray's bream, Brama raii, two worms are found, which are
probably the slender male and the swollen female of the same species
(Distomum okenii). The only doubt that can arise proceeds from the tendency in
all Trematodes for the male organs to ripen before the female organs. Until we
certainly know that the swollen egg-bearing form ( ♀ ) does not arise from a
previously male form ( ♂ ), the case is open to suspicion. Since, however,
Kölliker[90] never found intermediate hermaphrodite conditions, this Distomum
may be almost certainly regarded as of distinct sexes. Didymozoon thynni
(Monostomum bipartitum), from cysts on the gills of the Tunny (Thynnus), is
another case. Two slender worms flattened posteriorly, come together, and the
body of one becomes folded to receive that of the other. They fuse completely
except for a small lateral opening through which the anterior parts of both worms
may freely protrude. The enclosing individual contains a coiled uterus filled with
eggs, and is the female, whereas the smaller individual never possesses eggs,
and is probably the male.[91] Nematobothrium (Fig. 22, A), which occurs also in
the Tunny, in the form of two immensely long individuals intricately wound about
each other in a cyst, is, however, not bisexual.
Fig. 35.—Distomum okenii Köll. Showing male and female as they occur together
in the branchial cavity of Bramaraii (Ray's bream). (From Bronn, after
Kölliker.) Nat. size.

Table of Digenetic Trematodes and their Life-Histories.[92]

Host into which the


larva enters, and Host into which the
in which Cercariae migrate
Species. Final host.
Cercariae are and encyst; eaten by
eventually final host.
formed.
Diplodiscus Insect-larvae,
Smaller species
(Amphistomum) Rana, Bufo, Rana, Bufo, but
of Planorbis
subclavatus Triton frequently
and Cyclas
Göze omitted
Distomum advena
Duj. (D. migrans Sorex araneus Not known Limax
Duj.)
Lucullus acuspes,
D. appendiculatum Centropages
Clupea alosa Not known
Rud. hamatus
(Copepoda)
Limnaea
Ephemera, Perla,
stagnalis
D. ascidia v. Ben. Species of Bats Chironomus
Planorbis
plumosus
corneus
Frogs and
Physa
D. atriventre Weinl. Toads of Not known
heterostropha
N. America
D. brachysomum The Dunlin
Not known Anthura gracilis
Crepl. (Tringa alpina)
Hedgehog
D. caudatum
(Erinaceus Helix hortensis
v. Linst.
europaeus)
Limnaea ovata
D. clavigerum Rud. Rana Planorbis Not known
corneus
D. cygnoides Zed. Rana Pisidium, Limnaea sp.
Cyclas (Cercaria
macrocerca Fil.)
D. cylindraceum
Rana Limnaea ovata Ilybius fuliginosus
Zed.
D. dimorphum Ardea, Ciconia Different species of
Not known
Dies. (Brazil) Fishes
Species of
Cygnus, Anser, Species of
D. echinatum Zed. Limnaea,
Anas Limnaea
Paludina vivipara
L. stagnalis,
Gammarus
Limnaea
D. endolobum Duj. Rana pulex, larvae of
stagnalis
Limnophilus
rhombicus
Limnaea stagnalis,
L. ovata,
Succinea
pfeifferi,
D. globiporum Rud. Perca fluviatilis Not known
S. putris, Physa
fontinalis,
Planorbis
marginatus
Sheep, Oxen, Limnaea
D. hepaticum Abild. Omitted
Man, etc. truncatula
Lophius
D. hystrix Duj. Not known Marine Fishes
piscatorius
Warblers, Tits,
D. macrostomum
Woodpeckers, Succinea putris Omitted
Rud.
etc.
Paludina
D. militare v. Ben. Common Snipe P. vivipara
vivipara
Bithynia Cyprinus, Acerina
D. nodulosum Zed. Perca fluviatilis
tentaculata cernua
Probably omitted.
D. ovocaudatum Species of (Cercaria known
Rana esculenta
Vulp. Planorbis as C. cystophora
Wag.)
D. retusum Duj. Rana Limnaea L. stagnalis, larvae
stagnalis of Phryganeidae
D. squamula Dies. Polecat Unknown Rana temporaria
Tropidonotus
D. signatum Duj. Unknown Rana
natrix
D. trigonocephalum Paludina
Badger, Polecat Unknown
Rud. vivipara
Ostrea edulis,
Gasterostomum Cardium
Dogfish, Rays Belone vulgaris
sp. rusticum,
C. edule
Unio, Anodonta
(Cercaria
G. fimbriatum Leuciscus
Perca, Esox known as
v. Sieb. erythrophthalmus
Bucephalus
polymorphus)
Species of Gadus
G. gracilescens Lophius (e.g.
Unknown
Rud. piscatorius G. aeglefinus),
Molva, Lophius
Monostomum Planorbis
Anas Omitted
flavum Mehl. corneus

Classification of Trematodes.—We have seen (p. 63) that it is hardly possible


to carry out fully the division of Trematodes into Monogenea and Digenea.
Nevertheless, pending further investigation on the doubtful points, this
classification may still be used. Monticelli[93] has proposed the main divisions of
a new classification, which has been also adopted by Braun, and is based on the
nature of the suckers. These divisions are indicated below in brackets.

A. Monogenea v. Ben. (Heterocotylea Mont.).


1. Fam. Temnocephalidae Hasw.
Gen. Temnocephala Hasw.
2. Fam. Tristomatidae Tschbg.
Sub-Fam. 1. Tristomatinae Mont.
Gen. Tristomum, Nitzschia, Epibdella, Trochopus,
Acanthocotyle, Phyllonella, Placunella, Encotylabe.
Sub-Fam. 2. Monocotylinae Tschbg.
Gen. Pseudocotyle, Calicotyle, Monocotyle.
Sub-Fam. 3. Udonellinae v. Ben.-Hesse.
Gen. Udonella, Echinella, Pteronella.
3. Fam. Polystomatidae Tschbg.
Sub-Fam. 4. Octocotylinae v. Ben.-Hesse.
Gen. Octobothrium, Pleurocotyle, Diplozoon, Anthocotyle,
Vallisnia, Phyllocotyle, Hexacotyle, Platycotyle,
Plectanocotyle, Diclidophora.
Sub-Fam. 5. Polystomatinae v. Ben.
Gen. Polystomum, Onchocotyle, Erpocotyle, Diplobothrium,
Sphyranura.
Sub-Fam. 6. Microcotylinae Tschbg.
Gen. Microcotyle, Gastrocotyle, Axine, Pseudaxine.
4. Fam. Gyrodactylidae v. Ben.
Sub-Fam. 7. Gyrodactylinae Par. et Per.
Gen. Gyrodactylus, Dactylogyrus, Tetraonchus, Diplectanum.
Sub-Fam. 8. Calceostominae Par. et Per.
Gen. Calceostomum, Anoplodiscus.
5. Fam. Aspidobothridae Burm. (= Aspidocotylea Mont.).
Gen. Aspidogaster, Platyaspis, Cotylogaster, Macraspis.

B. Digenea v. Ben. (Malacocotylea Mont.).


6. Fam. Holostomatidae Brandes (= Metastatica Leuckart).
Gen. Diplostomum, Polycotyle, Hemistomum, Holostomum.
7. Fam. Amphistomatidae Mont.
Gen. Amphistomum, Diplodiscus, Gastrodiscus,
Homalogaster, Gastrothylax, Aspidocotyle.
8. Fam. Distomatidae Mont.
Gen. Distomum (and sub-genera), Rhopalophorus,
Koellikeria, Bilharzia.
9. Fam. Gasterostomatidae Braun.
Gen. Gasterostomum.
10. Fam. Didymozoontidae Mont.
Gen. Didymozoon, Nematobothrium.
11. Fam. Monostomatidae Mont.
Gen. Monostomum, Notocotyle, Ogmogaster, Opisthotrema.

CHAPTER III

CESTODA
INTRODUCTION—NATURE OF CESTODES—OCCURRENCE OF CESTODES—THE TAPE-
WORMS OF MAN AND DOMESTIC ANIMALS—TABLE OF THE LIFE-HISTORIES OF THE
PRINCIPAL CESTODES OF MAN AND DOMESTIC ANIMALS—STRUCTURE AND
DEVELOPMENT OF CESTODES—TABLE FOR THE DISCRIMINATION OF THE MORE
USUAL CESTODES OF MAN AND DOMESTIC ANIMALS—CLASSIFICATION.

The Cestodes or Tape-worms are exclusively endoparasitic Platyhelminthes


living, in the adult condition, in the alimentary canal of Vertebrates, with the
exception of Archigetes (Fig. 37), which may become mature in the body-cavity
of Tubifex. In relation with this wholly parasitic existence, the Cestodes exhibit
certain characteristic modifications in structure and mode of development, such
as the formation, by the segmentation of the "neck," of a (usually) long chain of
"proglottides" or joints, which form the "body" of the Cestode; and the entire
absence of an alimentary tract, both in the larva and adult. As an adaptation to
the fixed mode of life, the anterior end (head, scolex) is modified to form an
adhering organ. Various adaptive forms of larvae are known. These live in the
internal organs of one or more intermediate hosts, and are transferred to the
final host passively during a meal. Lastly, there is the curious metamorphosis by
which the adult is formed from a portion (scolex) of the larva.[94]

Fig. 36.—Echinobothrium affine Dies., from the intestine of Torpedo, × 43. hd,
Head; hk, hooks; hl, lobes of the head; ov, ovary; pe, penis; ps, penis-sheath;
te, testes; ut, uterus; vag, vagina; yg, yolk-glands. (After Pintner.[95])

Taenia solium, from man (Fig. 39, B), or Echinobothrium (Fig. 36), from an
Elasmobranch fish, is fixed to the mucous lining of the intestine of its host by
means of a radially-constructed apparatus of four suckers and a circlet of hooks
(Fig. 39), which are borne by the "head" or "scolex," being that part of the worm
which is directly derived from part of the larva, and which contains the central,
commissural portion of the nervous system. Firm adhesion to the host's intestine
is necessary, in order to avoid the loosening action of the peristaltic movements
of the intestine as the food passes along. The heads of different Cestodes
exhibit a marvellous variety of suckers and hooks, from a mere muscular
depression in Schistocephalus, to the compound proboscides of
Tetrarhynchus[96] which is found in Elasmobranchs. The jointed body, often of
enormous length (up to 20 yards in Bothriocephalus latus), is usually separated
from the head by a slender neck, from which the proglottides are segmented off
from behind forwards, and become more and more individualised as they recede
farther away from the neck by the intercalation of younger joints. Thus in Fig. 36
the mature, distal proglottis has passed through all the stages represented by
the other segments.

Fig. 37.—Archigetes sieboldii (appendiculatus), from the coelom of Tubifex


rivulorum. × 40. app, Persistent larval appendage; go, genital pore; hk,
persistent larval hooks; ov, ovary; sc, sucker; te, testes; yg, yolk-glands.
(After Leuckart.)

The longitudinal muscles, the nerves, and excretory vessels which supply the
proglottides are continuous throughout and with those of the head. Each joint
contains at first male genitalia comparable with those of a Trematode; then the
female organs develop, and finally self-fertilisation follows. The Cestodes feed
through their skin, probably by the aid of fine protoplasmic processes, which
penetrate the tough investing membrane and absorb the already digested food
which bathes them. When a proglottis of Calliobothrium is approaching maturity
it separates from the parent, the broken ends of muscles, nerves, and excretory
vessels speedily heal, and it is now capable of continued growth and of fairly
active movement if it remains in the intestine of the host. According to van
Beneden, it may even attain a size equal to, or exceeding, that of the whole
parent or "strobila."[97] These considerations led Leuckart, von Siebold, P. J. van
Beneden, and others, to Steenstrup's conclusion that a jointed tape-worm is
really a colony composed of two generations—the head and neck derived from
the larva, and the proglottides produced by the segmentation of the neck.[98]
This view of the colonial nature of jointed Cestodes was generally adopted from
1851 to 1880. During the last fifteen years, however, the varied interpretations of
the facts of the ontogeny of this group have led some authors to adopt the
monozootic view (that a Cestode is one individual), others are still of the older
opinion, and Hatschek (Lehrbuch, p. 349) and Lang take up intermediate
positions. Lang considers that the formation of the joints of a tape-worm from a
small fixed "scolex," is not only largely comparable with the strobilation of a
scyphistoma and the consequent formation of a pile of medusae, as in the life-
history of Aurelia, but that both processes have arisen from the power of
regenerating the necessary organs in each of the new segments. The result in
both cases is the rapid formation of a number of joints, which gradually separate
from the parent, to carry the eggs and young to new stations. Just as some
Coelenterata (Lucernaria) may be regarded as not having advanced much
beyond a scyphistoma stage, so there are unisegmental Cestodes (e.g.
Archigetes, Fig. 37) which have remained as a slightly altered but sexual scolex,
directly comparable with a Trematode, and, as all authors are agreed,
representing one generation only. Such monozootic forms are now classed as a
special family, the Cestodaria or Monozoa, of which Caryophylleus mutabilis,
from the intestine of various Cyprinoid fish, is the most abundant representative,
while Amphiptyches (Gyrocotyle) urna, from Chimaera monstrosa of the
northern hemisphere, is paralleled by A. rugosa, found in Callorhynchus
antarcticus of the southern seas.

Fig. 38.—Scolex polymorphus Rud. (larva of Calliobothrium filicolle Zschokke),


from the muscles of Apogon, a Mediterranean fish; also found in many
Invertebrates (e.g. Sepia). A, Inverted scolex, with calcareous bodies; B,
everted older larva. br, Brain; exo, terminal excretory aperture; fc, flame-cells;
for.sec; secondary excretory pores; hk, hooks of the adult Cestode; inrag, pit
at the bottom of which the head is developed; msc, anterior sucker; nl, lateral
nerve; sc, suckers; tl, tp, lateral and main excretory vessels. (After Monticelli.)
Occurrence of Cestodes.—The distribution of Cestodes and their larvae is
analogous to that of the digenetic Trematodes, although the absence of an
alimentary canal limits the habitat of the mature worms to certain sites, such as
the blood-vessels, the lymphatic and coelomic spaces, and the digestive system,
where their body may be bathed by a nutritive fluid. Almost all groups of
Vertebrates are attacked by Cestodes. Those of fishes, and particularly of
Elasmobranchs, are distinguished by certain structural and developmental
features; those of birds by others; those of mammals, by a third set of
characters. The young stages of the Cestodes of Sharks and Rays occur
encysted in the body-cavity, or in the pyloric appendages, of Teleosteans, which
probably swallow them along with those invertebrate animals upon which they
prey. The larvae of the Cestodes of carnivorous mammals or piscivorous birds,
live respectively in herbivores and fishes, but how the latter are infected we
know in very few instances. Cestode larvae are known to occur in many
Invertebrates, and occasionally are taken free swimming in the sea, presumably
crossing from one host to the next. Ctenophores, Siphonophores, Copepods,
Ostracods, Decapods, various Molluscs especially Cephalopods, Earthworms,
and other Annelids, are the intermediate hosts of these larvae (see Fig. 38), the
fate of which, however, has been determined in but few cases.

Occurrence of Cestodes in Man.[99]—Tape-worms, either in the adult or larval


stages (bladder-worms), have, from ancient times, been known to occur in man,
and in the animals that serve him as food. Until comparatively recent times,
however, the true nature of these parasites, and particularly of "hydatids" (cystic
larvae), was unrecognised. Up to the seventeenth century the larvae were
regarded as abscesses or diseased growths of the affected organs, and it was
only at the close of that century that their animal nature was even suggested.
Even at the beginning of the nineteenth century, three modes of origin of
Cestodes—by "generatio aequivoca" from the tissues of the body, or by the
union of previously distinct proglottides, or again by metamorphosis of free-living
worms drunk with water by cattle or birds (as Linnaeus suggested)—were still
variously held, at a time when Malpighi, Pallas, and Goeze had recognised the
true connexion between the cystic and segmented states of Taenia crassicollis
(the cat tape-worm), and when Goeze had seen the eggs of Taeniae, and
Abildgaard[100] had even conducted the first helminthological experiments
(conversion of the larval Schistocephalus, Fig. 40, into the adult form).
Fig. 39.—A, Taenia saginata Goeze. Nat. size. (From a specimen in the
Cambridge Museum.) The approximate lengths of the portions omitted in the
drawing are given. At * (after Leuckart) the branched uterus and the
longitudinal and transverse excretory vessels are shown. The genital
apertures are seen as a lateral opening on each of the larger proglottides. B,
Head (scolex) of T. solium Rud. × 12. (After Leuckart.)

Generally speaking, "a tape-worm" in Western Europe will prove to be Taenia


saginata Goeze (the beef tape-worm, Fig. 39, A), exceedingly prevalent also in
the East, and indeed cosmopolitan, occurring wherever the infected flesh of the
ox is eaten in a raw or half-cooked state. Its attacks are fortunately not usually
severe. Taenia solium Rud. (the pork tape-worm) is found wherever the pig is
kept as a domestic animal, and has consequently a world-wide distribution. Its
size (6-9 feet long) and powers of adhesion would alone render T. solium a
formidable parasite. But the danger of its presence in the body of man, or in the
flesh of pigs, lies in the fact that the larva or bladder-worm (known as
Cysticercus cellulosae) can live in the most varied organs. Thus if by accident a
mature proglottis be eaten, the embryos escape, bore their way into the wall of
the stomach, and entering the portal vein, may reach in time the muscles, the
brain, the eye, or even the heart itself, and attain the cystic condition. Even more
disastrous may be the result, should some ripe joints of a mature worm work
their way from the intestine back towards the stomach. Should this happen (and
though it has not been directly proved, the possibility is to be reckoned with), the
result would be the release of vast numbers of embryos capable of inflicting fatal
injury on the host. An abnormal Cysticercus of this species is probably the
Taenia (Cysticercus) acanthotrias Weinl. (see, however, Leuckart, loc. cit. p.
711).
Taenia (Hymenolepis) nana v. Sieb.[101] is found in man in Egypt, Italy, England,
Servia, Argentine Republic, and the United States. Though small (¾-1 inch
long), its numbers usually excite digestive and nervous disorders of considerable
severity, more serious, indeed, than those caused by the commoner tape-
worms. H. diminuta Rud. (flavopunctata Weinl.), normally found in Rodents, has
been rarely recorded in man. Taenia (Dipylidium) caninum L. (= T. cucumerina
Bloch = T. elliptica Batsch), the commonest parasite of pet cats and dogs, and T.
(Davainea) madagascariensis Davaine, have occasionally been recorded from
infants and young children. But the attacks of these species are insignificant in
comparison with those of the cystic stage (Echinococcus polymorphus) of a
tape-worm (T. echinococcus v. Sieb.) which lives when mature in the dog.

Echinococcus is most frequent in Iceland, where it affects 2 to 3 per cent of the


population, and a still larger proportion of sheep; while in Copenhagen, Northern
Germany, some districts of Switzerland, and Victoria it is not uncommon, but is
frequently found during post-mortem examinations when no definite symptoms
of its presence had been previously noticed. Echinococcus[102] varies greatly in
size, form, and mode of growth, but is distinguished in the formation not of one
scolex only, as in the Cysticercus, but in the production of a number of vesicles,
usually from the inner wall. Within these, large numbers of scolices may be
developed. The whole organism continues to swell by the formation of a watery
liquid within it, and if its growth be rapid the fluid tension may cause the rupture
of the enclosing connective-tissue capsule formed around the parasite, at the
expense of the host, and the protrusion of the daughter vesicles. It is the
consequent injury to the surrounding organs of the host, at this critical stage,
often only reached after the lapse of several years, that occasions serious or
even fatal results. Zoologically, Taenia echinococcus and T. coenurus are
interesting, since they exhibit an indubitable alternation of asexual generations in
the larval state, with a sexual adult stage.

Bothriocephalus latus Brems., the broad tape-worm, which attains a length of


20-30 feet, or even more, occurs in man endemically in the eastern Baltic
provinces, certain parts of Switzerland, generally throughout Russia (especially
near Kasan), in North America, and commonly in Japan,—that is, in districts
where the population partake largely of pike or other fish in a raw or partially-
cooked state. Elsewhere it occurs sporadically, and in Munich, where it was
unknown before 1880, its presence has been traced to emigrants from infected
districts, who settled on the shores of the Starenberger Lake, from which Munich
was supplied with fish. How the pike, the usual but not invariable intermediate
host, becomes infested (and its musculature is frequently riddled with the larvae)
we do not accurately know, but some Invertebrate, the prey of the pike, is
probably the first host into which the free-swimming ciliated larva (Fig. 42) finds

You might also like