How dual loop control combats chattering and hunting

This article from maxon motor explains how dual loop control is used to fight drivetrain oscillations and compensate for gearbox backlash.

Positioning of mechanical loads with an electrical drive can generally be done with a control system consisting of a PID position controller cascaded with a fast current control loop. In cases when gearheads, spindles or belt systems are used to transmit motor rotation to the load, the imperfections of these transmission elements may negatively affect load position control performance. A typical imperfection for gearheads is backlash - lost motion caused by gaps between teeth of different stages within the gearbox. In situations when long shafts or complex transmission mechanisms are used, the mechanical connection between the motor and the load may have only finite stiffness. In such cases, the aforementioned PID position control scheme may excite resonant oscillations or induce effects known as chattering and hunting, in which the load position never settles at the desired value, but oscillates around it. In the worst case, the control loop may become unstable. In such cases, a more sophisticated control system must be employed.

If very precise load positioning is required, it is recommended to add an encoder at the load side for direct measurement of the load position. Such drive systems therefore contain two encoders:

  • One 'auxiliary' encoder, mounted on the motor shaft, ideally integrated with the motor in a motor combination.
  • One 'main' encoder, mounted on the load to be positioned.

Image
When two encoders are present in the system, both position measurements may be used for feedback control in order to achieve improved performance of the load position control and suppress negative effects caused by the imperfections of the mechanical drivetrain. This type of control, where the feedback from both the motor and the load position is used, is called dual loop control. Such a control structure, which allows for high-performance position control even with an imperfect mechanical drivetrain, is available with maxon's EPOS4 line of positioning controllers for DC and EC motors (see right). To fight mechanical resonance and backlash, the scheme is augmented with a second-order filter and a gain scheduler. The EPOS4 commissioning software "EPOS Studio" offers a wizard for full automatic tuning of this complex control algorithm. In addition, it is possible to export Bode diagrams of the drivetrain transfer function that may be used for expert analysis or manual calculation of optimal control parameters.

Control architecture

In the diagram below you can see the cascaded structure implemented in the EPOS4 for dual loop position control. Of the three nested feedback loops, the innermost loop regulates the motor current via field-oriented control (FOC), while the second innermost (auxiliary) loop regulates the motor speed based on measurements from the auxiliary encoder, and the outermost (main) loop regulates the load position based on the measurements from the main encoder.

Image

A more detailed view of the EPOS4 dual loop controller structure is shown in the diagram below. The main loop consists of a proportional (P) controller, a gain scheduler acting on the proportional controller's gain, and a second-order filter (main loop filter) acting on the outputs of the main loop. The inputs of the main loop controller are the reference load position, velocity and acceleration, coming from a path planner, and the load position measured by the main sensor. The main loop controller is executed at 833Hz, one-third of the auxiliary loop's execution frequency of 2.5kHz. The auxiliary loop consists of a proportional-integral (PI) controller with feedforward (FF) and an observer estimating the motor speed from the position data of the auxiliary sensor and the current measurements.

Image

Gain scheduler

The main mechanism that the EPOS4 dual loop controller uses to eliminate chattering and hunting caused by backlash is the gain scheduler. In order for the controller to be aggressive and deliver tight position reference tracking, the P-gain of the main loop controller should be high. However, when the controller is too aggressive, the position may never exactly reach the desired value, but start oscillating around it. This can be avoided by reducing the aggressiveness of the controller. The gain scheduler reconciles these conflicting requirements by making the main loop controller's P-gain dependent on the load position tracking error. When the error is large, the P-gain is also large, making the controller aggressive, which leads to a quick reduction of the tracking error. As the tracking error is reduced, so is the P-gain, such that when the load position approaches the target, the controller is not too aggressive and does not cause oscillations, despite the presence of backlash in the drivetrain.

Main loop filter

When the connection between the motor and the load is not stiff enough, the dual loop controller has to eliminate oscillations induced in the drivetrain. These oscillations happen at a fixed frequency, called the resonant frequency, that depends on the elasticity, damping and geometry of the coupling. Even a small excitation of the drivetrain at this frequency may cause significant amplification of oscillations. In order to prevent this, the EPOS4 dual loop controller uses a second-order notch filter. The notch filter is designed to suppress the resonant frequency and the frequency range around it in the control signal coming from the controller. This prevents harmonic oscillations from being generated in the drivetrain.

