Digital Control of Electrical Drives

Power Electronics and Power Systems Series Editors: M. A. Pai Alex Stankovic University of Illinois at Urbana-Champaign Northeastern University Urbana, Illinois Boston, Massachusetts

Digital Control of Electrical Drives Slobodan N. Vukosavić ISBN 978-0-387-48598-0

Three-Phase Diode Rectifiers with Low Harmonics Predrag Pejović ISBN 978-0-387-29310-3

Computational Techniques for Voltage Stability Assessment and Control Venkataramana Ajjarapu ISBN 978-0-387-26080-8

Real-Time Stability in Power Systems: Techniques for Early Detection of the Risk of Blackout Savu C. Savulesco, ed. ISBN 978-0-387-25626-9

Robust Control in Power Systems Bikash Pal and Balarko Chaudhuri ISBN 978-0-387-25949-9

Applied Mathematics for Restructured Electric Power Systems: Optimization, Control, and Computational Intelligence Joe H. Chow, Felix F. Wu, and James A. Momoh, eds. ISBN 978-0-387-23470-0

HVDC and FACTS Controllers: Applications of Static Converters in Power Systems Vijay K. Sood ISBN 978-1-4020-7890-3

Power Quality Enhancement Using Custom Power Devices Arindam Ghosh and Gerard Ledwich ISBN 978-1-4020-7180-5

Computational Methods for Large Sparse Power Systems Analysis: An Object Oriented Approach S.A. Soman, S.A. Khaparde, and Shubha Pandit ISBN 978-0-7923-7591-3

Operation of Restructured Power Systems Kankar Bhattacharya, Math H.J. Bollen, Jaap E. Daalder ISBN 978-0-7923-7397-1

Transient Stability of Power Systems: A Unified Approach to Assessment and Control Mania Pavella, Damien Ernst, and Daniel Ruiz-Vega ISBN 978-0-7923-7963-8

Maintenance Scheduling in Restructured Power Systems M. Shahidehpour and M. Marwali ISBN 978-0-7923-7872-3 Continued after index

Digital Control of Electrical Drives

Slobodan N. Vukosavić The University of Belgrade

Slobodan N. Vukosavić University of Belgrade Faculty of Electrical Engineering Bulevar Kralja Aleksandra 73 11120 Belgrade Serbia

Series Editors: M. A. Pai, Professor Emeritus Dept. of Electrical and Engineering University of Illinois at Urbana-Champaign Urbana, IL 61801

Alex M. Stankovic, Professor Dept. of Electrical & Computer Engineering, 440DA Northeastern University 360 Huntington Ave. Boston, MA 02115

Library of Congress Control Number: 2006935130

ISBN 978-0-387-25985-7 e-ISBN 978-0-387-48598-0

Printed on acid-free paper.

© 2007 Springer Science+Business Media, LLC All rights reserved. This work may not be translated or copied in whole or in part without the written permission of the publisher (Springer Science+Business Media, LLC, 233 Spring Street, New York, NY 10013, USA), except for brief excerpts in connection with reviews or scholarly analysis. Use in connection with any form of information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now know or hereafter developed is forbidden. The use in this publication of trade names, trademarks, service marks and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.

9 8 7 6 5 4 3 2 1 springer.com

Contents

Preface ...... ix

1 Speed Control...... 1 1.1 Basic structure of the speed-controlled system...... 1 Problems ...... 5

2 Basic Structure of the Speed Controller ...... 7 2.1 Proportional control action ...... 7 2.1.1 Open-loop and closed-loop transfer functions...... 8 2.1.2 Load rejection of the proportional speed controller ...... 12 2.1.3 Proportional speed controller with variable reference...... 13 2.1.4 Proportional speed controller with frictional load...... 15 2.2 The speed controller with proportional and integral action...... 16 2.2.1 Transfer functions of the system with a PI controller...... 17 2.2.2 Load rejection with the PI speed controller...... 18 2.2.3 Step response with the PI speed controller...... 19 2.2.4 The PI speed controller with relocated proportional action...... 26 2.2.5 Parameter setting and the closed-loop bandwidth ...... 28 2.2.6 Variable reference tracking ...... 30 2.3 Suppression of load disturbances and tracking errors ...... 31 2.3.1 The proper controller structure for the given reference profile...... 32 2.3.2 Internal Model Principle (IMP) ...... 37 2.4 Feedforward compensation...... 40 Problems ...... 47

