Development of a Motorized Hospital Bed with Swerve Drive Modules for Holonomic Mobility

: In hospitals; transferring patients using hospital beds is time consuming and inefﬁcient. Additionally; the task of frequently pushing and pulling beds poses physical injury risks to nurses and caregivers. Motorized hospital beds with holonomic mobility have been previously proposed. However; most such beds come with complex drivetrain which makes them costly and hinders larger-scale adoption in hospitals. In this study; a motorized hospital bed that utilizes a swerve drive mechanism is proposed. The design takes into account simplicity which would allow for minimum modiﬁcation of the existing beds. Two DC motors for steering and propulsion are used for a single swerve drive module. The control of the propulsion motor is achieved by a combination of trajectory planning based on quintic polynomials and PID control. Further; the control performance of the proposed bed was evaluated; and the holonomic mobility of its prototype was successfully demonstrated. An average error of less than 3% was obtained for motion with a constant velocity; however; larger values in the range of 15% were observed for other conditions, such as accelerating and decelerating.


Introduction
Hospital beds have forever been a crucial part of the healthcare system. Generally, transferring patients from one location to another is among the most important tasks of hospital beds [1]. However, this process is time consuming and inefficient because considerable workforce is needed for providing assistance. In addition, there have been reports that considered this task risky, as it can result in physical injuries to nurses and caregivers [2][3][4]. To address this issue, the idea of hospital beds with special mobility features has been around for a long time. In fact, since the 1990s, there have been many research efforts which resulted in considerable improvements of hospital bed. However, the focal points have been mainly in the design, notably in the addition of features such as side rails and adjustable parts [5][6][7][8][9][10], whereas there has been hardly any improvement in the mobility aspect.
Wang et al. [11,12] have developed a prototype of an automated hospital bed that emphasizes on navigation, mapping, and obstacle avoidance. However, its mechanical drivetrain is considerably rudimentary, as it has two differential wheels that limit its maneuverability to a nonholonomic one. Considering hospital environments, which are usually dynamic with a lot of people moving around, it is unusual to expect hospital beds to sport a holonomic feature that is capable of omnidirectional mobility. Guo et al. [13,14] developed a hospital bed with omnidirectional mobility by utilizing the active split offset caster (ASOC) module. Though powerful, the ASOC module is mechanically quite complex, as it has two independently driven coaxial wheels. In addition, employing the ASOC module would need a complete makeover of hospital beds. There are some advanced hospital beds available in the market, such as the bed previously proposed by Hospimek [15]. However, similar to the bed developed by Guo et al., most off-the-shelf products have complex drivetrain mechanisms and are hence expensive.
In this study, we propose a motorized hospital bed that utilizes a swerve drivetrain mechanism and operates with holonomic mobility. Unlike other drivetrain options, the swerve drive is simple in design and has the capability to provide omnidirectional mobility. It also resembles the casters that come with general hospital beds and hence, would allow for the minimum modification of the existing beds. Undoubtedly, such a feature would allow for a favorable larger-scale adoption in a more cost-efficient manner. Therefore, the aim of this study was to develop an initial prototype with the proposed approach and subsequently evaluate its performance. The focus of the evaluation was on the propulsion motors of the swerve drive, especially on the error between the planned and actual velocities.

