Вы находитесь на странице: 1из 8

A Modern Design Approach to Motion Control

By Robert Treiber II and Alexander Gomez June 2002

A Modern Design Approach to Motion Control

Abstract The PID controller is useful in many applications where each tuning parameter modifies the system behavior in an intuitive manner. In many motion control applications, however, the classical PID controller cannot provide the necessary closed loop system performance. In a recent application, standard PID compensation proved inadequate. Instead, in order to achieve the desired position loop bandwidth in the presence of several low frequency mechanical resonances, cascaded digital biquad control algorithms were developed. The cascaded biquad implementation provided the required closed loop bandwidth and phase margin. The methodology used, together with some of the benefits and limitations of the biquad controller implementation in a 16-bit fixed point DSP will be discussed.

Introduction Proportional Integral & Derivative (PID) control compensation has been widely accepted by servo control engineers as the de facto standard for control law implementations for decades. Today, with the prevalence of modern digital control techniques and ever demanding product development schedules, PID loop tuning has been relegated to a system integration and debug task to be addressed during initial hardware integration rather than a critical design component worthy of system simulation. Unfortunately, for advanced electro-mechanical systems with high loop bandwidth requirements, fraught with complex resonances, simple PID algorithms may not suffice and more complex digital control algorithms may be required.

Boston Engineering recently faced this very challenge in developing the digital controller for an antenna pedestal application. System performance requirements dictated an open loop crossover frequency of six (6) Hertz (Hz) but mechanical resonances at 99 Hz and 210 Hz, made the use of simple PID compensation impossible. Instead, to achieve the open loop bandwidth and the necessary gain margin at the resonant frequencies, a series of second order lead-lag networks and second order low pass filters were necessary. In total, a 6th order compensation network was implemented using a cascaded series of digital biquad amplifiers. What follows is a discussion of the development of those digital biquad amplifiers and the benefits of their implementation.

System Description The application under consideration consists of a large rotary stage driven by a 48-pole, direct drive, 3 phase brushless DC motor. The load inertia exceeds 50 ft-lb-s2 and it is to operate outdoors in an area where strong gusts of wind are prevalent. The feedback for sinusoidal commutation, as well as for the velocity and position loops is done through an absolute encoder. The performance specifications required a 5-8 Hz closed loop position bandwidth and a

Copyright 2006 Boston Engineering Corporation. All rights reserved.

A Modern Design Approach to Motion Control

minimum of 30- 35 of phase margin. An ADMC401 provided the position, velocity and current closed loop control, as well as the sinusoidal commutation algorithm. Reference frame conversions and Space Vector Modulation were used to implement the commutation and PWM output. The 401 provided the flexibility to modify the current and position loop controls to satisfy the requirements. Due to the fact that the system contains several low frequency resonances, a simple PI(D) position controller will not suffice. Instead, a modified phase lead control is modeled, implemented and tuned accordingly to obtain the required system performance.

Biquad Implementation A biquad filter usually refers to a second order IIR filter with the z-domain form [1]:

This transfer function is implemented in the DSP in a difference equation format, and serves as a building block to create higher order IIR filters. By cascading different biquads together, higher order filters can be implemented. This separation allows individual scaling which helps reduce recursive errors. These errors are especially prevalent in fixed point DSPs due to finite wordlength effects that will be discussed next.

Finite Wordlength Effects Finite wordlength effects can mainly manifest themselves in two possible ways: quantization and arithmetic round off. The quantization of filter coefficients may cause errors due to misplacement of poles and zeros, which is a serious issue only for high performance IIR filters with poles close to the unit circle. The input quantization error is due to the A/D conversion. For an ideal A/D converter with b-bits, the input signal error behaves as a random variable with zero mean and variance e [2]:
2

This equation shows the minimum error possible. For our motion control application, and using a 12-bit D/A, this error is insignificant. Unfortunately, in fixed-point applications, coefficient quantization and arithmetic round off error will almost inevitably add to this error. Arithmetic round off error of IIR filters could cause the output to not only produce sub-optimal system performance, but also cause the output to grow exponentially and create instability.

Copyright 2006 Boston Engineering Corporation. All rights reserved.

A Modern Design Approach to Motion Control

The arithmetic round off error occurs with the quantization of the result of arithmetic operations used to compute FIR or IIR filters. The study of these errors in IIR filters is substantially more involved than FIR filters since the error can re-circulate and build up over time [3]. The individual scaling provided by the biquad approach helps minimize the arithmetic round off error. The scaling is dependent on the filter gain and coefficients.

