English translation
Hybridsysteme: Automatisches Skalieren und statischer Test mit dem hybriden Interpreter HOI; Echtzeitsimulationen
Complete English translation of the original German-language document (34 pages).
Automatic Scaling and Static Test with the Hybrid Operations Interpreter HOI
K. Schwarze
Abstract
In the first three sections, part of the standard software supplied by EAI with hybrid systems — the Hytran Operations Interpreter (HOI) — is described in detail. Using the example of a third-order inhomogeneous ordinary differential equation with non-constant coefficients, the most prominent features of HOI as an interactive hybrid programming language are demonstrated and discussed in the following sections. In this program the static test of the hybrid computing setup is performed automatically as an on-line and off-line check for various initial conditions. It is further shown that HOI is capable of performing automatic scaling of the analog computer program.
The requirements that must be imposed on a programming language from each of these two viewpoints differ considerably. In the first case, where a digital program describes and controls the problem, one is interested in employing a process that permits effective collaboration with the very fast, parallel-oriented analog/hybrid computer through a relatively high execution speed. For most hybrid problems a compiler such as Fortran satisfies this requirement best. The compiler produces a relatively fast-running machine program that is, for the real-time nature of a hybrid problem and the communication over the hybrid interface that comes with it, in most cases fast enough.
By contrast, the software requirements for the control and testing of a hybrid simulation are quite different. In this case, simple handling and flexible intervention capability take precedence over short execution time, since on the one hand, for example, the setting of servo-potentiometers (setting time ~1 s) requires — for mechanical reasons — a relatively long time compared with the overall system, and on the other hand, during program testing, time generally plays no major role.
The optimal solution to both requirements was realized at EAI through the development of the “HYTRAN Operations Interpreter” (HOI). The concept of the language is therefore based on the idea of making possible as convenient a conversational language as possible for the control of hybrid programs, which alongside purely digital functions contains various operating modes and flexible hybrid addressing capabilities in order to automate the testing of the analog program. HOI is the result of years of experience at EAI in the construction and use of analog/hybrid computers and hybrid systems in diverse in-house analog/hybrid computing centers — the result of decades of development of hybrid software.
1. Introduction
When solving a problem on a hybrid system, one can distinguish between two principal categories of work that arise.
First, both the analog and digital sides must be programmed with the various mathematical and logical expressions that describe the problem. For this it is usually necessary to put the given mathematical description — the equations as they exist — into a form suitable for the computer.
As preliminary work, the portion of the hybrid simulation falling on the analog/hybrid computer must be brought into the order of magnitude of the reference voltage of the hybrid computer with respect to amplitude and time — which is generally referred to as amplitude and time normalization or scaling. Simultaneously the programmer can, by reformulating the given equations, bring the problem into a form optimal for the analog computer. This includes, for example, a reformulation aimed at minimizing the number of components.
The next important step is the transfer of the normalized equations into a computer diagram (a computing circuit), which contains the symbols of the computing elements of the analog computer and their interconnections that are required to realize the corresponding mathematical functions.
Once the diagram has been drawn up, the programmer must verify that it actually reproduces the output equations of the problem description in all individual details.
For this purpose all quantities appearing in the differential equations and the associated voltage levels at all nodes of the diagram must be computed for the time point t = 0. Starting from the initial conditions in the computing circuit, all voltages must once again be computed and compared with those derived from the equations in order to test the computing circuit.
The associated computations and comparisons are performed automatically with HOI in the digital test.
To carry out the digital test, the problem description must be put into a form understandable to the digital computer, so that the digital computer can also calculate the problem variables for the time point t = 0. The mathematical and logical instructions of the HOI processor, together with its easy handling in the organization of programs, make it an ideal aid in programming problem descriptions.
Parallel to this, the connections in the analog computer diagram must be brought into a form understandable to the digital computer as components of the different equations. The hybrid addressing capability of the Hytran Operations Interpreter makes it possible for the digital program to perform this preparation in a very simple manner. The algebraic transfer function of each component in the operating mode “initial condition” and “static test” is contained in HOI through various language operating modes. With correct use of these various operating modes of the processor, the problem description can very simply be compared with the computer diagram.
Once the digital test has been carried out without error messages, one can be certain that both the computer diagram and its counterpart in HOI are error-free.
While this digital test is carried out off-line, i.e., independently of the analog/hybrid computer, the same digital program can be used — by simply changing the language operating mode — to test the analog program patched on the analog/hybrid computer (on-line check).
The second essential part of the work involves the control and testing of the hybrid program. Among the arithmetic, algebraic, and logical operations, the overall control of the hybrid simulation is handled. As a second category, a significant portion of the workload falls on the monitoring and testing of the hybrid program.
The demands placed on a programming language from these two viewpoints differ considerably. In the first case, in which a digital program describes and controls the problem, one is interested in employing a process that, through a relatively high execution speed, enables effective collaboration with the very fast, parallel-oriented analog/hybrid computer. For most hybrid problems a compiler such as Fortran meets this requirement best. The compiler produces a relatively fast-running machine program that, for the real-time nature of a hybrid problem and the resulting communication over the hybrid interface, is in most cases fast enough.
2. Characteristics of the HOI Programming Language
To keep the effort of learning HOI as low as possible, the syntax of the language is similar to that of Fortran. By contrast, the following fundamental characteristics of HOI provide substantially simplified handling and increased capability, particularly for control and test functions:
- Programming in dialogue mode,
- Rapid hybrid communication,
- Special operating modes of the language for testing hybrid programs.
Although all these tests can be performed through IF-queries in conjunction with the Fortran compiler, it has nevertheless proved useful — with regard to programming effort and flexibility in application — to integrate these testing capabilities into the HOI processor in software form through the creation of various “language operating modes.”
Every interpreter language offers the possibility of a two-way dialogue with the computer. With HOI the user can now execute both purely digital and hybrid statements directly by entry via the teletype, or can also provide a series of commands of both types with command numbers and store them, in order to execute them subsequently in the sequence of the command numbers after a single entry of an entire command sequence (= program).
An especially noteworthy feature of HOI is, however, the diverse hybrid communication capability. Digital and hybrid components can be addressed in the same way as the memory cells of a purely digital processor. This means that the address of an analog component (e.g., a potentiometer or amplifier) or a hybrid component (e.g., a function relay) can be assigned values in mathematical analog expressions, to which the components are automatically set when the total hybrid system is used. By simply changing the operating mode of the language, the same sub-program can be used for reading out and verifying the components. Software technology and programming technology thus integrate digital and analog/hybrid computers into one processor, HOI.
The special syntax of HOI serving for easy handling and execution of these transfer and control functions is addressed in the example below.
3. Special Operating Modes of the Language for Testing Hybrid Programs
To test the computing program of the analog/hybrid computer a large number of checks are required.
The programmer will first have to deal with the problem description. This generally consists of a number of differential equations and algebraic and logical relationships that define the problem, as well as parameter values and constants that enter the equations in the order of magnitude of the physical quantities. It is therefore assumed here that in the problem description only dimensional equations and no numerical-value equations are used. Since the analog/hybrid computer is a fixed-point machine, the output equations must be normalized or scaled such that each of the normalized variables has a magnitude not exceeding unity.
In parallel with this the programmer can, by reformulating the given equations, bring the problem into a form optimal for the analog computer. This includes, for example, a reformulation aimed at minimizing the number of components.
The next important step is the transfer of the normalized equations into a computer diagram (a computing circuit schema), which contains the symbols of the computing elements of the analog computer and their interconnections that are required to realize the corresponding mathematical functions.
[page: Figure 1 — Schematic of the steps in the creation of an analog computing program]
Once the diagram has been drawn up, the programmer must verify that it actually reproduces the output equations of the problem description in all individual details.
For this purpose, all quantities appearing in the differential equations and the associated voltage levels at all nodes of the diagram must be computed for the time point t = 0. Starting from the initial conditions in the computing circuit, all voltages must once again be computed and compared with those derived from the equations to test the computing circuit.
The associated computations and comparisons are performed automatically with HOI in the digital test.
3.1. Digital Testing of Analog Programs (Off-Line)
One of the most significant functions of HOI consists in the capability of testing an analog program with a digital surrogate.
A hybrid control program requires manifold changes during the execution of a hybrid simulation, in order to ensure correct initialization, repetition of “runs,” or playback control. Facilitating this with the HOI processor is easy. In a stored program, commands can be modified, deleted, but also inserted at any desired location.
The especially noteworthy feature of HOI is, however, the diverse hybrid communication capability. Digital and hybrid components can be addressed in the same way as the memory cells of a purely digital processor. This means that the address of an analog component (e.g., a potentiometer or amplifier) or a hybrid component (e.g., a function relay) can be assigned values in mathematical analog expressions to which the components are automatically set when the total hybrid system is used.
Through simple change of the operating mode of the language the same sub-program can be used for reading out and verifying the components. Software technology and programming technology thus integrate digital and analog/hybrid computers into one processor, HOI.
The special transfer and control functions over the hybrid standard interface EAI-693 can be performed through this aspect of the chosen hybrid communication capability of the language. Beyond that, a series of fixed hard-wired operation instructions permits flexible monitoring of the analog operating modes, the logical operating modes, the time constants of the integrators, etc.
The special syntax of HOI serving for easy handling and execution of these transfer and control functions is addressed in the example below.
3.2. Automatic Setting of Analog Components
After the digital test (off-line check) has been completed — having eliminated the errors that almost always appear in larger programs — the analog computer diagram can be transferred to the hybrid computer by galvanic connection of the corresponding computing components. Here too manifold errors can occur, which are eliminated in the “on-line check.”
First, however, in accordance with the problem description, the values arising from the initial conditions as well as the coefficients and logical conditions must be set. HOI distinguishes here between three functions required for setting the hybrid computer:
a) Computing and setting of servo potentiometers and digital-to-analog multipliers (DAMs), b) Setting of digitally controlled function generators (DCFGs), c) Positioning of function relays.
During the preparation of the digital program for the off-line check, each coefficient was assigned — through a “statement” — a value dependent on the parameters and scaling factors. The on-line computation and setting of potentiometers and DAMs is now achieved automatically by execution of these “statements” in a hybrid language operating mode of HOI.
A typical example of this is the statement:
1C002 = 20 x A/B
Here A and B are parameters defined as part of the problem description. The number 20 may, for example, be the scaling factor for potentiometer 2 (set to 0).
By executing this statement, potentiometer 2 of console 1 is set to the value defined by the right-hand side of the expression. Arithmetic operations in HOI are carried out in floating-point arithmetic with a precision of 6 decimal places throughout.
For the digitally controlled function generators (DCFGs) available from EAI, arbitrary functions can be set by defining the breakpoints and slopes from the digital computer using HOI. Here too HOI proves to be an ideal tool.
To enter quantities conveniently in analog computing circuits in which parameter values change discontinuously as a function of the problem, function relays are used. These must be positioned correctly in accordance with the problem description. While in the EAI-690 system the interface contains a special data channel for driving the first 16 relays, in the other EAI hybrid systems “control lines” are set which in turn correctly position the function relays. Here also HOI is particularly useful for the on-line check of the hybrid computer. By simultaneously setting all relay positions corresponding to the problem, the analog computing program can be tested in all its possible configurations. As will be shown further in the example below, this HOI function can also be used for the automation of analog program runs.
3.3. Digital Testing of the Patched Analog Program
The main function of HOI in the hybrid system is the automated testing of the analog computing program for correct interconnection of the computing elements and their operation in accordance with specifications.
For this purpose the solutions — appearing as voltages on the hybrid computer — are alternately compared with the computing diagram defined in HOI and the output problem equations.
In this way HOI isolates all defective components and wiring errors that occur. It is noteworthy that HOI locates and reports errors at their source, while errors resulting from them — which may originate, for example, from a non-functioning component — are not displayed over the entire program section.
Added to this is that the test program that is required is the same as for the off-line check, except that this time it is executed in a hybrid operating mode of the language.
To be able to properly appreciate the advantages that HOI offers the programmer, one should bear in mind that the complete patching and testing of approximately a 100-amplifier analog program can be completed with HOI in half an hour. With the older manual technique one would need several days for the computer.
Taken as a whole, HOI therefore leads to better and more effective utilization of the system. After registration, the user leaves the machine and can correct errors at the problem board or in the HOI program, while the system remains available to other users. This is a not insignificant step forward in the utilization of modern hybrid systems.
Investigations at customer installations have shown that the typical usage time amounts to less than two hours per problem, so that in eight hours four to five users can work at the system. The rapid setting and testing of programs is particularly advantageous in the academic environment, where the goal is to allow as large a number of students as possible access to the system. In conjunction with an equally HOI-executable automatic program processing and output control, a kind of “batch processing” can be observed in this context, in which each user occupies the system for only 15 to 20 minutes.
3.4. Dynamic Testing of Analog Computing Circuits
In the static test, the amplifiers, comparators, and switches as well as the IC resistor networks of the integrators are checked for their functioning capability — essentially the elements that do not introduce dynamics into the computing circuit. By a relatively minor extension of the program already created for the static test, HOI in the dynamic test (dynamic check) now offers the possibility of also checking the dynamic components (i.e., primarily integration networks and track/store units) for correct operation. Since the first derivatives for the analog static test have already been computed individually, it is in most cases not difficult to integrate them once more by a simple integration algorithm and to determine the dynamic values of the variables.
Although HOI as an interpreter is not particularly fast, a dynamic run of 5 min is willingly accepted — especially for complex circuits — for test purposes, all the more so as only a single dynamic test run is required and the hybrid computer can then carry out thousands of such runs in much shorter time. Here too the interpreter HOI can, by comparison, detect a defective integrator.
For more complex programs with more than 10 integrators, one would have the analog computing circuit perform a defined time span and feed the integrator outputs via track/store units to the digital computer in Ify mode of the interpreter, and compare them with the digitally computed theoretical values. Here again the already-established program sections 22 and 32 in unchanged form can be used. In this way a defective integrator is reliably found.
3.5. Automatic Control of Hybrid Programs
To properly exploit the high computing speed of the hybrid system — so that not every run has to be set up manually and valuable computing time is lost in the process — it is necessary to control hybrid programs automatically. A control program must therefore be written that creates the correct preconditions and conditions for each run, controls in the case of the hybrid problem both the operating modes of the hybrid computer and those of the digital program, and delivers the correct information for automated display and printout (printer) of the solution quantities.
Since the system programmer can never know in advance how many runs he will need when analyzing a problem, he needs a programming language like HOI that enables him to easily program between runs with changed parameters and other problem conditions. If he were to do that in a language such as Fortran, he would have to recompile after every change and would thus be severely constrained at least in terms of time. An interpreter such as HOI is of greatest service here.
In addition to parameter changes and operating mode selection, the routine must also offer the possibility of intervening appropriately in the output and display. Plotter speed, the raising and lowering of the pen, start and stop, as well as the repetition frequency in oscillographic display, but also a line-printer listing and the associated reduction of analog data, must be automatable. HOI can be used very advantageously for the control of this output.
Not to be forgotten here is the easy selective documentation capability with the interpreter, which is particularly appreciated in academic operations. Before leaving the computer, HOI outputs via the available digital peripherals (teletype or line printer) a compilation of the analog results, potentiometer settings, amplifier output values, etc.
Apart from this automatic program processing, HOI contains for the simplification of intermediate temporal intervention in the hybrid program a number of not insignificant aspects. Thus parameter values can, for example, be entered immediately in machine units and the dependent potentiometers automatically set.
Program sections can furthermore be executed individually and automatically through a sequence of runs, with control then returning to the teletype — and thus to the programmer — for input of new parameter values. In this way complex problems where automatic program execution cannot initially be achieved can be analyzed and tested step by step, with the time-consuming manual calculation of values and settings eliminated.
As a by-product, HOI also provides a complete documentation of every intervention in the simulation.
4. Example of a HOI Program
The advantages and capabilities of the hybrid interpreter HOI described in the first three sections are now to be demonstrated with a concrete, relatively straightforward example. The following third-order inhomogeneous ordinary differential equation with non-constant coefficients is given:
t ẟ + 5t ẞ + 4y = ln t … (1)
This equation, arbitrarily taken from the literature, is to be solved on the hybrid computer for various initial conditions.
4.1. Problem Description
With a view to an actual possibility of verifying the computed results, a differential equation was chosen whose general solution is known from the literature. It should not be concealed at this point that the problem statement originally concerned a customer contract, which on the basis of the results wanted to obtain a statement about the accuracy of the system. Accordingly, as far as the hybrid control program is concerned, the task formulation is more complicated than in most otherwise occurring simulations.
The general solution of the above differential equation is:
y = C₁ + C₂/t + C₃ ln t + (1/4)(ln t - 2) … (2)
From this the following derivatives result by differentiation:
y’ = -C₂/t² + C₃(1 - ln t)/t² + (1/4)(ln t - 1)/t … (3)
y” = 2C₂/t³ - C₃[1 + 2(1 - ln t)]/t³ + (1/4)[…]/t² … (4)
(see equation 5 in original) … (5)
4.2. Normalization
If all physical quantities C_n are referred to a normalization value C_m with
C_m > C_n,max
the following results:
(normalized equations 6–10 as in the original) … (6)–(10)
Setting further:
y_m, t_m (normalization of y and t)
and solving the equation for [y_m], one obtains the normalized forms of the derivatives and the equation itself (equations 8–10 in the original).
4.3. Analog Computing Circuit
The analog computer diagram resulting from equation (10) is shown in Figure 2. The example was programmed for the EAI-690 system, which consists of the analog/hybrid computer EAI-680 and the digital computer EAI-640. All normalization quantities appearing in the diagram are computed in a HOI sub-program.
The program is time-normalized by a factor p that can be chosen anew for each run. Since, as already mentioned, the initial conditions for the integrators must first be computed — i.e., the magnitudes and signs are not initially known — the reference voltages are applied to the integrators via function relays, as shown in Figure 3. These are relays that can be controlled over the EAI-693 interface by the supervising HOI program.
The timer circuit chosen is also reproduced in Figure 3. It ensures that the entire time range computed by HOI is reproduced in repetitive mode if the computing time setting XXX for OP is chosen large enough. Comparator 19 provides — by connection with the skip input at the computer — for an operating mode change from OP to IC when
|t| >= t_m.
[page: Figure 2 — Analog computer diagram]
[page: Figure 3 — Application of the computed initial conditions; timer circuit]
4.4. Digital HOI Computing Program for Determining the Initial Conditions
In Figures 4 and 5 the flow chart of the HOI computing program is shown, which serves to determine the initial conditions and maximum values. For comparison, Figure 6 shows the printout of the control part of the corresponding HOI program. The statement numbers have the form:
XX.YYY
where XX designates the program section and YYY the program step. In the first three program steps, only text is printed. The execution character for this is the colon.
Since the HOI operating mode “direct execution mode” is selected — which corresponds to off-line working with the interpreter — in step 1.05 the program sections 12 and 14 are executed (see Figure 8).
In sub-program section 12, the parameters C₁, C₂, C₃, TM, TDEC, and BETA must be entered via the teletype.
TM is here the time up to which one wishes to have the solution quantities computed on the hybrid computer.
In analog computing circuits, the dividers prove to be particularly critical with respect to a useful normalization, since one must always ensure that the result is not greater than 1 in magnitude. The HOI program can check this in a simple way by querying the amplifier outputs.
Program section 11, which is executed immediately after 12, now uses this query capability to determine, starting from T = TM, in time decrements of TDEC, the time point T = TI at which the three dividers 1A013, 1A018, and 1A013 are just barely not overdriven. For this the amplifier outputs must be computed for the time range TI < T < TM, which is achieved in the loop 11.01 to 11.04 by respective execution of program sections 13 and 23.
In program section 13, in addition to Y and its derivatives YP, Y2P, and Y3P, the maximum values of these quantities for TI < T < TM are also calculated, which are needed for the automatic normalization.
If one of the dividers is overdriven, program section 17 is executed in step 11.07. It provides essentially for a compilation and printout of the quantities of interest:
- Start time TI
- End time TM
- Maximum values YM, YPM, Y2PM, Y3PM
- Initial conditions YI, YPI, Y2PI, Y3PI
The correct signs for the reference voltages R1, R2, and R3 resulting from the initial conditions are determined in sub-program 40. After processing section 17, control returns to program step 11.02, where the jump instruction to 11.05 is executed. “END OF TIME SOLUTION” now appears on the teletype, and with that the execution instruction in 1.05, namely 12; is fulfilled.
In program section or sub-program 14, after entry of DEC via the iteration instruction:
14.020 T = TM, DEC, TM3; 15;
— analogous to a DO loop in Fortran — the time T is varied in steps of DEC from TM down to TI, and the corresponding values for Y, YP, Y2P, and Y3P are computed purely digitally for later comparison with the hybrid computer and printed in table form (see Figure 7).
With this, the quantities required for the execution of the static test are known. For each chosen TM, HOI automatically computes a TI that is still permissible for the computing circuit, as well as the initial conditions and maximum values. As will be shown further below, HOI is capable of controlling the hybrid computer such that it works repetitively in exactly this time range and the computing circuit is normalized to the computed maximum values.
[page: Figure 4 — Flow chart]
[page: Figure 5 — Flow chart (continuation)]
[page: Figure 6 — HOI program, control section (listing)]
The following is the content of Figure 6 (HOI program control section listing):
1.010 "LOESUNG DER INHOMOGENEN GEWOEHLICHEN"
1.020 "DIFFERENTIALGLEICHUNG 3. ORDNUNG MIT"
1.021 "NICHT KONSTANTEN KOEFFIZIENTEN AUF DEM"
1.022 "HYBRID RECHNER EAI 680"
1.030 "FUER TI < T < TM": :
1.040 "TIMESOLUTION": 1.040 grx, NA, X;
1.050 N;
1.051 12;14;
1.060 "OFF-LINE CHECK": : :
1.061 T=TI
1.062 17.011; 13; 11.022; 40;
1.063 "T=T1": ;
1.070 "COEF": 21;
1.080 "DERIV": 22;
1.090 "AMPL": 23;
1.100 "POTOUT": 31;
1.110 2;
5.020 N; T=TM, 13; 11.022; 40;
5.030 TI=T; 21; 41;
5.040 ".001,V; "AMPTS,": 21;
5.050 "DERIVS": 22;
5.060 "EQUATION CHECK COMPLETE":
5.070 : : "ANALOG SOLUTION SET-UP": :
5.071 "TI (= T (= TM": :
5.072 N;
5.079 Y1=IC1, Y1I=IC2, Y2P1=IC3, TM=IC4
5.080 eSP, M; eST, M; .003, V;
5.081 "COEF": 21; 40; 41;
5.082 eST, M; .0003, V;
5.083 "COEFCHK": 21; H;
5.084 "POTOUTPUTCHK": 31;
5.085 ePP, M; E;
2.010 .001, V;
2.020 .001, V;
2.030 "DERIVCHK": 32;
2.040 "AMPLCHK": 33;
2.012 "T=T11": :
2.050 N;
2.060 T=T11; 13; 11.022; 40;
2.061 "COEF": 21;
2.062 "DERIV": 22;
2.063 "AMPL": 23;
2.064 "POTOUT": 31;
2.070 .001, V;
2.081 "DERIVCHK": 32;
2.090 "AMPLCHK": 33; "OFF-LINE CHECK COMPLETED": : :
2.100 HALT; : : :
2.110 3;
3.010 680, C;
3.020 "ON-LINE SETUP AND CHECKOUT":
3.030 Gix, NA, X;
3.040 N;
3.041 TI=IC4
3.050 T=TI, 13; 11.022; 40;
3.060 "IS ANALOG COMPUTER ON-LINE?":
3.070 HALT;
3.071 : : "T=T1": :
3.080 1, USE;
3.090 1, C;
3.100 eSP, M; eRU, M;
3.110 "SETPOTS": 21;
3.120 4;
4.010 eST, M;
4.030 .0003, V;
4.040 "COEFCHK": 21;
4.041 H;
4.050 "POTOUTPUTCHK": 31;
4.051 .001, V;
4.060 "AMPL CHK": 33;
4.070 "DERIVCHK": 32;
4.071 :
4.080 N;
4.090 eSP, M;
4.091 : : "T=TM": : "COEF":
4.100 T=TM, 13; 11.022; 40; A1; Z1;
4.110 .001, V;
4.120 .050, V; t; t;
4.129 "POTOUTPCHK": 31;
4.130 "DERIVCHK": 32;
4.131 "AMPLCHK": 33;
4.140 "ON-LINE CHECK COMPLETE":
4.150 HALT; : : ;
4.160 5;
[page: Figure 7 — Teletype listing (program output)]
The content of Figure 7 (teletype listing) shows the following output:
LOESUNG DER INHOMOGENEN GEWOEHLICHEN DIFFERENTIALGLEICHUNG 3. ORDNUNG MIT
NICHT KONSTANTEN KOEFFIZIENTEN AUF DEM ANALOG/HYBRIDRECHNER EAI 680
FUER TI < T < TM
TIMESOLUTION C1=-1 C2=-2 C3=-3 TM=1 TDEC=0.01 BETA=+1
TI=.509995, TM=1.00000
YM=2.50000, YPM=11.1931, Y2PM=67.6617, Y3PM=488.629
YI=.519806, YPI=11.1931, Y2PI=-67.6617, Y3PI=488.629
A013=.261525, A018=1.00001, A052=.069315, A113=-.274269
END OF TIMESOLUTION
DIGITALE BERECHNUNG DER LOESUNGSGROESSEN IN ZEITSCHRITTEN VON DEC FUER:
C1=1.00000, C2=2.00000, C3=3.00000
TM=1.00000, TI=.509995
T=1.0000 Y=2.50000, YP=.750000, Y2P=-4.75000, Y3P=20.7500
T=.900000 Y=2.34371, YP=1.34845, Y2P=-7.44810, Y3P=34.5892
T=.800000 Y=2.21853, YP=2.30270, Y2P=-12.0681, Y3P=60.6850
T=.700000 Y=1.91612, YP=3.88537, Y2P=-20.4593, Y3P=113.693
T=.600000 Y=1.40258, YP=6.65695, Y2P=-36.2911, Y3P=232.290
YM=2.50000, YPM=11.1931, Y2PM=67.6617, Y3PM=488.629
POTOUTPCHK =-.999300 NOT -.999900 IN 31.010
=-.999500 NOT -.999900 IN 31.013
=-.530300 NOT -.530905 IN 31.041
OFF-LINE CHECK
COEF DERIV AMPL POT OUT
DERIVCHK AMPLCHK OFF-LINE CHECK COMPLETE
HALT IN 2.100 -C;
ON LINE SETUP AND CHECKOUT
IS ANALOG COMPUTER ON-LINE?
HALT IN 3.070 sG;
SETPOTS
COEFCHK =.317800 NOT .318167 IN 21.012
=.277400 NOT .277944 IN 21.017
HALT IN 4.041
POTOUTPTNCHK =-.999300 NOT -.999900 IN 31.010
=.530300 NOT .530905 IN 31.041
AMPL CHK DERIVCHK =-.296000 NOT -.294600 IN 32.045
AMPLCHK
ON-LINE CHECK COMPLETE
HALT IN 4.150
ON LINE CHECK AGAINST EQUATIONS
AMTS = -1.00180 NOT -1.00000 IN 23.051
= 1.00190 NOT 1.00000 IN 23.054
= -1.00200 NOT -1.00000 IN 23.083
DDERIVS = -.275900 NOT -.294118 IN 22.045
EQUATION CHECK COMPLETE
ANALOG SOLUTION SET-UP
TI (= T (= TM
T=1.0000
Y=2.50000, YP=.750000, Y2P=-4.75000, Y3P=20.7500
COEF
COEFCHK =.317600 NOT .318167 IN 21.012
=.274500 NOT .277944 IN 21.017
=-.276100 NOT -.276458 IN 21.045
HALT IN 5.084
[page: Figure 8 — HOI program, problem sections (listing)]
The complete set of problem equations in Figure 8 is:
11.010 13; 13;
11.020 (ABS(1A043)>=1)*(ABS(1A018)>=1)*(ABS(1A013)>=1)? U; 11.05.
11.021 TI=T, YMI=YM, YP1I=YPM, Y2MI=Y2PM, Y3MI=Y3PM
11.022 Y1=Y, YP1=YP, Y2PI=Y2P, Y3PI=Y3P
11.030 T=T-TDEC
11.040 11.01.
11.050 "END OF TIMESOLUTION": : :
12.010 C1, C2, C3, TM, TDEC, BETA+1
12.011 YM=0, YPM=0, Y2PM=0, Y3PM=0
12.020 T=TM
12.021 I1;
13.010 "EQUATIONS"
13.020 Y=C1+C2/T+C3*LN(T)+T/4*(LN(T)-2)
13.022 ABS(Y)>YM? YM=ABS(Y)
13.030 YP=C2/T^2+C3*(1-LN(T))/T^2+.25*(LN(T)-1)
13.032 ABS(YP)>YPM? YPM=ABS(YP)
13.040 Y2P=2*C2/T^3-C3*(1+2*(1-LN(T)))/T^3+1/4*[...]
13.042 ABS(Y2P)>Y2PM? Y2PM=ABS(Y2P)
13.050 D=1+2*(1-LN(T))
13.060 A=-6*C2/T^4
13.070 B=C3*(2+3*D)/T^4
13.080 C=1/4/T^2; Y3P=A+B+C.
13.082 ABS(Y3P)>Y3PM? Y3PM=ABS(Y3P)
14.010 "DIGITALE BERECHNUNG DER LOESUNGSGROESSEN":
14.011 "IN ZEITSCHRITTEN VON DEC FUER": : :
14.012 C1, C2, C3; TM, TI; DEC: : :
14.020 T=TM, DEC, TI3; 15;
14.030 YM, YPM, Y2PM, Y3PM: : :
14.040 E;
15.020 T: Y, YP, Y2P, Y3P:
17.010 TI, TM:
17.011 YM=YMI, YPM=YPMI, Y2PM=Y2MI, Y3PM=Y3MI
17.012 40;
17.013 IC1=Y1, IC2=YP1, IC3=Y2P1, IC4=TI
17.020 YM, YPM, Y2PM, Y3PM:
17.030 YI, YPI, Y2PI, Y3PI:
17.040 A013, A018, A052, A113;
21.010 IC010=ABS(Y2PI)/Y2PM
21.011 IC011=5/(BETA*10)
21.012 IC012=Y2PM/(YPM*BETA*10)
21.013 IC013=ABS(YPI)/YPM
21.015 IC015=ABS(YI)/YM
21.017 IC017=YPM/(YM*BETA*10)
21.018 IC018=4*YPM/(Y2PM*BETA*10)
21.040 IC040=TM/TM^2
21.041 IC041=1/TM
21.045 IC045=TI/TM
21.047 IC047=TM/(TM*BETA)
21.080 IC080=1/10*LN(TM)
21.081 IC081=10/(TM^2*Y2PM*BETA)
22.010 IS010=YPI/(Y2PM*BETA*10)
22.012 IS012=Y2P/(YPM*BETA*10)
22.015 IS015=YP/(YM*BETA*10)
22.045 ID045=-1/(TM*BETA)
23.001 D=LN(T/TM)+LN(TM)
23.002 F=(T/TM)^2*10
23.009 1A009=-4*YPM*TM^2*(YP/C+2*Y2PM*YPM*BETA*10)
23.010 1A010=-Y2P/Y2PM
23.012 1A012=YP/YPM
23.013 1A013=4*YPM*TM^2*YP/(C+2*Y2PM*YPM*BETA*10)
23.014 1A014=-4*YP/(Y2PM*BETA*10)
23.015 1A015=Y/YM
23.021 1A021=Y/YM
23.024 1A024=Y2P/Y2PM
23.042 1A042=4*YPM*TM^2*YP/(C+2*Y2PM*YPM*BETA*10)
23.044 1A044=5*Y2P/(Y2PM*BETA*10)
23.045 1A045=T/TM
23.048 1A048=5*Y2P*TM/(T*Y2PM*BETA*10)
23.049 1A049=5*YP*TM/(T*Y2PM*BETA*10)
23.050 1A050=-T/TM
23.051 1A051=-(T^2)/TM^2
23.052 1A052=-LN(T/TM)*10
23.054 1A054=T^2/TM^2
23.080 1A080=LN(T/TM)/10+LN(TM)/10.
23.083 1A083=-(T^2)/TM^2
23.113 1A113=E/F
23.114 1A114=E/F
31.010 1P010=IC010*R1
31.011 1P011=IC011*1A010
31.012 1P012=IC012*1A010
31.013 1P013=IC013*R2
31.015 1P015=IC015*R3
31.017 1P017=IC017*1A012
31.018 1P018=IC018*1A012
31.040 1P040=IC040*1A042
31.041 1P041=IC041*1A048
31.045 1P045=IC045*(-1)
31.047 1P047=IC047*(-1)
31.080 1P080=IC080*(-1)
31.081 1P081=IC081*1A113
32.010 IS010=((1P040+1P041)*10+1P081)/10
32.012 IS012=1P012
32.015 IS015=1P017
32.045 ID045=1P047
33.009 1A009=-(1A009)
33.012 1A012=-(1A015)
33.024 1A024=-(1A010)
33.042 1A042=-(1A013)
33.044 1A044=-(1A014)
33.049 1A049=-(1A048)
33.050 1A050=-(1A015)
33.051 1A051=-(1A054)
33.054 1A054=-(1A083)
33.114 1A114=-(1A113)
40.014 R1=1, Y2PI>0? R1=-1
40.044 R2=1, YPI<0? R2=-1
40.074 R3=1, YI<0? R3=-1
41.010 1K014=1+R1
41.049 1K049=1+R2
41.074 1K074=1+R3
4.5. Digital HOI Test Program (Off-Line Check)
The HOI control program for the execution of the static off-line test begins at 1.061 and ends at 3.1. For execution control the text in quotation marks is printed. As can be seen from the program, the test is carried out for two different time points T1 and TM in order to obtain an additional verification possibility through comparison of the test results.
4.5.1. Problem Description
Program section 13, which was already used in the determination of the start time TI, contains the problem equations. In addition, the logical queries contained in it effect the determination of the maximum values of the solution quantities within the considered time range.
After storage of these maximum values by execution of step 17.011 in step 1.062, the same program section 13 is used in conjunction with step 11.022 to determine the initial conditions for T = TI. Once again, the correct sign is assigned to the reference voltages via program section 40.
4.5.2. Potentiometer Values
The mathematical expressions for the setting of the servo-potentiometers that result from the computer diagram and the scaling equations are contained in the program. Since after execution the values are in memory and available, they can be compared with one another.
These statements show in a striking way the simple hybrid control and addressing capability. The potentiometers are set almost exactly like cells in the digital computer.
The problem values defined by the connection statements are compared with those determined theoretically from the problem equations 22 and 23.
4.5.3. Theoretical Values of the Integrators and Amplifier Outputs
Program sections 22 and 23 compute the normalized values for the sum of the input quantities of the integrators and the output quantity of the amplifiers. Since there is the possibility for the integrators that the sum of the input voltages is greater than one machine unit, in those cases only one-tenth of it is provided, as prescribed. Variables marked with IS XXX are assigned to them. In this way it is ensured that HOI keeps the quantities virtually constant within a machine range for changing parameters and different initial conditions and maximum values, which makes it easy to execute automatic translations.
4.5.4. Analog Computer Diagram
The connections of the component symbols of the computer diagram enter into program sections 31 to 33. Each of these simple statements contains the algebraic transfer function of the individual analog components.
4.5.5. The HOI Control Program for Execution of the Off-Line Check
Although the program sections described in sections 4.5.1 to 4.5.4 can be executed by on-line entry of control statements, it is more effective to write a small control program in HOI. Program sections 1 and 2 carry out the computation and normalization of the initial conditions, maximum values, and — in a digital off-line manner — the check of the analog computer diagram, step by step. The HALT at the end of the check allows a correction opportunity, during which potentiometer 2 at the Potentiometer from the teletype can be set and checked manually. The automatic execution of the check of the analog computer diagram, the required operating mode selection, and text output during execution are thereby performed automatically.
In the off-line check the addresses of the analog components are treated as digital variables to which values are assigned through mathematical expressions (expressions) of other variables. The expressions can in turn contain previously computed variables. After processing of the cos-B-EQ commands, the values are compared with those contained in the protocol that are not within the tolerance. Potentiometers lying outside the tolerance are printed.
The “POTOUTPUT CHECK” follows in 4.05, in which the voltage across the potentiometer slider is compared with that theoretically resulting from the input voltage and potentiometer setting. As already described, the comparison values are not within the tolerance range and are printed out in the protocol.
In the same way HOI checks in 4.06 the transfer function and the programmed interconnection of the amplifiers, and in 4.07 the sum of the input voltages of the integration networks, so that patching errors are always detected. The remaining program steps of program section 4 carry out the same test functions for time point T = TM and verify once more the operability of the potentiometers, but also the faultless switching of the function relays addressed in sub-program 41.
Here too a correction possibility is offered by a halt at 4.15.
4.6. Automatic Scaling, Setting, and Testing of the Analog Computing Program
After the “EQUATION CHECK” in program section 5 is concluded — and it is thereby ensured that no more errors of any kind are present in the analog and digital programs — in 5.071 the analog computer can be set to the operating state required for the time interval TI < T < TM of interest. The initial conditions already computed digitally and stored in cells IC1 to IC4 are reassigned to the corresponding variables in 5.08. Potentiometers and relays are set after correct operating mode selection and compared one last time with the theoretical values. A final correction possibility is offered by the HALT in 5.084, whose success in 5.085 can be monitored by verification of the potentiometer slider voltages. The last statement in 5.09 sets the hybrid computer into repetitive mode, and the solution curves Y through Y3P appear as a steady image optimally normalized on the four-channel oscilloscope. Since the time range and the maximum values to which the individual curves are referenced are already in the protocol, the results can be read off immediately and with maximum accuracy.
4.7. Dynamic Test of the Analog Program
As already described in section 3.4, HOI can also be employed advantageously for the dynamic test. In the present example, where the general solution of the differential equation is given by expressions (2) to (5), the formulation of an integration algorithm is not needed. Instead the possibility exists of directly comparing the solution curves with the digitally computed solution quantities, which are already available in tabular form. Larger deviations would in this case indicate a defective integrator.
For more complex programs with more than 10 integrators, one would have the analog computing circuit run through a defined time span and feed the integrator outputs via track/store units to the digital computer, and in Ify mode of the interpreter compare the integrator outputs with the digitally computed, theoretical values. Here again the already-established program sections 22 and 32 in unchanged form can be used. In this way a defective integrator is reliably found.
4.8. Automatic Execution of the Hybrid Program
In program steps 5.01 to 5.07, the on-line check is perfected to the extent that the faultless operation of the analog computing circuit with the theoretical values defined from the equations in program sections 22 and 23 is verified. The equations contain all scaling values required for amplitude and time normalization in a general form, so that — depending on the choice of TM and BETA — the optimal values determined in the TIMESOLUTION are assigned to them. Program step 5.03 shows that the test need only be carried out for the time point T = TM. If the test produces no error messages, it is ensured that the analog computing circuit correctly describes the normalized problem equations.
5. Outlook
The foregoing has demonstrated that the hybrid interpreter HOI, when solving complex problems and especially in extensive simulations, represents a significant aid for the user of a hybrid system. HOI also makes the most comprehensive and complicated problem transparent and — despite, or indeed precisely because of, the high level of this language — does not forgo the possibility of dialogue with the computer. It is precisely this characteristic, however, that makes the hybrid system so suitable and advantageous for simulation. At the same time the intervention capability so necessary for simulation is not only preserved but simplified and further enhanced by the special capabilities of the language (iteration instructions). There remain then only two points that can be automated:
a) the formulation of the scaled problem equations, b) the manual patching of the program.
Both of these points have already been solved for financially well-equipped users at EAI. A special digital software with program APSE performs the automatic scaling transformation from the physical output equations, and transfers the analog computing circuit — at the most recent EAI-695 hybrid system — via a switching matrix using “automatic patching” to the analog computer.
Selected Application Problems of Hybrid Computers as Examples for Computer Science Education
Dr. Gerhard Schweizer
Problems in the application of the hybrid computer to real-time simulation are examined with examples. The systems to be simulated are described mathematically by differential equations. In practice, real-time simulations generally involve piecewise continuous systems whose quantities change continuously with time.
Continuous systems have hitherto been simulated predominantly on analog computers, which by their operating principle (continuous) and their easily learnable language are well suited for this purpose.
The disadvantages and limitations of the analog computer — above all the often low accuracy and the very large computational expense resulting from the parallel implementation of each computing operation on a separate computing element — lead to the use of digital and hybrid computers for simulation. In real-time simulation, in general only the use of a hybrid computer is sensible, because in the course of execution non-electronic components are to be included, whose connection to the digital computer requires an analog computer as an intermediate stage.
The use of hybrid computers can only succeed if sufficient programming tools are available for their operation and if the possibilities of modeling are sufficiently well known.
Only simulations whose requirements can be met only on hybrid computing systems are considered here. Using this first example, special features of the digital part of the hybrid simulation are shown. Figure 1 shows the problem statement. In the overall simulation a number of subsystems must be considered. Real-time simulation is required because real components — e.g., the flight controller and the human operator at the control station — must be included in the simulation. In hybrid simulation one must pay attention to the greatest possible clarity of the simulation model, in order to ensure good variability and easy interchangeability of program sections. For this reason, in hybrid simulation the total system must be broken down into subsystems and moments, where the coupling forces or other connection conditions must be taken into account. Experience shows that in demanding simulations it is advantageous to model as many subsystems as possible on the digital part.
In the case of the tethered helicopter drone of [reference], the following blocks run through in one simulation cycle. Figure 1 shows the computation cycle from time point (n-1)T to nT:
| Block | Description |
|---|---|
| Block 1 | Data acquisition from the analog-simulated subsystems at (n-1)T |
| Block 2 | Computation of engine forces and moments at time (n-1)T |
| Block 3 | Computation of rotor forces and moments |
| Block 4 | Computation of aerodynamic forces and moments of the fuselage |
| Block 5 | Computation of cable forces |
| Block 6 | Summation of all forces and moments for the motion of the helicopter drone at time nT |
| Block 7 | Motion of the rotor at time nT |
| Block 8 | Motion of the cable at time nT |
| Block 9 | Computation of measured quantities for display at the control station |
| Block 10 | Data acquisition for later evaluation |
| Block 11 | Transfer of data to the analog system parts |
This scheme for the computation sequence shows the temporal order of the digital computing operations and the delineation of the individual principal computation procedures. The formulation of the equations for individual blocks is still open here.
Our specific experience shows that it is often not skillful to present the content of the equations in the form of a block diagram in which each block represents a mathematical operation such as summation, multiplication, etc.
The advantages of the block diagram representation of the differential equation are, compared to other forms:
- An illustrative picture of the problem structure that readily reveals the causal relationships of all physical quantities;
- Blocks that are not easily analytically representable can be easily depicted — for example, discontinuous functions, etc.;
- The representation closely follows the familiar analog computer simulation.
These advantages are offset by disadvantages:
- For complex simulation tasks, the problem is described by complicated mathematical formulations for which a representation as a block diagram in which each block represents an individual arithmetic operation becomes far too elaborate and thus confusing. Examples are three-dimensional coordinate transformations […]
representation as a block diagram is only useful when a simulation language tuned to it is coordinated in such a way that the input and output quantities are connected to one another by means of equality signs and parentheses.
Example: output = operation_type (input_1, input_2, …)
The simulation languages available today are largely not very time-efficient, so that difficulties may arise with real-time simulations.
For large, complex simulation problems it is often most advantageous to work with a subroutine technique, whereby individual system components can be written in machine language or in a problem-oriented language such as Fortran or Algol. It is important that these subroutines can be linked together by a powerful, easy-to-use dispatcher program that handles constant, recurring program sections, such as the operating-mode control of the analog computer.
3. Model Formulation for the Subsystem Cable
Following the general explanations of the last section, the model formulation for the cable subsystem of the problem depicted in Figure 1 is discussed. The cable has three functions. It serves to tether the helicopter drone, to pump fuel up to the turbine, and to transmit electrical signals. In the course of the model-based reproduction, it must be ensured that both the tether point on the drone and the suspension point on the truck move in a temporally unpredictable manner. In view of the forces and moments acting on the drone at the tether point, the primary goal in replicating the cable within the simulation is to determine these forces and moments.
Due to the movable tether and suspension points, solving the cable motion by means of differential equations in a body-fixed coordinate system aligned with the cable direction is impractical. To determine the forces and moments acting at the tether point, both the longitudinal and the transverse oscillations of the cable must be considered.
For the reproduction of the cable, a model according to Figure 2 initially suggests itself. In this approach the cable is divided into partial masses 1 to i_max + 1, which are connected to one another frictionlessly at the joints. The individual partial masses are replaced by point masses connected to the cable path and to one another by springs. Under the assumption that the cable is represented by a massless spring force and the drone mass is large compared to the cable mass, the resulting eigenfrequencies of the longitudinal oscillations are obtained approximately as:
Omega_L = sqrt(c / m)
Omega_m = sqrt(c_F / m_D)
where:
- c = cable stiffness
- m_D = drone mass
- m = total cable mass
Since in reality an approximately rigid cable is present, a high stiffness must be provided.
[page 21: figure only — Figure 2: Cable model with uniformly distributed masses; spring constants C_F, damping constants K_D, spring masses m_1 through m_i_max+1]
[page 22: continuation of text from page 20]
… are not usable in this case.
To establish another suitable model, some physical considerations are made. The inertia forces caused by the mass of the cable have little practical effect on the motion of the drone owing to its comparatively large mass. With the cable deployed to a great length, on the other hand, the forces at the tether point arising from the transverse oscillations of the mass-bearing cable are not negligible for the helicopter control problem. A model for the cable is therefore needed whose mass distribution essentially influences only the translational oscillation.
Figure 3 shows the model used. The cable is replaced by a massless spring of high stiffness C_F2, which connects the drone with the suspension point. The stiffness is set equal to the stiffness of the approximately rigid cable existing in reality. Around this inner cable a sheath is conceived, which is represented in the model by several partial masses. These partial masses, each corresponding to the cable weight divided by the number of individual masses, are connected to one another and to the tether or suspension point by springs of low stiffness whose natural lengths are chosen so that the springs restore the corresponding sections of the outer cable sheath to their initial lengths. To provide damping of the cable, a damper is arranged in parallel with each spring.
The inner massless cable of high stiffness C_F2 slides frictionlessly within the cable sheath.
Through this arrangement it is ensured that, for the restoring force on the helicopter drone in the longitudinal direction as well as for the cable masses during transverse oscillation, the inner cable of high stiffness is essentially the governing element. The cable mass, however, fully affects the forces at the tether point caused by the transverse oscillation.
[page 23: figure only — Figure 3: Cable model with massless inner cable and mass-bearing cable sheath; spring constants: outer springs C_F1, inner spring C_F2; damping constants: outer dampers K_D1, inner dampers K_D2; reference point (i_max + 1)]
Calculation of Cable Forces
The cable forces are calculated in an earth-fixed coordinate system with reference point O. According to Figure 3, the cable length of the i-th partial spring is:
Delta_r_i = r_(i-1) - r_i
From this, the rate of change of the spring length is:
Delta_r_i_dot = v_(i-1) - v_i
and the extension of the i-th spring:
Delta_L_i = |Delta_r_i| - L_0i
For physical reasons Delta_L_i >= 0 must hold. For the rate of change of the extension one obtains:
Delta_L_i_dot = (Delta_r_i / |Delta_r_i|) · (Delta_r_i_dot - L_0i_dot)
A rate of change of the natural length L_0i is possible during the deployment and retrieval of the drone.
The total extension of the continuous inner spring up to partial mass i is:
Delta_L_G,i = sum_{j=1}^{i_max+1} Delta_L_j
The resultant cable tension force in front of the i-th mass element is therefore:
F_S,i = (1/2) * [sum_{j=i}^{i_max+1} (Delta_L_j * C_F2 + Delta_L_j_dot * K_DZ2) + sum_{j=i}^{i_max+1} (Delta_L_j * C_F1 + Delta_L_j_dot * K_D1)]
In vector form the cable tension force can be defined as follows:
F_S,i = (r_(i-1) - r_i) / |r_(i-1) - r_i| * [C_F2 * Delta_L_G,i + K_DZ2 * Delta_L_G,i_dot + sum_{k=i}^{i_max+1} (C_F1 * Delta_L_k + K_D1 * Delta_L_k_dot)] * (Delta_r_i / |Delta_r_i|)
The cable motion results, taking into account wind influences, gravitational acceleration, and the cable forces calculated above:
m_T * r_i_ddot = m_T * g + F_S,i + F_S,i+1 + (1/2) * rho * D * (q_L / L_0) * c_W * |v_i - v_W| * (v_i - v_W)
where g is the gravitational acceleration vector, m_T the partial mass of the cable, rho the air density, D the cable diameter, q_L = m / L_0 the mass per unit length of the cable, c_W the drag coefficient of the cable, and v_W the wind velocity.
4. Hybrid Simulation of a Special Adaptive Control System
4.1
A process is described mathematically by a nonlinear vector differential equation:
x_dot = f[x(t), u(t)]
x(t) is a state vector, u(t) the control vector. In the practice of process control, in particular in aircraft and vehicle guidance, the problem arises that the human operator can use only a limited number of components of the control vector u(t) for anthropotechnical reasons. This can result in unsatisfactory transient behavior of the process f. A satisfactory dynamic behavior can be achieved by means of an adaptive control system.
The requirement is that a base system, described by the state equation:
x_B_dot(t) = f_B[x_B(t), u_B(t)]
shall have the same dynamic behavior as a desired nominal system:
x_N_dot(t) = f_N[x_N(t), u_N(t)]
For the trajectories to be equal, at every point in time:
x_B(t) = x_N(t)
must be satisfied. Therefore the following also holds:
x_B_dot(t) = x_N_dot(t)
At every instant the following must therefore be fulfilled:
f_B[x_B(t), u_B(t)] = f_N[x_N(t), u_N(t)]
The human operator is to have the feeling of operating a nominal system. He will therefore intervene in the base system with his accustomed control vector u_N(t). In order that the above equation is satisfied, u_B(t) is solved for at every point in time. u_B(t) is the modified input resulting from the operator-supplied control signal u_N(t), which enforces the desired dynamic behavior.
The unique solution for u_B(t) requires that the system be totally controllable. Physically, base system and nominal system are identical. x_N(t) is a subset of solutions of x_B(t). The required solution for a control vector u_B(t) is therefore always possible.
In a real-time simulation the physical system must be simulated and the above nonlinear system of equations must be solved numerically for u_B(t) at every instant. In addition, a control station adapted to reality must be available, through which the human operator can intervene via the control vector u_N(t).
One task in hybrid simulation is, among others, to develop a suitable algorithm for solving a nonlinear system of equations in real time. Two investigated solution methods are discussed.
First Method — Linearized (Taylor Series) Approach
In the first case it is assumed that the base system and nominal system coincide at time t_0:
x_B(t_0) = x_N(t_0), x_B_dot(t_0) = x_N_dot(t_0) = x_dot(t_0)
In the neighborhood of x(t_0) the vector functions f_B and f_N are expanded in the first terms of a Taylor series to give:
f_B(x_0, u_B0) + (df_B/dx)|_0 * dx + (df_B/du)|_0 * du_B = f_N(x_0, u_N0) + (df_N/dx)|_0 * dx + (df_N/du)|_0 * du_N
The requirement is that the relations hold not only at t_0 but also in the neighborhood t_0 + Delta_t for the state x_0 + Delta_x. Therefore, in addition to:
f_B(x_0, u_B0) = f_N(x_0, u_N0)
the following must also hold:
(df_B/dx)|_0 * Delta_x + (df_B/du)|_0 * Delta_u_B = (df_N/dx)|_0 * Delta_x + (df_N/du)|_0 * Delta_u_N
Solution for the Control Increment
One can solve for the increment Delta_u_B of the control vector to obtain:
Delta_u_B = (df_B/du)|_0^{-1} * [(df_N/dx)|_0 - (df_B/dx)|_0] * Delta_x + (df_B/du)|_0^{-1} * (df_N/du)|_0 * Delta_u_N
This solution is also obtained in the attempt to solve the nonlinear system of equations via its associated differential equation using a difference method. The differential equation reads:
d(Delta_u_B)/dt = (df_B/du)^{-1} * [(df_N/dx) - (df_B/dx)] * (dx/dt) + (df_B/du)^{-1} * (df_N/du) * (d(Delta_u_N)/dt)
and after solving the associated difference equation:
Delta_u_B(t_{n+1}) = (df_B/du)^{-1}|_{t_n} * {[(df_N/dx) - (df_B/dx)] * Delta_x(t_n) + (df_N/du) * Delta_u_N(t_n)}
Second Method — Newton Iteration
In the second case the control vector u_B(t) is computed iteratively and directly from the nonlinear system of equations using the Newton method. Writing:
P[x(t), u_B(t), u_N(t)] = f_B[x(t), u_B(t)] - f_N[x(t), u_N(t)] = 0
The Newton method yields the iteration formula:
u_B^{k+1}(t_n) = u_B^k(t_n) - (dP/du_B)|_{x(t_n)} * P[x(t_n), u_B^k(t_n), u_N(t_n)]
Since f_N does not depend on u_B, it follows that:
dP/du_B = df_B/du_B
One thus obtains the iteration equation.
At small sampling intervals, the computed value u_B0(t_n) can be used as the initial approximation for the iterative solution at time t_{n+1}.
When multiple iterations are required, a modified procedure is recommended to save computation time. Since the inversion and determination of the matrix df_B/du_B consumes the most computation time, it is calculated only for the initial approximation u_B0(t) and reused for all subsequent iterations:
u_B^{k+1}(t_n) = u_B^k(t_n) - (df_B/du_B)^{-1}|_{t_n} * P[x(t_n), u_B^k(t_n), u_N(t_n)]
This reduces the computational effort for the iterations following the first approximation step to the repeated evaluation of the vector P, a vector addition, and the multiplication of a vector by a matrix.
The method was investigated using an aircraft control problem. Figure 4 shows the influence of the sampling time.
5. Concluding Remarks
Hybrid real-time simulation is of great practical importance. The examples discussed show that, owing to the real-time requirements, thorough physical and numerical-mathematical knowledge is required for model formulation. Beyond this, however, engineering improvisation will remain indispensable in model formulation for a long time to come. It is to be hoped that, through ongoing engagement with real-time simulation, a sufficiently secure body of knowledge will be accumulated over time to make the proportion of improvisation ever smaller.
Figure 1 caption: SUBDIVISION OF THE ENTIRE FLIGHT-BODY SYSTEM INTO SUBSYSTEMS
- Subsystem TI: Drone; partial system T1
- Subsystem TII: Tether cable
- Subsystem TIII: Part of the load truck
- Lenkstand = Control station; Lastwagen = Truck
Figure 2 caption: CABLE MODEL WITH UNIFORMLY DISTRIBUTED MASSES
- Spring constants C_F
- Damping constants K_D
- Spring masses m_1 through m_i_max+1
Figure 3 caption: CABLE MODEL WITH MASSLESS INNER CABLE AND MASS-BEARING CABLE SHEATH
- Spring constants: outer springs C_F1, inner spring C_F2
- Damping constants: outer dampers K_D1, inner dampers K_D2
- Reference point: (i_max + 1)
Figure 4 caption: Influence of sampling time on stability
- Axes: ordinate — magnitude (normalized); abscissa — time (s)
- Curves shown for T_S = 250 ms and T_S = 45 ms