Modeling and Control of a Hybrid Wheeled Legged Robot: Disturbance Analysis

The most common cause of injuries among older adults is falling. Recently, there have been numerous developments in assistive and exoskeleton systems. However, comparatively little work is being done on systems that may help people to keep an upright position and avoid falling over. In this preliminary work, we investigate the feasibility of the wheel-legged robot as a balance-assist system for the people who cannot maintain balance and walk because of an injury, old age, or neurological or physical disorder. We perform motion stability analyses of the wheel-legged robot under different conditions such as system modeling errors, sensor noise, and external disturbances. The linear quadratic regulator (LQR) control approach is adopted for balancing, steering, and translational position control of the robot. To validate our control framework and visualize results, the robot is modeled and tested in the Gazebo simulator using ROS (Robot Operating System). Subsequently, the simulation results demonstrate the effectiveness of the LQR control method under the translational and rotational pushes of the wheel-legged system for human-robot interaction.


I. INTRODUCTION
The most common cause of injuries among older adults is falling [1]. These injuries not only affect the physical health of patients but also place an appreciable financial burden on governmental healthcare budgets. Fall-induced injuries are a major source of longstanding pain, physical disability, and death among older adults [2].
In recent years, numerous performance-augmenting and rehabilitation exoskeleton systems have been developed by robotics companies and researchers for able-bodied people and physically disabled patients, respectively [3]. As an example, a leg exoskeleton developed for able-bodied people provides positive mechanical power to the ankle during push-off [4]. Ma et. al. designed a wheeled-foot exoskeleton for paraplegic patients, allowing users to walk with a standing posture [5]. An assistive intelligent walker is developed to help the elderly, handicapped, or blind people by employing servo brakes [6]. A team from UC Berkeley developed a lower-extremity exoskeleton called BLEEX (Berkeley Lower Extremity Exoskeleton) [7]. It is the first field-operational exoskeleton that helps users carry an appreciable load with minimal effort.
As illustrated by the above mentioned works, there has been vast interest in developing robotic systems for performance augmentation, and the rehabilitation of people. However to the best of the authors' knowledge, there has been comparatively  little work on developing systems that may help people to keep an upright position and avoid falling over. A rather rare example of the balance-assist systems is a lower body exoskeleton that consists of powered hip flexion/extension (HFE) and hip abduction/adduction (HAA) joints to support walking and balancing [8]. We therefore investigate the feasibility of a wheel-legged biped robot that helps prevent older adults and paraplegic patients from falling. Adaptability to various terrain is of critical importance to human-assistance robotic systems, as users live in different environments. We know that legged locomotion is robust in terms of climbing stairs and traversing rough terrain, whereas wheel mechanisms are energy efficient for traversing flat terrain. A hybrid wheellegged robotic system has the advantages of both leg and wheel mechanisms, and it adapts its locomotion to the requirements of given terrain. Moreover, a biped wheel-legged system provides the complex balancing reactions needed to keep the center of mass (CoM) within the base of support of a human body. Wheel-legged systems have recently caught the attraction of the search and rescue, rapid exploration, and logistics robotics community; a fascinating example of such systems is a wheeled biped robot called Handle manufactured by the Boston Dynamics [9]. While Handle has shown remarkable balancing and manipulation feats, yet its locomotion and control frameworks have not been shared with the open research community. Another two-wheeled human assistant robot with sitting and running capabilities was proposed by [10]. To take the advantage of both wheeled and legged locomotion, a small wheel-legged robot PAW is presented by [11]. They designed the robot in such a way that its legs are capable of limited recirculation helping it to gain a cruise speed of up to 2 m/s. Suzumura  Distance between the origin of Σ R and the center of the wheel α Steering (yaw: angle between X I and X R ) angle of the robot β Inclination (pitch: angle between Z R and Z C ) angle of the CoM γ Gear reduction ratio θ r , θ l Angular displacements of left and right wheels τ r , τ l Motor torques of left and right wheels c r , c l Viscosity coefficients of left and right wheels I x r , I y r X and Y positions of the origin of Σ R in the inertial frame p Linear position of the robot frame Σ R from O I v Forward velocity of the robot in the X R direction achieved high mobility control [12]. They showed that a zerophase low-pass filter method generates a CoM pattern faster than the preview control approach. In addition, a research team from IIT Italy derived first order inverse kinematics and motion control scheme for a quadruped wheel-legged system without making any assumption on wheel camber angle [13]. More recently, Viragh et. al. developed trajectory optimization algorithm enabling the ANYmal robot fitted with wheels to walk and drive simultaneously [14].
It is clear that all the above mentioned researches focused on the design and control of wheel-legged systems. On the other hand, the main objective of this study is to evaluate the feasibility of the wheel-legged robot under different disturbances potentially occur during the use of the robot with humans. For this purpose, we start with studying the implications of the system modeling errors, external disturbances, and sensor noise on the motion stability of an off-the-shelf wheel-legged robot called Igor from Hebi Robotics [15]. We model the robot in the ROS-Gazebo environment and examine the effects of not only translational push disturbances but also rotational push disturbances on the robot, which are not well reported in the previous works.

