Digital Position Control for Analog Servos



Similar documents
Obstacle Avoidance Design for Humanoid Robot Based on Four Infrared Sensors

Current Loop Tuning Procedure. Servo Drive Current Loop Tuning Procedure (intended for Analog input PWM output servo drives) General Procedure AN-015

dspace DSP DS-1104 based State Observer Design for Position Control of DC Servo Motor

CE801: Intelligent Systems and Robotics Lecture 3: Actuators and Localisation. Prof. Dr. Hani Hagras

TwinCAT NC Configuration

Automation System TROVIS 6400 TROVIS 6493 Compact Controller

Technical Guide No High Performance Drives -- speed and torque regulation

Microcontroller-based experiments for a control systems course in electrical engineering technology

EFC Frequency converters

Thermodynamic efficiency of an actuator that provides the mechanical movement for the driven equipments:

LEGO NXT-based Robotic Arm

HITACHI INVERTER SJ/L100/300 SERIES PID CONTROL USERS GUIDE

Servo Info and Centering

THERMAL ANEMOMETRY ELECTRONICS, SOFTWARE AND ACCESSORIES

Unit 1: INTRODUCTION TO ADVANCED ROBOTIC DESIGN & ENGINEERING

Accurate Measurement of the Mains Electricity Frequency

Force/position control of a robotic system for transcranial magnetic stimulation

MSc in Autonomous Robotics Engineering University of York

Radio sensor powered by a mini solar cell the EnOcean STM 110 now functions with even less light

Autonomous Advertising Mobile Robot for Exhibitions, Developed at BMF

FRC WPI Robotics Library Overview

Electric Rotary Actuator - On/Off or programmable control actuator

Autonomous Mobile Robot-I

EDUMECH Mechatronic Instructional Systems. Ball on Beam System

Speed Control Methods of Various Types of Speed Control Motors. Kazuya SHIRAHATA

ECE 492 SENIOR PROJECT 2 MINI SUMO ROBOT

Digital Single Axis Controller

EVAL-UFDC-1/UFDC-1M-16

M.S Ramaiah School of Advanced Studies - Bangalore. On completion of this session, the delegate will understand and be able to appriciate:

Series 6000 Torque measured metal bellow coupling

Series: IDAM Servo Drive E Digital Motor Drive - DMD

Advantages of Auto-tuning for Servo-motors

Using angular speed measurement with Hall effect sensors to observe grinding operation with flexible robot.

E190Q Lecture 5 Autonomous Robot Navigation

STEPPER MOTOR SPEED AND POSITION CONTROL

Self-Balancing Robot Project Proposal Abstract. Strategy. Physical Construction. Spencer Burdette March 9, 2007

Electronic Power Control

Manufacturing Equipment Modeling

Introduction to Electronic Signals

How to Turn an AC Induction Motor Into a DC Motor (A Matter of Perspective) Steve Bowling Application Segments Engineer Microchip Technology, Inc.

Instruction Manual Service Program ULTRA-PROG-IR

ECE 495 Project 3: Shocker Actuator Subsystem and Website Design. Group 1: One Awesome Engineering

Robot Sensors. Outline. The Robot Structure. Robots and Sensors. Henrik I Christensen

Original Research Articles

Active Vibration Isolation of an Unbalanced Machine Spindle

A Review of Security System for Smart Home Applications

Six-servo Robot Arm. DAGU Hi-Tech Electronic Co., LTD Six-servo Robot Arm

Mathematical Modeling and Dynamic Simulation of a Class of Drive Systems with Permanent Magnet Synchronous Motors

Brake module AX5021. Documentation. Please read this document carefully before installing and commissioning the brake module!

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence :

Digital vs. Analogue Control Systems

A 5 Degree Feedback Control Robotic Arm (Haptic Arm)

CIM Computer Integrated Manufacturing

Encoders for Linear Motors in the Electronics Industry

Application Note AN-SERV-006

Stepper motor I/O. Application Note DK Motion Control. A General information on stepper motors

A simple method to determine control valve performance and its impacts on control loop performance

Micro-Step Driving for Stepper Motors: A Case Study

Industrial Automation Training Academy. PLC, HMI & Drives Training Programs Duration: 6 Months (180 ~ 240 Hours)

1115 4G SERIES GOVERNOR ma ANALOGUE DIGITAL SPEED SETTING

LAB 7 MOSFET CHARACTERISTICS AND APPLICATIONS

