• Non ci sono risultati.

Environmental Systems Analysis with MATLAB

N/A
N/A
Protected

Academic year: 2021

Condividi "Environmental Systems Analysis with MATLAB"

Copied!
20
0
0

Testo completo

(1)
(2)
(3)
(4)
(5)

Contents

Preface... xiii

Acknowledgements ...xvii

Author ...xix

Chapter 1 Introduction ...1

1.1 Environmental Systems Modelling, the Basic Concepts ...1

1.2 Attributes and Dichotomies of Environmental Models...3

1.2.1 Environmental Models as Balances ...3

1.2.2 First-Principle versus Data-Driven Modelling ...6

1.2.3 Environmental Modelling Approach versus Data Availability ...7

1.3 Practical Mechanistic Modelling... 12

1.3.1 An Example of a Simple Mechanistic Model ... 13

1.3.2 Mass Balances ... 14

1.3.3 Energy Balances ... 16

1.4 Environmental Models as Dynamical Systems ... 18

1.5 Linear Time-Invariant Dynamical Systems ...20

1.6 Discrete-Time LTI Dynamical System ...22

1.7 Stability of Discrete-Time Dynamical LTI Systems ...23

1.7.1 Who’s Who in the System ...24

1.7.2 Phase-Plane Portrait of Two-Dimensional Discrete-Time LTI Systems ...28

1.7.3 Forced LTI Discrete-Time System ... 29

1.7.4 Steady State of LTI Discrete-Time Systems with Constant Input ... 29

1.8 Continuous-Time Linear Dynamical System ...30

1.8.1 Stability of Continuous-Time LTI Systems ... 31

1.8.2 Forced LTI Continuous-Time System ...34

1.8.3 Some Simple Response Calculations: Step Response and Impulse Response ...34

1.8.3.1 An Application of an Impulse-Drived Linear Model: The Nash Reservoir ...36

1.8.4 Steady State of LTI Continuous-Time Systems with Constant Input ...38

1.8.5 Phase-Plane Portrait Behaviour of Two-Dimensional Continuous-Time LTI Systems ...38

1.9 Nonlinear Systems ...40

1.9.1 Linearization of a Nonlinear System ... 41

1.9.2 Stability of Nonlinear Systems ...42

1.9.3 Local Stability Analysis of Autonomous Nonlinear Systems ...43

1.9.4 Limit Cycles ...43

1.9.5 Isoclines ...44

1.9.6 Graphical Stability Analysis of One-Dimensional Autonomous Systems ...44

1.9.6.1 Graphical Stability of One-Dimensional Discrete- Time Systems ...44

1.9.6.2 Graphical Stability of One-Dimensional Continuous- Time Systems ...48

(6)

vi Contents

1.10 Numerical Aspects and the Role of MATLAB ...51

1.10.1 MATLAB Handling of Discrete-Time Models ...52

1.10.2 MATLAB Handling of Continuous-Time Models ...54

1.10.3 Introducing the Simulink Toolbox ...57

1.10.4 Two Simple Benchmark Models ...60

1.10.4.1 The Monod Kinetics ...60

1.10.4.2 The Streeter & Phelps Water Quality Model ... 61

1.11 Worked Examples ... 63

1.11.1 Simulating the Time-Varying Flow in a Cylindrical Tank ...64

1.11.2 Simulating the Flow Dynamics in a Reservoir ...66

1.11.3 Analysis of a Discrete-Time System ... 67

1.11.4 MATLAB Simulation of a Discrete-Time System ...68

1.11.5 A Two-Reach S&P River Quality Model with Point Discharges ...69

1.11.6 A S&P River Quality Model with Non-Point Pollution ... 72

Chapter 2 Identification of Environmental Models ...77

2.1 Introduction ... 77

2.1.1 Formal Statement of the Identification Problem ... 77

2.1.2 The Quality of the Data ... 78

2.1.3 Input Information Content ...80

2.1.4 The Error Functional ... 81

2.2 Sensitivity Analysis as an Identifiability Test ... 82

2.2.1 Static Sensitivity ... 83

2.2.1.1 Static Sensitivity by Error Increment ...84

2.2.1.2 Static Sensitivity by Curvature ...86

2.2.1.3 Monte Carlo Sensitivity ...86

2.2.1.4 Joint Sensitivity of Parameter Couples ...86

2.2.2 Dynamic (Trajectory) Sensitivity ... 89

2.2.2.1 Approximate Trajectory Sensitivity ... 91

2.2.2.2 Sensitivity Ranking ...92

2.3 Gradient-Free Optimization Methods (Direct Search) ...93

2.3.1 Optimized Flexible Polyhedron ...95

2.3.1.1 Polyhedron Reshaping ...96

2.3.2 Termination Criterion ...98

2.3.2.1 Optimized Simplex Search ...99

