## Abstract

This document presents the design of a digital PID control for a Stewart-Gough platform, delimited by six degrees of freedom (DoF) that allow the final effector to have displacement in the XYZ axes and rotation with warpage, pitch, and yaw restrictions. It includes the study and resolution of the direct and inverse kinematics of the platform, as well as the workspace described by the final effector and its corresponding simulation of movements and joints to study extreme points and possible singularities. From the definition of characteristics, the CAD design generated from the generalized mathematical model of the public domain, and the general selection of materials for the construction of the functional prototype, a study of applied forces is generated to observe the points with stress concentrators, the safety factor, and possible deformations. The estimation of the sampling period for the selection of the microcontroller and an approximate definition of the response time are also considered. The development of this prototype and its documentation are proposed as didactic material for the study, design, and control of parallel mechanisms.

### Keywords

- Stewart-Gough platform
- PID control
- parallel robots
- inverse kinematics
- CAD design

## 1. Introduction

When talking about industrial robotics, one of the first associated thoughts is about the serial robots that are highly applicable to this field; however, parallel robots also have a great importance and range of applications in this environment. Among its most important characteristics, its high load/power ratio is distinguished. In the case of the Stewart-Gough platform, this characteristic lies in its possibility of distributing the load in approximately six equal parts, whereby the total load capacity of the parallel robot approximates six times the load capacity of each actuator individually.

The Stewart platform is a parallel type manipulator that involves a configuration of six degrees of freedom, and each degree of freedom corresponds to an actuator. The six actuators can be linear or angular and join the bottom of the robot, which has no mobility, called a base with the part that does have mobility, the final effector. Due to this configuration, the Stewart-Gough platform has high rigidity, which can be translated into greater precision.

The final effector is the most interesting part of the robot, since its position and even orientation are the characteristics that determine if the robot is able to meet the precision necessary to implement and satisfy a need, whether industrial, educational, research, etc. It can have different applications, for example, orientation of satellites, flight simulators, and shakers (or also called agitators that are part of the chemistry laboratory instruments), among others.

This document explains the design, construction, and implementation of a discrete PID control to a Stewart-Gough platform; for this the content is distributed as follows: Section 7 considers the theoretical foundations required for the development of this work, such as the PID control and its compensation constants, the methods of application of the PID control, and both inverse and direct kinematics.

Section 11 shows the development of the work carried out as stated in the schedule of activities and describes in detail the processes used for the selection of the controller that will be the essence of the project, the mathematical model for the determination of the measures of the elements of the platform, and simulations to check the movement, joints, safety factor, efforts, and sampling capacity of the microprocessor. The description and considerations required for the selection of components and electronic design are presented in Sections 11.4 and 11.6. A brief description of the manufacturing plan is made in Section 11.7, and in Section 11.5 the characteristics of the proposed work are defined. Finally, in Section 11.8 the conceptual design of the controller is presented.

## 2. Preliminaries

### 2.1 Control

To enter into definition of what control is, we begin by explaining what a process is, which is referred to as a set of equipment or devices attached or implemented to perform operations that help fulfill a task [1]. To enforce this task, a series of additional devices are needed that regulate the process in general, which are called a control system as a whole [1].

Ogata [2] mentions four methods (belonging to the classical control or also called conventional control) for the design of a controller. These are the following:

Root place

Frequency response

PID controllers

Modified PID controllers

In general, a control system needs a mathematical model that describes its behavior when receiving inputs [2]. For the Stewart platform, it can be determined by inverse kinematics [3].

The PID controller is the most common form of feedback, was an essential element of the first governors, and became a model or standard tool when process control emerged in the 1940s [4]. Consider a control loop of an input and an output. The block diagram [5] is shown in Figure 1.

Of the PID control family, there are members that involve the three actions: proportional (P), integral (I), and derivative (D) [5].

There are two control design techniques that are analog and digital, and for this they work with continuous time and discrete time systems, respectively. Many of the systems are described by differential equations, and analog control design techniques have become popular. Also most of the controllers are made of digital systems [6]. You can also discretize analog controllers to obtain digital controllers. Next, characteristics of control systems are mentioned, analog and digital [7]:

Analog

Noise is a problem in all signal transmissions.

Digital