Mechanical Design
The prototype of the proposed motorized hospital bed in this study was developed based on a common off-the-shelf hospital bed. Achieving holonomic mobility can be realized by incorporating omni wheels, mecanum wheels, or a swerve drive module. Omni and mecanum wheels are popular options in many robot competitions, whereas the swerve drive is mostly found in the industries of autonomous guided vehicles. The swerve drive was adopted in this project because it would require minimum modifications to existing hospital beds. In addition, to incorporate omni or mecanum wheels, they have to be placed in a certain fashion, i.e., circular or symmetrical, to make sure that their kinematic requirements are met. In contrast, the swerve drive is more flexible in this regard due to its additional steering motor, which enables wheels to rotate in any direction. Second, the swerve drive bears the closest resemblance to the general casters found in off-the-shelf hospital beds.
The proposed general design of the swerve drive module is shown in Figure 1a, and its major parts are shown in Figure 1b. This swerve drive module is used to replace casters to realize the whole conversion of usual hospital beds to motorized ones (Figure 1c). module would need a complete makeover of hospital beds. There are some advanced hospital beds available in the market, such as the bed previously proposed by Hospimek [15]. However, similar to the bed developed by Guo et al., most off-the-shelf products have complex drivetrain mechanisms and are hence expensive.
In this study, we propose a motorized hospital bed that utilizes a swerve drivetrain mechanism and operates with holonomic mobility. Unlike other drivetrain options, the swerve drive is simple in design and has the capability to provide omnidirectional mobility. It also resembles the casters that come with general hospital beds and hence, would allow for the minimum modification of the existing beds. Undoubtedly, such a feature would allow for a favorable larger-scale adoption in a more cost-efficient manner. Therefore, the aim of this study was to develop an initial prototype with the proposed approach and subsequently evaluate its performance. The focus of the evaluation was on the propulsion motors of the swerve drive, especially on the error between the planned and actual velocities.

Mechanical Design
The prototype of the proposed motorized hospital bed in this study was developed based on a common off-the-shelf hospital bed. Achieving holonomic mobility can be realized by incorporating omni wheels, mecanum wheels, or a swerve drive module. Omni and mecanum wheels are popular options in many robot competitions, whereas the swerve drive is mostly found in the industries of autonomous guided vehicles. The swerve drive was adopted in this project because it would require minimum modifications to existing hospital beds. In addition, to incorporate omni or mecanum wheels, they have to be placed in a certain fashion, i.e., circular or symmetrical, to make sure that their kinematic requirements are met. In contrast, the swerve drive is more flexible in this regard due to its additional steering motor, which enables wheels to rotate in any direction. Second, the swerve drive bears the closest resemblance to the general casters found in offthe-shelf hospital beds.
The proposed general design of the swerve drive module is shown in Figure 1a, and its major parts are shown in Figure 1b. This swerve drive module is used to replace casters to realize the whole conversion of usual hospital beds to motorized ones ( Figure 1c).  Two motors were used for each swerve drive module: one for steering and the other for propulsion. The target load the prototype could handle was set to 100 kg, therefore the choices of the propulsion motor and gear system were crucial. For steering, a DC motor (PG36 600 rpm from Brontoseno Electric) was used. The gear ratio between the steering motor, sensor, and steering mechanism was 30:18:18. For propulsion, a DC motor (PG45 500 rpm), a timing belt, and a pulley were used (i.e., HTD 5M 32 teeth in the propulsion motor and HTD 5M 60 teeth in the shaft). Most parts of the swerve drive module, including the spacers, mountings, and plates, were 3D printed using PLA. Additionally, the material used for the shaft was stainless steel, whereas aluminum, nylon, and silicon rubber were used for the hub, rim, and traction surface area of the wheels, respectively.

Electrical Design
The interconnections of the electrical components and the control strategy of the developed swerve drive module are shown in Figure 2.