II. DYNAMIC MODELING
Before designing the controller, we present the system dynamic model of the wheel-legged robot (Fig. 1). In our dynamic modeling of the robot, we assume a simplified inverted pendulum, where the body of the robot acts as a point mass. The origins of the robot-fixed frame Σ R and body-fixed frame Σ C are coincident and placed at the midpoint of the wheel axle. For all rotations, the counterclockwise direction is considered positive. The three-dimensional model of the robot is represented in Fig.2.

A. Equations of Motion
We use the Euler-Lagrange formulation to derive the equations of motion for the wheeled biped robot under the following important assumptions.
• There is no slip between the wheels of the robot and ground. • The wheels are rigid nondeformable disks. • The structure of the robot is symmetrical. • The legs of the robot are massless. The first two assumptions provide the necessary conditions for the kinematic modeling of the differential drive base of the robot. We now begin by writing equations for the position of the center of mass (CoM) in inertial frame Σ I . A left subscript is used from here onwards to clearly specify the coordinate frame of the vector quantities. The equations are I x c = I x r + l cos(α) sin(β), I y c = I y r + l sin(α) sin(β), We obtain the translational velocity vector of the CoM of the robot simply by taking the time derivative of the above equations: The rotational velocity of the robot frame Σ R with respect to inertial frame Σ I is given as We take the rotational velocity of the CoM in the body-fixed Σ C frame to get a diagonal inertia matrix and simplify our kinetic energy equation: The translational and rotational kinetic energy of the CoM is calculated as r + 2 Iẏr l β sin(α) cos(β) +α cos(α) sin(β) + (lβ) 2 + l 2α2 sin 2 (β) The translational and rotational kinetic energy of the two wheels is given by The potential energy of the wheel is considered zero, as we assume the wheel remains in contact with the ground everywhere. Consequently, The potential energy of the CoM is where g is the gravitational acceleration constant. Rayleigh's dissipation function relating to viscous forces is given by The Lagrangian of a mechanical system is described by taking the difference between kinetic and potential energies of the system: The equations of motion are then calculated by solving where q i represents generalized coordinates and Q i generalized forces.
For the wheel-legged robot, we choose the generalized coordinate vector q = [ I x r I y r α β θ r θ l ] T . After solving Eq. (10) by substituting for L and F , motion equations of the robot are expressed in familiar matrix form as where M (q) ∈ R 6×6 is the inertia matrix, V ∈ R 6×6 is a square matrix of viscous friction terms, H(q,q) ∈ R 6 is a vector of Coriolis and centrifugal terms, G ∈ R 6 is a vector of the gravitational force, E ∈ R 6×2 is the torque selection matrix, and τ ∈ R 2 is the vector of control torques. These are expressed as where c 1 , c 2 , . . . , c 7 are

B. Non-holonomic Constraints
It is well known that Eq. (11) is only valid for a system without non-holonomic constraints. Therefore, before any standard state-space based control design can be applied, an alternative approach is needed to represent the motion and constraints of the system [16]. Under rolling and no-slip conditions that engender nonholonomic constraints, the kinematic equations of the differential drive robot shown in Fig. 3 are [17] Iẋr sin(α) − Iẏr cos(α) = 0 (12) The above three equations can be written in matrix form as Once we have equations for the constraints of the system, Eq. (11) is modified to account for k kinematic constraints as where λ ∈ R k is a vector of Lagrange multipliers. The term A(q) T λ represents the vector of reaction forces at the generalized coordinate level. We now use the standard method to remove the Lagrange multipliers from Eq. (16) as elaborated in [18]. We first define a full-rank matrix S(q) ∈ R n×m that lies in the null-space of matrix A(q); here, m = n − k, and n is the number of generalized coordinates. It is noted that the choice of matrix S(q) is not unique.
A new vector u ∈ R m of pseudo-velocities is defined such thatq In the literature, Eq. (18) is mentioned as the kinematic model of the constrained mechanical system. In this study, we select u = [vαβ] T so that the controller design can be achieved rather simply. Differentiation of the above equation leads tö The substitution of Eqs. (18) and (19) into Eq. (16) yields Finally, the Lagrange multipliers can be eliminated by premultiplying both sides of Eq. (20) by S(q) T for the reason that S(q)A(q) = 0, and we get the reduced dynamic model of m differential equations: By virtue of the above conditions,Ĥ is eliminated from Eq. (21) and we finally get whereM (q) andĜ have linearized elements. Furthermore, the above equation implies thaṫ It is noted that θ r and θ l are completely decoupled from other state variables. Additionally we findθ r andθ l given the forward velocity v = r 2 (θ r +θ l ) and Eq. (14). We can therefore now reduce the order of the system and define a configuration vector q r = [p α β] T as an actual control variable, where p = I x r cos(α) + I y r sin(α).

