Abstract
Human–robot interaction requires the robot to recognize and convey emotions. Emotions also enhance adaptation by influencing deliberative actions. However, scientists traditionally relegate the emulation of emotions to high levels in multi-level architectures, where those emulated emotions collaborate with reasoning to come up with the best action. In contrast, in this research, we propose the use of emulated emotions at the lowest level of a cognitive architecture, for instance, robot motion control. Thus, the traditional definition of error used by a controller changes in order to include anticipation. The discrepancy between an anticipated ideal state and an anticipated robot state elicits an emotion. This simple emotion-inspired definition of the error improves the controller by more than 11% according to the definition of performance in this article, which argues that robot control architectures should use emulated emotions from their lowest levels.
Introduction
Researchers in robotics have recently studied the use of emulated emotions in robots because emotions might be the key to enhancing the capabilities of a control system. Regardless of this opportunity, most of the current control strategies copy almost exclusively a reason-like process in the brain with no recourse to emotion. The emulation of emotions thus allows designers to think about how to solve problems using nontraditional schemes or tools.
The main contribution of this article regards the use of emulated emotions since the lowest level of a control architecture. This, contrary to the current point of view where those emotions find a purpose only in the mid- or high-levels of control. Using experimental evidence, we show that emulated emotions serve to accomplish tasks such as following a reference value or tracking a path. An emulated emotion is elicited as a proportion of the discrepancy between an anticipated robot state and an anticipated ideal state, as happen in humans with anticipatory emotions. 1 Thus, and given the anticipation, an emulated emotion constitutes an enhanced version of the error in traditional control, which only look at current states. The new controller uses a homeostatic point of view aiming for matching anticipations, whereas traditional control looks for eliminating the current error.
The rest of this article is organized as follows. The next section focuses on trajectory generation techniques and emotion in robots. The following three sections provide definitions for emotional states, reference path, and control architecture, respectively. There is an especial emphasis on the definition of the anticipated variables, because they serve to define emulated emotional states. Next section presents the application of the proposed controller. In this section, the controller leads the robot through several loops by tracking the reference path. Then, the discussion section, and finally we present conclusions and future work.
State-of-the-art review
Two main areas to consider when it comes to controlling robots using emotion are trajectory generation and emotions in robots. The first area defines not only the reference path but also looks at speeds and accelerations for that path. A common approach to generate a trajectory uses waypoints and then applies an algorithm to join them in a continuous curve. Bézier curves are an instance that applies to a mobile robot. 2 Another approach looks for fast approximations, so that the trajectory might be used as a model in control, as done with a quadrocopter by Hehn and D’Andrea. 3 A quadrocopter is complex, but an articulated robot might be more complex. In this last case, the trajectory generation should consider maximum speeds and accelerations in order to have feasible trajectories. 4 One of the harder problems might be humanoid robots, given the number of degree of freedom, which easily surpasses 30. A common approach with this application divides a trajectory into sub-problems, considering which articulation has the largest impact on avoiding static and dynamic obstacles. 5 The next application, the position control of a motor, does not have the highest complexity, but it is important. It sees the trajectory generation as a problem not limited to 2D or 3D space, 6 as done in this article.
On the other hand, and specific to emotions in robots, according to neuroscience, emotions appear to aid in the decision-making process. 7 Decision-making often occurs in the face of uncertainty about whether one’s choices will lead to benefit or harm. This theory states that emotions aid such decisions in the form of bodily states, colouring the behaviours as being advantageous or disadvantageous. 8,9 For instance, anger serves to stop a bad current situation 10 ; disgust to correct something that does not contribute to satisfy needs; fear protects against threats 11 ; happiness rewards when filling expectation; surprise comes to curiosity and sadness regards an unsatisfied condition. 12
Human–robot interaction (HRI) and adaptation enhancement rise as two of the most common areas for the application of emulated emotions in robots. HRI implies human emotion recognition and emotion-like expression by robots. Several studies have shown the benefits of detecting and expressing emotions. For instance, Alonso et al. 13 present the evaluation of the emotional state of a human by the analysis of the voice and the facial expressions. The use of emulated emotions in robots extends to non-humanoid robots, such as a wheelchair 14 built to assist disabled people by providing online advice coming from the evaluation of the emotional state of its users. Such work and several others demonstrate that emotions or emulated emotions serve to compress information in order to facilitate deliberative actions. For instance, Hirth et al. 15 applied HRI techniques by the implementation of a robot head “ROMAN” and applied adaptation by the application of their architecture in a mobile robot “RAVON.”
Changes in the surrounding environment, or in internal parameters of a robot, require adaptation in order to maintain performance or even to survive. Thus, intelligent control was one of the first tools applied to improve adaption. For instance, Tsankova 16 proposed the use of neural networks to emulate the functionality of the amygdala in the brain for avoiding obstacles. However, fuzzy logic also serves to test emotional models because fuzzy logic can compress definitions given in natural language into equations programmed in robots. Schneider and Adamy present an agent in a grid world making decisions to extend its lifespan, given limited available energy plus the negative effect of predators. 17
More advanced proposals to improve adaptation in robots require hierarchical architectures, where emulated emotions and emulated reasoning work together to elicit an appropriate behaviour, or an entire navigation plan. For instance, Goerke defines three levels of processing. 18 The lowest level of control corresponds to a traditional proportional-integral-derivative (PID) controller. Then, mid-level control carries out obstacle avoidance, or object searching, both tasks may need a memory module. Finally, high-level control corresponds to cognitive tasks such as searching for a room or delivering the mail by linguistic commands. In that proposal, emulated emotions and drives affect reasoning by influencing the learning process. This process serves to come up with an appropriate action according to a reactive or explorative behaviour.
Almost every architecture where emulated emotions play an important role distinguishes between reactive and deliberative emotions. Reactive emotions (for instance, fear or anger) serve as a short path to come up with a behaviour (such as fight-or-flight response). On the other hand, deliberative emotions (surprise or happiness), combined with aspects of reasoning and internal drives, define high-level actions. 19
Definition of an emulated emotional state
Simpson et al. 20 and Lida et al., 21 as well as many others, show that there is a relation between cognition and emotion. More precisely, cognition regulates emotions, 22,23 but the opposite is also true. Any case, both cognition and emotion influence the decision-making process in the brain. Similarly, a control algorithm might observe situations, then trigger emulated emotions and cognition, to generate decisions. Common control strategies emulate just the reasoning process in the brain, but we explore the effect of emulating emotions in control. This, given that there is strong evidence which demonstrates that emotions influence directly the decision-making process, as stated by Caplin et al. 24 and Paulus and Yu. 25 This influence might be stronger using anticipatory emotions, which are current affective responses to the prospect of future events that have positive or negative consequences, as shown by Baumgartner et al. 26 Thus, the basic idea of the control strategy in this article is to aim for positive anticipatory emotions, instead of negative anticipatory emotions, similar to the process showed by Kocher et al. 27 The control algorithm emulates emotions based on predictions and influences the decision-making process, as humans do according to Preston et al. 28 At this stage of the research, we eliminate the influence of emulated cognition as well as any other process in the brain. Thus, anticipation is the key concept behind the control strategy.
We define that an emulated emotion is elicited as a proportion of the difference between an anticipated ideal state and the anticipated state of the system. Anticipation, though, becomes the key mechanism for generating an error signal via an emulated emotional state. A situation anticipated as positive, where the anticipated state of the system matches the anticipated ideal state, will trigger a positive emotion. On the contrary, a realized negative prediction will trigger a negative emulated emotion. 29 Such triggered emulated emotion serves to update the correlation between the reference and the plant. For instance, if the correlation meets expectations, the system will not require changes in the relation between reference and plant. On the other hand, any difference between anticipations calls for adjustments.
In general, the output of a dynamic system considered as reference serves as a source to compute current and anticipated ideal states. In the case of robot position control, those current and anticipated ideal states come from the reference path. The difference between the current value of the reference r and the current position of the robot y also known as error will be redefined by adding the anticipation of reference and position. This new definition has two components: intensity |A| and emulated emotional state α, and their product corresponds to the emotional definition of error,

