A Task Allocation Approach of Multi-Heterogeneous Robot System for Elderly Care

: Roboticized nursing technology is a signiﬁcant means to implement efﬁcient elderly care and improve their welfare. Introducing multi-heterogeneous robot systems (MHRS) and sensor networks into a smart home is a promising approach to improve the safety and acceptability of elderly care services in daily life. Among them, the energy consumption and task planning of MHRS determine nursing safety, which is particularly important in the real nursing process. Therefore, we established a novel smart home for elderly care based on seven heterogeneous nursing robots, and proposed a multi-robot task allocation (MRTA) algorithm, considering execution time and energy consumption. The whole system efﬁciency makes up for the functional limitations and service continuity of traditional MHRS. To realize efﬁciently conducted multitasks, we established an architecture with centralized task allocation center, robot alliance layer and distributed execution layer for the MHRS. The self-organizing architecture contributes to overall task allocation, communication and adaptive cooperative control between different robots. Then, to clearly describe the continuous nursing process with multiple simultaneous demands and emergency tasks, we modeled the whole nursing process with continuity, multi-priority, and interpretability. A novel MRTA algorithm with a dynamic bidding mechanism was proposed. Comprehensive experiments showed that the proposed algorithm could effectively solve the three key problems of multi-priority tasks, multi-robot safe and adaptive cooperation, and emergency task call in the scene of elderly care. The proposed architecture regarding the smart home could be applied in nursing centers, hospitals, and other places for elderly care.


Introduction
With the proliferation of the aging population and the quest for high living standards, the importance of professional nursing services is highlighted [1][2][3]. However, there is a serious shortage of professional medical staff. To meet this challenge, the application of robots in pension scenarios is a very promising trend [4][5][6]. However, the demands of users in daily life are diverse, and a robot with a single function can hardly meet the demands of all the daily activities of the elderly. Hence, smart home technology, composed of a multi-robot system and sensor networks, could provide an efficient means to relieve the demanding care workload of family caregivers and healthcare providers, and could support independent living [7][8][9][10]. Rather than make use of the support services offered by day-care, long-term care, and retirement homes, the elderly would rather live in their own homes and appreciate the sense of accomplishment brought by familiarity, selfconfidence, independence, and self-care activities [11,12]. Therefore, a future development direction would be to provide context-aware, ubiquitous computing application assistance services and home automation services by combining smart home sensor networks with The multi-robot task allocation (MRTA) algorithm in the scene of elderly care needs to effectively solve the problems of optimal energy consumption of the multi-robot system, real-time task allocation with multi-priorities and replanning of emergency tasks. At present, there are two kinds of MRTA approaches, namely, optimization-based approaches and market-based approaches. Optimization-based approaches include deterministic methods, such as mixed integer linear programming optimization algorithm [26], and stochastic methods, such as particle swarm optimization algorithm [27]. Many MRTA algorithms based on the market method have been proposed [28,29]. Considering the autonomy of robots, market-based algorithms allow robots to compete for different tasks by bidding for the tasks they are interested in during the auction process. Compared with optimization-based methods, market-based approaches have higher flexibility in solving the task allocation problem in the scene of elderly care. CBBA is a recent and widely discussed market-based MRTA algorithm and has many extensions [30,31]. The CBBA allocates tasks in a time-extended manner. When implemented in a dynamic environment the tasks may have to be reallocated in the CBBA to address the environmental changes. However, the CBBA and its extended algorithms lack research on reducing the energy consumption of the whole system. In addition, the bidding mechanism does not consider waiting time and task priorities of users in elderly care when calculating bids. The MRTA algorithm in the scene of elderly care should reduce the energy consumption of the robot system by optimizing the task allocation method and path optimization method. Based on ensuring the minimum energy consumption of the system, the multiple demands of users should be allocated in a timely and reasonable manner, while avoiding the emergencies caused by energy shortages and ensuring the safety and integrity of the whole nursing process. To address the above problem, we established a novel smart home for elderly care based on multi-heterogeneous nursing robots and sensor networks. In addition, we proposed an MRTA algorithm that is suitable for elderly care. We summarize our innovations as follows: (1) A novel MHRS and its self-organizing architecture covering most nursing scenes of elderly care is proposed, which contributes to a comprehensive smart home for elderly care. (2) An MRTA algorithm of MHRS is proposed for elderly care, which can achieve safe adaptive cooperation, multi-priority task planning, and emergency task calling.

Smart Home for Elderly Care
There are several studies of smart homes integrated with robots and sensor networks for elderly care; however, they all have limitations in functionality, security, and service continuity. Therefore, based on the original system [25], we optimized the gateway and added two kinds of nursing robots, namely intelligent bed, and personal care robot. The MNSH, as shown in Figure 1 integrates a smart home, seven nursing robots, sensor network, and data management system so as to contribute to raising the living standards of the elderly. The overall technology of MNSH can be applied not only to families but also to hospitals and pension centers. Compared with previous studies [22,32,33], MNSH focuses on behavioral assistance that is closer to life.

Heterogeneity of Robots
The functions and descriptions of seven heterogeneous robots that met the basic needs of the elderly, and had the most common hardware and software resources associated with the necessary functions, that were considered in this work are listed in Table 1. These seven robots were independently developed by our laboratory, and their control methods and applications in real scenes were studied beforehand (as shown in Appendix A). According to the needs of users and matching the number of different robots, we could provide unattended nursing-based solutions for families, hospitals, and pension centers. The user operates the remote controller to call the different robots. Based on the indoor positioning method, task planning and path planning, and human-robot cooperation control, the robot comes to the human's side and helps the users to implement auxiliary tasks, based on optimal auxiliary strategy. Through cooperation between these home care robots, the tasks in most elderly care scenarios can be completed.

R5
(ESR) Excretory Support Robot ESR can help bedridden people to complete assisted excretion indoors. Six pressure sensors are installed in the seating part, which can be used to evaluate the seating position and fall risk for ensuring comfort of the whole process [34,35].        The overall architecture of the smart home. This smart home consists of an MNSH prototype, sensor networks and data management system. The whole system provides the following services for several users: (1) ADLs (basic activities of daily living) Service: safe and comfortable assisted services for getting up, standing up, walking, carrying things, and excretion.
(2) EDLs (enhanced activities of daily living) Services: the fall detection system and remote monitoring service. (3) IDLs (instrumental activities of daily living) Service: gait rehabilitation training and self-diagnosis services.

