Gyroscopic precession control for maneuvering two‐wheeled robot recoil stabilization

A two‐wheeled robot has high maneuverability and can spin around with a high velocity but is prone to roll over under a recoil force. Because the wheels are only used to control the maneuver speed of the robot. However, a two‐wheeled robot using a gyroscope does not need the control of the wheels and can maintain the stability of the robot under a recoil force during maneuvers even if the gimbal of the gyroscope is not controlled by a torque. In this study, the equations of motion of the gyroscopic robot are derived via Lagrangian equations, and the balancing performance of the uncontrolled gyroscope is simulated via Matlab to determine a desired configuration for mechatronics system design. Then, a linear‐quadratic regulator (LQR) is implemented to the chosen control moment gyroscope (CMG) configuration and compared in simulations of RecurDyn. LQR controller was used to prevent oscillating motions of double CMGs under the recoil force of a weapon. The simulation results showed that the gyroscopic two‐wheeled robot is improved using an LQR controller and powerfully balanced in static with excellent performance.


| INTRODUCTION
A powerful technique for stabilizing vehicles is the use of angular momentum (Reza Larimi et al., 2015).The stability is enhanced significantly through a spinning flywheel accelerating or decelerating.
However, this approach also has disadvantages, including a limit on the maximum speed capacity of a rotor.This is because when the flywheel's speed is not changing, there is no angular momentum in the roll angle of the vehicle to generate the balancing torque.
Compared with a reaction wheel, a similar flywheel of the control moment gyroscope (CMG) can maintain a high rate of angular momentum and relatively low power consumption by rotating the gimbal axis of a fast-spinning flywheel although flywheel spin velocity is constant (Amin et al., 2023;Çetin & Ünker, 2023;Ünker, 2022a, 2022b, 2022c, 2023a, 2023b).Due to generating much higher torque than reaction wheels, CMGs have a wide range of applications for vehicles, including balancing aids for robots (Amin et al., 2023;Çetin & Ünker, 2023;Ünker, 2022a, 2022b, 2023a), trucks (Ünker, 2022c, 2023b), and ships (Song et al., 2023).On the other hand, a well-known disadvantage of using CMGs for stabilizing is the existence of a controller requirement, in which the flywheel placed inside a gimbal may not stand stably without a closed-loop controller under a constant load although it generates an angular momentum (Amin et al., 2023;Çetin & Ünker, 2023;Ünker, 2022a, 2022c, 2023a).When a gimbal is not controlled by a tilt torque for the vehicle to remain balanced, CMG cannot meet the disturbance torque in the direction of the vehicle roll.Also, researches on useful mobile robots are developing deliberately at high speeds even on rough terrain (Chan et al., 2013).As a kind of mobile robot, a two-wheeled robot is a very powerful in stability control compared to humanoid robots due to its high maneuverability and the characteristics of a small ground contact (Chan et al., 2013).
The two-wheeled robot can move in very limited or narrow places, stand and turn stably at low speed.As a rolling motion control method, the approach based on changing the center of mass can also be used to balance the two-wheeled robot (Chan et al., 2013).However, as an unstable and highly nonlinear system, the torque output for shifting the center of gravity cannot be very high in mass balancing.So, CMG can be used as an indirect robot actuator for balancing two-wheel mobile robots (Amin et al., 2023;Çetin & Ünker, 2023;Ünker, 2022a, 2022b, 2023a).Moreover, CMG gives this two-wheeled robot advantage over conventional robots due to the effect of gyroscopic precession (Amin et al., 2023;Çetin & Ünker, 2023;Song et al., 2023;Ünker, 2020, 2022a, 2022b, 2022c, 2023a, 2023b;Ünker & Çuvalcı, 2016a, 2016b, 2019, 2015a, 2015b, 2021).Ünker (2022a, 2023a) proposed this technique for the roll-angle balancing of a two-wheeled robot.The gimbal is steered with torque generated via a controller signal.Because the CMG requires less angular momentum for stability with a control torque applied to the gimbal.
At the same time, as a highly nonlinear system, the relation between gyroscopic precession and the conservation of angular momentum controls the balance.Therefore, the gyroscopic control technique for balancing two-wheeled robots is an excellent alternative for researchers.
CMG importantly requires a closed-loop controller to robustly stabilize the gyro, which simultaneously keeps the robot in the upright position.As a linear controller, linear-quadratic regulator (LQR) can be implemented in the CMG to control the robot balance and to track the referenced command (Amin et al., 2023;Çetin & Ünker, 2023).Torque through the LQR controller is utilized to twist the gimbal that stabilizes the head (roll) angle of the two-wheeled robot.The tilt torque, subjected to the gimbal, can steer the angular momentum of a fast-spinning flywheel of a gyro to either side.LQR control of the large angular momentum of the CMG provides a twowheeled robot with good dynamic static and dynamic stability.
Hence, the problem of posture stabilization of the two-wheeled robot is solved using LQR-controlled CMG.Amin et al. (2023) proposed an LQR controller as an active rollover control system using equations of motion, providing twowheeled robots with better predictability for model-based roll detections.A CMG using an LQR controller eliminates sinusoidal motions (Amin et al., 2023) which can help the two-wheeled robot achieve stable balance under a recoil force.The control method chosen to provide the vertical stability of a two-wheeled robot is highly dependent on the gimbal's control parameters.The gyro dynamics of the two-wheeled robot under a recoil force have been developed in the previous work (Ünker, 2023a).
In this study, a two-wheeled robot using an LQR-based CMG has been investigated under weapon firing while spinning around to acquire and track a high-speed target.However, it is much more challenging to track a desired trajectory when a two-wheeled robot is spinning around at a constant speed under a recoil force.The robustness and antiinterference ability of the LQR controller can reduce the influence of the recoil impulses.There is obvious equalizing between recoil force and angular momentum in both directions when the CMG is steered by an LQR controller.In this paper, we focus on defining the system energies, deriving the nonlinear equations of motion, and simulation of the twowheeled robot via RecurDyn software.The advantages of simulating such tedious tests with software are avoiding the high risks and costs of rollover data recordings of real vehicles.By implementing parameters of the appropriate K-matrix for the closed-loop control, we can observe the excellent performance of the two-wheeled robot with the approach of the LQR control system, which is employed in maintaining stability.
The motivation behind this research is to improve the stability and agility of a two-wheeled robot when facing external forces.
While acknowledging the impact of recoil force from a weapon in this study, it is crucial to note that the scope of this research extends far beyond its applications in weaponry.Up until now, by applying control torque (τ wheel ), the wheels change the center of mass to control the orientation and stability of the two-wheeled (Chan et al., 2013).However, using only the wheels cannot counteract the recoil force during maneuvers.Since CMGs can provide much larger angular momentum than reaction wheels even at a smaller size, tilting the gimbal of a spinning flywheel via the use of an LQR controller can maintain the stability of a two-wheeled robot spinning around even under a recoil force.In this study, gyroscopic precession control via an LQR is utilized for a two-wheeled robot while spinning around with a high velocity under the recoil force of a weapon.