They have the ability to reject noise.

It is easy to implement and modify digital controllers simply by changing the coefficient values.

A digital or discrete time system is a dynamic system in which one or more variables may vary only at certain times called sampling indicated by kT (k = 0,1,2, …, n) [8].

The block diagram of a digital control system is shown in Figure 2 [9].

## 3. Parallel robots

The term parallel robot, also known as closed-chain robot or parallel manipulator, basically consists of a fixed base attached to an end effector or mobile base which can perform its movement based on the movement of the actuators that are located in such a way that they close the kinematic chain between both bases [9]. The principle of operation initially arose with James E. Gwinnett, who designed a platform for the entertainment industry in the 1928 patent application [10]. However, it was not until 1940 when W. Pollard designed the first industrial sparallel robot for spray painting processes [11] (Figures 3 and 4).

After the first advances of the Stewart platforms applied to industrial processes, some companies began to make variants of these platforms, such as the case of the Redifon company that was asked by Lufthansa German Airlines to produce a simulator of flight, with the initial model designed for its then new Boeing 727 fleet. This simulator model included three axes, which gave the mechanism the mobility needed to recreate the behavior of the aircraft. Redifon is currently in service since its commissioning in 1949, when it began with the production of flight simulators, trainers, and the development of new techniques [12] (Figure 5).

## 4. Inverse kinematics

Inverse kinematics is a mathematical modeling of a manipulator, either serial (open kinematic chain) or parallel (closed kinematic chain). Such modeling requires as input parameters the position of the final effector in order to calculate the angles that exist between links and thus determine the position of each actuator in the reference

