Assessing worker performance using dynamic cost functions in human robot collaborative tasks

The aim of this research is to develop a framework to allow efficient human robot collaboration on manufacturing assembly tasks based on cost functions that quantify capabilities and performance of each element in a system and enable their efficient evaluation. A proposed cost function format is developed along with initial development of two example cost function variables, completion time and fatigue, obtained as each worker is completing assembly tasks. The cost function format and example variables were tested with two example tasks utilizing an ABB YuMi Robot in addition to a simulated human worker under various levels of fatigue. The total costs produced clearly identified the best worker to complete each task with these costs also clearly indicating when a human worker is fatigued to a greater or lesser degree than expected.


Introduction:
The development of human-safe robots over the past decade has allowed the possibility of collaborative work between humans and robots in an industrial environment to be considered more realistic than ever [1], [2], [3]. Human Robot, HR, collaboration on tasks combines the benefits of the strength, repeatability and accuracy of a robot with the intelligence and adaptability of a human worker. This enables automation to be introduced into sectors of modern manufacturing with a relatively low volume of production with a high degree of customization where a robot would lack the adaptability to be implemented alone. HR collaboration can range from robot workers being indirectly involved in the task by acting as assistants to a human worker, to full involvement where robots are treated as peers to human workers and directly influence the outcome of tasks [4].
Research has been carried out into using human-safe robots as assistants to human workers in assembly tasks with examples seen in [5] and [6]. In such research the human worker directs the assembly process and completes the majority of critical tasks to the assembly with the robot worker performing basic assistive actions such as handing components to the human worker. Although such methods of HR collaboration assist the human worker, in cases such as this the capabilities of the robot worker are underutilized since they are not performing actions critical to the assembly. In addition to this, such methods are dependent on either human action recognition or direct instruction by the human worker to inform the robot worker what to do as well as completing their own work.
To date, little research has been carried out into autonomously controlling task allocation over full complex assembly tasks in work cells utilizing both human and robot workers that are considered as peers to each other. Some methods, such as that proposed by Riedelbauch et al [7], dictate task allocation for robot workers by observing the world state of the current working environment. Observation of the world state allows the robot to identify which assembly operations are available for it to complete, then select one to execute. Such a method has the advantage that the work cell can consist of flexible human robot teams that change during the task, allowing human workers to leave the work cell with the remainder of the task being executed by the robot worker. The disadvantage of such methods is that the robot worker is allocated tasks on a task by task basis, rather than evaluating the assembly as a whole, which can hinder optimization of the task. In addition to this, the system is heavily dependent on sensors monitoring the workspace which may not be usable in all manufacturing environments, for example this system uses robot mounted cameras which may struggle to detect objects in low light conditions.
In the research presented in [8] and [9], the full assembly task is planned and assigned before task execution has begun. In the case of [8], assembly tasks are classified by suitability for execution by human or robot workers and then assigned to be competed collaboratively or individually by the workers with a Gantt chart of the assembly process being produced. In the case of [9] the effect of human fatigue on the dynamics of manufacturing processes is modeled and used along with statistical methods to generate an optimal task assignment. Such methods are advantageous as this allows the assembly task to be considered as a whole, with worker assignment being planned to best utilize their capabilities rather than assigning a worker to a task if they are available.
For the purposes of this paper, we treat the current state of the art of task allocation in industrial HR collaboration tasks is represented by the work developed by Johannsmeier et al [10]. Their planning framework presents the idea of using cost functions based on the abilities of each worker to dictate task assignment in a human robot collaborative assembly task. Whilst this provides a novel method for assigning tasks between human and robot workers, the specific design and implementation of the cost functions in [10] pose several fundamental limitations for use in a real world industrial environment. One such limitation is that the cost functions are rigid and predefined because weightings for cost function variables must be manually reassigned by a human. This is disadvantageous as reassigning the framework to a new assembly task or changing production requirements would require significant human involvement and this is not desirable for a system designed to operate autonomously. In addition to this, the high-level task planner operates offline, generating a task plan before assembly begins. This operating principle severely restricts the variables that can be used in cost functions for a human worker compared to those for a robot worker due to their highly variable performance over time. This is evidenced in [10], where completion times are highlighted as an obvious choice of cost function variable for a human worker but are not used since a human would not be able to adhere to a stated completion time.
Johannsmeier et al [10] instead introduce the concept of a worker profile that would map to a cost function, using properties such as attention level, general experience level, and reliability. These static variables cannot accurately represent a human worker as their abilities are highly dynamic and the contributing factors that could affect these abilities are too great to number with some being impossible to predict.
This highlights the core limitation of current research into HR collaborative task planning namely that human abilities are assumed or modelled offline to create a collaborative assembly plan. This limits the abilities of task planners to adapt the production to unpredictable changes in worker performance to maintain or improve on the current production rates. In this paper it is proposed to instead infer the current state of human and robot abilities by monitoring them whilst they are working to make task allocations based on current worker capabilities in a semi-online manner. This will be done by first developing a system inspired by the framework proposed by Johannsmeier et al that is capable of dynamically allocating tasks between human and robot workers based on the performance of the worker in the current work shift. This system will use intelligent dynamic cost functions to accurately represent the current abilities of both human and robot workers to assign tasks to the most appropriate workers for a complex assembly given by an abstract assembly plan. The variables for this cost function will be stored in a worker profile and will continually be updated using data gathered by observing worker performance. These cost functions will also be adaptable with the weighting for each variable being autonomously recalculated based on the task being assessed. These cost functions will be used by an autonomous task planner to reassign tasks after a set number of iterations of the complete assembly task the system is being applied to ensure that the workers are being utilized optimally in the assembly.
A high level overview of the system can be seen in Fig.1. In this system an abstract assembly plan and worker profile will form the input and pass information to the cost function generator. The cost function generator will produce a series of costs for each worker to complete each subtask of the assembly, these will be used by the dynamic task plan generator along with the abstract assembly plan to optimize the task plan for the HR team. This task will be executed by the HR team whilst worker performance is monitored and analyzed to update the worker profile. Costs will be updated in the background during this process and after a set number of task iterations the task plan will be re-evaluated to ensure it remains optimal. The focus of this paper is the development of the dynamic cost functions used as a part of the decision making system as highlighted in Fig.1. This will begin with the methodology section, detailing the formulation of the dynamic cost functions. Following this the testing section will detail test cases in which the cost functions were applied for human and robot workers. Next, a results section will detail how the cost functions reacted to worker performance in the given test cases, finishing with a conclusion section The system for human robot collaboration proposed in this paper requires dynamic cost functions to adapt to not only the current situation but also to changing production requirements and individual human or robot workers. It is proposed to use a basic generic format of cost function which can be applied to both human and robot workers. This cost function must also be applied to each subtask of a complete assembly task over various iterations of it being completed. Due to this the formulation for a cost for a subtask is given by where , represents a cost function variable, , represents a cost function weighting and represents the number of cost function variables being used. This formulation has been used to allow one generic subsystem of the overall system proposed in this research to handle the generation of costs for workers to complete each subtask of the assembly.
As subtasks of an overall assembly can normally be broken down into primitive tasks, it is proposed to associate commonly used primitive tasks with related cost function variables. For the purposes of these cost functions, primitive tasks consist of assembly skills such as tighten bolt or move a component in position rather than individual movements or instructions. These associations allow the use of a method analogous to a keyword search to determine cost function weightings for each subtask autonomously.
For each subtask, the system will search through the abstract assembly plan for the primitive tasks it is composed of to provide the number of occurrences of each primitive in the subtask. This enables the system to define the total number of primitive tasks that a cost function variable will affect for a subtask as represented by , . Given this it is possible to define the cost function weightings as (2) This will ensure that for each worker the cost function weightings will sum to one but will also be normalized between zero and one.
Examples of the dynamic cost function variables used will be outlined over the following section and will include a variable that is capable of accommodating human fatigue along with a variable for assessing completion times for human and robot workers. Fatigue was chosen as a cost function variable as it represents an important factor that can affect human performance during assembly tasks, and shows the importance of observing worker performance. Additionally, completion time was chosen as a variable since it allows performance comparison between human and robot workers.
But also because it enables the evaluation of the assembly tasks based on a typical manufacturer's requirements. These two variables together allow comparison of work performance, in addition to reacting to dynamic changes in worker capabilities, which is vital for dynamic task planning in HR collaborative tasks.
The generalized formulation of the cost functions described in this section enable them to be expandable to include additional cost function variables such as those used to monitor the quality in which the assembly subtasks are being completed. An example of this is sealant application, where the application by the worker is compared to the task specification to give a cost for the completion of the task. However, these are not considered within the scope of this paper.