3 Parameter Setting of Analog Speed Controllers ...... 51 3.1 Delays in torque actuation ...... 51 3.1.1 The DC drive power amplifiers...... 52 3.1.2 Current controllers...... 56 3.1.3 Torque actuation in voltage-controlled DC drives ...... 58 vi Contents

3.2 The impact of secondary dynamics on speed-controlled DC drives...... 59 3.3 Double ratios and the absolute value optimum...... 61 3.4 Double ratios with proportional speed controllers...... 66 3.5 Tuning of the PI controller according to double ratios...... 69 3.6 Symmetrical optimum ...... 72 Problems...... 77

4 Digital Speed Control ...... 79 4.1 Discrete-time implementation of speed controllers...... 80 4.2 Analysis of the system with a PI discrete-time speed controller ....86 4.2.1 The system with an idealized torque actuator and inertial load ...... 87 4.2.2 The z-transform and the pulse transfer function...... 91 4.2.3 The transfer function of the mechanical subsystem ...... 96 4.2.4 The transfer function of the speed-measuring subsystem...... 98 4.3 High-frequency disturbances and the sampling process...... 100 4.4 The closed-loop system pulse transfer function ...... 103 4.5 Closed-loop poles and the effects of closed-loop zeros...... 108 4.6 Relocation of proportional gain...... 112 4.7 Parameter setting of discrete-time speed controllers ...... 113 4.7.1 Strictly aperiodic response...... 113 4.7.2 Formulation of criterion function ...... 117 4.7.3 Calculation of the optimized values for normalized gains ....119 4.8 Performance evaluation by means of computer simulation...... 124 4.9 Response to large disturbances and the wind-up phenomenon...... 129 4.10 Anti-Wind-Up mechanism ...... 135 4.11 Experimental verification of the discrete-time speed controller...... 140 Problems...... 143

5 Digital Position Control...... 147 5.1 The role and desired performance of single-axis positioners ...... 148 5.2 The pulse transfer function of the control object...... 151 5.3 The structure of position controllers...... 157 5.3.1 Derivative action in position controllers ...... 157 5.3.2 Relocation of derivative action into the path ...... 160 5.3.3 The position controller with a minor speed loop...... 161 5.3.4 Stiffness of the position-controlled system ...... 163 Contents vii

5.4 The discrete-time PD position controller...... 165 5.5 Optimized parameter setting...... 174 5.6 Computer simulation of the system with a PD controller...... 178 5.7 Operation of the PD position controller with large disturbances ...... 181 5.8 The nonlinear position controller...... 184 5.8.1 The speed-limit dependence on the remaining path ...... 184 5.8.2 Enhancing the PD controller...... 185 5.8.3 The error of the minor-loop speed controller ...... 190 5.9 Computer simulation of the system with a nonlinear PD controller...... 191 5.10 Experimental evaluation of performances ...... 195 Problems ...... 203

6 The Position Controller with Integral Action ...... 205 6.1 The operation in linear mode and the pulse transfer functions ...... 208 6.2 Parameter setting of PID position controllers...... 214 6.3 The step response and bandwidth of the PD and PID controller ..218 6.4 Computer simulation of the input step and load step response.....220 6.5 Large step response with a linear PID position controller...... 225 6.6 The nonlinear PID position controller ...... 230 6.6.1 The maximum speed in linear operating mode...... 232 6.6.2 Enhancing the PID controller with nonlinear action ...... 235 6.6.3 Evaluation of the nonlinear PID controller...... 240 6.7 Experimental verification of the nonlinear PID controller ...... 246 Problems ...... 250

