I. GENERAL INFORMATION ON LISA (Rel. 2.2) PURPOSE OF THE PROGRAM LISA is a software module designed at the Engineering School of Bologna University with the goal of realizing a simple inter- active tool allowing students of the System Theory course to analyze, using a personal computer, the reachability and observa- bility properties of state space models. Great care has been devoted to the development of a friendly user interface allowing easy introduction, editing and storage of state space models. HARDWARE REQUIREMENTS LISA runs on IBM PC/XT/AT/PS2 or compatible personal computers and requires a minimum of 256 Kb of free memory (not 256 Kb of total memory), a Hercules black and white graphic card (720x348) and standard black and white monitor (Hercules version) or an EGA card and a color monitor (EGA version). OPERATING SYSTEM The program runs under MS DOS version 2.0 or above. SPEED CONSIDERATIONS The performance of the program can be considered optimal on 80286 machines with a 8 MHz clock (or faster). The limited speed of older models based on the 8088 and a 4.7 MHz clock is particular- ly evident during editing. However, efficiency of the implemented algorithms allows effective use of every type of MS DOS personal computer to perform the analyses allowed by the program. The program takes advantage of, but does not require, an 8087 or 80287 numeric coprocessor. LANGUAGES USED Most of the program is written in FORTRAN 77. Assembler routines have been written to perform operations not accessible from the FORTRAN environment or whose speed was considered critical. COMPUTATIONS PERFORMED The program performs the classical Kalman decomposition on a given state space model and presents the results in several ways allowing, for instance, extraction from a given system of its reachable, observable and reachable and observable subsystems etc. LISA can thus be used also to reduce a system to its minimal form and evaluate its asymptotic, bounded-input bounded-output and bounded-input bounded-state stabilities. PRECISION CONSIDERATIONS All computations are performed using four-byte real variables. This choice has proved to lead to sufficiently accurate results with limited order models like those accepted by the program. The most critical steps (determination of the dimension of the reach- ability and unobservability subspaces and of their intersection) are performed using the partial determinant criterion (Bonivento and Guidorzi, 1971). While it is certainly possible to develop specific examples leading to a test failure (and this is true for every algorithm that decides whether a computed vector belongs or not to a given subspace), the general performance of the test has been found to be quite satisfactory. LIMITS ON MODEL SIZE Because of the educational purposes of the program, easy intro- duction, editing and visualization of the models has been con- sidered more important than their maximal size. According to the resolution of the Hercules and EGA cards and to the design of the graphic interactive editor the following limits have been imple- mented: model order: 8 (Hercules version), 7 (EGA version) number of inputs: 8 " " 7 " " number of outputs: 6 (any version) DOCUMENTATION LISA has been designed as a completely self-explanatory program so that no documentation should be required by most users for its effective use. A short tour through the LISA menus and some details on the underlying logical structure can, however, be found in the following sections. II. LEVEL 0 MENU: CREATING, EDITING AND SAVING MODELS The execution of LISA begins with a banner carrying the program name, author's signature and release number. After a short delay a reduced level 0 menu is proposed ----- LISA - LEVEL 0 MENU ----- CURRENT MODEL: None F1 - LOAD A MODEL FILE F2 - CREATE A MODEL FILE F7 - QUIT The first line in the menu advises the absence of any loaded or created model. Since a model is necessary to perform any subse- quent operation the proposed menu only allows loading a previous- ly stored model from disk or the introduction of a new model from the keyboard. The third option allows the program to be left. F1 - LOAD A MODEL FILE By pressing the F1 key the user is required to type the name of a file containing a previously stored model. MODEL FILE NAME > c:\lisamods\nosuch.mod File not on disk - Please enter a new name MODEL FILE NAME > model6.mod Up to 64 characters can be used to specify path and model name. The existence of the specified file is then verified. If the file cannot be found a diagnostic message is given and the request for a file name renewed. When the given model file can be accessed, its content is loaded and the program returns to the extended level 0 menu. F2 - CREATE A MODEL FILE The F2 key activates the procedure required to generate a new model. The user is thus required to type the order of the model, the number of inputs and the number of outputs MODEL ORDER > 5 NUMBER OF INPUTS > 1 NUMBER OF OUTPUTS > 2 The control is then transferred to the graphic interactive editor that visualizes the model matrices with zeroed entries. It can be noted that the models considered are always non-purely dynamical (matrix D is always present). The user will enter purely dynamic models by simply avoiding to edit matrix D. The window selecting the entries of the matrices can be moved using the keyboard arrows. When the window is positioned on the desired entry, its value can be inserted by using a string of up to ten characters. The admissible characters are: 0,1,2,3,4,5,6,7,8,9,., E,+,-; all other characters are filtered out. When the first character is entered the window reduces to a line and it is not possible to select another entry until the RETURN key is pressed. When this happens the entered string is processed by a lexical analyzer that decodes its content. Every numerical notation accepted by FORTRAN is recognized by the lexical ana- lyzer. Erroneous notations (e.g. 1.2.3) lead to an error message; in such cases it is not possible to move the window until a correct value is entered. The logical structure of the lexical analyzer allows also strings containing more than one number like, for instance, -1 -2 -3, to be decoded. In such cases, however, only the rightmost number is decoded so that the previous string would be decoded as -3. Non edited entries keep the initial null value. The ESCAPE key leads again to the extended level 0 menu. The first menu line will now inform that the current model has been generated by the editor CURRENT MODEL: Edited model When the dimensions of the model matrices do not allow a single- screen visualization the pairs (A,C) and (B,D) are separately drawn. The user can switch between (A,C) and (B,D) by means of the F1 key. After the creation from scratch of a new model or the loading from disk of a previously stored one the program again proposes the level 0 menu, which now includes some choices possible only in presence of a model. The first line in the menu will report the name of the loaded model or "Edited model" if a new model has been created. ----- LISA - LEVEL 0 MENU ----- CURRENT MODEL: model6.mod F1 - LOAD A MODEL FILE F2 - CREATE A MODEL FILE F3 - EDIT A MODEL FILE F4 - SAVE A MODEL FILE F5 - PRINT A MODEL FILE F6 - SYSTEM ANALYSIS F7 - QUIT F3 - EDIT A MODEL FILE The F3 key activates the editor on the model. This option can be used to visualize the model matrices and/or to change some en- tries. If the editor is entered with a loaded model its name is not changed until one or more entries of its matrices are changed. In this case it is substituted with "Edited model". F4 - SAVE A MODEL FILE This option allows a new or edited model to be saved on disk. The name of the file to be written is first requested. Up to 64 characters can be used to write path and file name. The program then controls whether a file with the same path and name already exists and in this case the user is requested to confirm the overwriting of the previous file or to give a new name MODEL FILE NAME > model6.mod File already exists. Overwrite (Y/N) ? N MODEL FILE NAME > mod6.mod F5 - PRINT A MODEL FILE The F5 key allows printing of the model matrices. The print pauses after every matrix and can be resumed by means of the RETURN key. The printed matrices are partitioned, when necessary, in order to preserve readability without exceeding the 80 columns that can be visualized on the screen and printed by most common printers. The printout will look as follows MODEL4.MOD MATRIX A 1 2 3 4 1 .400E+01 -.400E+01 .000E+00 .000E+00 2 .100E+01 .000E+00 .000E+00 .000E+00 3 .000E+00 .100E+01 .000E+00 .100E+01 4 .000E+00 .100E+01 -.300E+01 -.400E+01 MATRIX B 1 1 .100E+01 2 .000E+00 3 .000E+00 4 .000E+00 MATRIX C 1 2 3 4 1 .100E+01 .000E+00 .000E+00 .000E+00 MATRIX D 1 1 .000E+00 A hardcopy of the printout can be obtained by typing Ctrl-P before the execution of LISA (the associated code is filtered out during some phases of the program execution). F6 - SYSTEM ANALYSIS Once a model has been created, loaded and edited as desired, it is possible to perform its analysis using the F6 key. The follow- ing message will then appear Working.... Please wait The computing time will depend on the model size and on the machine speed. A 6 MHz 80286 machine with 80287 coprocessor will require about 3 seconds for a single-input single-output order 4 model, about 16 seconds for an order 8 model. The actual times will depend not only on the model order but also on the number of inputs and outputs and the size and orientation of its reach- ability and unobservability subspaces. At the end of the analysis the level 1 menu will be proposed. III. LEVEL 1 MENU: KALMAN DECOMPOSITION, MINIMAL FORM, STABILITY The level 1 menu allows the results of the performed Kalman decomposition to be analyzed and also to extract from a given system its reachable, observable or reachable and observable parts. Its options are the following ----- LISA - LEVEL 1 MENU ----- CURRENT MODEL: model6.mod F1 - KALMAN DECOMPOSITION F2 - REACHABLE SUBSYSTEM F3 - OBSERVABLE SUBSYSTEM F4 - REACH. & OBS. SUBSYSTEM F5 - SELECT LEVEL 0 MENU F7 - QUIT As in the level 0 menu the F7 key can be used to exit from the LISA program. It is important to remember that no automatic saving of the current model nor special prompts are given on leaving the program. F5 key can be used to return to the level 0 menu. This feature can be used to load a different model or create a new one but is particularly useful to edit the current model in order to obtain the desired features. The following description of the level 1 menu options makes reference to the model file model6.mod, which can be found on the LISA disk. F1 - KALMAN DECOMPOSITION By pressing the F1 key we obtain a description of the Kalman decomposition of the current model. This description begins with the model matrices which are drawn in the same way as during editing. The matrices are partitioned according to the model structure. The properties of their blocks are also described. If the four model matrices cannot be simultaneously visualized, as in the previous example, it is possible to switch between the pairs (A,C) and (B,D) using the F1 key. By pressing the RETURN key a block diagram of the Kalman decompo- sition is visualized. The blocks appearing in this diagram are numbered in the same order as the blocks of the model matrices. The characteristics of every block are briefly described. By again pressing the RETURN key a plot of the model poles is drawn. A circle with unitary radius centered in the origin is also drawn as a reference and help in order to evaluate the stability of discrete-time systems. Multiple poles are drawn in yellow, single ones in red (ver. 2.2 only). By pressing the RETURN key the values of the model poles are printed as follows ----- MODEL POLES ----- REAL PART IMAGINARY PART .00000 .00000 -1.00000 .00000 -1.00000 .00000 1.00000 .00000 -2.00000 .00000 -2.00000 .00000 Pressing the RETURN key again gives a prompt regarding the option to print the model matrices Do you want to print the previous model (Y/N) [N] > Y By pressing the RETURN key the print is skipped. Typing Y the following print is obtained KALMAN DECOMPOSITION OF THE GIVEN MODEL MATRIX A 1 2 3 4 5 1 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .... 2 .000E+00 -.100E+01 .000E+00 .000E+00 .000E+00 .... 3 .000E+00 .100E+01 -.100E+01 .000E+00 .000E+00 .... 4 .000E+00 .000E+00 .000E+00 .100E+01 .000E+00 .... 5 .000E+00 .000E+00 .000E+00 .000E+00 -.200E+01 .... 6 .000E+00 .000E+00 .000E+00 .000E+00 .100E+01 .... MATRIX B 1 2 1 .000E+00 .100E+01 2 .100E+01 .000E+00 3 .000E+00 .000E+00 4 .000E+00 .000E+00 5 .000E+00 .000E+00 6 .000E+00 .000E+00 MATRIX C 1 2 3 4 5 1 .000E+00 .000E+00 .100E+01 .000E+00 .000E+00 .... 2 .000E+00 .000E+00 .000E+00 .000E+00 .100E+01 .... MATRIX D 1 2 1 .000E+00 .000E+00 2 .000E+00 .000E+00 By pressing the RETURN key after printing of the D matrix, a prompt regarding the option to save on disk a file storing the model matrices obtained with the Kalman decomposition is dis- played. Do you want to save the previous model (Y/N) [N] > Y MODEL FILE NAME > decmod.mod It can be noted that the information obtained on the model allows its asymptotic stability to be established but not its simple stability when multiple poles with null real part (unitary module for discrete-time systems) are present. It is also important to note that the previous model (or the partial models obtainable with other options) is never automati- cally substituted for the initial model. Of course the user can save one of these models on disk and subsequently load it as the main model from the level 0 menu. After saving the model, or pressing the RETURN key at the previous prompt, the program returns to level 1 menu. F2 - REACHABLE SUBSYSTEM By pressing the F2 key the reachable part of the system is ex- tracted from the Kalman decomposition and presented in a similar way. All options previously encountered are still available. Note that knowledge of the poles associated to the reachable subsystem allows the bounded-input bounded-state stability of the considered system to be established. F3 - OBSERVABLE SUBSYSTEM By pressing the F3 key the observable part of the system is extracted from the Kalman decomposition and presented. The poles of the observable part of the system are then printed as follows ----- MODEL POLES ----- REAL PART IMAGINARY PART -1.00000 .00000 -1.00000 .00000 -2.00000 .00000 -2.00000 .00000 By pressing the RETURN key we get a prompt regarding the option to print the matrices of the considered subsystem Do you want to print the previous model (Y/N) [N] > Y OBSERVABLE SUBSYSTEM MATRIX A 1 2 3 4 1 -.100E+01 .000E+00 .000E+00 .000E+00 2 .100E+01 -.100E+01 .000E+00 .000E+00 3 .000E+00 .000E+00 -.200E+01 .000E+00 4 .000E+00 .000E+00 .100E+01 -.200E+01 MATRIX B 1 2 1 .100E+01 .000E+00 2 .000E+00 .000E+00 3 .000E+00 .000E+00 4 .000E+00 .000E+00 MATRIX C 1 2 3 4 1 .000E+00 .100E+01 .000E+00 .000E+00 2 .000E+00 .000E+00 .000E+00 .100E+01 MATRIX D 1 2 1 .000E+00 .000E+00 2 .000E+00 .000E+00 Do you want to save the previous model (Y/N) [N] > Y MODEL FILE NAME > minform.mod By saving the previous model a reduction of the original system to the minimal (completely observable) form has been performed. F4 - REACHABLE AND OBSERVABLE SUBSYSTEM By pressing the F4 key the reachable and observable part of the system is extracted from the Kalman decomposition and presented in a similar way. All options previously encountered are still available. Note that knowledge of the poles associated to the reachable and observable subsystem allows the bounded-input bounded-output stability of the considered system to be established. REFERENCES C. Bonivento and R. Guidorzi: A selection criterion in Gram- Schmidt orthonormalization procedure. Ricerche di Automatica, vol. 2, n. 3, pp. 295-299, December 1971. DISTRIBUTION POLICY LISA is freely distributed to non-profit organizations; it can not, however, be modified without written permission from the author. CORRESPONDENCE All correspondence regarding the LISA program should be addressed to: Prof. Roberto P. Guidorzi Dept. of Electronics, Computer and System Science University of Bologna Viale del Risorgimento, 2 40136 Bologna, Italy