Current and anticipated states for reference r(t) and robot y(t).
The anticipation process assumes that the rate of change for reference and robot position remains constant for the observation window, which lasts for tw seconds. This tw should have a value close to the time constant of the system, avoiding small values given negligible differences between current and anticipated values. At the same time, it must avoid large values because the error in the anticipation increases as the observation window increases. The emulated emotional state α(t) corresponds to the angle between the vectors
Reference path and control algorithm
Test motion control strategies for robots have this problem, the lack of standard procedures for selecting the reference path, which highly influence the measure of the performance of a controller. An ideal reference path to test controllers must force the robot platform to show several dynamics, as happens with the Lissajous curve
where A = 1, B = 1, δ = π/2,
The reference path provides a moving target as shown in Figure 2, whereas the motion controller looks for matching current position of the robot,

Current and anticipated positions for both reference and a robot platform.
The computation of θr(t) requires an adjustment, given the discontinuity of atan2 at ±π. The correction looks at the difference between current and previous angles. For instance, if there is a jump from π to –π (given the discontinuity), the correction equals
The second part of the control process aims to reduce the distance between robot and target, called radius, R(t), as shown in Figure 2, which is also labelled eR(t). Thus, the same controller looks for minimizing eR(t), in other words
The minimization of angle and position errors requires the estimation of the speeds for both wheels of the robotic platform,
The controller uses errors eθ and eR as input data and based on these inputs produces appropriate set points for the speed of the wheels. For instance, if eθ is positive, then the controller should produce a positive vR and a negative vL; as a result, the robot will rotate and increase the angle, shrinking the error, as expected. On the other hand, large radius eR should lead to large speeds, which lead to the reduction of the distance from the robot to the target. Thus, the common proportional controller used in this article sets
Motion control settings
The emotional definition of the controller uses the common controller architecture mentioned in the previous section, but switches eθ for eθem, and eR and eRem. These eθem and eRem are the emotional counterparts of the errors eθ and eR. The definition of these new errors uses the analogy of anticipatory emotions to define their values.
The controller in its operation requires anticipating the robot position and the location of the reference. And this anticipation rests on the assumption that estimated speeds at each time will remain constant for the prediction window tw. Thus, equation (2) presents the anticipated position for the robot,
Anticipating the position of the reference model consists in computing the reference at t + tw instead of the current time t. As a result,
Based on the anticipated value for robot and reference position, the emotion-based controller redefines the controller goals. For instance, instead of having a linear relation for eR = R, the new definition eRem requires the anticipated radius Ra, as shown in Figure 3(a). The variable R(t) looks at the current distance between robot and reference, whereas Ra(t) corresponds to its predicted value some time ahead, as defined in equation (4). Notice that the difference between R(t) and Ra(t) is just the anticipation. Ideal radius at current time Rr as well as at the anticipated time Rra equals a null radius; thus

