Cnpyrighl © [FA C Sil111 daliol1 of' Control Systems. Vi e nna. Austria.
J ~IH()
DESIGN AND APPLICATION OF THE PORTABLE SIMULATOR PSI E. Hasenjager, R. Hermann and M. Kohne I l/.Ililllll' of .\I n//{/lIin 0111/ COlllm/ fllgilll'lTillg. Cll ii'l'I"silr / joll/· f)o// ill:·.)lr. 9. D·591J1J Sil'gl'lI. FR(;
of'
Sil'gl'lI.
Abstract. Digital simulation is an effective and impor tant tool for the stages of design, test and operation of multivariable control systems. The common block-oriented simulation languages are only partially qual ified for these purposes on account of their great demand of memory and calculation time. Therefore, a digital simulation system has been developed, which is based on a capable PC and macro assembler programming. T~is Portable Simulator PSI is reasonable in pric e, modular structured and very user-friendly, since it has a dialogue in menu technique, graphic display of simulation results and a modular program library. PSI is well qualified for the simulation of control engineering probl ems during the trial runs of controlled sys t ems in indu strial plants, because simulation of linear or nonlinear dynamic systems with complex structures as well as interactive optimization and adjustment of controller parameters can be ac h ieved. The application of PSI is demonstrated by two examples. Keywords. Digital simulation of dynamic systems, simulation hardware and software , control engineering computer application, multivariable optimal control systems, parameter optimization, simulation of vibrating systems and radio telescopes.
INTRODUCTION The a pplication of "c" renders possible modular struct ure of the simulation system . This includes the calling up of standard plant models and control loop elements from a library, the simulation with actual parameter s and the gra phi ca l presentation of the simulation results on the monitor . The contents of the scope can be given ou t by the pin writer (hard-copy o ption ).
Simula ti on is one o f the most powerful tools available to control engineers f or the design and operation of multivariable dynamic systems with complex structures. Common block- oriented simulation language s like CSMP or TUTSIM allow the user to experiment with modeled or proposed control systems. However, these simulation packages have a great demand on memory and calcu lati on time. They usually need microcomputers of medium size ( the PDP 11 family, for example), which are often locally fixed units [ 3,4 ) .
The pr ogramming of the mathematical model (given as transfer function or in state s pace form) i s done only once, since the structure of the model (and the system to be simulated) is assumed t o be constant . Only the parameters of the model need to be varied during the simula ti on pr ocess. Therefore, the present paramet ers are considered to be variab le and they can be combined with initial conditio ns and other parameters to different data sets.
Especially for the stages of testing and implementation of control concepts in industr i al plants, small portab le simulation systems are required, which are reasonable in price and size but effi cient in simulat ion ca pacit y. These motivations
caused the development of the digital Portable Simulator PSI for control engineering applications .
PSI distinguishe s between five types of data sets, which are summarized in the following table:
The aim of this paper is to explain the concept and the modular structure of PSI, to demonstrate the abilities and advantages of PSI (compared with the above men ti oned block-oriented simulation languages) and to show the user - friendly applicati on by few examples of optima l controller design problems.
TYPES OF DATA SETS 1. Structure parameters (Parameters of the mathematical model) 2 . Initial conditions 3. Simulation parameters
CONCEPT OF PSI
4. Restrictions/Optimization parameters
Hardware components of PSI are the single board computer SAM 68 K (on the basis of Motorola NC 68 000) , two disk drives, a graphic monitor and a pin writer (Fig. 1). The softwa r e consists of the operating system CP/M 68 K and the programming language "C". This language offers essential advantages with regard to calculation time and memory demand if it is compared with programmin g in FORTRAN or PASCAL as well as simulation with block - oriented languages like CSMP or TUTSIM (3).
S. Graphic parameters Within these five types of data sets any combina tion with a special data set name can be created and used for simulation runs. This i s symbolically shown in Fig . 2 . The single disadvantage of this conce pt seems t o be, that the user has to program the structure of the model in "C". However, this pr oblem can be
389
~9()
E. H ascnjiiger. R. HCl'lllann and :-'1. Kijhnc
solved, if a preprocessor is applied, which allows the programming of the model structure in command language, which will be available in the near future. Therefore, in the final version of PSI the user does not need knowledges of the programming languages
liCIT
4.5 Graphic parameters 4.6 Complete documentation 4.7 Hardcopy
and macro assembler.
4.8 Hardcopy on disk
MENU CONTROLLED DATA SET GENERATION The simulation of a system with fixed structure but different data sets is controlled by a menutechnique. Starting the program PSI the following main menu appears on the monitor:
4.9 Back to the main menu Each subfunction offers the possibility of detailed documentation of parameters, initial conditions, simulation results etc. Due to the menu-technique,
the whole program PSI is rather user-friendly. The concept is summarized in Fig.3.
MAIN MENU OF THE PORTABLE SIMULATOR I. Input
APPLICATION OF PSI
2. Choice of data sets
Modular structure of PSI
3 . Start of c omputation
The modular structure of the simulation program PSI is shown in Fig.4. Few examples of applica tion are indicated, which include parabolic antennas, ground transportation systems and sewage treatment plants. The structure of the associated models have to be programmed in "e" or in a higher language, if the preprocessor is used.
4. Output
5. End The user has the possibility to activate the displayed five functions, which are explained in the following sections. The first function "Input" offers the possibility to compose necessary data sets from the five
different types of data or to change parameters in these data sets. After calling the function "Input" in the main menu, the following submenu appears on the scope. This submenu I renders actual data sets. SUBMENU INPUT I.
However, the structure very often can be combined from elementary subsystems, which on their part consist of basic operations. These basic operations are written in macro assembler or "c " and they are available in a program library. Thus the whole structure can be composed of elements like file cards (Fig.4).
Simulation is performed by linkage of the fixed structure of each example with the chosen data sets. This is symbolically schown in Fig.5. The frame of this linkage is programmed in "C".
Input Simulation examp l es
I . I Structure parameters
1.5 Graphic parameters
The application of PS! will be demonstrated by two examples of dynamic system simulation and optimal controller design. The first one is a vibration control problem, where a controller with time delay T has to be c onsidered during the optimization p?ocess. The second example is a radio telescope system, which inc l udes nonlinear effects like friction and back-lash [ I J.
1.6 Monitor masks
Example I: Vibration control system
1.7 Back to the main menu
The structure of the second order vibration system, which has to be simulated, is determined by the signal flow graph of Fig.6. This structure consists of the state equat ion (I), the feedback control law (2) with time delay T and the quadratic per formance index (3): 0
1.2 Initial conditions 1.3 Simulation parameters 1.4 Restrictions / Optimization parameters
wit ;, the second function "Choice of Data Sets" those data sets are defined, which shall be used during the following simulation. The third function "Start of Computation" has the task to start the simulation with the chosen parameters of function 2 and to show the results numerically or graphically on the monitor.
of simulation results can be performed by choice of the user. Calling this function, the following suhmenu 4 appears on the monitor:
i -a
SUBMENU OUTPUT 4.
Output
4. I Structure parameter 4.2 Initial conditions 4.3 Simulation parameters 4.4 Restrictions / Optimization parameters
I
-a i
2·
u(t-T 0)'
uT(t) ICu ) T
;
x(t) + I
With function 4 lIoutput" a suitable documentation
I
0
~(t)
=
u(t)
=
0 I' ' u ( t), x(O) T b,
-+
( I)
(2)
< k , k h(t) l 2
.- : q Ix'l (t) +Q2 x Z(t) +ur(tl : dt 0
x
-0
:':in.
(3)
The simulation parameters are chosen and arranged as explained in the submenu "Input".
Structure parameters: -2 39.46 s l controller: kl O. I, k2 time delay: Os < T < 0.2s plant:
a
0
a
2
0, b
(4 )
(5) (6 )
Desi)!;1l alld .-\pplicatioll of' the Portahle Simu lator PS l Initia l conditions : displacement
xl(O)
velocity
x (0) 2
m,
o
(7)
m/s
Simulation paramet ers :
start of the simulation t end of the simulation
0
t
e .2.t
integration sLe p width
Os ,
(8)
25,
0.02s
:\9 1
Only few s imulation r e sults are pr esented in Fig.8, where the antenna position ~A(angle) is simulated as response to a reference position ste p of 0.00047 rad (Fig.8a) and to a wind load step (Fig . 8c). If the s t iffness of the gear is assumed to be smaller ( -1 7 . 5%) than the design parameter, the co ntr o ller paramet ers have to be adapted by an o ptimizati on process as shown in Fig.8 b and 8d. Since this is a typi cal situation during a test stage of con trollers in industrial plants, this example demon st r ates the advantage of the application of a portable simulator as proposed in this paper.
Restr ictio ns/Optimization parameters : CONCLUSIONS
(9)
weighting factors q I = 10 ', q2 = 10'
The application of the optimization program EXTREM demand s several other parameters, which
&re not
explained in this paper. See the book of Jacob [ 2 J for details. Graphic parameters:
The gra phi c parameters are related to the choice of the x-axis and the y-axis of plots, the largest and the smallest values of simulation variables, which are necessary for a suitable display and the final documentation of the simulation results.
The developed digital simulation system is an a pplication-oriented sof twa re system desi gne d to assist control engineers to mathematically model and analyse the dynamic behavior of conti nuous control sys t ems described by diff e r ential equations or t ransfer functions. PSI has been pr ove n to be a valuable tool for simulation of multivariable con tro l systems with fixed structures and variable parameters . The main pr operties of PSI are - equation - oriented simulation ,
- us er -friendly conce pt, - modular structure with
All defined parameters can be varied after each simulation run. In tile considered exam pl e , only
the time delay is varied. The parameters kl and k2 of the feedback law (2) are obtained by a direct op timization method 2 ' . Th e actual values of these
macro assembler substructures ,
- clear definiti on and doc umentati on ,
- comfortable graphic documentation o f simulation results.
parameters are c hose n during the optimizatio!l .
Fig.7 sho ws the influence of th e time delay on the displa cement (Fig.7b) and on the velocity (Fig.7d) . The results are comparable with those of Figures 7a and 7c, where the time delay is assumed to be zero . The simulation sta rt s with the initial set (5) of feedback parameter s , whi ch produces the slightly damp ed results. The additional curves demonstrate the influence of th e last tw o o pt imi zation steps . The minimal value of the performan ce index (3) is a l so documented. Th e fOllowing table summarizes the results of both simulation and
The user does not need kn owle dge or the programming language " c" or the macro assembler language if the propos ed prepro cesso r is applied . Th e im plement ed optimization program EXTREM allows the combination of simu lation and optimal cont roller design . This has been demonstrated by two examples. REFERENCES [ I J Hasenjager, E. (1985) : Digital state control of parabolic antennas with consideration of non-lineariti es (Tn German) .
optimization:
VDI-Verlag, Dilsseldorf . Va r ied time delay (dead time)
Parameter
T
0
= Os
T
0
= O. Is
T
0
= 0 . 2s
0 . 83
- 18 . 47
- 19 . 52
8 . 91
4.56
-0.32
560
802
4420
[ 2 J Jacob, H.G. (1982) : Computer aided optimization of static and dynamic systems (In German) . Springer-Verlag, Berlin. [ 3 J Me erma n, J.W. (1981): Bond Graph Modeling Te chni que s . TUTSIM, Software for the simulation of con tinu ous dynamic systems
on small and very small com puter systems . Int. Journal of Modelling & Simulation, Vol. I, No. I, pp . 52-56.
Example 2: Antenna control sys te m The dynamic behavior of parabolic antennas or radio telescopes can be described by a set of nonlinear state equa ti ons, which may be reduced in order by model reduction methods . A common reduced order model considers two motor positions ~ I and ~2' the antenna positi on :A and t heir der iva tives (veloci ties) as state variables . The controller may be of cascade type or of state feedback type . Th e con trol concept considers non-linearities like gear fric t ion and backlash in both cases ~ I J.
~4 J
Pratt, Ch . A. (1984): Catalog of simulation softw are . Simulation , Vol . 43, Oct .84, pp.180-192.
The struc ture of common t elesco pes is implemented in the " C" - library. This struc t ure inclu des the controller and a performance index simi l ar to equations (2) and (3) . Howeve r, du e to t he high er dimension, 16 parameters of the plan t and 6 co nt roller parameters have to be specified. Details are neglected in this paper. They will be demon strated by a video film du r ing the o ral p resenta ti on of this paper. ~
Componen t s of the Portable Simula t o r PSI
392
E. Hase nj iige r , R. H e rm a nn and M. Ko hn e
5
3
Q
Z
Q
Q
b
4 Q AlJX3
'I
b
b
d
d
C
kl
'I
DATA SET
~
Symbolic outline of the data set generation and the operation of PSI
I+-1,/""""""'--
r
Graphic Simulation
I Optimization Structure parameters
1
Initial conditions
L....-
Data ~
Structure ~
St r uc t u r e of the vibration cont r ol system (plan t , fee dback l aw , performance i nde x )
Schematical outline of the a p plication of PSI
GENE Il AT ION OF DATA SETS
CHOIC E OF DATA SETS
~
EXECUTI ON
DOCUM ENTATI ON
OF SIMULATI ON
OF RESULTS
Menu-technique of PSI
I
IS[ IJ.' AG E PLANT l
USEIl EXM1PLES
VEHfCLE
I--
I-I--
I
I· ELEMENTAIlY SYSTE ."IS
, \'IIlRATIO:--: SYS TE\l
I
DRI\'l~G SYSTEM
1 BACKLASH
-
Jt..:\if>
TI.\lE LAG
f-
BAS IC OPEH An ONS
~
Mod u la r s tr uc t ure o f PSI
393
Design and Application of th e Portable Simu la tor 1'51
10 . 0
displacement
\.
~
To • 0.0 se-( (
-10.0
/
1\ " 1'-.....
\ \ \
7 l
\ \
J
\
To • O. I sec
\
(
1\"'-- --- t:i
\
- 10 . 0
Te
="
\ \
1\
'\
/\
/'
-
\1/\".J
U
\J
I
)
0.0 2.0
0.0 0 .00030
!
(b)
0.4
0.8
1.2
I
I
I
\
\\
1 \1
\ 1\
f\
'\
0 .0
\ I \/
/ fJ
\ / '""',----
~",
'-..f-----
\ ./
(c)
-0 .00030 2.0 0.0
1.0
velocity
r-
I 1--/
~rL 1---)
0.4
0.8
1.2
1. 6
2.0
0 . 00030.------,------r ------ ,------,------.
1
/"
\
/"'
1 \1
\ 1\
\
V
\
\
o. 0 +--"",---1 JL....---\----i
/ (d)
(d) 0.0
2.0
1.6
/'
\
I
rv
2.0
I
11
To • 0.11 sec
~
1.6
(c)
0.0
- 10 . 0
1.2
,r\\~II~ r/\\
I
0 . 0 scc.
1-7
10.0
0.0
0.8
rJ
1.0
1 /" Pt
n.o
0.4
-;
/"
-10.0
I
T
1
0.0 0.00075
/
\
velocity
(a)
\'
1\ )
(b)
n.o 10.0
\1
t-- 1-_
I1
)
0.0
\
I
\
tJ
\
/
'\
I
[\
\1
V f\
11
2.0
l~ ~. 0.0
( \ 1/
1.0
displacement
!\
f\
/ /
1\
1\.)
(a)
\
I1
\
O.D 10 . 0
(
I1 \
l\
0.0
0.00075
[\
1.0
- 0 ' 00030 -'--____-.L____---1______-L..____-1._ _ _--..l 1.6 2.0 1. 2 0.4 0.8 0.0 2.0
t ime / sec Simulation and optimization of the vibration cont r ol system (ex amp le I) . (a) Displacement in the case T • Os and 0 (b) in the case To • O. Is Cc) Velocity in the case T0 • Os and Cd) in the case To·O.ls
ti me ~_~
sec
Simulation and optimization of the telescope control system (example 2). (a) Reference position step and (b) Parameter optimiza tion process
(cl Compensation of a wind load step and (d) Parameter op t imizatio n process