Robots in Therapy for Dementia Patients

This paper presents the application developed for humanoid robots which are used in therapy of dementia patients, as a cognitive stimulation tool. It has been created using BICA, a component oriented framework for programming robot applications, which is also described. The developed robotherapy application includes the control software onboard the robot and some tools like the visual script generator or several monitoring tools to supervise the robot behavior along the sessions. The behavior of the robot along the therapy sessions is visually programmed in a session script that allows music playing, physical movements (dancing, exercises...), speech synthesis and interaction with the human monitor. The monitoring tools allow the therapist interaction with the robot through its buttons, a tablet or a Wiimote device. Experiments with real dementia patients have been performed in collaboration with a research center in neurological diseases. Initial results show a slight (or mild) improvement in neuropsychiatric symptoms over other traditional therapy methods.


Robots in Therapy for Dementia Patients
Abstract-This paper presents the application developed for humanoid robots which are used in therapy of dementia patients, as a cognitive stimulation tool. It has been created using BICA, a component oriented framework for programming robot applications, which is also described. The developed robotherapy application includes the control software onboard the robot and some tools like the visual script generator or several monitoring tools to supervise the robot behavior along the sessions. The behavior of the robot along the therapy sessions is visually programmed in a session script that allows music playing, physical movements (dancing, exercises...), speech synthesis and interaction with the human monitor. The monitoring tools allow the therapist interaction with the robot through its buttons, a tablet or a Wiimote device. Experiments with real dementia patients have been performed in collaboration with a research center in neurological diseases. Initial results show a slight (or mild) improvement in neuropsychiatric symptoms over other traditional therapy methods.
Index Terms-Social Robotics, Humanoid robot, Robot Therapy

I. INTRODUCTION
O NE field of growing interest in robotics is humanoids.
Prototypes such as the Honda Asimo or the Fujitsu HOAP-3 are the basis for many research efforts, some of them designed to replicate human intelligence and maneuverability. Their appearance similar to people facilitates their acceptance and natural interaction with humans as a personal assistant in the field of service robotics, for instance. As a representative sample, the functionality achieved in the Asimo humanoid has progressed significantly in recent years, allowing it to run, climb stairs, push carts and serve drinks.
On other hand, neurodegenerative dementia is a disease that progressively deteriorates brain functionality. One of the most common symptoms of dementia is memory loss. In addition, patients usually lose the ability to solve problems or control their emotions and present changes in personality and normal behavior. Over time, people with dementia are unable to properly perform the basic activities of daily living such as maintaining personal hygiene or food. One type of dementia is the Alzheimer disease. Estimates pointed that in 2006 there would be 26.6 million people worldwide with Alzheimer's disease, and this figure will be three times bigger by 2050. On that date, the Alzheimer will affect 1 in 85 people of the total world population. And 40% of them will be in an advanced state of disease, requiring a level of care that involves high consumption of resources [1].
While there is no causal cure for the disease, palliative medication and nonpharmacological therapy are the only ways patients can improve symptoms and slow down its progression.
Nonpharmacological therapy focuses on strengthening the activities mentally, physically and emotionally. Such actions seek to maintain the functional capacity of the person, while ensuring her levels of quality of life and autonomy. Animal therapy has also shown good results, especially with elderly that live alone. However, it is not always possible. Sometimes the entrance of animals in elder residences it is not allowed due to health and safety reasons. Other times it is the cost of maintaining these animals and the care they need which precludes their presence in the residence. Another issue to consider is that the therapeutic interaction at the cognitive level needed in older people with dementia is not resolved with the presence of animals in the environment of the patient [2].
Regular therapy includes several sessions per week with a human therapist monitoring a group of patients. The therapist asks them simple questions, tells them stories, talks to them, interacts with them, hugs them, suggests games, riddles or guides them while doing physical exercises. These activities pursue the cognitive, affective and physical stimulation of the patients.
In this paper we describe the use of a humanoid robot as a cognitive stimulation tool in therapy of dementia patients. Several software modules have been programmed to generate the robot behavior in the therapy sessions. Three types of robotherapy sessions have been developed: physiotherapy, music and logic-language sessions. The robot and the developed software have been used in a pilot study with real patients to evaluate the feasibility and usefulness of robots in dementia therapy.
The remainder of this paper is organized as follows. Second section presents some works with social robots and their use in dementia therapies. Third section explains all the software developed for this humanoid application, including some tools designed to visually program the robot behavior for the robotherapy sessions. The fourth section describes the experiment performed with real patients to measure the impact of this robotic tool on their health and some preliminary results are presented. Finally, some conclusions are summarized.

