Designing and controlling a self-balancing platform mechanism based on 3-RCC spherical parallel manipulator

R OBOTIC S YSTEMS AND A PPLICATIONS


Introduction
It is frequently challenging to calculate the kinematics of parallel systems with complete spatial mobility [1] in closed form. To reduce the complexity of the analytical problem while maintaining the benefits of closed-loop actuation, we have identified that researchers and industry are increasingly interested in small mobility mechanisms that can perform simple motions like pure rotations, pure translations, or planar displacements [2]. Parallel manipulators having three degrees of freedom can be classified into four groups. 3R (3-Rotation, also known as spherical parallel mechanism) [3], 3T (3-Translation) [4], 2R1T (2-Rotation and 1-Translation) [5] and 1R2T (1-Rotation and 2-Translation) [6]. Eventually, this will result in two similar tools mounted in series or working together in parallel to achieve a specific goal. Roll, pitch, and yaw are the three rotational degrees of freedom (DOF) [7] that can be handled by spherical parallel manipulators (SPM). As an alternative to current methods based on serial kinematic architecture [8], SPM can be considered when designing robotic wrists [9] due to their manipulator characteristics and high load-carrying capability. SPM provides different applications, which include medical tools [10,11], moving platforms [12], advanced robotic systems [13], Tactile devices [14], and rehabilitation [15]. SPM was classified into four major groups based on the Lie group of displacements using the synthesis approach [16]. SPM in cylindrical motion (3-RCC, 3-CRC, 3-CCR), spherical motion (3-RRS, 3-RSR, 3-SRR) [9], parallel wrists with idle pairs (3-RRRPP, 3-RPRPR), and planar motion (3-RRG, 3-RGR, 3-GRR).
When an external force or torque is applied to one of a device's RCC points, which are decoupled from the device's operational compliance matrix, deformation only happens in the direction of the applied force or torque [7]. A compliance device that resembles the Stewart platform mechanism, which has been utilized as a flight simulator or a manipulator, is proposed by McCallion et al. [17]. Six prismatic actuators are swapped out for an equal number of linear springs. However, this device's compliance matrix is not entirely diagonal (i.e., linked!), and an RCC point's position cannot be changed. A better RCC device, called a "passive compliance device," was also put out by him. It uses three rigid prismatic links and elastic membranes positioned between the links and platforms. Many translating similar machines [18] have been studied in past years, which show better performances, but they also have some demerits like a heavy moving platform, ineffective dynamic performances, etc. So, some new concepts have been developed for the whole family of machines with 3-RCC kinematics [19] to assess good performance and remove the demerits of previously identified mechanisms. The entire system's stability can be enhanced by altering the position of the self-balancing system, which functions independently of the track chassis [20]. In this paper, the development of a prototype of a selfbalancing platform is shown. This mechanism was originally designed to support a project consisting of an AGV. (Automated Guided Vehicle) that is a self-guided robot for transportation and lifting of heavy weights in warehouses and industries, with on top a robotic arm to accomplish such tasks. If the AGV faces a steep slope or a rough surface, the AGV will be tilted, and the performance of the robotic arm could get compromised. To avoid that, implementing a selfbalancing [21] platform between the AGV and the robotic arm is a solution. The project's goal is to demonstrate a platform that automatically maintains the horizontal position using balancing sensors [22] that control at all times. Different researchers use PID controller [23] and Arduino to develop the self-balancing controller, which helps the platform with several parameters along the vertical axis and provides the signals for controlling the values of the accelerometer and gyroscope sensors to determine the precise balance [24].
In this paper, a 3D-printed spherical mechanism [12] was used for testing and control. The mechanism is driven by the servos using a combination of three pinions and internal gears, each of them connected to one of the arms of the platform and capable of steering them in a constrained circular path; this also maintains the platform's center at the same location regardless of how it rotates or tilts. Unlike standard gimbals, which may be used to correct tilt in each of its three components by positioning the motors on the platform's axis, spherical parallel platforms do not follow conventional patterns. The movement of individual arms causes tilting of the platforms on different components at different rates and following specific paths.
The main contribution of this work is to design and control the self-balancing platform by using the 3-RCC spherical parallel manipulator, who always automatically stays horizontal all the time. The paper is organized in the following pattern. In part 2, a 3D design of the platform mechanism is developed using SolidWorks, and it is physically prepared using a 3D printer. In part 3, the self-balancing mechanism and control are explained. Finally, the control mechanism is calculated in section 4, and experimental results are shown. Then section 5 concludes the paper with a discussion and future aspects.

