John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, United Kingdom
For details of our global editorial offices, for customer services and for information about how to apply for permission to reuse the copyright material in this book please see our website at www.wiley.com.
The right of the author to be identified as the author of this work has been asserted in accordance with the Copyright, Designs and Patents Act 1988.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by the UK Copyright, Designs and Patents Act 1988, without the prior permission of the publisher.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.
Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective owners. The publisher is not associated with any product or vendor mentioned in this book
Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. It is sold on the understanding that the publisher is not engaged in rendering professional services and neither the publisher nor the author shall be liable for damages arising herefrom. If professional advice or other expert assistance is required, the services of a competent professional should be sought.
Library of Congress Cataloging-in-Publication Data:
Names: Rhinehart, R. Russell, 1946- author.
Title: Nonlinear regression modeling for engineering applications : modeling,
model validation, and enabling design of experiments / R. Russell
Rhinehart.
Description: Chichester, UK ; Hoboken, NJ : John Wiley & Sons, 2016. |
Includes bibliographical references and index.
Identifiers: LCCN 2016012932 (print) | LCCN 2016020558 (ebook) | ISBN
9781118597965 (cloth) | ISBN 9781118597934 (pdf) | ISBN 9781118597958
LC record available at https://lccn.loc.gov/2016012932
A catalogue record for this book is available from the British Library.
Series Preface
The Wiley-ASME Press Series in Mechanical Engineering brings together two established leaders in mechanical engineering publishing to deliver high-quality, peer-reviewed books covering topics of current interest to engineers and researchers worldwide.
The series publishes across the breadth of mechanical engineering, comprising research, design and development, and manufacturing. It includes monographs, references and course texts.
Prospective topics include emerging and advanced technologies in Engineering Design; Computer-Aided Design; Energy Conversion & Resources; Heat Transfer; Manufacturing & Processing; Systems & Devices; Renewable Energy; Robotics; and Biotechnology.
Preface
Utility
Mathematical models are important.
Engineers use mathematical models to describe the natural world and then rearrange the model equations to answer the question, “How do I create an environment that makes Nature behave the way I want it to?” The answer to the mathematical rearrangement of the model equations reveals how to design processes, products, and procedures. It also reveals how to operate, use, monitor, and control them. Modeling is a critical underpinning for engineering analysis, design, control, and system optimization.
Further, since mathematical models express our understanding of how Nature behaves, we use them to validate our understanding of the fundamentals about processes and products. We postulate a mechanism and then derive a model grounded in that mechanistic understanding. If the model does not fit the data, our understanding of the mechanism was wrong or incomplete. Alternately, if the model fits the data we can claim our understanding may be correct. Models help us develop knowledge.
These models usually have coefficients representing some property of Nature, which has an unknown value (e.g., the diffusivity of a new molecule in a new medium, drag coefficient on a new shape, curing time of a new concrete mix, a catalyst effective surface area per unit mass, a heat transfer fouling factor). Model coefficient values must be adjusted to make the model match the experimentally obtained data, and obtaining the value of the coefficient adds to knowledge.
The procedure for finding the model coefficient values that makes a model best fit the data is called regression.
Although regression is ages old, there seem to be many opportunities for improvements related to finding a global optimum; finding a universal, effective, simple, and single stopping criterion for nonlinear regression; validating the model; balancing model simplicity and sufficiency with perfection and complexity; discriminating between competing models; and distinguishing functional sufficiency from prediction accuracy.
I developed and used process and product models throughout my 13-year industrial career. However, my college preparation for the engineering career did not teach me what I needed to know about how to create and evaluate models. I recognized that my fellow engineers, regardless of their alma mater, were also underprepared. We had to self-learn as to what was needed. Recognizing the centrality of modeling to engineering analysis, I have continued to explore model development and use during my subsequent academic career.
This textbook addresses nonlinear regression from a perspective that balances engineering utility with scientific perfection, a view that is often missing in the classroom, wherein the focus is often on the mathematical analysis, which pretends that there are simple, first-attempt solutions. Mathematical analysis is intellectually stimulating and satisfying, and sometimes useful for the practitioner. Where I think it adds value, I included analysis in this book. However, development of a model, choosing appropriate regression features, and designing experiments to generate useful data are iterative procedures that are guided by insight from progressive experience. It would be a rare event to jump to the right answers on the first try. Accordingly, balancing theoretical analysis, this book provides guides for procedure improvement.
This work is a collection of what I consider to be best practices in nonlinear regression modeling, which necessarily includes guides to design experiments to generate the data and guides to interpret the models. Undoubtedly, my view of best has been shaped with my particular uses for the models within the context of process and product modeling. Accordingly, this textbook has a focus on models with continuous-valued variables (either deterministic, discretized, or probabilities) as opposed to rank or classification, nonlinear as opposed to linear, constrained as opposed to not, and of a modest number of variables as opposed to Big Data.
This textbook includes the material I wish I had known when starting my engineering career and now what I would like my students to know. I hope it is useful for you.
The examples and discussion presume basic understanding of engineering models, regression, statistics, optimization, and calculus. This textbook provides enough details, explicit equation derivations, and examples to be useful as an introductory learning device for an upper-level undergraduate or graduate. I have used much of this material in the undergraduate unit operations lab course, in my explorations of model-based control on pilot-scale units, and in modeling of diverse processes (including the financial aspects of my retirement and the use of academic performance in the first two college years to project upper-level success). A person with an engineering degree and some experience with regression should be able to follow the concepts, analysis, and discussion.
My objective is to help you answer these questions:
How to choose model inputs (variables, delays)?
How to choose model form (linear, quadratic, or higher order, or equivalent model structures or architectures such as dimension or number of neurons)?
How to design experiments to obtain adequate data (in number, precision, and placement) for determining model coefficient values?
What to use for the regression objective (vertical least squares, total least squares, or maximum likelihood)?
How to define goodness of model (r-square, fitness for use, utility, simplicity, data-based validation, confidence interval for prediction)?
How to choose the right model between two different models?
What optimization algorithm should be used for the regression to be able to handle the confounding issues of hard or soft constraints, discontinuities, discrete and continuous variables, multiple optima, and so on?
What convergence criteria should be used to stop the optimizer (to recognize when it is close enough to optimum)?
Should you linearize and use linear regression or use nonlinear regression?
How to recognize outliers?
How can you claim that a model properly captures some natural phenomena?
The underlying techniques needed for the answers include propagation of uncertainty, probability and statistics, optimization, and experience and heuristics. The initial chapters review/develop the basics. Subsequent chapters provide the application techniques, description of the algorithms, and guides for application.
Access to Computer Code
Those interested can visit the author's web site, www.r3eda.com, for open access to Excel VBA macros to many of the procedures in this book.
Years back our college decided to standardize with Visual Basic for Applications (VBA) for the undergraduate computer programming course. As a result, routines supporting this text are written in VBA, which is convenient to me, and also a widely accessible platform. However, VBA is not the fastest, and some readers may not be familiar with that language. Therefore, this text also provides a VBA primer and access to the code so that a reader may convert the VBA code to some other personally preferred platform. If you understand any structured text procedures, you can understand the VBA code here.
Preview of the Recommendations
Some of the recommendations in this book are counter to traditional practice in regression and design of experiments (DoE), which seem to be substantially grounded in linear regression. As a preview, opinions offered in this textbook are:
If the equation is nonlinear in the coefficients, use nonlinear regression. Even if the equation can be log-transformed into a linear form, do not do it. Linearizing transformations distort the relative importance of data points within the data set. Unless data variance is relatively low and/or there are many data points, linearizing can cause significant error in the model coefficient values.
Use data pre-processing and post-processing to eliminate outliers.
Use direct search optimizers for nonlinear regression rather than gradient-based optimizers. Although gradient-based algorithms converge rapidly in the vicinity of the optimum, direct search optimizers are more robust to surface aberrations, can cope with hard constraints, and are faster for difficult problems. Leapfrogging is offered as a good optimizer choice.
Nonlinear regression may have multiple minima. No optimizer can guarantee finding the global minimum on a first trial. Therefore, run the optimizer for N trials, starting from random locations, and take the best of the N trials. N can be calculated to meet the user desire for the probability of finding an optimum within a user-defined best fraction. The equation is shown.
Pay as much attention to how constraints are defined and included in the optimization application as you do to deriving the model and objective function (OF) statement. Constraints can have a substantial influence on the regression solution.
The choice of stopping criteria is also influential to the solution. Conventional stopping criteria are based on thresholds on the adjustable model coefficient values (decision variables, DVs), and/or the regression target (usually the sum of squared deviations) that we are seeking to optimize (OF). Since the right choice for the thresholds requires a priori knowledge, is scale-dependent, and requires threshold values on each regression coefficient (DV) and/or optimization target (OF), determining right threshold values requires substantial user experience with the specific application. This work recommends using steady-state identification to declare convergence. It is a single criterion (only looking at one index – statistical improvement in OF relative to data variability from the model), which is not scale-dependent.
Design the experimental plan (sequence, range, input variables) to generate data that are useful for testing the validity of the nonlinear model. Do not follow conventional statistical DoE methods, which were devised for alternate outcomes – to minimize uncertainty on the coefficients in nonmechanistic models, in linear regression, within idealized conditions.
Design the experimental methods of gathering data (measurement protocol, number and location of data sets) so that uncertainty on the experimental measurements has a minimal impact on model coefficient values.
Use of the conventional least-squares measure of model quality, ∑(ydata − ymodel)2, is acceptable for most purposes. It can be defended by idealizing maximum likelihood conditions. Maximum likelihood is more compatible with reality and can provide better model coefficient values, but it presumes knowledge of the variance on both experimental inputs and output, and requires a nested optimization. Maximum likelihood can be justified where scientific precision is paramount, but adds complexity to the optimization.
Akaho's method is a computationally simple improvement for the total east-squares approximation to maximum likelihood.
Establish nonlinear model validity with statistical tests for bias and either autocorrelation or runs. Do not use r-square or ANOVA techniques, which were devised for linear regression under idealized conditions.
Eliminate redundant coefficients, inconsequential model terms, and inconsequential input variables.
Perform both logic-based and data-based tests to establish model validity.
Model utility (fitness for use) and model validity (representation of the truth about Nature) are different. Useful models often do not need to be true. Balance perfection with sufficiency, complexity with simplicity, rigor with utility.
Philosophy
I am writing to you, the reader, in a first-person personal voice, a contrast to most technical works. There are several aspects that led me to do so, but all are grounded in the view that humans will be implementing the material.
I am a believer in the Scientific Method. The outcomes claimed by a person should be verifiable by any investigator. The methodology and analysis that led to the outcomes should be grounded in the widely accepted best practices. In addition, the claims should be tempered and accepted by the body of experts. However, the Scientific Method wants decisions to be purely rational, logical, and fact based. There should be no personal opinion, human emotion, or human bias infecting decisions and acceptances about the truth of Nature. To preserve the image of no human involvement, most technical writing is in the third person. However, an author's choice of idealizations, acceptances, permissions, assumptions, givens, basis, considerations, suppositions, and such, are necessary to permit mathematical exactness, proofs, and the consequential absolute statements. However, the truth offered is implicitly infected by the human choices. If a human is thinking it, or if a human accepts it, it cannot be devoid of that human's perspective and values. I am not pretending that this book is separate from my experiences and interpretations so I am writing in the first person.
Additionally, consider the individuals applying techniques. They are not investigating a mathematical analysis underlying the technique, but need to use the technique to get an answer for some alternate purpose. Accordingly, utility with the techniques is probably as important as understanding the procedure basis. Further, the application situation is not an idealized simplification. Nature confounds simplicity with complexity. Therefore, as well as proficiency in use, a user must understand and interpret the situation and choose the right techniques. The human applies it and the human must choose the appropriate technique. Accordingly, to make a user functional, it is important for a textbook to understand the limits and appropriateness of techniques. The individual is the agent and primary target, the tool is just the tool. The technique is not the truth, so I am writing to the user.
It is also essential that a user truly understands the basis of a tool, to use it properly. Accordingly, in addition to discussing the application situations, this text develops the equations behind the methods, includes mathematical analysis, and reveals nuances through examples. The book also includes exercises so the user can develop skills and understanding.
In the 1950s Benjamin Bloom chaired a committee of educators that subsequently published a taxonomy of Learning Objectives, which has come to be known as Bloom's Taxonomy. One of the domains is termed the Cognitive, related to thinking/knowing. There are six levels in the Taxonomy. Here is my interpretation for engineering (Table 1).
Table 1 Bloom's taxonomy
Level
Name
Function – person does
Examples
6
Evaluation (E)
Judge goodness, sufficiency, and completeness of something, choose the best among options, know when to stop improving. Must consider all aspects
Decide that a design, report, research project, or event planning is finished when considering all issues (technical completeness, needs of all stakeholders, ethical standards, safety, economics, impact, etc.)
5
Synthesis (S)
Create something new: purposefully integrate parts or concepts to design something new that meets a function
Design a device to meet all stakeholders' approvals within constraints. Create a new homework problem integrating all relevant technology, design a procedure to meet multiple objectives, create a model, create a written report, design experiments to generate useful data
4
Analysis (An)
Two aspects related to context
One. Separate into parts or stages, define and classify the mechanistic relationships of something within the whole
One. Describe and model the sequence of cause-and-effect mechanisms: tray-to-tray model that relates vapor boil-up to distillate purity, impact of transformer start-up on the entire grid, impact of an infection on the entire body and person health
Two. Critique, assess goodness, determine functionality of something within the whole
Two. Define and compute metrics that quantify measures of utility or goodness
3
Application (Ap)
Independently apply skills to fulfill a purpose within a structured set of “givens”
Properly follow procedures to calculate bubble point, size equipment, use the Excel features to properly present data, solve classroom “word problems”
2
Understanding/comprehension (U/C)
Understand the relation of facts and connection of abstract to concrete
Find the diameter of a 1-inch diameter pipe, convert units, qualitatively describe staged equilibrium separation phenomena, explain the equations that describe an RC circuit, understand what Excel cell equations do
1
Knowledge (K)
Memorize facts and categorization
Spell words, recite equations, name parts of a valve, read resistance from color code, recite the six Bloom levels
Notably most of classroom instruction has the student working in the lower three levels, where there are no user-choices. There is only one way to spell “cat,” only one right answer to the calculation of the required orifice diameter using the ideal orifice equation and givens in the word problem, and so on. In school, the instructor analyzes the situation, synthesizes the exercise, and judges the correctness of the answer. By contrast, competency and success in professional and personal life requires the individual to mentally work in the upper levels where the situation must be interpreted, where the approach must be synthesized, and where the propriety of the approach and answer must be evaluated. When instruction prevents the student from working in the upper cognitive levels, it misrepresents the post-graduation environment, which does a disservice to the student and employers who have to redirect the graduate's perspective. Accordingly, my aim is to facilitate the reader's mental activity in the upper levels where human choices have to be made. I am therefore writing to the human, not just about the technology.
A final perspective, on the philosophy behind the style and contents of this book is grounded in a list of desired engineering attributes. The members of the Industrial Advisory Committee for our School helped the faculty develop a list of desired engineering attributes, which we use to shape what we teach and shape the student's perspectives. Engineering is an activity, not a body of knowledge. Engineering is performed by humans within a human environment; it is not the intellectual exercise about isolated mathematical analysis. There are opposing ideals in judging engineering and the list of Desired Engineering Attributes reveals them. The opposing ideals are highlighted in bold (Table 2).
Table 2 Desired engineering attributes
Engineering is an activity that delivers solutions that work for all stakeholders. Desirably engineering:
Seeks simplicity in analysis and solutions, while being comprehensive in scope.
Is careful, correct, self-critical, and defensible; yet is performed with a sense of urgency.
Analyzes individual mechanisms and integrates stages to understand the whole.
Uses state-of-the-art science and heuristics.
Balances sufficiency with perfection.
Develops sustainable solutions – profitable and accepted today, without burdening future stakeholders.
Tempers personal gain with benefit to others.
Is creative, yet follows codes, regulations, and standard practices.
Balances probable loss with probable gain but not at the expense of EHS&LP – manages risk.
Is a collaborative, partnership activity, energized by individuals.
Is an intellectual analysis that leads to implementation and fruition.
Is scientifically valid, yet effectively communicated for all stakeholders.
Generates concrete recommendations that honestly reveal uncertainty.
Is grounded in technical fundamentals and the human context (societal, economic, and political).
Is grounded in allegiance to the bottom line of the company and to ethical standards of technical and personal conduct.
Supports enterprise harmony while seeking to cause beneficent change.
Engineering is not just about technical competence. State-of-the-art commercial software beats novice humans in speed and completeness with technical calculations. Engineering is a decision-making process about technology within human enterprises, value systems, and aspirations, and I believe this list addresses a fundamental aspect of the essence of engineering. As a complement to fundamental knowledge and skill of the core science and technical topics, instructors need to understand the opposing ideals, the practice of application, so that they can integrate the issues into the student's experience and so that student exercises have students practice right perspectives as they train for technical competency.
A straight line is very long. Maybe the line goes between pure science on one end and pure follow-the-recipe and accept-the-computer-output on the other end. No matter where one stands, the line disappears into the horizons to the left and to the right. No matter where one stands, it feels like the middle, the point of right balance between the extremes. However, the person way to the left also thinks they are in the middle. If Higher Education is to prepare graduates for industrial careers, instructors need to understand the issues surrounding Desired Engineering Attributes from an industrial perspective, not their academic/science perspective. Therefore, I am writing to the human about how to balance those opposing ideals when using nonlinear regression techniques for applications.
Acknowledgments
My initial interest in modeling processes and products arose from my engineering experience within industry, and most of the material presented here benefited from the investigations of my graduate students as they explored the applicability of these tools, guidance from industrial advisors as they provided input on graduate projects and undergraduate education outcomes, and a few key mentors who helped me see these connections. Thank you all for revealing issues, providing guidance, and participating in my investigations.
Some of the techniques in this text are direct outcomes of the research performed by Gaurav Aurora, R. Paul Bray, Phoebe Brown, Songling Cao, Chitan Chandak, Sandeep Chandran, Solomon Gebreyohannes, Anand Govindrajanan, Mahesh S. Iyer, Suresh Jayaraman, Junyi Li, Upasana Manimegalai-Sridhar, Siva Natarajan, Jing Ou, Venkat Padmanabhan, Anirudh (Andy) Patrachari, Neha Shrowti, Anthony Skach, Ming Su, John Szella, Kedar Vilankar, and Judson Wooters.
A special thanks goes to Robert M. Bethea (Bob) who invited me to coauthor the text Applied Engineering Statistics, which was a big step toward my understanding of the interaction between regression, modeling, experimental design, and data analysis. Another special thank you to Richard M. Felder, always a mentor in understanding and disseminating engineering science and technology.
As a professor, funding is essential to enable research, investigation, discovery, and the pursuit of creativity. I am grateful to both the Edward E. and Helen Turner Bartlett Foundation and the Amoco Foundation (now BP) for funding endowments for academic chairs. I have been fortunate to be the chair holder for one or the other, which means that I was permitted to use some proceeds from the endowment to attract and support graduate students who could pursue ideas that did not have traditional research support. This book presents many of the techniques explored, developed, or tested by the graduate students.
Similarly, I am grateful for a number of industrial sponsors of my graduate program who recognized the importance of applied research and its role in workforce development.
Most of all, career accomplishments of any one person are the result of the many people who nurtured and developed the person. I am of course grateful to my parents, teachers, and friends, but mostly to Donna, who for the past 26 years has been everything I need.