2.3.3 Genetic Algorithm ... 100

2.3.3.1 Parameter Coding ... 101

2.3.3.2 Basic Evolutionary Mechanisms... 102

2.3.3.3 Similarity Templates ... 103

2.3.3.4 GA in MATLAB ... 104

2.3.4 Performance Assessment of the Combined Estimation Methods Applied to the Monod Kinetics ... 105

2.3.5 MATLAB Software Organization ... 107

2.3.5.1 Organization of the Error Function ... 108

2.4 Validation of the Estimates ... 110

2.4.1 Non-Parametric Tests: Testing the Credibility of the Model Response ... 111

2.4.1.1 Variance Accounted For ... 112

(7)

vii

Contents

2.4.1.3 Further Regression Line Statistics ... 114

2.4.2 Analysis of the Residuals ... 114

2.4.2.1 Autocorrelation Test ... 116

2.4.2.2 Normality Test ... 116

2.4.3 Parametric Tests: Assessing the Credibility of the Parameter Values ... 118

2.4.3.1 Exact and Approximate Confidence Regions ... 119

2.4.3.2 The FIM ... 120

2.4.3.3 Approximations of the Covariance Matrix ... 122

2.4.3.4 A Parameter Estimation Reliability Test ... 123

2.4.3.5 Parameter Validation for the Monod Kinetics ...124

2.4.4 A MATLAB Exercise: Parameter Estimation of the S&P Model ... 125

2.4.4.1 A Quick Guide to the Related Companion Software .... 129

2.4.5 Another MATLAB Exercise: Parameter Estimation of the Monod Model ... 131

2.5 PEAS: A Computer Package for Parameter Estimation of Ecological Models ...134

Chapter 3 Analysis of Environmental Time Series ... 139

3.1 Introduction ... 139

3.2 Time Domain versus Frequency Domain of Environmental Time Series .... 140

3.2.1 Frequency Analysis of Sampled Time Series ... 140

3.2.1.1 Aliasing ... 141

3.2.1.2 Feasible Frequency Range and Sampling Frequency ... 143

3.2.1.3 Signal Components: Information, Artefacts, and Noise .... 144

3.2.1.4 MATLAB Implementation of Frequency Analysis ... 144

3.3 Signal Regularization ... 146

3.3.1 Detrending ... 146

3.3.2 Outliers Detection and Removal ... 147

3.3.3 Denoising through Approximating Splines Smoothing ... 150

3.3.3.1 Replacement of Missing Data and Data Enhancement .... 153

3.3.3.2 Outliers Revisited ... 155

3.3.4 Time-Series Synthesis ... 155

3.3.4.1 Wind Time-Series Synthesis for Lagoon Simulation ... 158

3.4 Wavelet Signal Processing: Adaptive Combination of Time and Frequency Analysis ... 162

3.4.1 The Continuous Wavelet Transform ... 164

3.4.2 The Discrete Wavelet Transform ... 166

3.4.3 The MATLAB Wavelet Toolbox ... 167

3.4.4 Signal Denoising ... 169

3.4.5 Numerical Differentiation of Noisy Signals ... 173

3.5 Principal Components Analysis ... 174

3.5.1 Feature Selection ... 175

3.5.1.1 The PCA Transform ... 176

3.5.1.2 The Biplot ... 179

3.5.1.3 The Scree Plot ... 179

3.5.1.4 PCA on Correlation or Covariance? ... 180

(8)

viii Contents

3.5.3 Consistency Statistics ... 183

3.5.3.1 Hotelling’s T2 and Q Statistics ... 184

3.5.3.2 Contribution Variables ... 185

3.5.4 PCA and MATLAB ... 185

3.5.5 PCA Case Studies ... 188

3.5.5.1 Turbidity Analysis in a Potabilization Process ... 188

3.5.5.2 Fault Detection and Isolation in a Wastewater Treatment Process ... 190

Chapter 4 Fuzzy Modelling of Environmental Systems ... 193

4.1 Introduction to the Fuzzy Logic ... 193

4.1.1 Fuzzification ... 196

4.1.1.1 Possible Analytical Forms of mfs ... 196

4.1.2 Basic Properties of Fuzzy Sets ... 196

4.1.3 Logic Connectives: T-Norms and S-Norms ... 196

4.2 Building a Fuzzy Inference System ... 197

4.2.1 Fuzzy Inference ... 199

4.2.2 Fuzzy Reasoning à la Mamdani ... 201

4.2.2.1 Fuzzy Inference à la Sugeno ...202

4.2.3 Defuzzification ...203

4.2.3.1 Fuzzification/Defuzzification Errors ...204

4.3 The MATLAB Fuzzy Toolbox ...205

4.3.1 The FIS Editor ...206

4.3.2 Structure of the FIS File ...208

4.3.3 An Example of Sugeno FIS: Function Approximation ... 210

