# A Personalised Emotion-Based Model for Relaxation in Virtual Reality
## Methodology
### Emotional Model  
The main purpose of the emotional model is to estimate the level of relaxation, or rather the state of relaxation \(s_{relaxation}\), of the user based on the current settings of the environment. Relaxation has been shown to be influenced by stress, fear and arousal [33]. Therefore, the model estimates relaxation from the three latent variables (\(s_{stress}\), \(s_{fear}\), and \(s_{arousal}\)). At the most abstract level, relaxation can be expressed as a function of the three other emotional states and the preference of the user on the adaptations in the environment. This is formalised in Equations (1)-(4), where \(\mathbf{a}=(a_{x_{1}},...,a_{x_{n}})\) is the vector representing the values of all adaptations \(x_{i},i\in\{1,\ldots,n\}\) in the environment. \[s_{relaxation} = relaxation\left(s_{fear},s_{stress},s_{arousal},pref( \mathbf{a})\right) \tag{1}\] \[s_{fear} = fear\left(\mathbf{a}\right)\] (2) \[s_{stress} = stress\left(\mathbf{a}\right)\] (3) \[s_{arousal} = arousal\left(\mathbf{a}\right) \tag{4}\]  
Adaptations can influence the model either by the preference for the adaptation or directly by its value. Given the large variety of options and the variability of users, when the user first starts the system, they will answer questions regarding their preferences on some of the adaptations. In that way, for example, if the user is afraid of darkness, the created environment will be made in a manner that it maintains light throughout the session. Therefore, a preference function \(pref_{x}(a_{x})\) for each adaptation \(x_{i}\) is defined according to Equation (5) which determines the impact of the individual adaptations on the user's emotional state. Human perception has been deemed to be highly nonlinear, following more the shape of a sigmoid or a Gaussian curve [34]. Therefore, a Gaussian function is used. The Gaussian has a maximum value of 1, centred around the adaptation's optimal intensity (\(x_{opt}\)). Figure 1: High level view of the architecture. This optimal intensity is a fixed value derived from the questionnaire data. The range of the \(pref_{x}(a_{x})\) function is between 0 and 1, where 0 indicates that the user does not like the adaptation and 1 that the user likes it very much. As can be seen in Figure 2, the more the optimal intensity leans towards 0.5, the more the user feels indifferent about the adaptation, thus the flatter the Gaussian becomes. In other words, large changes in the adaptation intensity have little effect on the preference function's outcome. The more the optimal intensity reaches 0 or 1, the stronger the user feels about the adaptation, thus the more narrow the bell shape becomes. Meaning that small changes in the adaptation intensity already have a big impact on the preference function's outcome. \[pref_{x}(a_{x})=\exp\left(\frac{-\left(x_{opt}-a_{x}\right)^{2}}{2\cdot\left(1.075-2\cdot\left(\left|0.5-x_{opt}\right|\right)\right)^{2}}\right) \tag{5}\]  
With the definitions for the adaptations and preferences, the three emotion models will be explained. Since some of the adaptations in the system could potentially induce fear on the user, these are called (fear) inductors. For example, a user can be afraid of darkness, fire or animals. Therefore, in this model fear is calculated as a weighted sum of the possible fear inductors independently (Equation (6)). The weights (\(F_{a_{x}}\)) can be chosen based on the user's personality. Each inductor is modeled by a function based on the user profile's optimal value (\(x_{opt}\)) as in Equation (7). The fear inductor function, \(f(a_{x})\), is a linear function based on the adaptation's current intensity and the fixed optimal intensity. This is plotted in Figure 3 for different values of optimal intensity. This plot shows that if the adaptation has an optimal intensity value below 0.5, it frightens the user, thus contributing to a positive impact on the overall fear. An optimal intensity above 0.5 indicates comfort, thus contributing to a negative impact on the overall fear.