                                                                Page 1

       
                    INSTRUCTIONS for the program SYSAN.

SYSAN is a program for the analysis of linear analog and discrete systems with
and without feedback.

The complete and unrestricted rights of the program belong to the author,
M.J. van den Oever, Gregoriusdonk 10, 4707 VA Roosendaal, the Netherlands.
Licensees can, in accordance with the licensing agreement, obtain certain
rights to the program. Violation of the licensing agreement will void this
agreement without any compensation for the licensee. The author reserves the
right for compensation from the licensee in case the licensee circulates the
program or parts thereof without written permission from the author.

The program is not copy protected, but it contains a personal identification.
This identification is shown in every program output. The identification is
stored in code in the file IDENT.FIL. The file IDENT.FIL must be in the same
directory as the program SYSAN.EXE, otherwise SYSAN will not start.

SYSAN was specially developed to run on PC's under the operating system
MS-DOS. The required memory capacity is 640 Kbyte.

A 8087 type numeric coprocessor is recommended. The program will automatically
use the coprocessor if it is available.

The program is fully driven via menus and is meant to be used without other
instructions. 

The program is multilingual. At the moment Dutch, German and English are
available. Via an independent language generator program, other languages can
be made available.

The selection of the default language is fully automatic.

The automatic language selection operates by means of the country number that
is given at the startup of the computer in the config.sys file. In case
config.sys does not provide a country number, the default language is English.
You can also create a default language by preparing a file with the name
DEFLANG.TXT and storing this file in the same directory with SYSAN.EXE.

As an example the file DEFLANG.TXT for English is prepared with:
         copy ENGLISH.TXT DEFLANG.TXT

You may override the automatic language selection. In the setup program under
the heading LANGUAGE you therefore select the fixed language of your choice.

The program delivers tables, mathematical expressions and graphics. Outputs
are complete on one screen. By means of Shift-PrtScr hard copies of tables and
expressions can be obtained. The special command P yields hardcopies of the
graphics. In the options menu you may choose between half size and full size
graphics copies.
                                Page 1
                                                               Page 2                                                       
The program is either in color or monochrome and it adjusts itself
automatically to the installed graphics card.
                                                       
The source program was written in Borland Pascal 7.0. All graphics cards that
can be selected automatically by Borland Pascal 7.0 can also be selected
automatically by SYSAN.

It is possible to drive the program by a mouse. You therefore should have
installed a mouse with a Microsoft mousedriver.

The program has an extensive help function. At any place in the program,
except in graphics with activated cursor, you can call the dedicated help
function with function key F1. 

Time response graphs and frequency response graphs can be provided with a grid
to facilitate reading. The grid facility is chosen with the options menu.
In every graph or a cursor can be installed. Function key F4 installs the
cursor.

Hard copies can be made on Epson compatible 9 pins dot matrix printers, IBM
Proprinter compatibles and on HP laserjet and deskjet printers. The hard copy
is a screen copy. Therefore the resolution of the hard copy depends on the
graphics card. There are 2 print sizes: A5 (half size) over the width of the
paper and A4 (full size) over the length of the paper. The choice is made in
the options menus.

If you wish, you may switch off all the menu directions in the tables,
expressions and graphs. In that case you may also provide the graphics and
the tables with a caption. The output is then more suitable for inclusion in
reports and other publications. This switching is done in the options menu. 

Inputs, consisting of only one keystroke (commands), are executed immediately.
Inputs, consisting of more keystrokes (data), are to be concluded with
<Enter>.


















                                Page 2
                                                               Page 3
                             Ŀ
                                 D  O  S    
                             
-------------------------------------------------------------------------
Ŀ
                                                                        
                         M  A  I  N   M  E  N  U                        

-----------------------------------------------------------------
Ŀ  Ŀ  Ŀ  Ŀ  Ŀ
                                        SYSTEM              
  INPUT      ROOT LOCI    FEEDBACK       DISPLAY      END   
        
      Ŀ  Ŀ   Ŀ  Ŀ      
        TIME       FREQUENCY                                   
         RESPONS     ANALYSIS      MATRIX       OPTIONS        
                   
--------------------------------------------------------------------
                                                
      Ŀ  Ŀ          Ŀ
       GRAPHICS                            Save    
         OPTIONS    GRAPHICS            .DFL files 
                  
      Ŀ  Ŀ   Ŀ
       GRAPHICS  Ĵ  GRAPHICS      Save/Call 
         OPTIONS      OPTIONS    .STE files 
           