| SYSTEM IDENTIFICATION
As shown in Figures 1 and 2, the two-wheeled robot consists of the weapon, the wheels, the gimbals of the flywheels, and the body that integrates all.The CMGs are designed by double flywheels assembled through a gimbal that allows tilting of the spinning flywheel.Table 1 shows the key parameters of the two-wheeled robot that have been defined for the RecurDyn model.In the first step, uncontrolled CMGs have been investigated for the control performance of balancing the robot's posture (heading) angle and gyro's precession under the recoil force.

| Equations of motion for two-wheeled robot with the gyroscopes rotating in the same direction
The body and gimbals of the robot are connected through a twod.o.f.kinematic chain.The nonlinear equations of the mathematical model of the two-wheeled gyro robot can be derived by using the Lagrangian method in a generalized coordinate system.Before deriving the equations, the kinetic energies of each dynamic part of this robot are determined as (1) (2) (5) Thus, the sum of kinetic energies of the two-wheeled robot with the double gyroscopes rotating in the same direction can be calculated below equation as follows: To neglect the potential energies of the gimbals and flywheels, the center of mass of the gyroscopes is placed along the axis of rotation, which passes through the joint point of the sprung mass and the axle.Thus, the total potential energy can be reduced to the following equation: In this way, we can derive the equations of the mathematical model by substituting the above kinetic and potential energies into the Lagrange equations for two degrees of freedom below.
The gyroscopic two-wheeled robot including a weapon system.
The gyroscopic two-wheeled robot subjected to a control torque (τ gimbal ).
From the above nonlinear equations of Lagrange, two degrees of freedom equations can be derived as follows: In which In this study, software such as Matlab tool including the fourthorder Runge-Kutta method can be used to solve equations of motion with the help of the physical parameters given in Table 1.To identify the dynamic behavior of motion, each simulation of RecurDyn and Matlab was run for 60 s with zero initial conditions and a time step size of 0.001 s during each sweep.Due to the stable results of simulations, the time responses for the first 10 s were given in the figures.
In the following calculations, the simulations of the equations were compared with the model simulations of RecurDyn for different working conditions of the gyroscope.In the below comparisons, there is a small steady-state error between the simulations of the theoretical Lagrange model and the virtual robot in the RecurDyn although the stability performance and the tendencies of the results agree well.Because this error is due to the slip effect of the wheels.
An outer gimbal bearing to the ground can be used for the robot to spin freely around its geometric axis.Hence, the comparisons of the theoretical and RecurDyn results will be the same by ignoring the slip effect of the wheels.In the theoretical simulations from equations of motion, Figure 4 shows that the displacement amplitudes for Ω = 3000 rad/s considerably decrease compared to the displacement amplitudes for Ω = −3000 rad/s.Because the direction measurement of cornering is important to keep the vehicle in its upright position.For this reason, the flywheels are spinning in the same direction and angular speeds according to the cornering direction and speed of the robot cornering.Besides, zero velocity flywheels cannot maintain the stability of the robot under a recoil force during maneuvers as seen in Figure 4.

