# Modeling and Control of a DC Motor Coupled to a Non-Rigid Joint
## 4 Results
### Non-Rigid Joint  
In order to perform the hardware tests, a system with the components presented in Figure 5 was built. This is presented in Figure 12, and it was designed by the authors, being subsequently 3D printed. The parts already provide space specially allocated for the load cell, as well as for its amplifier, and also for the absolute encoder. The most complicated task was to physically align the rotation axis of the joint, which has the magnet placed in its center, and the center of the Hall sensor. Taking into  
Figure 11: Absolute Error vs. Time. Figure 10: Plot of Angular Speed vs. Time. account the collected data, this task was considered to be performed successfully, since the angular displacement red by the sensor and by a physical angle meter were very similar. For the first set of tests, the system was acquiring data continuously, in order to recognize the variations in force exerted on the cell, with information of the angle. This test allows to know what is the behavior of the joint when its the center of rotation is locked, and the posterior link is applying a force on it. This force is traduced to a torque, since it was put with some distance to the center. The results from this test are presented graphically in Figure 13. Since the joint is already coupled to a motor attached to a gearbox system, and since the gearbox presents some backlash, the joint presents a dead zone. This behaviour is clearly visible in the figure, in the red line of the graph where, although the exerted force is practically zero, the angle has a significant variation. Considering that the motor is stopped, the difference between the angles of the motor shaft and the joint is obtained by the angle in the absolute encoder. So, using Equation (9), and calculating the average of the straight slopes of the values from the positive and the negative torques, the value of \(K\) is obtained and is equal to 7.3035. Figure 12: Real joint. Figure 13: Plot of Torque vs. Angle. Then, to find the value of \(J\) and \(B\), it was necessary to proceed to a second set of tests. This consists of placing the system to acquire data, rotating the posterior link to a certain angle and releasing it, allowing its free oscillation until reaching the equilibrium point again. Using Equation (19), and the inverse Laplace transform, the following Equations could be used to represent the system in the time domain. \[\theta(t)=\theta_{0}\cdot\sqrt{\frac{(\frac{\alpha}{\omega_{n}}-\xi\cdot\omega _{n})^{2}}{1-\xi^{2}}+1}\cdot e^{-\xi\omega_{n}t}sin(\omega_{n}\cdot\sqrt{1- \xi^{2}}\cdot t+\phi) \tag{28}\]  
\[\phi=tan^{-1}(\frac{\omega_{n}\sqrt{1-\xi^{2}}}{\alpha-\xi\omega_{n}}) \tag{29}\]  
Having defined the approximation function, and since the value of \(K\) was already estimated, the optimization process that minimizes the absolute error to the obtained angular position was put to run and the values of the variables for Equation (28) were found. Establishing the parallelism between the function in the Laplace domain used and Equation (19), after the optimization process, the values found for \(B\) and \(J\) were 0.0416 and 0.0085. Considering a simple pendulum configuration, \(J=m\cdot r^{2}\). If a weight of 269 gr. is put on a known point of the link, there is a known moment of inertia. Taking the value obtained for \(J=0.0085\), and placing the known mass approximately 18 cm from the axis of rotation, one obtain an estimated value for the distance \(r=17.78\) cm, an error of less than 1%, which indicates that the estimation of the parameters associated with the joint has been carried out successfully. All the obtained estimated parameters are compiled in Table 3.  
In Figure 14, in blue there is the real measured behaviour of the joint, while in red there is the estimated model of the joint. Actually, approximately from t = 1s, it begins to be noticed that the model differs somewhat from the performed measurements.