Fatigue Cost Function Variable:
One of the cost function variables proposed in this research is a variable to identify when a human is becoming fatigued and their work performance is being affected. Fatigue is widely acknowledged to be one of the key factors affecting human performance when working over long periods of time and needs to be represented within the cost function to identify the human workers current abilities. Previous research has attempted to model fatigue using factors such as workload and the length of time spent working [11], [12]. However, these often cannot take into account unexpected events in a human workers life that are completely unpredictable and yet still affect their performance.
In this paper, it is proposed instead to attempt to detect fatigue as it is occurring to autonomously handle an uncharacteristic performance change in the human worker. For our case, the fatigue variable will be defined by inferring the level of fatigue from the difference between completion times observed from the human worker and their nominal expected performance. Due to this the Fatigue variable will not represent the absolute levels of fatigue of a human worker but instead a relative measure of fatigue for each subtask.
To define the variable in this way, a frame of reference is required to define nominal human performance and quantify a difference in completion times that is considered significant enough to infer an increase in human fatigue levels. In previous research, models have been identified that relate the effect of fatigue on the completion times for a repetitive task to the number of iterations of the task completed validating the inference made by the cost function variable [11]. One such model presented by Digiesi et al [11] is capable of modelling the effects of fatigue and learning on completion times of a repetitive task over numerous iterations of the task. This model was validated against worker data from a real world automotive assembly plant, where it was found that in cognitive tasks that the fatigue phenomenon prevailed over the learning phenomenon [11]. This model was also approximated in [11] to remove the learning factor and it was decided here to also ignore this learning aspect as it is assumed that the human workers will be skilled trained professionals.
(3) For this to be calculated historic data for the worker is required. Firstly an initial completion time , is required from the first completed iteration of the task from the current task assignment period from which the model evolves. Since a task can be taken away from a worker and later reassigned to them in this research, we must specify the initial completion time as the completion time from task iteration where to ensure the initial completion time, , , is from the current assignment period of subtask to a human worker. Next historic data from previous task assignment periods for a human worker is required to calculate the variable ′ that provides a synthetic measure of the fatigue phenomenon for a human worker. This variable is defined by the where is the number of task iterations completed in an assignment period of length however in this research the upper limit will be taken for the variable ′ .
In this paper, the assumption is made that the level of fatigue presented by this model is unavoidable and represents the natural way in which a human will become fatigued as they complete a repetitive task. This is reasonable to assume because a human worker's performance will naturally decline over a work shift despite the level of fatigue they are experiencing. Therefore Digiesi's approximated model will represent a baseline performance of how a human worker should vary over a task assignment period, and when completion times vary from this prediction, the cost function variable, 1, , will change. This baseline performance model will be calculated using the mean values of the historic data collected over previous task assignment periods to ensure their expected performance reflects their actual capabilities.
It is widely recognized that human completion times are not consistently the same, and in reality, would have a natural variance that will increase in magnitude with the length of the completion times. To allow for this a difference tolerance between the model and actual completion times is set before the cost function variable is affected.
This tolerance will have to be set for each specific task based on the task length and in this paper is hand selected. If a worker's completion times change so they are outside this tolerance the cost function variable will change to signify that the worker is over fatigued if the completion times are higher than expected, or underutilized if the completion times are lower than expected. Given these defined boundaries the fatigue cost function variable, 1, , is given by where , is the moving average for a set number of the most recent completion times for subtask . It was decided to use a moving average, instead of individual completion times, due to the inconsistency of human completion times mentioned previously which would result in the fatigue variable, 1, , changing far too rapidly. This would unfairly represent the human worker for unusually high or low completion times due to singular outliers over a production period.
In this definition of the cost function + and − represent the upper and lower limits of the tolerance of the cost function variable to variation in human completion times, given by where is the tolerance of the cost function variable in seconds. This tolerance, as previously described, factors in for the variable nature of human completion times as they will naturally deviate from the model. Due to this, the cost function variable remains zero if the moving average of completion times falls within these limits.
Outside of this tolerance region the value of the cost function variable will increase or decrease linearly to ±1. In this definition of the cost function + and − represent the upper and lower limits respectively, and are given by where is the percentage increase or decrease in completion times compared to , that would result in the fatigue variable, 1, , reaching its maximum absolute value. This percentage, , would be defined by the end user allowing them to define the level of fatigue that would be unacceptable for a worker to reach.