II. RELATED WORKS
The interest in social robots is growing, as one of upcoming application fields of the next generation robots. For instance as game platforms [3], personal assistants, nursing robots [4], assistive or rehabilitation robots [5]. In particular, assistive robots, both as mobility aids or manipulation aids, and rehabilitation robots have gained attention in the research community. The International Conference on Rehabilitation Robotics and some special issues in robotics journals (like 2003 special issue on Rehabilitation Robotics in Autonomous Robots, the 2009 one in IEEE Transactions on Robotics and the 2012 special issue on Assistive and Rehabilitation Robotics in the Journal of Behavioral Robotics) are good samples of the growing interest in this research area.
In the past 5 years, several projects have been initiated with the therapeutic use of social robots [6] as reasonable substitutes for animal therapy in people with dementia. Robots do not involve the responsibility or the need for an animal facility and their sensors can respond to environmental changes (movements, sounds ...) simulating an interaction with the patient [7]. At the same time, they provide the opportunity to monitor patients and perform cognitive therapy, unlike animal therapy [8]. Other potential benefits of therapy with robots are that it has no secondary effects (like drug therapy) and does not require specially trained personnel (as opposed to the other therapies such as music therapy, pet therapy, etc..).
The Paro robot, which has seal shape, has been used in dementia therapies [9] with positive results.
Broekens et al published in 2009 [10] a systematic review analyzing the literature on the effects of social robots in the health care of the elderly, especially in the role of the company to the patient. It is noteworthy that all studies are after 2000, which indicates the novelty of this research area. Most studies have been conducted in Japan, Southeast Asia and the U.S. [11]. The main results of analysis of these studies are: • Most of the elderly like robots. • The shape and material of the robot influence the acceptance and the effect of the robots. • Improving health by lowering stress levels (measuring stress hormones in urine) [12] and increased immune system response [13]. • Improvement of humor (through surveys and the evaluation of facial expressions) • Decreased sense of loneliness (using scales measuring loneliness) • Increased communication (measured by the frequency of contact with robots and family). • Remember the past (especially with a robot as a baby). • Some studies indicate that the use of robots helps to reduce the severity of dementia in some patients.