4.4 Fuzzy Modelling... 213

4.4.1 Mamdani versus Sugeno Models ... 214

4.4.2 An Example of a Heuristic Mamdani Fuzzy Model ... 215

4.4.3 ANFIS: A Systematic Modelling Approach ...220

4.4.3.1 Introduction to the ANFIS Editor ... 221

4.4.3.2 Function Approximation with ANFIS ...225

4.4.3.3 An ANFIS Tank Dynamical Model ...225

4.5 Fuzzy Clustering: Aggregating Data By Similarity ...230

4.5.1 Deterministic K-Means ... 233

4.5.1.1 The Limits of Hard Clustering: The Butterfly Data ...234

4.5.2 Fuzzy C-Means Clustering ...234

4.5.2.1 The Butterfly Data Revisited ... 236

4.5.2.2 Limits of the FCM Clustering ... 238

4.5.3 Assessment of the Partition Efficiency ... 238

4.5.3.1 Partition Entropy... 238

4.5.3.2 Separation Coefficient ... 239

4.5.4 Fuzzy Clusters as Antecedents ...240

4.5.5 Fuzzy Clustering as a Diagnostic Tool ...242

4.5.5.1 Fuzzy Cluster Diagnosis of an Anaerobic Digester ... 243

4.5.6 Adaptive FCM Clustering ... 243

4.5.7 Automatic Generation of mfs ...245

4.5.8 Gustafson–Kessel Fuzzy Clustering ... 247

4.5.8.1 Adaptive Volume GK Algorithm ... 251

4.5.9 Fuzzy Maximum Likelihood Estimates ... 252

(9)

ix

Contents

Chapter 5 Population Dynamics Modelling... 257

5.1 Single-Species Continuous-Time Population Models ... 257

5.1.1 Stability of the Equilibrium of a Single-Species Growth Model ... 258

5.1.2 The Logistic Growth Function ... 259

5.1.2.1 Delayed Recruitment Logistic Growth ... 262

5.1.2.2 Analytical Solution of the Logistic Equation ...264

5.1.3 The Gompertez Growth Equation ...265

5.1.4 The Richards Growth Equation ...266

5.1.5 The Bertlanffy Growth Equation ... 267

5.1.6 A Final Appraisal of the Logistic Equation ...268

5.2 Single-Species Discrete-Time Population Models ... 270

5.2.1 The Discrete-Time Logistic Equation ... 271

5.2.2 Other Discrete-Time Population Growth Equations ... 274

5.2.3 Introducing Uncertainty as Demographic Variability ... 276

5.2.4 Age-Structured Populations ... 279

5.2.4.1 Stable Age Distributions ...280

5.2.4.2 A Simple Example of Leslie Model: The Great Tit (Parus major) ... 283

5.2.4.3 A More Structured Leslie Model: The Poa annua Weed ....284

5.3 Harvested Populations ...287

5.3.1 Constant Harvesting ...287

5.3.2 Proportional Harvesting ...290

5.3.2.1 Harvesting Depensated Populations ...292

5.4 Competition ... 293

5.4.1 MATLAB Analysis of Competition ... 298

5.4.2 An Example of Competition: Gause’s Protozoa ...300

5.4.3 Competition for a Limited Resource ...302

5.4.4 Extension to Multispecies Competition ...304

5.4.4.1 Vulnerability ...304

5.5 Prey–Predator Models ...306

5.5.1 Lotka–Volterra Prey–Predator Model ...307

5.5.1.1 A Helping Hand ... 310

5.5.2 Predator Functional Response ... 312

5.5.3 Generalizing the Prey–Predator Model ... 313

5.5.3.1 A Pasture–Herbivore Model ... 317

5.5.3.2 The Strange Case of the Spruce Budworm ... 319

5.6 Food Chains ... 323

Chapter 6 Flow Reactor Modelling ... 329

6.1 Continuous-Flow Reactor Modelling ... 329

6.1.1 Single CSTR ... 330

6.1.1.1 Hydraulic Retention Time ... 330

6.1.1.2 Which Input for the CSTR? ... 331

6.1.1.3 Linearization of the CSTR Dynamics ... 332

6.1.2 Chain of Cascaded CSTR ... 334

6.1.2.1 MATLAB Modelling of the Cascaded CSTRs ... 336

6.1.3 Steady-State Analysis of the Cascaded CSTRs ... 338

6.1.4 Feedback CSTR ... 341

(10)

x Contents

6.2 Plug-Flow Reactor ... 345

6.3 Diffusive Reactor ...348

6.3.1 An Example of Feedback CSTRs with Diffusion: The Lake Huron–Saginaw Bay System ... 349

6.3.2 Diffusion and Dispersion ... 351

6.3.3 Diffusive Reactor Modelling ... 353

6.3.3.1 Impulse Response of the Diffusive Reactor ... 354