Auto-tuning procedure

To facilitate commissioning, maxon provides the EPOS Studio commissioning software with an auto-tuning wizard for calculation and validation of the dual loop controller. The auto-tuning procedure consists of two fully automatic experiments:

  • The first experiment causes motor position oscillations that serve to determine the inertia and friction seen by the motor, as well as the motor torque constant. Based on the identified parameters, the auxiliary loop controller and observer parameters are calculated.
  • The second experiment is used to calculate the parameters of the main loop controller including the notch filter. In this experiment, a pseudo-random binary sequence (PRBS) signal is used to excite the plant. PRBS signals have the useful property that they are periodic, such that data from different periods can be averaged, and the magnitude of their Fourier transform is flat over the whole spectrum, which leads to good transfer function identification. Based on the resulting input-output data, the transfer function of the system that the main loop controller should regulate is identified. EPOS Studio provides a Bode plot of this transfer function. A typical plot is shown below. This plot provides valuable information to the control practitioner. It shows if there is a resonant peak and its frequency, which may be used to deduce control limitations. The magnitude and phase data corresponding to the Bode plot can be exported, which can be used for further analysis or controller synthesis. Based on the identified transfer function, the parameters of the main loop controller, gain scheduler and the notch filter are automatically calculated.

Image

EPOS Studio also enables part or all of the dual loop controller parameters to be set manually, if further optimisation of control performance is required.

Performance compared to single loop controller

In order to illustrate the advantages of using the EPOS4 dual loop controller, its performance is compared to that of the EPOS4 single loop PID position controller. The latter uses the encoder on the load for control and the encoder on the motor for commutation only.

Tests are done on a mechanical system with two different couplings between motor and load:

  • The first coupling is a gear connection suffering significant backlash.
  • The second coupling consists of a soft elastic spring exhibiting an underdamped resonance.

Image

The load consists of a motor that can be commanded to apply a disturbance torque. The two EPOS4 controllers connected to the two motors are commanded via EPOS Studio. Experimental data is recorded with EPOS Studio's Data Recorder tool.

In both experiments, the test motor is an EC-4pole 30 motor from maxon combined with an encoder with 500 counts per turn (cpt) and a maxon GP 32 HP gearbox with 14:1 reduction. A maxon EC-max 40 motor with a 7500 cpt encoder serves as a load.

To evaluate reference tracking performance, a reference load position trajectory with trapezoidal speed profile is used. To ensure identical initial conditions for single and dual loop control, the load is initially positioned such that the gear connection is engaged in the opposite direction with respect to the target position. In this way, the controller must take up the slack due to backlash before moving the load towards the target position.

The figure below shows the load position profile and the tracking error during the experiment with single and dual loop control. As the figure shows, because of the slack due to backlash, for the first few milliseconds the error for single and dual loop grows equally. However, dual loop control is faster at overcoming the slack and exhibits an overall smaller tracking error.

Image

The figure below shows the load position profile and the tracking error during the experiment with single and dual loop control and the setup with elasticity. With dual loop control, except for a small overshoot, the mechanical system does not resonate and the peak tracking error is about one-sixth of that achieved with single loop control.

Image

Conclusion

The dual loop control architecture of the maxon EPOS4 positioning controller has been presented. This architecture employs encoders on both motor and load to achieve better performance than when only one encoder is available. The scheme also includes a gain scheduler, to avoid chattering and hunting, and a second-order filter, which can be designed as a notch filter to avoid exciting mechanical resonances.

The EPOS Studio software offers a powerful collection of wizards and tools, including an auto-tuning feature for the dual loop controller. This feature can be used to completely and automatically parametrise the dual loop controller, but also to gather important information about the mechanical drivetrain that can be used to further optimise control performance by manual adjustment of the parameters.

The dual loop position controller has been compared to a single loop position controller in terms of reference tracking performance. Overall, it is found that the dual loop architecture allows tighter control of the load position in situations when the drivetrain is elastic or has significant backlash.

About the authors