7 Trajectory Generation and Tracking...... 253 7.1 Tracking of ramp profiles with the PID position controller ...... 253 7.1.1 The steady-state error in tracking the ramp profile ...... 254 7.2 Computer simulation of the ramp-tracking PID controller...... 257 7.3 Generation of reference profiles ...... 264 7.3.1 Coordinated motion in multiaxis systems ...... 265 7.3.2 Trajectories with trapezoidal speed change...... 268 7.3.3 Abrupt torque changes and mechanical resonance problems ...... 269 7.3.4 ‘S’ curves...... 270 7.4 Spline interpolation of coarse reference profiles ...... 273 Problems ...... 279 viii Contents

8 Torsional Oscillations and the Antiresonant Controller...... 281 8.1 Control object with mechanical resonance...... 282 8.2 Closed-loop response of the system with torsional resonance .....286 8.3 The ratio between the motor and load inertia ...... 291 8.4 Active resonance compensation methods...... 294 8.5 Passive resonance compensation methods...... 295 8.6 Series antiresonant compensator with a notch filter ...... 296 8.6.1 The notch filter attenuation and width...... 297 8.6.2 Effects of the notch filter on the closed-loop poles and zeros ...... 300 8.6.3 Implementation aspects of the notch antiresonant filters ...... 305 8.7 Series antiresonant compensator with the FIR filter...... 308 8.7.1 IIR and FIR filters ...... 309 8.7.2 FIR antiresonant compensator...... 310 8.7.3 Implementation aspects of FIR antiresonant compensators ...... 313 8.8 Computer simulation of antiresonant compensators...... 314 8.9 Experimental evaluation ...... 319 8.10 Sustained torsional oscillations...... 325 Problems...... 325

Appendices...... 329 A C-code for the PD position controller...... 329 B ASM-code for the PID position controller...... 333 C Time functions and their Laplace and z-transforms...... 337 D Properties of the Laplace transform...... 339 E Properties of the z-transform ...... 341 F Relevant variables and their units...... 343

References...... 345

Index ...... 347

Preface

This book is intended for engineering students in the final years of under- graduate studies. It is also recommended for graduate students and engi- neers aspiring to work in intelligent motion control and digital control of electrical drives. By providing a bridge between and practi- cal hardware aspects, programming issues, and application-specific prob- lems, the book is intended to help the reader acquire practical skills and become updated regarding concrete problems in the field. Basic engineering principles are used to derive the controller structure in an intuitive manner, so designs are easy to recall, repeat and extend. The book prepares the reader to understand the key elements of motion control systems; to analyze and design the structure of discrete-time speed and po- sition controllers; to set adjustable feedback parameters according to design criteria; to identify, evaluate, and compare closed-loop performances; to design and implement nonlinear control actions; to devise and apply an- tiresonant compensators; and to generate speed reference profiles and posi- tion trajectories for use within motion-control systems. The Matlab tools are used extensively through various chapters to help the reader master the phases of design, tuning, simulation, and evaluation of speed and position controllers. Key motion-control topics, such as nonlinear position control, control of mechanical structures with flexible couplings, compliance and mechanical resonance problems, and antiresonant solutions, are introduced in a system- atic manner. A set of exercises, problems, design tasks, and computer simu- lations follows each chapter, enabling the reader to foresee the effects of various control solutions and actions on the overall behavior of motion- controlled systems. In addition to control issues, the book contains an ex- tended introduction to the field of trajectory generation and profiling. In the closing chapters, the reader is given an overview of coding the control algorithms on a DSP platform. The algorithm coding examples are in- cluded, given in both assembly language and C, designed for fixed point DSP platforms. They offer a closer look into the characteristics and pefor- mance of contemporary DSP cores and give the reader an overview of the present performance limits of digital motion controllers. Most of the con- trol solutions presented in the book are supported by experimental evidence x Preface obtained on test rigs equipped with typical brushless DC and AC servo mo- tors, contemporary servoamplifiers, and suitable mechanical subsystems.

Readership

This book is primarily suited for engineering courses in the third and fourth year of undergraduate studies. It is also aimed at graduate students who want to deepen their understanding of electrical drives and drive control; and at practicing engineers designing and using motion-control systems and digital controlled electrical drives. The book provides a bridge between control theory, practical hardware aspects, programming issues, and appli- cation specific problems. The subject, related problems, and solutions require interdisciplinary understanding among control, electrical, and me- chanical engineers.

