Copyright © IFAC System Identification. Copenhagen. Denmark. 1994
AN ADAPTIVE CONTROL SYSTEM FOR REGULATION OF TIiE END-EXPIRATORY GAS CONCENlRATION OF ARITIFlCIALLY VENTILATED ANIMALS
N. MIZUNO·, K.MIZUMURA", T.KUMAZAWA" and S.fUjIl"· • faculty of Engineering, Nagoya Institute of Technology, Gokiso, Show a, Nagoya, japan .. The Research Institute of Evironmental Medicine, Nagoya University ... faculty of Engineering, Nagoya University, furo, Chlkusa, Nagoya, japan
Abstract. This paper presents a practical discrete time adaptive control system for bio-medical applications. To regulate end-expiratory gas concentration of animals under artificial ventilation, a new control system was developed. Using automatic initialization and supervision functions, this method avoids the complicated selection of some design parameters in adaptive control and can keep safety operation during the experiment. In this methods, the regulation of the end-expiratory gas concentration is controlled by inJectioning gases(C0 2 and 02) Into the inspiratory air of the animals. The volume of the gases are determined based on the estimated characteristics of the animals. In this paper, flrst, we design the adaptive control system, in the case where the characteristics of the animals are unknown. Next, we implement the control system and perform the animal experiments under several conditions. Extensive experimental results illustrate the feasibility of the proposed scheme. Key Words. Bio-medical control; expiratory gas concentration; adaptive control; computer control; feasibility study
I. INTRODUCTION
tion, and to improve the experimental procedure, the adaptive control technique Is adopted. Moreover, we implement the proposed adaptive control algorithm using hierarchical microcomputer system and evaluate the performance in animal experiments.
It is well known that the automatic responses can be variable depending on physiological background conditions such as body temperature, plasma Pco2' plasma pH and depth of anesthesia Uohanson, 1962; Kumazawa, Kobayashi and Takagi, 1964; Mizumura, Sato and Kumazawa, 1986). To get steady automatic responses to stimuli in experimental animals, these background condi tions have to be kept constant.
2. MODELING OF mE ANIMAL CHARACTERISIlCS first, we consider the characteristiCS of the artificially ventilated animals as shown in fig. I.
Among these parameters, plasma P co2 is especially important, because it is closely related to plasma pH and has a profound influence on many physiological functions such as secretion, neural excitability and synaptic transmission (Woodbury and Karler, 1960). Moreover, it can change rapidly breath by breath. So long as no circulatory disturbances exist, the arterial Pco2 is equal to the alveolar Pco2 (namely end-expiratory CO 2 concentration).
Magnetic Valve
./
Accordingly, arterial Pco2 can be controlled by regulating the end-expiratory CO 2 concentration. No respirators currently available, however, can control endexpiratory CO 2 concentration automatically with a desired accuracy (fuJii ~ ~ 1988).
fig. 1
In this study, we attempt to develop a new control system to regulate end-expiratory CO 2, This system should be designed to achieve the follOWing objectives: I) fast and smooth tracking to the desired set points, 2) elimination of the output change caused by disturbances, and 3) suppression of deterioration in the control performance depending on changes in the process dynamics of the controlled system, namely changes in physiological characteristics of the animal depending on species, age, sex, body weight, metabolic state and so on. In these objectives, I) and 2) can be attained by designing the structure of the control system adequately, but 3) cannot be sufficiently achieved by a conventional feedback control law such as PlO control. In order to obtain the stable control behaviour for a wide range of the physiological condi-
In this system, a mixture of air and CO 2 and/or 02 gas is inspired and the concentration of O 2 and CO 2 in inspired gas and expired gas are continuously monitored with gas analyzer. The controlled variables are the end-expiratory CO 2 and 02 concentration. The control inputs corresponding the outputs are the injected volumes of CO 2 and 02 gases into inspired air. Volumes of injected gasses are controlled by changing the opening periods of magnetic valves through which CO and 02 gases flow. In practice, to regulate the 2 physiological conditions, the end-expiratory CO 2 concentration is controlling by manipuiating the volume of the injected CO 2, which affects the plasma p co2' Thus the system, from the control point of view, can be described as a single-input, single -output system.
227
The animal under artificial ventilation
D(Z-I Hy·(k+d)-y(k+d)]=O
Note that. since the gas concentrations vary synchronously with the respiratory cycle as shown in Fig. 2. and the peak value represents the end-expiratory concentration of the gas. the peak value of the CO 2 concentration must be held and used as the output of the controlled system. Moreover. the controlled system is essentially considered as a discrete-time system.
1. :;:r-'=';"
~
...• :... 1-' ;····1
....
O·CI-----:O~---~---
(4)
where the polynomial D(z-I) defines the regulation dynamics and is asymptotically stable of the form as D(z-I )=1 +d I z-I +d z- 2 2
(5)
In Eq.(4). y*(k+d) is a set point.
To apply the discrete-time adaptive control scheme. we adopt a following simple linear discrete-time model for the end-expiratory CO 2 dynamics of the animal under artificial ventilation.
y
Basic design of feedbak.!QQ2
From the model structure about A(z-I) and B(z-I). there exist unique polynomials S(z-I) and R(z-I) such that (Landau and Tomizuka. 1981):
with
Fig. 2 Breth-by-breth responce of CO 2
(7)
y(k)=a I y(k-I )+a2 y (k-2)+b Ou(k-d)+b l u(k-d-I )+u'
(I) Using S(z-I) and R(z-I) in Eq.(6). the input is generated by the control law:
Where. y(k) and u(k) are the end-expiratory CO 2 concentration and injected CO 2 volume at k-th sampling period respectively. and u' is the equivalent constant input which corresponds the steady state output. d represents the dead time depending on the length of the tubing.
B(z-I )S(z-I )u(k)=D(z-l)y*(k+d)-S( I )u'-R(z-I )y(k)
(8)
The model reference control is very sImple and by using the non-minimal representation of the system. the parameters of the controller can be easily estimated from the input-output data of the plant.
In this modeling. we assume that the tidal volume of the respirator is kept constant at an appropriate level to control end-expiratory CO 2 concentration in the normal range by CO 2 injection and changes of physiological conditions are slow relative to the convergence rate of adaptation mentioned later. Moreover. we ignore the interaction between CO 2 and 02 dynamics in the system. These assumptions are reasonable when the speed of the set point changes are relatively low. and we can treat ai and b i to be time invariant. Now. equation (I) can also be represented as;
In the estimation of the unknown parameters. the system model is rewritten by using the polynomial identity (6) as:
D(z-I )y(k)=B(z-1 )S(z-I )u(k-d)+S( I )u'+R(z-1 )y(k-d)
= aT I; (k-d)
(9)
where (2)
B(z-I )S(z-I )=bSO+bs z-I +.. +bsdz- d+ l • l
where A(z-I) and B(z-I) are polynomials in the unit delay operator z-I as follows.
bSO=b
(IO)
aT=[bsO•••••bsd.S(1 )u'.ro.r 1I
A( z -I) = I -al z -I -a2z -2
I; T(k-d)=[u(k-d)••••• u(k-2d).I.y(k-d).y(k-d-I)1
B(z-I )=bO+b z-I l
O
(lIl
(3)
3.2 Design of parameter estimator
The following assumptions are made about this model. a) a i and b i ters.
are
To estimate the system parameters from the input u(k). output y(k) and the non-minimal system representation (9). we use the following adaptation algorithm with constant trace gain matrix. The one practical problem in the selection of the adaptation algorithm is the long-term stability during steady state operation. The unstable behaviour may occur by some noise. modeling error. quantization error. timing error and so on. In this application. to improve the robustness of the algorithm. we introduce the dead zone for the adaptation error (Middleton and GoodWin. 1990).
the unknown but constant parame-
b) The dead time dare knowledge of the system.
known from a priori
c) The polynomial B(z-I) is stable and bO~
3. DESIGN OF THE ADAPTIVE CONTROL SYsrEM
. e. e(k)=
To achieve both control objectives; tracking and regulation of end-expiratory CO 2 concentration. the adaptive control loop is designed based on the model reference control algorithm. In this case. the control input should be such thot ;
r -I (k)=
(k-I)+
r (k-I) I; (k-d)e*(k)
A I (k) r -I (k-I)+ A 2(k) I; (k-d) I; T(k-d)
e·(k)=ec·(k) /11+ I; T(k-d)r (k-I) I; (k-dll
228
(12) (13)
( 14)
(15)
o
eh(k)=D(z -I )y(k)-
[BS(k.z- I )+ (/bO(k))uc(k)=K*(k)D(z-I)y*(k+d)
!eh(k) I > t.
eh(k) e *(k)={ c
lehlk)
I
-Ku,(k)S( I )u'(k)-R(k.z- I )y(kH26)
~ t.
eT(k) r; (k-d)
(16) (17)
8T(k)=[bS O(k) ••..• bs d(k).S( I )u'(k).rO(k).r I (k)] where 0<
AI(k)~ I. O~ A2(k)<2. r(O)= rT(O»o
(27)
Ku,(k)= I + ( /[bO(k)BR(k. I))
(28)
or for 12(k): [BS(k,z-I)+ (/bO(kH I-z-I )]uc(k)=D(z-l)y*(k+d)
In the above algorithm. the dead zonet.should be assigned at least the greater value than the quantization level introduced by A/D converter. To keep the trace of the gain matrix A I (k) is calculated as follows.
K*(k)=1 + ([D(I )-S(k. 1)]/[bO(k)BR(k. I)D( I)]
-S{J)u'(k)-R(k.z-l)y(k) (29) Using the control input described in this section. the control objectives of both tracking and regulation are achieved. when the appropriate dead time is selected. If the dead time is assigned smaller than the true value. the estimated value bO(k) may converge to 0 and some numerical difficulty occurs in the calculation of control input. To avoid this practical problem. we introduce an automatic initialization function into the adaptive controller mentioned later.
and A2(k)
AI(k)=I-W(k-J) r;(k-d)11 2/1(0+ r;T(k-d)f(k-J)l';(k-d))trr(Oll (18) 0= AI(k)/ A 2(k) (19) Using the estimated parameters in (17). the following estimated polynomials can be reconstructed. BS(k.z -I )=sO(k)+' I (k)z -I +,. +sd_1 (k)z -d+ I
(20) 3.4 Automatic initialization of control system
R(k.z- I )=rO+r I (k)z-I
(21) In most adaptive control systems, it is assumed that the order and the dead time d of the system are known a priori. for this application. we assign the order of the system from preliminary experiment. However. even in this case. the value of the dead time may be vary depending on the length of the tubing for each experiment. Moreover. to obtain good transient behaviour of the adaptive control system. several design parameters should be properly assigned. In order to initialize the adaptive control system automatically. we introduce the follOWing procedure into the control algorithm.
Then the adaptive control input is calculated as follows: BS(k.z- 1)u(k)=D(z-l)y *(k+d)-S( I )u'(k)-R(k.z -I )y(k)
(22)
However. using the control input u(k) calculated by Eq. (22). undesired situation may happen. such as too large an input disturbing the physiological functions of the animal. This is because the input constraint is not taken into consideration in Eq. (4).
3.3 Modlficaton of feedback loop
11 Automatic
To prevent the above problems. we modify the feedback control loop according to the following performance indices (Goodwin and Sin. 1984).
The dead time of the system is measured by the impulse response of the system. first. the constant volume of the CO 2 gas is injected into the inspired air during the steady state. The concentration of CO 2 in expired gas is continuously monitored. If the value of the concentration exceeds the prescribed threshold. the transportation lag I is determined and d=intll/T). In this procedure. T is the sampling period and the threshold is manually set regarding the noize level.
II (k)=[D(z-1 Hy*(k+d)-y(k+d))]2+ ( [u(k)!2
(23)
1 (k)=ID(z-1 Hy*(k+d)-y(k+d))I2+ ( [u(k)-u(k-2)]2 2
(24)
where (~O is the weight for input amplitude(J1 (k)) or input variation(J2(k)). The differences between two types of performance index are in stability and tracking performance of the control system. As for the stability. II(k) gives a better controller. but as for the tracking performance. 12(k) gives better one. In both performance indices. by adjusting (. the excess control for the animal can be avoided.
n
uc(k)
~
I uc(k) I ~R : I uc(k) I
!!ill.!!Q
Automatic setting of input weight
for total stability of the adaptive control system. the weight of the input signal in the performance indices should be carefully assigned. The closed loop poles of the system are given by the following polynomials for 'I(k) and 12(k) with D(z-I)=I and d=1.
(25)
R sgnluc(k)]
Initial estimate for
After determining the dead time d. the adaptive control starts under restricted conditions. During this phase. to accelerate the convergence of the estimated parameters. the pseudo random sequence signal is added to the set point. The input amplitude is constrained smaller value than that of normal operation for safety control in this period.
Moreover. to prevent the unstable behaviour during the transient phase of the parameter estimation. the adaptive control input u(k) is modified as follows (fujii and Mizuno. 1982).
u(k)=
measureling of the dead time
>R
where R > 0 is the known maximum permissible value of the input. uclk) is calculated for I. (k):
229
(301
A-I front Panel
For 12; B(z-l)+ e:/bO(I-z-IIA(z-11
Equation (30') implies that if the open loop system is stable then the closed loop system is stable for all stable B(z-I) and some unstable B(z-I). In general, well damped stable minimum phase second order continuous time system gives stable discrete time system with al
Photo 1 Microcomputer based adaptive controller In this system, peak-holded values of the expired gases measured by the gas analyzer are fed into the host computer through a 12 bits AID converter. Then the host computer calculates the valve opening signal (control signal) according to the adaptive control algorithm. To ensure breath-by-breath control of the end-expiratory gas concentration, gases must be added during the inspiration period. The inspiratory period was detected by the host computer using the instantaneous value of 02 concentration in respiratory gas. During the operation, the I/O program resident in the valve controller performs the following tasks; I) input the timing signal of the respirator, 2)waits for the adaptive control program on the host computer to issue a new set of control signals, 3) dispatches these signals to power amplifier for each magnetiC valve synchronized with the timing signal.
To evaluate the proposed control schemes for artificiality ventilated animals, we developed a hierarchical control system which consists of a host computer (Intel 8086 with 8087) and a valve controller (Intel 8052) as shown in Fig. 2 and Photo I.
AID converter
1--
1
~ peak:
The first version of the controller programs were all written in compiled BASIC. In this case, the computational time is about 2.5 seconds.
gas
.
~
(DMAI
5. ANIMAL EXPERIMENTS
holder: analyzer ~
9T
output
V '1 animal
Ycol{k)
valve controller expiratory gas
inspir~ gas magnetic valve
.-.. -...........
Methods of animal experiments
Cats weighting 2.5kg were deeply anesthetized with pentobarbital sodium (30mg/kg, I. V.I and immobilized with gallamine triethodide (4mglkg, I. V.). The trachea was cannulated and connected to the respirator. Respiration rate and tidal volume were set at 25breaths/min and about 30ml, respectively. From preliminary experiments using a model constituted with a respiratory bag and CO 2 absorber (soda lime), the transportation lag (d) was estimated as 7 breaths.
yOl (k)
?'E
input UOl(k)
~ :\,1.
control valves
4. IMPLEMENTATION OF CONTROL SYSTEM
co 2
•[-=O~.
3-direction valves
The supervision mechanism checks the validity of the input data. If the value of the input data exceeds the normal range of the animal, then the input data is discarded and the control input is fixed at the last value. Moreover, this mechanism accepts the interrupts from the operator and switches the operation modes for each demand.
C
El El A-2 Internal Structure
of control system
(PC 9801 VM2 )
II
...
(30')
personal computer
oa=m
(311
Thus, the optimal selection of the weight, however, depends on the parameters of the unknown s1'stem. The one candidate of the weight may be bO ' For example, by assigning to this value, the characteristic polynomial (30) becomes from Eqs. (I I, (30);
.1l. SuperVision
':-:0'''' .. , ••
~
respirator
5.2 Experimental results
input
Only tracking of the changed set point of CO 2 concentration was shown. When the set point was increased or decreased by I % in CO 2 concentration, the output was brought into the allowable error range(~ 0.1 %) within I minute with e: set at 0.005(Fig. 3a).
Ucol(kl air
Fig. 2 Schematic diagram of the control system
230
°1
• • I'~r 1
(a) Tracking ( E =0.005)
01
]
for
1% change of the
set
ry rate was set at 25breaths/min, any further load to the software will lengthen the computation time and make breath-by-breath control impossible. One possibility is to decrease the number of parameters which must be estimated. Shortening the tubing will reduce the dead time d and help in this aspect.
20.9 " 15
point
From the above point of view, the second version of the controller programs were rewritten in assembly language for control algorithm with peak detecting function and in BASIC for visualization of the state of the control system. With these software combination, the total control algorithm can be performed within I second. figure 4 shows the experimental results using the second version of the control programs. In these experiments, the stable tracking was ' obtained for wider range of setpoint :t1:ttTdl:;-j 15 changes without modification of E which has been set automatically.
fto., "-
• • • • •1 -tttttU.11 I i I I j I
(b)-I Tracking for 2% change of the setpoint ( E was set automatically)
Co,lIl11l-
2
0.
10 sec (b)-2 The same condition as (b)-I except E=0.03
(a)-I Tracking for + I % change of the setpoint
+ 6.5\-5
Fig. 3 Experimental results by 1st ver. program
5\
inMrlmrlnn1nhrnr1hr'lnr'lnnhrlnh~lr,~I,!nILI
When the setpoint was changed by 2% from 5% to 7%, great overshoot and hunting was observed with E set automatically(fig.3b-l), while backward change from 7% to 5% was smoothly attained within I minute with same E. By changing E to 0.03, smooth but slow tracking to the increased setpoint was obtained as shown in fig.3b-2. The same situation happened when the setpoint was elevated by 3%, and again by changing E to 0.03, normal tracking was obtained.
I 11 I
10 sec (a)-2 Tracking for -I % change of the setpoint
.3'-5\
===-="'""""',.......,~-~--"
Phenomena observed during tracking of the setpoint change of more than 2% with a smaller E can be explained as follows: the peak hold value used as the output can be renewed only when a change by more than 0.7% exist. During the tracking of higher setpoint, gas volume added was so increased that the difference of CO 2 concentration during respiratory cycle become less than 0.7% and even inspiratory CO 2 exceeded the expiratory CO 2 concentration. In the former case, the peak-holding was disabled, and the output was not renewed until the concentration change during the respiratory cycle exceeded 0.7%. In the later case, instead of the end-expiratory value, the end-inspiratory value of CO 2 concentration was held as a peak value and the control was carried out based on it. These changes were taken as changes in process dynamics by the controller, and imposed bad influences on the successive control processes. This kind of problem can also happen when the setpoint of the 02 is decreased. These problems would be avoided by detecting the peak value of gas concentrations and the respiratory phase by software using instantaneous value of the gas concentration. Since the computation time of about 2.5sec for the program used was just as long as the time of one breath when the respirato-
1
~
in
(bl-I Tracking for 2% change of the setpoint
+4
5\- 6 5\
i " I 11 I, I 1 1
i i i I ill I '"
I
I "
1'1
I
I '"
I I I,'
"
;, 'HAI 10 sec (b)-2 The same setpoint change under different physiological condition fig... Experimental results by 2nd ver. program
231
Kumazawa, T., Kobayashi, M. and Takagi, K. (1964). A Plenthysmographic Study of the Human Skin under Various Environmental Conditions. Japanese Journal of Physiology, 14, 354-364.
6. DISCUSSION The expiratory gas control system presented in this paper has the following theoretical benefits compared to our previous system (Fujii et ~ 1988) which was designed to control end-expiratory CO 2 concentration by changing the tidal volume. Since the new one control the gas concentration without changing the tidal volume, effects of lung volume change and intrathoracic pressure change on the respiratory and cardiovascular system can be neglected. It is applicable to many types of respirators without any major change in their construction.
Middleton, R. H. and Goodwin, G. C. (1990). Digital Control and Estimation, Prentice-Hall. Mizumura, K., Sata, J. and Kumazawa, T. (1986). Continuous Recording of Arterial Pressure and PC02' and pressure, PC02 and pH of the Cerebrospial Fluid during Acute Expose to Low Oxygen and to High CO 2 Environment in Dogs. Environmenill Medicine, 30, 30-40. Wood bury, D. M., and Karler, R. (1960). The Role of Carbon Dioxide in the Nervous System. AnesthesiolQ8Y., 21, 686-703.
Experimental results showed that the first version of the control system could meet a demand that the output must be brought into the allowable error range(:!O.1 %) in 2 minutes when the change in the setpoint of CO 2 was less than 2%. On the other hand, smooth tracking of the increased setpoint of more than 2% was attained only when a large £ was employed, and resulted in very slow tracking. The second version of the control system clearly reduces the settling time compared with the first version of the control system under similar conditions. Moreover, the Improved control system can be applied to several kinds of animals with different physiological condi tions.
7. CONCLUSION In this paper, we have presented a feasible discretetime adaptive control system for biomedical applications. The control performance is evaluated by extensive experiments under practical conditions. From the experimental results, it Is shown that the proposed scheme provide fast and smooth tracking to new set points. On the other hand, this control system is still in a preliminary stage of development, and many additional problems should be solved.
ACKNOWLEDGEMENTS The authors wish to thank Mr. Morio Murase for assisting in the implementation of the adaptive controller reported in this work.
8. REFERENCES Fujii, S. and Mizuno, N. (1982). Construction of a Discrete MRACS for Plants with the Restriction of Input Amplitude. Trans. So. Instrum. and Control, 18-8, 859-861. FUjii, 5., Mizuno, N., Kumazawa, T., Tadaki, A. and Eguchi, K. (1988). Application of the Adaptive Control Method for the Control of the End-Expiratory CO 2 Concentration of Artificially Ventilated Animals. Trans. So. Instrum. and Control, 24-2, 201-203. GoodWin, G.c. and Sin, K. S. (1984). Adaptive Filtering Prediction and Control, Prentice-Hall. Johanson, B. (1962). Circulatory Responses to Simulation of Somatic Afferents. Acta Physiologica Scandinavica, 57, Suppl. 198.
232