------------------------------------------------------------------------
Ŀ   Ŀ
  Call       COMPENSATOR
.DFL files     DESIGN   
   

The program starts in the main menu. In the maim menu the various parts of the
program may be selected either with the keys for the vertical cursor movement
and the <Enter> key or with the key for the bold letter or with the mouse and
the left mouse button. In the same manner you make the selection in the other
menus.

With the function key F6, system data may be changed from all program parts.
The changes concern the location of the poles and zeros, the value of the
coefficients of the denominator- and numerator polynomes, the corner
frequencies or the gain. The order of the transfer function cannot be changed.
After the changes via F6 the program returns to the program part from where
the change was initiated but with the new data.

The function key F8 reinstalls the menu of the subject program part.

The function key F9 selects the next menu item directly. Shift-F9 selects the
former menu item.

The function key F10 brings you back in the main menu.
                                Page 3
                                                               Page 4                                                       

The system parameters are the common data. The three main parts of the
program: TIME RESPONSE, FREQUENCY ANALYSIS and ROOT LOCI each work
independently with the system parameters without changing them (except with
F6).
Transfer from one main part to another main part always goes via the main
menu.

Contents MAIN MENU:
         System Input
         Time response
         Root loci
         Frequency analysis
         System Matrix
         Close control loop
         Display of system / page overview
         Options
              Input K or Kpz ?
              Coord Cart or pol?
              Program Instruc. ?
              Grids in Plots ?
              Print size ?
         End of program - return to DOS   alt-X

SYSTEM INPUT:

With the SYSTEM INPUT menu you may input the system data from the keyboard
or from the data files. Also the system may be enlarged by adding poles and/or
zeros.

Contents SYSTEM INPUT menu:
         Poles and zeros
         PoLynomials
         Corner frequencies
         Data from File
         Append system

Input of systemdata.

The system transfer function can be presented with poles and zeros by

            s       s
           ( - 1)( - 1)....         
            z1      z2                  (s - z1)(s - z2)....
G(s)  =  K   =  Kpz 
            s       s                   (s - p1)(s - p2).... 
           ( - 1)( - 1)....
            p1      p2                                

or by the polynomial form


                                Page 4
                                                               Page 5                                                       
                  3      2
         ......b3s  + b2s  + b1s + b0
G(s)  =  
                  3      2
         ......a3s  + a2s  + a1s + a0            

In the case of system input with poles and zeros, one has to select in
advance via the options menu whether K or Kpz will be input. The default
selection is K.

The location of the poles and zeros in the complex plane is normally input and
shown in Cartesian coordinates. Through the options menu one can opt for polar
coordinates.

Besides system inputs by means of poles and zeros or polynomials, system
inputs may also be made through corner frequencies as is customary with
Bode plots.

Including the driving function, the system can handle a maximum of 8 poles and
8 zeros. Equal complex poles are not allowed. Up to 4 equal real poles are
permitted.

System data can also be input by means of state equations.

The allowable magnitude of the input poles and zeros depends on the order of
the transfer function. For the calculation of the absolute values of complex
variables one needs the square of the real and the imaginary parts. Therefore
the highest power (= the order of the system) of the square of the complex
roots must be smaller than 10 to the power 38. If you use a transfer function
of the order 8, then the absolute value of poles and zeros must be smaller
than 10 to the power 38/16 (237). The real and the imaginary part must then
be smaller than 0.52 times this value (167). If you exceed this limit, it
will result in a runtime error 205.

Data from File:

With this menu item you may read system data from a disk file. These data are
stored through the save function of the 'Display of system/Data overview'
item of the main program (see F2 in that menu-item). The data may be read
from any directory. 


TIME RESPONSE:

In this part of the program the time response of the system is calculated.
The input signal to the system is defined by its poles, zeros and gainfactor.
In case of an analog system, the Z-transform of the sampled system with
zero-order hold may be calculated. This Z-transform may be stored on disk so
that it can be read later to perform further calculations with it.
This Z-transform is correct only when you start with the response on a
unit step.

                                Page 5
                                                               Page 6                                                       