Mechanism designing
This section introduces two 3-RCC mechanisms mentioned in the study and new configurations created to meet the specifications. The novel configuration introduced three components: platform design, gearbox, and motor assembly.

Movements of platform
The 3-RCC structural is a parallel mechanism that connects an end effector to a fixed base via three structurally identical limbs. Each limb is a five-dimensional kinematic chain RCC, where R is a pair of revolute faces and C is a pair of cylinder faces. The three axes of the R and C pairings must converge at the fixed point O because they do not lie in a plane. The SPM center is a point that is invariant in a spherical motion. The commonly used 3-RCC spherical parallel mechanism is shown in Fig. 1, which satisfies most of the required tilting movements. However, manual control also plays a vital role besides the self-balancing mechanism. It was referenced as it could fulfill most tilting movements at first. It must also let the complete platform rotate along the z-axis while maintaining the same tilting angle. So, the primary 3-RCC spherical parallel mechanism doesn't fit the need, as interference would occur due to the continuous rotation of the three motors. So, different designs were reviewed to complete the table rotation while maintaining the same tilting angle. There was a design with three motors in parallel at the bottom, which controlled the three gears set in tandem at the center, providing the complete rotation of the table. The proposed design shown in Fig. 2 provides a solution to the above issues and complies with our needs. a) 3D software model design b) 3D printed spherical platform mechanism [12] Fig. 2. Spherical platform mechanism with three parallel motors However, the system appears frail and unstable due to the design placing three isolated gears without further support. Then the modification in design was done by implementing three internal gears with the exchange of three gears in the middle as they rotate along the same axis. With these structures and tracks holding on to each other in the gearing arrangement, the mechanism remains stable, as shown in Fig. 3.

Platform design
The platform design is shown in Fig. 4, which contains a platform with a diameter of 75 mm, three arms with a radius of 45mm attached in three directions, and bearings 685ZZ at both ends of the arms.

Gearbox design and assembly
The gearbox is a critical part of the assembly whose design is shown in Fig. 6, which contains three levels, each attached with a bearing 6814ZZ, a stabilizing factor to stabilize the rotating gear, a gear synchronizing with the corresponding motor, and an internal gear attaching to the arm above. An additional bearing arrangement is installed with 6814ZZ bearings to smoothen the rotation, as illustrated in Fig. 7. Internals gears and the gears synchronizing the motors have a gear ratio of 1:3, which revolves the three motors with defined angles as shown in Fig. 8. This section explained the designing of individual components, their mechanism, and their features. The complete design of the 3-RCC spherical parallel mechanism model was designed using CAD software (SolidWorks), as shown in Fig. 10(a). Then this design was fabricated using a 3D printer, as shown in Fig. 10(b). All experimental work, including model testing and control, was done using this 3D-printed spherical platform mechanism. The mechanism can be separated into three parts: platform, gearbox, and motor set. The different features and components of the 3-RCC spherical parallel mechanism model are explained below. a) 3D Software model design b) 3D Printed spherical platform mechanism Fig. 10. Complete spherical parallel mechanism design

Self-balancing system
This section introduces the sensor for motor control and how it features and functions in the mechanism of the proposed design.

Balancing sensor
A sensor is required to measure the platform's tilt or position in three dimensions concerning the ground necessary to maintain the platform's balance for balancing, implementing IMU (Inertia Measurement Unit) sensors that communicate with the Arduino using an I2C Bus Protocol. In this proposed design, the sensor MPU-650 is shown in Fig. 11(a), which was adopted due to its accuracy, reliability, and low pricing among all IMU Arduino sensors. It is a six-DOF (Degree of Freedom) sensor that combines a 3-axis gyroscope and a 3-axis accelerometer. The data collected from the sensor are the pitch, roll, and yaw, as shown in Fig. 11(b), which are the angles of motion in , , and coordinates and depend on the gravitational force. a) MPU-6050 b) The six degrees of freedom Fig. 11. a) MPU-6050, b) sensor's degree of freedom