CONTROL
We have used the Nao humanoid robot in the therapy of dementia patients. This robot is sold with a programming environment, named Naoqi, of the manufacturer to develop applications in C++ and Python. Naoqi is a distributed object framework which allows to several distributed binaries be executed, all containing several software modules which communicate among them. Robot functionality is encapsulated in software modules. In order to access sensors and actuators we have to communicate with specific modules like ALMotion or ALVideoDevice module.
Naoqi is voracious, its communication and synchronization mechanisms consume a lot of memory and computing resources, which can affect the robot movements. It is possible to develop basic robot behaviors using only the Naoqi framework, but it is not enough for our needs and the development of complex applications using Naoqi alone is hard. We preferred an architecture that lets us activate and deactivate components, which is more related to the cognitive organization of a behavior based system. That is why we have created a programming framework, named Behaviorbased Iterative Component Architecture (BICA) [14], on top of Naoqi (Figure 1), to develop autonomous applications for our humanoid robots. BICA has been used for several years in teaching robotic courses at Universidad Rey Juan Carlos, in research around the RoboCup environment, and it has also been used for robotherapy. BICA uses Naoqi mainly as a driver to access to robot sensors and actuators. The software of our humanoid robot is organized with a behavior-based architecture. It is implemented in a component oriented software architecture, BICA, programmed in C++ language. Components (like CompA, CompB, etc. in Figure  1) are independent computation units which periodically execute control iterations at a pre-configured frequency. Every component has an interface to modulate its execution and to retrieve the results of its computations.
We have implemented our BICA architecture in a single Naoqi module. The components are implemented as Singleton C++ clases and they communicate among them by method calls (faster than SOAP Naoqi message passing). Each component has a step() method to run once its control (or processing) iteration, this method is periodically called from the timing motor of BICA (further details in [14]). Additionally, the components may include some methods to provide the results of its processing or to receive modulation from others.
The robot applications are organized as a collection of connected components, perceptive ones and actuation ones. Behaviors in BICA are defined by the activation of perception components and actuation components. Actuation components take movement decisions, send commands to the robot motors, or locomotion system, or activate other actuation components. They run iteratively to periodically update their outputs. Perception components take data from robot sensors or other perception components and extract information. They basically provide information to the actuation components. The output of a perception component is refreshed periodically and can be read from many other components in the system. Not all the perception capabilities of the robot must be active at the same time, consuming computing resources. Even more, the whole set of behaviors that the robot is able to eventually perform is not suitable to deal with the current situation. Typically only a subset of available behaviors and perception units are relevant to the current situation. In BICA each component is activable and deactivable at will, so it remains inactive until the situation demands it, when another component activates it. Usually an actuation component activates the perception components it requires and the child actuation components (if any) that implement its control decisions. This activation chain creates a dynamic component tree to cope with the robot's current situation. Figure 2 shows an component activation tree with both perception and actuation components.
Beyond being a framework to integrate perceptive and actuation capabilities for autonomous behaviors, the BICA architecture also includes components that provide access to the basic sensors and actuators of the robot, a Hardware Abstraction Layer (HAL) for robot applications. BICA is built on top of Naoqi, the manufacturer middleware, and offers this HAL as a set of object method invocations. For instance, the Body component provides access to the motion capabilities, both the legged locomotion and the arm movements. The Perception component provides access to the camera images. The LED component provides access to several lights on the robot head and chest, which can be turned on and off from the application software. The Head component provides access to the neck of the humanoid, allowing to rotate the head horizontally or vertically. The Music component provides the capability of playing sound files. It has been specifically developed for the robotherapy application. The stories, questions, songs involved in therapy sessions are stored as sound files and played back using this BICA component.
The behavior based organization of the software of the robot in BICA allows a modular development of robot functionalities, with new components to accomplish new robot tasks or to perceive new associated stimuli.
Beyond the humanoid behavior in the RoboTheraphy application, this architecture has also been used for the programming of humanoid behaviors in other scenarios like the RoboCup competition. We have developed several perceptive and actuation components for the robot soccer player inside the RoboCup Standard Platform League. Some actuation components were programmed as PID reactive controllers and others as Finite State Machines, depending on the complexity of the behavior.

B. Tools: JManager
Several tools have been also created to ease the development of robot applications in BICA. JManager is an external application which centralizes the component debugging and monitorization tools developed for the BICA framework. This tool lets to set up the components, activate, deactivate and modulate them on the fly. The graphical output of some components can be shown on their corresponding tab in JManager. Each component may have an specific tab inside JManager for its debugging. For instance, a color filter tuner tab is shown at Figure 3, which lets us select on the fly the right thresholds for the color filter component. JManager runs at an external computer and connects to the BICA software inside the Nao humanoid using an ad-hoc communication protocol through the wireless or wired network connection. It has been programmed in Java.