Heterogeneity of Robots
The functions and descriptions of seven heterogeneous robots that met the basic needs of the elderly, and had the most common hardware and software resources associated with the necessary functions, that were considered in this work are listed in Table 1. These seven robots were independently developed by our laboratory, and their control methods and applications in real scenes were studied beforehand (as shown in Appendix A). According to the needs of users and matching the number of different robots, we could provide unattended nursing-based solutions for families, hospitals, and pension centers. The user operates the remote controller to call the different robots. Based on the indoor positioning method, task planning and path planning, and human-robot cooperation control, the robot comes to the human's side and helps the users to implement auxiliary tasks, based on optimal auxiliary strategy. Through cooperation between these home care robots, the tasks in most elderly care scenarios can be completed. The overall architecture of the smart home. This smart home consists of an MNSH prototype, sensor networks and data management system. The whole system provides the following services for several users: (1) ADLs (basic activities of daily living) Service: safe and comfortable assisted services for getting up, standing up, walking, carrying things, and excretion. (2) EDLs (enhanced activities of daily living) Services: the fall detection system and remote monitoring service. (3) IDLs (instrumental activities of daily living) Service: gait rehabilitation training and self-diagnosis services.

The Architecture of MHRS
The energy consumption and task planning of MHRS determine nursing safety, which is particularly important in the real nursing process. To realize efficient service for multitasks, we established such an architecture for MHRS. First, when users use the remote control to start tasks, the central control center is required to carry out overall task allocation. Then, a robot alliance is established by multiple robots to complete this continuous task. In the process of completing the task, the central controller is not needed, but the optimal auxiliary strategy is completed through the adaptive cooperative control among multiple robots.
As shown in Figure 2, we proposed self-organizing MHRS architecture. The demands of users in the elderly scenario are regarded as a series of compound tasks {T 1 , T 2 , . . . , T m }. Each compound task is decomposed into a list of subtasks {t 1 , t 2 , . . . , t m }, treating the task allocation problem in this scenario as a decompose-then-allocate problem, as described in [41,42]. The task allocation architecture of MHRS includes the following three parts: Central control layer: As the coordinator of the architecture, the central controller receives the user's demands, the robot's bidding information, position, occupancy, and other related information, then centrally assigns the tasks sent by the users.
Robot alliance layer: When the task T m is assigned, the central controller stops giving guidance to each robot. Robot r 1 . . . . . . Robot r m form a robot group according to the task vector to complete one task. Each robot group should include at least two heterogeneous nursing robots.
Distributed execution layer: Each robot performs its own subtasks. Meanwhile, when interacting with the environment, each robot adjusts itself in a timely manner according to the situation in the nursing process, to adapting to specific users and to ensure safety. among multiple robots.
As shown in Figure 2, we proposed self-organizing MHRS architecture. The demands of users in the elderly scenario are regarded as a series of compound tasks , , … , . Each compound task is decomposed into a list of subtasks , , … , , treating the task allocation problem in this scenario as a decompose-then-allocate problem, as described in [41,42]. The task allocation architecture of MHRS includes the following three parts: Central control layer: As the coordinator of the architecture, the central controller receives the user's demands, the robot's bidding information, position, occupancy, and other related information, then centrally assigns the tasks sent by the users.
Robot alliance layer: When the task is assigned, the central controller stops giving guidance to each robot. Robot ……Robot form a robot group according to the task vector to complete one task. Each robot group should include at least two heterogeneous nursing robots.
Distributed execution layer: Each robot performs its own subtasks. Meanwhile, when interacting with the environment, each robot adjusts itself in a timely manner according to the situation in the nursing process, to adapting to specific users and to ensure safety.