6.3.3.2 Transport Delay Modelling... 356

6.3.3.3 Lumped-Parameter Approximation of the Diffusive Reactor ...357

6.3.3.4 Diffusion Estimation from the Pulse Response... 358

6.3.4 The ‘Follow-the-Plug’ Model, a Lagrangian Approach ...360

6.3.5 Numerical Treatment of the Mono-Dimensional Diffusive Equation ... 361

6.3.5.1 Selecting the Proper Boundary Conditions ... 363

6.3.5.2 A Boundary Value Initialization Problem ... 365

6.3.5.3 A Least-Squares Initialization Problem ...366

6.3.6 Spatial Discretization of the Diffusive Reach Model ... 367

6.3.6.1 Numerical Simulation of the Diffusive Reach Model in Time and Space ... 371

6.3.6.2 Comparison with the CSTR Chain ... 373

Chapter 7 Microbial Kinetics Modelling ... 377

7.1 Enzymatic Reaction Kinetics ... 377

7.1.1 A Summary of Elementary Chemical Kinetics ... 377

7.1.2 Enzyme-Mediated Reaction Kinetics ... 378

7.1.3 Self-Inhibiting Kinetics ... 382

7.1.4 Other Kinetics of Interest ... 383

7.2 Microbial Metabolism of Carbonaceous Substrates...384

7.2.1 Basic Molecule/Microorganism Interactions of Environmental Interest ...384

7.2.2 The Energy of Microbial Growth ... 387

7.2.3 Modelling the Microorganism/Substrate Interactions: The Monod Model ... 389

7.2.3.1 Which Units for the Carbon-Based Quantities? ... 391

7.2.4 The Catabolic Pathway in the Heterotrophic Aerobic Metabolism ... 392

7.2.5 Endogenous Metabolism ... 394

7.2.6 Other Kinetics of Carbonaceous Substances ... 395

7.2.6.1 Unbalanced Growth ... 396

7.2.7 The Matrix Format of Microbial Models ... 397

7.2.8 MATLAB Implementation of the Aerobic Heterotrophic Model .... 399

7.2.9 The Oxygen Transfer Rate ... 399

7.2.9.1 Oxygen Transfer in Natural Waters ...402

7.2.9.2 Oxygen Transfer in Wastewater Treatment ...402

7.2.9.3 Complete DO Dynamics in Microbial Systems ...403

7.2.10 A Naïve Wastewater Treatment Plant Model ...404

7.2.11 Anaerobic Heterotrophic Metabolism ...407

7.3 Microbial Metabolism of Nitrogenous Substrates ... 411

7.3.1 Nitrification Modelling ... 416

(11)

xi

Contents

7.3.1.2 Detailed Two-Step Nitrification Modelling ... 418

7.3.1.3 More Advanced Nitrification Models ... 419

7.3.2 Denitrification Modelling ... 421

7.3.3 MATLAB/Simulink Implementation of ASM3_2N ... 422

7.3.3.1 Creating and Using MEX Files ... 422

7.4 Microbial Metabolism of Phosphorus ... 424

7.4.1 Droop Cell-Quota Model ... 428

7.4.2 PIM Model ... 430

7.4.3 Phosphorus Removal in Wastewater Treatment Processes ... 434

7.4.4 The Sequencing Batch Reactor Process for Nutrient Removal ... 437

7.4.4.1 MATLAB Implementation of the SBR Model ... 437

7.4.5 Controlling the SBR Switching with Fuzzy Logic ... 439

7.4.6 Indirect Detection of Process Transitions ... 439

7.4.6.1 Anaerobic/Anoxic Patterns ... 439

7.4.6.2 Aerobic Patterns...440

7.4.7 Design of the Fuzzy Switching Logic ...440

7.4.8 Design of the Fuzzy Inference System for the Phase Switching ... 441

7.4.8.1 Anoxic/Anaerobic Phase ...444

7.4.8.2 Aerobic Phase ...444

Chapter 8 Analysis of Aquatic Ecosystems ...447

8.1 The Oxygen Cycle in the Aquatic Environment ... 447

8.1.1 DO Distribution along the Water Column ... 447

8.1.2 The Role of the Aquatic Vegetation ...449

8.1.3 Solar Radiation Modelling ... 450

8.1.4 Photosynthesis Modelling ... 453

8.1.4.1 Temperature Limitation ... 454

8.1.4.2 Nutrients Limitation ... 455

8.2 A Short-Term Oxygen Dynamical Balance ... 456

8.3 Analysis of the Circadian DO Cycles by Wavelet Filtering and Fuzzy Clustering ...459

8.3.1 Dyadic Decomposition Denoising ... 462

8.3.2 Diurnal DO Cycle Characterization ...463

8.3.2.1 Fuzzy Clustering ...464