Completion Cost Function Variable:
It was desired to quantify the quality of completion times for a worker completing an assembly subtask. In an industrial manufacturing environment a manufacturer would expect a product to be completed within a predetermined production time, this gives a suitable level of context as it allows completion times to be evaluated based on the manufacturers requirements. It is then assumed that the manufacturer implementing the system will provide a list of the desired work times for each subtask of an overall assembly with the assembly task specifications.
The completion cost function variable, 2, , is then calculated by where is the manufacturer's work element time for subtask . It was decided to use the moving average , of the most recent completion times used by the fatigue variable due to the inconsistency in human completion times mentioned previously. This was used to reduce the susceptibility to outliers over a production period whilst also providing a more stable change in the cost function variable.

Testing:
The cost functions outlined in this paper have been tested separately for two primitive tasks to illustrate cases where only one of the workers should be suitable for completing the task being analyzed. In these primitive tasks only the performance based cost functions were tested and the quality of task execution is assumed to be sufficient so was not analyzed. Of these two primitive tasks, one illustrates a case where use of a human worker should be more appropriate and the other illustrates a case where use of a robot worker should be more appropriate. The first task consisted of tightening a 3D printed bolt into a threaded hole over its entire length, the bolt used was an M15 bolt with a thread length of 40mm and a pitch of 2mm [13]. This illustrates a case where a human worker is faster than a robot worker due to their increased dexterity and speed of motion.
For the worker to complete this task they pick up the bolt from a holder and screw the bolt into a 3D printed fixing, in this case the robot worker did not use force sensing abilities and its tightening movement was defined using the bolt length and pitch. In this case the execution time was measured for the time taken to tighten the bolt. The experimental setup for this task can be seen in Fig.2. The second task was a simple pick and place task and required the worker to pick up four 3D printed nuts [13] from a holder in sequential order and place each nut in one of four predefined placement positions. To add complexity to the task and simulate high mix production, the placement position for each bolt is randomly selected from the four predefined positions to simulate a task with the same production techniques but with changing specifications. This illustrates a case where a robot worker is more suited as it is better able to quickly input instructions for each task iteration and follow them with high accuracy. In contrast a human worker must check the specification before completing the task, then verify the task has been completed correctly once finished, which increases their completion time. The experimental setup for this task can be seen in Fig.3. These primitive tasks were executed by an ABB YuMi robot [1] to provide completion times for testing the cost functions with a robot worker. This robot was chosen for testing as in addition to human-safe features it has high precision of movement and is designed specifically to work in industrial manufacturing environments [14], [15].
For these test cases the robot was programmed using the Robot Operating System (ROS) interface developed by Berkeley Automation [16]. Completion times for the human worker are then simulated using the model given by (4) and (5) based on various simulated initial completion times and simulated historical data. This method was chosen to allow easy illustration of cases where a human worker is "over fatigued" or "under fatigued" as well as behaving as expected for larger numbers of task iterations. To add realism to this model, for each human completion time a random variable will be generated using the standard normal distribution and added to the completion time to simulate natural variation in human completion times. This distribution was chosen as it is assumed that the variation in human completion times would be at extremes only three seconds due to the short completion times for the human worker for each task. In all these test cases a moving average of the last five completion times is used to stabilize the total cost for each task due to the inconsistency in human completion times.
Over the following two subsections the methods for generating the completion times for the robot worker and simulated human worker for each test case will be outlined. In addition to this the parameters required to calculate the cost functions for each test case will be defined.