Task Model
In order to clearly describe the logic and randomness of activities in the nursing process, and realize continuously safe behavior in nursing using MHRS in the elderly nursing scene, it is crucial to model the whole nursing process. We proposed a DBPAEbased (Dynamic task Based Parallel Auction and Execution) task planning method. The tasks occurring in elderly care are closely related, and the execution sequence and time of tasks are strictly required. Meanwhile, users may change their demands momentarily, and the whole process has certain random characteristics. Based on the basic task unit divided by the central control layer, the model of continuous nursing tasks that occur frequently in elderly care was established. In this paper, we took a continuous auxiliary task as an example, and the graphic model of the nursing process is shown in Figure 3 (First, get up, move indoors and drink water, then conduct excretion, and finally go back to bed). Nodes i j represent different states in performing nursing tasks, and activities (i, j) represent the transfer relationship between states, that is, the execution process of activities, including the execution time and occurrence probability of activities. The quantitative relationship is expressed by the transfer function W ij (s), where s is an arbitrary real number. The value p ij is the probability that activities (i, j) will occur under the condition that the state of the leading node i is realized, and t ij is the execution time of the activity (i, j). The different models of nursing processes can be combined and deduced based on these task units and task parameters according to actual needs. The activities corresponding to each task, required robots, and priorities are shown in Table 2. According to the types of tasks, the priority of each task is set to a value between 0 (highest priority) and 4 (lowest priority). All high-priority tasks should be assigned before low-priority tasks. In the whole nursing process, users may change their demands momentarily, and there may be emergencies in the environment at any time. Therefore, the updated model of the nursing process realizes multi-step planning by inserting a task chain composed of multiple task units. When the user has new demands or an emergency suddenly occurs during the execution of the task, the original model is inserted into the new task chain from a suitable time point. The insertion time point needs to be determined according to the task allocation method and task priority. We assume that the user has some mobility and csn walk with robot assistance in the case of Figure 3, but cannot perform some tasks in daily life alone, such as moving indoors and getting up. is necessary to identify the user's dynamic posture by lidar, to provide the user with the optimal seating point and angle. This kind of transfer information needs to be generated online, which is the key to ensuring that users can sit in the safest and most comfortable angle. Next, IWR transports the user to the kitchen for drinking water or any other places they want to go (15 to 16). Then, the auxiliary excretion is implemented by ESR (17 to 25). ESR completes path planning and autonomous navigation according to the user's position. Finally, the task of sending the user back after the excretion is completed (26 to 0).  If the user suddenly changes his or her mind and wants to go to rehabilitation training, the original auxiliary excretion task is canceled. The planned task model is updated by inserting the new "rehabilitation training" task chain (task chain 41 to 46, as shown in green lines) from node 15 to node 26. The IWR transports the user to GRR for gait rehabilitation training. After the rehabilitation training, the robot sends the user back to bed (24 to 0). Similarly, when a user in bed wants the robot to help pick up some simple  In the initial stage, the user is in bed and the model starts from node 0. The user waits for the arrival of the robot after issuing the get-up demand, and the central controller assigns the robot by judging the priority of all tasks in the current smart elderly care home. At this time, if there is no higher priority task and WSR is idle, the WSR comes directly to the bedside according to the user's position in bed, detected by the whole torso pressure detection mattress. If there is a higher priority task or there is no idle robot at this time, the user waits for the robot to come to his or her side after finishing other tasks (2 to 4). Next, WSR implements the getting-up transfer on the premise of following the preset transfer trajectory (5 to 9). The above process csn help the user to complete the movement of assisted getting up. Due to the user's weak mobility, the process of getting up includes large limb support movements, and support with irregular movements likely to produce large impact forces on the user's trunk and lower limb joints. Therefore, to ensure the safety of the whole process, it is necessary to set the transfer trajectory in advance in combination with the user's physical condition and illness condition, and strictly follow the transfer strategy for assistance. Then, the stand-to-sit transfer is employed by means of cooperation between WSR and IWR (10 to 14). In the process of collaboration between the two robots, the central controller needs to automatically establish task groups according to the task type and complete the communication channel docking, position sharing, navigation, and position docking of the corresponding two robots. Meanwhile, it is necessary to identify the user's dynamic posture by lidar, to provide the user with the optimal seating point and angle. This kind of transfer information needs to be generated online, which is the key to ensuring that users can sit in the safest and most comfortable angle. Next, IWR transports the user to the kitchen for drinking water or any other places they want to go (15 to 16). Then, the auxiliary excretion is implemented by ESR (17 to 25). ESR completes path planning and autonomous navigation according to the user's position. Finally, the task of sending the user back after the excretion is completed (26 to 0).
If the user suddenly changes his or her mind and wants to go to rehabilitation training, the original auxiliary excretion task is canceled. The planned task model is updated by inserting the new "rehabilitation training" task chain (task chain 41 to 46, as shown in green lines) from node 15 to node 26. The IWR transports the user to GRR for gait rehabilitation training. After the rehabilitation training, the robot sends the user back to bed (24 to 0). Similarly, when a user in bed wants the robot to help pick up some simple objects, the original model can be updated and a new task chain can be inserted. Such tasks are extremely important in daily life for users with weak mobility, and the robot can autonomously move to the table or the refrigerator, grasp the desired object for the user, and complete the delivery hand to hand (task chain 37 to 40, as shown in purple lines). In the figure 49 to 52 represent the user's sudden desire to carry certain heavier objects during assisted walking. Books or meals need to be carried in daily life, which requires the assistance of TR (task chain 49 to 52, as shown in yellow lines). More importantly, if an emergency occurs, such as other users falling or sending out an emergency call for help, the central control system replans this as the highest priority task and rescue is provided with the goal of the robot reaching the target addressed most quickly. In the process of task allocation, the central controller may cancel the nearby nursing tasks on the premise of ensuring the safety of other users, to rescue the current users (53 to 54). In the above process, we set a unified global path planning method, navigation method, and communication interface for the robot.
The transfer strategy, including transfer point, transfer trajectory, transfer posture and transfer speed of the robot during the execution of nursing tasks may be deviated due to external factors, such as the friction of a carpet, which leads to inability to complete the optimal transfer according to the preset transfer strategy. Therefore, the built model focuses on the judgment of the situation involving any switches in the user's state in the nursing process. If the actual transfer situation deviates from the optimal transfer target, the robot adjusts before performing the task until it provides the user with the optimal transfer strategy.

Problem Statement
In an MRTA problem, we regard the demands of users in the scene of elderly as a series of compound tasks, each compound task is decomposed into a list of sub-tasks {t d , d = 1, . . . , N st }, treating the task allocation problem in this scenario as a decomposethen-allocate problem. The robots {r n , n = 1, . . . , N r } integrated in the MNSH are heterogeneous, and have different sensing and actuating capabilities for their successful execution. The MRTA problem addressed in this paper can be expressed as follows: Subject to where b n,d is the smallest effort value from robot r n corresponding to task t d , which is obtained from all bid calculation values v n,d from the robots in MHRS. It implies that the overall workload of the robot rn is the smallest for this task t d , and we take the energy consumption and waiting time into account in the whole calculation process. The value θ n,d is the task allocation parameter, and by setting this parameter, we must ensure that a task is effectively assigned to the robot. This constraint on θ n,d is given by Equation (3), and all tasks have to be allocated and implemented.

Communication System and Time Synchronization
Aiming at effective nursing for daily behavior, a universal communication system for heterogeneous nursing robots was established. The system is applied in the central control layer and the distributed execution layer. When multiple heterogeneous nursing robots are controlled cooperatively, the communication system of the distributed execution layer can complete the information interaction of each member of the robot group, such as the position, posture and motion state of each robot. Through information exchange and cooperation among multiple robots, users are assisted to complete the transfer task. In addition to the related information of the robot, the system can collect and analyze the physiological signals of users. Meanwhile, the communication platform establishes a universal interface and communication protocol to realize effective communication between heterogeneous robots and many different types of sensors, which increases the compatibility of the system. The communication system reserves several serial ports for other kinds of sensors. When the system needs to add other types of information, the required sensors can be directly inserted into the communication platform. This makes the data types collected by the communication system more flexible and improves the scalability of the communication system. The general communication protocol is shown in Table 3. After the data is unified, it is sent to other nursing robots and control centers through the wireless transmission module. If the data received by the wireless communication module of the nursing robot conforms to the above communication protocol, the instruction is effective information for receiving and processing of data. When the two robots sre very close to each other, they enter the domain of robot cooperation, and the alignment and cooperation control of the two robots are completed based on a visual servo method. The communication system of the central control layer is mainly responsible for receiving the bidding information of each robot and ensure time synchronization for subsequent task assignment.