C. State-space Modeling
State-space modeling is generally adopted to convert N thorder system dynamics to a system of N first-order differential equations. We can formulate the state-space model as we have already obtained linearized equations of motion for the wheellegged robot. A general linear-time-invariant state-space model is represented asẊ where X ∈ R n is called the state vector, Y ∈ R i is the output vector of the system, and U ∈ R p is the system input.
The constant matrices A, B, C, and D are respectively called dynamics, input, output, and feedforward matrices.
In this study, we define the state vector as X = q r u 6×1 and the control input as U = τ . The state-space model of the robot is therefore given bẏ where a 1 = I wa + I ra γ 2 + m w r 2 , a 2 = I rd + I wd + 0.5I zz + m w b 2 , a 3 = I wa + I ra γ 2 , a 4 = c r + c l , a 5 = c l − c r , a 6 = I yy + m c l 2 + m c lr,   For a full-state-feedback system, the matrix C is an identity matrix and D = 0 if the system has no feedforward.

III. OPTIMAL CONTROL
In a simple state-feedback controller, we choose the closedloop poles of a system by trial and error; however, these pole locations usually do not provide the optimal control performance. To overcome this problem, we design an LQR controller for our system, which allows us to find the optimal feedback gain vector K lqr . The LQR places the poles in such a way that the closed-loop system optimizes the cost function where X T QX is the state cost with weight Q, while U T RU is the control cost with weight R [19]. The optimal statefeedback law is then given as Here the necessary condition for optimality is where P is calculated by solving the algebraic Riccati equation It is also important to choose Q and R matrices carefully to get the best possible results. We use the well-known Bryson's method [20], which gives a simple and reasonable choice to determine Q and R as where (x ii ) max denotes the largest desired response for that component of the state vector. R is determined as Here, (u jj ) max is the maximum desired control input for the system and ρ is used as the last relative weighting between the control and state penalties. Furthermore, w i and b i are respectively the weights for each state and control input. We define w i and b i according to Even though Bryson's method usually yields satisfactory results, it is often just the beginning of a trial-and-error iterative  is acquired using lqr command in MATLAB (Mathworks Inc., Natick, MA, USA) with system parameters listed in Table  II. As the robot steers its heading using a differential drive mechanism, we note that the corresponding gain values for α andα states in K lqr have opposite signs.

A. ROS-Gazebo Simulation
With the purpose of simulating our wheeled biped robot in the Gazebo simulator [21], we modeled our robot in URDF (Universal Robotic Description Format) using the dimensions of the Igor robot as shown in Fig. 1. The URDF model includes all the physical constraints of the real robot, such as joint limits, static friction, and damping coefficients, and the actuator's torque-speed characteristics. Gazebo is an opensource simulator that uses ODE [22] as its physics engine. ROS (Robot Operating System) is used to implement the control algorithm in C++, thus controlling the robot in Gazebo. The ROS-Gazebo simulation runs at a frequency of 1 kHz with a motion controller steering the wheeled biped robot in the desired direction while keeping the robot in an upright position at the same time.

