Plane Thermoelastic Waves in Infinite Half-Space Caused FACTA UNIVERSITATIS Series: Electronics and Energetics Vol. 31, N o 1, March 2018, pp. 75 - 87 https://doi.org/10.2298/FUEE1801075B ELECTRONIC GEARING OF TWO DC MOTOR SHAFTS FOR WHEG TYPE MOBILE ROBOT  Miloš Božić 1 , Sanja Antić 1 , Vojislav Vujičić 1 , Miroslav Bjekić 1 , Goran Đorđević 2 1 University of Kragujevac, Faculty of Technical Sciences, Ĉaĉak, Serbia 2 University of Niš, Faculty of Electronic Engineering, Niš, Serbia Abstract. This paper describes the implementation of electronic gearing of two DC motor shafts. DC motors are drives for a mobile robot with wheels in the form of wheel - leg (Wheg) configuration. A single wheel consists of two Whegs (dWheg). The first DC motor drives one Wheg, while the second one drives another independent Wheg. One motor serves as the master drive motor, while the other represents the slave drive motor. As the motors are independent, it is necessary to synchronize the speed and adjust the angle between shafts. The main contribution of this paper is the implementation of control structure that enables the slave to follow the master drive, without mechanical coupling. Based on encoder measurements, the slave effectively follows the master drive for the given references of speed and angle. Speed and positioning loops are implemented on real time controller - sbRIO. The laboratory setup was created and comparison of realized and required angles and speeds was made. Key words: Electronic gearing, Master, Slave, Wheg, DC motor, sbRIO 1. INTRODUCTION Coupling of motion axis in industrial and robotic applications is always a challenging task. It is often necessary to do coupling and synchronization of two or more axes, linear [1, 2], circular or other complex movements, such as curve profiles. The task can be performed in contact way, by using mechanical couplings like gear pairs, differential drive, belts, chains, etc. Another possible alternative is contactless coupling. In industrial applications, it is used in servo applications under the name electronic coupling, electronic gearing or electronic line shafting [3, 4], while in the automobile industry, this technology is called drive-by-wire [5, 6]. The examples of the electronic coupling can be found in haptic devices [7, 8]. The advantages of electronic over mechanical coupling are numerous. Electronic gearing is used instead of mechanical assemblies, given that the Received March 14, 2017; received in revised form July 27, 2017 Corresponding author: Miloš Božić University of Kragujevac, Faculty of Technical Sciences, Svetog Save 65, 32000 Ĉaĉak, Serbia (E-mail: milos.bozic@ftn.kg.ac.rs) 76 M. BOŽIĆ, S. ANTIĆ, V. VUJIĈIĆ, M. BJEKIĆ, G. ĐORĐEVIĆ latter are the weakest link in the system. Electronic coupling makes the system more efficient and flexible. Typically, there is one master drive and one or more slave drives which follow references set by the master drive. Reference can be given in the form of torque (current), speed or position therefore the concept can be applied to a wide variety of applications. In this paper, the concept master-slave drive was applied to wheel leg drive (Wheg) [9, 10]. Wheg has a form of legged wheel with n legs (spokes). In the setup employed in the paper, Wheg had four spokes. Placing two Whegs next to each other and by independent drive of master and slave, double Wheg drive (dWheg) is obtained. dWheg drive allows independent control of the two Whegs. Figure 1 left illustrates all the seven elements of the dWheg master-slave drive wheel. Fig. 1 dWheg master-slave drive (left) and prototype of robot with rigid dWheg drives (right) The figure 1 left shows the main parts of the dWheg drive module. The parts are numbered as follows: 1) master motor, 2) slave motor, 3) coupling, 4) pulleys with a belt, 5) bearing case and shaft 6) slave Wheg, 7) master Wheg. dWheg presents original authors solution [9]. This type of drive is designed to increase the efficiency of mobile walking robot, planned for the uneven terrain. The appearance of the prototype robot during the testing phase with the rigid type of dWheg drive can be seen in Figure 1 right. This study deals with practical issues of active control of the parameter α. By changing the angle α different compliance and contact area with the ground are provided. This allows the mobile robot to move efficiently over the flat terrain when α tends to 45° as well as over a rough terrain when the angle α tends to 0°. Because of the nature of the problem this system does not require precise angle adjustment. The response time of angle adjustment is not critical. It is sufficient to adjust the angle of at least one full revolution of dWheg. Varieties of synchronizing methods are presented in the industry [2,16,17,18]. In industrial drives, it is necessary to perform the synchronization speed in the shortest possible time and change of the speed of the master drive is allowed, so the cross coupling technique is commonly used. A typical example of cross coupling is the linear interpolation between two axes. In dWheg drive the slave drive must not have influence on the work speed of master drive. Slave motors represent an additional support system and allow efficient travel of the robot over different terrains. For example, in case of loss of function of slave drive in case of cross coupling techniques that would mean that 0.5m Electronic Gearing of Two DC Motor Shafts for Wheg Type Mobile Robot 77 master motor should stop or slow down. So cross coupling synchronization will impact on mobile robot movement and it would be impossible for robot to track reference path. The paper presents implementation of master slave synchronization on dWheg drive type with additional position loop. In the next part of the paper the mathematical model of the dWheg drive motor is presented. The third part shows the control structure and the synthesis of speed and position loops. The fourth part of the paper shows the experimental setup and obtained results. The fifth part is a brief conclusion with the future steps. 2. MATHEMATICAL MODEL OF DC MOTOR Electric circuit of the DC motor with permanent magnets is given in Figure 2. Fig. 2 Electric circuit of the DC motor with permanent magnets Mathematical model of the DC motor can be described by following equations: ( ) ( ) m o t t N    (1) ( ) ( ) ( )( const .) m m me me m me o d e t K K t NK t dt         (2) ( ) ( ) ( ) ( )r r r r r m di u t L t R i t e t dt    (3) ( ) ( ) m em r M t K i t (4) ( ) ( ) ( ) ( ) ( ) m m c l m d M t M t M t J t F t dt       (5) where: ur(t), ir(t) – armature voltage and current, Rr, Lr – armature resistance and inductance em(t)  armature induced emf, m – angular displacement of motor shaft; o – angular displacement of gearbox out; m(t) – angular speed of motor shaft [rad/s]; o(t) – angular speed of gearbox out [rad/s]; Kme, Kem – emf and torque constant, Mm(t) – generating motor torque; Ml(t) – load torque on motor side, Mc(t) – Coulomb friction; Jm, Jo – motor and load inertia; J = Jm + Jo/N 2 – 78 M. BOŽIĆ, S. ANTIĆ, V. VUJIĈIĆ, M. BJEKIĆ, G. ĐORĐEVIĆ total inertia on motor side; Fm, Fo – motor and load viscous friction; F = Fm + Fo/N 2 – total viscous friction on motor side; N – gear ratio. Appropriate block diagram of the DC motor model is presented in Figure 3. Fig. 3 Block diagram of the DC motor mathematical model To make realistic mathematical model and to perform controller synthesis, it was necessary to identify relevant parameters. Parameters that were not known were determined experimentally [11]. Appendix provides a table with motor data. The measurement of the parameters showed that the mathematical model given in the form of block diagram in Figure 3 could be further simplified. Firstly, Coulomb friction was neglected because of its minor influence on the system behavior, given its low value [11]. The motor transfer function becomes: 2 2 5 2 ( ) 19.175 ( ) ( ) ( )( ) 2 1 2.849 10 0.019 1 m em m m r r r em me v r v s K K G s U s L s R Js F K K T s T s s s                (6) where em m r em me K K R F K K    gain, r v r em me JL T R F K K    time constant, 2 ( ) r r r r r em me FL JR JL R F K K      relative damping factor. Secondly, motor inductance could also be neglected. This was confirmed by the relatively small value of motor inductance. Therefore, the transfer function of unloaded drive becomes of the first order: ( ) 19.175 ( ) ( ) 1 0.019 1 m m m r m s K G s U s T s s       (7) where 19.175 em m r m em me K K R F K K    , 19 ms,m r m r m em me J R T R F K K    (8) are the gain factor and time constant of the motor. Based on the above analysis, the first order model (7) is further used. Electronic Gearing of Two DC Motor Shafts for Wheg Type Mobile Robot 79 The selection of the measurement period was based on the bandwidth of the closed- loop system. Bandwidth of the motor in a closed loop in the absence of controllers is determined by the equation: 0 m 1 rad 105.263 . 0.5 sT    (9) According to the sampling theorem, the sampling frequency s should be at least twice the bandwidth of the system o [13], which infers that 0 0, 5 29.845 ms. m T Т        (10) This value of the sampling period represents the theoretical maximum. However, more practical reasons require that sampling period be lower than the theoretical maximum allowed. The relatively large sampling period in relation to the real dynamics of the system can have negative impact on the closed-loop system stability [13]. Factors that determine the lower allowable value of sampling period are quality reference tracking, quality control, measured by the error in the system response due to the presence of external disturbance, system sensitivity to parameter variations and noise sensor-induced errors. In real applications, for adequate reference tracking and elimination of disturbance, sampling frequency selection s = (10  20)o is proposed [14]. This results in a preferred range of the sampling period  2.98ms 5.97 ms .T   (11) Given that the introduction of the controllers additionally increases the bandwidth of closed loop system, sampling periods in the speed and position loops, based on (11), were selected to be 1ms and 5ms, respectively. 3. SYSTEM CONTROL STRUCTURE The control structure that provides electronic coupling of two motor shafts is shown in Figure 4. The block diagram shows two independent references, those for speed – Ωr and angle – α. Master drive contains only a speed loop, while slave drive has a cascade structure with a position and a speed loop. On the summing junction in the slave loop, there are two references that are summarized. The first reference is the instantaneous master drive speed. The second one is a speed requirement for changing the shaft angle of slave motor, which can be either positive or negative. PI controller is selected for speed loop and PD controller for positional one. The synthesis and selection of the controller parameters will be explained in more detail in chapters that follow. 80 M. BOŽIĆ, S. ANTIĆ, V. VUJIĈIĆ, M. BJEKIĆ, G. ĐORĐEVIĆ Fig. 4 Master slave loops 3.1. The synthesis of speed loops in Z domain The torque/current loop was implemented in the motor driver. In the block diagrams, the driver is represented only by its transfer function. The transfer function of the driver was obtained by recording the response of motor speed to step excitation reference voltage. Due to the cascade control structure, speed loop can be adjusted independently of the position loop. Figure 5 shows Simulink model of the speed loop. Fig. 5 Simplified model of the speed-loop where: T1 = 1ms is the speed loop sampling period; Kd = 8.463910 3 is the driver constant; Kc = 1 / 30 is the speed translation constant from rpm to impulses per interval (imp/int); 230 5.166 10 d m c K K K K      ; nr(t), n(t) are the reference and the measured speed in imp/int. The transfer function of the motor with the driver in  domain is: / / 1 1 ( ) 1 m m T TsT T T m e K e G z K s sT z e             (12) 1 2 0.002643 ( ) . 0.9488 C G z z z C     (13) The characteristic equation is now: 1 2 ( ) 1 ( ) 1 0 1 P I C z W z K K z C z        (14) i.e. 2 1 2 1 2 [( ) 1] 0 P I P z z K K C C C K C         Electronic Gearing of Two DC Motor Shafts for Wheg Type Mobile Robot 81 Since the characteristic equation of a second-order system for pseudo periodic time response when 0 1   has the form 22 2 ( ) 1 2 cos( 1 ) 0n n T T n W z z e T z e             (15) it follows 2 2 1 nT P C e K C     , 22 1 1 (1 2 cos( 1 ) )n n T T I n K e T e C          by selection different values of the damping factor  and selecting the natural frequency n i.e. the desired bandwidth of the closed-loop system 0 to be n  0 = 314 rad/s (closed loop bandwidth without controller from (9) is 105.263 rad/ s ) different values of KP = 45.5984 and KI = 33.7229 were obtained, and are given in Table 1. Table 1 Parameters of PI regulator for 314 rad n    KP KI 0.3 45.5984 33.7229 0.5 82.5883 31.7538 0.7 115.2122 29.9389 0.9 143.9854 28.2646 Digital PI parameters were also selected with Ziegler-Nichols method. 737.3 Pkr K  , 32 10 s kr T   , 0. 3 .845 31PkrPK K   , 1.2 199 I P kr T K K T     Fig. 6 Motor speed for different methods of digital PI parameters synthesis However, the aim was to achieve the aperiodic velocity response to the given reference with desired dynamic. So, for the regulator parameters synthesis, the method of compensation was applied. Closed loop transfer function of the velocity loop is defined with 2 1 2 ( )( 1) ( ) . ( ( 1) ) ( )( 1) s P I z C z W z C K z K z z C z         (16) 82 M. BOŽIĆ, S. ANTIĆ, V. VUJIĈIĆ, M. BJEKIĆ, G. ĐORĐEVIĆ The parameters of the PI controller were selected in that manner so that one pole was equal 1 2 0.9488z C  . In this way, the transfer function of the velocity loop was reduced to the first-order. Now with the selection of the second pole in order to achieve the aperiodic response of the given time constant 5 msT   , 2 0.8187 T T z e    the parameters of the PI speed regulator were determined. 2 1 2 1 65.0842 P C z z K C    and 1 2 1 2 1 1 3.5121 I z z z z K C      . PI controller was implemented within the LabVIEW code. Its discrete transfer function is: 1( ) 65.0842 3.5121 65.0842 3512.1 1 1 r T zz G z z z       (17) where T1=1ms was the speed loop sampling period. Figure 7 shows the speed responses of Simulink and real model during PI speed control using compensation method. Measurement confirms the achievement of the desired time constant using this method. Response matching of the model and the actual system was obtained. Fig. 7 The speed responses during PI speed control with parameters obtained using compensation method: Simulink and the real system After the adjustment of speed loop parameters, speed loop could be presented as a simple first-order transfer function. Since the open loop transfer function had the first order astatism, the zero steady-state error is provided when the input signal has the step or constant input. Therefore, in order to provide the necessary dynamic characteristics of the response, which is preferably to have the aperiodic character, PD controller was selected. Desired aperiodic time response was obtained with auto tuning option with selection of 0.06 P K  and 0.3 D K  , The transfer function of PD controller in discrete time domain, realized in LabVIEW code, was Electronic Gearing of Two DC Motor Shafts for Wheg Type Mobile Robot 83 1 1 2 0.0015 ( ) 0.06 0.3(1 ) 0.06 (1 ), r G z z z T         (18) where T2 = 5ms was the position loop sampling period. Figure 8 shows angular responses during PD position control. Matching of the model and the real system angular response is apparent. Fig. 8 The angular responses during PD position control: Simulink and the real system 4. EXPERIMENT SETUP AND RESULTS In order to test the proposed control structure, experimental setup was made. The setup is shown in Figure 9. Fig. 9 Experimental setup for realization of electronic gearing [19,20] The main elements of the experimental setup were: 1 – Computer with LabVIEW applications for monitoring, 2 – master motor with encoder resolutions of 500 ppr, 3 – slave motor with encoder resolutions 500 ppr, 4 – real time sbRIO9636 controller, 5 – master DC driver, 6 – slave DC driver, 7 – Dual power 30VDC, 5A. The video showing the experimental setup in operation is available at the link given in [19, 20]. 84 M. BOŽIĆ, S. ANTIĆ, V. VUJIĈIĆ, M. BJEKIĆ, G. ĐORĐEVIĆ Fig. 10 Block diagram of the experimental setup The block diagram of the experimental setup shows that the drivers run in open loop configuration. The speed loop was realized in the FPGA section of the controller, while the position loop was realized in the real-time part of the controller. Figures below show the reference and the obtained values of the input signals. Figure 11 shows angular tracking of the slave for the given master reference speed and angle shift. Fig. 11 Master Wheg (red) angular reference, under constant velocity, followed by slave Wheg (green) The influence of external disturbance on the Wheg drive of the master motor is shown in Figure 12. A satisfactory tracking of the slave drive against low resolution of the encoder and short duration of disturbance can be observed. Electronic Gearing of Two DC Motor Shafts for Wheg Type Mobile Robot 85 Fig. 12 Robustness demonstration on the master motor disturbance To test the accuracy of the system in the range of speeds and angles, whereby angle α was controlled, the speed–angle matrix was formed by measuring. Speed range was examined in the range of 0 to 3000 rpm, with a resolution of 200 rpm. The angles were ranging from 0° to 90° with a resolution of 5°. At higher speeds of the master a higher value of error in the slave was observed. The reasons for the error were noise increase at the encoder due to vibration and problems with fixing the encoder to the motor shaft. The greatest error that occurred was around 2%. Fig. 13 Angle error for range of the angle and speed values 86 M. BOŽIĆ, S. ANTIĆ, V. VUJIĈIĆ, M. BJEKIĆ, G. ĐORĐEVIĆ 5. CONCLUSION A functional master–slave drive structure for electronic gearing was implemented. After the identification of parameters, the mathematical model of the motors was formed. Also, the complete synthesis of the digital control system is shown in the paper. The speed and position controller were designed by using the RT controller FPGA sbRIO9636. The efficiency of the controller was demonstrated and no notable delay in re-aligning the slave Wheg to the master Wheg velocity at given angle shift was observed. This practically means that realignment can be done within one single rotation of dWheg. This allows a robot to rapidly adapt to even small obstacles like stones or wet ground. Future work will be based on enhancement of the system performance by increasing the resolution of the encoder and the realization of all loops on FPGA platform. Further testing of this drive will be carried out in real conditions, on a treadmill belt Figure 14 left and on a rotating test station Figure 14 right. Currently used controller and driver for rapid testing of the algorithm will be replaced with a cheaper microcontroller and a driver, in order to set up a complete system into the mobile robot. Fig. 14 Models of treadmill force plate (left) and rotating test station (right) REFERENCES [1] V. Mhase, K.R. Sudarshan, O. Pardeshi, P.V. Suryawanshi, "Integrated Speed – Position Tracking with Trajectory Generation and Synchronization for 2 – Axis DC Motion Control", International Journal of Engineering Research and Development, vol. 1, Issue 6, pp. 61-66, 2012. [2] F.J. Pkrez-Pinal, C. Ngez, R. Alvarez, I. Cervantes, "Comparison of Multi-motor Synchronization Techniques", Industrial Electronics Society IEEE, pp. 1670-1675, 2004. [3] Y.H. Chang, W.H. Chieng, C.S. Liao, S.L. Jeng, "A novel master switching method for electronic cam control with special reference to multi-axis coordinated trajectory following", Control Engineering Practice, vol. 14, pp. 107-120, 2006. [4] C.S. Liao, S.L. Jeng, W.H. Chieng, "Electronic cam motion generation with special reference to constrained velocity, acceleration, and jerk", ISA Transactions, pp. 427-443, 2004. [5] P. Ciáurriz, I. Díaz, J.J. Gil, "Bimanual drive-by-wire system with haptic feedback", In Proceedings of the IEEE International Symposium on Haptic Audio Visual Environments and Games (HAVE), 2013, pp. 18-23. [6] O. Sename, "Hα control of a Teleoperation Drive-by-Wire System with Communication Time-Delay", In Proceedings of the 14th Mediterranean Conference on Control and Automation, 2006, pp. 1-6. Electronic Gearing of Two DC Motor Shafts for Wheg Type Mobile Robot 87 [7] A.M. Sharma, S. Kumar, A. Kumar, "Implementation of force feedback (haptic) in master slave robotic configuration", Communication, Control and Intelligent Systems (CCIS), pp. 267 – 271, 2015. [8] R. Antonello, R. Oboe, "Force controller tuning for a master-slave system with proximity based haptic feedback", In Proceedings of 40 th Annual Conferfence IECON 2014, IEEE Industrial Electronics Society, 2014, pp. 2774-2779. [9] M. Fremerey, S. Köhring, O. Nassar, M. Schöne, K. Weinmeister, F. Becker, G.S. ĐorĊević, H. Witte, "A Phase-Shifting Double-Wheg-Module for Realization of Wheg-Driven Robots", In Proceedings of the Third International Conference, Living Machines, Milan, Italy, 2014, pp. 97-107. [10] M. Fremerey, G. Djordjevic, H. Witte, "WARMOR: Whegs Adaptation and Reconfiguration of MOdular Robot with Tunable Compliance", In Proceedings of the First International Conference, Living Machines, Barcelona, Spain, 2012, vol. 7375, pp. 345-346. [11] M. Bjekic, S. Antic, A. Milovanovic, "Permanent Magnet DC Motor Friction Measurement and Analysis of Friction’s Impact", Int. Rev. Electr. Eng., vol. 6, no. 5, pp. 2261-2269, 2011 [12] M.J. Stojĉić, "Design of a Digital Positioning System with Sinusoidal Change of the Jerk", Appl. Mech. Mater., vol. 474, pp. 255–260, Jan. 2014 [13] N. S. Nise, Control Systems Engineering, 6th Edition International Student Version, Wiley, 2011, ISBN : 978-0-470-64612-0 [14] K. Ogata, Modern Control Engineering, Fifth edition, Pearson, 2010. [15] M. Stojić, Digitalni sistemi upravljanja. Nauĉna knjiga, Beograd, 1989. [16] Y. Koren, "Cross-coupled biaxial computer control for manufacturing systems", Journal of the Dynamic Systems, Measurement and Control, vol. 102, pp. 265-272, 1980. [17] M.B. Naumović, and M.R. Stojić, "Two Distant Cross-Coupled Positioning Servo Drives: Theory And Experiment", Electronics, University of Banja Luka, vol. 13, no. 2, pp. 25-29, December 2009. [18] L. Feng, Y. Koren, J. Borenstein, Cross-coupling motion controller for mobile robots, IEEE Control Systems, pp. 35-43, December 1993. [19] Electronic gearing of two dc motors, Video file part 2, Laboratory for electrical machines and drives, Facultyof technical sciences Ĉaĉak, University of Kragujevac, accessed 02.2017 [20] https://www.youtube.com/watch?v=DPx8kDuLsz0 [21] Electronic gearing of two dc motors, Video file part 1, Laboratory for electrical machines and drives, Faculty of technical sciences Ĉaĉak, University of Kragujevac, accessed 02.2017 [22] https://www.youtube.com/watch?v=OSbQ7E46Yu4 APPENDIX Table 2 Motor data Parameter Value Nominal voltage 24 V Nominal current 0.9 A Nominal torque 3.810 -2 Nm Nominal speed 3600 rpm Friction torque at no load 0.7 10 -2 Nm No load speed 4200 rpm Nominal power 14.3 W Torque constant 5.14 10 -2 Nm/A Terminal resistance 5.95 Ω Terminal inductance 8.9 mH Gear ratio 6.25 Nominal torque 40 10 -2 Nm Viscous friction 6.5 10 -6 Nm/rad/s Coulumb friction 4.9 10 -6 Nm https://www.youtube.com/watch?v=DPx8kDuLsz0 https://www.youtube.com/watch?v=OSbQ7E46Yu4