This edition first published 2014
2014 John Wiley & Sons, Ltd
Registered office
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.
MATLAB is a trademark of MathWorks, Inc. and is used with permission. MathWorks, Inc. does not warrant the accuracy of the text or exercises in this book. This books use or discussion of MATLAB software or related products does not constitute endorsement or sponsorship by MathWorks, Inc. of a particular pedagogical approach or particular use of the MATLAB software.
Library of Congress Cataloging-in-Publication Data
Xue, Dingy.
System simulation techniques with MATLAB and Simulink / Dingy Xue, YangQuan Chen.
1 online resource.
Includes bibliographical references and index.
Description based on print version record and CIP data provided by publisher; resource not viewed.
ISBN 978-1-118-69435-0 (Adobe PDF) ISBN 978-1-118-69437-4 (ePub) ISBN 978-1-118-64792-9 (cloth)
1. System analysisData processing. 2. Computer simulation. 3. MATLAB. 4. SIMULINK. I. Chen, YangQuan,
1966 II. Title.
T57.62
620.0028553dc23
2013025348
A catalogue record for this book is available from the British Library.
ISBN: 978-1-118-64792-9
Foreword
It is a pleasure for me to write a foreword for this book by Dingy Xue and YangQuan Chen. Dingy came to the University of Sussex in 1988 to study for his DPhil with me. At the time, computing, relating to control engineering, was starting to move from Fortran to MATLAB, first on terminals connected to a central mainframe computer and then to standalone desktop machines. Digital simulation languages, which had replaced analog computers, were also heading in the same direction. The original version of MATLAB used on the mainframe was written in Fortran, followed by the much faster C version a few years later. One great advantage of MATLAB was that its fundamental data type was the matrix, the concept of which I first came across in the now little known language APL. APL was a very efficient coding language, so much so that a fair comment would be that it required as many lines of commenting as coding for a person to understand a program, and it also required a special keyboard. Other major features of MATLAB were the very good graph plotting facilities and the tools available for providing an excellent graphical user interface for a program. The graphical features provided for programming and for the display of results in Simulink were also a major improvement over the features of existing digital simulation languages.
In the early days of MATLAB, I had several general programs on the mainframe computer which used a question and answer interface and gave the output as a printed plot of points. Dingy, in doing his research, developed a deep understanding of MATLAB and the capabilities of the GUI, one eventual result of which was the program CtrlLAB which is freely available from the MathWorks library. The genesis of this was a program described in my 1962 doctoral dissertation written in Manchester Autocode, which used paper tape to provide the data input and the values of points as output. Intermediate stages had seen its coding in APL and MATLAB using a question and answer format. Dingy has therefore used MATLAB and Simulink avidly for the past 25 years, including, I suspect, most of the versions issued over that period. He has spent thousands of hours writing new code and modifying existing routines to be compatible, or to take advantage of new features in the changing versions of MATLAB and Simulink. I have known YangQuan Chen whom Dingy first met in Singapore about twenty years ago for the past ten years. Since they first met, they have cooperated a lot with their complementary research interests being united by their use of MATLAB and Simulink.
This book is therefore written by two people who have had a wealth of first-hand experience of using MATLAB/Simulink in control engineering research and teaching its use to students in China and the USA in both mathematical and control-related courses for over two decades. Also, much of the material has been available in earlier versions of the book in Chinese, where it has been extremely well received, and it is used at many universities. Feedback from these publications has provided suggestions for improvements which have been incorporated here.
The coverage of the book is such that it provides a basic introduction to the use of MATLAB/Simulink before going on to address their usage in many facets of mathematics and engineering. After covering the general aspects of programming and computation in MATLAB, details of applications in many areas of scientific computation are given, covering areas such as differential equations and optimization. Chapters 36 are primarily devoted to Simulink, starting from consideration of the functions of the various blocks and continuing to describe a variety of applications covering topics such as linear and nonlinear system simulations, multivariable systems, vectorized blocks, output blocks, the animation of results, linearization of nonlinear systems, S-functions and optimization in simulations. Chapter 7 discusses the more specific engineering application blocks for electronic systems, electrical drive systems and so on, that are available in Simscape, and in chapter 8 some simulation applications for non-engineering systems, image processing and finite state machines are described which show the wide applicability of modeling and simulation techniques.
Im sure that this book with its many examples and problems will prove a major asset to you, the reader, in learning the simulation capabilities of MATLAB/Simulink, but as Dingy and YangQuan would no doubt confirm, the only way to really learn is by the hard work of doing. So attempt the exercises and also design your own to possibly clarify certain points and gain greater understanding.