# Design of Advanced Human-Robot Collaborative Cells for Personalized Human-Robot Collaborations
## 4 User-Aware Collaboration
### Personalized Task Planning  
A timeline-based specification consists of several _state variables_ that describe possible behaviors of domain features. A state variable is formally defined as a tuple \(SV=\langle V,T,D,\gamma\rangle\). A set of values \(v_{i}\in~{}V\) represent states and actions the domain feature can assume or perform over time. A transition function \(T:V\to~{}2^{V}\) specified valid sequences of values \(v_{i}\in~{}V\). A duration function \(D:V\to~{}\mathbb{R}\times~{}\mathbb{R}\) specifies each value \(v_{i}\in~{}V\) the expected lower and upper bounds of its execution time. A controllability tagging function \(\gamma:V\to~{}\{c,pc,u\}\) specifies if the execution of a \(v_{i}\in~{}V\) is _controllable_ (\(c\)), _partially controllable_ (\(pc\)) or _uncontrollable_ (\(u\)). Information about controllability allows a task planner to deal with uncontrollable dynamics of the environment when executing a (timeline-based) plan. This is known as the _controllability problem_[37] and is particularly important when an artificial agent such as a collaborative robot should interact with \"unpredictable\" agents such as a human worker. _Synchronization rules_ constrain the \"runtime\" behavior of the modeled domain features. They specify causal and temporal constraints necessary to coordinate the different features as a whole complex system (e.g., a HRC cell) and synthesize valid temporal behaviors (i.e., the _timelines_). The definition of state variables and synchronization rules modeling a HRC scenario follows a hierarchical decomposition methodology correlating high-level production goals to simpler production tasks and functions [38]. A state variable \(SV_{G}\) describes the high-level production goals supported by the HRC work-cell. A number of state variables \(SV_{L}^{i}\) where \(i=0,\ldots,K\) describe the production procedure at different levels of abstraction. The values of these state variables represent production tasks at a specific level of abstraction \(i\leq K\) (where \(K\) is the number of hierarchy levels of the procedure). A state variable \(SV_{R}\) and a state variable \(SV_{H}\) respectively describe the low-level operations (i.e., instances of Function) the robot and the human can actually perform. Finally, a set of synchronization rules \(\mathcal{S}\) describes the procedural decomposition of high-level goals (i.e., values of state variable \(SV_{G}\)) into simpler production tasks (i.e., values of state variables \(SV_{L}^{i}\)), until they are associated with a number of functions of the human and the robot (i.e., values of state variables \(SV_{R}\) and \(SV_{H}\)). The state variable \(SV_{H}\) describes behavioral dynamics of the worker collaborating with the robot. The state variable \(SV_{H}=\langle~{}V_{H},T_{H},D_{H},\gamma_{H}\rangle\) is thus generated from the knowledge base according to the _user profile_ of the participating worker. The values \(v_{j}\in~{}V_{H}\) are defined according to the tasks/functions the worker is actually able to perform in the given production scenario.No assumptions can be made on the actual duration of tasks/functions assigned to the worker. Consequently all the values of \(SV_{H}\) are tagged as uncontrollable, \(\gamma_{H}(v_{j})=u,\forall~{}v_{j}\in~{}V_{H}\). The duration bounds of each value \(v_{j}\in~{}V_{H}\) and are defined by taking into account the mentioned performance matrix that can be extracted from the knowledge base. A _performance vector_ is extracted representing known performance of user \(u_{i}\in\ \mathcal{U}\). Such a vector specifies, for each value \(v_{j}\in\ V_{H}\), the average time \(\delta_{i,j}\) the user \(u_{i}\) takes to accomplish the task \(task(v_{j})=t_{j}\in\ \mathcal{T}\ (\delta_{i,j}=\infty\) if no information is available). At this point the _expertise level_ of the user characterizes the expected variance of the average duration. The combination of this information is thus used to define the _personalized_ lower and upper duration bounds for each value \(v_{j}\in\ SV_{H}\).