Proceedings of the 9th IFAC Symposium Advances in Control Education The International Federation of Automatic Control Nizhny Novgorod, Russia, June 19-21, 2012
Systems and Control for Biomedical Engineering Students António Dourado, Alberto Cardoso, Jorge Henriques, César Teixeira
Department of Informatics Engineering University of Coimbra, Polo II, 3030-290 Coimbra, Portugal e-mail: {dourado, alberto, jh, cteixei}@dei.uc.pt Phone: + 351 239 790000, Fax: + 351 239 701266 Abstract: Developments of skills in Systems and Control by Biomedical Engineering Students, a challenging task for instructors, is discussed. The syllabus and its organization in the University of Coimbra are described. From PID and fuzzy to optimal control, space has been created inside several courses mixed with other subjects of biomedical engineering. The approach is based on a “learning-bydoing” perspective. The syllabus and the practical exercises are presented and commented. The practical exercises cover most of the topics. ©IFAC 2012. Keywords: curricula development, biomedical engineering, systems and control, learning strategies, control education.
- The general systems concepts introduced by the general systems theory of Bertalanfy (1969) and well developed in Flood and Carson (1993).
1. INTRODUCTION Biomedical Engineering is quite a new engineering field. It is transdisciplinary, passing by Mathematics, Physics, Chemist and Biochemist, Physiology, Anatomy, Informatics, Signal Processing, and also by Systems and Control, Biomedical Engineering students have distinct characteristics with respect to other engineering students: they are between medicine and engineering, or by other words, they are the engineers of human life and its preservation. They have usually high-level intellectual capabilities, but need to develop systems thinking skills. This is the main objective of systems and control concepts and exercising.
- The description of linear systems by differential equations and Laplace Transform. - Transfer function as a tool for systems analysis and understanding, using the connection between the dynamics and the transfer function characteristics. - State space representation, state equations, eigenstructure and its connections with stability and dynamic properties. - Modelling of nonlinear systems by differential equations, singularity points, linearization, and local stability. Phase curves in state space and their importance as a portrait of fundamental properties of the nonlinear system.
In the University of Coimbra the Biomedical Engineering degrees (at B.Sc. and M.Sc. levels) include systems and control concepts spread out in several courses. In this paper the contents, methods and experiences are described in the following. Section 2 describes the syllabus supported on the learning methodology of section 3, plasticized in the examples of section 4. Bibliography in section 5 and conclusions complete the presentation.
- Chaotic behaviour of biological and physiological systems and the Feigenbaum (1979) constant. Then Matlab©/SIMULINK© environment (Mathworks Inc.) is extensively used for practical work. Biological and physiological applications are used whenever possible.
2. THE ORGANIZATION OF CONCEPTS (SYLLABUS)
2.2 Neural and Fuzzy Computation
2.1 The basic concepts
Modelling of complex nonlinear systems by data driven paradigms such as artificial neural networks and fuzzy rule based systems is studied in the “Neural and Fuzzy Computation” course, at M.Sc. level, a specialization course only mandatory for part of the students (speciality of Bioinformatics and Clinics Informatics). It includes:
The first course where system concepts are introduced is “Computational Models of Physiological Processes”, at the 5th semester of 6 semesters B.Sc. degree. This is a mandatory course for all Biomedical Engineering Students and is intended to develop skills for mathematical modelling and simulation of the multiplicity of physiological systems in human body. The first part of the course (15 hour of theory and 16 hours of exercises) is filled with:
978-3-902823-01-4/12/$20.00 © 2012 IFAC
- Artificial Neural Networks (15h): multilayer, radial basis functions and recurrent architectures with and without timedelays, and its use as classifiers of large data sets.
413
10.3182/20120619-3-RU-2024.00107
9th IFAC Symposium Advances in Control Education Nizhny Novgorod, Russia, June 19-21, 2012
- Fuzzy logic and fuzzy ruled based systems (15h). Building of fuzzy models from data using clustering (k-means and subtractive).
mathematical developments, it would not fit in the available space and most of the students would not be able to absorb them. Instead, a more “learning – by – doing“ approach is followed: learn the most important theoretical aspects to understand the method, implement and practice with it, and if needed come back to theory. The “learning-by-doing” approach is not an empirical one, it needs sound mathematical support, but instead of putting the accent on abstract theoretical demonstrations, it works for stimulating the student’s intellectual curiosity by practical work involving several perceptions. The flexibility of Matlab/SIMULINK environments allows the fast “mise-enoeuvre” and experimentation of controllers following the cycle: experiment-analyse the results-check with the theory. This allows the development of a mental image of the field that supports the development of the student skills, finally the most important goal of their education.
- Fuzzy control, the first contact with control the students have. Experience shows that this is very positive, since fuzzy control can be taught almost like a game. This creates in student’s minds an image of control much more attractive than if they had started with the classical control based on Laplace transform. The fundamental concepts of control systems (open-loop, closed-loop, reference, disturbances, error, etc.) are introduced The students are given a black box (where a transfer function is inside), apply inputs and read outputs, try to build up a mental image of the system and then write the fuzzy rules, defining previously the membership functions of the antecedents and consequents. Mamdani and Takagi-Sugeno types are studied and experienced. Usually the students succeed to get a good controller. The Matlab Fuzzy Logic toolbox has facilities enabling this exercising.
4. SOME EXPERIMENTAL EXERCISES In group-working (an education goal by itself), students carry on computational experiments with several levels of complexity. Some examples of practical exercises, using the Matlab and Simulink software, are briefly described in the following.
2.3 Digital and optimal control The third course where students contact with control is the “Algorithms for Diagnosis and Self-Regulation”. The “bionic man” with artificial organs controlled by the central nervous system, a fusion of biology and electronic, is the motivation for advanced control theories. The following subjects are studied:
4.1 Simulation of the evolution of the population of a biological species
- Discretization techniques, Z-Transform (review), discrete transfer function and its recursive identification (5h).
Defining a biological species (insects, for example) as a system whose individuals live an integer number of years, and considering that the population grows with a given limitation, the population’s temporal evolution is simulated using a simplified model in the form of the non-linear difference equation (1) (Flood (1993)),
- The synthesis of digital controllers in an “outward-toinward” approach: given the desired closed-loop transfer function, given the process (open loop) discrete transfer function, derive the digital controller from them to shape the closed-loop, obeying to the constrains of stability and realizability. Diophantine equations are introduced and the discrete PID control is looked as a particular case (5h).
x k +1 = Ax k (1 - x k ) = f (x k ),
x k Î [0,1]
(1)
where xk is a fraction of the population’s maximum value in year k. and A is a positive constant that depends on environmental conditions (the availability of food, water, climate, etc.). The students, after creating the model, simulate it and analyze the influence of the values of the initial population and of the constant A on the temporal evolution of the population.
- Pole-zero cancellation controllers: advantages and drawbacks (the imperfect cancellation of instable poles and zeros) (5 hours). - State feedback, in discrete state space, and how it shapes the closed loop characteristic equation by a proper calculation of the feedback gains. The regulator problem is treated, and is faced as a way to surpass the pole-zero cancellation controllers (5 hours).
4.2 Simulation of the ingestion and excretion of a drug
- Optimal control is introduced for the regulator problem, including the Ricatti equation in recursive and steady-state versions. It is presented as a special case of state feedback (5 hours).
The main objectives of this work are to use methods of numerical integration of functions and to consider numerical methods to simulate continuous systems modelled by differential equations. As example, the system considers the ingestion and excretion of a drug shown in Fig. 2 (Bruce( 2001)).
The syllabus organization is illustrated by Fig. 1. 3. LEARNING METHODOLOGY The systems and control program is extensive, including most of the control techniques with practical relevance. If they would be studied with all the details and all
Figure 2: System of ingestion and excretion of a drug. 414
9th IFAC Symposium Advances in Control Education Nizhny Novgorod, Russia, June 19-21, 2012
The drug is taken orally, at a rate u(t), goes to the intestines, where it reaches a quantity x1(t), and then it is absorbed by the bloodstream. The bloodstream, where the drug reaches a quantity x2(t), passes through the kidney (where it is assumed there is no absorption) that expels the drug at a rate y(t), passing it into the urine. In this approach, for reasons of simplicity, other physiological actions are disregarded and the elimination of the drug by cellular metabolism is ignored. In medical terminology the process is multi-compartmental. Assuming the kidney is only one transition element, the process has only two compartments. Being necessary to find a compartmental model of the process, an equivalent fluidic system can be developed, as shown in Fig. 3.
where VL(t) is the lungs volume, P(t) is the differential pressure between the pressure of the forced ventilation and the atmospheric pressure, and a and b are coefficients depending on the total compliance (lungs + chest) and on the resistance to the flux of the forcing air into the lungs. The other considered system describes the functioning of the skeletal muscle using a model with a 2nd order differential equation (4) ((Bruce (2001)),
Ky (t ) B
4.4 Study of the state space representation of systems and the phase curves This work reinforces the study of the state space representation and introduces the phase plane to analyse nonlinear systems. The exercises are based on three case studies: the ingestion and excretion of a drug (already described); the interrelationship between the blood glucose and the insulin in blood; and the epidemiologic study of a population affected by two competing diseases. The interrelationship between the blood glucose and the insulin is described by the model (5) (Marmarelis (2004)),
Applying the fluidic systems principles, the mass balance of each compartment provides the differential equations for the mathematical model of the overall system. Assuming that x1(t) and x2(t) are the corresponding levels (quantities) and the fluidic resistances are the following:
dt dx 2 (t ) dt
= -k1x 1(t ) + k1x 2 (t ) + u(t )
(2)
= k1x 1(t ) - (k1 + k2 )x 2 (t )
dG (t ) = -p1[G (t ) - Gb ] - X (t )G (t ) dt dX (t ) = -p2X (t ) + p3 [I (t ) - I b ] dt
where k1 and k2 are parameters related with the fluidic resistances R1 and R2, respectively, and u(t) represents the flux of ingestion of drug. The model is simulated using different numerical methods (Euler, Runge-Kutta, etc.) for several operational conditions. The practical work includes the analysis of the solution’s sensitivity to the value of the discretization interval considered by the numerical method.
(5)
where G(t) is the plasma glucose concentration, X(t) is the action of insulin, I(t) is the plasma insulin concentration, Gb is the baseline plasma glucose concentration, p1 and p2 are the characteristic parameters describing the kinetics of the glucose and insulin action and p3 is the parameter that describes the modulating influence of the insulin action in the glucose absorption dynamics. Note that this model does not take into account neither the insulin pancreatic secretion, induced by the variations of the plasma glucose concentration, nor the eventual production of glucose by internal organs. The physiological parameters of the glucose’s efficiency SG = p1 and the insulin sensitivity SI=p3/p2 are widely used for clinical purposes.
4.3 Study of the dynamics of artificial ventilation of a patient This work aims to introduce some basic concepts about linear and time-invariant systems as the transfer function and the state space representations, the transient and steady state response, the poles and zeros, the system’s stability and the characteristics of first and second-order systems. One of the case studies is a system modelling the breathing dynamics of a ventilated patient, given by the following equation (Bruce (2001)):
The third example describes the situation of a population where coexist two diseases that compete with each other, described by the model (6).
·
VL (t )+ aVL (t ) = bP (t )
(4)
where y(t) is the output, K the elastic constant, B the viscous friction constant, M the mass and u(t) the input (applied force). Special emphasis is given to the relation between the transfer function and the state space representations and to the introduction of feedback control for regulation and tracking purposes.
Figure 3: Fluidic system equivalent to the ingestion and excretion of a drug.
dx 1(t )
dy (t ) d 2 y (t ) M u (t ) dt dt 2
(3)
415
9th IFAC Symposium Advances in Control Education Nizhny Novgorod, Russia, June 19-21, 2012
dS = -m1I 1S - m2I 2S + d1I 1 + d2I 2 dt dI 1 = m1I 1S - d1I 1 - g I 1I 2 dt dI 2 = m2I 2S - d2I 2 + g I 1I 2 dt
error dependence on the considered system order and finally proposes a discrete transfer function for the given time-series. (6)
4.6 Development of a fuzzy controller for a process A fuzzy controller is developed and implemented using the Matlab Fuzzy Logic toolbox for an experimental benchmark process PT326 (from Feedback). The PT326 process is similar to a hair dryer: air is forced to circulate by a fan blower through a tube and heated at the inlet. This is a nonlinear process with a pure time delay, which depends on the position of the temperature sensor element and the air flow rate. The system input is the voltage on the heating device, which consists of a mesh of resistor wires, and the output, is the outlet air temperature. Considering mainly the qualitative behavior of the heating process, and based on the fuzzy system theory, students establish a set of rules in the Mamdani form
where S is the fraction of the healthy population and therefore susceptible to any disease (an individual cannot have both simultaneously), I1 is fraction of the population infected by the disease 1 and I2 is the fraction of the population infected by the disease 2. This three order system can be reduced to a second order one, considering that the population is constant and so the variables are linked by (7), (7)
S I1 I 2 1
resulting in the system (8).
IF (y(k) is OUT ) AND y(k) is (VOUT) THEN u(k) is INP
dI1 1 I1 (1 I1 I 2 ) 1 I1 I1 I 2 dt dI 2 2 I 2 (1 I1 I 2 ) 2 I 2 I1 I 2 dt
where y(k) is the output temperature, y(k)=y(k)-y(k-1) is the variation of the output temperature and u(k) is the voltage supplied to the heating device. The fuzzy sets OUT, VOUT and INP are described by linguistics terms, such as {Negative, Normal, Positive). Although this is not a biomedical device, it can be compared to the heating systems of for example an incubator.
(8)
This example promotes the study of the singular points of a nonlinear system, the linearization of the system around the singular points and the stability analysis, supported on the phase curves using the free Matlab pplane application (http://math.rice.edu/~dfield/index.html) also available in Java applet (Polking and Arnold, 1999). Fig. 4 shows a phase plane of (8). I1 ' = miu1 I1 (1 - I1 - I2) - delta1 I1 - gama I1 I2 I2 ' = miu2 I2 (1 - I1 - I2) - delta2 I2 + gama I1 I2
miu1 = 0.5
delta1 = 0.8 delta2 = 0.2
4.7 Digital Control of a process given by a continuous transfer function. This is the occasion to discuss the analog-to-digital (A/D) and digital-to-analog (with zero order hold, ZOH) conversion as in Fig. 4.
miu2 = 0.5 gama = 0.5
1 0.8 0.6 0.4
I2
0.2 0 -0.2
Figure 5. The closed digital control-loop with ZOH.
-0.4
Given the G(s), the students: (i) Develop and implement the controller D(z) of minimum settling time. (ii) Develop and implement a deadbeat controller. (iii) Derive a controller by pole-zero cancellation, considering the closed-loop behavior specified by the damping factor and the settling time.
-0.6 -0.8 -1 -1
-0.8
-0.6
-0.4
-0.2
0 I1
0.2
0.4
0.6
0.8
1
Figure 4. Phase portrait for the system (8) for given values of the constants. The nonlinear system has 3 singularities with different stability properties (attractor, repelling, saddle point).
4.8 Discrete State variable feedback of a second order system given by a continuous state equation.
4.5 Recursive identification of discrete linear systems.
Considering a continuous time process represented in state space, considering the ZOH and a given sampling period, discrete state feedback is derived and implemented. Stability analysis and the closed loop-steady state error are addressed.
A file is given with input and output time series of a system (not known by the student) discretized with a given sampling frequency. Using the Matlab Systems Identification toolbox, each group studies the recursive identification problem, the 416
9th IFAC Symposium Advances in Control Education Nizhny Novgorod, Russia, June 19-21, 2012
importance. Control is very important in the understanding of the feedback paths in physiological systems. It is decisive in building artificial organs such as artificial arms and legs, and in controlling artificial devices such as pacemakers or insulin injection devices for diabetic patients. Control is in the center of future medicine.
4.9 Optimal control of a discrete system for a finite horizon, with the recursive solution of the Ricatti equation. A discrete time process, known to be controllable and observable, is given. The Linear Quadratic Regulator is implemented with the study of the relative influence of the Q (state) and R (input) penalty matrices.
REFERENCES 5. BIBLIOGRAPHY OF THE COURSES
Allman Elizabeth S. and John A. Rhodes (2003). Mathematical Models in Biology: An Introduction by Cambridge University Press. Baura G D (2002). System Theory and Practical Applications of Biomedical Signals, (Biomedical Engineering S.), John Wiley and Sons. Bertalanffy, L. (1969). General Systems Theory, George Brazillier, NY. Boyd, D.W. (2001). Systems Analysis and Modelling, A Macro-to-Micro Approach with Multidisciplinary Applications, Academic Press. Bronzino, Joseph D. (Editor) (2000). The Biomedical Engineering Handbook (Electrical Engineering Handbook), Springer Verlag. Bruce, Eugene N. (2001). Biomedical Processing and Signal Modelling, John Wiley and Sons. Feigenbaum, M.J. (1979)."The Universal Metric Properties of Nonlinear Transformations." J. Stat. Phys. 21, 669-706. Flood, R. L. and E. R. Carson (1993). Dealing with Complexity, An Introduction to the Theory and Applications of Systems Science, Plenum Press, NY. Hagan Martin T., H,. B. Demuth and M. H. Beale (1995), Neural Network Design, PWS Publishing. Hoppensteadt Frank C., Charles S. Peskin (2000). Modeling and Simulation in Medicine and the Life Sciences (Texts in Applied Mathematics), Springer Verlag. Marmarelis, Vasilis Z. (2004). Nonliner Dynamic Modeling of Physiological Systems, IEEE Series in Biomedical Engineering. Michael Khoo. M. (1999). Physiological Control Systems: Analysis, Simulation, and Estimation, J. Wiley & Sons. Ogata, K. (2002). Modern Control Engineering, 4th ed., Prentice Hall Polking J. and David Arnold (1999). Ordinary Differential Equations using MATLAB, Prentice Hall. Ross T. (2004). Fuzzy Logic With Engineering Applications, 2nd Ed., McGraw Hill.
The courses are developed accordingly with the instructors’ experience. However there are some books that the students must use as complementary knowledge. For example Bertalanfy (1969), Hoppensteadt and Peskin (2000), Khoo (1999), Ogata (2002), Bronzino (2000), Elizabeth and Rhodes (2003), Baura (2002), Flood and Carson (2003), Ross(2004), Hagan and Coll. (1995). 6. STUDENTS FEEDBACK Students in general express a positive evaluation of the three courses referred above. The main difficulty arises from the lack of knowledge in computer programming. Since the examples are mainly from biomedical problems, they are stimulated by them and they succeed to overcome these difficulties. Students have a solid mathematics and physics background to attain the learning objectives of these courses. The University has a quality management and control system with mandatory anonymous answers by the students, every semester, for each of the individual courses. The average results for the three courses involving Systems and Control is usually 4 into 5, meaning a very positive opinion about them. The students are inquired about several aspects: importance of the course for their perception of the professional life, quality of study and bibliographical materials, experienced quality of learning, coherence between delivered theory and practical exercises, their involvement in learning activities, adequacy of the number of students per class, global appreciation of the lecturers, fairness of evaluation. 7. CONCLUSIONS At the end, the Biomedical Engineering students of the University of Coimbra learned, experienced and developed skills in the main control techniques with practical rd
Mandatory, 3 year, B.Sc.
st
st
Optional, 1 year, M.Sc.
Optional, 1 year, M.Sc.
Computational Models of Physiological Processes
Neural and Fuzzy Computation Neural networks in biomedical applications. Fuzzy Logic. Fuzzy Control.
General Systems Theory Differential equations. Transfer function. State equations. Nonlinear and chaotic systems.
Algorithms for Diagnosis and Self‐Regulation Systems identification. Digital Control. Optimal Control.
Figure 1. The organization of systems and control curricula in the Biomedical Engineering Degree at University of Coimbra. 417