Task 1) Bolt Tightening Robot Worker
The ABB YuMi robot was programmed to complete 15 iterations of the task, with completion times being recorded between the robot starting to tighten the bolt in its fixing and the completion of the tightening of the bolt.
In addition to these recorded completion times it was also necessary to define the parameters required to calculate the cost function variables for the robot worker. In this case only the completion variable, 2, , is used for which, the desired work element time, , was set as 45 seconds since it is assumed this would be set based on the fastest possible human completion time. This was done since the human worker is faster than the robot worker to complete this task which would be reflected in the manufacturer's desired work element time, .
For the cost function to generate costs, weightings for the variables used must also be set using the schema detailed in section 2.1. However, in this test case only the completion variable, 2, , is used since the fatigue variable, 1, , is irrelevant to the robot worker. Due to this 2, receives a weighting of one in the cost function whereas 1, receives a weighting of zero to eliminate it from consideration.

Human Worker
To obtain data from a typical skilled human worker their completion times were simulated for 15 iterations of the task using the model given by (3) and (4). To simulate the various states of fatigue in a human worker, three sets of initial conditions were used to simulate cases where a human worker is behaving as expected in addition to cases where they are over or under fatigued as given in Table 1. These initial conditions are the input required by the model given by (3) and (4), including an initial completion time for the work shift in addition to the number of task iterations that the worker can complete over an hour-long time period. This data was estimated for a typical skilled human worker based on the time taken to tighten the bolt in this test which was determined to be around 47 seconds. It is assumed that the initial completion time would only vary by a few seconds when the worker is over or under fatigued due to the short length of time that the task takes. However, this results in a greater variation in the number of task iterations over the shift length if the worker is over or under fatigued and this has been reflected in the simulated initial conditions.  (3) and (4). It was decided to use the same initial conditions as for the simulated worker behaving as expected because this represents the historical data.
was set to 20% triggering a maximum or minimum value for the fatigue variable when completion times increased or decreased by this percentage of , beyond the tolerance . This was chosen because manufacturers would be less tolerant of a decline in performance for such a simple task. For the fatigue variable, 1, , the tolerance to variation in human completion times, , was set to three seconds, this was deemed suitable as it was assumed that this would be sufficient for such small tasks. For the completion cost function variable, 2, , the work element time was set as the same value for the robot worker. This is done because a manufacturer implementing this system would desire the same work element time regardless of whether a human or robot worker is completing the task.

