OPTIMISING CONTROL ALGORITHMS IN
BIOFEEDBACK-SYSTEMS
First Steps Towards Model Identification Adaptive Controllers
Carolin Zschippig, Carsten Rachuy and Kerstin Schill
1
Group of Cognitive Neuroinformatics, University of Bremen, Enrique-Schmidt-Strae 5, 28359 Bremen, Germany
Keywords:
Adaptive computing, ANFIS, System identification, Model Identification Adaptive Controllers (MIAC),
Ambient assisted living, Biofeedback, Galvanic skin resistance, Adaptive software.
Abstract:
We explore the potential of model identification adaptive controllers (MIAC) within a biofeedback system.
Through the application of an adaptive control algorithm, the system performance could be optimised with
respect to time. In a series of experiments the galvanic skin resistance of test subjects playing a computer
game was recorded. On this data, a system identification was performed, utilising an Adaptive-Network-based
Fuzzy Inference System (ANFIS). The results serve as a basis for the development of the adaption laws of the
MIAC and allow conclusions about suitable controllers.
1 INTRODUCTION
Current demographic surveys indicate a shift in the
population structure of Germany, where especially the
relation between younger and elderly people is af-
fected by decreasing birth-rates and increasing life ex-
pectancy. In the year 2060 one third of the population
is expected to be over the age of 65 (Pl
¨
otzsch, 2009).
As a direct result of these demographic changes, the
share of people living in their familiar environments
even in old age will increase accordingly. As aging is
a process which has a negative impact on the physi-
cal and cognitive capabilities of the human body, ac-
tivities of daily living are not only becoming more
difficult to perform but the risk of accidents, med-
ical emergencies and age-related diseases increase.
This poses new challenges for research areas like
telemedicine and ambient assisted living (AAL).
In the former, the user’s physiological conditions
are monitored, with the aim to detect alarming trends,
emergency situations or to provide preventive mea-
sures. In the latter, the aim is to create environments
which support people during their activities of daily
living while simultaneously being capable of recog-
nising emergency situations.
In both cases, physiological signals are either
mandatory or an additional source of information
about the user’s current state.
Preventive measures which fight the onset of fre-
quently encountered health conditions in elderly peo-
ple, like loss of balance, chronic obstructive pul-
monary disease, heart failure or dementia, are often
implemented in systems which actively incorporate
the user through the promotion of physical and mental
exercise (Morris, 2006), (Chiari et al., 2009), (Bosch
et al., 2009), (Oswald, 2007). One approach to de-
signing these systems is using biofeedback, where the
term biofeedback describes a loop consisting of cap-
turing physiological data and the feedback of this data
to the person.
The captured physiological signals are generally
imperceptible to the person on a conscious level, es-
pecially their dynamic properties. Hence the signals
are pre-processed for the feedback and presented to
the person in an easily perceivable manner. Based on
the knowledge about the dynamic physiological sig-
nals, the person is to apply strategies to purposefully
alter his/her physiological state. The most common
styles of presentation are auditory and visual signals
(Rief and Birbaumer, 2006).
In this paper we present a biofeedback system
designed as a game-like computer program which
guides the user into a predefined affective state, so
that the measured data can be utilised as reference val-
ues for later inference processes. Our work is based
on (Rachuy et al., 2011) where we proposed a wear-
able sensor device which is able to measure physio-
logical signals and provide these measurements as in-
put data for successive inference steps about the user’s
affective state.
207
Zschippig C., Rachuy C. and Schill K..
OPTIMISING CONTROL ALGORITHMS IN BIOFEEDBACK-SYSTEMS - First Steps Towards Model Identification Adaptive Controllers.
DOI: 10.5220/0003771702070212
In Proceedings of the International Conference on Health Informatics (HEALTHINF-2012), pages 207-212
ISBN: 978-989-8425-88-1
Copyright
c
2012 SCITEPRESS (Science and Technology Publications, Lda.)
2 BIOFEEDBACK-SYSTEM
DESIGN
When designing a biofeedback system, two key fac-
tors are of significance: how to represent the captured
data and how to map the dynamics of the data to the
chosen representation.
The decision on how to represent the physiolog-
ical measurements is guided by multiple objectives.
Foremost, the representation should enable the users
to consciously perceive the state of their physiologi-
cal signals and the changes these physiological states
undergo. This can be achieved through a visual rep-
resentation of the data as a factual line plot or numer-
ical value, but the devised requirement of perceptibil-
ity also allows for many more and more abstract di-
agram styles, up to the representation in a game-like
virtual environment (WildDivine, 2010), (SomaticVi-
sion, 2009). Further design objectives are to motivate
the user to engage with the biofeedback system on
a regular basis, despite the repetitiveness of the task.
This deserves particular attention if the biofeedback
system is used as a preventive measure, since the mo-
tivation can not be drawn from the user’s desire to get
relief from a medical condition.
When representing the data in a game-like envi-
ronment the proximity to entertainment technology
facilitates the motivation of continuous engagement.
In these environments a combination of auditory and
visual presentation components can be utilised. Pa-
rameters for the representation of the physiological
states and their dynamics can for example be colour
attributes like chrome or hue, sound attributes like
tempo or volume or the position and movement of ob-
jects. The choices which parameters to use are gener-
ally based on implicit expert knowledge about the aes-
thetics of computer games, formal criteria do hardly
exist (Nacke, 2009).
In addition to the choices of how to represent the
measured values there is the question of how to map
the dynamics of the measured values to changes of the
visual and auditory parameters. The most straight for-
ward and intuitive method is a proportional mapping.
While this approach will lead to a functional biofeed-
back system, it is not necessarily the optimal system
configuration. The application of time-optimising
strategies holds the potential to create a system which
will allow for the user to achieve faster progress in the
alteration of his/her physiological states.
In purely technical systems, the optimisation of
the control strategy is usually done on the basis of a
mathematical description of the system. In a biofeed-
back system, such a description would have to include
a mathematical modelling of the physiological reac-
Figure 1: Block diagram of a MIAC.
tion of the user. Since this reaction can be subject
to the conscious exertion of influence by the user, it
is highly complex and an analytical approach for a
mathematical modelling is not a feasible strategy. An
alternative lies in the application of model identifica-
tion adaptive controllers (MIAC), schematically de-
picted in figure 1.
A MIAC can be implemented with very little a-
priori knowledge about the system’s behaviour (Is-
ermann, 1987). Contrary to classical control theory,
the identification of the system and the optimisation
of the controller is not done sequentially, but at the
same time. This approach is of advantage if there is
uncertainty of the quality of the identification, which
can e.g. be due to stochastic disturbances inhibit-
ing the convergence of the identification algorithm.
In the case of biofeedback systems, online identifica-
tion also allows for the incorporation of interpersonal
differences between individuals, since the system be-
haviour does not have to be generalised.
The keyword adaptive describes the property of
the control system to adapt its behaviour according
to the changing properties of the controlled process.
With an adaptive controller a system can be run in a
stable condition, as long as certain preconditions con-
cerning the identification method and structure of the
control algorithm are met.
To test and optimise the performance of the cho-
sen identification model, adaptation laws and control
structure, the system has to be operated in a closed
loop. In the case of a biofeedback system, this means
it is necessary for a test subject to be present through-
out the optimisation process. To minimise the test-
ing period, we propose an off-line system identifica-
tion, to be able to better estimate applicable controller
structures and adaption laws.
3 SYSTEM IDENTIFICATION
THROUGH ANFIS
The physiological reaction of a person within a
biofeedback loop can be described as dynamic
and non-linear. Therefore, a suitable identification
method should be able to approximate dynamic and
non-linear behaviour. Since the system structure and
HEALTHINF 2012 - International Conference on Health Informatics
208
internal states of the system ”human” are not clearly
definable or measurable, the identification is imple-
mented as a so called ”black-box-model” (Schr
¨
oder,
2010). The identification is done on the basis of ex-
perimentally gathered data.
In this paper, we describe the implementation of
a Adaptive-Network-based Fuzzy Inference System
(ANFIS), which is a hybrid of fuzzy-logic and neu-
ral networkc, capable of dealing with ill-defined and
uncertain systems (Karray and Silva, 2004).
In an ANFIS, a Sugeno-type fuzzy model is put
into the framework of an adaptive neural network, en-
abling the application of network learning algorithms
(Jang et al., 1997). When implemented as a first-order
Sugeno model, the algorithm basically approximates
the dynamic non-linear output function as a weighted
superposition of local linear (time-invariant) models.
The weight assigned to each local model is dependant
on the value of activating parameters, which make up
the input space of the net. Which of the input pa-
rameters are to appear in the local linear models is an
adjustable design parameter. It is therefore possible to
incorporate time-dependency into the activation vari-
ables, but avoid it in the linear models. Also, the input
space can contain parameters which are not control-
lable, but involve an information gain for the validity
area and period of the linear models. If the identifi-
cation of the overall system behaviour as a piecewise
linear, time-invariant function is successful, the online
identification within the MIAC can be implemented
as linear time invariant functions. As a consequence,
the control algorithm can also be linear, allowing for
the application of well defined design and optimisa-
tion tools.
4 IMPLEMENTATION
Our biofeedback system was designed as a computer
game. The game was purpose-made for the experi-
ments in order to be able to easily control all rele-
vant variables and integrate measured values in real
time. It was implemented in Java3D. The game genre
was chosen considering the following requirements:
(1) For the adaptive control algorithm it is advanta-
geous if the system is influenced as little as possi-
ble by disturbance, since the goal of the control algo-
rithm is a good reference transfer behaviour and not
noise rejection. Therefore the game should contain
little elements which influence the user, but are not
actuating variables. (2) The game should be able to
influence the user constantly through the same actu-
ating variables. This is facilitated by game mecha-
nisms which provide for the execution of a single task
over a longer time period. (3) The user should not
have the opportunity to define and pursue meta-goals.
If the user strives to fulfil a goal different from the
one predefined by the game design, the control efforts
will be noneffective or even counter-productive. The
game should leave the user little room for manoeu-
vre, meaning it should be of limited complexity. (4)
The game needs to include dynamic elements, whose
variation during the game will not interrupt the game
flow.
Based on these criteria, the game was designed as
a racing game. The user is challenged to steer an
avatar, depicted as a large sphere, keeping it within
a marked track, see figure 2. The actuating variable
to be controlled by the algorithm is the velocity of the
avatar. Synchronous to a change in velocity the colour
scheme of the game is manipulated. A certain veloc-
ity corresponds to a certain colour, improving the per-
ceptibility of the actuating variable. As an incentive to
perform well on the assigned task, points are awarded
to the player for the position of the avatar. The in-
clusion of this mechanism facilitates a higher immer-
sion of the subjects into the game (Fairclough, 2009).
High immersion ensures that the recorded physiologi-
cal reaction is caused by the game, not environmental
influences.
5 EXPERIMENT SETUP
In a series of experiments we recorded the physiologi-
cal reaction of test subjects playing the game as input-
output tuples for system identification. The physio-
logical parameter examined was the galvanic skin re-
sponse.
The group of test subjects consisted of 14 peo-
ple, 8 male and 6 female. The test subjects volun-
teered for the experiments and did not receive any
reimbursement. All subjects had an academic back-
ground, the mean age of the group was 27,3 years
(Min=20, Max=33, with two subjects refusing to give
precise information). Upon invitation, the users were
informed about health preconditions for participation.
Prior to the experiment and immediately after, the par-
ticipants were asked to fill out a questionnaire regard-
ing personal information and the subjective game ex-
perience.
The users were asked to steer the avatar and try ac-
tively to relax during the game. The instructions were
given in written form. The game was presented on
a 22” LCD-computer monitor, type Samsung Sync-
Master 2233RZ: 120Hz, and speakers placed on the
left and right of the monitor. The user was seated on a
comfortable office chair. The experiments were con-
OPTIMISING CONTROL ALGORITHMS IN BIOFEEDBACK-SYSTEMS - First Steps Towards Model Identification
Adaptive Controllers
209
Figure 2: Practise game screen.
ducted in a university laboratory.
The user controlled the movement of the avatar
by acceleration sensors, placed on the back of her/his
dominant hand. Through the rotation of the hand
along the arm axis the avatar was moved horizontally,
from left to right. The velocity of the avatar was the
actuating variable and could not be influenced by the
user. Prior to the experiment, each user had up to
two minutes to familiarise him-/herself with the game
controls. The game was run in practise mode, with a
constant velocity of 0,6 m/s and the design seen in fig-
ure 2. After the user felt confident about the controls,
but not later than 2 min, the experiment started. The
variable training time was implemented to accommo-
date the varied experience of the users with computer
games and control through motion.
6 INPUT PARAMETER
SPECIFICATION
Ideally, the experiments should incorporate all possi-
ble states of the actuating variable, so that the system
model covers the entire input space. Due to the fact
that it is a dynamic system, the order of presentation
of the actuation states is of significance.
For the first set of experiments, we assumed the
model order to be two. For the time-step k, the sys-
tem output y(k) is dependant on the state of the actuat-
ing variable u(k 1), the previous state of the system
output y(k 1) and the previous state of the actuat-
ing variable u(k 2). The physiological reaction to
a stimulus in the galvanic skin response is subject to
latency (Stern et al., 2001). This latency d
t
has to be
taken into account in the model formulation. With
these assumptions the local linear models become:
y(k) = b
1
u(k1d
t
)+b
2
u(k2d
t
)a
1
y(k1)+c
The variation of the actuating variable
velocity+colour during the experiments followed
a predefined schedule. The limits of the range of
values for the actuating variable were determined in
preliminary tests. The continuous range of velocity
values was discertised into 10 equally distanced
values. Out of these values a complete parameter set
of 100 combinations was constructed, consisting of
two consecutive velocities. The tuples were sorted to
form a consistent succession of all possible velocity
changes. During the experiment each velocity was
held constant for 10 seconds, resulting in a total
experiment time of approx. 17 minutes. For each ex-
periment the succession was permuted. The galvanic
skin response was measured on the index and ring
finger of the subject’s dominant hand. Additionally
to the physiological reaction, we recorded the exerted
acceleration, the position of the avatar, the state of
the actuation variable, the absolute game time and the
awarded points.
We evaluated this data prior to the system iden-
tification to examine which parameters should make
up the input space of activating parameters to deter-
mine the validity area and period of the linear models.
For this evaluation we made use of questionnaires and
performed a correlation analysis between the answers
given by the test persons and the recorded data. The
correlation analysis allowed for the following conclu-
sions: (1) The test subjects were under the impres-
sion that their performance in steering the avatar and
keeping it on track improved over the duration of the
experiment. This is in accordance with the recorded
values of the avatar position. Therefore, the absolute
game time is likely to posses an information content
for the validity period of the local models. (2) The
test subjects stated that the position of the avatar (on
track or off track) has had an influence on their abil-
ity to relax during the game. This supports the hy-
pothesis that the position of the avatar in reference to
the track should be part of the system model’s input
space. (3) The test subjects were influenced by the
dynamics of the background music. Initially designed
as an element to improve the immersion in the game,
the background music was perceived as having ”fast”
and ”slow” passages. Therefore, the relative volume
of the background music should be assessed regarding
its information content for the validity area. Based on
these conclusions, the input space of the system iden-
tification model was set as:
u
in
=
y(k 1)
u(k 1 d
t
)
u(k 2 d
t
)
onTrack(k 1 d
t
)
music(k 1 d
t
)
time(k 1 d
t
)
(1)
HEALTHINF 2012 - International Conference on Health Informatics
210
7 RESULTS
For the training of the ANFIS a training data matrix
is constructed. Every row of the matrix contains the
input data for the simulation time step k and in the
last column the measured system output y(k + d
t
) in-
corporating the latency d
t
. After training, the perfor-
mance of the net is evaluated using a validation data
set, which has the same shape as the training data.
The quality criterion is the average percentage error
with:
Err
ap
=
|
y
measure
y
net
|
|
y
measure
|
· 100
In order to obtain a unique solution when opti-
mising the ANFIS through the method of linear least
squares, the number of training data tuples P should
be at least equal to the number of optimised param-
eters m
φ
(Jang et al., 1997). Considering the likeli-
ness of a noise-induced error, it is beneficial to have
P m
φ
. The number of parameters depends on three
variables:
- the shape of the local models
- the number of net inputs u
in
- the number of membership functions MBFn
The number of membership functions determines the
granularity of the discretisation of the input range of
each parameter. With the defined shape of the local
models and the input (as eq. (1)), the maximum num-
ber of MBFs is given by:
P 4 ·
6
i=1
MBFn(u
i
)
The first ANFIS was trained with the structure in
table 1:
Table 1: Structure ANFIS No.1.
u
in
6
MBFn [3, 3, 3, 2, 3, 3]
rule base full
activating function generalised bell
number of training tuples 108928
number of validation tuples 8379
tuples/parameter ratio 56
The average percentage error amounts to
Err
ap
= 16, 53%, with nine-fold cross validation.
The results are summarised in table 2. The change
in the galvanic skin resistance after the presentation
of a stimulus lies at about 5-50% (Stern et al., 2001).
Therefore, it would be desirable to achieve an average
percentage error of less than 5,0 % with every net.
All but one validation produces error values 10%.
The reason for the significantly worse performance
Table 2: Validation results.
ANFIS 1 ANFIS 2
Err
ap
Err
ap
Err
ap
P
m
φ
= 56
P
m
φ
= 47, 5
V6 3, 76% 39, 4% 1, 6%
V7 10, 28% 275, 4% 1, 7%
V8 5, 22% 20, 9% 1, 2%
V9 110, 02% 247, 2%
V10 4, 75% 21, 2%
V11 2, 78% 20, 0%
V12 1, 64% 5, 0%
V13 4, 86% 22, 1%
V14 5, 47% 86, 2%
Mean 16, 53% 81, 9% 1, 5%
of V9 could not be determined. It could be due to a
faulty attachment of the sensors or the test subject
might a person whose skin conductance does only
very weakly respond to the affective state.
In figure 3 the best performing and in figure 4 the
worst reasonably performing validation is depicted.
0 2000 4000 6000 8000
1.5
2
2.5
3
3.5
x 10
−3
Data tuples
Output
ANFIS Output
Data
Figure 3: Best performing validation ANFIS 1.
1000 2000 3000 4000 5000 6000 7000 8000
0
2
4
6
8
10
12
x 10
−3
Data tuples
Output
ANFIS Output
Data
Figure 4: Worst performing validation ANFIS 1.
Taking a closer look at the results of the valida-
tion with the worst but reasonable performance, V7,
it becomes evident that the net’s performance is not
uniform. There are some input value combinations
for which the approximation error is comparatively
larger. This points towards the conclusion that the
partitioning of the input space through the chosen
OPTIMISING CONTROL ALGORITHMS IN BIOFEEDBACK-SYSTEMS - First Steps Towards Model Identification
Adaptive Controllers
211
number of membership functions is not yet ideal and
should be explored further.
To evaluate the influence of the data tu-
ple/parameter ratio, we trained ANFIS 1 with the
data of 11 out of the 14 experiments, which equates
to a data/parameter ratio of 47,5 (see table 2). The
resulting mean average percentage error amounts to
Err
ap
= 81, 9%, which is significantly larger than for
the first training. Increasing the number of mem-
bership functions by one for one input would result
in a data/parameter ratio of 41,9. The improvement
gained by a higher input space resolution would be
negated by the low data/parameter ratio, therefore in-
creasing the number of membership functions was
postponed until further data is available.
To further improve the simulation results and to
examine the information content of the chosen acti-
vation variables, ANFIS 2 was trained. Its structure
remained the same as ANFIS 1, except for the input
space, where the parameter time was omitted.
This modification improved the net performance
significantly, leading to an average percentage error
of only Err
ap
= 1, 5% after three-fold cross valida-
tion. Evaluating the resulting linear functions re-
vealed however that this is achieved by modelling the
output as constant, with the superposition of all linear
functions taking approximately the form y = u
1
.
8 CONCLUSIONS
We designed and implemented a biofeedback system
as a game-like computer program to guide the user
into a predefined affective state. As a first step to-
wards the development of a model identification adap-
tive controller which will optimise the biofeedback
system with respect to time, we conducted a series
of experiments.
Our goal was the approximation of the system as
linear time-invariant models, allowing for the appli-
cation of well defined and efficient optimising tools
when designing the control algorithm and the adap-
tion laws. While being able to generate models with
average percentage errors below 2%, the examined
model structure did not yet reveal a correlation be-
tween the skin conductance and the controllable vari-
ables of the biofeedback game.
However, since the data/parameter ratio showed
to have a high influence on the net’s performance, we
conclude that for an exhaustive analysis of the influ-
ence of the input partitioning, more data is necessary.
With the higher granularity of the input space, the
generalisation requirement of the linear models is re-
duced. This could result in more accurate models bet-
ter suited to depict the correlation between skin con-
ductance and game parameters.
Further research is suggested to determine
whether an ANFIS can be trained to approximate the
system’s behaviour and to find a suitable foundation
to construct a MIAC in which the system is identified
online as a linear time-invariant model.
REFERENCES
Bosch, S., Marin-Perianu, M., Marin-Perianu, R., Havinga,
P., and Hermens, H. (2009). Keep on moving! activ-
ity monitoring and stimulation using wireless sensor
networks. In EuroSSC’09 Proceedings of the 4th Eu-
ropean conference on Smart sensing and context.
Chiari, L., Farella, E., Rocchi, L., and Benini, L. (2009). A
biofeedback based portable device to support elderly
mobility in the home environment. In World Congress
on Medical Physics and Biomedical Engineering.
Fairclough, S. H. (2009). Fundamentals of physiological
computing. Interacting with Computers, 21:133–145.
Isermann, R. (1987). Digitale Regelsysteme. Springer
Berlin Heidelberg.
Jang, J.-S., Sun, C.-T., and Mizutani, E. (1997). Neuro-
Fuzzy and Soft Computing - A Computational
Approach to Learning and Machine Intelligence.
Prentice-Hall.
Karray, F. O. and Silva, C. W. D. (2004). Soft computing
and intelligent systems design: theory, tools, and ap-
plications. Pearson Education.
Morris, M. (2006). Biofeedback revisited: Dynamic dis-
plays to improve health trajectories. In PERSUASIVE
2006.
Nacke, L. (2009). Affective Ludology: Scientific Measure-
ment of User Experience in Interactive Entertainment.
PhD thesis, Blekinge Institute of Technology, School
of Computing.
Oswald, W. D. (2007). Pr
¨
avention der demenz das sima-
projekt. Public Health Forum, 15:28.
Pl
¨
otzsch, O. (2009). Bev
¨
olkerung Deutschlands bis 2060
- 12. koordinierte Bev
¨
olkerungsvorausberechnung.
Statistisches Bundesamt, Wiesbaden.
Rachuy, C., Budde, S., and Schill, K. (2011). Unobtrusive
data retrieval for providing individual assistance in aal
environments. In International Conference on Health
Informatics 2011.
Rief, W. and Birbaumer, N., editors (2006). Biofeedback
- Grundlagen, Indikatoren, Kommunikation, praktis-
ches Vorgehen in der Therapie. Schattauer GmbH.
Schr
¨
oder, D. (2010). Intelligente Verfahren: Identifikation
und Regelung nichtlinearer Systeme. Springer Berlin
Heidelberg.
SomaticVision, I. (2009). Somaticvision. abgerufen am
11.11.10.
Stern, R. M., Ray, W. J., and Quigley, K. S. (2001). Psy-
chophysiological Recording. Oxford University Press,
Inc.
WildDivine (2010). Wilddivine. abgerufen am 10.11.10.
HEALTHINF 2012 - International Conference on Health Informatics
212