and Design Using Interactive

Computer-Aided Control System Analysis and Design Using Interactive Computer Graphics Dean K. Frederick and Russell P. Kraft Electrical, Computer and ...
Author: Hugo Malone
2 downloads 0 Views 210KB Size
Computer-Aided Control System Analysis and Design Using Interactive Computer Graphics Dean K. Frederick and Russell P. Kraft Electrical, Computer and Systems Engineering Department, Rensselaer Polytechnic Institute, Troy, NY 12181

Tahm Sadeghi Analytical Science Department, Fairchild Republic Company, Farmingdale, NY 11735

Abstract

to guide software developments of their own. A television tape has been prepared that shows these programs in operation. Interestedreadersmaycontact the f i s t author regarding the availability of this tape. We begin by describing programs available for the analysis and design of univariable(single-input,single-output) control systems. Then two programs for multivariable control systems and several instructional programs will be described. The article concludes with a description of ongoing and future projects.

A varietyofprogramsinvolving interactive computer graphics are available at Rensselaer Polytechnic Institute for the analysis and design of both univariable and multivariable control systems and for related instructional purposes. The principal features of these programs and the ways in which they are used in the curriculum are discussed.

1. Introduction Because many of the techniques for the analysisanddesignofcontrolsystems rely on graphical methods, the facilities of the School of Engineering's Center for InteractiveComputerGraphics(CICG) have played a key role in control system education and research at Rensselaer sinceitsinception in 1977. Theseprograms will be described briefly and samplesofthegraphicalinputandoutput capabilities will be presented. The early activities in the development o f controlsystemsoftwarefortheCICGaredescribed in [l], and a more recent survey oftheuseofthisfacilityforelectrical engineering is given in [Z]. For most of these programs, articles or masters theses exist that can provide further details (see References). Because Imlac vector refresh terminals with light pens and programmable function keys have been used for this work, the software is not transferrable to most othergraphics facilities.However, it is hoped that by describing the capabilities of the software and illustrating some of thegraphicaloutputtheauthorswill provide ideas that can be used by others

II. Programs for Univariable Control Systems A number of programs are available on the interactive graphics system for analyzing and designing univariable systems withtime-responsesolutions,root-locus plots, and frequency-response plots. Some programs provide only oneof these capabilities,whileothersprovidecombinations of capabilities. There is a wide rangeofuserinterfacesamongthese programs, although each of them allows considerable a amount of interaction

-2.0

n

.Fig. I . Frequency-response plots in Bode, Nyquist, and Nichols form (DUFS).

0272-1 70818211200-001 9$00.75 01982 I EEE 19

December 1932

~

~

~~~~~~

~~

throughthelightpenorkeyboard.For the most part, these programs are adaptations of software obtained from sources outside Rensselaer and modified to take advantage ofthe interactiveandgraphicalcapabilitiesoffered by theImlac terminals. They are most heavily used in senior-level a control system design course but find application in a number of other courses.

A . Four Programs Derived from COINGRAD These programs were formed from portions of the COINGRAD package that was developed by Volz at the University of Michigan [3]. These are: TDS (Time DomainSolutions), RTLOCUS (Root Locus), DUFS (DesignUsingFrequencyResponse), and SLAP (Single-Loop Analysis Program). The TDS program [4]generates timedomain solutions and allows the user to saveupto nine responseplotsand redisplaythemsimultaneouslyforcomparison. The graphical portion of RTLOCUS [5] is directed by a light pen with a menu that allows the user to blowof the complex up selected portions plane, compute the gain values for selectedpointson the loci, addlinesof constantdampingratioforthes-plane, and add the unit circle for z-plane loci. The program has theabilityto compute thelociofhigh-ordersystemsandcan handle the intersection of multiple loci. The third programderivedfrom the COINGRAD package computes thefrequency-response for fixed, linear SYSterns.Byselectingitemsfrommenus with the light pen, the user can obtain the frequency response as Nyquist, Nichols, or Bode plots. In addition, these plots can be saved and redisplayed together in simultaneous form, as indicated in Fig. 1. Because the three programs described above do not share a common data base, the program SLAP has been developed to allowtimeresponses,root-locusplots, and Bode plots to be developed within a singleprogram and database [ 6 ] . The programusesTDSforspecifyingand modifying the system model and allows the user to activate RTLOCUS merely by issuing a SLAP command. Before doing a root-locus or Bodeplot,theprogram checks the interconnections to ensure that themodel is in asingle-loopconfiguration. The time-responses, root-locus plots,andBodeplotsthathave been drawnforaparticularsystem canbe