8.4 Extending the Spatial–Temporal Validity of DO Models ...465

8.5 Beyond S&P: A Water Quality Model Case Study ...468

8.5.1 A Tale of Two Rivers ... 473

8.5.1.1 Sieve Basin ... 474

8.5.1.2 Ombrone Basin ... 474

8.5.2 Model Structure ... 475

8.5.2.1 Analysis of the Reactive Terms ... 477

8.5.2.2 Introduction of the Nonpoint Pollution Sources ... 478

8.5.3 Parameter Estimation ... 478

8.5.3.1 Sensitivity Analysis and Parameter Identifiability ... 478

8.5.3.2 Calibration Results ...480

8.5.3.3 Lessons to Be Drawn from the Exercise ...485

8.6 Estimation of Nutrient Bioavailability in Rivers ...485

8.6.1 A Steady-State Model Relating S. capricornutum Growth to Nutrients ...486

(12)

xii Contents

8.6.2 Estimation of the Bioavailable Nutrient Concentrations ...488

8.6.3 Field Application of the Method ... 491

8.7 Modelling an Horizontal Subsurface Constructed Wetland ... 492

8.7.1 Hydraulic Model Identification ... 493

8.7.2 Pollution Abatement Model ... 495

8.7.3 Model Identification ... 496

8.8 Environmental Assessment of a Coastal Lake and Surrounding Wetlands ... 497

8.8.1 Modelling the Massaciuccoli Lake Water Balance ... 499

8.8.2 Using the Calibrated Model to Assess the Efficiency of the Diversion ... 501

8.9 A Fish Habitat Suitability Assessment Based on Fuzzy Logic ... 502

8.9.1 Development of the FISH Algorithm ... 504

8.9.2 The FISH Algorithm ... 506

8.9.3 Instream Flow Analysis with FISH ... 508

References ... 513

(13)

Preface

God always forgives, man sometimes, nature never

Pope Francis This book brings together systems theory and environmental science, by recasting environmental problems into a common system-theoretic methodology. In this way, simple models can be devel-oped and new insights can be gained, which could not have been achieved otherwise. System theory is inherently a ‘reductionist’ discipline and its integration with the naturally ‘holistic’ environmen-tal science at first was not easy. The first pioneering attempts at translating ecological principles into mathematical laws (Maynard Smith, 1974; Rinaldi et al., 1979) were met with a somewhat super-cilious reaction by ecologists, who resented the intrusion of mathematicians (let alone engineers!) into their turf, and looked down on the attempt at translating ecological concepts into mathematical relations. Over the years, ego clashes have gradually receded and now mathematical modelling has become a well-established branch of ecology, in which this book is naturally set.

This book is about developing dynamical models of environmental processes, using a wide vari-ety of mathematical methods. The first four chapters introduce the analytical tools for investigating environmental models and data. The emphasis is evenly balanced between the mechanistic and the data-driven approaches, assessing the merits and liabilities of both. Theory is introduced in its most accessible form and is applied to test cases based on first-hand data and experiences. While Chapters 1 and 2 deal with the basic concepts of modelling and identification, Chapter 3 deals with data processing, rarely considered in the environmental analysis, by introducing numerical tech-niques to improve the quality of the data and to extract the information they carry, in the context of model building and verification. Chapter 4 introduces the basic concepts of fuzzy logic and applies them to the modelling of environmental systems. Chapters 5 through 7 apply these methodologies to specific aspects of environmental modelling: population dynamics, flow systems, and environmen-tal microbiology. The last chapter (Chapter 8) combines the notions of the previous chapters into the analysis of several aquatic ecosystems’ case studies.

I am quite aware of the limitations of this book, because it reflects my own research experience, and therefore it is strongly oriented towards the aquatic environment, while it completely disregards other equally important subjects such as air pollution, groundwater, or solid waste, simply because I never worked in those areas.

Far from being a ‘theory’ book, its approach is eminently practical, in that every methodological aspect gives rise to a MATLAB® code. Nevertheless, this is not a recipe cookbook, but it takes the

reader through a logical sequence from the basic steps of model building and data analysis to imple-menting these concepts into working computer codes, and then into assessing their results. Who should read this book? Certainly anyone who is looking for an introduction of the mathematical approach to ecology, or anyone who wants to take a fresh look at known problems from a differing viewpoint. This book may represent a first encounter with mathematical modelling before going on to more advanced books in the specific field of interest.

I have set up a quiver full of arrows. Then it is up to the archer to call the shots. As Figure 1 shows, this book spins a web of relations among system theory and environmental issues, moving from the predominantly methodological first four chapters to the more applicative subsequent part, where specific environmental problems are addressed. Clockwise from the top of Figure 1, Chapter 1 sum-marizes the basic concepts of system theory for both linear and nonlinear models, while Chapter 2 is devoted to model identification. Chapter 3 considers the data acquired from the field, how their quality can be improved and the embedded information extracted. Chapter 4 describes the fuzzy approach to modelling and data analysis, showing that fuzzy models in many cases have an advan-tage over their mechanistic counterparts, and how the fuzzy approach can be profitably used for