Contents TIME RESPONSE menu:
         Input signal
         Laplace - partial fractions
              or Z-transform - partial fractions
         Time response - Expression
         Time response - Table
         Time response - Plot
         Plot Options
              Store plot
              Fetch plot
              Verticals - discrete
              Change main menu options
                   Program Instruc. ?
                   Grids in Plots ?
                   Print size ?
         Z-transform (analog systems only)


ROOT LOCI:

Breakaway points and root-locus points as a function of the gain factor may be
calculated. The gain factor is considered to be a separate proportional
controller with gain Kc. The root-locus plot is drawn by varying Kc from 0 to
10 000. Above 10 000 Kc is considered to be . The original DC system gain
remains unaltered. Of each root locus 100 steps are calculated. It may occur
that certain root loci are not entirely drawn, because either Kc exceeds
10 000 or the amount of steps is 100.

The graphic display of the root loci can be explored by means of a cursor. The
root-locus plot can be detailed more by reducing the step magnitude through
the options menu. By doing so, there is a fair chance however, that the
complete root-locus plot is not visible anymore as the total number of steps
is limited to 100. The step magnitude should always be smaller than the
smallest distance between any poles and zeros.

The cursor location can be adjusted with the + and - keys of the cursor block
when the cursor is locked onto the root locus. By default the cursor step is
half the step of the root-locus calculation step. The cursor step may be
changed via the options menu. 

A first order lead or lag compensator can be designed with the Compensator
design program. First a dominant pole of the closed loop system, outside the
existing root locus, is chosen. Thereafter a choice can be made between a
desired zero/pole ratio, a desired DC gain and an optimisation towards a
maximum bandwidth. Further details are available in the accompanying help
text.






                                Page 6
                                                               Page 7                                                       
Contents ROOT LOCI menu:
         Breakaway points
         Root locus - Table
         Root locus - Plot
         Root locus plot Options
              Beginning of horizontal scale
              End of horizontal scale
              Step magnitude
              Cursor Adjustment magnitude
              Negative imaginary part of plot
              Maximum gain
              Constant Damping ratio
              Unit circle (discrete systems)
              Change main menu options
                   Program Instruc. ?
                   Grids in Plots ?
                   Print size ?
         Compensator design
              Zero/pole ratio
              DC gain
              Optimise


FREQUENCY ANALYSIS:

In this part of the program the system frequency responses are calculated.
One can automatically determine phase and gain margins.

The 'date line' for the phase is -270,+90. This means that angles greater
than +90 are continued beyond -270 and vice versa.

The calculation of phase and gain margins succeeds only with monotonously
climbing or descending functions. If the phase or gain as function of the
frequency does not comply with this rule, the calculation may not converge.
Non convergence will be mentioned.

Bode plots, Nyquist plots and Nichols plots may be drawn. Where applicable,
these plots can be provided with a M and a N circle of specified value.
Approximation of the amplitude plot by straight lines and corner frequencies
can be shown. The phase plot can also be approximated by straight lines. For
single poles or zeros the straight line lies between 0.1*corner-frequency and
0 and 10*corner-frequency and 90. For complex poles or zeros the straight
line approximation runs from


     -zta{1+0.35(1-zta)}               zta{1+0.35(1-zta)}
 n*10                      and 0 to  n*10                     and 180.


You may add a cursor to the graphs (F4). That cursor can be captured in the
curve (<Enter>). The cursor stays at the same frequency when switching from
one graph to the other. 
                                Page 7
                                                               Page 8                                                       

In case further details, of e.g. a Nyquist plot, are to be shown, the lowest
and/or the highest frequency should be adjusted via the Plot Options menu.

M- and N-circles may be drawn in the polar plot and in the gain-phase graph.

If, in the options menu under 'Nichols chart', you choose M- and N-circles,
the classical Nichols chart with a series of M- and N-circles will be shown,
otherwise a simple gain-phase plot will be shown.

Frequency response plots may me stored on the heap and be retrieved in the
next frequency response graphs. So you may compare systems with and without
compensation networks.