Behaviour of Human Worker
Initial For the cost function to generate costs, weightings for the variables used must also be set using the schema detailed in section 2.1. In this case the task itself is considered as a primitive task that both cost function variables would have influence upon hence both the fatigue variable, 1, , and the completion variable, 2, , are given equal weightings of 0.5 within the cost function.

Task 2) Pick and Place
Robot Worker The ABB YuMi robot was programmed to complete 90 iterations of the task, with the completion time being recorded between the robot moving to pick up the first nut and placement of the final nut.
In addition to these recorded completion times, it was also necessary to define the parameters required to calculate the cost function variables for the robot worker. In this case only the completion cost function variable, 2, , is used for which, the desired work element time, , was set as 45 seconds since it is assumed this would be set based on the fastest possible robot completion time. This was done since the robot worker is faster than the human worker to complete this task which would be reflected in the manufacturer's desired work element time, .
For the cost function to generate costs, weightings for the variables used must also be set using the schema detailed in section 2.1, however, as with the bolt tightening task since only 2, is used the same weighting schema is used in this task.

Human Worker
To obtain data from a typical skilled human worker their completion times were simulated over 90 iterations of the task using the model given by equations (3) and (4).
As before, the various states of fatigue in a human worker were simulated using the three sets of initial conditions as given in Table 2. This data was estimated for a typical skilled human worker to complete the pick and place task which was determined to be around 48 seconds. The total costs for the robot worker are illustrated in Fig.4 with the completion variable given in Fig.5. In this test case, Fig.4 shows that the robot worker immediately reaches a cost of one which is maintained for the duration of the test period. This indicates that the robot worker is poorly suited to this task as it has attained the maximum possible cost for completion of the task which does not decrease over the period of task assignment. When examining the cause of this Fig.5 shows that the completion cost function variable also immediately reaches its maximum value of one which is maintained for the duration of the test period. This can be attributed to the long completion time for the robot compared to the work element time for this task due to the robot lacking the high dexterity required to complete this task quickly. The overall costs for the human worker are illustrated in Fig.4 with the completion variable given in Fig.5 and the fatigue cost function variable being given in Fig.6. When the human is behaving as expected they have a mean total cost of 0.0511 over the duration of the test period with a maximum cost of 0.0665 at the 15 th iteration and a minimum cost of 0.0443 at the 7 th iteration. Investigating Fig.5 shows that the fatigue variable remained at zero for the duration of the test period so the completion variable was the only variable contributing to the total cost. As the fatigue variable remained zero, the completion variable displays the same behavior as the total cost except the values are double that of the total cost due to the cost function weightings as seen in Fig.5. This indicates that a human worker performing as expected over a work shift should have a steady cost that increases minimally over an assignment period as human completion times naturally increase with fatigue. When the worker is behaving as expected the magnitude of the cost for them to complete the task should only be dependent on the difference between their completion times and the manufacturer's expectations.  on the total cost. This is best seen between the 10 th and 12 th iterations of the task where the magnitude of the fatigue variable is so great compared to the completion variable that it defines the behavior of the total cost of the worker resulting in a period of significant negative cost. The only time the completion variable exerts such a dominant influence over the total cost is at the 7 th iteration where it has a greater magnitude than the fatigue variable creating the maximum total cost for the worker over the test period.