Prerequisites

Required background includes fundamental engineering subjects typically covered during the first and second years of undergraduate engineering curricula. Prerequisites include basics and common principles of , power conversion, and electrical machines, as taught in under- graduate introductory courses. A distinctive feature of the book is that it does not require that the reader be proficient in control theory, electrical drives, and power electronics. The theoretical fundamentals are reviewed and included in the book to the extent necessary for understanding analysis and design flow. Most chapters include a brief theoretical introduction. Wherever possible, the theory is reviewed with reference to practical ex- amples. Limited reader preparation in the use of the Laplace transform and z-transform can be partially compensated for by adequate skills in the use of relevant computer tools.

Objectives

• Understanding of basic elements and of key control objectives in motion-control systems. Analysis, design, and evaluation of discrete- time speed and position controllers. Parameter-setting procedures driven by design criteria. Reader’s ability to design, evaluate, and compare closed-loop performances, to synthesize and implement Preface xi

nonlinear control actions, to devise and apply antiresonant compensa- tors, and to generate speed reference profiles and position trajectories for use within motion-control systems. • Understanding feedback signal acquisition and sampling process. Dis- tinguishing between the high-frequency range of unmodeled dynam- ics and the bandwidth of interest. Recognizing noise and quantization problems. Designing sampling circuits and filters. Selecting the sam- pling frequency. • Using the Laplace and z-transforms to convert differential and differ- ence equations into their algebraic form. Dealing with the complex representation of signals and transfer functions in the analysis, design, and evaluation phases. Relating the response character and bandwidth to the placement of the closed-loop poles and zeros. • Designing the control structures to suppress relevant load distur- bances and to eliminate the tracking error for given reference profiles. Formulating performance criteria and deriving optimized feedback. Understanding the nonlinearities of the system and designing control countermeasures, aimed at preserving the stability and improving re- sponse. Analyzing and evaluating the mechanical resonance and tor- sional oscillations. Designing and implementing the antiresonant compensators. Specifying speed and position trajectories. Generating and interpolating reference profiles. • Mastering the phases of design, tuning, simulation, and evaluation of speed and position controllers, assisted by Matlab and Simulink tools. Gaining insight into coding the control solutions on contemporary fixed point DSP platforms in assembly language and in C. Apprecia- tion of the performance limitations of DSP cores and of digital motion controllers.

Field of application

This book offers a comprehensive summary of discrete-time speed and po- sition controllers. Control of the speed of a moving part or tool and driving its position along predefined trajectories are the fundamental elements of motion-controlled systems and an integral part of many manufacturing pro- cesses. The skills acquired in this book will prepare the reader to design the structure of motion controllers, set adjustable feedback parameters ac- cording to design criteria, design nonlinear control actions and antiresonant xii Preface compensators, generate reference profiles and trajectories, and evaluate performances of motion-control systems. Such skills are required to inc- rease the speed of motion, reduce the cycle time, and enhance the accuracy of production machines. Improvements and advances in control technology and electrical drives are continuously sought in a number of industries. High-performance position-controlled feed drives and automated spindles with tool exchange are required in the metal processing industry. An in- crease in precision and a reduction in cycle time is required in packaging machines; plastics injection molding; the glass, wood, and ceramics indus- tries; welding, manipulating, and assembly robots in the automotive indus- try; metal-forming machines; and a number of other tasks in processing machines. Lighter and more flexible mechanical constructions introduce new chal- lenges. Conflicting motion-control requirements for decreased cycle time, increased operating speed, and increased accuracy are made more challeng- ing by mechanical resonance, finite resolution, sensor imperfection, and noise. Motion-control solutions and systems are in continual development, requiring the sustained efforts of control, electrical, and mechanical engi- neers.

Acknowledgment

The author is indebted to Prof. Milić R. Stojić, Prof. Aleksandar Stanković, Prof. Emil Levi, Dr. Ing. Vojislav Aranđelović, Ing. Ljiljana Perić, Ing. Mario Salano, Ing. Michael Morgante, and Dr. Ing. Martin Jones who read through the first edition of the book and made suggestions for improve- ments.