Bid Calculation
The effort corresponding to a skill is directly proportional to the estimated energy consumption ω and inversely proportional to the expertise ψ of the robot in executing the specific task. The parameter ω reflects the estimated energy consumption of implementing overall work corresponding to robot r i , which may include path planning, navigation, execution of specified tasks and emergency tasks, etc. Therefore, the overall effort of a task is the sum of the efforts of subtasks corresponding to the individual skills. The skill s p required for a task t d is defined as a function of the different actions required for the skill and is dependent on the skill. The parameters considered for the work estimate may differ. The expertise parameter ψ n,p 0 ≤ ψ n,p ≤ 1 is determined based on the design of the robot. If a robot r n does not have a specific skill s p , ψ n,p = 0, the expertise ψ n,p can be expressed as a setting function. The time cost factor of the task is directly proportional to the estimated completion time T n,d of the task, which is obtained by the model of nursing process. The value δ is the time scaling factor. It fluctuates around the value δ = 1, which needs to be effectively adjusted in combination with the actual task and experience example. When there is an emergency task request, the value should be less than 1. When the real-time demand task is a routine nursing task, the value should be greater than 1.
Subject to E remain ≤ ω , v n,d = φ When the robot does not perform any tasks, the bid value v n,d of the robot r n for the task t d is shown by Equation (4). When the robot r n is executing task t j and bidding for the next task t d in parallel, the bidding value is given by Equation (5). Among them, the time cost for the robot to complete the two tasks respectively were considered. When a robot is performing a current task, it needs to estimate the combination of unfinished tasks and the tasks to be assigned, as shown in Equation (5). Under this bidding scheme, the robot chooses a nursing task that requires fewer skills and less time, because this preference consumes less energy to complete the task and allow the robot to quickly enter the next nursing task. The constraint on v n,m is given by Equation (6). When the remaining energy E remain of the system is less than the energy required to complete the next task, the bid value v n,m is null. It indicates that the robot gives up bidding for the current task, which can effectively avoid dangerous behavior, such as power failure during task execution.
The energy consumption of the robot is calculated in the following equations. Mobile chassis and auxiliary mechanism of the robot are driven by an AC permanently excited synchronous motor. Therefore, the power P i (t) for each robot is then defined as: Where V mc (t), V am (t) and I mc (t), I am (t) are the equivalent DC voltage and current of mobile chassis and auxiliary mechanism respectively. The energy required to perform the operation can be computed by Equation (8).
where T f is time to complete the operation. E i OP and E i idle are the energy consumption when working and when idle, respectively. After an operation is completed, the robot is idle in a specific configuration and each motor must apply a constant holding power P H,i , which leads to idle energy consumption. If P i is the total holding power of Robot i the idle time δ i is determined by the schedule.

Task Allocation Process
According to the proposed bidding calculation scheme, we based the overall decisionmaking process on the task allocation process, as shown in Figure 4. At the beginning of task allocation, the user's demands are first decomposed into a series of interdependent subtasks, at which time all robots can be called. If the robot bid for a subtask, it enters the stage of communication and consensus. If a robot bid higher for a subtask than other robots, it comprehensively decides whether the robot can get the subtask according to the current bidding information of the task and the current state of the robot in the task assignment stage. When all subtasks of a complex task are assigned to corresponding robots, these robots form a static alliance according to the information of the task assignment to complete one complex nursing task. When the robot completes the execution of the current task, the robot bids for the next subtask in parallel with the same process. If a new nursing task is added to the system at the above stage, it is divided into two situations. The first situation is that the new task is included in all tasks and is bid for by the robots together. In the second case, if the newly added task has an urgent priority, all robots that perform lower priority tasks at the current stage stop their tasks. When a robot r n stops executing task t m , the robot enters a new bidding process, at which time the task abandoned from execution can be re-bid. This ensured that urgent nursing tasks are carried out in time. When the robot alliance is established, the robots in the group assist the users' transfer behavior, based on the adaptive cooperative control method. The auxiliary process needs to meet the preset transfer information, including transfer point, transfer speed and transfer trajectory, to ensure the safety of the whole auxiliary process.
priority, all robots that perform lower priority tasks at the current stage stop their t When a robot stops executing task , the robot enters a new bidding process, at w time the task abandoned from execution can be re-bid. This ensured that urgent nur tasks are carried out in time. When the robot alliance is established, the robots in the g assist the users' transfer behavior, based on the adaptive cooperative control method auxiliary process needs to meet the preset transfer information, including transfer p transfer speed and transfer trajectory, to ensure the safety of the whole auxiliary pro

Experimental Results
The DBPAE and MHRS framework was tested extensively in simul environments and in the smart home set up in the laboratory with real robots. different sets of experiments were carried out. In the first set, task allocation experim to the robots in a simulated environment were implemented using both CBBA DBPAE to comparing their performances. The second set of task allocation experim were carried out on real robots in MNSH set up in the laboratory using the DBPAE self-organization architecture.

Performance Comparison of the CBBA and DBPAE in Simulated Environment
Firstly, we conducted an algorithm comparison experiment in a simul environment. We focused on the change of the overall energy consumption and execu time of the system based on different algorithms. These experiments involved a simul obstacle free environment and simulated structured environment, as shown in Figur

Experimental Results
The DBPAE and MHRS framework was tested extensively in simulated environments and in the smart home set up in the laboratory with real robots. Two different sets of experiments were carried out. In the first set, task allocation experiments to the robots in a simulated environment were implemented using both CBBA and DBPAE to comparing their performances. The second set of task allocation experiments were carried out on real robots in MNSH set up in the laboratory using the DBPAE and self-organization architecture.