Fabrication of the Prototype and PID Tuning of the Propulsion Motor
The results of the fabricated prototype of the swerve drive module are shown in Figure 3a. In addition, Figure 3b shows a photo of the whole system when four modules were installed on the frame of a commercial hospital bed. The forward direction is shown by the arrow, and each motor is numbered according to the photo for the performance evaluation. Two microcontrollers were used, i.e., Arduino Mega and STM32F4 Discovery, and each of them served a different role. The former was used to interface the joystick and for the PID control of the four steering motors, and the latter was mainly used for the PID control of the propulsion motors. A motor driver (BTS 7960 42A) was used to drive the DC motor, and it was connected to an Arduino system that did the controlling using a trajectory planning mechanism.
Since a DC motor was utilized to steer the swerve drive module, the motor speed had to be smoothly controlled, not only to protect the gear from sudden load changes during operation but also for safety reasons. Additionally, being omnidirectional, the swerve drive mechanism sports a high degree of mobility. Therefore, it is imperative that a high-degree polynomial method is used for trajectory planning, such that the setpoints, i.e., position, angular velocity, and angular acceleration, can be set at all times for smooth control. However, in practice, a good balance must be established. On one hand, a higher polynomial would contribute to a smoother motion, but it may also reduce the motion efficiency by creating excessive phases between the setpoints. Therefore, in this study, trajectory planning based on a quintic polynomial was adopted. Developed by Yang et al. [16] for its mobile platform, the quintic polynomial has been proven to result in smooth motion due to its advantages, as its users can freely specify the boundary conditions, such as position, angular velocity, and angular acceleration. Moreover, there is only one deceleration phase between every two via points.
In this study, a joystick with a wireless connection was used for the controller that receives input from users. Besides being ubiquitous, the joystick is easily interfaced to an Arduino and has very sensitive and high-quality buttons. The adoption of this joystick was expected to give more functionalities to the initial prototype. However, in the long run, a wired, dedicated controller would be better for reliability and safety reasons.
To incorporate a safety aspect in the initial prototype, the failure sources were identified as follows: (1) joystick connection interruption, (2) out-of-control propulsion motor (possibly due to an error in the sensor), and (3) out-of-control steering motor (possibly due to an error in the sensor). If any of these failure cases are detected, the system is designed to accordingly control the propulsion motor. For example, if in motion, the velocity value of the propulsion motor would be set to zero, which would cause the prototype to enter the deceleration phase. If in resting phase, the propulsion motor would remain at rest. Alternatively, an emergency push button, which acts as a kill switch, was added. Since it was placed at the rear section of the bed's frame, the bed operator can resort to this button in case of emergencies.

Fabrication of the Prototype and PID Tuning of the Propulsion Motor
The results of the fabricated prototype of the swerve drive module are shown in Figure 3a. In addition, Figure 3b shows a photo of the whole system when four modules were installed on the frame of a commercial hospital bed. The forward direction is shown by the arrow, and each motor is numbered according to the photo for the performance evaluation.

Fabrication of the Prototype and PID Tuning of the Propulsion Motor
The results of the fabricated prototype of the swerve drive module are shown in Figure 3a. In addition, Figure 3b shows a photo of the whole system when four modules were installed on the frame of a commercial hospital bed. The forward direction is shown by the arrow, and each motor is numbered according to the photo for the performance evaluation.  The DC motor for propulsion has an encoder that generates seven pulses per revolution. The motor and encoder were connected via a gearbox with a gear ratio of 1 (motor):19.2 (encoder). To obtain the revolution of the motor, the quadrature encoder method was utilized. A single revolution corresponded to 537.6 pulses, and it was converted to 360 degrees/537.6 pulses. PID tuning was conducted on the trajectory outputs of the quintic polynomial. The sampling rate for trajectory planning and PID control was 5 ms. After a series of trials and errors, the coefficient values of K p = 0.95 and K i = 1.23 were set, which resulted in satisfactory results with a substantially small error (difference between θ input and θ actual ), as shown in Figure 4. The DC motor for propulsion has an encoder that generates seven pulses per revolution. The motor and encoder were connected via a gearbox with a gear ratio of 1 (motor):19.2 (encoder). To obtain the revolution of the motor, the quadrature encoder method was utilized. A single revolution corresponded to 537.6 pulses, and it was converted to 360 degrees/537.6 pulses. PID tuning was conducted on the trajectory outputs of the quintic polynomial. The sampling rate for trajectory planning and PID control was 5 ms. After a series of trials and errors, the coefficient values of Kp = 0.95 and Ki = 1.23 were set, which resulted in satisfactory results with a substantially small error (difference between θinput and θactual), as shown in Figure 4.