Comparison of Workers
Comparing the total cost for the workers for this test case seen in Fig.4

Pick and Place:
Robot Worker This simulated data combined with the defined cost function parameters resulted in the total costs for the robot worker illustrated in Fig.7 with the completion variable given in Fig.8. In this test case, it is shown that the robot worker has a mean cost of 0.0256 over the test period with a maximum cost of 0.343 at the 88 th task iteration and a minimum cost of 0.0139 at the 39 th task iteration. In this test case the completion cost function variable is the only contributing factor to the cost for the robot to complete the task. The behavior for the completion variable is due to the robot's ability to perform the task efficiently and work consistently at the performance level desired by the manufacturer for the task. The variance in the completion variable in this case can be attributed to the change in the placement location for each nut resulting in different robot arm trajectories for each task iteration and in turn different completion times. This simulated data combined with the defined cost function parameters resulted in the total costs for the human worker illustrated in Fig.7 the completion variable given in Fig.8 and the fatigue cost function variable being given in Fig.9. When the human is behaving as expected they have a mean total cost of 0.2377 over the duration of the test period with a maximum cost of 0.25 at the 86th iteration and a minimum cost of 0.2085 at the 5th iteration. Over this larger test period a degradation in performance is more evident in the total cost for the worker as seen in Fig.7, however, this is a very gentle increase over a large number of task iterations. Investigating Fig.9 shows that the fatigue variable again remained at zero for the duration of the test period so the completion variable was the only variable contributing to the total cost. In this test case Fig.8 shows the completion variable has a far greater magnitude than the total cost with a more significant increase over the test period in addition to greater variability. Over the test period the completion variable has a mean cost of 0.9510 with a maximum cost of one at the 86 th iteration and a minimum cost of 0.8340 at the 5 th iteration of the task. Such a large completion variable which reached its maximum value of one towards the end of the test period resulted in a significantly lower total cost for the worker in this case due to the weighting of the variable in the cost function. Since the weighing of the completion variable was 0.25 this massively reduced its contribution to the overall cost and also smoothed the variability in its behavior. This again indicates that a human worker performing as expected over a work shift should have a steady cost that increases gently over an assignment period even when performing a more complex task. When the worker is behaving as expected the magnitude of the cost for them to complete the task should again only be dependent on the difference between their completion times and the manufacturer's expectations. In the case of the over fatigued simulated worker their mean total cost is 0.6903 over the test period with a maximum cost of 0.8335 at the 69th iteration and a minimum cost of 0.2622 at the 5th iteration. In comparison with the worker behaving as expected, Fig.7 shows the over fatigued worker's total cost shows a massive increase over the test period with a rapid increase over the first 40 iterations of the task followed by a gentler increase over the remainder of the test period. A significant variation in the cost can also be seen from the 35 th iteration onwards with the total cost significantly increasing and decreasing over the remainder of the test period despite an overall increase in the total cost. When examining the cause of this behavior it is noted that the completion variable had a cost of 0.9997 at the 5 th iteration of the task which climbed to one at the 6 th iteration and remained at this cost for the duration of the test period as shown in Fig.8. This meant that the completion variable made a constant contribution to the total cost for the worker weighted at 0.25. Examining the fatigue variable for the over fatigued worker, Fig.9 shows that it displays the same behavior as the total cost but at a lower magnitude due to the weighting of the cost function. This case shows that the fatigue variable is the dominant influence on the behavior of the total cost despite the greater magnitude of the completion variable. This occurs since the cost for the completion variable remains constant, so it does not contribute to any variability in the total cost but instead boosts the magnitude of the fatigue variable to give the total cost.
In the case of the under fatigued simulated worker their mean total cost is 0.1377 over the test period with a maximum cost of 0.2105 at the 71 st iteration and a minimum cost of -0.0256 at the 63 rd iteration. As with the simulated under fatigued worker in the last test case Fig.7 shows there was a high variability in the behavior of the total cost making an overall pattern of change over the test period hard to detect. Examining the cause of this unpredictable behavior it is noted that the completion variable has a mean cost of 0.8169 over the test period with a maximum cost of 0.8679 at the 71 st task iteration and a minimum cost of 0.7051 at the 5 th task iteration. Fig.8 shows the completion variable has a gentle increase in cost over the test period with none of the unpredictability of the total cost however when examining the fatigue variable in Fig.9, the same behavior as the total cost can be seen. As with the over fatigued human worker the small increase in cost for the completion variable in addition to its low weighting has resulted in the fatigue variable becoming the dominant influence on the total cost for the simulated human worker. In comparison to the completion variable the fatigue variable has a mean cost of -0.0887 over the test period with a maximum cost of -0.0087 at the 71 st iteration of the task and a minimum cost of -0.2321 at the 63 rd iteration of the task.
Despite the magnitude of the fatigue variable being approximately 10% of that of the completion variable, the weighting of the cost function has resulted in a total cost that is significantly lower than the cost of the completion variable.