Performance Comparison of the CBBA and DBPAE in Simulated Environment
Firstly, we conducted an algorithm comparison experiment in a simulated environment. We focused on the change of the overall energy consumption and execution time of the system based on different algorithms. These experiments involved a simulated obstacle free environment and simulated structured environment, as shown in Figure 5. In comparative experiments, task allocation using the DBPAE was compared wi allocation using the CBBA. Since the CBBA could not handle tasks with differe priorities, the heterogeneity and the priority of tasks were considered in DBPAE. We s up ten robots to perform 5 to 30 tasks in the whole experiment, respectively. The path a task location from the robot initial location was planned based on the A* algorithm. Th path was used for the navigation of a robot from starting location to another locatio Meanwhile, we set two constraint conditions for the whole simulation experiment: (1) Th execution time of specific nursing tasks were fixed. (2) All the robots' skills and overa resources met all task requirements.
The performance comparisons of the allocations based on the CBBA and the DBPA are shown in Figure 6. In this paper, we directly defined the total energy consumed by th robot as energy consumption. The calculation of total energy consumption for performin the tasks included navigation tasks, assist tasks and other tasks. For convenience calculation, we unified the energy consumption parameter of the above three types tasks (unit: KJ/m). It contributed to make a comprehensive comparison considering th adaptability of tasks. As the priority of tasks is particularly important in the scene In comparative experiments, task allocation using the DBPAE was compared with allocation using the CBBA. Since the CBBA could not handle tasks with different priorities, the heterogeneity and the priority of tasks were considered in DBPAE. We set up ten robots to perform 5 to 30 tasks in the whole experiment, respectively. The path to a task location from the robot initial location was planned based on the A* algorithm. This path was used for the navigation of a robot from starting location to another location. Meanwhile, we set two constraint conditions for the whole simulation experiment: (1) The execution time of specific nursing tasks were fixed. (2) All the robots' skills and overall resources met all task requirements.
The performance comparisons of the allocations based on the CBBA and the DBPAE are shown in Figure 6. In this paper, we directly defined the total energy consumed by the robot as energy consumption. The calculation of total energy consumption for performing the tasks included navigation tasks, assist tasks and other tasks. For convenience of calculation, we unified the energy consumption parameter of the above three types of tasks (unit: KJ/m). It contributed to make a comprehensive comparison considering the adaptability of tasks. As the priority of tasks is particularly important in the scene of elderly care, we could directly infer that DBPAE was more suitable for elderly care in a smart house with multiusers. However, in order to compare the performance of the algorithm, we comprehensively compared CBBA, DBPAE with priority and without priority in an obstacle free environment, respectively. The real multitasks elderly care environment is closer to the structured environment, so we compared the CBBA with the DBPAE with priority. Figure 6a represents the average energy consumption by the working robots with at least one task when a different number of tasks were allocated to a system of 10 robots, respectively. The average energy consumption per robot was a measure of the average work load of each working robot in the system. We could see that the energy consumption had a rising trend, based on our proposed method in an environment without obstacle. However, in the environment with obstacles, there was little difference in energy consumption between the two methods. Meanwhile, Figure 6b shows the corresponding overall execution time (time by which all tasks were allocated and executed). From the results, the performance in terms of overall execution time for DBPAE could be observed. There was not much change in the overall execution time of the DBPAE considering the task priority. This implied that the overall execution times were not negatively affected. The main reason for the above results include the following points: (1) The bidding algorithm takes the energy consumption of the system and the waiting time of users as the bidding value. It contributes to the central control center completing the task allocation on the premise of not consuming too much energy. (2) A dynamic bidding mechanism is established. Each robot needs to bid for the next task combined with the current status. These calculation processes are carried out inside each robot and in parallel with the tasks being performed by the robot. It also contributes to reducing the time of abandoning a current task and re-planning a task. Particularly in DBPAE, if there are no new emergency tasks, new tasks are dynamically added for future allocation. When emergency priority tasks appear, new assignments are forced by deleting the current tasks of robots performing lower priority tasks. However, in CBBA, to assign newly determined tasks, some of which may be emergency tasks, replanning of tasks that must be performed leads to further delay in overall execution. (3) The high computational requirements of handling many robots can be better satisfied However, in the environment with obstacles, there was little difference in energy consumption between the two methods. Meanwhile, Figure 6b shows the corresponding overall execution time (time by which all tasks were allocated and executed). From the results, the performance in terms of overall execution time for DBPAE could be observed. There was not much change in the overall execution time of the DBPAE considering the task priority. This implied that the overall execution times were not negatively affected. The main reason for the above results include the following points: (1) The bidding algorithm takes the energy consumption of the system and the waiting time of users as the bidding value. It contributes to the central control center completing the task allocation on the premise of not consuming too much energy. (2) A dynamic bidding mechanism is established. Each robot needs to bid for the next task combined with the current status. These calculation processes are carried out inside each robot and in parallel with the tasks being performed by the robot. It also contributes to reducing the time of abandoning a current task and re-planning a task. Particularly in DBPAE, if there are no new emergency tasks, new tasks are dynamically added for future allocation. When emergency priority tasks appear, new assignments are forced by deleting the current tasks of robots performing lower priority tasks. However, in CBBA, to assign newly determined tasks, some of which may be emergency tasks, replanning of tasks that must be performed leads to further delay in overall execution. (3) The high computational requirements of handling many robots can be better satisfied by our proposed DBPAE. Compared with the traditional centralized task planning or multi-objective task allocation methods, it greatly reduces the amount of calculation for centralized task allocation center.
The allocation mechanism of CBBA or traditional multi-objective task allocation methods often caused robots that already had tasks to be assigned more tasks while many other free robots remained without any or with very few allocated tasks. Moreover, in the field of elderly care, traditional algorithms seldom consider energy consumption of the whole system. However, we must always pay attention to the current energy surplus of the robots and effectively estimate the energy consumption for the next task. In the process of performing nursing tasks, accidents, such as power failure, undoubtedly bring great uncertainty to the safety of the elderly. Meanwhile, when a robot lost its bid on a current task, the robot had to give up the bid on that task and on all the tasks it had bid on after that task. This resulted in high computational requirements for a multi-robot system and tasks when using the CBBA. It also resulted in a very high overall execution time which included a long allocation time. Overloading of some robots and high computational complexity did not happen in the DBPAE, because only one task would be assigned to any one robot at any time. The DBPAE resulted in all tasks being allocated and executed within a shorter time. In the nursing process, all tasks are short-term, continuous and random. Therefore, this exerts further advantages in using the DBPAE. Meanwhile, the DBPAE selected the corresponding robot group according to the tasks to complete the assist nursing tasks and allocated tasks in a small range. With sufficient robot resources, all tasks could be allocated and executed in a shorter time. The DBPAE was suitable to the elderly care nursing central environment with a multi-robot system.