C. Tools: VIsual COmponent DEsigner
Some actuation components may be successfully programmed as reactive controllers or simple PID feedback controllers. Many times the complexity of the components fits well in finite state machines (FSM). Using FSMs powerful components can be programmed, which unfold complex behaviors.
But developing complex behaviors based on FSMs directly in C++ may be complicated and prone to errors. Because of this we have developed a useful tool, named VICODE (VIsual COmponent DEsigner), that automatically generates C++ BICA component code from a visual description of the finite state machine 4. We use VICODE for the development of complex components, and even for the basic ones, as the code generation is faster and more reliable using it than writing the code manually. This tool lets us design an iterative finite state machine setting its states and transitions. Each state has a source code attached to be run at each iteration of the FSM being in such state. At the same time it has a source code to check possible transitions from it to other states when certain perceptive conditions are met. Furthermore, we can visually establish which components are used in each state, and whether it is a modulation or a requirement link. VICODE is included in the JManager tool as a tab.
VICODE generates the component C++ code. This includes the state machine code, the headers file with the component API, and calls to the step() method of the components that it uses or modulates. VICODE lets us to edit the states and transitions code. This code is even refreshed if the code is externally edited to avoid inconsistencies. Transitions are defined as functions that return true or false if the transition has to be taken. This information to make the decisions can be provided by other components or by a timer (used for timebased transitions).

IV. ROBOT SOFTWARE FOR ROBOTHERAPY
We have developed several software pieces for the use of humanoids in dementia therapy. The robot behaviors in therapy sessions are described mostly as a sequence of basic movements, music or text playing and light turning on-off operations. A file format syntax has been developed to store these behavior descriptions, they are called session scripts.
Some specific components inside BICA have been developed, like one that runs session scripts or other that provides access to robot lights from application software. In addition, some new tools have also been created: a session script generator that allows an easy and visual "programming" of robot behavior in therapy sessions, and session monitoring tools that help to the therapist to control the session progress. They are all described in this section.

A. Session script generator
The robot behavior set required for robotherapy application is smaller than for other fully autonomous applications like the robotic soccer in RoboCup. In essence, the robot behaviors in therapy sessions are described mostly as a sequence of basic movements, music or text playing and light turning on-off operations. They are usually launched together as the robot may be playing a song and dancing at the same time, for instance.

Fig. 5. Session script generator
A high level language has been developed to store these behavior descriptions. They can be stored in text files following a given syntax and read from them. They are called session scripts. The language includes three basic instructions: move, music and light. Two or three basic operations of different type can be grouped together, in group instructions, to be executed simultaneously. The robot behavior is a sequence of these basic or group instructions. In the script some synchronization points can be included to wait for the termination of all the basic instructions inside a group. In addition, the wait instruction causes the robot to stop execution until the therapist provides the continue order, striking one button in the robot body, or in the Wiimote, or using any monitoring tool. This allows the therapist to control the session progress. move introduction music /home/nao/mp3/sound02.mp3 wait task mov wait task music wait press left breakpoint The scripts are generated and stored in text files. The example in Figure 6 starts two actions: the robot movement task and the playing of a sound file. The move command accepts a file with the robot position sequence. The music command accepts the file with the sound to be played. Then waits until both tasks have finished. Then waits until the robot left button is pressed. The contents of the real sessions are designed by medical doctors and health assistants, attending to the desired stimulation in the dementia patients. At the beginning they were created directly editing text files. Recently we have developed a graphical tool, the session script generator ( Figure  5), that allows a fast and visual creation of these scripts.

B. Movie component
One specific component has been developed inside BICA for the robotherapy application, the Movie component. It accepts session scripts as input and runs the corresponding orders to robot motors and actuators, at the proper timing, unfolding the specified robot behavior. It uses several HAL components available in BICA, like the Body, LED, Music and Head components, as shown in Figure 7. For dancing the robot has previous descriptions of its movements. They are stored as single files following a given syntax, and they can be referenced in the scripts run by the Movie component. Those movement files include the position of all robot joints and the right time for each one. For singing or story telling the corresponding song and text are stored as sound files, and they can also be referenced in the session script.