Transient analysis of integrated solar/diesel hybrid power system using MATLAB Simulink

Section 3. Sensor to ADC Design Example

INTRODUCTION TO SERIAL ARM

Tilt switches N3 / N4... MEMS technology, one or two axis. Use. Options. + long lifetime and highly reliability due to mechanism-free MEMS technology

Computer Controlled Generating Stations Control and Regulation Simulator, with SCADA SCE

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver

Programmable Single-/Dual-/Triple- Tone Gong SAE 800

Moving Magnet Actuator MI FFA series

SPEED CONTROL OF INDUCTION MACHINE WITH REDUCTION IN TORQUE RIPPLE USING ROBUST SPACE-VECTOR MODULATION DTC SCHEME

Outline Servo Control

What Is Regeneration?

Equivalent Spring Stiffness

Degree programme in Automation Engineering

CONVENTIONALLY reduced order models are being

MANUAL FOR RX700 LR and NR

EE 402 RECITATION #13 REPORT

a leap ahead in analog

Development of the Induction Motor for Machine Tool Spindles and Servo Amplifier SANMOTION S

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Hydraulic Control Technology for Wind Turbine Generators

SYNCHRONOUS MACHINES

10. CNC Hardware Basics

Sense it! Connect it! Bus it! Solve it! EncoderS

DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION

GT Sensors Precision Gear Tooth and Encoder Sensors

Drivetech, Inc. Innovations in Motor Control, Drives, and Power Electronics

Linear Motion System: Transport and positioning for demanding applications

Hand Gestures Remote Controlled Robotic Arm

Principles of Adjustable Frequency Drives

Frequently Asked Questions

REMOTE CONTROL AND MONITORING OF AN INDUCTION MOTOR

SOLID MECHANICS TUTORIAL MECHANISMS KINEMATICS - VELOCITY AND ACCELERATION DIAGRAMS

Sensors and Cellphones

PID Control. Chapter 10

ServoOne. Specification. Option 2 - Technology. x 11. x 8 X 8. x 10. x 9. x 7. x 6 TTL Encoder / TTL Encoder simulation

AC/DC Power Supply Reference Design. Advanced SMPS Applications using the dspic DSC SMPS Family

ACS800. Master/Follower Application Guide Supplement to Firmware Manual for ACS800 Standard Application Program

Microcontrollers, Actuators and Sensors in Mobile Robots

Closed-Loop Motion Control Simplifies Non-Destructive Testing

Transcription:

Digital Control for Analog Servos Sven Behnke and Michael Schreiber Humanoid Robots Group, Computer Science Institute University of Freiburg, Georges-Köhler-Allee 52, 79 Freiburg, Germany Email: { behnke schreibe }@informatik.uni-freiburg.de Abstract RC-servos are widely used to build robots with many degrees of freedom, because they are small, inexpensive, and easy to interface. Their main advantage, though, is their good weight-to-torque ratio. Many robots in the RoboCup Humanoid League, for example, almost entirely consist of servos. RC-servos come in two flavors: analog and digital. In analog servos, the internal controller is synchronized to the pulse train that encodes the target position. A typical problem of analog servos is that they suffer from large position tracking errors and variations of the zero-position which are caused by changes in temperature and/or supply voltage. To overcome these problems, digital servos have been introduced in the last years. Digital servos are, however, about twice as expensive as analog servos. Furthermore, all large servos are still analog. We constructed the legs of a 2cm humanoid robot from large analog servos. To improve position control, we modified the servos by replacing in the internal circuit the potentiometer with two equivalent resistors. The potentiometer is now interfaced to a microcontroller that measures position, implements digital position control, and sends motion commands to the analog servo controller. This approach makes it possible to use more advanced control techniques, compared to the original controller. For example, long-term position errors can be avoided by integrating the short-term error. Similar to other intelligent actuators, the parameters of the controller can be changed on a fast time scale, e.g. depending on the gait phase. Furthermore, the digital actuator is able to generate feedback for higher control levels. As the microcontroller is shared between multiple servos and was already in place prior to the modification, the additional hardware needed is negligible. We evaluate the proposed approach using systematic test signals. The results indicate that position control is more precise, more flexible, and more stable than before. I. INTRODUCTION When building robots with many degrees of freedom (DOF), the choice of the actuators is one of the most important design decisions. Several constraints must be observed when selecting actuators. For example, the actuators must be strong enough and fast enough to drive the load at the desired speeds. They should be easy to control. The source of energy must be available onboard the robot. They should be compact, light weight, and robust. Last, but not least, the cost of the actuators is also an important factor. Similar constraints must be met in model airplanes and cars. For these applications, RC-servos have been developed. They consist of a DC-motor, a matched gear, a position sensor, and an electronic controller. RC-servos are small, inexpensive, and easy to interface. The target position is set using a pulse train on a single input line. Because they must fly, many RC-servos have an exceptional weight-to-torque ratio. For these reasons, servos are very popular in many of the RoboCup leagues []. Most of the robots that compete in the Humanoid League, for example, almost entirely consist of servos [2], [3]. RC-servos come in two flavors: analog and digital. In analog servos, the internal controller is synchronized to the 5Hz pulse train that encodes the target position. A typical problem of analog servos is that they suffer from large position tracking errors and variations of the zero-position which are caused by changes in temperature and/or supply voltage. To overcome these problems, several manufacturers introduced digital servos in the last years. They include a microcontroller that runs position control on a faster time scale, e.g. at 3Hz. This makes control more precise. Digital servos are, however, about twice as expensive as analog servos. Furthermore, all large servos are still analog. The largest digital servo on the market is the Hitec HS-5745MG, which weighs 6g and has a rated torque of 8kg cm, insufficient to drive the legs of larger humanoid robots. For this reason, we constructed the legs of our 2cm humanoid robot Fritz from large analog servos [4]. The Tonegawa PS-5 servos [5] have a weight of 29g and a torque of kg cm when supplied with 2V power. 5 servos are used per leg. This paper describes a method to wrap digital position control around such analog servos. We modified the servos by replacing in the internal circuit the potentiometer with two equivalent resistors. The potentiometer is now interfaced to a microcontroller that measures position, implements digital position control, and sends motion commands to the analog servo controller. This approach makes it possible to use more advanced control techniques, compared to the original controller. For example, long-term position errors can be avoided by integrating the short-term error. Similar to other intelligent actuators [6], the parameters of the controller can be changed on a fast time scale, e.g. depending on the gait phase. Furthermore, the digital actuator is able to generate feedback for higher control levels. The remainder of this paper is organized as follows. The next section describes the working principle of analog servos. In Section III, we detail the modifications made to an analog servo in order to implement digital position control. The modified servo is compared to an unmodified servo using systematic test signals. The results are presented in Section IV. The paper concludes with a discussion of the results.

A. Working Principle II. ANALOG SERVOS not driven and the servo does not move. ms pulses yield the maximal negative position error and the motor is driven fully to the left. Symmetrically, 2ms pulses make the motor turn right with maximal speed. The resulting pulse-length-to-speed curve has a sigmoidal shape, as illustrated in Fig. 2(b). Such modified servos have been used in many wheeled robots, like the Palm Pilot Robot Kit, a three-wheeled omnidirectional robot developed at CMU [7], and Hancor, a twowheeled robot developed at FIU [8]. III. DIGITAL POSITION CONTROL Fig.. Working principle of analog RC-servos. See text for details. Pi/2 Pi/4 5 position in speed in % -Pi/4-5 Fig. 3. Digital position control wrapped around analog servo. (a) -Pi/2.25.5.75 pulse length in ms 2 (b) -.25.5.75 pulse length in ms Fig. 2. Effect of the control signal: (a) position control in unmodified servos; (b) speed control in modified servos. The working principle of analog servos is illustrated in Fig.. Three wires supply ground, the operating voltage, and a position target. This target is encoded as train of variablelength pulses with an inter-pulse distance of typically 2ms. The pulse length represents the target position as follows: ms pulse length commands the servo to the leftmost position,.5ms correspond to the middle position, and 2ms to the rightmost position. The linear pulse-length-to-position curve is illustrated in Fig. 2(a). The internal servo controller compares this position target to the shaft position, which is measured using a potentiometer. Depending on the position error, the motor is driven into the direction that minimizes the error. Driving strength depends on the size of the error. B. Modified Servos The range-of-motion of RC-servos is limited to typically ±9. In order to drive the servo shaft with continuous rotation, a simple modification is commonly used. The potentiometer is replaced with two resistors of equal resistance that add up to the total resistance of the potentiometer. From the perspective of the internal controller, the servo shaft now seems to be always in the middle position. This changes the meaning of the pulse train on the control line..5ms pulses yield zero position error. Hence, the motor is 2 We built on the modification described above in order to implement digital position control, as illustrated in Fig. 3. The mechanical connection between servo shaft and the potentiometer is left unchanged, but the potentiometer is electrically disconnected from the internal servo controller. It is interfaced to the A/D converter of a microcontroller. The microcontroller now can read the potentiometer voltage, which corresponds to the shaft position. It compares the actual position with the target position and issues motion commands, encoded as pulse train, to the servo. The pulses are generated with 6Bit accuracy by the timer module of the microcontroller. This digital position control is much more flexible than the internal servo controller. Because the controller is now described in software, it is easy to implement more complex control strategies. For example, a full PID-controller [9] can be realized by observing not only the current position error e(t), but its integral and derivative as well: [ output = K c e(t) + I e(t)dt + D de(t) ]. () dt K c denotes the controller gain. While the integrator part I avoids long-term position error, the differentiator part D can be used to damp overshoots. The parameters of a PID controller can be tuned, e.g., using the method proposed by Ziegler and Nichols []. In contrast to hardware controllers, it is easy to change the parameters of a software controller. This can even be done on a fast time scale, yielding an intelligent actuator that can be configured not only by the target position, but also by control gain, maximal speed, etc. This on-the-fly configuration makes