Velocity Response, Error Characterization, and Demonstration
To assess the performance of the system, the velocity responses of the propulsion motor were measured and then compared with the values generated by the quintic trajectory generator. Two different conditions were considered: no load, as shown in Figure 5a, and with load, as shown in Figure 5b. The former was achieved by turning the prototype upside down such that the wheels rotated without friction to the surfaces. However, the latter refers to the condition of the prototype receiving load from its own weight while making a forward motion at a constant velocity. For this particular performance evaluation, only data from motor no. 1 (refer to Figure 3b) were shown. During the data collection for both conditions, the swerve drive module was subjected to three different motion phases, as depicted by the shapes of the graphs (also indicated in Figure 5b), i.e., accelerating, constant velocity, and decelerating.

Velocity Response, Error Characterization, and Demonstration
To assess the performance of the system, the velocity responses of the propulsion motor were measured and then compared with the values generated by the quintic trajectory generator. Two different conditions were considered: no load, as shown in Figure 5a, and with load, as shown in Figure 5b. The former was achieved by turning the prototype upside down such that the wheels rotated without friction to the surfaces. However, the latter refers to the condition of the prototype receiving load from its own weight while making a forward motion at a constant velocity. For this particular performance evaluation, only data from motor no. 1 (refer to Figure 3b) were shown. During the data collection for both conditions, the swerve drive module was subjected to three different motion phases, as depicted by the shapes of the graphs (also indicated in Figure 5b), i.e., accelerating, constant velocity, and decelerating.
From Figure 5, it can be inferred that the developed control system performed well. However, further assessment is necessary, especially to quantify the errors and evaluate them for each motor under different motion types. Therefore, the same experiments were conducted again, and data were rearranged to show the error values, defined as the summation of the differences between the angular velocities obtained from the quintic trajectory generator and the actual values for each sampling time during a single experimental run. Figure 6a depicts a comparison of the average errors for the conditions of no load and with load for motors 1-4. In this graph, the values include all the motion phases of accelerating, decelerating, and constant velocity. Therefore, in Figure 6b, a breakdown of the errors based on the motion type is shown. From Figure 5, it can be inferred that the developed control system performed well. However, further assessment is necessary, especially to quantify the errors and evaluate them for each motor under different motion types. Therefore, the same experiments were conducted again, and data were rearranged to show the error values, defined as the summation of the differences between the angular velocities obtained from the quintic trajectory generator and the actual values for each sampling time during a single experimental run. Figure 6a depicts a comparison of the average errors for the conditions of no load and with load for motors 1-4. In this graph, the values include all the motion phases of accelerating, decelerating, and constant velocity. Therefore, in Figure 6b, a breakdown of the errors based on the motion type is shown.   From Figure 5, it can be inferred that the developed control system performed well. However, further assessment is necessary, especially to quantify the errors and evaluate them for each motor under different motion types. Therefore, the same experiments were conducted again, and data were rearranged to show the error values, defined as the summation of the differences between the angular velocities obtained from the quintic trajectory generator and the actual values for each sampling time during a single experimental run. Figure 6a depicts a comparison of the average errors for the conditions of no load and with load for motors 1-4. In this graph, the values include all the motion phases of accelerating, decelerating, and constant velocity. Therefore, in Figure 6b, a breakdown of the errors based on the motion type is shown.  From Figure 6a,b, several observations that provide further insight into the performance of the developed prototype can be made.
First, from Figure 6b, it can be inferred that the error can be considered small for the condition of constant velocity; the values for all motors are below 3%. However, the error for the condition with load for each motor shows a huge difference, as depicted in both Figure 6a,b. The error values for some motors can reach double the values of others, e.g., motor 4 in comparison with motor 1 in Figure 6a. Furthermore, when the error is broken down into the motion types, the difference between each motor is still evident with a trend that seemingly shows that motors 3 and 4 (rear side) generally have larger error values than motors 1 and 2 (front side). As an initial hypothesis, several factors can pose as the possible root causes, such as unequal load distribution; different torque requirements between the front and rear sides and between the right and left sides; and the steering angle effect, which is not completely straight. Especially on the torque requirements, this factor is significantly affected by the choice of material for the traction surface area. Its contact with the floor surfaces would affect the traction characteristics which eventually influence the errors. In the future works, this aspect shall be studied thoroughly to offer more insight to the evaluation of performance.
Additionally, another finding from Figure 6b is worth mentioning: the error tends to be larger for the condition of accelerating than for the condition of decelerating, which is true for all motors. This can be caused by the gap settling time, which is present in any system with PID control. In addition, for all the motor cases, the error for accelerating and decelerating was generally larger than that of constant velocity. This can be because the torque needed from zero to a certain angular velocity is large enough, such that a large amount of current needs to be drawn for a small RPM value. From the test report of the DC motor from the vendor, it can be inferred that under the condition of small RPM, a large voltage is needed to generate a large current. Consequently, a high percentage of PWM signal is required. However, the developed system now produces PWM values based on the mechanism of the quintic trajectory generator, which is regulated by PID control, without taking into account any required torque calculations. Similarly, this explanation is held for the decelerating condition to stop the rotational motion from a certain angular velocity value to zero. As an additional note, the choice of the sensor might also play a role in the errors in measurement. Currently an encoder is used; however, several other options can be considered as well, including an IMU (Inertial Measurement Unit) sensors which are commonly used in many robotic applications (see [17] for example) and offer good performance.
Finally, a demonstration was conducted to qualitatively assess the performance of the prototype. Besides performing a straight-path motion test, whose video snapshots are shown in Figure 7a, the prototype was tested for its holonomic motion by demonstrating a right-angle turn ( Figure 7b) and a circular motion (Figure 7c). The complete video can be accessed as a Supplementary Materials on the publisher's site. Based on the performed tests, as shown in Figure 7b,c, the holonomic mobility of the prototype was qualitatively justified, though further evaluation is necessary, especially in quantitative terms.