(14)

xiv Preface

data analysis and diagnosis. While the first four chapters illustrate the methodological aspects of environmental systems analysis, the subsequent chapters apply them to specific environmental problems. Chapters 5 deals with population dynamics, from single species to food webs, with an emphasis on investigating the conditions for species conservation, or on explaining unexpected behaviours like the catastrophic forest defoliation caused by the spruce budworm. Chapter 6 deals with flow modelling. Far from competing with hydraulic modelling, it considers some simple flow schemes, which provide the first level for aquatic ecosystem modelling. Chapter 7 introduces the basic concepts of environmental microbiology, both in the natural and man-made environment. I strived to show the similarities and the differences of microbial processes in either setting, without getting too much involved in the analysis of wastewater treatment systems, given the many excellent textbooks available in this area (Bastin and Dochain, 1990; Orhon and Artan, 1994; Olsson and Newell, 1999; Dochain and Vanrolleghem, 2001; Gujer, 2008). The final Chapter 8 is a wrap-up chapter, in which I discuss several case studies drawn from my own experience.

It has been said that any scientific book is partly autobiographical, and this one is no exception. In fact, being near the end of my academic career, I felt the need to gather the lecture material that I have amassed in over 30 years of environment analysis teaching. Educating has been an exciting experience all along, because I was fortunate enough to teach students with differing backgrounds and brilliant minds, ranging from automation to environmental engineering, which resulted in a fruitful cross-fertilization. Class projects frequently became master theses, and sometimes pro-duced journal papers, with the students’ involvement as co-authors. These mixed classes reflected my own mixed background, which blended my early electronic engineering training with the sub-sequent commitment to environmental issues. I felt that I owed this book to generations of students, who have now become accomplished professionals, and from whom I still receive a constant flow of affection and gratitude. Now, when we meet at professional gatherings or just over a pizza, they

Chapter 1: Systems theory Chapter 2: Model identification Chapter 3: Data analysis Chapter 4: Fuzzy models Chapter 5: Population dynamics Chapter 6: Flow systems analysis Chapter 7: Microbial energetics and dynamics Chapter 8: Aquatic ecosystems

FIGURE 1 This book spins a web of relations (clockwise from the top) among system theory and environmental issues, moving from the predominantly methodological first four chapters to the more applicative subsequent chapters where specific environmental problems are addressed.

(15)

xv

Preface

love to reminisce over their student days and how much we enjoyed working together and learning together. This book is my token of gratitude for the endless affection and inspiration I have been receiving from them all.

All the material in this book has been intensively student-tested and the companion software has been honed through many critical reviews by cohorts of students. I have found that MATLAB is an ideal teaching, and learning, tool in that it provides a platform that makes the implementation of mathematical ideas into executable code very quickly. Unlike other more formal programming languages, such as Fortran or C/C++, which require setting up complex structures, in MATLAB the user can immediately translate the problem at hand into an executable code and get the results in no time. Many segments of the MATLAB code (referred to as scripts) are included in the boxes along the book to demonstrate the programming structure, while the complete software collec-tion can be downloaded from the book web page in the CRC Press website and copied in the local hard disk. It is strongly suggested to maintain the original folder structure, with a master directory named ESA _ Matlab, in which each chapter folder contains the pertinent codes for that chapter, plus a ‘tools’ folder, which gathers all the utility functions common to all chapters. No installation is necessary, but once MATLAB is started, the master folder and its subfolders must be added on top of the MATLAB path. This software organization makes the path definition vital to retrieve the called functions. The exercises for each chapter have self-explanatory names and are referenced in the figure captions. Of course, this book should not be considered as a MATLAB primer, many of which are freely available in the web. So a certain basic MATLAB literacy is a prerequisite.

A brief clarification regarding an important mathematical notation. Throughout the book the imaginary unit is indicated by j, so that j j× = −1. There was an old joke circulating in the past say-ing how you could tell a mathematician from and engineer. When asked about the imaginary unit, the mathematician would say i i× = −1, while the engineer would claim that j j× = −1, and this book goes for the latter, though MATLAB uses i. Additional material is available from the CRC Press Web site: http://www.crcpress.com/product/isbn/ 9781498706353.

Stefano Marsili-Libelli

University of Florence, Italy

MATLAB® is a registered trademark of The MathWorks, Inc. For product information, please

contact:

The MathWorks, Inc. 3 Apple Hill Drive

Natick, MA 01760-2098 USA Tel: +1 508 647 7000

Fax: +1 508 647 7001

E-mail: [email protected] Web: www.mathworks.com

(16)
(17)

