SENSITIVITY CO EFFI CIE NTS FOR THE CORRE CTI ON OF QUANTI ZATI ON ERRO RS I N HYBR I D c ~ m p U TE R SYS TE mS J. Vidal,
W. J. Karplu s , a nd G. Ka ludjian
Depart ment of Engineering, Univer s it y o f California Los Angeles, U. S . A.
Introduction One of the more impressive recent d e vel o pments in the comput e r area has been the emergence and increasing ac c e p tan c e o f hyb rid c om puter systems involving closed-loop interc o nnections of a nal o g a nd d i git a l hardware. These s ystems have found appli c ation in suc h d iver s e areas a s pr ocess control, manned space fli ghts, satellite in s trument a ti on, and many others. The schematic diagram shown in Fig. 1 can be c on s idered typical of such hybrid systems though in pl a ce of the di gital and analog computers, speCial purpose devices or a ctu a l sy ste m components m~y occur in specific applications. The optimiz a tion of the operation of such systems involves a detailed examination and compensation of a variety o f error sources inherent in hy b rid computations. These include, among others, sampling errors, time-delay errors, slewing errors and q uantization errors. It is the objective of t h is paper to point out the appli c ation of the sensitivity anal ysis technique to the c ompensation of quantization errors.
Quantization errors arise when it is necessar y to convert a continuous analog variable into a digital code usin g a limited number of significant figures. This opsration is of course necessary in the performance of analog-digital conversion, and quantization errors become significant when it becomes impractical or uneconomical to employ a sufficiently large number of bits in characterizing the continuous input. most currently used analog-digital converters operate b y succesive comparisons of the analog input with each of the bit positions in the digital output register. The conversion time is therefore d irectly proportional to the number of bits. Where high conversion rates are desired, possibly to permit the processing of analog signals with large bandwidths, it is necesoary to limit the size of the digital register and hence to accept an appreciable quantization error. Various aspects of the quantization problem have been analyzed by a number of authors
/1,2,3,4,5,6,7/. - 197 -
The effect of quantization errors upon the overall operation of the hybrid loop depends to a large extent upon the specific application, in particular whether the hybrid system is analog-oriented or digital-
oriented;
that is, whether the data in the analog or in the digital
section are of paramount importance.
The technique described in this
paper applies to a relatively large class of hybrid systems in which sets of ordinary differential equations are solved simultaneously on thE analog and digital
computer portions of the hybrid system.
Such a sit-
uation arises, for example, if some equations have to be integrateo over time intervals and with accuracies outside the range of analog equipment while the solutions of other equations have harmonic components too rapi The technique will be described
to be handled by digital computers.
first with reference to two ordi nary differential equations in rather general form.
Then the application of the method will be illustrated
using two specific simple equations as examples. Consider the two equations. F (y P, ••• ,y r
1 1
,
y
D
; t)
G(x , ••• , x , x ; t) yP
where
~ dt P
and
x
f (x, t)
( a)
g( y , t)
( b)
(1)
D
r
drx dt r
The first of these equations is to be solved on the analog computer of the hybrid system while the second equation is to be solved on the digital computer.
Information regarding the co u pling terms f(x,t) and
g(y,t ) is transferred across the analog-digital interface only at discretely spaced sampling instants.
The total computer run can there-
fore be divided into cycle s , each cycle corresponding to one sampling interval.
Denote the Dth cycle as starting at sampling instant nAt and
ending at (n+l)At, where CH is the sampling interval. puting cycle,
During any c om-
the information suppl i ed by either one of the computers
to the other is h eld constant through o ut the entire sampling interval until it is
up~atea
at the next sampling instant.
The outputs of both
computers are therefore in the furm ef s tairca s e functions.
Hence,
during the nth computing cycle , the e qua tions actually solved are: (a)
(2 )
- 198-
where Yn and Xn are the values supplied respectively by ths analog computer and the digital computer at time t = n~t and maintained constant throughout the entire nth cycle. It is the variabls Yn which is applied to the analog-digital converter and which is quantized. That the operation of quantization is a non-linear process can be seen by reference to Fig. 2. The relationship between the output Y of the analog computer, and the output of the quantizer quantization error ~Y Y· -
Y·
v.
is shown in Fig. 2a.
Fig. 2b shows the
Sensitivity Analysis The sensitivity coefficient of the variable x(t,~o) with respe c t to a parameter A is given by its partial derivative with respect to that parameter, .1.lL a~' A knowledge of the sensitivity coefficient permits the determination of the variable x, when the parameter A is varied from Ao to ' \ by the amount ~,,:
As demonstrated by meissinger
/8/, the sensitivity coefficient of the
solution of a differential equation due to the perturbation of a parameter is in turn the solution of another equation, known as the sensitivity equation, and derived from the original one by simple differentiation with respect to that parameter. For example, if the differential equation to be solved is: x
r-l
where each parameter is independent of the other, the corresponding sensitivity equation with respect to).k will be: -
x
k
(4)
where ~= !~ is the sensitivity coefficient of x with respect to ~k and with quiescent initial conditions, provided that none of the initial conditions of the original differential equation are function of the parameters. As pointed out above, the quantization in the analog-digital converter introduces a perturbation in
- 199-
Y which
gives rise to an erroneous
solution of the equation solved by the digital computer.
Since
V can
be
considered as a parameter as far as the digital computation is concerned the sensitivity coefficient technique can be implemented to correct this error. more specifically, the output i of the digital computer is corrected at each step to take int o account the error introduced by the quantization of the analog variable, V, which serves as an input to the digital computer. In this manner the analo~ portion of the system is kept free from the accumulation of quantization errors. Let
xl
be the solution of equation (2b)(which is solved on the
digital computer) when the latter uses the quantized variable
y"
in its
forcing function. The solution provided by the digital computer during the nth cycle is related to the correct solution by: ( 5)
where _ ~ ay (t,Y n ) = vn+ 1 is the _ sensitivity coefficient of x with _ respect to Y for the ~th cycle, and bY n is the quantization error in Y for the same cycle.
Consequently, the correction of the parstep digital computer
solution can be accomplished at the end of the nth cycle according to: bY
( 6)
n
where the term (-vn+1AY n ) represents the required correction. is the solution of equation: g (Y)
nbt
the sensitivity coefficient of x with respect to solution of the sensitivity equation: g
Since x
for n = 1,2,3, ••• (7)
Y,
that is v=~ is the 7lY
(Y)J (8 )
= H(Y)
i . e. ,
'H
with zero initial conditions.
The correction of the perstep digital
computer solution requires therefore a knowledge of the corresponding perstep sensitivity coefficient, together with the perstep quantization error.
It'should be noted parenthetically, that if in addition to the
variable x, the first and higher derivatives of x are to be used in the
- 200-
analo g computations, corrections similar to equation (6) must be carried out separately for each coupled term.
mechanization of the Correction Technique A number of different methods for the compensation of quantization errors have been investigated in the laboratory. The technique described below has been found to be most advantageous in economizing linkage equipment and in providing accurate anelog solutions even where gross quantization errors are introduced. Furthermors, no correction tasks are assigned t o the digital computer, so that the solution rate obtainable by the digital computer is not adversely affected. Specifically, equation (7) is solved on the digital computer using a suitable integration formula, for example by the Runge-Kutta method. The result of each computation step is employed as the initial condition for the next time increment without prior correction. The sensitivity equation (8) is solved continuously on the analog computer, the result of one cycle being used in the computation of the sensitivity coefficient for the succeeding cycle. The quantity read out of the digital computer is modified in accordance with equation (6), so that the analog computation remains relatively unaffected by the quantization error. Fig. 3 is a simplified block diagram of the hybrid system for the solution of equations (2), together with the circuits required for quantization error-correction. at sampling instant
n~t
The data flowing between the two computers
(that is, at the beginning of the nth computing
cycle) are indicated in thi s figure. T~e quanti zed value of the analog output, V·, is converted into analog form at the beginning of each cycle and Y is subtracted fr o m it to form the error 6Y. This latter error term is storec throughout the cycle using suitable analog track and hold circuits.
In the present application, two s o-called reverse memories and
one direct memory are employed.
The error term ~Yn-l is multiplied by
the sensitivity coefficient t o generate the correction term. Of course in order to obtain satisfactory operation of the hybrid l oop it is neces s ary to minimize or compensate all other errors inherent in h ybrid comput e r operati on.
Of particular importance in this connection
is the elimination of the time- d elay error in the linkage and the digital c o mp u ter.
This is accomplished by use of a prediction technique such as
that described b y miura /9/.
-~-
Sample Problem As an example of the application of the quantization error-correction technique, consider the following differential equations.
o
x
y + y + y
with I.C.
x + x
y
=
(9)
100 0
The first equation is to be solved on the analog computer and the second on the digital computer.
The analytical solution of the set of equatione
is givsn by.
t)
50
[l-e-t(cost-sint)]
x(t)
50
[l-e -t (cos t+sint)]
y(
(10)
Equations (9) were mechar,ized on a hybrid system similar to that shown in fig. 1.
In order to provide an insight into the effect of
quantization errors, all other error sources inherent in hybrid operation were minimized and compensated. The analog-digital converter employed provides a digital output in binary coded decimal form. It is therefore a relatively simple matter to change the quantization grain by a factor of 10.
Since both x and y in equation (9) remain positive, it was most
convenient to quantize Y using 500, 50 and 5 quantization levels respectively. employed.
That is, quantization grains 0.002, 0.02, and 0.2 were fig. 4 shows how the analog output
5 quantization levels are used.
Y is
quantized when only
As expected, the solution obtained
using the hybrid system deviated from the analytical solution to a greater and greater extent as the quantization grain was increased.
for
a quantization grain of 0.002, the hybrid solution tracked the analytical solution with
negligible
error over a considerable integration range.
A quantization grain of 0.02 introduced in appreciable error, while very large errors were observed with quantization grains of 0.2.
fig. Sa
shows the effect of accumulated quantization errors upon the variable x. The quantization error-correction technique illustrated in fig.
3
was then employed to compensate the quantization error incurred when a very coarse quantization grain (0.2) is employed.
The sensitivity
equation solved continuously on the analog computer simultaneously with equation (9a) is given by •
.
v + v
1
-202-
(11)
with zero initial conditions. lustrated in Fig. 5b.
The result of this experiment is il-
It is apparent that the compensation method
described above is highly effective in eliminating the error introduced into the hybrid loop by an extremely coarse quantization process.
Ad-
ditional experimental and theoretical studies in this area are in prograss.
REFERENCES 1. R. Gelman, "Corrected Inputs -- A Method For Improved Hybrid Simulation", Proceedings of the Fall Joint Computer Conf e rence, Las Vegas, Nevada, pg. 266, November, 1963. 2. J. E. Bertram, "The Effect of Quantization in Sampled Feedba c k Sy stems", Transactions AIEE, Vol. 77, Part 2, pp. 177-182, September, 1958. 3. B. Widrow, "Statistical Ana~ysis of Amplitude Quantized Sampled-Data Systems", Transactions AIEE, Vol. 79, Part 2, pp. 555-568, January, 1961. 4. D. G. Watts, "A General Theory of Amplitude Quantization With Applications to Correlation Determination", Proceedings lEE, Vol. 109, Part C, pp. 209-218, May, 1962. 5. J. B. Slaughter, "Quantization Errors in Digital Control Systems", Transactions IEEE, Automatic Control, pp. 70-74, January, 1964. 6. J. Katzenelson, "On Errors Introduced By Combined Sampling and Quantization", IRE Transaction on Automatic Control, Vol. AC-7, pp. 58-69, April, 1962. 7. B. Widrow, "A Study of Rough Amplitude Quantization By Means of Nyquist Sampling Theory", Transactions IRE Circuit Theory, Vol. CT-3, pp. 266-276, December, 1956. 8. H. F. Meissinger, "The Use of ~arameter Influence Coefficients in Computer Analysis of Dynamic Systems", Proceedings of the Western Joint Computer Conference, pp. 181-192, May, 196 0 . 9. T. Miura and J. Iwata, "Effects of Digital Execution Time In A Hybrid Computer", Proceedings of the Fall Joint Computer Conference, Las Vegas, Nevada, pp. 251-266, November, 1963.
D-A
I
I
o r-----,
_
'"
--
I CONTROL UNIT
\
/
~
-
-.--~~§~ ~~f~~R E
r------.. .
DIGITAL DATA PROCESSOR
PRINTERS TAPE UNITS
rill.l
ANALOG HOLD
I
I
ANALOG SYSTEM
E§"_IT_S_ _ _ _ _--,
I
I
~O
RECORDERS
~
N
y* 4q
3q 2q q
-q -2q
q = QUANTIZATlON GRAIN
-3q
-%
- 205 -
Xnc:"'X~f'
6Vn-'
ANALOG COMPUTER
F ( y~...•yO; Af ) =f
(ic: )
I
CONTROL UNIT
f----------
-* Yn DIGITAL COMPUTER
- - - CONTROL SIGNALS --INFORMATION & DATA
- 206-
...
~ (.)
i=
0
~
III
~ a:
z >% ~
•
~
%
- 207-
•a.
......
~_
>c _ _ _ _
.....,
.
Cl
U1 III
..,...
.
"-
U1 C"
Z 11
Z
<
III
,. ,. 11
,.
Z
~
;u r0
<
::!
,.r0
~
0
0
!
%
..i
n
l!l ... ~
- 208 -
/~