MATLAB : An Introduction with Applications - ECED · PDF fileMATLAB An Introduction with...

download MATLAB : An Introduction with Applications - ECED · PDF fileMATLAB An Introduction with Applications Rao V. Dukkipati Ph.D., P.E. Fellow of ASME and CSME Professor and Chair Graduate

If you can't read please download the document

Transcript of MATLAB : An Introduction with Applications - ECED · PDF fileMATLAB An Introduction with...

  • This pageintentionally left

    blank

  • Copyright 2010, New Age International (P) Ltd., PublishersPublished by New Age International (P) Ltd., Publishers

    All rights reserved.No part of this ebook may be reproduced in any form, by photostat, microfilm,xerography, or any other means, or incorporated into any information retrievalsystem, electronic or mechanical, without the written permission of the publisher.All inquiries should be emailed to [email protected]

    PUBLISHING FOR ONE WORLD

    NEW AGE INTERNATIONAL (P) LIMITED, PUBLISHERS4835/24, Ansari Road, Daryaganj, New Delhi - 110002Visit us at www.newagepublishers.com

    ISBN (13) : 978-81-224-2920-6

  • ToLord Sri Venkateswara

    (v)

    aRectangle

  • This pageintentionally left

    blank

  • The main objective of this book is to provide the students with the opportunity to improve theirprogramming skills using the MATLAB environment to implement algorithms and to teach the use ofMATLAB as a tool in solving problems in engineering. This book includes the coverage of basics ofMATLAB and application of MATLAB software to solve problems in electrical circuits, control systems,numerical methods, optimization, direct numerical integration methods in engineering. With thisfoundation of basic MATLAB applications in engineering problem solving, the book providesopportunities to explore advanced topics in application of MATLAB as a tool.

    An introduction to MATLAB basics is presented in Chapter 1. Chapter 1 also presents MATLABcommands. MATLAB is considered as the software of choice. MATLAB can be used interactively andhas an inventory of routines, called as functions, which minimize the task of programming even more.Further information on MATLAB can be obtained from: The MathWorks, Inc., 3 Apple Hill Drive, Natick,MA 01760. In the computational aspects, MATLAB has emerged as a very powerful tool for numericalcomputations involved in engineering problems. The idea of computer-aided design and analysis usingMATLAB with the Symbolic Math Tool box, and the Control System Tool box has been incorporated.Chapter 2,3,4,5 and 6 consists of many solved problems that demonstrate the application of MATLAB tothe analysis of electrical circuits, control systems, numerical methods, optimization and direct numericalintegration methods. In chapter 6, we have briefly reviewed the direct numerical integration methods forthe solution of a single or system of differential equations. Many numerical methods are available for thesolutions of the response of dynamic systems. We have discussed several widely used step-by-stepnumerical integration methods for linear dynamic response analysis. A brief description of theseintegration methods is presented and their application is illustrated. The integration schemes consideredwere three explicit and four implicit methods. They are the explicit schemes (the central difference method,two-cycle interaction with trapezoidal rule and fourth order Runge-Kutta method) and the implicit schemes(Houbolt method, Wilson Theta method, Newmark Beta method and the Park Stiffly stable method).Application of these direct numerical integration methods is illustrated with a case study of a lineardynamic system.

    Presentations are limited to very basic topics to serve as an introduction to advanced topics inthose areas of discipline. Chapters 2, 3, 4, 5 and 6 include a great number of worked examples andunsolved exercise problems to guide the student to understand the basic principles, concepts and use ofMATLAB in solving a variety of engineering problems.

    Preface

    (vii)

    aRectangle

  • An extensive references to guide the student to further sources of information on electrical circuits,control systems, numerical methods, optimization and direct numerical integration methods is provided atthe end of each chapter. All end-of-chapter problems are fully solved in the Solution Manual availableonly to Instructors.

    I sincerely hope that the final outcome of this book will help the students in developing anappreciation for the topic of solving engineering problems with MATLAB.

    Rao V. Dukkipati

    viii Preface

  • I am grateful to all those who have had a direct impact on this work. Many people working in the generalareas of engineering have influenced the format of this book. I would also like to thank and recognize allthe undergraduate and graduate students in mechanical and electrical engineering programs at FairfieldUniversity over the years with whom I had the good fortune to teach and work and who contributed insome ways and provide feedback to the development of the material of this book. In addition, I greatly owemy indebtedness to all the authors of the articles listed in the bibliography of this book. Finally, I wouldvery much like to acknowledge the encouragement, patience and support provided by my family members:Sudha, Ravi, Madhavi, Anand, Ashwin, Raghav, and Vishwa; who have also shared in all the pain, frustration,and fun of producing a manuscript.

    I would appreciate being informed of errors, or receiving other comments about the book. Please writeto the authors address or send e-mail to [email protected].

    Rao V. Dukkipati

    Acknowledgement

    (ix)

    aRectangle

  • This pageintentionally left

    blank

  • Preface vii

    Acknowledgement ix

    1. MATLAB BASICS 195

    1.1 Introduction 11.2 Arithmetic Operations 31.3 Display Formats 31.4 Elementary Math Built-in Functions 41.5 Variable Names 61.6 Predefined Variables 61.7 Commands for Managing Variables 71.8 General Commands 71.9 Arrays 9

    1.10 Operations with Arrays 111.11 Element-by-Element Operations 141.12 Random Numbers Generation 161.13 Polynomials 171.14 System of Linear Equations 181.15 Script Files 231.16 Programming in MATLAB 241.17 Graphics 291.18 Input/Output in MATLAB 381.19 Symbolic Mathematics 391.20 The Laplace Transforms 431.21 Control Systems 441.22 Summary 83

    References 84Problems 85

    CONTENTS

    (xi)

    aRectangle

  • xii Contents

    2. ELECTRICAL CIRCUITS 971202.1 Introduction 972.2 Electrical Circuits 1002.3 Kirchhoffs Laws 1022.4 Example Problems and Solutions 103

    References 118Problems 118

    3. CONTROL SYSTEMS 1211993.1 Introduction 1213.2 Control Systems 1213.3 Examples of Control Systems 1223.4 Control System Configurations 1233.5 Control System Terminology 1243.6 Control System Classes 1263.7 Feedback Systems 1273.8 Analysis of Feedback 1283.9 Control System Analysis and Design Objectives 129

    3.10 MATLAB Application 1293.11 Second-order Systems 1313.12 Root Locus Plots 1323.13 Bode Diagrams 1323.14 Nyquist Plots 1333.15 Nichols Chart 1343.16 Gain Margin, Phase Margin, Phase Crossover Frequency

    and Gain Crossover Frequency 1343.17 Transformation of System Models 1353.18 Bode Diagrams of Systems Defined in State Space 1363.19 Nyquist Plots of a System Defined in State Space 1363.20 Transient-Response Analysis in State Space 1373.21 Response to Initial Condition in State Space 1393.22 Example Problems and Solutions 139

    References 188Problems 190

    4. NUMERICAL METHODS 2012604.1 Introduction 2014.2 System of Linear Algebraic Equations 2014.3 Gauss Elimination Method 2014.4 LU Decomposition Methods 2024.5 Choleskis Decomposition 2034.6 Gauss-Seidel Method 203

  • Contents xiii

    4.7 Gauss-Jordan Method 2044.8 Jacobi Method 2054.9 The Householder Factorization 207

    4.10 Symmetric Matrix Eigenvalue Problems 2084.11 Jacobi Method 2084.12 Householder Reduction to Tridiagonal Form 2104.13 Sturn Sequence 2114.14 QR Method 2114.15 Example Problems and Solutions 214

    References 254Problems 259

    5. OPTIMIZATION 2613185.1 Introduction 2615.2 Conjugate Gradient Methods 2615.3 Newtons Method 2625.4 The Concept of Quadratic Convergence 2635.5 Powells Method 2665.6 Fletcher-Reeves Method 2675.7 Hooke and Jeeves Method 2675.8 Interior Penalty Function Method 2685.9 Example Problems and Solutions 270

    References 316Problems 316

    6. DIRECT NUMERICAL INTEGRATION METHODS 3193876.1 Introduction 3196.2 Single-degree of Freedom System 3196.3 Multi-degree of Freedom System 3226.4 Explicit Schemes 3236.5 Implicit Schemes 3286.6 Example Problems and Solutions 337

    References 381Problems 386

    7. ENGINEERING MECHANICS 389548 7.1 Introduction 3897.2 Newtonian Mechanics 3897.3 Newtons Laws of Motion 3897.4 Resultants of Coplanar Force Systems 3907.5 Resultants of Non-coplanar Force Systems 3917.6 Equilibrium of Coplanar Force Systems 3927.7 Equilibrium of Non-coplanar Force System 3947.8 Trusses 394

  • xiv Contents

    7.9 Analysis of Beams 3957.10 Friction 3957.11 First Moments and Centroids 3967.12 Virtual Work 3977.13 Kinematics of a Particle 3987.14 DAlemberts Principle 4027.15 Kinematics of a Rigid Body in Plane Motion 4027.16 Moments of Inertia 4047.17 Dynamics of a Rigid Body in Plane Motion 4067.18 Work and Energy 4087.19 Impulse and Momentum 4097.20 Three-dimensional Mechanics 4117.21 Example Problems and Solutions 413

    References 526Problems 527

    8. MECHANICAL VIBRATIONS 5496458.1 Introduction 5498.2 Classification of Vibrations 5498.3 Elementary Parts of Vibrating Systems 5508.4 Discrete and Continuous Systems 5528.5 Vibration Analysis 5528.6 Components of Vibrating Systems 5548.7 Free Vibration of Single Degree of Freedom Systems 5568.8 Forced Vibration of Single-degree of Freedom Systems 5638.9 Harmonic Functions 571

    8.10 Two-degrees of Freedom Systems 5738.11 Multi-degree of Freedom Systems 5778.12 Free Vibration of Damped Systems 5818.13 Proportional Damping 5818.14 General Viscous Damping 5828.15 Harmonic Excitations 5828.16 Modal Analysis for Undamped Systems 5838