it possible to adapt the control to changing load conditions, which are typical for bipedal walking. Finally, the microcontroller can easily provide feedback about the current state of its controller to higher control layers. Possible quantities of interest include the current position, the position error, the integrated error, and the issued motion command. Fig. 5 shows for the digital servo the knee position, the integrator, and the controller output over time. One can observe that the integrator accumulates the position errors, which are caused by the additional load. Because the integrator increases the controller output, the position error is corrected. For comparison, Fig. 6 shows the position of the analog knee servo under the same conditions. It is clear that the original controller fails to correct the position error, because it does not include an integrator. It can also be observed that the position of the analog servo drifts over time towards positive angles. This is caused by the temperature increase in the servo... Fig. 4. Humanoid robot Fritz, its left leg, and its left knee. Our humanoid robot Fritz, shown in Fig. 4, has one microcontroller in each leg that is connected via CAN bus and RS232 to a main PC. The PC sends regularly target positions for the individual joints to the microcontroller. The microcontroller reports back about its state. The PC is used to keep track of both targets and state variables. Prior to the modification, each leg-microcontroller generated pulses encoding the target positions for its 5 analog legservos. Now, it implements for each servo a PID controller, as described above. This has the advantage that only two resistors per servo are needed for the modification. Because the pulses for the individual servos are interleaved (one pulse every 2.5ms), the implementation of up to eight controllers does not need more computing power than needed for each individual controller. This interleaving has also the advantage that the peak current consumptions of the servos do not occur simultaneously, but are distributed in time. IV. RESULTS In order to compare the behavior of the implemented digital controller to the behavior of the original analog controller, we made the robot sit on the edge of a table. Both legs were adjusted to be parallel. The thigh of each leg was fixed in horizontal position at the tabletop. The shanks of the legs hung in a vertical position whenever the servos were not powered. For the left knee joint, we implemented digital position control, whereas the right knee was driven by an unmodified analog servo. Because each lower leg weights approx..7kg and its center of mass is approx. 27cm away from the knee axis, holding the lower legs in horizontal position induces a torque of approx. 8.9kg cm. A. Changing Load In the first test, we periodically added a weight of.73kg at a distance of 24.2cm from the knee axis while the lower legs were in horizontal position. This increased the torque by 4.9kg cm to 6.7kg cm. -. 5 - -5 3 2 Integrated Error Fig. 5. Digital servo: Changing load with zero target. The integrator corrects for the position error.. -. Fig. 6. Analog servo: Changing load with zero target. The controller fails to correct the position error. B. Temperature Drift To illustrate this effect more clearly, we moved both servos simultaneously on sinusoidal trajectories. The frequency of the oscillation was Hz and the amplitude was.. We started with a servo temperature of 2 C (room temperature). Due to the movement, the servo temperature increased to approx. 6 C. Fig. 7 shows that the integrator of the digital controller is able to correct for the drift of the zero-speed pulse length. In 2 2 3 3