Federico Percacci received a BS degree in automation engineering from Politecnico of Milan, Milan, Italy, in 2014 and an MS degree in robotics from ETH Zurich, Zurich, Switzerland, in 2016. Since 2016 he has been working with maxon motor ag, Sachseln, Switzerland. His research interests include modelling and control of electric motors.

Marko Tanaskovic was born in Valjevo, Serbia, in 1986. He received a BSc degree with honours from the University of Belgrade, Serbia in 2009, an MSc degree with honours from ETH Zurich in 2011 and a PhD degree from ETH Zurich in 2015, all in Electrical Engineering. During 2011 he worked for ABB Switzerland, Corporate Research, in the area of electronic component modelling. Since 2015 he has been working with maxon motor ag as a motor control development engineer. His research interests include adaptive and learning control schemes, model predictive control and sensorless motor control. He has been the recipient of the scholarship for best Serbian students studying abroad given by the Government of Serbia for several years.

Chen Zhao was born in Liaoning, China, in 1979. He received a BSc degree from the University of Shanghai for Science and Technology, China, in 2001, a Dipl degree and PhD in mechanical engineering from the Technical University of Munich, Germany, in 2006 and 2010, respectively. He has spent two years at Woodward Switzerland AG developing megawatt-class converter system. Since 2011, he has been a project manager with maxon motor ag in Switzerland. His research interests include control, modelling and simulation of electrical drive systems, robotics and electromagnetic systems.

Patrik Gnos was born in Switzerland in 1969. He received an electrical engineering diploma from the Lucerne University of Applied Science in 1994. Since 1994 he has been working with maxon motor ag. In 2013 he became Head of Corporate Centre Motion Control and in 2019 a Member of the Executive Board.

maxon

Maxon House
Hogwood Lane
Finchampstead
RG40 4QW
UNITED KINGDOM

+44 (0)118 9733337

sales.uk@maxongroup.com

www.maxongroup.co.uk

More from maxon

Drive systems enhance rehabilitation technology

Posted 4 days ago

Keeping the motors cool in medical hand tools

Posted 1 month ago

Discover maxon’s new online trade fair

Posted 1 month ago

New multi-axis controller for dynamic positioning tasks

Posted 1 month ago

maxon motor sets more records

Posted 2 months ago

maxon develops UAV drive with startup Flybotix

Posted 3 months ago

A robot that fights fires - and Coronavirus too

Posted 5 months ago

A matter of some gravity: maxon drives fly to Mars

Posted 6 months ago

DC motors lead the way in "˜Smart' farming

Posted 6 months ago

New 2020/2021 catalogue now available from maxon

Posted 7 months ago

Aerospace drive solutions video

Posted 7 months ago

Miniature drives suit medical robots and multi-axis systems

Posted 8 months ago

maxon launches new brushless motors, flat motors and gearboxes

Posted 8 months ago

New range of subsea pressure compensated actuators

Posted 9 months ago

Maxon launches Ultra Performance micro gearheads

Posted 10 months ago

Motor selection for automated guided vehicles

Posted 10 months ago

A year of maxon supporting Emirates Team New Zealand

Posted 10 months ago

maxon is flying to the Sun

Posted 11 months ago

maxon introduces miniaturised positioning controller

Posted 11 months ago

Amputee bonds with son thanks to 3D printed hand

Posted 11 months ago

Hub drives - the next step for modular robots

Posted 11 months ago

maxon DC motors combined with 3D printing in bionic hand

Posted 1 year ago

maxon products - designed by engineers for engineers

Posted 1 year ago

maxon appoints new sales engineer in Ireland

Posted 1 year ago

maxon now supplying ZUB Motion Control master controllers

Posted 1 year ago

Formula E driver Sébastien Buemi becomes ambassador for maxon

Posted 1 year ago

How to configure a maxon EPOS4 positioning controller

Posted 1 year ago

maxon publishes new catalogue for 2019/2020

Posted 1 year ago

Small precision motors: standard or customised?

Posted 1 year ago

maxon products perform crucial roles in robotic keyhole surgery

Posted 1 year ago

Motor controllers: options for modification and customisation

Posted 1 year ago

maxon expands range of EtherCAT motion controllers

Posted 1 year ago

maxon publishes new edition of 'driven' magazine

Posted 2 years ago

NASA specifies maxon DC motors for Martian drone