Conclusions
In this study, a prototype of a motorized hospital bed with holonomic mobility was designed and developed. A swerve drive module was designed and manufactured. Subsequently, the modules were affixed to a commercially available hospital bed to realize a motorized version with a targeted load capacity of 100 kg. The control of the propulsion motor was achieved by a combination of the quintic trajectory mechanism and PID control. The control performance was then evaluated, and it was shown to sport an average error of less than 3% for the motion type of constant velocity. However, it was also observed that the errors of the other motion types, i.e., accelerating and decelerating, were still high, in the range of 15%. In addition, the holonomic mobility of the prototype was shown to qualitatively justify the viability of the design. In the future, further developments are needed, especially to evaluate the steering motor's performance, quantitative holonomic mobility mechanism, and consider other manufacturing aspects for achieving more reliable products.

Conclusions
In this study, a prototype of a motorized hospital bed with holonomic mobility was designed and developed. A swerve drive module was designed and manufactured. Subsequently, the modules were affixed to a commercially available hospital bed to realize a motorized version with a targeted load capacity of 100 kg. The control of the propulsion motor was achieved by a combination of the quintic trajectory mechanism and PID control. The control performance was then evaluated, and it was shown to sport an average error of less than 3% for the motion type of constant velocity. However, it was also observed that the errors of the other motion types, i.e., accelerating and decelerating, were still high, in the range of 15%. In addition, the holonomic mobility of the prototype was shown to qualitatively justify the viability of the design. In the future, further developments are needed, especially to evaluate the steering motor's performance, quantitative holonomic mobility mechanism, and consider other manufacturing aspects for achieving more reliable products.