| Uncontrolled CMGs under a constant recoil force
In this paper, CMG consists of two flywheels being controlled for the direction of cornering speed.Hence, the gyroscope generates the counterbalance torque to the two-wheeled robot in the upright position.Besides, the CMG control algorithms can be proposed to stabilize the two-wheeled robot.So, in this study, double flywheels rotating in the same direction for the appropriate cornering direction of the robot were practically chosen to investigate the vibration attenuation performance of the gyroscope for LQR optimization.

| Controller design for two-wheeled robot with double gyroscopes
Equation ( 10) that is obtained from Equation ( 8) was originally a homogeneous differential equation, but the term τ gimbal was added in Equation ( 10) to design the controller.Subsequently, τ gimbal will act as the control signal governing gyroscopic precession, ensuring the stability of the two-wheeled robot during maneuvering.
Gyroscopic precession occurs when a gyroscope, which is a spinning wheel or disc, experiences a force in a direction that is not aligned with its axis of rotation.Instead of immediately reacting to the applied force, the gyroscope precesses or tilts in a manner that is perpendicular to the force being applied.This precession effect can be LQR finds widespread application in stabilizing two-wheeled robots and controlling vehicle suspensions (Amin et al., 2023;Çetin & Ünker, 2023;Chan et al., 2013;Gopala Rao & Narayanan, 2020;Nekoui & Hadavi, 2010;Yongjun et al., 2003).Despite the inherent nonlinearity in system dynamics, LQR proves effective by linearizing the system around an operating point, offering stable control within a specific operating range.The system's multi-input, multioutput nature, coupled with interconnected dynamics, aligns well with LQR's capabilities.This control approach excels in handling coupled dynamics, optimizing control efforts across all inputs, and considering their interdependencies.In the proposed system, as described by Equations ( 10) and ( 11), the gyro tilt angle (θ) and head angle (φ) mutually influence each other, exemplifying coupling.When designing a control system for such interconnected states, LQR stands out by allowing simultaneous consideration of both states and optimizing overall system performance.Particularly in cases of significant coupling, LQR proves more effective than proportional-integral-derivative controllers, which face challenges in managing state interactions.
F I G U R E 3 Comparisons of the time displacements for the double flywheels rotating in the same direction (Ω = 3000 rad/s) when subjected to the constant load of F = 120 N without a controller.
F I G U R E 4 Rotating direction effect of flywheels on the time displacements for the double flywheels rotating in the same direction when subjected to the constant load of F = 120 N without a controller.