The fixed coordinates (

Points

And for points

## 5. Direct kinematics

As mentioned in the previous chapter, reverse kinematics needs the position of the final effector as input parameters to calculate the angles between links of the robot. So, the direct kinematics is the counterpart of inverse kinematics, since its initial data are the angles established between each actuator and what is calculated is the position of the final effector. A very common method of using is Denavit-Hartenberg, explained by Barrientos, which follows a 16-step algorithm to get a single homogeneous transformation matrix from the premultiplication of submatrices of homogeneous transformation. The steps of this methodology are the following [14]:

DH1. Number the links starting with 1 (first mobile link in the chain) and ending with

DH2. Number each joint starting with 1 (the one corresponding to the first degree of freedom) and ending in n.

DH3. Locate the axis of each joint. If this is rotary, the axis will be its own axis of rotation. Yes it is prismatic, it will be the axis along which the displacement occurs.

DH4. To

DH5. Place the origin of the base system

DH6. For

DH7. Place

DH8. Position

DH9. Position the system

DH10. Get

DH11. Get

DH12. Obtain

DH13. Get

DH14. Obtain the transformation matrices

## 6. Microcontroller selection

One of the main parameters to be defined within the control system implementation is the sampling period T, which is a design element that allows different components to be selected among the most important ones such as the microcontroller. There are several methods for obtaining it; however, for this project the selection has been considered using the method described in [8] which selects the period based on the commitment between the following factors:

The calculation time of the processor

Numerical precision in the implementation

Loss of information in the sampling

Response to disturbances

In general, the sampling period must be selected in compromise between a range of time that avoids the deterioration of the quality of the control that can produce a high value of T and the amount of calculations necessary to execute the control algorithm with small values that can produce information loss and frequency overlap (aliasing).

In these, three cases are considered, which can be monitored based on the available elements, the ease of calculation, and the nature of the project.

**Take the bandwidth of the system:**This considers the system as a closed loop system in which each of the elements and their respective frequency are raised. From this, the bandwidth of the system that will serve as a reference for the base frequency of sampling is determined.**Establishment time required for the transient response:**This method can be performed by simulation or experimental, since it considers obtaining a response time based on the reach of 63.3% of the final value in the transient response. In [16] an oscilloscope was used to measure the response curve and the Tao time by applying a pulse signal and a mechanism adapted to the actuators. In turn, a great advantage of this method is to observe the response curve and the actual efficiency of the actuators with respect to the data provided by the manufacturer.**Select the highest frequency component:**This is a method that allows an estimation of the sampling period based on the system component that requires sampling more frequently. Because currently the plant calculations have not been performed, nor have the components been obtained for obtaining transient response, this is considered the most successful method for estimating the sampling period.

Once the method is defined, the component that requires the highest working frequency is selected. For the selection, the actuators are directly discarded, because they only require a PWM pulse that varies depending on the desired position that does not exceed 1.25 ms, which is why the components to be considered will be the gyroscope sensors and the resistive panel that will measure the external forces applied to the final effector and the external movements applied to the platform in inclined planes.

Later, the selected sensors and their detailed characteristics will be described; however, in this section, only the basic principle of their operation will be seen, which will follow up the methodology described above to obtain the sampling time.

The sensor placed at the top of the final effector and responsible for measuring the movements of moving objects will be a five-wire resistive panel (can be found in 4, 5, or 8 wires), which consists of a partially conductive layer (resistive) that is applied evenly to the panel. Conductive bus bars are protected with a silver paint through the opposite edges of the panel. Rigid and flexible panels are mounted with bus bars perpendicular to each other as shown in Figure 7. The sensor measurement is done by applying a force on the ITO layer which generates a voltage gradient across one of the layers and measuring the tension in the other layer. This gradient is normally produced by grounding a bus bar and applying +5 V on the other bar, which produces a voltage gradient on the axes that cross the panel; this applies only to one layer, the rigid layer, while the other layer is the sensitive one in both measurements.

The measurement is done sequentially in which the events are presented with the voltage gradient on the x-axis and the voltage in the sensor layer is measured; followed by this, the voltage gradient is switched to the y-axis, and another measurement is taken of the same sensor layer. To determine the sampling rate of the resistive panel, the use that will be given must be considered, for example, if it is to be used as a human interface where the contact will be a finger, the necessary resolution is not very high. Being a 6-inch-long panel and the contact resolution is 2 in (average finger size), then the analog-to-digital converter (ADC) must represent 30 points. With 5 bits, 32 points can be represented, so an ADC converter of 8 to 12 bits is sufficient in this case and a sampling rate of 10 samples per second is sufficient. In the case of wanting to make a more accurate representation in the panel using pens or objects of greater precision, the touch screen should have a resolution of at least 320 points. This gives a converter of at least 9 bits (29 = 512 levels).

The sampling rate of the touch screen controller in this case must be higher so as not to lose information on the movements being captured; therefore, a speed of 100 samples per second would suffice. For the actual position in movements on the inclined plane, the MPU-6050 model is contemplated within the gyroscope selection with something important to point out, and among its main features is the precise capture of fast and slow movement; it has a scale range of 250/500/1000/2000 °/s. That is why, by requiring a greater sampling range per second than the resistive screen, this gyroscope will be selected as the component with the highest working frequency and which will be used to monitor the sampling time selection process. To measure the movements of the final effector, it is not considered necessary to work at the maximum capacity of the gyroscope because the maximum angle of action in warping and pitching will be

Despite having sufficient sampling time, the case in which the sensor configured at its maximum capacity of 2000/s will be used (in which case the movements made on it should be 0.0005 seconds, this value is higher to the tests to which it will be subjected) to have an extra safety factor in the selection of the sampling; this leads to the next step, which mentions the cases in which overlaps (aliasing) or loss of information with a too large period may occur (Figures 9 and 10). To prevent these problems from large sampling periods, the Nyquist theorem [22] is applied, which dictates that the sampling frequency Ws, defined as

From this, it is mentioned in [8] that it should be considered as a general rule that the system must be sampled between 8 and 12 times during a cycle of the dampened frequency of the transient response if the system is under-absorbed or between 8 and 12 times during the time of establishment of the response if the system is overdamped. In which case, the minimum of this factor will be taken because it is desired to obtain a system with an under-absorbed or over-absorbed response.

Once the gyroscope is selected as the component with the highest frequency within the system, the largest measuring range provided by this device is taken as a reference, and as already mentioned, the sensor has a capacity to measure 2000/s and deliver it. A digital signal by I2C protocol, however, although this sampling configuration will not be required when incorporated into the system (since it exceeds the value of the speed performed by the actuators, in addition to requiring an ADC with higher resolution than even would be exceeded because the workspace of the platform is limited and does not exceed 100) is considered as the base sampling frequency because it is considering the critical case in which you want to obtain the highest frequency required for. The processor fulfills this task.

It is important to note that

Once an estimated time is defined for the sampling period, the microcontroller options (or microprocessor with minimum system) that meet these requirements are searched. Likewise, some of the main characteristics that they present and are required by other system components are compared, such as PWM peripherals for the six actuators, the I2C communication ports for the gyroscope, the ADC channels for the resistive panel, as well as its resolution and an extra feature that would be the type of assembly due to the didactic purpose of the platform, since when pretending to be manipulated by students of the institution, against any problem that may arise, the components are easy to replace.

It is currently considered the best candidate for the ATMega328P microprocessor, either with a minimum system implemented or using the nomadic development card Pro + that incorporates it, and being a THT type assembly is easy replacement, as well as being economical and accessible. The microprocessor incorporates six ADC channels, of which one will be destined for the resistive panel and the other two directly coincide with the SCL and SDA channels through which I2C communication is performed. In addition, six PWM channels (one channel for each actuator) that are distributed in ports B and D are required for actuator control (Figure 11).

## 7. Mathematic model

The Stewart platform mechanism, until the mid-1980s, mostly maintained the design of the triangular platform connected by spherical joints to three linear actuators adjustable in length. This configuration linked the base (whose design can vary between a triangular and hexagonal shape) with the final effector (which maintains its triangular shape) by means of the actuators coinciding two by two at the vertices of the final effector with a total of six different points contained in the base plane. These configurations are denoted as 3-3 Stewart platform and 6-3 Stewart platforms [23], respectively, as can be seen in Figure 12.

Considering a point of coincidence in spherical joints in the triangular platform, it restricted the mobility in the manipulator, producing overstrain and a reduced workspace; from this, the configuration is obtained whose base retains the regular or semi-regular hexagonal shape and the final effector is generated from an equilateral triangle with the trimmed vertices known as 6-6 Stewart platform. The said design allows some parameters and components to be varied according to the needs and/or specifications, such as the actuators that can go from being linear to angular by means of a crank-crank type conditioning mechanism. Likewise, the type of joint can be modified, in which as is the case, spherical and non-universal joints will be used. Once the different configurations of the structure of the Stewart-Gough platform are present, the configuration 6-6 Stewart platform was selected, which allowed a better manipulation of the final effector, which avoids as much as possible the efforts by singularities, and given the application, a large workspace is not necessary as it is proposed to carry out movements that are not so abrupt for the stabilization of objects that move on the surface, application of external forces, or movements on the inclined plane.

From this, it is observed that there is a wide variety of mechanical configurations for this type of manipulator with the 6-6 Stewart platform kinematic chain according to the previous selection. This kinematic structure considers a variant known as 6-SPS that is observed in Figure 13, where 6 refers to the number of degrees of freedom of the robot and SPS comes from the English spherical-prismatic-spherical referring to the leg from point to point, where the joints at the ends are prismatic and the link between them is a prismatic joint [23]. Once this configuration is selected that allows spherical joints to be placed on both sides of each actuator, a modification is made to the actuators such that instead of a prismatic joint between the joints relative to the linear actuator, it is replaced by a link element between both unions and the extension movement is generated by a configuration with angular actuators, as will be seen later in the left, thus remaining a configuration like the one presented in Figure 14. Using the Grubler criterion [13], the number of degrees of freedom on a 6-SPS type platform can be determined using the equation:

where:

Substituting Eq. (5), you have:

The workspace, also known as the field of action, is the area or spatial volume that the robot can describe when it reaches extreme points. This described volume is determined by the dimensions, shape, and movement of the joints that make it up, as well as the degrees of freedom (depending on the configuration and type of robot), and on some occasions the applied control system can also influence [15].

Although the robot has a defined workspace, it is not confirmed that such space can be described in any orientation. There are a number of points, usually the most extreme and the closest to the origin that can be accessed only with certain configurations, and some others can be reached in any orientation. This as already mentioned depends a lot on the type of configuration of the robot.

One of the disadvantages that parallel robots have over serial ones is the limited description of the workspace; this is due to the restrictions that one joint has over another in the closed kinematic chain. In the case of the Stewart-Gough platform, you can make the proposal of a workspace described by the final effector from which the dimensions of the different elements that make up the parallel robot (base, joints, platform) are obtained, legs, actuators, and horn. On the other hand, you can obtain a supposed workspace based on the selection of components to evaluate at each point of the joints, the actuators, and links, the possible interferences that can be caused between them, as well as the possible restrictions of each meeting [16].

There are several methods to obtain the measurements of each element of the Stewart-Gough platform either by describing trajectories as they do in [19] or generating a proposal from a radius of action; this is because the said platform has a design focused on minimally invasive coronary bypass surgery. The proposal of measures can also be made based on the generation of algorithms by a method observed in [17]. Several of these methods to describe the workspace of a Stewart-Gough platform in a graphic form are based on the discretization of the Cartesian space and then evaluate the length of the links according to the actuators and thus determine that they are within the range and detect interference between actuators and/or meetings and the possible restrictions of each meeting. This method can also include simulations by implementing and evaluating the Jacobian matrix to define a movement and joint capacity [18]. Despite the variations between models of the Stewart-Gough platform, the inverse kinematics and the workspace in general have the same behavior and the same description of trajectories, as mentioned in the calculation of the inverse kinematics. The same can be used for all regardless of the type of actuators. This of course may vary slightly according to the dimensions, configuration, and/or elements used for its elaboration; however, the shadow described by the said workspace is projected with a great similarity between them. Using the methodology outlined in [19], Figure 15 is generated, which corresponds to the definition of dimensions of the Stewart-Gough platform, making the consideration that the servomotors are located parallel to each other. For this, it is based on the definition of the base, that when the Stewart-Gough Platform was previously proposed with approximate dimensions at a volume that encloses it from 30 to 35 cm, an internal diameter coincides with the axis of the servos is established, it has a measure of 25 cm because the standard digital servomotors have a depth of approximately 5 cm (Figures 16 and 17).

Once the base is defined, the required workspace is raised. In principle, the design of the platform is not required to describe paths with too much depth or around a radius as is done in [19]; in this case the important data to consider would be the angles of warping and pitching inclination, since they will be intended for stabilizing sliding objects on the surface of the platform.

For this situation, one of the conditions of the state space is proposed, which would be described by the yellow line in Figure 15, where the inclination angle is proposed of 20 present in most Stewart platforms with documented angular actuators and which is considered sufficient inclination for the stabilization of objects sliding on the surface as can be seen in [15]. It is worth mentioning that this is an extreme reach position that is physically not possible to achieve and would cause singularities, which is why it is recommended not to bring the final effector to these horizons in which the platform would lose stability and control may lose efficiency in its execution.

Finally, the possible restrictions generated by the articulation of the spherical joint are added (Figure 15) since according to the table in Annex F, the working angle (depending on the size of the joint) is between

The parts that move the platform itself are called legs and are composed of a rod, threaded at each end, so that two kneecaps (upper and lower) are placed (Figures 16–18).

The lower ball joints connect each of the rods with their respective actuator (in this case it is the servomotor) by means of what will be referred to as horn or actuator arm. Servomotors are considered part of the “fixed base” or simply called a base [20].

To facilitate the reader’s understanding, the parts just explained on the CAD model designed for this project are presented in Figure 19. The arms have a hole in their geometric center used to join each arm with the axis of their respective servomotor. At the end of the horn, the lower kneecaps are coupled to create a joint and join the horn with the rod (also called link), so that it allows the movement to be transmitted.

Such movement is a conversion of angular movement to linear movement; this is a distinguishing feature of this project to the configuration that has the classic Stewart platform.

At the upper end of each of the rods, there is a joint to another kneecap, similar to the lower part of the rod.

On the other hand, there are a total of six other ball joints on the platform, connecting the closed kinematic chain to the platform. The platform is also often called the final effector, and this is the most interesting part of any serial or parallel robot.

Because the inverse kinematics is unique for parallel manipulators, the same inverse kinematics calculated on the Stewart platform [16] will be taken using the same views and changing some labels.

The coordinate systems

Figure 20 presents the schematic diagram of the reference systems: Look at Figure 21, this indicates the joint positioning diagram, assuming that the

To obtain results closer to reality, each element of the general assembly was assigned its respective material, as already mentioned, estimating the specific polymer or alloy of each metal. Starting with the bases and the final effector, in which case it was assigned an ABS plastic since, for practicality and speed, the options of laser cutting or 3D printing are currently considered, likewise, the servomotors are also considered in ABS. For the joints and links, the majority of suppliers handle metallic products for RC cars; therefore, a galvanized metal was assigned for its relative low cost and ease of machining. Finally, aluminum is mostly used for the servomotor horn, and therefore 1060 alloy aluminum is assigned.

Once each material is determined, the rest of the simulation conditions are defined starting with each restriction of the mechanism, and once all its position relationships are defined, the only geometric restriction will be the base on its lower face simulating that said platform is embedded on a regular horizontal surface. For the application of applied forces, an estimation of distributed load on the final effector is made considering that on average each actuator (depending on the manufacturer) can bear nominally 15 kg/cm of torque, and being the 3 cm servo horns, it is considered that each actuator supports a total of 5 kg at its end, for which a total force of 30 kg is applied. In the previous figure, it can be seen that within the mechanism in general, most of the effort is generated in the legs of the platform, while the largest almost imperceptible concentrator is at the junction between the leg and the servomotor horn, just where applies the highest torque due to the use of angular actuators. Despite this, it can be seen within the graph that there is no critical effort that may represent a risk of rupture (Figure 22).

For the following study, the deformation in each part of the platform is contemplated; note that in both the stress study and the deformation study, the elements corresponding to the base do not undergo significant changes, however, the platform and the links deform from considerable way especially the part of the final effector that can become almost completely deformed. However, it is worth mentioning that CAD design software mostly exaggerates the results obtained from the simulation; this is to clearly appreciate the effects of the applied conditions, since in a real case the materials would tend to fracture rather than deform due to its low ductility. In which case, the greatest deformation present is only 32.2 mm. From the previous points, the safety factor is studied, where you can clearly see the elements of the mechanism where it is applied without considering the elements of the base, which, as observed in previous studies, has no tendency to break due which is contemplated embedded in a fixed surface and reinforced with each other. Therefore, in the legs, which are important for the performance of the mechanism, a safety factor of 3.4 is presented, which for the application that will be given to the Stewart-Gough platform is an acceptable value (Figure 23). Finally, the study of applied efforts is carried out in the situation where the platform has a maximum load applied to the resistive screen in one of its vertices; this is mainly contemplated (a little ahead of the selection of components) to know how much you can resist the screen to the point of rupture which in which case would be the element on the platform with greater fragility. As shown in Figure 24, the safety factor remains low at 0.45 and has a deformation of 1.12 cm, in which case, the CAD software deforms the part to demonstrate the displacement; however, in reality the panel would tend to fracture before having such deformation.

## 8. Conclusions

The present document set out the objectives described in Section 5.1 and the description of the partial result of these in Section 12; from this, a favorable product was obtained regarding the characteristics of the system and the definition of its components. This is paralleled by the characteristics obtained from the public domain in Section 10, and those corresponding to this work are presented in Section 11.5.

Throughout the document the different points that led to the determination or adaptation of certain elements or characteristics of the work to be carried out are observed, this (as initially mentioned in the problem statement) was subject to change as more in The theme with the purpose of bringing the system closer to the desired characteristics, is by means of this method that it was possible to determine the components that would allow the generation of the CAD design and the electronic design sketch.

One of the proposed objectives was the calculation of inverse kinematics. As it could be observed in Section 11.2.3.1, when investigating more about the subject, it was concluded that it is possible to use the same one as described in [1], because for parallel manipulators with the same configuration, it is unique. Despite having replaced the linear actuators with angular ones, it has no impact on the calculation of the same, since the distance of interest is the vector that describes the collinear extension between the axis of the servomotor and its respective point of coincidence on the platform (upper kneecap) as shown in Figure 25.

The maximum position and orientation parameters of a Stewart-Gough platform depend on the application given to this device. Since this project requires bringing a sliding object on the resistive panel to a desired position, it was determined that the suitable angle for this system is 20 for warping and 20 for pitching. To arrive at this characteristic as can be seen in Section 11.2.3, an estimation of measures was implemented based on the desired workspace, and the geometric and articular parameters were checked by simulations described in Section 11.3.2.