Design Methodology A controller was designed to meet the specifications described in the introduction. Using a spectrum analyzer, a Bode plot of the plant was performed. From this plot, a modular approach was taken, separating the design into two main frequency regions. The low frequency region, where the lead-lag controller will function, and the high frequency region where a low pass filter would operate. The low pass filter is necessary since frequency modes were found at 99 Hz and 210 Hz.

A MATLAB simulation was used to validate the controller design. The simulation consisted of two parts. The outputs for this first part are the open and closed loop Bode plots of the outer position and current loops, as well as time-domain step and ramp responses. The output of the second part of the simulation included the scaled and digitized biquad coefficients in hexadecimal that can be directly inserted into the 401 DSP code. In addition to the coefficients in hexadecimal, the simulation outputs the number of shifts that have to be performed for each biquad, depending on how each one was scaled. This parameter can also be directly inserted into the 401 DSP code. The input to the simulation includes easy addition and removal of second-order transfer functions or modules in the s-domain.

The simulation determines the scaling by determining the largest coefficient in each biquad and finding the closest power of two larger than this coefficient. Each coefficient is then divided by this power of two (2i), ensuring that all the scaled coefficients are less than or equal to one. This procedure is repeated for each biquad and the power of two (i) for each biquad is saved. This number becomes the number of shifts to be performed at the output of each scaled biquad.

Controller Implementation It was found that, due to arithmetic round off errors associated with computing biquad filters using the 401 fixed-point DSP, the maximum number of shifts per biquad is 6. If more shifts were implemented, the system would become unstable. The number of output shifts is dependent on the scaling, which is dependent on the number and magnitude of filter coefficients. When using several biquads, the gains can be spread out so that no single biquad has a lot of output shifts. Equation 3 shows the final controller configuration in the s-domain.

Copyright 2006 Boston Engineering Corporation. All rights reserved.

A Modern Design Approach to Motion Control

Where K0=353; K1=1; K2=1; K3=1; 0=6; 1=6; 2=6150; 3=300; 4=300; 3=0.7 and 4=0.7. The first three terms of Equation 3 determine the low frequency control while the last two modules form a fourth-order low pass filter. The integral term, while not theoretically needed, is required to maintain position at rest. It was also the first term computed in the DSP code to reduce any high frequency noise at the input. The first two terms could have theoretically formed a single biquad module. The term was separated since, after scaling, the number of shifts exceeded 6. Figure 3 shows the parameter generator output, with the number of shifts per module. The spectrum analyzer plot of the open loop system with this controller is shown in Figure 1.

Figure 1 The simulation Bode plot is shown in Figure 2. The coefficient-generator output of the simulation is shown in Figure 3.

Copyright 2006 Boston Engineering Corporation. All rights reserved.

A Modern Design Approach to Motion Control

Figure 2

It can be seen from Figure 1 or Figure 2 that the phase margin is approximately 30 and the crossover frequency is around 6 Hz.

Copyright 2006 Boston Engineering Corporation. All rights reserved.

A Modern Design Approach to Motion Control

Figure 3

Copyright 2006 Boston Engineering Corporation. All rights reserved.

A Modern Design Approach to Motion Control

Conclusion A control system methodology has been presented. A simulation/coefficient generator tool was used to facilitate the design and implementation of a 7th order controller that satisfied the initial requirements. The final implementation in the DSP took the form of cascaded second order biquad modules. The main reason for using biquads is to minimize the effects of arithmetic round off errors that are especially destructive in fixed-point implementations of IIR filters.

References [1] Digital Signal Processing Applications Using the ADSP-2100 Family Volume 1. Upper Saddle River, NJ: Prentice Hall, 1992. [2] Higgins, R.J., Digital Signal Processing in VLSI. Englewood Cliffs, NJ: Prentice Hall, 1990. [3] Taylor, F., Mellott, J, Hands-On Digital Signal Processing. New York, NY: McGraw-Hill, 1998.

Boston Engineering Corporation 411 Waverley Oaks Road, Suite 114 Waltham, MA 02452 Tel: 781-466-8010 Fax: 781-466-8020 www.boston-engineering.com info@boston-engineering.com

Copyright 2006 Boston Engineering Corporation. All rights reserved.

Вам также может понравиться