Contents FREQUENCY ANALYSIS menu:
         Frequency response Table
         Single frequency
         Phase margin
         Gain at phase Margin
         Gain margin
         Bode, Nyquist and Nichols Plot
              Magnitude-frequency plot (Bode)
              Phase-frequency plot (Bode)
              Nyquist plot
              GAin - phase plot
              Store plot
              Fetch plot
         Plot Options
              Lowest frequency - rad/s
              Highest frequency - rad/s
              M - Circle
              N - Circle
              Unit circle in polar plot
              Bode plot instruction
              NIchols chart
              Change main menu options
                   Program Instruc. ?
                   Grids in plots ?
                   Print size ?

For instruction purposes you may start Bode plots (frequency-gain and
frequency-phase shift) with empty coordinates. In this way you can show the
asymptotes first and the real curves afterwards.


CLOSE CONTROL LOOP:

When closing the control loop, the system output signal is inverted and fed
back to the input of the system. Part of the gain, poles and zeros can be
relocated from the forward part of the loop to the feedback part of the loop.
By doing so, one can for instance determine the controller output signal.

                                Page 8
                                                               Page 9                                                       
WARNING:

If the gain choice is K, then relocation of poles or zeros to the feedback
part of the loop means relocation of the terms

             s                        s
        (1 - )   respectively   (1 - ).
             p                        z

If the gain choice is Kpz, then the relocated terms are

         (s - p)   respectively   (s - z).

This influences the static gain of the feedback proces.
When poles and zeros of a discrete system are relocated, the controller gain
and the feedback gain are corrected in such a way that all static gains of
the control loop remain as is.

                             
MATRIX:

In this program part system parameters may be input as state variables. The
state equations are shown in the form of matrices. The matrices are defined
for one output and one input of the system. Apart from supplying system data
in the form of state equations, the system data that are already in the
system can be shown as state equations. In that case you have the choice
between the controllable canonical form and the observable canonical form. 

In the matrix menu you input the state data with function key F3.
New and modified state equations are transferred to the main program and the
system data are stored in the form of poles and zeros and of polynomials. The
state equations of an analog system may be transformed to a sampled system
with a zero order hold. You then obtain the Z-transform of the sampled system.

The state equations may be saved on disk. To do so you select the menu item
'System matrices / page overview' and you save the data with F2. When saving,
a filename without extension must be entered. The matrix files automatically
obtain the extension .STE. The saved matrix files are called with the menu
item 'State data from file'.

Under the menu item 'Pole placement' you calculate the feedback vector K that
causes the selected poles of the feedback system. If you have made this
calculation, the calculations of the menu items 'Observer' and 'Reduced
observer' are extended to the calculation of an observer-controller. To be
able to check the robustness of the feedback system with an observer-
controller the program calculates (if possible) the phase and the gain
margins. Furthermore the data of the open loop system are saved on the scratch
pad, so that it is always possible to perform a frequency analysis.




                                Page 9
                                                               Page 10                                                       

Contents MATRIX menu:
         Input system matrices
         System matrices from File
         System matrices / Page overview
              Existing state equations
              Controllable canonical form
              Observable canonical form
              View pages
         Pole placement
         Observer
         Reduced observer
         Z - transform of matrices  (analog systems only)


SYSTEM DISPLAY / PAGE OVERVIEW

In this part of the program all system parameters, both as poles and zeros and
as polynomials are shown. Besides the active data, also past data are stored
and shown. There are 5 pages available for the storage of past data. Those
pages can be shown and made active. Each page has 4 subpages to store system
data in the form of coefficients of state equations. The latter may be shown
under the matrix menu.

With function key F2 you can save system data on disk.

For demonstrations and repeated calculations on the same system it is
recommended to prepare the system data in advance and to store those data on
disk. There is no difference between data read from disk and data input
through the keyboard. Data files may be stored in and read from any directory.

To store or read the data a filename without extension has to be entered. The
files with the transfer functions automatically obtain the extension .DFL.
The matrix files obtain the extension .STE.



Graphics modes supported by SYSAN.EXE.

All graphics modes that are supported by SYSAN.EXE have a horizontal
resolution of either 640 dots or 720 dots. Also the SuperVGA mode with a
resolution of 800 x 600 dots is supported.










                                Page 10
                                                               Page 11                                                       
The supported modes are:
         CGA       640 x 200
         MCGA      640 x 200
         MCGA      640 x 480
         EGA       640 x 200
         EGA       640 x 350
         EGA64     640 x 200
         EGA64     640 x 350
         EGAMono   640 x 350
         IBM5814   640 x 480
         HERCMono  720 x 348
         ATT400    640 x 200
         ATT400    640 x 400
         VGA       640 x 200
         VGA       640 x 350
         VGA       640 x 480
         SVGA      800 x 600
         PC3270    720 x 350