20

PCCSE VS FEECUE\?

,

S.Baz,

.

t

5 . e ~-: c:

L;

.

,

.

I

s -

tiRXIXJU3E VS FRE[)LEN:CY

,

,

:3 - 2 h -I'PZ c.02

I

t:

,

,

.

:'n

3.c:

.

,

+.'c5.:;

PL':'_

Fig. 2. Impulse response, frequency response, and mot locus comparison (SLAP). saved and redisplayed simultaneously reduced form, as shown in Fig. 2.

in

B.iGPALS (InteractiveGraphics PFOgram for Analysis of Linear Systems) For this program the light pen is used to draw the blocks, summing junctions, and interconnecting leads of the system's blockdiagram [7,8]. Onceadiagram such as that of Fig. 3 has been drawn the transfer functions the of individual blocksarespecified in termsof their polesandzeros.Thenpole-zeroplots, frequency responses, and impulse re-

sponses can be computed and displayed for both open- and closed-loop configurations. Changes can be made in the characteristics of any of the individual blocks such as adding or deleting poles and/or zeros.Alsotheblockdiagramcan be modified by using the light pen to add and delete leads, summing junctions, and blocks.

C . NDTUAN (Nonlinear Simulation) The program NDTRAN [9], which has asyntaxthat isvery similarto that of DYNAMO, is used for general nonlinear

I

G5 CS)

Fig. 3. Block diagram drawn using IGPALS.

control systems magazine

simulations.Thegraphicaloutputdisplays can be controlled by using a light pentoselectthevariablesto be displayed. It is possible to plot several variables simultaneously and to select different scaling options for these combined plots.Plotscanalsobemade withan independentvariableother than time, such as in a phase-plane plot.

111. ProgramsforMultivariable Control Systems In parallel with the development of the programs described above, a comprehensive program package for ComputerAided Multivariable Control System Design (CAMCSD) has been developed for the analysis and design of multivariable controlsystems [IO]. Thefullrange of capabilitiesoffered by theinteractive graphics facility has been used, including asynchronous control of the software to allowtheusertointervene in anoptimization process and restart it with modified parameter values. A wide array of comprehensive design algorithms and analysis methods has been included and arrays have been sized to allow up to 30 statevariables.The main objective of theseefforts by thesecondauthor has been to develop a tool that will allow the serioususertotacklecomplexdesign problems involving multivariable systems in anefficientmanner thatwould not be possibletoattemptwithouta comprehensivesoftwarepackage.User interaction is possible at all stages of the process and often several alternative algorithms are available to perform a particular task. The instructions are given to the package by using a lightpento select items from a set of menus that are organized in a hierarchical structure. At the top level is the supervisor, from whichthe user can enter the menu tree for: input and output, design methods, analysis methods, modificationofparameters, or exitingthe package. Portions of the software developed at Rensselaer include the following capabilities: constant optimal output-feedback design via parameter optimization, command-generator tracker design, eigenvalue/eigenvectorassignment via quadratic weight selection, nonoptimal eigenvalue/eigenvector assignment, inverse transfer function matrix computation,

18.08

Fig. 4. Pole-zero pattern, step response, and impulse response

inverse polynomial matrix computation, proportional-plus-integral control and tracking, transmissionanddecouplingzero computation, transfer-function matrix computation, a polynomial matrix library, and transient-response plotting. Alsoincludedarethefollowingfeatures from the ORACLS package of subroutines: implicit and explicit model following,Kalman-Bucyfilter,andlinear quadraticregulator.TheEISPACK library is used for the eigenvalue and eigenvector calculations.