ÇETIN and ÜNKER | 995
After obtaining differential equations of φ ¨and θ ¨by manipulating Equations ( 10) and ( 11), the nonlinear dynamics of the Maneuvering Two-Wheeled Robot in the presence of recoil effect is linearized around the operating points of the states.The Jacobian linearization method (Fadali & Visioli, 2012) is employed for this purpose.
Consequently, the system can be expressed as a linear state-space model, represented by Equations ( 12) and ( 13). where is the control input vector, and Equations ( 10) and ( 11) are transformed into first-order differential equations, as shown below, to establish the linearized state-space representation, depicted in Equations ( 12) and ( 13).
Matrices of the linearized state-space model presented in Equations ( 12) and ( 13) can be computed by utilizing Jacobians as follows: The operating points of the states, input, and disturbance are , respectively.Eventually, the linearized statespace model of the maneuvering two-wheeled robot in the presence of recoil effect is derived as where Given the proposed dynamic system, it is assumed that all states are measurable; thus, LQR is employed for the stability subsystem which is derived by excluding the disturbance term in Equations ( 14) and ( 15).Assuming we aim to create state feedback control, represented by K u x = − , for system stabilization, the design of K involves finding a balance between the transient response and the control effort.To address this design tradeoff optimally, we adopt an optimal control approach by defining a performance index, also known as a cost functional which can be expressed as (Lewis et al., 2012) Our goal is to find the control input u Kx = − that minimizes this index.In this context, Q represents a 4 × 4 symmetric positive semidefinite matrix, while R is a 1 × 1 symmetric positive definite matrix.
Theorem 1.If we have a system represented by matrices A B ( , ) that is stabilizable, and we choose a positive definite matrix R and a positive semidefinite matrix Q, along with the observability of the pair A Q ( , ), then the closed-loop system A BK ( − ) will be asymptotically stable (Lewis et al., 2012).
When the system satisfies the conditions described in Theorem 1, the optimal feedback controller gain K , can be designed by minimizing the cost function described in Equation ( 17).As a result, K can be calculated using Equation ( 18): where P is calculated by solving Algebraic Ricatti Equation ( 19), Consequently, after achieving optimal feedback gain K , the optimal feedback control law becomes (20)

| Numerical values for controlled CMG
After substituting the system parameters of Table 1 into Equation ( 16), the state-space matrices of the linear system, as presented in Equations ( 12) and ( 13), are calculated as follows: LQR controller is designed for the stability subsystem below, To achieve the desired response, the LQR controller is designed using specific Q and R matrices.The controller's objective is to stabilize the system states of a two-wheeled maneuvering armored robot, which is exposed to weapon firing loads, and maintain a constant α angle at a predefined position.Note that, in this scenario, the recoil impulsive loads are considered external disturbances to the system.
The proposed system satisfies the conditions of Theorem 1. State matrices have a stabilizable pair of A B ( , ) and observable pair of A Q ( , ), so the LQR controller can be designed for the stability subsystem and the closed-loop system A BK ( − ) will be asymptotically stable.
The computation of the optimal feedback control gain K , is obtained by employing the LQR controller design procedure outlined in Section 3. Consequently, K is calculated as    From the below comparisons, it can be concluded that the responses of RecurDyn and state-space are stable and the tendencies of the results agreed well.However, there is a very small steady-state error between the simulations of the theoretical state-space model and the virtual robot in the RecurDyn due to the slip effect of the wheels.The simulation results of Figure 12 showed that the control torque using the LQR controller powerfully responded in steady-state under the random recoil force.

| Controlled CMGs under a constant recoil force
Recoil load (impulsive force) exerted on the weapon turret

