Utilizing SIMULINK and MATLAB in a Graduate Nonlinear Systems Analysis Course Asad Azemi1 and Edwin Engin Yaz2 Department of Electrical Engineering 1 Penn State University 2 University of Arkansas Abstract Control system design packages like MATLAB, MATRIXX, Control C, SIMNON, etc. have become essential ingredients of both undergraduate and graduate courses in the systems and controls area. The use of MATLAB and its companion toolboxes in teaching graduate and undergraduate courses have reported by many educators in the past. This work describes our experience, at the Pennsylvania State University the University of Arkansas, with the use SIMULINK and MATLAB in Nonlinear Systems Analysis and Stability course which is offered to advanced undergraduate and graduate students. This paper will emphasize on the use of SIMULINK for simulation of nonlinear systems and study of their behavior. We also present the MATLAB features that are found useful in this course. A discussion of how SIMULINK and MATLAB help in enhancing the students' understanding of the material and reducing the amount of time spent in performing computational homework assignments will follow. Examples illustrating the use of these packages will be included and the actual code will be posted at a site on the World Wide Web. Finally, the general positive student reaction to incorporating these software packages into this course will be reported. Introduction The Electrical and Engineering Departments at Penn State University and the University of Arkansas are incorporating computer aided engineering (CAE) and computer aided design (CAD) packages into their curricula. The intent of augmenting the curriculum with these packages is to enhance the students theoretical understanding of the material with hands on analysis and design experience. The benefits of CAE and CAD packages in the classroom have been realized by the authors and their co-workers before [1-6]. The benefits of using these packages in a university setting is also confirmed by the number of new textbooks, and revisions of previously printed textbooks incorporating new exercises and problems based on these packages, such as [7-14]. A summary of the advantages and disadvantages of incorporating these packages into our graduate curricula are presented below. The summary is followed by sections outlining the use of each package in specific classes. The use of SIMULINK [15] in this course is fairly new. In this work we will concentrate on those features that are useful in a graduate level nonlinear systems analysis and stability course. A summary of the advantages and disadvantages of incorporating these packages into our curriculum are presented below. General Advantages The main advantages of using these tools are: the reinforcement of student understanding of theoretical principles by means of enhanced graphical aids and interactive simulations, analysis of more complex systems that can be treated by pencil and paper, and the instructors ability to assign fairly complex design problems that otherwise would have be unrealistic without the help of such software. Student response concerning the use of these packages is generally favorable. One interesting response received from students is an increased interest in the subject material. It is also worth mentioning that the use of many CAE packages, such as MATLAB and SIMULINK, are no longer limited to a a specific filed. Early exposure to these packages will benefit the students. For a more detailed discussion of this topic readers can refer to our previous works [2-4]. General Disadvantages Three of the disadvantages of using these packages are the maintenance and operation of these packages on an accessible computer system, the extra work required by students (and instructors) to learn how to use CAE packages, and assuring that the packages are included in the baseline curriculum as part of the required course material. A more detailed discussion of this topic can be found in our previous works [2-4]. MATLAB and SIMULINK in a Nonlinear Systems Analysis Nonlinear Systems Analysis at the University of Arkansas Although, a lot of work has been done in incorporation of MATLAB [15] into undergraduate control system textbooks and courses [7-14], there is no reference textbook for a graduate level nonlinear system analysis course. It should be mentioned that some of the work done in an undergraduate control systems textbook, using MATLAB, could also be applied to a graduate level course. In this section we will first present the way that this course is structured at Penn State University Great Valley Campus and the University of Arkansas. Next, we present the topics that are covered in this course. This course is offered to advanced undergraduate and graduate students. The goal of this course is to expose the students to the basic methods in the modeling, analysis, and design of nonlinear control system. To accomplish this goal, the following topics are typically covered in a semester: Nonlinear Systems Analysis at Penn State Great Valley Penn State Great Valley Campus, one of the eighteen campuses of the Penn State University, is a graduate center designed to address the educational need of the working engineers in Philadelphia area. Almost all of our students are working engineers, with a wide variety of backgrounds using simulation packages. The nonlinear analysis course deals with the analysis and the design of nonlinear control systems. In the analysis, a nonlinear closed-loop system is assumed to have been designed, and we wish to determine the characteristics of the system’s behavior. In the design section a nonlinear plant is given and our task is to construct a controller so that the closed loop system meets the desired characteristics. The nonlinear systems course covers the following topics: 1. 2. 3. 4. 5. 6. 7. Phase Plane Analysis Fundamentals of Lyapunov Theory Advanced Stability Theory Describing Function Analysis Feedback Linearization Sliding Control and Estimation Adaptive Control [16] and [17] are used in teaching the course. Students are given weekly assignments that also include computer simulation/usage. Exams also include a take home part that have computer simulations. Student have access to student versions of MATLAB and SIMULINK. 1. 2. 3. Examples of nonlinear control systems (4 classes). Second order systems (3 classes). Fundamental properties of nonlinear differential equations (4 classes). 4. Lyaponov stability (4 classes). 5. Invariance principle (2 classes). 6. Input-output stability (1 class). 7. Control and observer design based on local linearization (1 class). 8. Exact linearization (4 classes). 9. Analysis of perturbed systems by the Lyapunov method and Bellman-Gronwall lemma. 10. Ultimate boundedness and its achievement by minmax design of controller and observers (2 classes). One class is normally 80 minutes of lecture. Usually two in class exam is given and the rest of the grading is based on weekly homework assignments and the student portfolio that includes the class notes, corrected homework, etc. The major use of MATLAB/SIMULINK is in homework assignments. Use of MATLAB/SIMULINK in a Nonlinear Systems Analysis Course In this section we will present those features of the MATLAB/SIMULINK that we have found most useful in our classes, based on the aforementioned course outlines. Due to the nature of the SIMULINK, a graphical user interface program, that is basically using block diagram approach for simulating different system, it can be effectively used in simulation of different nonlinear systems. The block diagram nature of the program will enable us to study the behavior of the system under different nonlinearities. This will enable us to use the software in investigating finite escape time, multiple equilibria, limit cycles and their nature (stable or unstable), etc. For example students are given 2dimensional tunnel-diode model and are asked to investigate the behavior of the system by plotting the phase portrait diagram. In another example students are given the chaotic Lorenz attraction equation , with proper ranges of parameters and initial conditions. They are asked to plot the three phase plane portraits for this 3dimensional system for various parameter values. Then, they are asked to change the initial conditions to observe the sensitivity of the system to the initial conditions. Individual state trajectories are plotted to see the seemingly random (chaotic) behavior. SIMULINK also contains Sources library that allows one to choose the input (forcing functions) necessary for simulation. The Linear library contains transfer functions and summers where as the Nonlinear library has many common nonlinearities like dead zone, saturation, etc. The Sinks library has the Scope, for example, that displays any desired signal. Blocks are activated by double clicking, and holding the mouse which the object is being dragged to the proper location. Connections are also made by the same “dragging” procedure. Parameters are selected from the simulation menu after the block diagram is complete and Start is used to carry out the simulation. There are many other facilities available in SIMULINK which is beyond the scope of this paper. In addition to the simulation capability of the SIMULINK, MATLAB’s Control System Toolbox can be used e.g. to investigate the stability of the perturbed linear systems. EIG can be used for finding the eigenvalues of the system matrix of a linear system to check whether they are all in the left half complex plane or inside the unit circle for continuousand discrete-time systems, respectively. When these systems are perturbed, there are many stability robustness bounds that can be calculated via the use of LYAP or DLYAP for continuous- and discrete-time algebraic matrix Lyapunov equations [17]-[18]. Controllers and observers can be designed using linear techniques e.g. PLACE to assign the poles of a linear system by state feedback or LQR to design an optimal state feedback control used on local linearizations of nonlinear systems. Observer design s can be realized by duality. Finally, the performance of nonlinear controller and observer schemes like feedback linearization and min-max designs can be assessed using SIMULINK. Conclusion In this paper, we have presented the use of SIMULINK/MATLAB software packages in our graduate curriculum, at Penn State University and the university of Arkansas. Several of the advantages provided by computer simulation packages, such as SIMULINK, include a reinforcement of student understanding of theoretical principles, allowing assignment of larger, and more complex designs, increased student attentiveness, and enhanced professional development. The main disadvantages of using computer simulation packages are the extra work required of students and instructors, the maintenance and operation of these packages on an accessible computer system, and assuring that the packages are inserted in the baseline curriculum as part of the required course material. The general student reaction to the use of SIMULINK and MATLAB has been very positive. References 1. Martin, T.W., A. Azemi, D. Hewett, and C.P. Schneider, “PSpice in Electrical Engineering Laboratories,” Proceedings of the ASEE Annual Conference, pp. 1307-1308, 1992. 2. Andrews, D., A. Azemi, S. Charlton, and E. Yaz, “Computer Simulation in Electrical Engineering Education,” Proceedings of the ASEE Gulf-Southwest Section Meeting, pp. 7782, 1994. 3. Azemi, A, and E. Yaz, “PSpice and MATLAB in Undergraduate and Graduate Electrical Engineering Courses,” Proceedings of the 24th Frontiers in Education Conference, pp. 456459, 1994. 4. Yaz, E., and A. Azemi. “Utilizing MATLAB in two Graduate Electrical Engineering Courses,” Proceedings of the 25th Frontiers in Education Conference. pp. 2c6.1-2c6.4, 1995. 5. Azemi, A., and C. Stook. “Using MATLAB in Graduate Electrical Engineering Courses,” Proceedings of the ASEE Annual Conference, to appear. 6. Haggard. Roger, “Classroom Experiences and Student Attitudes toward Electronic Design Automation,” Proceeding of the 25th Southeastern Symposium on Systems Theory. IEEE Computer Society Press, pp. 411-415, 1993. 7. Dorf, R., and R. Bishop. Modern Control Systems, seventh edition, Addison-Wesley Publishing Company, 1995. 8. Franklin, G., J. Powell, and M. Workman, Digital Control of Dynamic Systems. AddisonWesley Publishing Company, 1990. 9. Strum, R., and D. Kirk. Contemporary Linear Systems using MATLAB. PWS publishing company, 1994. 10. Saadat, H. Computational Aids in Control Systems Using MATLAB. McGraw-Hill, 1993. 11. Shahian, B., and M. Hassul. Control System Design Using MATLAB. Prentice Hall, N.J., 1993. 12. Leonard, N.E., and W.S. Levine. Using MATLAB to Analyze and Design Control Systems. Benjamin/Cummings, 1992. 13. Ogata, K. Solving Control Engineering Problems with MATLAB. Prentice Hall, N.J., 1994. 14. Hanselman, D.C., and B.C. Kuo. MATLAB Tools For Control System Analysis and Design. Prentice Hall, 2nd edition, 1995. 15. The MathWorks Inc., 21 Eliot St., South Natick, MA, 01760. 16. Slotine, Jean-Jacques, and Weiping Li. Applied Nonlinear Control,Prentice Hall, 1991. 17. Khalil, H.K. Nonlinear Systems, 2nd edition, Prentice Hall, 1995. 18. Weinmann, A. Uncertain Models and Robust Control, Springer-Verlag, New York, 1991.