Acknowledgements

Research is a constant swing from frustration to elation and back, and so is scientific book writing. Far from being a solitary activity, I am indebted to a vast number of people with whom I shared elation and to whom I am grateful for pulling me out of frustration. My first thanks goes to my wife Patrizia, a devoted and reliable life companion, for the loving empathy and constant encouragement, apart from discussing some mathematical aspects of the book, as a math teacher. My daughters Ilaria and Chiara provided an equally enthusiastic backing. Ilaria, an agricultural microbiologist, is also to be thanked for revising Chapter 7. Apart from the family circle, I am deeply grateful to several people for their vital contribution both as accomplished professional and as very close friends. Two very special persons stand out, without whom this endeavour could not have been accomplished: Irma S. Britton, CRC Press senior editor, and Professor Emeritus William D. Lakin, University of Vermont, Burlington, VT. Irma has been a dream editor, the one that any author would love to encounter. From her and her staff, I received endless support and encouragement. Her ability to answer my queries and smooth my workflow has been invaluable. Bill Lakin, a friend of long standing and an excellent mathematician, carefully reviewed the whole manuscript and pro-vided valuable comments regarding both the English and the mathematical aspects. His support has been vital. I am also grateful to Dr. Alessandro Spagni, ENEA Bologna and University of Padua, co-author of many papers and careful reviewer of Chapter 7. A special thanks goes to Dr. Luca Palmeri, University of Padua, for being the first instigator of this book. Upon his suggestion, I was invited by CRC Press to write a brief account of his book (Palmeri et al., 2014) and then I was asked whether I had a book proposal of my own. I said yes, CRC Press liked my proposal, and this is how it all started. Another precious instigator of this book has been Dr. Michela Mulas, Aalto University, Finland, who in 2012 invited me to teach a short course entitled ‘Environmental Data Modeling and Analysis’. The material I prepared for that course later became the kernel of this book and her enthusiastic support for the initiative always spurred me throughout my toil. Much of the material presented in this book is the result of research carried out with my assistant Elisabetta Giusti, PhD. Her invaluable input, her curiosity, and her hard-nosed determination supported me in many ways during our decade-long fellowship rich in scientific advances, frank discussions, forthright personal interaction. I am also deeply indebted to Professor Antony Jakeman, Australian National University and Editor-in-Chief, Environmental Modelling and Software (EMS), for his loyal friendship, opti-mistic wisdom and constant encouragement over our long friendship. He asked me to join the EMS editorial board in 2004 and that job has been a constant source of reward, satisfaction and personal growth. I am also deeply grateful to Michelle Herbert, IWA Journals Editorial Co-ordinator, who sympathetically modulated my Water Science & Technology editorial work flow while I was busy with the book, and quickly provided the permission to reproduce several figures from my WST papers. I am also indebted to Design Science (www.dessci.com), particularly Bob Mathews and Derrick Fimon, for helping me getting the most out of MathType 6.9 for Windows, a superb math editor, which I used extensively to write the many equations appearing in the book. My PhD stu-dents Emanuele El Basri and Giacomo Barni are to be thanked for their helpful assistance and the revision of the MATLAB codes. I am also thankful to www.brainyquotes.com for providing me with a vast source of inspiring citations, some of which I used as chapter openers.

In further hindsight, I am grateful to my late parents, who taught me to love and respect Nature from my early days, and to the medical staff who helped me in my battle against cancer, particularly Professor Moretti, who took away the worst part of me, and Professor Amadori, who guided me through the painful path of chemotherapy with a strong hand, unabashed optimism, and a captivating smile. Teaching during these ‘medical’ months was not easy, and I am grateful to my family and to my students, who supported and encouraged me through that dire moments. I owe them all this new

(18)

xviii Acknowledgements lease of life, which made the book possible. In that time I experienced first-hand Winston Churchill’s quotation ‘Success is not final, failure is not fatal: it is the courage to continue that counts’.

Scientific research is a never-ending struggle to further our knowledge, but there are times when we must pause and take stock of our progress. I hope that you will enjoy reading this book, as much as I did in writing it, and after turning the last page, lean back—as I have done after writing the last line—and take time to stand and stare.

What is this life if, full of care, We have no time to stand and stare. No time to stand beneath the boughs And stare as long as sheep or cows. No time to see, when woods we pass, Where squirrels hide their nuts in grass. No time to see, in broad daylight, Streams full of stars, like skies at night. No time to turn at Beauty’s glance, And watch her feet, how they can dance. No time to wait till her mouth can Enrich that smile her eyes began. A poor life this if, full of care, We have no time to stand and stare.

W. H. Davies Leisure, 1911 Florence,

(19)

Author