. contrast, the analog servo, shown in Fig. 8 drifts significantly towards positive knee angles. -.5. -. - -.5.2.4.6.8 -.2 Integrated Error - -5-2 7 6 5 4 3 2-5 5 Fig. 7. Digital servo: Temperature change. The integrator corrects for the drift in the zero-speed pulse length. Fig. 9. Analog servo: Starting position control leads to high mechanical stress and overshoots. -.5 - -.5 6 4 2.2.4.6.8 Fig.. Digital servo: The slowly increasing output limit avoids quick movements and overshoots at startup.. -. -.2 Fig. 8. C. Slow Startup 5 Analog servo: Temperature change. The zero-position drifts. A final experiment demonstrates the change of control parameters on a fast time scale. Because in the moment of switching on position control, the actual and the target positions differ significantly, the analog servo moves to the target position with high speed. This causes high mechanical stress and also leads to overshoots. Fig. 9 shows this behavior for a zero target position. In order to avoid these problems, we implemented a slowly increasing limit for the controller output. As shown in Fig., after starting position control, the digital controller slowly moves the joint towards the target. V. CONCLUSIONS This paper described a method to wrap digital position control around analog RC-servos. We implemented the proposed approach for the large leg-servos of a 2cm humanoid robot. As the microcontroller, which executes digital position control, is shared between multiple servos and was already in place 5 prior to the modification, the additional hardware needed was negligible. Digital control made it possible to use more advanced control techniques, compared to the original controller. For example, long-term position errors were avoided by integrating the short-term error. This was particularly useful to correct for drifts in the zero-position of the analog servo, which are caused by changes in temperature. The interface to the actuator is more flexible now. For example, the parameters of the controller can be changed on a fast time scale. We used this to implement slow startup of the position control in order to avoid mechanical stress and overshoots. Changing control parameters can also be useful when the load conditions change predictably, as in bipedal walking. The third advantage of the proposed digital actuator is that the microcontroller is able to generate feedback about the state of its joint controllers for higher control levels. This feedback can also be used to keep track of the state variables. The combined effect of these improvements made it easier to implement walking for Fritz, using the approach described in []. Fig. shows some frames extracted from a video of the walking robot. Please note that Fritz is now equipped with a 6DOF communication head with movable cameras. Its step frequency is approximately.4hz and it walks with a speed of about cm/s. The video can be downloaded from http://www.nimbro.net.

Fig.. Image sequence extracted from a video showing the walking robot Fritz with communication head. ACKNOWLEDGEMENTS Funding for the project is provided by Deutsche Forschungsgemeinschaft (German Research Foundation, DFG) under grant BE 2556/2- and by Albert-Ludwigs-Universität Freiburg. REFERENCES [] P. Lima, L. Custódio, L. Akin, A. Jacoff, G. Kraetzschmar, N.B. Kiat, O. Obst, T. Röfer, Y. Takahashi, and C. Zhou. Robocup 24 competitions and symposium: A small kick for robots, a giant score for science. AI Magazine, 26(2):36 6, 25. [2] S. Behnke. Humanoid soccer robots. it - Information Technology, 47(5):292 298, 25. [3] Sven Behnke. Playing soccer with humanoid robots. KI Zeitschrift Künstliche Intelligenz, 3/6:5 56, 26. [4] Sven Behnke, Maren Bennewitz, Jürgen Müller, and Michael Schreiber. Nimbro 25 team description. In Humanoid LEague Team Descriptions, RoboCup 25, Osaka, Japan, 25. [5] Tonegawa-Seiko Co., Ltd. Industrial Type Servos. http://www.tonegawa-seiko.com. [6] Robotis. Dynamixel Actuators. www.robotis.com. [7] G. Reshko, M.T. Mason, and I.R. Nourbakhsh. Rapid prototyping of small robots. Technical Report CMU-RI-TR-2-, Robotics Institute, CMU, 22. [8] J. Blanch and S. Tosunoglu. Servo and sensor control on small mobile platforms. ASME Southeastern Region XI Technical Journal, 2(), 23. [9] F. Haugen. PID Control of Dynamic Systems. Tapir Akademisk Forlag, 24. [] J.G. Ziegler and N.B. Nichols. Optimal settings for automatic controllers. Trans. ASME, 64:759 768, 942. [] Sven Behnke. Online trajectory generation for omnidirectional biped walking. In Proceedings of IEEE International Conference on Robotics and Automation (ICRA 6), Orlando, Florida, pages 597 63, 26.