Data collection
In the first trial, the raw data was collected by the Arduino processor and displayed on the serial monitor. It was noticed that the data became less accurate and very noisy after some time. Along with the effects of gravity on the accelerometer, external forces contributed to this, which affected the precision of orientation angles. Those external forces are caused by the manipulation and movement of the sensor and add noise to the output data. The accelerometer provided noise to the data in the short term but was very accurate in the long term. However, whereas the gyroscope provides accurate data on orientation changes in the short term, the combination of data causes a drift over longer time scales. It was found that the MPU-6050 sensor comes with a hardware buffer on the chip, and with a specific code, it performs data conversion. It also filters and combines a portion of the data collected from the gyroscope and another from the accelerometer to eliminate the noise and preserve precision along with the time in a process called the Digital Motion Processor (DMP). For this method, an extra wire connecting the int pin in the sensor to the pin 2 digital input/output in the Arduino is the main change in the circuit schematics, as shown in Fig. 12. Data gathered from a still gyroscope will not gradually rise or fall when DMP is present. Additionally, after 10 repetitions of circulation movement, accumulated errors were reduced to less than 0.05 degrees. However, in software, a code from an open-source library called I2Cdevlib to retrieve the data was applied and also available on the internet for downloading.

Motor control
To minimize the platform size and have accurate angle control for each arm, we set three MG996R servo motors at the bottom to control each gear inside. The angles and steps required to rotate can be done precisely, but because there is no linear control for the rotating speed, the control technique below couldn't make the three motors complete their tasks simultaneously.

Control methods for self-balancing mechanism
To achieve self-balancing, two essential methods were established: real-time stabilizing and kinematic analysis. For preprocessing calculation, the following data has to fetch from the sensor, which is done by placing MPU-6050 in the middle of the platform. So for measuring and calculating the tilting angles at each period in pitch, roll, and yaw, three directions showing , and each is displayed through a window screen as shown in Fig. 13.
The relationship between , , and is shown in Fig. 14. The value of and defining vectors is stated in the Eq. (1) and (2): We figured out the first method to control the balancing with the data above.

Real-time stabilizing
Initially, classify the tilting directions into 1°, -1°, 1° and -1°, in which all kinds of situations are combined by two of the above. A generalized connection for the direction of controlling two motors is described in the Table 1 based on direct observation of the motor motions and their effects. (Controlling three motors at once will result in a more complicated tilting scenario and will be ineffective for stabilizing). The relationship between motors rotating degree and the degree to which they differ for and is nonlinear. With this relationship, the adjustment of the platform can be made by moving the required motor movements at every cycle. The gyroscope will provide the current data while the motors keep pushing the platform toward horizontal balance until the defined balance conditions are satisfied, realizing the adjustment in real time.

Complete adjusting two axes in turns
In this method, a condition is determined where -1° 1° and -1° 1° met at the same time if it is balanced. If the data from the gyroscope shows that the platform is not balanced, then we check and adjust -axis till -1° 1° is satisfied, then the movement is adjusted on -axis till -1° 1° is satisfied, as illustrated in Fig. 15. However, it was found that the effects shown in Table 2 are easily observed effects, which may attach with random effects on the other two axes. Besides, the incidental effects can also be different in detail when the three arms are in different orders of position. Consequently, for instance, when the platform is only tilted in the positive -axis, we can not only control motor-2 in a forward direction and motor-3 in a reverse direction. In order to fix the to be tilted, then will also in tilting progress. Measuring responding time in seconds for having the platform back to the balancing position by tilting the platform with angles 30°, 20° and 10° in random directions every ten rounds, whose results are shown in Table 2, (Range = (maximum + minimum) / 2 ± (maximum-minimum) / 2). In the above results, the responding time is much longer than expected due to adjusting the and -axis, which kept functioning in all the turns until their conditions were satisfied. Besides, the range is also too unsteady. So, another method of two axes adjusting one step each in turns is analyzed for real-time stabilizing control.

Two axes adjusting one step each in turns
Rather than modifying the -axis until the requirement is fulfilled, the motor has to be controlled one step and then move on to the -axis to ensure that incidental effects in each motion and may be corrected instantly. The flowchart of this method is shown in Fig. 16.   Fig. 16. Flow chart of real-time stabilizing when two axes adjust one step each in turns Responding time of this method has been measured, and the results are shown in Table 3. In this turn, the average responding time is much shorter, and the range is narrowed as compared to an earlier one. Still, such responding time is not ideal enough. Observing the stabilizing process, it appears that the limit speed of the motors is too slow, and too much time is lost correcting the and -axis in turns rather than directly fixing the tilted angle in its direction.