Posted 2 years ago

Why specify frameless motors? What are the benefits?

Posted 2 years ago

Maxon motors in new Halléoojamaflipaphone musical instrument

Posted 2 years ago

Step-by-step guide to configuring a maxon ESCON speed controller

Posted 2 years ago

Special gearheads benefit medical and robotic projects

Posted 2 years ago

Free training courses at maxon motor or your own premises

Posted 2 years ago

Miniature motors for medical applications

Posted 2 years ago

Robot applications for maxon motors and gearheads

Posted 2 years ago

New high-precision positioning encoder from maxon motor

Posted 2 years ago

Bodo Fütterer: An exceptionally talented engineer and innovator

Posted 2 years ago

maxon motors and gearheads chosen for endurance race car engines

Posted 2 years ago

maxon motor aids environmental monitoring

Posted 3 years ago

Cost-effective brushless EC-i 30 DC motor from maxon motor

Posted 3 years ago

Why DC motors have brushes

Posted 3 years ago

driven magazine shows how startups are changing the world

Posted 3 years ago

maxon now offers BLDC motors as frameless kits

Posted 3 years ago

Why do DC motors fail? How to specify to prevent failure

Posted 3 years ago

maxon motor group increases revenues

Posted 3 years ago

The EC-i 52 DC motor by maxon motor

Posted 3 years ago

How to choose between brushed and brushless DC motors

Posted 3 years ago

How to maximise the efficiency of drive system components

Posted 3 years ago

maxon motor builds new Innovation Centre

Posted 3 years ago

Motion and automation controllers explained

Posted 3 years ago

Configure high-speed drives from your sofa

Posted 4 years ago

maxon drives help people to walk again

Posted 4 years ago

Why a new generation of positioning controllers is needed

Posted 4 years ago

World's first modular robot system uses maxon motor

Posted 4 years ago

EPOS4 positioning controller from maxon motor

Posted 4 years ago

Technology for uncharted worlds: learn more in driven magazine

Posted 4 years ago

Miniature motors replace pneumatics in robotic hand

Posted 4 years ago

Deep brain surgery inspired by wasps

Posted 4 years ago

Compact underwater DC drives

Posted 4 years ago

Maxon brushless DC motor: fast, sterilisable and configurable

Posted 5 years ago

maxon's low-noise brushed DC motor makes music

Posted 5 years ago

Brushless DC motor for demanding operating room applications

Posted 5 years ago

Motor controllers: build or buy?

Posted 5 years ago

High-performance drive in a small package from maxon

Posted 5 years ago

The importance of inspecting sutures

Posted 5 years ago

Compact brushless DC motor selected for medical instrument

Posted 5 years ago

Why use a DC motor controller?

Posted 5 years ago

Air-sampling pump using maxon DC motor protects workers' health

Posted 5 years ago

The tool of choice for compounding pharmacists

Posted 5 years ago

Snake arm robots and Maxon Motor UK

Posted 5 years ago

Motor configuration tool used to source low-noise DC motor

Posted 5 years ago

New miniature rescue robot for Warwick Mobile Robotics

Posted 5 years ago

Gearhead elasticity and its effect on positioning accuracy

Posted 5 years ago

Positioning controllers now support CANopen interfaces

Posted 6 years ago

Drilling to new limits in Antarctica with maxon motors

Posted 6 years ago

New, configurable DC motors and gearheads from Maxon Motor

Posted 6 years ago

ESCON Module 50/4 EC-S servo motor controller

Posted 6 years ago

Intelligent prosthetics use Maxon brushed DC motors

Posted 6 years ago

Orbital welding bug uses DCX motors

Posted 6 years ago

New faster MAXPOS 50/5 EtherCAT positioning motor controller

Posted 6 years ago

Configurable DC motors, gearheads and encoders from Maxon

Posted 6 years ago

Circulatory support without surgery for heart failure patients

Posted 6 years ago

Turning food waste into nano-fibres

Posted 6 years ago

Maxon Motor takes part in chase to catch up with a comet

Posted 6 years ago

Increasing performance and reducing costs with CIM

Posted 6 years ago

Compact servo motors with inductive encoders from Maxon

Posted 6 years ago

BLDC motor EC 19 and planetary gearhead GP 19 M