B. Results and Discussion
A series of tests are conducted to validate the effectiveness of the designed controller. Simple reference trajectories comprising step and sinusoidal signals are chosen for the robot. Given that an off-the-shelf robot employs a simple proportional-integral-derivative controller for balancing, we considered it necessary to compare the designed LQR with a manually tuned state-feedback controller of gain This is an important point of the study since the off-the-shelf robot is not using the LQR controller, thus by this comparison, we can check how much the disturbance rejection capability of the current robot can be potentially improved for the future   Figure 5a shows the translational reference position, step response of the LQR, pitch angle, and system's recovery from a force of 12 N applied in the frontal plane at the CoM of the robot body. One can see that the robot leaned backwards because of the strong push but the controller brought the robot back to the reference point smoothly while keeping the pitch angle below 0.25 rad.
In another test, the results of which are shown in Fig. 5b, we compare the translational position step response of the optimal controller with the manually tuned state-feedback control method. It is clear from the simulation results that the LQR controller has a shorter settling time than the state-feedback controller. Most importantly, the LQR has no overshoot or oscillations, which is essential for human-robot interaction. Although state-feedback and LQR control laws have the same theoretical basis and one can argue that the state-feedback controller would perform better with some further fine tuning, the sole purpose of the comparison here is to determine how well our designed LQR performs against non-optimal off-theshelf robot controllers.
To ensure the robustness of the LQR controller against the model uncertainties and sensor noise, various tests are performed and the results are summarized in Table III. To account for model uncertainties, we change the masses of the body m c and wheel m w along with the corresponding moment of inertia by ±10% and ±20%. Two series of tests are conducted, namely tests without sensor noise and tests including Gaussian white noise with standard deviation σ = 0.02. Finally, steadystate errors for reference positions p r = 2 meters, α r = 0.78 rad, and β r = 0 rad are determined. The results clearly show that regardless of sensor noise, the steady-state error for the  translational position tracking decreases as the mass of the system is reduced. This should not come as surprise because it is conventional behavior of a proportional feedback control method. We also find that the pitch angle (β) tracking is sensitive to the model irregularities and the steady-state error can increase by a factor of 4 with a mere change of ±20% in the system mass. Meanwhile, we observe that yaw tracking of the robot improves as we reduce the mass and inertia of the system; however, this difference is not large. Figure 6 depicts the robot's recovery from rather strong external disturbances during translational and rotational movements. Figure 6a shows the application of two external forces on the body while the robot is moving at constant linear velocity v = −0.5 m/s. The first force is applied in the robot's direction of motion while the second force is applied in the direction opposing the robot's direction of motion. Similarly, Fig. 6b shows the application of external torques about the z-axis of the robot body as rotational disturbance. Different disturbances are applied on the system and we find that the peak translational and rotational push that the robot can sustain with the current LQR is 12 N and 23 N.m, respectively.
The values in Table IV are used to quantitatively demonstrate the disturbance rejection of the LQR and compare it with the disturbance rejection of the manually tuned statefeedback controller. All errors are taken as the area under the curve from the time a disturbance is applied till the moment the robot recovers to its steady state. The table shows that the LQR has smaller errors and a shorter recovery time than the state-feedback controller. Additionally, the LQR endures much higher external torques as compared with the manually tuned controller. Furthermore, we have also tested the system's disturbance rejection capability in case of overestimation of the mass and inertia values during controller design process. As system becomes lighter, it gets more prone to external disturbances. Simulation results point out that the error, and recovery time increase slightly in case of translational disturbances for the LQR as compared to the manually tuned controller, where the change is more significant. On the other hand, alterations in the mass and moment of inertia did not effect the performance of the controllers during rotational disturbances.
Finally, to check whether the LQR controller can handle the translational and rotational accelerations simultaneously, we perform a slalom maneuver as shown in Fig. 7. We observe that the robot can carry out the slalom easily at peak forward velocity of 1 m/s.

V. CONCLUSION
We performed dynamic modeling of a self-balancing robot using the Euler-Lagrange method to control the translation, rotation, and pitch of the robot. Furthermore, non-holonomic constraints due to the differential-drive wheel system were integrated into the mathematical model of the robot. A linear quadratic regulator based on the mathematical model was then designed for the motion control of the robot. The objective of this study is to simulate and devise the control law for the wheel-legged robot ahead of implementing the aforementioned control strategy on the actual system. Instead of relying on differential-equation based MATLAB simulations to verify our controller of choice, we used the physics-engine based Gazebo simulator because it includes rigid-body dynamics, collision detection, and friction and thus provides a better approximation of the real physical system. One advantage of our approach is the immediate application of it on the off-theshelf Igor robot. Several simulation test runs were carried out in the presence of model uncertainties, external disturbances, and sensor noise to quantitatively investigate the robustness of the motion controller in detail. Later, a manually tuned state-feedback controller was designed and compared with the LQR. As a result, it became clear that the robot with the LQR endures almost twofold stronger external torques than with the simpler manually tuned controller. Thanks to the LQR controller, the robot can track reference trajectories within a short time period. Also, the robot performs extremely well under the sensor noise, and external translational and rotational perturbations of up to 12 N and 21 N.m, respectively.
As future work, we plan to conduct a series of experiments on a real robot. We will also combine our controller with a fullmotion planning algorithm and measure the performance of the controller for complex maneuvers. Additionally, it would be interesting to evaluate the extent to which acceleration of the knee joints mitigates external disturbances.

VI. AVAILABILITY OF DATA AND MATERIAL
All relevant data are within the paper VII. COMPETING INTERESTS