Kinematic analysis
In this method, the relationship between the normal vector of the platform and the angle movements of the three motors is directly considered.

Platform vectors
Considering Fig. 17, the normal vector of the platform ⃑ (set length as that equals the other vectors for convenience) and ⃑ aligned to the sensor MPU-6050: With the relationship of the Eqs. (3) and (4), the value of ⃑ and ⃑ is described by the Eqs. (5), (6) and (7): For finding the correct solution, drawing of simulated coordinates has to be drawn by calculating the two solutions as shown in Fig. 19. We could confirm which solution matches reality by observing their position in space. Similarly, the same method will apply to solving ⃑ and ⃑ : = tan ⃑ Determination of rotation of motors in different tilting angle in various situations has been be identified with the relationship between the gyroscope data ( , and ) and the angles' motions of three motors (3 , 3 and 3 ). For example, when the gyroscope provides current data , and as 20°, -15° and 45°, Arduino will calculate the angles 3 , 3 and 3 corresponding to the condition having the platform tilting to -20°, 15° and 45°. After rotating the motors with the angles above, the platform will return to a horizontal balancing position.

Calculation of kinematic analysis
The flow chart, as shown in Fig. 20 for the calculation of kinematic analysis, states the completion of movement is possible when it satisfies 1. When the movement is completed, the platform will be in its balancing position. Measurement is taken for the responding time in seconds when the platform has to balance with the tilting angle 30°, 20° and 10° in random directions every ten rounds. The result of this analysis is shown in Table 4. This control method is faster not only because the inclinations of the and axes are considered and processed together but also because the rotation of the axis is preserved (platform balancing doesn't need to consider direction). However, this method of controlling the rotation angle of each servo motor has the following two disadvantages: a) The required rotation angle of each motor is different, so they can't complete the necessary rotations with their same limit speed. To avoid this, the speed of the three motors should be distributed in equal proportion to the required rotation angle (the motor with the most significant angle of rotation needed is controlled at the highest rotational speed). It is the best way to complete the rotation of all motors at the same time. However, linear, rotational speed adjustment is not easy on servo motors.
b) It still takes several seconds to reach equilibrium, but the gyroscope data will not be updated until the motor rotates to the specified angle. Therefore, if the platform is tilted in other directions during the required rotation, the motor will still complete the original rotation command before charging the new correction angle and cannot respond promptly to the tilting condition.

Results analysis
After the experimental analysis was done for both methods, the comparative results are shown in Fig. 21. After all the experiments for different tilting angles by all the methods, the experimental findings of the procedure of completely adjusting two axes in turns differ significantly among them. It has been observed that using this approach, the efficiency of a single axis balancing with the same angle in various directions varies, resulting in a short variable time to attain stability in each turn. When it comes to the results using two axes adjusting one step each in turns, it has an immediate difference from the method of kinematic analysis, which results in faster operation along with control balancing of the platform. It is clear from the comparison that the method of kinematic analysis is the most effective control approach for balancing the platform. a) = 30 degrees b) = 20 degrees c) = 10 degrees Fig. 21. Comparison between results of methods above

Conclusions
This study provides automated platform stabilization using a system similar to the 3-RCC structure, which can rotate on the axis at the same tilting angle. Different tilting angles with automation stability have been observed with a tilting angle of 30 degrees; the automatic stabilization efficiency is 5 seconds, 3.5 seconds at 20 degrees, and 3 seconds at 10 degrees. In a conventional model of three coaxial gears, instability occurs due to isolated gears. As a result, the mechanism design has been modified, including internal gears with bearings, increasing the system's stability. To minimize torque, the arms that support the platform has been reduced to improve the platform's stability. The varied placements of the three arms complicate the interaction between motor actions and how they tilt the platform in terms of automatic stability management. It is observed that the real-time stabilization method is inefficient compared to kinematic analysis. Kinematic analysis performs well with less time duration; in this case, the platform does not require direction. However, some restrictions are due to accurate angle control and rotation over 360 degrees achieved by servo motors which will be a future scope of the study. Also, stepper motors can achieve stabilization more efficiently and accurately despite taking up more space in future studies. In further analysis, by enhancing the devices currently in use, it may be possible to make the kinematic analysis approach responsive to sudden changes in tilting direction during stabilization and to reduce the reacting time to under one second.