Comparison of Workers:
Comparing the total cost for the workers for this test case seen in Fig.7 the most suitable worker is clearly the robot worker due to its lower cost throughout the test period. In the case of the simulated human worker that is under fatigued or behaving as expected their mean total cost over the test period is still fairly low at 0.1377 and 0.2377 respectively compared to a mean total cost of 0.0511 for the robot worker. This means that despite the robot worker displaying the best performance in this test case the human worker could take over when under fatigued or behaving as expected without a huge increase in cost. When the simulated human worker is over fatigued their mean total cost over the test period is significantly larger at 0.6903 showing their unsuitability for completing the task in this case.

Conclusions:
In both of the test cases presented the cost functions resulted in costs that provided clear distinctions between the robot worker and the simulated human worker under various fatigue conditions. In the cases of the robot worker and the simulated human worker behaving as expected, the total costs progressed in a predictable way over the test period. In the cases of the simulated human worker being over or under fatigued the total costs deviated from those of the worker behaving as expected, increasing and decreasing many times over the test period. This erratic behavior was shown to be influenced by the fatigue cost function variable thus clearly identifying cases where the human worker is under or over fatigued compared to their expected behavior.
As expected in the bolt tightening test case, the robot worker had a significantly larger cost to complete the task than the human worker regardless of the level of fatigue they are experiencing. In the pick place task the robot worker had a lower cost than the simulated human worker as expected however when under fatigued or behaving as expected, the cost for the simulated human worker to complete the task was not significantly larger than the robot worker's cost. Due to this with the pick place task the human worker could take the task over from the robot worker without a significant increase in cost.
The results shown in this paper are solely based on performance of workers and does not take into account the quality and precision with which the assembly tasks are being performed. Future work will include development of variables which quantify the quality with which tasks are being carried out with workers which could lead to different task assignments. Future work will also focus on development of the full task planning system outlined in the introduction of this paper and integrating the cost functions outlined in this paper into such a system.