Michael Paluszek and
Stephanie Thomas
1st ed. 2015
Michael Paluszek
Princeton, New Jersey, USA
Stephanie Thomas
Princeton Junction, New Jersey, USA
ISBN 978-1-4842-0560-0
e-ISBN 978-1-4842-0559-4
DOI 10.1007/978-1-4842-0559-4
Library of Congress Control Number: 2015955885
© Apress 2015
MATLAB Recipes: A Problem-Solution Approach
Managing Director: Welmoed Spahr
Lead Editor: Steve Anglin
Technical Reviewer: Jonah Lissner
Editorial Board: Steve Anglin, Louise Corrigan, Jonathan Gennick, Robert Hutchinson, Michelle Lowman, James Markham, Susan McDermott, Matthew Moodie, Jeffrey Pepper, Douglas Pundick, Ben Renow-Clarke, Gwenan Spearing, Steve Weiss
Coordinating Editor: Mark Powers
Copy Editor: Kim Burton-Weisman
Compositor: SPi Global
Indexer: SPi Global
Artist: SPi Global
For information on translations, please e-mail [email protected] , or visit www.apress.com .
Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales–eBook Licensing web page at www.apress.com/bulk-sales .
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected] , or visit www.springeronline.com . Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
Any source code or other supplementary materials referenced by the author in this text is available to readers at www.apress.com/9781484205600 . For detailed information about how to locate your book’s source code, go to www.apress.com/source-code/ . Readers can also access source code at SpringerLink in the Supplementary Material section for each chapter.
Standard Apress copyright included in front matter section of manuscript.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.
Printed on acid-free paper
For Marilyn and Matt
Writing software has become part of the job description for nearly every professional engineer and engineering student. While there are many excellent prebuilt software applications for engineers, almost everyone can benefit from writing custom software for their own problems.
MATLAB® has origins for that very reason. Scientists that needed to do operations on matrices used numerical software written in FORTRAN. At the time, using computer languages required the user to go through the write-compile-link-execute process that was time-consuming and error-prone. MATLAB presented a scripting language that allowed the user to solve many problems with a few lines of a script that executed instantaneously. MATLAB had built-in visualization tools that helped the user better understand the results. Writing MATLAB was a lot more productive and fun than writing FORTRAN.
MATLAB has grown greatly since its origins. The power of the basic MATLAB software has grown dramatically, and hundreds of MATLAB libraries are now available, both commercially and as open source. MATLAB is so sophisticated that most new users only use a fraction of its power.
The goal of MATLAB Recipes is to help all users harness the power of MATLAB. This book has two parts. The first part, Chapters 1 through 5 , gives a framework that you can use to write high-quality MATLAB code that you, your colleagues, and possibly your customers, can utilize. We cover coding practices, graphics, debugging and other topics in a problem-solution format. You can read these sections from cover to cover or just look at the recipes that interest you and use them in your latest MATLAB code.
The second part of the book, Chapters 6 through 12 , shows complete MATLAB applications revolving around the control of dynamical systems and simulation. Each chapter provides the technical background for the topic, ideas on how you can write a simple control system, and an example of how you might simulate the system. Each system is implemented in a MATLAB script supported by a number of MATLAB functions. Each chapter also highlights a general MATLAB topic, like graphics or writing graphical user interfaces (GUIs). We have deliberately made the control systems simple so that the reader won’t need a course in control theory to get results. Control experts can easily take the script and implement their own ideas. We cover a number of areas, ranging from chemical processes to satellites—and we apologize if we didn’t write an example for your area of interest!
The book has something for everyone—from the MATLAB novice to the authors of commercial MATLAB packages. We learned new things writing this book! We hope that you enjoy the book and look forward to seeing your software that it inspires.
Michael Paluszek is president of Princeton Satellite Systems, Inc. (PSS), in Plainsboro, New Jersey. Mr. Paluszek founded PSS in 1992 to provide aerospace consulting services. He used MATLAB to develop the control system and simulation for the Indostar-1 geosynchronous communications satellite, resulting in the launch of PSS’s first commercial MATLAB toolbox, the Spacecraft Control Toolbox, in 1995. Since then he has developed toolboxes and software packages for aircraft, submarines, robotics, and fusion propulsion, resulting in PSS’s current extensive product line. He is currently leading a US Army research contract for precision attitude control of small satellites and IS working with the Princeton Plasma Physics Laboratory on a compact nuclear fusion reactor for energy generation and propulsion.
Prior to founding PSS, Mr. Paluszek was an engineer at GE Astro Space in East Windsor, NJ. At GE, he designed the Global Geospace Science Polar despun platform control system and led the design of the GPS IIR attitude control system, the Inmarsat-3 attitude control systems, and the Mars Observer delta-V control system, leveraging MATLAB for control design. Mr. Paluszek also worked on the attitude determination system for the DMSP meteorological satellites. Mr. Paluszek flew communication satellites on more than 12 satellite launches, including the GSTAR III recovery, the first transfer of a satellite to an operational orbit using electric thrusters. At Draper Laboratory, Mr. Paluszek worked on the Space Shuttle program, the international space station, and submarine navigation. His space station work included the design of the control moment gyroscope, based control systems for attitude control.
Mr. Paluszek received his bachelor’s degree in electrical engineering, and a master’s and engineer’s degree in aeronautics and astronautics from the Massachusetts Institute of Technology. He is author of numerous papers and has over a dozen US patents.
Stephanie Thomas is vice president of Princeton Satellite Systems, Inc., in Plainsboro, New Jersey. She received her bachelor’s and master’s degrees in aeronautics and astronautics from the Massachusetts Institute of Technology in 1999 and 2001. Ms. Thomas was introduced to PSS’s Spacecraft Control Toolbox for MATLAB during a summer internship in 1996 and has been using MATLAB for aerospace analysis ever since. She built a simulation of a lunar transfer vehicle in C++, LunarPilot, during the same internship. In her nearly 20 years of MATLAB experience, she has developed many software tools, including the Solar Sail Module for the Spacecraft Control Toolbox; a proximity satellite operations toolbox for the Air Force; collision monitoring Simulink blocks for the Prisma satellite mission; and launch vehicle analysis tools in MATLAB and Java, to name a few. She has developed novel methods for space situation assessment, such as a numeric approach to assessing the general rendezvous problem between any two satellites implemented in both MATLAB and C++.
Ms. Thomas has contributed to PSS’s Attitude and Orbit Control textbook, featuring examples using the Spacecraft Control Toolbox, and written many software users’ guides. She has conducted SCT training for engineers from diverse locales, such as Australia, Canada, Brazil, and Thailand, and has performed MATLAB consulting for NASA, the US Air Force, and the European Space Agency.
Jonah Lissner is a research scientist advancing PhD and DSc programs, scholarships, applied projects, and academic journal publications in theoretical physics, power engineering, complex systems, metamaterials, geophysics, and computation theory. He has strong cognitive ability in empiricism and scientific reason for hypothesis building, theory learning, mathematical and axiomatic modeling, and testing for abstract problem solving. His dissertations, research publications and projects, CV, journals, blog, novels, and system are listed at http://Lissnerresearch.weebly.com .