Simulation of Emergency Task
Two groups of simulated experiments were conducted. One group of experiments was that all tasks were activated in the initial stage, and the other group added two urgent nursing tasks 100 s after the experiment started. In the real scene, users may fall into bed, fall and perform other dangerous behaviors, and these emergency behaviors would be detected according to sensor networks or user calls. Repeated experiments were carried out on different tasks. When a different number of tasks were assigned to each robot by using DBPAE, the average energy consumption, execution time and response time to urgent tasks of each robot are shown in Figure 7a,b,c, respectively. It could be found that under the intervention of emergency tasks, all indicators of the system could be consistent. that task. This resulted in high computational requirements for a multi-robot system and tasks when using the CBBA. It also resulted in a very high overall execution time which included a long allocation time. Overloading of some robots and high computational complexity did not happen in the DBPAE, because only one task would be assigned to any one robot at any time. The DBPAE resulted in all tasks being allocated and executed within a shorter time. In the nursing process, all tasks are short-term, continuous and random. Therefore, this exerts further advantages in using the DBPAE. Meanwhile, the DBPAE selected the corresponding robot group according to the tasks to complete the assist nursing tasks and allocated tasks in a small range. With sufficient robot resources, all tasks could be allocated and executed in a shorter time. The DBPAE was suitable to the elderly care nursing central environment with a multi-robot system.

Simulation of Emergency Task
Two groups of simulated experiments were conducted. One group of experiments was that all tasks were activated in the initial stage, and the other group added two urgent nursing tasks 100 s after the experiment started. In the real scene, users may fall into bed, fall and perform other dangerous behaviors, and these emergency behaviors would be detected according to sensor networks or user calls. Repeated experiments were carried out on different tasks. When a different number of tasks were assigned to each robot by using DBPAE, the average energy consumption, execution time and response time to urgent tasks of each robot are shown in Figure 7a-c, respectively. It could be found that under the intervention of emergency tasks, all indicators of the system could be consistent. Due to adaptive cooperative control and physical interference in narrow space, the execution time of each experiment would be different. When an urgent task was added, the system would reassign the task. The rapid response of DBPAE to urgent tasks ensured that some urgent nursing tasks were assigned and executed in time. Although the new Due to adaptive cooperative control and physical interference in narrow space, the execution time of each experiment would be different. When an urgent task was added, the system would reassign the task. The rapid response of DBPAE to urgent tasks ensured that some urgent nursing tasks were assigned and executed in time. Although the new urgent task would lead to task reassignment, the extra workload (the extra distance traveled by the robot) could be ignored. This showed that DBPAE could handle new tasks with different priorities without extra overheads, which made it suitable for MHRS in elderly care scenarios.

Continuous Task Assistance by DBPAE
Based on the above research results, the multi-heterogeneous homecare robot system was endowed with the intelligent nursing ability of perception-control-execution integration, and a new model of roboticized care for the elderly with weak motion capability was created. Therefore, the simulation and application of the coexistence of "multi-priority tasks, and urgent tasks" in the scene of the elderly care were carried out. This scene was a study of nursing methods by multi-heterogeneous robots at the same time, which could not only improve the health care experience, but also contribute to promoting the commercial development of the multi-homecare robot system, and had important social and economic value. The scene of elderly care had its particularity, such as a mixture of homogeneous robots and heterogeneous robots, a mixture of multi-priority tasks and urgent tasks, and a mixture of user individual differences and multiple real-time demands. Therefore, establishing a multi-robot task planning framework and communication method for multitasks in the real scene of elderly care, and proposing a task allocation method with high dynamic characteristics was beneficial (as described in Section 3) and served as prerequisites for solving multi-robot task planning. Therefore, based on the proposed method, we conducted repeated continuous behavior-assisted experiments on the independent built experimental scene. One of the continuous assistance experiments is shown in Figure 8a-e (getting up-sitting-standing-walking). The subject sent a demand for indoor walking from the bed. First, IWR navigated to the bedside to help the user get up, then transported the user to the WSR to complete the docking, and finally helped the subject to walk indoors. The subject in our experiments included 10 subjects (5 males and 5 females), aged 22-30 years. The subject triggered the desired task through the remote controller. When a single task 3ws initialized, the central control center assigned it according to the state of the robot and the type of task. This experiment recorded the CBBA algorithm for centralized task allocation and the architecture and algorithm proposed in this paper. Meanwhile, it was assumed that the overall task flow of the experiment was consistent, and when the user finished one task, he or she started the next task. According to the user's dynamic position, task planning and human-robot cooperation control, robots came to help users perform auxiliary tasks. Meanwhile, we established a reconfigurable simulation platform for the nursing center, as shown in Figure 8. It could reconstruct and simulate by adjusting the number of users, the proportion of robots, and specific scenes. In particular, the robot in the simulation platform had the same functions and parameters as the physical robot, which contributed to realizing the simulation of the control system and the sensing system oriented to specific tasks. Figure 8h, shows the direction and overall training plan of the robot according to the user's lower limb state and joint torque analysis. These parameters provided a theoretical basis for real assisted walking. As shown in Figure 8g, we implemented the simulation and experiment of getting up transfer and assisted-excretion transfer. Due to the lack of motion capability of users, caregivers were required to assist users in the whole auxiliary process. In the distributed execution layer, the robot could provide users with the optimal mobility posture in real time according to the dynamic environment. The IB could calculate the user's real-time center of gravity and set the autonomous navigation target point of the ESR. When the nursing staff assisted the user to transfer from a ready-to-transfer state to using the ESR state, the ESR would implement follow-up motion according to the user's real-time posture. In the whole transfer process, the ESR always provided the user with the best transfer posture according to the proposed get up-transfer based on adaptive cooperative control method, which could effectively reduce the workload of the nursing staff and physical load of the user. As shown in Tables 4 and 5, we monitored the time of independent behavior assistance and continuous behavior assistance, respectively.   Among them, we set the initial points of all robots. The above results showed that, although the execution time of each assistance was slightly different, there was little difference between the two task allocation methods in assisting independent behavior. When continuous tasks were carried out, our method was obviously superior to the traditional method and particularly so when an abnormal behavior occurred in the process of performing a task. DBPAE could mobilize the surrounding robots in the fastest time to provide rescue behavior. This further verified our analysis of algorithm comparison in Sections 4.1. In the real nursing scene, there is little difference in energy consumption between the two task allocation methods due to the existence of dynamic obstacles and walls. On the basis of ensuring enough energy of the robot, the task completion time was further reduced, which would be especially important in nursing scenes.