Figure 3
Figure 3 illustrates the comparisons of the time displacements of RecurDyn and theoretical Matlab simulations when subjected to the constant load of F = 120 N without a controller.It is concluded from used in control systems to counteract external forces and maintain stability.The dynamic model of the two-wheeled robot is formulated based on the robot's capability to perform rotational movements solely on a flat surface.Therefore, gyroscopic precession control via an LQR is used to control the orientation and stability of the robot by tilting the gimbal of a spinning flywheel by applying gimbal torque (τ gimbal ) to counteract the recoil force and keep the robot stable during high-speed maneuvers.

Figure 5
Figure 5 illustrates the proposed controller for both RecurDyn and the State-Space (theoretical) schematic diagrams.The designed feedback controller shown in Figure 5 is mainly responsible for

Figures 6 -
Figures 6-10 illustrate the comparisons of the control torque signals and the time displacements of RecurDyn and state-space (theoretical) simulations for the double flywheels rotating in the same direction (Ω = 3000 rad/s).In the below comparisons, it can be observed that the responses of RecurDyn and theoretical are stable and the tendencies of the results match well despite the slip effect of the wheels when subjected to the constant load of F = 120 N with the LQR controller.Due to the slip effect of the wheels, there is a steady-state error between the simulations of the theoretical statespace model and the virtual robot in the RecurDyn.The simulation results of Figure 6 demonstrate that the LQR generates reversibly controlled torque in balance, giving the CMG rapid settle within 1 s when exposed to a recoil force.Figures 7 and 8 indicate the time displacements of both the state-space and RecurDyn simulations for the head angle (φ) and θ under recoil force.It is clear from the figures that both simulations demonstrate stable φ and θ displacement behavior under a constant recoil force (F = 120 N).In the state-space model simulation, the φ displacement reaches a steady-state value of 0.106 rad within 1.4 s and the θ displacement reaches a steadystate value of −0.146 rad within 1.4 s.As a result, LQR-controlled CMG including double flywheels demonstrated the desired stability with a small steady-state error between the virtual robot balancing simulation in the RecurDyn plant and the theoretical closed-loop state-space model.Figures 9 and 10 illustrate the time displacement comparisons between the LQR-controlled and uncontrolled CMGs obtained from RecurDyn simulations when subjected to the constant load of F = 120 N. It is concluded from the figures that the uncontrolled behavior demonstrates a stable state of an oscillating motion.In the LQR-controlled simulation from Figure 9, the φ-displacement reaches a settled state of 0.13 rad which is midpoint of the amplitude of the stable state of the oscillating motion of uncontrolled behavior.Whereas the θ-displacement of the LQRcontrolled simulation in Figure 10 settles at −0.18 rad which is the maximum amplitude of the stable state of the oscillating motion of uncontrolled behavior.It is concluded from the figures that the flywheels' spinning direction according to the cornering is important to decrease the settling time and peak overshoot.Because, the displacement amplitude and settling time for Ω = 3000 rad/s considerably decrease compared to the displacement amplitudes for Ω = −3000 rad/s under a recoil force during maneuvers.Besides, the LQR-controlled CMG have greater robustness than the uncontrolled one as seen in Figures 9 and 10, in which the oscillating motions have been prevented.

|
Figure11illustrates the random and continuous firing load pulses within 2 s and one peak of waveform shot of the recoil impulsive force caused by a weapon firing load for 600 rounds/min(Figurski & Rybak, 2007).The impulsive force from random recoil is created by generating random numbers between 0.85 and 1.15 with seed 42, and then multiplying them by the signal as seen in Figure 11.Figures 12-14 give the comparisons of the control torque signals and the time displacements of RecurDyn and state-space simulations of the robot with the LQR controller for the double flywheels rotating in the same direction (Ω = 3000 rad/s) when subjected to the recoil force of the signal as seen in Figure 11.

Figures
Figures 13 and 14 indicate the time displacements of both the theoretical and RecurDyn simulations for the head angle (φ) and θ under a random firing recoil force.It is clear from the figures that both simulations demonstrate stable φ and θ displacement behavior when subjected to recoil impulsive loads.Fluctuations in the responses are caused by a random firing recoil and it can be observed that the responses of RecurDyn and theoretical displacements match closely.Fluctuations in the control torque signals and the time displacements can be suppressed by using a damper between the cannon (weapon) and the robot's body.