Abstract
We propose a novel virtual torque sensor for commercial low-cost radio-controlled (RC) servo motors. The virtual torque sensor has played an important role for conventional robots. It has been used for torque-required control applications such as human–robot interaction and under-actuated robots. However, most virtual torque sensors are based on the inversion of actuators or robot dynamics with the assumption that entire dynamics are known. This is not applicable to the RC servo motors that have unknown control structures. As RC servo motors enable researchers and hobbyists to create lightweight but high performance robots in an easy and cost-effective manner, the development of a virtual torque sensor for these motors is necessary. In this study, we propose a design method of a virtual torque sensor for RC servo motors. First, the virtual sensor is derived mathematically based on internal dynamic models with parametric constraints and compared to the conventional model. Second, a dedicated system identification method is developed for the proposed virtual sensor to implement the sensor in actual experiments. Finally, we compare experimental results with the measurements obtained by an actual sensor.
Keywords: virtual torque sensor, remote-controlled servo motor, internal dynamic model, system identification
1. Introduction
Radio-controlled (RC) servo motors are compact actuators that are originally equipped with a sensor (potentiometer), a torque transmission system (gearbox), and a built-in controller (embedded board). These motors have been adopted by numerous researchers and hobbyists to realize lightweight but high performance robots using a simple interface in a cost-effective manner. For example, the motors were successfully utilized by aerial manipulators, hand exoskeletons, humanoid necks, worm robots, and cheetah robots in [1,2,3,4,5], respectively.
However, the limitation of RC servo motors is that they can be controlled only by the desired angle position [6,7]. Contrary to the conventional position-based control of robots, torque-based control provides a more convenient and reliable method for active applications such as human–robot interaction and under-actuated robotics. In recent years, as many robots are required to perform tasks under confined environments to interact safely with surroundings [8], the estimation of exerted torque is the most important part for RC servo motors to use them consistently as robot actuators in a variety of applications.
Two candidate approaches have been studied to solve the lack of torque information . One is to directly measure exerted torque by attaching physical sensors on robots (e.g., [9,10,11,12,13]). The other approach, which is referred to as the virtual sensor approach, is to indirectly estimate torque by exploiting mathematical system models. In [10], a robot is controlled by torque that is directly measured by an actual torque sensor. Even though the torque sensor is precise and can be installed on a motor shaft, the sensor is bulky or expensive. This nullifies the major advantages of RC servo motors. Torque can also be calculated by a current sensor with a current–torque proportional relationship, as in [11]. Unfortunately, it is difficult to install a current sensor on RC servo motors without the intrusive opening of packaging because current is managed by the inner microcontroller in the packaging. Opening the packaging is not preferred because it is tedious and it affects the pre-aligned gear system, which is related to hysteresis behavior. Although a few RC servo motors, called servo drives or smart servos, are known to provide torque information calculated by manufacturer, there are several issues left as follows. The first is on the reliability of the built-in torque sensor, whether it is accurate indeed for each product and various experimental situation. The problem may require experiments-based system identification process. In addition, it should be noted that there are many conventional robots using the RC servo motors that have no torque information. To the best knowledge of authors, there are various products in the market for the RC servo motors having no internal torque information. In this respect, the development of virtual torque sensor which is applicable to most kinds of RC servo motors provides greater flexibility not only for choosing actuators according to one’s budget and desired dimensions of the motors in purchase stage, but also for reusing conventional robots to the torque-required applications. On the contrary, a virtual sensor can estimate exerted torque without direct measurement if the governing system model is provided. The electromechanical dynamics of DC motors were studied for system modeling and control in [14]. In [15], a Kalman filter was designed for torque estimation based on a dynamic model of low-cost DC motors. The framework of a virtual torque sensor was implemented and validated for industrial robots [16,17], rehabilitation robots [18], and series elastic actuators in [19]. However, all these approaches assume that control structures are configurable or known by end users, which is not applicable to low-cost commercial RC servo motors with unknown control structures.
To the best of our knowledge, there have been few attempts to design torque observers considering system dynamics and unknown control structures. In [20], a continuous-time system identification procedure is presented for RC servo motors under blind control architecture based on the model complexity criterion. However, the study focuses on the validity for the determination of controller structure. In addition, there is insufficient explanation about how the identified models and torque are related in systematic manner, whether results are reasonable in the physical sense, and how it can be generally applied and expanded for more cases. In addition, all results for the proposed approach depend on the identified models that do not consider parametric constraints in dynamic models. This contradicts the assumption made by the study.
In this study, we propose a design method of a virtual torque sensor for commercial RC servo motors under an unknown control structure. First, the virtual torque sensor is derived based on internal dynamic models. Second, for the proposed virtual torque sensor framework, dedicated system identification is presented with the problem formulation of constrained optimization. Finally, experiments are conducted to validate the proposed virtual torque sensor. The torques estimated by our virtual torque sensor and an actual torque sensor are compared, and the result shows that the proposed sensor successfully estimates exerted torque.
The rest of this paper is organized as follows: In Section 2, the hardware configuration and internal dynamic model of RC servo motors are described. In Section 3, the problem formulation is presented with the system identification method. In Section 4, the experimental setup is illustrated and results are analyzed. The conclusions are presented in Section 5.
2. Virtual Torque Sensor for RC Servo Motors Using Dynamical System Model
In this section, we mathematically derive the virtual torque sensor for RC servo motors based on the internal dynamic model. First, the operation flow in RC servo motors is explained, followed by a brief description of the electromechanical dynamics for the internal dynamic model. Finally, we compare the proposed framework with the conventional framework and suggest a possible method to improve the robustness and precision of results.
RC servo motors are operated in the following five steps: First, the desired angle trajectory is sent to a small built-in board from a microcontroller via a pulse width modulation duty signal. Second, the board receives the current angle position as proportional voltage through a potentiometer. Third, the board calculates the control input required to achieve the desired angle trajectory. Fourth, the DC motor is actuated by the torque exerted by the control voltage. Fifth, the generated torque is transmitted to the load shaft on which the potentiometer is placed. Finally, the above-mentioned steps are repeated with a fixed sample time. The steps are illustrated in Figure 1.
2.1. Electromechanical Model for DC Motors
The electronic dynamics and mechanical dynamics are derived using the net current balance law and net torque balance law, respectively, as illustrated in Figure 2.
(1) |
(2) |
where R, L, and represent resistance, inductance and back-electromotive force, respectively, and J, B, and represent load inertia, viscous load friction, and angle, respectively. Then, for a single DC motor, the transfer functions from applied voltage to exerted torque and from exerted torque to the angle position of the motor are derived as follows:
(3) |
(4) |
2.2. Torque Estimation under Unknown Control Structure
Exerted torque can be estimated by Equations (2)–(4) if the required inputs are provided. However, end users cannot measure the input voltage of the DC motor in Equation (3) because the voltage is adjusted by the unknown embedded controller in the enclosed case of the servo motor. In addition, internal current cannot be used to estimate exerted torque for the input of Equation (3) because the current sensor cannot be attached without the intrusive opening of servo motor packaging. The problem in using Equation (4) for the estimation of exerted torque is that the available data for end users are not from exerted torque to the output angle but from the reference angle to the output angle. This makes it difficult for end users to estimate the parameters in Equation (4) when two different dynamics exist. The unknown embedded controller and limited measurements are the main reasons the conventional virtual torque sensor cannot be implemented directly.
In this respect, first, we assume that the signal through the embedded controller is approximated by the linear combination of two source signals with arbitrary compensation terms.
(5) |
Then, according to the block diagram in Figure 2 and Equation (5), exerted torque is
(6) |
(7) |
Let be the transfer function of the closed-loop system from reference angle position to output angle position . Dividing Equation (7) by and using Equation (4),
(8) |
At this step, more information is required to remove the explicit dependency on the arbitrary controller terms in Equation (8).
2.3. Virtual Torque Sensor with Parametric Constraints in Independent Experiments
To resolve the unknown controller terms in Equation (8), we propose an experimental method using selective parameter variation. A key part of the method is to design at least two independent experiments that show significantly different responses in the Laplace domain. In this method, multiple independent experiments are performed for different values of inertia , where subscript i represents the ith experiment. In the same manner, indicates the closed-loop system for the ith experiment. First, the virtual torque sensor is derived for two independent experiments (). The generalization for more independent experiments is described at the end of this section. As the selective parameter variation for RC servo motors, chaining inertia J is a reasonable selection owing to the following three reasons: First, load inertia has a direct relationship with the exerted torque to be determined. Second, the effects of parameter variation in the mechanical system are more evident on output angle responses. Third, load inertia can be adjusted easily in most practical applications. Load inertia is changed with a fixed value, and other system models remain the same . Then, based on Equation (8), the system equation given below is satisfied for the two independent experiments.
(9) |
Reformulating Equation (7) to the matrix form, the arbitrary controller terms in the torque equation are replaced with two closed-loop systems and inertia values.
(10) |
The inversion in Equation (10) exists only if . This implies that the above terms can be used if the estimated closed-loop systems must not be the same. In addition, it is preferred to estimate two system models that are considerably different in the Laplace domain for the reliability of the inversion process. Using the reference angle position, output angle position, and Equation (10), the torque driven by the motor is calculated by
(11) |
where , , and . Torque is composed of three terms, i.e., prediction , the error between the prediction and actual value , and error compensation . compensates prediction error by extrapolating between the change in inertia and the induced closed-loop responses. This is a major difference from conventional virtual sensors. It should also be noted that the prediction term is an improper transfer function and acts as a second-order differentiator. In practical applications, the term is highly sensitive to measurement noise. To reduce the influence of noise, a low-pass filter can be used on the output response at the expense of estimation delay. Finally, exerted torque can be estimated as using the low-pass filter, .
(12) |
The proposed method can be expanded for more than two experiments if more robust estimation is desired.
(13) |
Then, the virtual torque sensor can be obtained by applying pseudo-inversion or regression methods, followed by the procedure described in this section.
3. System Identification for the Proposed Virtual Torque Sensor
This section presents the system identification method for the unknown parameters or system models in Equation (12). After the constraints in internal dynamics are addressed, the identification process is formulated as an optimization problem with an objective function and constrained conditions in the frequency domain.
3.1. System Identification in the Lumped Parameters
To implement the proposed virtual torque sensor, the terms of must be identified or provided for at least two significantly different experiments. Based on the block diagram in Figure 2, the closed-loop system model is
(14) |
Signals through controllers are approximated by the outputs of candidate transfer functions and validated using experimental data. This is presented in the later part of this paper. One of the candidate structures for the output of controllers is a polynomial expansion in s, that is, , where and . Then, the closed-loop system, , is
(15) |
In the identification process, the parameters in are estimated with normalized coefficients set as for identifiability [21].
(16) |
Comparing Equation (15) with Equation (16), the relationships given below are satisfied for the cases of
(17) |
Thus, all unknowns in the torque estimator can be identified from closed-loop experiments with a known value of (). Furthermore, in Equation (17), there are terms that are independent of different values of inertia . For example, the cases shown in Table 1 for the case of n = 1 and m = 1.
Table 1.
Coefficient | Value | Coefficient | Value |
---|---|---|---|
Then, constrained conditions are generated between the coefficients of the estimated models.
(18) |
3.2. Problem Formulation as Constrained Optimization in Frequency Domain
Frequency-domain system identification is a mature identification method of designing experiments and analyzing results in a systematic manner. The identification flow for the proposed virtual torque sensor is illustrated in Figure 3. First, after the system is excited by the designed reference angle position signals, output angle positions are measured and saved with the input signal in the time domain. Second, input–output data are transformed to the set of frequency data through the fast Fourier transform, which reduces the influence of noise in the measured output. Third, to estimate the unknown parameters in the system model, optimization is performed for the set of input–output frequency data. The main aim of the identification is to minimize the prediction error between frequency-domain data, , and the output of the estimated model, . Therefore, the unknown parameters, , in Equation (16) can be estimated by the objective function, , as
(19) |
Weighting value represents the standard deviation of the repeated experiments at the kth frequency out of frequencies. Constraint is created for the stability of the closed loop when is the ith eigenvalue of the estimated closed-loop system, , and constraints , and are introduced by the internal dynamic model. In this problem, the equality constraints are handled by expressing an unknown variable using known variables in the equation. Then, the constrained optimization problem, , can be transformed to the unconstrained problem, , by reformulating the objective function and constraints as shown below. A detailed explanation can be found in [22].
(20) |
A meta-heuristic algorithm, cyclic network topology-based PSO [23], is used to solve the optimization problem given by Equation (20). Let be the th particle of a swarm at the th iteration, where each represents one hypothesis for the optimal result of . Parameters , , and denote the length of the parameter vector to be found, the number of particles at an iteration, and the number of neighbors of the th particle, respectively.
Step 0 (Initialization)
All particles are randomly sampled from the uniform distribution. The best previously obtained position (pbest) and the best position in the social neighborhood (sbest) are set.
Step 1 (Optimal Solution)
The optimization is terminated if the optimal value, , satisfies the desired level.
(21) |
Otherwise, Step 2 is performed.
Step 2 (Evolutionary Update)
All particles are moved by the following evolutionary update law:
(22) |
User-designed parameters and represent the inertia factor, cognitive scaling factor, and social scaling factor, respectively. The values of pbest and sbest are updated as given below. Then, Step 1 is performed.
(23) |
The experimental setup and results are described in the next section.
4. Experiments and Analysis
This section describes the identification experiments conducted to specify the proposed virtual torque sensor. The unknowns in the proposed sensor are resolved based on the result of the closed-loop system identification from the reference angle position to the output angle position. The performance of the virtual torque sensor is validated using actual torque data.
4.1. Experimental Setup
The experimental setup is illustrated in Figure 4. A load cell is used for validation to compare exerted torque with actual values. A pulley with a spring and a thread connected by the load cell is installed. Owing to this, the mechanical dynamics shown in Figure 2 are slightly changed from to , where K is the spring stiffness constant. Calibrated weights are placed on a lightweight arm fixed on the pulley. A microrotary encoder is introduced to measure the current angle position. The specifications of the equipment used in the experiments are provided in Table 2.
Table 2.
Equipment/Item | Model | Description |
---|---|---|
RC servo motor | GWS S03T 2BBMG | Max torque: 7.93 kf/cm |
Microrotary encoder | AS5048A | Resolution: 14 bits |
Microcontroller | Raspberry Pi 3 Model B+ | Real-time control with 1.4 GHz 64-bit |
Analog to digital converter | Arduino Pro Mini 328 3.3 v 8 MHz | Resolution: 10 bits |
Load cell | Force range: 0–1 kg |
4.2. Identification of the Proposed Torque Estimator
The performance of result models depends on the design of the input excitation signal. It is known that the input signal should be carefully created for the target situation. Otherwise, the identified model experiences undesired influences such as leakage effects or nonlinear effects [21]. In the experiments, we select random multisine sets as excitation signals because the sets have beneficial properties such as bounded amplitude, no leakage effects, and well-defined randomness to nonlinear effects. Multisine inputs are realized based on Equation (24) for each independent experiment, which is repeated seven times.
(24) |
where is the number of desired frequencies, is the desired frequency, U is a constant, and is a random phase that is uniformly distributed in the interval . Parameters , , and are selected from 0.1 Hz to approximately 10 Hz, satisfying an equal interval on the log scale. The input can be used to estimate up to 50 order of a model in an unambiguous way because the persistent excitation order of the multisine inputs is 50.
Input–output datasets are measured in the time domain and transformed to frequency data for calibrated weights of 200 g and 450 g. The parameters identified in the result models by averaging the seven repeated experiments are shown in Table 3, and the estimated responses are compared with the experimental responses in Figure 5.
Table 3.
Coefficient | Value | Coefficient | Value | Coefficient | Value | Coefficient | Value |
---|---|---|---|---|---|---|---|
−3.9949 | 4.2319 | −1.6526 | 1.7506 | ||||
3.2451 | 2.9589 | 1.3424 | 1.4228 | ||||
3.1901 | 29.4236 | 1.3196 | 27.1573 |
Considering that the inertia difference, , is based on the calibrated weights and arm length, and B are calculated using Equation (16). In addition, parameter K can be found by solving the system of equations introduced by Table 4.
(25) |
where . It is numerically solved by employing the trust-region dogleg algorithm. The solution is . Then, . All unknowns in Equation (12) are resolved by the system identification. Finally, exerted torque is estimated by the proposed virtual torque sensor (i.e., Equation (12)) with .
(26) |
Table 4.
Coefficient | Value | Coefficient | Value |
---|---|---|---|
The estimated torque is compared with the measurement obtained from load cell data in Figure 6. The torque value by the load cell was not used for any identification process. The result proves that the proposed virtual torque sensor successfully estimates the true torque exerted by the RC servo motor.
5. Conclusions
In this study, we investigated a virtual torque sensor for commercial RC servo motors under an unknown control structure. The proposed virtual sensor was designed, implemented, and validated using the following procedure: First, the mathematical model of the virtual sensor was derived without explicit dependency on the arbitrary controller. Based on the internal dynamic models of RC servo motors, the controllers were substituted by closed-loop systems under a specially designed condition. Second, the problem of parameter identification in the closed-loop systems was formulated as a constrained optimization problem in the frequency domain and solved by utilizing the meta-heuristic optimization algorithm. Finally, experimental results proved that our virtual sensor successfully approximates the torque values measured by an actual physical sensor. The proposed virtual torque sensor can be easily used for low-cost applications or small-sized prototype robots equipped with RC servo motors without an actual torque sensor.
Acknowledgments
This research was supported by JSPS KAKENHI (Grant-in-Aid for Scientific Research (B)) Grant Number A16H043860.
Author Contributions
Investigation, Y.H., Y.M., and M.I.; Methodology, Y.H., Y.M., and M.I.; Formal Analysis Y.H.; Data Curation, Y.H.; Visualization, Y.H.; Validation, Y.M. and M.I.; Supervision, Y.M. and M.I.; Project administration, Y.M. and M.I.; Writing—original draft, Y.H.; and Writing—review and editing, Y.M. and M.I.
Conflicts of Interest
The authors declare no conflict of interest.
References
- 1.Tadesse Y., Subbarao K., Priya S. Realizing a humanoid neck with serial chain four-bar mechanism. J. Intell. Mater. Syst. Struct. 2010;21:1169–1191. doi: 10.1177/1045389X10378775. [DOI] [Google Scholar]
- 2.Bianchi M., Cempini M., Conti R., Meli E., Ridolfi A., Vitiello N., Allotta B. Design of a Series Elastic Transmission for hand exoskeletons. Mechatronics. 2018;51:8–18. doi: 10.1016/j.mechatronics.2018.02.010. [DOI] [Google Scholar]
- 3.Tsukagoshi H., Watanabe M., Hamada T., Ashlih D., Iizuka R. Aerial manipulator with perching and door-opening capability; Proceedings of the 2015 IEEE International Conference on the Robotics and Automation (ICRA); Seattle, WA, USA. 26–30 May 2015; pp. 4663–4668. [Google Scholar]
- 4.Noorani M.R.S., Ghanbari A., Aghli S. Design and fabrication of a worm robot prototype; Proceedings of the 2015 3rd RSI International Conference on Robotics and Mechatronics (ICROM); Tehran, Iran. 7–9 October 2015; pp. 73–78. [Google Scholar]
- 5.Nie H., Sun R., Hu L., Su Z., Hu W. Control of a cheetah robot in passive bounding gait. J. Bionic Eng. 2016;13:283–291. doi: 10.1016/S1672-6529(16)60301-3. [DOI] [Google Scholar]
- 6.Hayashi M., Koide Y., Matsuhara K., Ushida S., Oku H., Kongprawechnon W. Adaptive modeling and compliance control for RC servo motor; Proceedings of the 56th Annual Conference of the Society of Instrument and Control Engineers of Japan (SICE); Kanazawa, Japan. 19–22 September 2017; pp. 664–667. [Google Scholar]
- 7.Suarez A., Jimenez-Cano A.E., Vega V.M., Heredia G., Rodriguez-Castaño A., Ollero A. Design of a lightweight dual arm system for aerial manipulation. Mechatronics. 2018;50:30–44. doi: 10.1016/j.mechatronics.2018.01.005. [DOI] [Google Scholar]
- 8.Flacco F., Kheddar A. Contact Detection and Physical Interaction for Low Cost Personal Robots; Proceedings of the 26th IEEE International Symposium on Robot and Human Interactive Communication; Lisbon, Portugal. 27–31 August 2017. [Google Scholar]
- 9.Staufer P., Gattringer H. State estimation on flexible robots using accelerometers and angular rate sensors. Mechatronics. 2012;22:1043–1049. doi: 10.1016/j.mechatronics.2012.08.009. [DOI] [Google Scholar]
- 10.Hwang B., Jeon D. A method to accurately estimate the muscular torques of human wearing exoskeletons by torque sensors. Sensors. 2015;15:8337–8357. doi: 10.3390/s150408337. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Indri M., Trapani S., Lazzero I. Development of a virtual collision sensor for industrial robots. Sensors. 2017;17:1148. doi: 10.3390/s17051148. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Bum Kim Y., Kim U., Seok D.Y., So J., Haeng Lee Y., Choi H. Torque Sensor Embedded Actuator Module for Robotic Applications. IEEE/ASME Trans. Mechatron. 2018;23:1662–1672. doi: 10.1109/TMECH.2018.2850962. [DOI] [Google Scholar]
- 13.Zhang H.X., Ryoo Y.J., Byun K.S. Development of torque sensor with high sensitivity for joint of robot manipulator using 4-bar linkage shape. Sensors. 2016;16:991. doi: 10.3390/s16070991. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Kara T., Eker I. Nonlinear modeling and identification of a DC motor for bidirectional operation with real time experiments. Energy Convers. Manag. 2004;45:1087–1106. doi: 10.1016/j.enconman.2003.08.005. [DOI] [Google Scholar]
- 15.Farnaz A.H.Z., Sajith H.S., Binduhewa P.J., Ekanayake M.P.B., Samaranayake B. Low cost torque estimator for DC servo motors; Proceedings of the 2015 IEEE 10th International Conference on Industrial and Information Systems (ICIIS); Peradeniya, Sri Lanka. 18–20 December 2015; pp. 187–192. [Google Scholar]
- 16.Villagrossi E., Simoni L., Beschi M., Pedrocchi N., Marini A., Tosatti L.M., Visioli A. A virtual force sensor for interaction tasks with conventional industrial robots. Mechatronics. 2018;50:78–86. doi: 10.1016/j.mechatronics.2018.01.016. [DOI] [Google Scholar]
- 17.Beschi M., Villagrossi E., Pedrocchi N., Tosatti L.M. A general analytical procedure for robot dynamic model reduction; Proceedings of the 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS); Hamburg, Germany. 28 September–2 October 2015; pp. 4127–4132. [Google Scholar]
- 18.Mancisidor A., Zubizarreta A., Cabanes I., Portillo E., Jung J.H. Virtual Sensors for Advanced Controllers in Rehabilitation Robotics. Sensors. 2018;18:785. doi: 10.3390/s18030785. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Oh S., Lee C., Kong K. Force control and force observer design of series elastic actuator based on its dynamic characteristics; Proceedings of the 41st Annual Conference of the Industrial Electronics Society; Yokohama, Japan. 9–12 November 2015; pp. 4639–4644. [Google Scholar]
- 20.Wada T., Ishikawa M., Kitayoshi R., Maruta I., Sugie T. Practical modeling and system identification of R/C servo motors; Proceedings of the IEEE International Conference on Control Applications; St. Petersburg, Russia. 8–10 July 2009; pp. 1378–1383. [DOI] [Google Scholar]
- 21.Pintelon R., Schoukens J. System Identification: A Frequency Domain Approach. John Wiley & Sons; New York, NY, USA: 2012. [Google Scholar]
- 22.Mezura-Montes E., Coello C.A.C. Constraint-handling in nature-inspired numerical optimization: Past, present and future. Swarm Evol. Comput. 2011;1:173–194. doi: 10.1016/j.swevo.2011.10.001. [DOI] [Google Scholar]
- 23.Maruta I., Kim T.H., Song D., Sugie T. Synthesis of fixed-structure robust controllers using a constrained particle swarm optimizer with cyclic neighborhood topology. Expert Syst. Appl. 2013;40:3595–3605. doi: 10.1016/j.eswa.2012.12.066. [DOI] [Google Scholar]