Multi-Robot Cooperative Task in Distributed Execution Layer
The distributed execution layer is especially important for the elderly care. Through  Among them, we set the initial points of all robots. The above results showed that, although the execution time of each assistance was slightly different, there was little difference between the two task allocation methods in assisting independent behavior. When continuous tasks were carried out, our method was obviously superior to the traditional method and particularly so when an abnormal behavior occurred in the process of performing a task. DBPAE could mobilize the surrounding robots in the fastest time to provide rescue behavior. This further verified our analysis of algorithm comparison in Section 4.1.
In the real nursing scene, there is little difference in energy consumption between the two task allocation methods due to the existence of dynamic obstacles and walls. On the basis of ensuring enough energy of the robot, the task completion time was further reduced, which would be especially important in nursing scenes.

Multi-Robot Cooperative Task in Distributed Execution Layer
The distributed execution layer is especially important for the elderly care. Through the cooperation of multiple robots in groups, the users can be sure of assistance in a predetermined way, which ensures the safety of human-robot interaction. In this section, we conducted experiments on auxiliary excretion behavior in the distributed execution layer. There was a difference in the execution time when performing the transfer task that required the cooperation of two robots because the robot system adopted the self-organizing architecture. When the user completed the transfer from one state to another, it was necessary to calculate the optimal transfer point, transfer posture, and transfer trajectory in advance according to the user's physical condition. This information combined the user's physical conditions and diseases, and set the optimal auxiliary strategy for the user from the perspective of medicine. Then, in the process of real-time dynamic assistance, two robots were needed to perform follow-up motion according to the user's real-time dynamic position and posture. In this part, we describe the experiment of trajectory tracking of ESR in a human testing scene. Ten testers (5 females and 5 males), aged 22-30 years, were asked to experiment with the continuous behavior assistance by a robot in a nursing home scene. To simulate a disabled lower limb, their legs were fixed with a knee supporter by an allowed bending angle. By means of the knee supporter, different levels of disability could be simulated with various restriction angles set. Three simulated disability levels (SDLs) were achieved, as shown in Figure 9 and were labeled as SDLs1, SDLs2, and SDLs3. All the participants agreed to the experimental protocol and permitted the publication of their photographs for scientific purposes. predetermined way, which ensures the safety of human-robot interaction. In this section, we conducted experiments on auxiliary excretion behavior in the distributed execution layer. There was a difference in the execution time when performing the transfer task that required the cooperation of two robots because the robot system adopted the selforganizing architecture. When the user completed the transfer from one state to another, it was necessary to calculate the optimal transfer point, transfer posture, and transfer trajectory in advance according to the user's physical condition. This information combined the user's physical conditions and diseases, and set the optimal auxiliary strategy for the user from the perspective of medicine. Then, in the process of real-time dynamic assistance, two robots were needed to perform follow-up motion according to the user's real-time dynamic position and posture. In this part, we describe the experiment of trajectory tracking of ESR in a human testing scene. Ten testers (5 females and 5 males), aged 22-30 years, were asked to experiment with the continuous behavior assistance by a robot in a nursing home scene. To simulate a disabled lower limb, their legs were fixed with a knee supporter by an allowed bending angle. By means of the knee supporter, different levels of disability could be simulated with various restriction angles set. Three simulated disability levels (SDLs) were achieved, as shown in Figure 9 and were labeled as SDLs1, SDLs2, and SDLs3. All the participants agreed to the experimental protocol and permitted the publication of their photographs for scientific purposes. The simulation results and experiments of assisted-excretion transfer are shown in Figure 10. As shown in Figure 10c,d, the y-axis is the control distance (the distance between the user and the robot) ( ∈ [0,35]), the x-axis is the leg tilt angle ( ∈ [−20,20]), and the z-axis is the user height ( ∈ [−20,120]). The red dot in the figure is the simplified point of the user's essential skeleton, and the line connecting them represents the posture that the user's body had, half-squatting and ready to sit down. The robot, represented by the hollow cone, moved laterally due to the change of user's posture. When and obtained different values, the transfer point coordinates were calculated according to the user's physical condition. The optimal transfer point in the assisted-excretion experiment is shown in Figure 10c. In the assisted-excretion process, the optimal transfer point of the specific user would be offset due to the change in the leg tilt angle. As shown in Figure 10d, the robot adjusted its position to the right to ensure that the user sat in the best position. It was correct when the whole transfer process was carried out according to the preset transfer strategy. When not following the preset auxiliary strategy, or not reaching the designated transfer position, the robot system needed to be re-controlled to achieve the safest attitude control. Therefore, in the real nursing situation, the overall execution time would be different. The simulation results and experiments of assisted-excretion transfer are shown in Figure 10. As shown in Figure 10c,d, the y-axis is the control distance D ctr (the distance between the user and the robot) (D ctr ∈ [0, 35]), the x-axis is the leg tilt angle a (a ∈ [−20, 20]), and the z-axis is the user height H (H ∈ [−20, 120]). The red dot in the figure is the simplified point of the user's essential skeleton, and the line connecting them represents the posture that the user's body had, half-squatting and ready to sit down. The robot, represented by the hollow cone, moved laterally due to the change of user's posture. When D ctr and a obtained different values, the transfer point coordinates were calculated according to the user's physical condition. The optimal transfer point in the assisted-excretion experiment is shown in Figure 10c. In the assisted-excretion process, the optimal transfer point of the specific user would be offset due to the change in the leg tilt angle. As shown in Figure 10d, the robot adjusted its position to the right to ensure that the user sat in the best position. It was correct when the whole transfer process was carried out according to the preset transfer strategy. When not following the preset auxiliary strategy, or not reaching the designated transfer position, the robot system needed to be re-controlled to achieve the safest attitude control. Therefore, in the real nursing situation, the overall execution time would be different.