C. Session monitoring from a computer
The therapist needs a way to communicate with the robot, to start a robotherapy session, to stop its execution while the patients answer one of the robot questions, to repeat any script step, etc.. The initial basic interface with the real robot is the set of buttons on its feet and chest. At the beginning these buttons were used, but we developed three session monitoring applications to allow an easier way to control the robot.
The first session monitor is an application running on a regular computer. It offers a Graphical User Interface with sliders, selectors, visual buttons, etc. as shown in Figure 8. It allows the teleoperation of the robot body and head, in order to approach the robot towards the patients at the beginning of the sessions, for instance. It can be operated from an external personal computer or a laptop.

D. Session monitoring from a tablet
In order to improve the tool usability, a second session monitor has been created that runs on mobile devices like Android tablets or smartphones (Figure 9). Using it no extra computer is required, just the robot and the tablet or smartphone. With this monitor the therapist has full control of the progress of the therapeutic session. Fig. 9. Session monitor at a tablet Interaction between different BICA components is performed as local method invocation of other component objects. An specific module has been developed for communication between BICA and software outside the robot, for instance the communication between these session monitor tools and the Movie component onboard the robot. This module and the session monitor use ICE as communication middleware, both in the robot side and in the Android side of the system (smartphone or tablet) ( Figure 10).

E. Session monitoring from Wiimote
The session monitor can be used in conjunction with a Wiimote. This device is more convenient than the regular screen, keyboard and mouse configuration. In this case the session monitor reads the therapist orders from the Wiimote buttons and accelerometers using bluetooth ( Figure 11). An external application, named Motej and written in Java, receives Wiimote data using via bluetooth and sends them to the Movie component inside the robot. It works on a off board computer (as the robot hardware does not include bluetooth) and uses ICE for that communication.

V. EXPERIMENTS
The platforms available for this project were initially three: the robot seal Paro, the Aibo robot dog and the Nao humanoid. One of them needed to be selected for the real experiments.
The mobility of the robot seal Paro is mainly confined to its head (its eyes move). It also produces sounds that simulate those of a baby seal. The robot dog Aibo and the Nao humanoid offer much more functionality: they are both also nice to look at, they walk, move their head, have lights and make sounds. The larger size of humanoid makes it more visible than the robot dog. In addition, the humanoid robot is most useful in physical therapy, as it can perform physical exercises that can be directly mimicked by patients. This is a key issue.
From a technical point of view, the development of software for the robot seal Paro is complicate because it is a closed platform. Our group has extensive experience in the programming of the other two platforms in the RoboCup environment. One difference in favour of the humanoid robot Nao is the availability. Although we have several Aibo robots and it was a bestselling commercial robot, since 2008 its manufacturing has been discontinued. Currently our group is participating in the RoboCup with the Nao humanoid, and the software architecture developed to control the robot in this environment, BICA, is general enough to host the robot software for the robotherapy application.
The Aibo and humanoid robots were tested with real patients to see their acceptance ( Figure 12). The Nao robot was presented to a group of 20 patients with differing severity of dementia. The humanoid robot was accepted by most of them: 80% showed a very positive attitude, 15% did not react and 5% (one person) showed aggression towards the robot (and also to therapists and psychologists). Most patients identified him as a child and tried to talk to him. For all these reasons, the Nao humanoid was the selected platform. Nao robot is a fully programmable humanoid robot. It is equipped with a x86 AMD Geode 500 MHz CPU, 1 GB flash memory, 256 MB SDRAM, two speakers, two cameras (non-stereo), Wi-Fi connectivity and Ethernet port. It has 25 degrees of freedom. The operating system is Linux 2.6 with some real-time patches. The robot is equipped with an ARM 7 micro-controller allocated in its chest to control the robot's motors and sensors, called DCM.