Only one graphics page is used.
It is not possible to automatically select SVGA, IBM8514 or ATT400. There may
also be problems with automatic detection of some other graphics cards. This
problem occurs e.g. with the Tulip DGA system. Therefore it is possible to
override the automatic selection and to choose a particular graphics driver.
This selection is  made with the setup program. The name of the selected
driver is stored in the SYSAN.INI file.

If the selected driver in SYSAN.INI is not equal to the PC video system, the
program will hang or show unreadable output. SYSAN.INI can simply be changed
with the SY_SETUP program. Never change SYSAN.INI with a textediter. 

Monochrome monitors with a grey scale:

In computers with a monochrome monitor and a VGA video card the text mode
colors presented in grey may give an unreadable result. In this case select
monochrome with SY_SETUP.

Graphics prints:

Graphics hardcopies can only be made if you have selected a printer in
SY_SETUP. There is a choice between Epson, IBM-ProPrinter and Hewlett-Packard.
In the case of printers that accept both the Epson and the IBM-ProPrinter
protocoll, Epson is preferred as it has more modes available. 

If you have a printer that can only print via Windows, you may generate *.BMP
files from the graphic plots. There are 4  types possible:
    Win 3.1 mono    : black and white - uncompressed
    Win 3.1 color   : color - uncompressed
    Win 95/98 mono  : black and white - compressed
    Win 95/98 color : color - compressed
These *.BMP files have a white background, and if they are in color, the
colors are adjusted for better readability.
                                Page 11
                                                               Page 12                                                       

The *.BMP files are named SYSAN(number).BMP. The number automatically
succeeds the numbers that are already present. The name is shown during the
generation of the *.BMP file. The *.BMP files are stored in the directory
allocated during setup. This must be an existing directory. So you have first
to make this directory with MD.
                                                       
Contents of the program disk (the demo version has not all these files):

        SYSAN   .EXE    IDENT.FIL 
        ATT     .BGI    STATE.PIC
        CGA     .BGI    16X8 .FON
        EGAVGA  .BGI    14X9X.FON
        IBM8514 .BGI    4X6  .FON
        HERC    .BGI    8X8X .FON
        PC3270  .BGI    6X8  .FON
        NEDERLAN.TXT    24X10.FON
        ENGLISH .TXT      
        DEUTSCH .TXT

        FEEDBHLP.NED     FEEDBHLP.ENG     FEEDBHLP.DEU
        FREQUHLP.NED     FREQUHLP.ENG     FREQHLP .DEU
        INPUTHLP.NED     INPUTHLP.ENG     INPUTHLP.DEU
        LOCUSHLP.NED     LOCUSHLP.ENG     LOCUSHLP.DEU
        MAINHLP .NED     MAINHLP .ENG     MAINHLP .DEU
        MATRXHLP.NED     MATRXHLP.ENG     MATRXHLP.DEU
        OPTIHLP .NED     OPTIHLP .ENG     OPTIHLP .DEU
        SYSTHLP .NED     SYSTHLP .ENG     SYSTHLP .DEU
        TIMEHLP .NED     TIMEHLP .ENG     TIMEHLP .DEU
        ZERO1HLP.NED     ZERO1HLP.ENG     ZERO1HLP.DEU
        ZERO2HLP.NED     ZERO2HLP.ENG     ZERO2HLP.DEU

SETUP   .DOC     Textfile with setup information (in English only)
SY_SETUP.EXE     To select monitor, video card, printertype, language and  
                 directories. Further info in SETUP.DOC.
VERSION .EXE     Determines the version number of the language modules *.TXT.
                 Type VERSION ENGLISH.TXT and you see the version number
                 of ENGLISH.TXT.

The version numbers of SYSAN.EXE, of the language modules, of the ???HLP.*
files and of STATE.PIC must be equal. You determine the version number of
SYSAN.EXE by typing SYSAN version (version with low cases only). VERSION.EXE
determines the version number of the language modules. You can investigate the
version number of STATE.PIC and of the help files with any text editer. These
are ASCII files that start with the version number.

M.J. van den Oever.                             May 30, 1999  





                                Page 12