Conclusions
Introducing nursing robots and sensor network systems into smart homes is an important way to help the elderly live and improve their welfare. However, most smart elderly care homes based on multi-robot systems have functional limitations and service discontinuity. Therefore, we independently developed seven heterogeneous homecare robots, which could complete most tasks covering daily life care scenes, such as getting up, walking, and excreting. By establishing the standardized interface and communication protocol of MHRS and combining it with the ubiquitous sensor networks, we established a novel smart elderly care home. The perception system of a smart elderly care home is based on spatial and onboard ubiquitous sensor networks, which can effectively identify the emergency behaviors of users, such as falling out of bed. Meanwhile, to realize efficient and safe continuous nursing behavior, we propose a selforganizing MHRS architecture, which includes a central control layer, robot alliance layer, and distributed execution layer. It provides a foundation for robot task allocation, selforganizing communication alliance, and adaptive cooperative control of two robots for specific transfer and multiplication tasks.
Then, to clearly describe the continuous nursing process with multi-priority tasks, multiple simultaneous demands and emergency tasks, we proposed the continuous nursing task model and MRTA algorithm. It effectively solved the three key problems of multi-robot safety adaptive cooperation, multi-priority task planning, and emergency task calling in the elderly care scene. Finally, we established a virtual simulation elderly care platform for the above technology, which was used for multi-robot task planning and theoretical verification of specific tasks. Meanwhile, we experimented with multiple care behaviors and continuous care behaviors under the architecture of the real smart elderly care home. Comprehensive experiments showed that the MHRS-based smart home architecture and the proposed method could be applied in nursing centers, hospitals, and other places for elderly care. In the future, we will devote ourselves to a wider range of experiments in real situations, especially regarding the aspects of active cognition and

Conclusions
Introducing nursing robots and sensor network systems into smart homes is an important way to help the elderly live and improve their welfare. However, most smart elderly care homes based on multi-robot systems have functional limitations and service discontinuity. Therefore, we independently developed seven heterogeneous homecare robots, which could complete most tasks covering daily life care scenes, such as getting up, walking, and excreting. By establishing the standardized interface and communication protocol of MHRS and combining it with the ubiquitous sensor networks, we established a novel smart elderly care home. The perception system of a smart elderly care home is based on spatial and onboard ubiquitous sensor networks, which can effectively identify the emergency behaviors of users, such as falling out of bed. Meanwhile, to realize efficient and safe continuous nursing behavior, we propose a self-organizing MHRS architecture, which includes a central control layer, robot alliance layer, and distributed execution layer. It provides a foundation for robot task allocation, self-organizing communication alliance, and adaptive cooperative control of two robots for specific transfer and multiplication tasks.
Then, to clearly describe the continuous nursing process with multi-priority tasks, multiple simultaneous demands and emergency tasks, we proposed the continuous nursing task model and MRTA algorithm. It effectively solved the three key problems of multi-robot safety adaptive cooperation, multi-priority task planning, and emergency task calling in the elderly care scene. Finally, we established a virtual simulation elderly care platform for the above technology, which was used for multi-robot task planning and theoretical verification of specific tasks. Meanwhile, we experimented with multiple care behaviors and continuous care behaviors under the architecture of the real smart elderly care home. Comprehensive experiments showed that the MHRS-based smart home architecture and the proposed method could be applied in nursing centers, hospitals, and other places for elderly care. In the future, we will devote ourselves to a wider range of experiments in real situations, especially regarding the aspects of active cognition and personalized service. We also plan to improve the performance of the architecture, such as building the hybrid context model with strong reasoning and expressive ability.
Author Contributions: All authors have actively contributed to the elaboration of the manuscript, more particularly D.Z. and Y.H. have performed the integration of the multi-robot interaction system; D.Z., C.Y. and T.Z. have focused on the experiment, data processing and statistical analysis; T.Z. and J.Y. on performing the test scenario and collect the necessary data. All authors have read and agreed to the published version of the manuscript. Acknowledgments: Given thanks to all the entities that have financed part of this research, as well as, to all the users who have wanted to participate and contribute to the development of this work.

Conflicts of Interest:
The authors declare that they have no conflict of interest.

Appendix A
This section describes the interaction modes, and the operation methods of seven kinds of auxiliary robots in the paper.
Intelligent Wheelchair Robot (IWR) has two interactive modes: (1) Joystick; (2) Shared control by the recognized user's intention of motion direction and motion speed. IWR mainly helps users to move indoors and dock with other robots in the scene of elderly care.
Gait Rehabilitation Robot (GRR) has three gait training interaction modes: (1) Passive training (The user carries out gait rehabilitation training according to the robot's running speed and path preset by the doctor in advance); (2) Active training (The robot follows the user's walking direction intention and walking speed intention for follow-up assistance); (3) Hybrid training (combination of Passive training and Active training). GRR helps users to carry out rehabilitation training in the scene of elderly care, and its active mode greatly improves the participation of users in rehabilitation training, which is beneficial for users to achieve a better rehabilitation result.
Personal care robot (PCR) has three interactive modes: (1) Remote control; (2) Voice interaction; (3) Autonomous movement based on user intention reasoning. PCR can not only assist users, but also its humanoid appearance makes users feel more cordial when interacting with robots.
Walking Support Robot (WSR) has two interactive modes: (1) Joystick; (2) Shared control by the recognized user's intention of walking direction and walking speed.
Excretory Support Robot (ESR) has two interactive modes: (1) Remote control; (2) Autonomous movement based on the user's position and attitude. WSR can help users to complete active indoor walking in the scene of elderly care, which greatly improves the physical and mental health of users with weak lower limb movement ability.
Transport Robot (TR) has two interactive modes: (1) Remote control; (2) Autonomous mobility and navigation. Due to the particularity of users in the scene of elderly care, they cannot take the initiative to carry some special items, such as heavy items and bulky items.TR helps users to complete the transfer of such items, which greatly reduces the burden of the user's life.
Intelligent Bed (IB) has three interactive modes: (1) Remote control; (2) Touch screen; (3) Pressure control. Hardware resources of IB include touch screen; pressure sensors. IB is not only used as a bed in life, but also provides great help for the life of users with lower limb paralysis.