Definition of emulated emotional states and its intensities for position and angle.
The traditional definition of error eR uses only current time t. In addition, the definition based on emulated emotional states requires anticipated values in such a way that
If the prediction window tends to zero
The new definition of the error for the angle in terms of emulated emotional states, eθem, according to the schemes in Figure 3(b) requires
For small values of the prediction window tw compared with eθem,
Experimental results
This section presents the application of the emotion-based controller and contrasts its performance with the performance of a common proportional controller. Every trial has the same initial conditions:

Robot following a reference path.
Every trial uses different controller gains (kR and kθ), thus the motion of the robot changes, sometimes closer to the reference path than others. That closeness serves as a measure of the performance for each tuning of the controller; closer paths produce better performance values. The performance corresponds to the accumulated difference between robot and reference in an index called IAE, which stands for Integral of the Absolute value of the Error. Given the two natures of error (in distance, R, and in angle,
The value of the prediction window tw also influences the performance of the proposed controller. Prediction proved beneficial for short prediction windows, this prediction evidences high variability in the dynamic of the system. Predictions beyond 0.2 s produce performance indexes that might be even larger than indexes for a traditional controller, as shown in Figure 5, where kR = 0.52 and kθ = 0.18. The rest of the article uses a prediction window of tw = 2Ts because the smallest (tw = Ts) produces instabilities at high values of kR or kθ.

Performance of the controller as a function of the prediction window tw.
Anticipation works better for larger errors than for small errors, as can be seen in Figure 6. The reduction of the error for the angle is also important, especially for large errors, which happens at high curvatures of the reference path.

Position error (radius), for the first loop, kR = 0.52 and kθ = 0.18.
Figure 7 summarizes the comparison of performance between a controller that uses anticipatory emotions and a traditional controller. This figure also incorporates a final version of the performance value, which was possible given similarities in the values of IAE for radius and angle, thus

Performance of the controllers for variable gains.
Discussion
This article uses the current speed of each robot wheel to predict where the robot will be some time ahead. The anticipation strategy supposes that the system will continue at the same speed during the prediction window. This is a strong assumption, but it is enough to show that anticipating brings improvements in the control performance. The error in the prediction increases as the prediction window increases, because of the unpredictability of the robot’s speed once the prediction has been done. This degrading in the prediction happens regardless of the anticipator. However, considering acceleration might improve the quality of the prediction as well as the performance of the controller. Note that the emotional definition of error depends completely on the anticipation process. The relation between current values and their predicted values serves to define the emulated emotional state as well as its intensity.
The proposed controller proved better than its traditional counterpart given the effect of the emulated emotions over the dynamic of the robot. For instance, the definition of the emulated emotions causes increase in the error value when a predicted future situation is worse than the current situation. The alternative reduces the error when the predicted emotion shows a better future state. This reduction helps to avoid oscillations around a reference value. The emotional translation of the prediction allows authors to test brain analogies that are hard to propose using a traditional mathematical point of view. Thus, for instance, the analogy of the cooperation between emotions and reason and the influence of memory to elicit emotions are the next steps in this research.
This article shows the effect of emulated emotions in the control of a robotic platform when those emotions are not relegated to high or medium levels of a control architecture, but when they are in the lowest level of the control architecture. The proposed control strategy defines the set points for each motor of the robot to control its motion. This motion is equivalent to the motion of each part of a human body. Notice that the same motion from point A to point B differs in a human according to the emotional context (for instance, a calm situation where everything seems to be working fine, in contrast with a situation where a person confronts fails or threats). The brain commands the body in accordance with the emotional content of each situation and does not only look at the distance between start and ending points. In the case of the robot, we let the robot present different behaviours according to the emulated emotional state and do not only evaluate the current error. That expansion of the error definition brought improvements as shown with the evaluation of the control performance.
An interesting evaluation of the proposed controller implies a comparison with a common proportional-differential (PD) controller, given that its derivative component (D) anticipates the error values, as it is in the core of the proposal in this article. The control law for a PD controller defines the actuating signal

Actuating signal u for a derivative and for the emotion-based controller.
A final comparison between a traditional derivative as predictor and the anticipation in this article corresponds to the experimentation with both controllers (for position and for direction) in the mobile robot. We tried proportional (and emotional) gains kR = 0.52 and kθ = 0.18, both in simulation and in the real platform. The derivative gains for each PD controller had values 0, 0.05 and 0.1. Thus, there were nine experiments. The emotion-based controller had a better performance (IAE) than the PD controller for every experiment.
Conclusions
The emulation of anticipatory emotions in a motion controller brought improvements up to 11% (compare with a common controller) and according to the definition of performance in this article. The main concept behind the proposed controller regards the anticipation, which served as a bridge between the analogy of emotions and a rigorous mathematical definition of a control algorithm. The anticipation process in this article assumes that the speed of the robot remains constant during a prediction window, thus the error in the prediction increases as that window grows. Although simple, that definition was enough to demonstrate the advantages of using the concept of anticipatory emotions in a motion controller.
The analogy of emotions proved important in motion control. Consider the reaction of a person when going from point A to point B. In a real situation, a person looks at the emotional context, and not only the remaining distance between current position and goal. In the same way, the proposed controller changes the error value according to emulated emotional clues, instead of using the mere distance between robot and reference to define the error. For instance, a predicted negative situation increases the error value, whereas a predicted good situation decreases the error. Increasing the error produces stronger reactions over the system so the maximum error in a loop decreased. On the other hand, decreasing the error reduces the amplitude of the oscillations around the reference, which improves the performance as was already said.
The proposed analogy of emotions also shows the importance of beginning the emulation of emotions from the lowest level of a control architecture (motion control), not only in medium or in high levels as it is traditionally done. Finally, future works should include the use of memory in order to have deliberative behaviour, and not just reactive. It is also important to test reason-like processes combined with the emulated emotional reactions, as well as learning, which could enhance adaptation and autonomy of a robot.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research and authorship of this article: This research was supported by the ‘Universidad Distrital Francisco José de Caldas’.