IV. Instructional Programs The graphical nature of many important concepts in systems analysis makes them candidates for the development of instructionalsoftwareusinganinteractivegraphicssystem.Programs ofthis typeandthetopicsto whichthey are directed are: CONVOL-the convolution integral, PZTR-therelationship between the poles and zeros of a transfer function andthesystem’sstepandimpulse responses,

(pzm).

DTS-the relationship between the poles and zeros of a digital filter and themagnitudeofitsfrequencyresponse; also some basic design algorithms, BASMAT-the state-transition matrix, and STICKBAGa flexible stick being balanced by a motor-driven cart. In each case the objective of the program is to help the user grasp a particular concept. This is done by generating graphical displays in an interactive fashion.

A . C O W O L (Convolution) This program [ l l ] leads the user througheachstepoftheconvolution process in a graphical fashion. The two functionsf(t)andg(t)thataretobe convolved are generatedby the user and a value of time is specified. Plots of f(X), g(t-h), the product of f(h)g(t-A), and the integralofthisproductaregenerated. Finally a smooth curve of the convolution is displayed.

B . PZTR (Poles, Zeros, and TimeResponse) Students in an introductory course coveringthemodelingandanalysis

of

dynamic systems can use this program to help them relate pole and zero locations to step and impulse responses [ 121. This is accomplished by having the user specify thepolesandzeros of atransfer functionand then requestevaluation of thestepandimpulseresponses.After viewingthesecurvesindividually, the user can request a combined plot, such as thatshown in Fig. 4, which shows the poles and zeros in the s-plane along with the step and impulse responses.

C. DTS (Discrete-Time Systems) Thisprogram has threefeaturesfor helping the user to understand discretetimesystemsanddigitalfilters 1131. First,thepoles and zeros of atransfer functioncanbelocated inthe z-plane using a light pen. Then the magnitude of the frequency response is computed and displayed in adynamicfashion,along with the pole-zero plots. In Fig. 5, the small boxes on the unit circle and on themagnitudeplotrepresentthepoint z = exp (jut) where w is the frequency and T is the sampling interval,and they moveas w increases from 0 to n/T.The vectors in the z-plane from the zeros and poles tothemoving boxcan beusedto constructthefrequency response. The second feature of the program is a low-pass filter design algorithm that allowstheusertoselectone of several designoptions.Oncethemethodhas been selected from a light pen menu and the pass- and stop-band frequencies and ripplelimitshavebeenset,thefilter’s transferfunction is computed,andthe dynamic pole/zero frequency-response plotfeaturecan be executed.The third portion of the program computes the responseofadigitalfilter that has been specified in terms of its difference equation.

mated pictorial representation of a stick balanced on a cart to inform the user of the response of the control system, rather than using the conventional time plots of variables. The stick can be flexible (using a single bending mode in the model), or it canberigid.Theusercanselect several combinations of mathematical models and control laws, namely a rigid or flexiblestickandstate-variableor output feedback. Controller gains can be entered by the user to modify the default values.Timeplots of variablescan be displayed as can a simulation diagram for either the rigid or the flexible stick case.

V. Conclusion A widerange of programshas been described that are in use at Rensselaer’s Center for Interactive Computer Graphics for instruction in control systems and fortheirsimulation,analysis, and design.Theseprogramshaveproven valuable in the educational process at both theundergraduateandgraduatelevels and have virtually superseded use of the centralcomputingfacility which hasat present only a limited graphical display capability and no interactive graphics. Even with the accomplishments to

date, much remains to be doneto expand thecapabilitiesofthesoftwareandto make improvements in the wedmachine interface.Forexample,effortsare underway in the CICG to develop a commondatabasethatcan be shared by programs.Thisfeaturewouldbeparticularlyhelpful in thedesignofunivariablecontrolsystemsusingthe programs TDS, RTLOCUS, and DUFS. For the lmlac terminals, the programmable function keys that have been used for the programs PZTR and STICKBAL have helped to provide a more versatile user interface than that obtainedby using thelightpenorthekeyboard.Because the preferences of individual users will vary, it would be desirable to allow the usertoselectfromamongthesethree types of input devices. One advantage of having a strictly keyboard-entry mode is thattheindividualprogramscouldbe made to respond to a command file containing program instructions. Such a capabilitywouldallowtheusertowrite command macros. One project that is in progress is directed to adapting the subroutine package INTRAC that has been developed at Lund University, Sweden to the Prime computer. This step will permit the attainment of a high degree of user

,ItlRG Z

FILTERS

Z

ENTER PZ REPERT SCALEXS SCALEX ID

D . BASMAT (Basic Matrix Program)

RESTORE

Melsa and Jones [ 141 developed a programto do basicmatrixcomputations, including the state-transition matrix. As implemented on the Rensselaer interactive graphics system, this program allows the user to view the time functions that comprise the elements of the state-transition matrix. The light pen is used with a menutoidentifythoseelements ofthe state-transitionmatrixthatareviewed, up to three at a time.

E . STICKBAL (Animated Stick Balancer) Thisprogram

1151 employsanani-

DIFFEREN

1

END HRRDCOPY

8 . z 02

-

O.21E 02 0.IlE 02 -

a-88E Et39

I

PI

0.25 PI

0.50 PI

PI 0.75

I UT 1.00 PI

Fig. 5 . Snapshot of dynamic pole-zero and frequency-response magnitude plots for a digital filter (DTS).

_-,.

control systems magazine

LL

~~

-

~

~

~~~

interaction with only a modest expenditure of programming effort. In another projectthegraphicalinputportionof IGPALS is beingadaptedforuseona VAX computer with the simulation programSIMNON,againfromLundUniversity. Another advantage of havingacommand file capability is that instructional command files can be prepared that will allow students to instruct themselves in the use of the particular programin questionortouse the programtoinstruct themselves in someparticulartopicrelatingtotheircourse work [ 161. For example, with such capability a one could construct a computer-aided instructionalunitusingTDS,RTLOCUS,and DUFSthatexplainedanddemonstrated therelatedconcepts of dampingratio, undampednaturalfrequency,andgain and phase margins.

Appendix Thesystemonwhichtheprograms described above are run consists of two Prime 750 Computers and 36 Imlac vector-refresh terminals. Twenty-four of these terminals are available24 hours per day for use by those students at all levels whosecoursesorprojectsinvolvethe running or developmentofinteractive graphics software. The other twelve terminals are usually reserved for personnel of theCICG for softwaredevelopment and advanced project work.

Acknowledgment The authors are indebted to the director, Professor Michael J. Wozny, andthe staffmembers of theCenterforInteractiveComputerGraphics.The multivariable software described in Section I11 wasdeveloped by the second author (T.S.) with the support of the National Science Foundation under Grant ISP792040 and the Industrial Sponsors of the Center for Interactive Computer Graphics.Theresultsreportedheredo not reflecteither the opinionsortheapproval of the grant sponsors. We are also indebted to Professor Richard A. Volz of theUniversity of Michigan (TDS, RTLOCUS, and DUFS) and Professors William I. Davisson and John T. Uhran,Jr., of Notre Dame (NDTRAN)whosuppliedsoftware that was used as the basis for several of these programs. Finally, we wish to acknowledge the contributions of the many students, both undergraduate and graduate, who have been involved in the developmentandrefinement of codeoverthe

past five years.

References D. K . Frederick, H. Kaufman, and M. J. Wozny,“TheRoleofComputer Graphics in Control System Studies,” Proc. Summer Computer Simulation Conf..,Newport Beach, CA, July 1978.

D. K. Frederickand M. J.Wozny, “Computer Graphics in Electrical Engineering at Rensselaer,” Proc. ASEE National Meeting, LosAngeles, CA, June 1981. R. A. Volz, M. Dever, T. J. Johnson, and D. C. Conliff, “COINGRAD-Control Oriented Interactive Graphical Analysisand Design,” IEEE Trans. Education, Vol. E-17, 3, Aug. 1974. “TDS-An Interactive P. E. Buckley, Computer Program for Determining the TransientResponseofDynamicSystems,” Masters Project Report, Rensselaer Polytechnic Institute, Troy, NY, Aug. 1980. J. Staudinger,“Implementation of a Root Locus Program on an Interactive Graphics System,” Masters Project Report, RensselaerPolytechnicInstitute, Troy, NY, May 1978. C. Y. Chin, “SLAP-An Interactive Computer Program for Analyzing Single-Loop Systems,” MastersProject Report, RensselaerPolytechnicInstitute, Troy, NY, Aug. 1980. G. Lupton, “Interactive Graphics Program for Analysis of LinearSystems,” Masters Project Report, Rensselaer Polytechnic Institute, Troy, NY, Dec. 1974. W.Killeavy,“InteractiveComputer Graphics Program for LinearSystems AnalysisandOptimization,”Masters Project Report, Rensselaer Polytechnic Institute, Troy, NY, May 1978. D. K. Frederick,”AnImplementation ofNDTRAN on anInteractiveComputerGraphicsSystem,’’ Proc.Pittsburgh Conf. on Modeling and Control, Pittsburgh, PA, Apr. 1979. T. Sadeghiand M. J. Wozny,“An Interactive ComputerGraphicsPackage for LinearMultivariableSystem Design,” Proc. IFAC Symp. on Multivariable Technological Systems, West Lafayette,IN, Sept. 1982. D. K . Frederick and G . L. Waag, “An Interactive GraphicsProgram for Assistance in Learning Convolution,” Trans. Computers in Education Div. ASEE, Vol. XII, No. 7/8, JulylAug.

1980. S . Leong, “A D. K. Frederick and A. Computer-Graphics Approach to Relating Pole-Zero Plots and Time-Domain Responses,” Proc. ASEE National Meeting, College Station, TX.June 1982. D. K . Frederickand L. A.Gerhardt, “A ComputerGraphicsProgram for the Analysis and Design of Digital Filters,“ Proc. Intl. Conf. on Cybernetics and Society, Cambridge, MA, Oct. 1980. J. L. Melsa and S . K. Jones, Computer Programs for Computational Assistance in the Study of Linear Control

Theory, McGraw-HillBook Co., New

York, 1973. K. FrederickandH. T. Nguyen, “A Computer GraphicsAnimationofa Flexible Stick Balancer,” Trans. Com-

[ 151 D.

puter in Education Div. ASEE, Vol.

XIII, No. 3/4, March/April 1981. [I61 D. K. Frederick,“OnUsingtheComputer to TeachtheUseofComputer Programs,” Proc. IFAC Symp. on Multivariable

Technological

Systems,

West Lafayette, IN, Sept. 1982.

Dean K. Frederick isanAssociateProfessor in the Electrical. Computer, and Systems Engineering Department at RensselaerPolytechnic Institute in Troy. New York. Professor Frederick obtainedthe B.E. in 1955 at Yale University. the Sc.M. in 1961 atBrown University. andthePh.D. i n 1964 at Stanford University. He taught at Clarkson College in Potsdam, NYin1964andhasbeen at Rensselaer since then. During1980-8 I. hewasa Visiting Research Fellow at the General Electric Company Research and Development Center in Schenectady. NY. Russell

P. Kraft

wasborn on January . 5. 1955 in Assiut. Egypt. He received his B.S.E.E. and M.Eng. E . E . in1976 1978 and respectivelyatRensselaer Polytechnic Institute. Heiscurrently adoctoralstudent at RPI in the last stages of degree research andis scheduled toreceivehisPh.D.inthefallof 1982. Through his instructorship and research activities at RPIhehasextensivelyusedthe interactive graphics facility for system engineering instruction and the simulation of optimally designed array antennas. ”

Tahmouress Sadeghi received B . S . E.E. and M.S.E.E. degrees from the State University of New York at Buffalo in I974 and 1976. respectively. During 1976-7. he held a positionwiththeOccidental Petroleum Cornoration, Grand Islal Id, NY, where he was responsible for designingreal-timesofnvare programs to automate mechanical testing machines. He joinedthe Ph.D. Program i n electrical engineering at Rensselaer Polytechnic Institute in 1977. During 1977-78. he developed a real-time software program for the navigation of theMarsRover.During19788 2 . he was involved i n the iesearch and development of Interactive ComputerAidedDesign of Control Systems.

Suggest Documents