A. Therapy sessions
The therapy session contents have been designed by therapists specialized in the disease of dementia. The robotics work focused on developing the software required so that these sessions can be carried out with maximum similarity to how they were conceived. We developed all the required software components, sounds and robot movements, and proposed new tools to be used and evaluated. We performed cognitive therapy and physiotherapy sessions, 2 days/week during one month with a humanoid robot in a group of 13 patients ( Figure 13). Evaluation at baseline and follow-up was carried out with scales to detect apathy, quality of life and dementia severity. Most of the patients had moderate-severe dementia (Figure 14), mean age 83.2 years (range: 74-91) and 92% were women. Each session took between 30 and 45 minutes, and was recorded by two cameras. We designed four types of sessions: language, music therapy, storytelling and physiotherapy. Cognitive therapy included music therapy, playing activities and language sessions. In the language sessions the robot asked about numbers, days of the week and set riddles and questions aimed at cognitive activation. In the music therapy sessions the robot combined basic questions related to popular songs. Physiotherapy sessions (Figure 15) consisted of a set of exercises that the robot explained and performed: movements of arms, head, torso and walking exercises. In storytelling sessions the robot told a story, moving itself and turning its lights on at the same time, there was no direct interaction with patients.
The sessions for patients with severe dementia cannot be structured as those for people with moderate dementia because they are unable to maintain attention long enough to be effective. For them we designed a set of activities to be carried out by the robot: walking towards a patient, looking at her face, making sounds of animals, etc. -these actions seemed to improve their apathy. Some of these activities (walking towards a patient and looking at her face) were also applied during the sessions with the rest of the group, also improving their responses. To carry out these activities, we extended the software and robotic tools to be easily managed by the therapists. The Wiimote extension of the session monitor and the tablet-based session monitor has been developed after observing in the experiments the autonomy needs of the therapists.

B. Preliminary medical results
Some preliminary medical results have been presented in medical forums and are better explained in [15]. All scales showed a trend to improvement in neuropsychiatric symptoms, apathy and quality of life, although Wilcoxon test showed no significant statistical differences between baseline and followup. Patients accepted well the robot and participate as actively in therapy sessions with robot as in the regular sessions.
This pilot study showed that a clinical study using robots for cognitive therapy in dementia institutionalized patients is possible. Currently we are using robots as a new tool for dementia therapists in a pilot clinical assay to discover the effect of this new non pharmacological treatment compared to habitual treatment. We involve more than a hundred patients, use a control group to compare and the evaluators are blind to the therapy.

VI. CONCLUSIONS
In this paper we have presented a cutting edge application of humanoid robots in the therapy of dementia patients.
We have developed several software pieces to support this application. First, our BICA software architecture integrates all robot perceptive and actuation capabilities. Second, a software module helps to visually generate session scripts. These session scripts are simple descriptions of robot behaviour sequences during the therapeutic sessions. They involve music playing, movements and light generation capabilities onboard the humanoid. They have been created with the knowledge and support of medical experts, and are stored in single files. Third, a software module inside BICA runs the session scripts on the real robot. Fourth, a monitor module allows the human therapist to control the script execution, proceeding with the next behaviour, repeating steps, etc., and so modulating the session development. Two different monitors have been developed, one running on a regular PC and another one running on an Android tablet. The Wiimote device support has also been incorporated for easy robot control by the therapists, improving their autonomy.
Four kinds of sessions have been prepared and performed: storytelling, music therapy, physiotherapy and logic-language therapy. In music sessions, the robot plays songs from the years when the patients were young, trying to stimulate their emotions. In physiotherapy sessions, the robot performs several physical exercises with the intention of being repeated by the patients. Logic-language therapy is based on several simple questions to cognitively stimulate the patient responses.
The preliminary medical results on real patients with moderate dementia are promising. Their neuropsychiatric symptoms tend to improve over those of patients following classic therapy methods, but further research is required. Surprisingly the robot captures the attention of the elderly due to its human shape, its movements and music capabilities.
We are working on extending the direct interaction between the patients and the humanoid robot. For instance, the real patient showing coloured cards to answer questions set by the humanoid. Also we are programming the robot with more autonomous behaviours like face tracking or people following. In addition, we have started the migration towards ROS in the Nao humanoid as a standard replacement of BICA middleware.