Posted 6 years ago

Win an Apple iPad 2 and celebrate Maxon's 50th anniversary

Posted 9 years ago

Maxon motor improves popular motors and gearheads

Posted 9 years ago

Solar-powered robot uses energy-efficient DC motors

Posted 9 years ago

Flat motor and gearhead used in dual-purpose table

Posted 9 years ago

Compact positioning controllers are CANopen-compatible

Posted 9 years ago

Humanoid robot utilises 80 maxon DC servo motors

Posted 9 years ago

New heavy-duty compact motors for use in high temperatures

Posted 9 years ago

High-precision EPOS2 70/10 controller is energy-efficient

Posted 9 years ago

Featured photo

Posted 11 years ago

Grand Prix cars benefit from motorised wing flaps

Posted 11 years ago

Maxon motors selected for F1 wing actuators

Posted 11 years ago

Maxon Motor achieves ISO 13485 quality standard

Posted 11 years ago

Extended range of electronically commutated DC motors

Posted 12 years ago

Maxon wins award for metal injection moulding (MIM)

Posted 12 years ago

Compact drive incorporates motor, sensor and controller

Posted 12 years ago

See Maxon Motor at Farnborough Airshow 2008

Posted 12 years ago

Ceramics provide benefits for mechanical components

Posted 12 years ago

New sizes of electronically commutated micro motors

Posted 13 years ago

Update on CIM and MIM components

Posted 13 years ago

Electronic commutation supersedes brushed motors

Posted 13 years ago

Book explains principles and applications of magnetism

Posted 13 years ago

Easy speed control for brushless DC motors

Posted 13 years ago

Koax-Drive KD 32 offers high torque and quiet running

Posted 13 years ago

Maxon catalogue describes customised design service

Posted 13 years ago

New Maxon motor catalogue has over 300 pages

Posted 13 years ago

Compact motors offer high dynamism and high torque

Posted 13 years ago

How to design high-precision microdrives

Posted 14 years ago

Maxon offers EC micromotors in diameters of 6 to 60mm

Posted 14 years ago

More technical articles
2 days ago
Certified Machinery Safety Expert course on 18th January
In conjunction with TÜV NORD, Pilz Automation UK is hosting its first CMSE Course of 2021. It starts on 18th January and lasts for four days
2 days ago
Improving communication with (and between) machines
Lenze has published a White Paper discussing PackML, a programming standard defined by OMAC, the Organisation for Machine Automation & Control. Here, Lenze's Marc Vissers provides machine builders with an insight into the paper
2 days ago
Danfoss buys Artemis Intelligent Power
Danfoss says it will allow them to begin the global commercial rollout of its Digital Displacement® pump technology, a disruptive low-carbon opportunity with applications in the industrial and off-highway markets
3 days ago
Quarter turn fastener that still turns heads
Automotive manufacturers are gradually making the transition from solely manufacturing vehicles to taking on more responsibility for the performance of a vehicle over its life cycle. As a result, OEMs are increasingly looking for ways to lower installation costs, and facilitate quick repeatable access to critical vehicle components in order to enable faster service calls
3 days ago
Wave spring or coil spring?
Simon Ward is Technical Manager at Uckfield-based fastener specialists TFC. Here he offers a machine designers a comparison between wave springs and round wire coil springs 
3 days ago
New course: Safety Design Incorporating EN ISO 13849-1/EN 62061
Pilz Automation UK says that this training course is designed to enable delegates to develop a greater understanding of the processes and standards related to safety control system specification, design and validation
4 days ago
Intelliconnect moves to larger factory as sales grow
Intelliconnect (Europe) Ltd has moved to a larger facility at the Corby Innovation Hub
4 days ago
ABB industrial robots get Wizard programming
ABB is expanding it Wizard easy programming tool to encompass its industrial robot range, saying that it makes robots easier to install, programme and operate without specialised training
4 days ago
New Siemens Sivacon S8 Power Partner appointed
Nottingham-based manufacturer of bespoke LV control systems Blackburn Starling has become a Siemens Sivacon S8 Power Partner
4 days ago
Dynamic linear motors provide flexible, modular design
Backed by its expertise in the development of rotary servomotors, Beckhoff has added an interesting product to its drive technology portfolio