Stefano Marsili-Libelli was born and educated in Florence, Italy. He received a cum laude MS degree in electronic engineering from the University of Pisa in 1973. Later in the same year, he joined the University of Florence on a post-graduate grant and has served in the Faculty of Engineering ever since, first as a technical assistant, then as an associate professor (since 1983), and finally as a full professor of environmental system modelling since 2000.

He has always been active in promoting the system theory approach to the study of environ-mental systems, both at a faculty level and in a broader context, teaching seminars and courses on environmental modelling and control at the University of Gent (Belgium), University of Leuven (Belgium), Institute of Hydroinformatics (IHE, Delft, the Netherlands), Institute of Environmental Biotechnology, TU Delft (the Netherlands), University of Glamorgan (Wales, UK), Aalto University (Finland) and University and Polytechnic of Valencia (Spain).

He spent study periods at the Institute of Hydrology, Wallingford (UK); International Institute of Applied Systems Analysis (IIASA), Laxenburg (Austria); University of Glamorgan (Wales, UK).

He established Erasmus bilateral links with the University of Gent (Belgium), University of Delft (the Netherlands) and University of Amsterdam (the Netherlands).

Apart from being a founding member of the environmental engineering curriculum at the University of Florence, and serving as the director of the Laboratory of Environmental Process Control, he joined several PhD faculties, among which the PhD curriculum in hydrodynamics and environmental modelling (Consortium among the Universities of Padua, Florence, Genoa and Trento) and the PhD curriculum of sanitary engineering (University of Rome 2). He is presently serving as a faculty member of the international PhD curriculum in civil and environmental engi-neering (University of Braunschweig, University of Florence, University of Pisa and University of Perugia).

Dr. Marsili-Libelli’s teaching responsibilities have always been in the modelling and control of the environmental systems, particularly aquatic environment, both natural and man-made, develop-ing models describdevelop-ing the ecology of lagoons and rivers, as well as new models of microbial kinetics to be applied in the control of wastewater treatment systems.

Other research interests include the modelling of the environment using the fuzzy sets approach and the identification of environmental models, for which he proposed new ad hoc optimization methods for parameter estimation and validation. Modelling applications range from the rivers and lagoon to subsurface constructed wetlands, anaerobic digesters, aerobic wastewater treatment processes and agricultural systems.

He is presently serving as an associate editor for the ISI international journals Environmental

Modelling & Software (Elsevier) and Water Science & Technology (IWA Publishing). He is member of the following scientific societies:

• International Environmental Modelling & Software society (iEMSs) • International Society of Ecological Modelling (ISEM)

• International Water Association (IWA) • Italian Society for Automation (ANIPLA)

Over the years, Dr. Marsili-Libelli has received the following awards:

• The paper Checchi N., Giusti E., Marsili-Libelli S. (2007). PEAS: A toolbox to assess the accuracy of estimated parameters in environmental models. Environmental Modelling &

Software 22: 899–913, was awarded the Best Paper Award 2007 by the Int. J. Environmental

(20)

xx Author • Biennial Medal awarded by the International Environmental Modelling & Software society

(iEMSs) in 2008.

• Nomination to iEMSs Fellow in 2008.

• Best paper award granted by AssoAutomazione (Italian association for automation) in the area of Technological Innovation in the Water Sector, biennial Forum for remote control of public utilities, Rome, October 2009.

• Nominated Reviewer of the year 2010 by the Editorial Board of the Int. J. Environmental

Modelling & Software.

• Best paper award granted by AssoAutomazione (Italian association for automation) in the area of Competition and Sustainability in the Public Utilities, biennial Forum for remote control of public utilities, Bologna, November 2013.

Riferimenti

Documenti correlati

L’Accademia europea di polizia (CEPOL) e l’Ufficio europeo di polizia (EUROPOL) partecipano alle discussioni del gruppo ove opportuno.. rubati - crea una seria

to definitions and recommended practices in the following fields: 20 © The Author(s). European University Institute. Available Open Access on Cadmus, European

Anche in questo caso uno studio preliminare e qualitativo sulle proprietà fotoluminescenti di questi complessi è stato condotto per mezzo di una camera ottica:

Dall’analisi svolta si deduce come un comune che distingue fra obiettivi generali e specifici, che prende in considerazione un numero di obiettivi inferiore ad 80,

159 Available at https://motherboard.vice.com/it/article/jpjnad/i-bitcoin-non-sono-sostenibili 160 ING, Why Bitcoin transaction are more expensive than you think, October

can integrate degradation of quality into the theory of harm with reference to parameters to which viewers, not the merging parties or their competitors,

La femminilizzazione dei flussi migratori e la visibilità dell’esperienza delle madri che migrano “verso Nord” senza i propri figli rappresentano fenomeni che hanno portato in

Poiché la rimozione è aumentata fino alla seconda ora alla dose più ele- vate di PAC utilizzata nel processo AMe, la dose inferiore pari a 0,75 g/m 2 è stata scelta per il pro-