Transcript
Page 1: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

➃ Servo Tuning 29

C H A P T E R ➃

Servo Tuning

In a Hurry?

You should tune the 6270 before attempting to execute anymotion functions. At a minimum, complete this chapter's Tuning SetupProcedure and Controller Tuning Procedures until you have found aproportional feedback gain that can give a stable response for your system.(The Drive Tuning Procedure below is for use with velocity drive systemsonly, not for servo valve systems.) Then you can proceed to execute yourmotion functions. To gain a full understanding of tuning, you should readthrough this entire chapter and follow its procedures to ensure your systemis properly tuned.

Servo Tuning Software AvailableTo effectively tune the 6270 (and any velocity drives you may be using), use the interactivetuning features in the Servo Tuner add-on module for Motion Architect. It greatly improvesyour efficiency and gives you powerful graphical tools to measure the performance of thesystem. Instructions for using Servo Tuner to tune the 6270 are provided in the ServoTuner User Guide.

The Servo Tuner option is an add-on module and does not automatically come with the basicMotion Architect software package. To order your copy of Servo Tuner, which is provided ona separate disk, contact your local Automation Technology Center.

Page 2: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

30 6270 Motion Controller User Guide

Servo System TerminologyThis section gives you with an overall understanding of the principles andthe terminology used in tuning the 6270.

Servo Tuning Terminology

Page 3: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

➃ Servo Tuning 31

The 6270 uses a digital control algorithm to control and maintain theposition and velocity. The digital control algorithm consists of a set ofnumerical equations used to periodically (once every servo samplingperiod) calculate the value of the control signal output. The numericalterms of the equations consist of the current commanded and actual positionvalues (plus a few from the past sampling period) and a set of controlparameters. Each control parameter, commonly called a gain, has aspecific function (see Servo Control Techniques later in this chapter).Groups of gains may be saved to specified gain sets that can be invoked toaffect motion under varied conditions at different times. Tuning is theprocess of selecting and adjusting these gains and gain sets to achieveoptimal servo performance.

When this control algorithm is used, the whole servo system is a closed-loop system (see diagram below). It is called closed loop because the controlalgorithm accounts for both the command (position, velocity, tension, etc.)and the feedback data (from the LDT, encoder, or ANI input); therefore, itforms a closed loop of information flow.

When all gains are set to zero, the digital control algorithm is essentiallydisabled and the system becomes an open loop system (see diagram below).During system setup or troubleshooting, it is desirable to run the system inopen loop so that you can independently test the drive/motor or valveoperation (further details are provided in the Open Loop Operation sectionlater in this chapter).

Load

ServoValve

orDrive

HydraulicCylinder,Motor,etc.

Feedback Device(LDT, Encoder, or AN Input)

LoadCommand Digital

ControlAlgorithm

ControlSignal

Offset

Drive Command =Control Signal + Offset

ServoValve

orDrive

Closed Loop System

SOFFSOffset

Offset

Drive Command = OffsetOpen Loop System

Feedback Data

HydraulicCylinder,Motor,etc.

Feedback Device(LDT, Encoder, or AN Input)

The 6270 has the capability of providing an analog voltage output of ±10V or acurrent of ±20mA, ±50mA, ±60mA, ±80mA, ±100mA, or ±150mA forcommanding the valve or drive. After the digital control algorithm hascalculated the digital control signal, this digital value is sent out from the DSP(digital signal processor) to the Digital-to-Analog converter (DAC). The DAChas an analog output range of -10V to +10V or maximum current. It is oftenpossible that the digital control signal calculated by the control algorithm canexceed this limit. When this happens, the analog output would just stay, orsaturate, at the maximum limit until the position error changes such that thecontrol algorithm would calculate a control signal less than the limit. Thisphenomenon of reaching the output limit is called controller outputsaturation. When saturation occurs, increasing the gains does not helpimprove performance since the DAC is already operating at its maximum level.

Page 4: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

32 6270 Motion Controller User Guide

Position Variable TerminologyIn a servo system, there are two types of time-varying (value changes withtime) position information used by the controller for control purposes:commanded position and actual position. You can use this information todetermine if the system is positioning as you expect.

CommandedPosition

The commanded position is calculated by the motion profile routinebased on the acceleration (A, AA), deceleration (AD, ADA), velocity (V) anddistance (D) command values and it is updated every servo sampling period.Therefore, the commanded position is the intended position at any givenpoint of time. To view the commanded position, use the TPC (TransferCommanded Position) command; the response represents the commandedposition at the instant the command is received.

When this user guide refers to the commanded position, it means this calculatedtime-varying commanded position, not the distance (D) command. Conversely,when this user guide refers to the position setpoint, it means the finalintended distance specified with the distance (D) command. The following plotis a typical profile of the commanded position in preset (MCØ) mode.

Setpoint

Distance( D )

Acceleration ConstantVelocity Deceleration

ProfileComplete

Po

siti

on

Time

CommandedPosition

Page 5: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

➃ Servo Tuning 33

Actual Position The other type of time-varying position information is the actualposition; that is, the actual position of the motor (or load or cylinder, etc.)measured with the feedback device (LDT, encoder, or ANI input). Since this isthe position achieved when the drive/valve responds to the commandedposition, we call the overall picture of the actual position over time theposition response (see further discussion under Servo ResponseTerminology).

To view the actual position, use the TFB (Transfer Position of FeedbackDevice) command; the response represents the actual position at the instantthe command is received. The goal of tuning the servo system is to get theactual position to track the commanded position as closely as possible.

The difference between the commanded position and actual position is theposition error. To view the position error, use the TPER (Transfer PositionError) command; the response represents the position error at the instantthe command is received. When the motor/valve is not moving, the positionerror at that time is called the steady-state position error (seedefinition of steady-state under Servo Response Terminology). If a positionerror occurs when the motor/valve is moving, it is called the positiontracking error.

In some cases, even when the system is properly tuned, the position error canstill be quite significant due to a combination of factors such as the desiredprofile, the servo mechanism's limitation, the dynamic characteristics ofthe system, etc. For example, if the value of the velocity (V) command ishigher than the maximum velocity the hydraulic cylinder (or motor, etc.)can physically achieve, then when it is commanded to travel at this velocity,the actual position will always lag behind the commanded position and aposition error will accumulate, no matter how high the gains are.

Page 6: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

34 6270 Motion Controller User Guide

Servo Response Terminology

Stability The first objective of tuning is to stabilize the system. The formal definitionof system stability is that when a bounded input is introduced to thesystem, the output of the system is also bounded. What this means to amotion control system is that if the system is stable, then when theposition setpoint is a finite value, the final actual position of the system isalso a finite value.

On the other hand, if the system is unstable, then no matter how small theposition setpoint or how little a disturbance (motor torque variation, loadchange, noise from the feedback device, etc.) the system receives, the positionerror will increase continuously, and exponentially in almost all cases. Inpractice, when the system experiences instability, the actual position willoscillate in an exponentially diverging fashion as shown in the drawingbelow. The definition here might contradict what some might perceive. Onecommon perception shared by many is that whenever there is oscillation,the system is unstable. However, if the oscillation finally diminishes(damps out), even if it takes a long time, the system is still considered stable.The reason for this clarification is to avoid misinterpretation of what thisuser guide describes in the following sections.

PositionResponse Types

The following table lists, describes, and illustrates the six basic types ofposition responses. The primary difference among these responses is due todamping, which is the suppression (or cancellation) of oscillation.

Response Description Profile (position/time)

Unstable Instability causes the position tooscillate in an exponentially divergingfashion. P

ositi

on

Time

Over-damped A highly damped, or over-damped,system gives a smooth but slowerresponse. P

ositi

on

Time

Under-damped A slightly damped, or under-damped,system gives a slightly oscillatoryresponse. P

ositi

on

Time

Critically damped A critically-damped response is themost desirable because it optimizesthe trade-off between damping andspeed of response.

Pos

ition

Time

Oscillatory An oscillatory response ischaracterized by a sustained positionoscillation of equal amplitude. P

ositi

on

Time

Chattering Chattering is a high-frequency, low-amplitude oscillation which is usuallyaudible. P

ositi

on

Time

Page 7: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

➃ Servo Tuning 35

PerformanceMeasurements

When we investigate the plot of the position response versus time, there are afew measurements that you can make to quantitatively assess theperformance of the servo:

• Overshoot—the measurement of the maximum magnitude that the actual positionexceeds the position setpoint. It is usually measured in terms of the percentageof the setpoint value.

• Rise Time—the time it takes the actual position to pass the setpoint.

• Settling Time—the time between when the commanded position reaches thesetpoint and the actual position settles within a certain percentage of the positionsetpoint. (Note the settling time definition here is different from that of a controlengineering text book, but the goal of the performance measurement is stillintact.)

These three measurements are made before or shortly after the hydrauliccylinder (or motor, etc.) stops moving. When it is moving to reach and settleto the setpoint, we call such period of time the transient. When it is notmoving, it is defined as in steady-state.

A typical stable position response plot in preset mode (MCØ) is shown below.

Setpoint

CommandedPosition

ActualPosition

Setpoint

Target Zone ModeSettling Band

Rise Time

Transient

Settling Time

Overshoot Steady StatePosition Error

Steady State

Time

Po

siti

on

Page 8: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

36 6270 Motion Controller User Guide

6000 Series Servo Commands

NOTE

The following list briefly describes each servo-related 6000 Series command. Moredetailed information can be found in the rest of this chapter and within each command'sdescription in the 6000 Series Software Reference Guide.

Command Title Brief Description (detailed descriptions in 6000 SeriesSoftware Reference Guide)

LDTUPD LDT Position Update Rate Use LDTUPD to select the rate at which the LDT position is sampled.Decreasing the LDTUPD command value (speeding up the update rate)willimprove the quality of the dynamic response. However, if the update rate istoo fast, the LDT will not have enough time to read the position, resulting inread errors. The occurrence of read errors can be monitored with the TERand [ ER ] commands if you enable ERROR bit #15, and you can check theLDT status with bit #27 of TAS and AS.

SFB Select Servo FeedbackSource

Selects the servo feedback transducer (options: LDT, encoder, or ANIanalog input). The SFBØ command sets all the gains to zero so that thecontroller runs in open loop mode, and disables the Setpoint Windowfeature (equivalent to SSWGØ)

SGAF& SGAFN *

Acceleration FeedforwardGain

Sets the acceleration feedforward gain in the PIV&Fa servo algorithm.

SGENB Servo Gain Set Enable Enables a previously-saved set of PIV&F gains. A set of gains (specific tothe current feedback source selected with the SFB command) is savedusing the SGSET command.

SGI& SGIN *

Set Integral Feedback Gain Sets the integral gain in the PIV&F servo algorithm.

SGILIM Set Integral Windup Limit Sets a limit on the correctional control signal that results from the integralgain action trying to compensate for a position error that persists too long.

SGP& SGPN *

Proportional Feedback Gain Sets the proportional gain in the PIV&F servo algorithm.

SGSET Save a Set of Servo Gains Saves the presently-defined set of PIV&F gains as a particular gain set(specific to the current feedback source on each axis). Up to 5 gain setscan be saved and enabled at any point in a move profile, allowing differentgains at different points in the profile.

SGV& SGVN *

Set Velocity Feedback Gain Sets the velocity gain in the PIV&F servo algorithm.

SGVF& SGVFN *

Velocity Feedforward Gain Sets the velocity feedforward gain in the PIV&Fv servo algorithm.

SMPER Maximum Allowable PositionError

Sets the maximum allowable error between the commanded position and theactual position as indicated by the feedback device. If the error exceedsthis limit, the 6270 activates the Shutdown output and sets the DAC outputto zero (plus any SOFFS offset). If there is no offset, a valve will return tothe null position and a rotary motor will freewheel to a stop. You can enablethe ERROR command to continually check for this error condition, and whenit occurs to branch to a programmed response defined in the ERRORPprogram.

SOFFS& SOFFSN

Servo Control Signal Offset Sets an offset to the commanded analog output voltage, which is sent tothe drive system. The SOFFSN command allows you to set an offset voltagewhen the position error is negative. The SOFFSN value tracks the SOFFSvalue until a separate SOFFSN value is entered. To return SOFFSN to thedefault mode in which it track SOFFS, issue the SOFFSN command with aminus sign (-) in the command field for the affected axis (e.g., SOFFSN,-restores axis 2 to the default mode).

Page 9: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

➃ Servo Tuning 37

SSFR Servo Frequency Ratio Sets the ratio between the update rate of the move trajectory and theupdate rate of the servo action. The intermediate position setpointscalculated by the trajectory generator is updated at a slower rate then theservo position correction. This command allows you to optimize this foryour application. The default setting (SSF4) is sufficient for mostapplications.

SSWD& SSWG

Setpoint Window Gains You may now activate a specified set of gains to be used when with adefined region either side of the position setpoint (“setpoint window”). TheSSWD command is used to specify the distance on both sides of the positionsetpoint (“setpoint window”) in which the gain set specified with the SSWGcommand is used. Specifically, the gain set is automatically invoked by thecontroller after the commanded move profile is complete and the actualposition is within the setpoint window. The setpoint window includes ahysteresis loop equal to 25% of the value used in the SSWD command.

NOTE: The gain set to be used must first be defined with the SGSETcommand.

For more information, refer to the Setpoint Window Gains section later inthis chapter.

STRGTD

STRGTE

STRGTT

STRGTV

Target Zone Distance

Target Zone Mode Enable

Target Zone Timeout Period

Target Zone Velocity

When using the Target Zone Mode, enabled with the STRGTE command, theactual position and actual velocity must be within the target zone (that is,within the distance zone defined by STRGTD and within the velocity zonedefined by STRGTV). If the motor/load does not settle into the target zonebefore the timeout period set by STRGTT, the 6270 detects an error.

To prevent subsequent commands/moves from being executed when thiserror condition occurs, you must enable the ERROR command to continuallycheck for this error condition, and when it occurs to branch to aprogrammed response defined in the ERRORP program. Otherwise,subsequent commands/moves can be executed regardless of the actualposition and velocity.

This feature is explained in greater detail later in the Target Zone section.

TDAC& DAC

Value of DAC Output Transfers [or assigns/compares] the output from the 6270's digital-to-analog converter. This is the analog control signal output at the 6270'sCMD terminal.

TFB& FB

Position of Servo FeedbackDevices

Transfers [or assigns/compares] the actual position of the transducersselected for feedback (see SFB).

TGAIN Transfer Servo Gains Transfers the currently active set of PIV&F gains. The servo gain setreported represents the last gain values specified with the individual servogain commands (SGI, SGP, SGV, SGAF, and SGVF), or the last gain setenabled with the SGSET command.

TPC& PC

Position Commanded Transfers [or assigns/compares] the commanded position (intermediateposition setpoint) to the drive or valve.

TPER& PER

Position Error Transfers [or assigns/compares] the error between the commandedposition (TPC) and the actual position (TFB, or TPE, TLDT, TANI) asmeasured by the feedback device.

TSGSET Transfer Servo Gain Set Transfers a previously-saved set of servo gain parameters. A gain set issaved with the SGSET command.

TSTLT Transfer Servo Settling Time Transfers the time it took the last move to settle within the target zone (thatis, within the distance zone defined by STRGTD and within the velocity zonedefined by STRGTV). The Target Zone Mode does not need to be enabled touse this command.

* The negative gain commands (SGAFN, SGIN, SGPN, SGVN, and SGVFN) allow you to establish gains to be used when theposition error is negative. The negative gain value will track the positive gain value until a separate negative gain value isentered. To re-establish the default mode where the negative gain tracks the positive gain, issue the negative gaincommand with a minus sign (-) in the command field for the affected axis (e.g., SGPN,- restores axis 2 to the default mode).

Page 10: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

38 6270 Motion Controller User Guide

Servo Control Techniques

To ensure that you are tuning your servo system properly, you shouldunderstand the tuning techniques described in this section.

The 6270 employs a PIV&F servo control algorithm. The control techniquesavailable in this system are as follows:

P ..... Proportional Feedback (controlled with the SGP and SGPN commands)I ...... Integral Feedback (controlled with the SGI and SGIN commands)V ..... Velocity Feedback (controlled with the SGV and SGVN commands)F ..... Velocity and Acceleration Feedforward (controlled by the SGVF and SGAF

and SGVFN and SGAFN commands, respectively)

The block diagram below shows these control techniques in relation to theservo control algorithm configuration. The following table presents acondensed summary of each control's effect on the servo system.

Analog

Control Signal

ServoValve or

Motor/DriveSystem

Current, Torque, or Velocity

Control Signal

Servo System

PositionFeedback

Device

Servo Control Algorithm

Velocity Feedforward

(SGVF & SGVFN)

Acceleration Feedforward(SGAF & SGAFN)

+ ++ - + -

+ +

-10V

+10V

Digital-to-AnalogConversion (DAC)

Variable Integral Limit(set with SGILIM )

Proportional Feedback(SGP & SGPN)

Integral Feedback(SGI & SGIN)

Velocity Feedback(SGV & SGVN )

Dither ControlFrequency (SDTFR)

and Amplitude(SDTAMP )

Output Offset,Direction Dependent

(SOFFS) and (SOFFSN)Positionerror

Gain Stabil i ty DampingDisturbanceRejection

SteadyState Error

TrackingError

Proportional (SGP and SGPN) Improve Improve Improve Improve ImproveIntegral (SGI and SGIN) Degrade Degrade Improve Improve ImproveVelocity Feedback (SGV and SGVN) Improve Improve ------------- ------------- DegradeVelocity Feedforward (SGVF and SGVFN) ------------- ------------- ------------- ------------- ImproveAcceleration Feedforward (SGAF and SGAFN) ------------- ------------- ------------- ------------- Improve

Proportional Feedback Control (SGP)NOTE: The

proportional feedbackgain (SGP) should

never be set to zero,except when open-loop

operation is desired.

Proportional feedback is the most important feedback forstabilizing a servo system. When the 6270 uses proportional feedback,the control signal is linearly proportional to the position error (thedifference between the commanded position and the actual position—seeTPER command). The proportional gain is set by the Servo GainProportional (SGP) command. Proportional feedback can be used to makethe servo system more responsive, as well as reduce the steady state positionerror.

Since the control is proportional to the position error, whenever there is anydisturbance (such as torque ripple or a spring load) forcing the load awayfrom its commanded position, the proportional control can immediatelyoutput a signal to move it back toward the commanded position. Thisfunction is called disturbance rejection.

If you tune your system using only the proportional feedback, increasing theproportional feedback gain (SGP value) too much will cause the systemresponse to be oscillatory, underdamped, or in some cases unstable.

Page 11: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

➃ Servo Tuning 39

Integral Feedback Control (SGI)Using integral feedback control, the value of the control signal is integratedat a rate proportional to the feedback device position error. The rate ofintegration is set by the Servo Gain Integral (SGI) command.

In most hydraulic servo applications, it is best to set the SGI gain to zero(SGIØ,Ø) during the move. Then, after motion has stopped, use the proper SGIgain to hold the position.

The primary function of the integral control is to overcome friction and/orgravity and to reject disturbances so that steady state position error can beminimized or eliminated. This control action is important for achievinghigh system accuracy. However, if you can achieve acceptable positionaccuracy by using only the proportional feedback (SGP), then there is no needto use the integral feedback control.

In the task of reducing position error, the integral gain (SGI) worksdifferently than the proportional gain (SGP); this is because the magnitude ofits control signal is not dependent on the magnitude of the position error asin the case of proportional feedback. If any position error persists, then theoutput of the integral term will ramp up over time until it is high enough todrive the error back to zero. Therefore, even a very small position error canbe eliminated by the integral feedback control. By the same principle,integral feedback control can also reduce the tracking error when the systemis commanded to cruise at constant velocity.

ControllingIntegral Windup

If integral control (SGI) is used and an appreciable position error haspersisted long enough during the transient period (time taken to reach thesetpoint), the control signal generated by the integral action can end up toohigh and saturate to the maximum level of the controller's analog controlsignal output. This phenomenon is called integrator windup.

After windup occurs, it will take a while before the integrator output returnsto a level within the limit of the controller's output. Such a delay causesexcessive position overshoot and oscillation. Therefore, the integral winduplimit (SGILIM) command is provided for you to set the absolute limit of theintegral and, in essence, turn off the integral action as soon as it reaches thelimit; thus, position overshoot and oscillation can be reduced (seeillustration below). The application of this feature is demonstrated in Step 4of the Tuning Procedure below.

Without SGILIM

Max. Analog Output (+10V)

Min. Analog Output (-10V)

0V

WindupDuration

(wd)

wd

wd

InternalIntegralValue

Integral at T1

T1

Pos

ition

Time

Actual OutputGeneratedby the Integral Term

Position Setpoint(D Command)

Position Overshoot

Position Error at T1

With SGILIM

Max. Analog Output (+10V)

Min. Analog Output (-10V)

0V

IntegralWindup Limit

(SGILIM)

Pos

ition

Time

wd

Position Setpoint(D Command)

Page 12: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

40 6270 Motion Controller User Guide

Velocity Feedback Control (SGV)When velocity feedback control is used, the control signal is proportional tothe feedback device's velocity (rate of change of the actual position). The ServoGain Velocity (SGV) command sets the gain, which is in turn multiplied by thefeedback device's velocity to produce the control signal. Since the velocityfeedback acts upon the feedback device's velocity, its control action essentiallyanticipates the position error and corrects it before it becomes too large. Suchcontrol tends to increase damping and improve the stability of the system.

A high velocity feedback gain (SGV) can also increase the position trackingerror when traveling at constant velocity. In addition, setting the velocityfeedback gain too high tends to slow down (overdamp) the response to acommanded position change. If a high velocity feedback gain is needed foradequate damping, you can balance the tracking error by applying velocityfeedforward control (increasing the SGVF value—discussed below).

Since the feedback device's velocity is derived by differentiating the feedbackdevice's position with a finite resolution, the finite word truncation effectand any fluctuation of the feedback device's position would be highlymagnified in the velocity value, and even more so when multiplied by a highvelocity feedback gain. When the value of the velocity feedback gain hasreached such a limit, the motor (or hydraulic cylinder, etc.) will chatter(high-frequency, low-amplitude oscillation) at steady state.

Velocity Feedforward Control (SGVF)The purpose of velocity feedforward control is to improve trackingperformance; that is, reduce the position error when the system iscommanded to move at constant velocity. The tracking error is mainlyattributed to three sources—friction, torque load, and velocity feedbackcontrol (SGV).

Velocity feedforward control is directed by the Servo Gain VelocityFeedforward (SGVF) setting, which is in turn multiplied by the rate of change(velocity) of the commanded position to produce the control signal.Consequently, because the control signal is now proportional to the velocityof the commanded position, the 6270 essentially anticipates the commandedposition and initiates a control signal ahead of time to more closely follow(track) the commanded position.

Applications requiring linear interpolation can benefit from improvedtracking performance; however, if your application only requires short,point-to-point moves, velocity feedforward control is not necessary.

Because velocity feedforward control is not in the servo feedback loop (seeServo Control Algorithm drawing above), it does not affect the servo system'sstability. Therefore, there is no limit on how high the velocity feedforwardgain (SGVF) can be set, except when it saturates the control output (tries toexceed the 6270's analog control signal range).

Acceleration Feedforward Control (SGAF)The purpose of acceleration feedforward control is to improve positiontracking performance when the system is commanded to accelerate ordecelerate.

Acceleration feedforward control is directed by the Servo Gain AccelerationFeedforward (SGAF) setting, which is in turn multiplied by the acceleration ofthe commanded position to produce the control signal. Consequently,because the control signal is now proportional to the acceleration of thecommanded position, the 6270 essentially anticipates the velocity of thecommanded position and initiates a control signal ahead of time to moreclosely follow (track) the commanded position.

Page 13: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

➃ Servo Tuning 41

Same as velocity feedforward control, this control action can improve theperformance of linear interpolation applications. In addition, it alsoreduces the time required to reach the commanded velocity. However, if yourapplication only requires short, point-to-point moves, accelerationfeedforward control is not necessary.

Acceleration feedforward control does not affect the servo system's stability,nor does it have any effect at constant velocity or at steady state.

Negative GainsThe negative gain commands (see list below) allow you to establish gains tobe used when the position error is negative.

SGPN ........ Proportional Gain NegativeSGVN ........ Velocity Gain NegativeSGIN ........ Integral Gain NegativeSGVFN ...... Velocity Feedforward Gain NegativeSGAFN ...... Acceleration Feedforward Gain Negative

CommandedPosition

ActualPosition

Positive Position Error(positive gains used)

Steady StatePosition Error

Time

Po

siti

on

Negative Position Error(negative gains used)

SGPNSGVNSGINSGVFNSGAFN

SGPSGVSGISGVFSGAF

The 6270 automatically switches between the positive and negative gains tocorrelate with the positive or negative position error. This is particularlyuseful when controlling hydraulic cylinders in which the different surfaceareas on each side of the piston react differently with the same gain settings.

Each negative gain changes with (tracks) the corresponding positive gainvalue until a negative gain command is executed. For example, the SGPNvalue automatically tracks the SGP value until an SGPN command is executedwith a value other than the current SGP command value. After the negativegain command is executed, separate positive and negative gain commandsmust be used.

To re-establish the default mode where the negative gain tracks the positivegain, issue the negative gain command with a minus sign (-) in the commandfield for the affected axis (e.g., SGPN,- restores axis 2 to the default mode).

Gain Sets

An added dimension to the control techniques discussed in the previoussection is to group the gains into “gains sets” that can be invoked to affectmotion under certain conditions. Gain sets may be useful for applications inwhich you would like to invoke different gains a different portions of a moveprofile, or at rest, or based on an external process, etc.

The SGSET command allows you to save the currently active gains, controlsignal offsets (SOFFS and SOFFSN), and maximum position error (SMPER)setting, to a specified gain set (see list below).

SGPN ........ Proportional Gain NegativeSGVN ........ Velocity Gain Negative

Page 14: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

42 6270 Motion Controller User Guide

SGIN ....... Integral Gain NegativeSGVFN...... Velocity Feedforward Gain NegativeSGAFN...... Acceleration Feedforward Gain NegativeSGILIM .... Integral Windup LimitSOFFS...... Servo Control Signal OffsetSOFFSN .... Servo Control Signal Offset NegativeSMPER...... Maximum Allowable Position Error

The gain set saved with the SGSET command can be enabled/recalled laterwith the SGENB command or the SSWG command. Using the SGENB command,the gains can be enabled during motion at any specified point in the profile,or when not in motion (see programming example below). If using the SSWGcommand, the gain set is referred to as the “setpoint window gain set” and isinvoked after the commanded profile is complete (see Setpoint WindowGains below for details).

NOTEThe tuning gains saved to a given gain are specific to the current feedback source (selectedwith the last SFB command) at the time the gains were saved with the SGSET command.Later, when you enable the saved gain set, make sure that the gain set you enableis appropriate to the feedback source you are using at the time.

To display the gain values currently in effect, use the TGAIN command. Todisplay the contents of a particular gain set, use the TSGSET command.

Setpoint Window GainsYou may activate a specified set of gains to be used when with a definedregion either side of the position setpoint (“setpoint window”).

The setpoint window is defined by the SSWD command, which establishes thedistance on both sides of the position setpoint (“setpoint window”) in whichthe gain set specified with the SSWG command is used. Specifically, the gainset is automatically invoked by the controller after the commanded moveprofile is complete and the position error is within the setpoint window. TheSSWG gain set accommodates different proportional, integral, and velocitygains and offsets for each direction.

The setpoint window includes a hysteresis loop equal to 25% of the valueused in the SSWD command.

If you want to disable the servo control loop when the position error iswithin the setpoint window, set all of the gain values to zero—you can do thisby executing all the individual gain commands or by executing the SFBØcommand. If you want to disable the offsets (SOFFS & SOFFSN) when theposition error is within the setpoint window, set them to zero volts.

To disable thesetpoint window gain

feature, use theSSWGØ command.

To assign a gain set as the setpoint window gain set with the SSWG command,you must first define/save the gain set with the SGSET command (seeprogramming example below).

Page 15: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

➃ Servo Tuning 43

SOFFS

SOFFSN

SSWD

Setpoint WindowGainset (SSWG)

Setpoint WindowHysteresis (25%)

DACOutput

(+)

PositionError (+)

Normal Gainset

DACLIM

DACMIN

DACOutput

(-)

PositionError (-)

SSWD

Setpoint Window

Normal Gainset

The diagram above makes two assumptions. First, for simplicity, only a proportional gain is being used. Second,related to the SSWG gain set, the proportional gains (SGP and SGPN) are lower than those used in the normal gainset and the offsets (SOFFS and SOFFSN) are set to zero.

The arrows on the above diagram illustrate the hysteresis loop. The SSWG gains are used until the position errorincreases to a value of 25% greater than the number specified in the SSWD command. At this point, the normalgain set is automatically substituted until the position error falls below the value in the SSWD command when theSSWG gains are returned.

Finally, the maximum positive DAC voltage is determined by the value in the DACLIM command and themaximum negative value is determined by the DACMIN command.

Target Zone — An alternative to SSWDYou can use the target zone settling mode to override the setpoint window distance (SSWD)and introduce distance and velocity end-of-move criteria to define when the controllerswitches to the setpoint window gains. When using the target zone settling mode (enabledwith the STRGTE command), after completion of the commanded move profile, the actualposition and actual velocity must be within the “target zone” (i.e., within the position banddefined by STRGTD and within the velocity band defined by STRGTV) before motion can bedetermined complete. After that point, the controller will switch to the SSWG gains. For moreinformation on the target zone mode, refer to the Target Zone section later in this chapter.

ProgrammingExample

Example D escrip t ion> SGP35 Set proportional gain to 35> SGI3 Set integral gain to 3> SGSET3 Save current gains as gain set #3 (to use when within the setpoint window)> SSWG3 Assign gain set #3 as the setpoint window gain set> SGP5Ø While moving, use higher proportional gain> SGIØ While moving, use no integral gain,> SGV4 While moving, use introduce velocity gain> SSWD1ØØ After the commanded move profile is complete, the controller will use gain

set #3 if within 100 counts (125 counts including hysteresis) of thesetpoint position

Page 16: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

44 6270 Motion Controller User Guide

Open Loop Operation

When the control algorithm is used, the whole servo system is a closed-loopsystem (see diagram below). It is called closed loop because the controlalgorithm accounts for both the command (position, velocity, tension, etc.)and the feedback data (from the LDT, encoder, or ANI input); therefore, itforms a closed loop of information flow.

LoadCommand Digital

ControlAlgorithm

ControlSignal

Offset

Drive Command =Control Signal + Offset

ServoValve

orDrive

Closed Loop System

Feedback Data

HydraulicCylinder,Motor,

etc.

Feedback Device(LDT, Encoder, or AN Input)

When all gains are set to zero, the digital control algorithm is essentiallydisabled and the system becomes an open loop system (see diagram below).Open loop operation could be used during system setup or troubleshooting sothat you can independently test the drive/motor or valve operation (theTuning Setup Procedure below demonstrates open-loop operation).

Load

ServoValve

orDrive

HydraulicCylinder,Motor,

etc.

Feedback Device(LDT, Encoder, or AN Input)

SOFFSOffset

Offset

Drive Command = OffsetOpen Loop System

There are methods of entering the open loop mode:

• Disable each individual positive and negative gain value. This allows thecontroller to monitor the position error and signal a fault if the maximum limit isexceeded.

• Issue the SFBØ command. This automatically invokes the following conditions:

- WARNING — The hardware and software end-of-travel limits aredisabled. Make sure that it is safe to operate without end-of-travel limitsbefore using the open-loop function.

- Gain values (SGILIM, SGAF, SGAFN, SGI, SGIN, SGP, etc.) set to zero (open-loop operation).

- SMPER value set to zero (position error is allowed to increase withoutcausing a fault).

- Subsequent attempts to change gain values or SMPER will cause an errormessage (“NOT ALLOWED IF SFBØ”).

- SOFFS and SOFFSN set to zero, but allows subsequent servo offset changesto affect motion.

- SSWG set to zero (disables the Setpoint Window Gains feature).- Disables output-on-position (OUTPA - OUTPD) functions.- Any subsequent changes to PSET, PSETCLR, SCLD, SCLA, SCLV, SOFFS, and

SOFFN are lost when another feedback source is selected.Recommendation — Use the Disable Drive On Kill mode, enabled with theKDRIVE command, so that the 6270 will shut down the valve/drive if a killcommand (e.g., !K) is executed or if a kill input is activated. CAUTION:Shutting down a valve/cylinder system returns the valve to the nullposition; shutting down a rotary drive system allows the load to freewheel ifthere is no brake installed.

Page 17: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

➃ Servo Tuning 45

Tuning Setup Procedure

Use the following procedure to set up your servo system before completing thetuning procedures. You can perform this procedure for both axessimultaneously.

Before you set up for tuning:Do not begin this procedure unless you are sure you have successfully completed thesesystem connection, test, and configuration procedures provided in Chapter 3:

• Connect the valve or the drive (especially the drive's shutdown output).• Connect and test the feedback devices.• Connect and test the end-of-travel limits.• Test the 6270's analog output.• Attach the load and the feedback devices as required for your application.• Configure the number of axes in use, drive fault level (if using a rotary drive), and

feedback device resolution.• Select the appropriate feedback source per axis with the SFB command (tuning

parameters for each axis are specific to the currently selected feedback source).

WARNING The tuning process requires operation of your system's electrical and mechanicalcomponents. Therefore, you should test your system for safety under all potential conditions.Failure to do so can result in damage to equipment and/or serious injury to personnel.

E M E R G E N C Y S H U T D O W N : You should be prepared to shut down the valve or driveduring the tuning process (for instance, if the system becomes unstable or experiences arunaway). You can use the EN B L input (disconnect it from ground) to disable the 6270'sanalog output signal. An alternative is to issue the @DRIVEØ command to the 6270 over thecommunication interface, but this requires connecting a shutdown output to the drive. If thedrive does not have a shutdown input, use a manual emergency stop switch to disable thevalve's/drive's power supply.

Step 1 Drive Users Only: If you are using a rotary drive, make sure the power tothe drive is off.

Step 2 Apply power to the 6270 only and issue the DRIVE11 command. Measure the6270's analog output between the CM D + and CM D - terminals on the DR IVEconnector with both an oscilloscope to check for noise and a digital volt-meter(DVM) to monitor the analog output. Both readings should be very close tozero. If an offset exists, ignore it for now; it will be taken care of later in step 8.

Step 3 If your system has mechanical stops, manually move the load to a positionmid-way between them.

Step 4 Enter these commands to zero all the gains and run the system in open loop:

Open-Loop Operation ☞ C ommand D escrip t ion> SGPØ,Ø Set the proportional feedback gain to zero> SGVØ,Ø Set the velocity feedback gain to zero> SGIØ,Ø Set the integral feedback gain to zero> SGVFØ,Ø Set the velocity feedforward gain to zero> SGAFØ,Ø Set the acceleration feedforward gain to zero

Step 5 Drive Users Only: Apply power to the drive. The motor shaft should bestationary or perhaps turning very slowly (velocity drives only). A smallvoltage to a torque drive, with little or no load attached, will cause it toaccelerate to its maximum velocity. Since the torque demand at such a lowvoltage is very small, you can prevent the shaft from moving by holding it.

Page 18: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

46 6270 Motion Controller User Guide

Step 6

☞The control method (voltageor current output) is selected

with internal jumpers. Thedefault is voltage output. If

you required current output,refer to the instructions in

Chapter 6 to change theappropriate jumpers.

Observe the 6270's analog output noise level on the oscilloscope. Typically, theideal noise level should be below 3.0mV, but inevitably you must determine theacceptable noise level for your application.

If the noise level is acceptable, proceed to Step 7. If the noise level is too high:

a. Turn all the power off and tie the earth grounds of all the electricalcomponents of your system to a single common earth ground point.

b. Shield the drive or valves properly and shield all the wiring thatinterconnect the components.

c. After you have completed a and b above, turn on the controller only andstart over from Step 2. If the noise level is still unacceptable, consult thenoise suppression techniques described in Appendix A.

Step 7 The purpose of this step is to ensure that a positive voltage on the 6270'sanalog control signal output (from the CM D + and CM D - terminals) results inthe feedback device counting in the positive direction.

a. Using the SMPER command, set the maximum allowable position error to 1inch by entering the SMPER1,1 command. This assumes the default scalingfactor (1 distance value = 432 counts, or 1 inch) is still in effect.

b. Enter the TFB command to check the current position of the feedbackdevices. Record this number for later use.

c. CAUTIONThe offset introduced in this step may cause an acceleration to a high speed, if there islittle or no load.

Enter the SOFFSØ.2 command to introduce an offset DAC output value of0.2V to make the servo mechanism move slowly in the positive (clockwiseor extension) direction. (Motion will stop when the maximum allowableposition error is exceeded.) If the load has a large stiction component, youmay need to use a larger offset (SOFFS command) to overcome stiction andaffect motion.

d. Use the TFB command again to observe the feedback device's position.The value should have increased from the value observed in Step 7.b.

As an alternative toswapping CMD+ and

CMD-, you could use theappropriate feedback

polarity reversalcommand (LDTPOL,

ENCPOL, or ANIPOL).

If the position reading decreases when using a positive SOFFS setting, turnoff the 6270 (and the drive, if using one) and swap the CM D + and CM D -connections either at the 6270 or at the valve/drive, whichever is moreaccessible (this will not work for servo valves/drives that do not acceptdifferential input). Then turn on the 6270 again, enter the DRIVE11command, and repeat Steps 4 through 7.d. before proceeding to Step 8.

e. Enter the SOFFSØ command to stop the motor, and enter the DRIVE11command to re-enable the drives.

Step 8 Having set the servo output offset to zero with the SOFFSØ command (see Step7.e.), read the 6270's analog output with the DVM to determine if there is anyoffset caused by the electrical interconnections between the 6270 and the valveor drive.

☞If you are using current control,

convert the offset frommilliamps to volts (output rangein mA ÷ 10V = mA/V) and enter

the result in the SOFFScommand.

If the DVM reads anything other than zero, enter the DVM's reading (but withthe opposite polarity) as the offset adjustment with the SOFFS command. Forexample, if the DVM reading is 0.015V, then enter SOFFS-Ø.Ø15. If, after doingthis, the reading is still not zero, then fine-tune it by trying SOFFS entries ofslightly different values until the DVM reading is between ±3.0mV.

Page 19: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

➃ Servo Tuning 47

Step 9 Drive Users Only: If you are using a velocity drive, motion may still beoccurring due to the drive's balance/offset setting. If so, adjust the drive'sbalance/offset until motion stops. Consult the drive's user documentationfor instructions.

Step 10 Proceed to the Drive Tuning Procedure section to tune the velocity drive (if youare using a torque drive or a valve, skip to the Controller Tuning Procedure).

Drive Tuning Procedure (Velocity Motor Drives Only)

The goals of the Drive Tuning Procedure are to:

1. Tune the drive to output the desired velocity at a given voltage from the 6270.2. Tune the drive (iteratively) to achieve the desired response.

NOTEBe sure to complete the Tuning Setup Procedure before proceeding with the following drivetuning procedure. Unlike the Tuning Setup Procedure, you must tune one axis at a time.

Step 1 Tune the drive to output the desired velocity at a given voltage from the 6270:

a. If your system has mechanical stops, manually move the load to aposition mid-way between them.

b. Enter the SOFFS command to set the 6270's output voltage to its maximumlevel, 10.0 volts (SOFFS1Ø for axis 1, or SOFFS,1Ø for axis 2).

c. Adjust the drive gain factor (sometimes called the tach gain) such that whenthe 6270's command output is 10V, the velocity just reaches its maximumvalue (check the velocity with the TVELA command). Refer to your drive'suser documentation if necessary.

EXAMPLESuppose your drive can run at a max. velocity of 7000 rpm (or 116.67 rps). If the drivegain factor is 20 rps/V, then the drive will reach the maximum velocity (116.67 rps) whenthe 6270's command output is only 5.833V. This means the full range of ±10V is not fullyusable. To use the full range of ±10V, the gain factor has to be adjusted to 11.667 rps/V.Drive manufactures usually provide a potentiometer for adjusting this gain factor. Somemanufacturers provide a few preset values selectable with jumpers or DIP switches.

Step 2 Tune the drive (iteratively) to achieve the desired response:

a. Enter the following commands to create and execute a step velocitycommand:

C ommand D escrip t ion> DEF STEP Begin definition of the program called STEP- @SGPØ Set the SGP gain to zero- @SGIØ Set the SGI gain to zero- @SGVØ Set the SGV gain to zero- @SGAFØ Set the SGAF gain to zero- @SGVFØ Set the SGVF gain to zero- @SMPERØ Disable checking the maximum allowable position error- @SOFFSØ.5 Set the command output to 0.5 volts- T1 Wait for 1 second- @SOFFSØ Set the command output to zero volts (stopping the motor)- @SMPER1 Re-enable checking the maximum allowable position error- END End definition of the program called STEP> STEP Execute the program called STEP (the motor will move for 1

second and then stop)

Page 20: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

48 6270 Motion Controller User Guide

b. Observe the plot of the commanded velocity versus the actual velocity onthe oscilloscope.

Using the tuning methods specified in the drive's user documentation,tune the drive to achieve a first-order response (no overshoot) asillustrated below—repeat Steps 2.a. and 3.b. as necessary.

Actual Velocity

Command Velocity

VE

LO

CIT

YTIME

Step 3 Proceed to the Controller Tuning Procedure section to tune the 6270.

Controller Tuning Procedure

The Controller Tuning Procedure leads you through the following steps:1. Setup up for tuning.2. Select the 6270's servo Sampling Frequency Ratios (SSFR).3. Set the Maximum Position Error (SMPER).4. Optimize the Proportional (SGP) and Velocity (SGV) gains.5. Use the Integral Feedback Gain (SGI) to reduce steady state error.6. Use the Velocity Feedforward Gain (SGVF) to reduce position error at constant

velocity.7. Use the Acceleration Feedforward Gain (SGAF) to reduce position error during

acceleration and deceleration.

Before you tune the 6270:Be sure to complete the Tuning Setup Procedure (and the Drive Tuning Procedure, if you areusing a velocity drive) before proceeding with the following tuning procedure. Unlike theTuning Setup Procedure, you must tune one axis at a time.

If your application requires switching between feedback sources on the same axis, then foreach feedback source on each axis you must select the feedback source with the SFBcommand and repeat steps 3-7.

Step 1 Set up for tuning:

Use a computer (with a terminal emulator) or a dumb terminal to enter thecommands noted in the steps below. To monitor system performance, youmay use visual inspection, or use an analog type position transducer(potentiometer, LVDT, RVDT, etc.) to pick up the load's or motor's positiondisplacement and monitor the transducer output on a digital storageoscilloscope.

Step 2 Select the sampling frequency ratios (SSFR) and max. position error (SMPER)

The 6270's control signal is computed by the digital signal processor (DSP).The velocity of the commanded position, the velocity of the feedback device'sposition, and the integral of the position error are used for various controlactions. These measurements are derived by the DSP from the positionvalues sampled periodically at a fixed rate; this sampling rate is called theservo sampling frequency (samples/second).

NOTEThe SSFR setting affects the dither frequency ratio (SDTFR setting) and the LDT position updaterate (LDTUPD setting). If the sampling rate is too fast for the LDT, position errors or bad LDTreads will occur. The occurrence of read errors can be monitored with the TAS and [ AS ]command bit #27. Refer to the SSFR, SDTFR, and LDTUPD command descriptions in the 6000Series Software Reference Guide for more details.

Page 21: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

➃ Servo Tuning 49

Higher sampling frequencies improve the accuracy of the velocity andintegral values derived. A higher sampling frequency can also improve thetracking of a rapidly changing or oscillating position. Therefore, the servosampling frequency is a key parameter that influences the servo system'sstability and closed loop bandwidth.

In addition to computing the 6270's control signal, the DSP also computes thecommanded position trajectory. When the servo sampling frequency isincreased, the motion trajectory update rate has to be decreased, and viceversa. The ratio between the servo sampling frequency and the trajectoryupdate rate, called the sampling frequency ratio, depends on the requirementsof your application and/or the dynamic characteristics of the system. TheServo Sampling Frequency Ratio (SSFR) command offers four selectable ratiosettings. These four ratios and the actual sampling frequencies and samplingperiods (reciprocal of sampling frequency) are shown below.

NOTEChanging the active axes with the INDAX command will change the SSFR ratio.

# of Axes SSFR Servo Sampling Update Motion Trajectory Update System UpdateActive

(INDAX)CommandSetting

Frequency(samples/sec.)

Period(µsec)

Frequency(samples/sec.)

Period(µsec)

Frequency(samples/sec.)

Period(µsec)

INDAX1 SSFR1 3030 330 3030 330 757 1320

INDAX1 SSFR2 4000 250 2000 500 500 2000

INDAX1 SSFR4 4651 215 1163 860 581 1720

INDAX1 SSFR8 4878 205 610 1640 610 1640

INDAX2 SSFR1 1667 600 1667 600 417 2400

INDAX2 SSFR2 2272 440 1136 880 568 1760

Default → INDAX2 SSFR4 2500 400 625 1600 625 1600

INDAX2 SSFR8 2667 375 333 3000 333 3000

The general rule to determining the proper SSFR value is to first select theslowest servo sampling frequency that is able to give a satisfactory response.This can be done by experiment or based on the closed-loop bandwidthrequirement for your application. (Keep in mind that increasing the SSFRvalue allows for higher bandwidths, but produces a rougher motion profile;conversely, decreasing the SSFR value provides a smoother profile, but makesthe servo system less stable and slower to respond.)

As an example, if your application requires a closed-loop bandwidth of300 Hz, you can determine the minimum servo sampling frequency by usingthe rule of thumb—setting the servo sampling frequency at least 8 timeshigher than the bandwidth frequency—the required minimum servosampling frequency would be 2400 Hz. If two axes are running (INDAX2), thenyou should try using the SSFR4 setting.

The table below provides guidelines for various application requirements.

Application Requirement SSFR1 SSFR2 SSFR4 SSFR8

XY Linear Interpolation ✔ ✔

Fast point-to-point motion ✔ ✔

Regulation (speed, torque, etc.) ✔ ✔

High natural frequency system ✔

Setting the Sampling Frequency RatioSelect a sampling ratio (with the SSFR command) appropriate to your system now, before youproceed to tune each gain.If you change the sampling frequency ratios (SSFR) after the tuning is complete and the newservo sampling frequency is lower than the previous one, the response may change (if yoursystem bandwidth is quite high) and you may have to re-tune the system.

Page 22: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

50 6270 Motion Controller User Guide

Step 3 Set the Maximum Position Error (SMPER):

The SMPER command allows you to set the maximum position error allowedbefore an error condition occurs. The position error, monitored once persystem update period, is the difference between the commanded position andthe actual position as read by the feedback device selected with the last SFBcommand. Larger values allow greater oscillations/motion when unstable;therefore, smaller SMPER values are safer.

When the position error exceeds the value entered by the SMPER command, anerror condition is latched (see TAS or AS bit #23) and the 6000 controllerissues a shutdown to the faulted axis and sets its analog output command tozero volts. To enable the system again, the appropriate DRIVE1 commandmust be issued, which also sets the commanded position equal to the actualfeedback device position (incremental devices will be zeroed).

If the SMPER value is set to zero, the position error condition is notmonitored, allowing the position error to accumulate without causing afault.

Step 4 Optimize the Proportional (SGP ) and Velocity (SGV ) gains (see illustration fortuning process):

a. Enter the following commands to create a step input profile (use a commain the first data field when tuning axis 2—e.g., D,1ØØ):

C ommand D escrip t ion> A999 Set acceleration to 999 units/sec2

> AD999 Set deceleration to 999 units/sec2

> V3Ø Set velocity to 30 units/sec> D1ØØ Set distance to 100 units

b. Start with an SGP command value of 0.5 (SGPØ.5 or SGP,Ø.5).

c. Enter the GO1 or GO,1 command depending on which axis is being tuned atthe time.

d. Observe the plot of the commanded position versus the actual position onthe oscilloscope. If the response is already very oscillatory, lower thegain (SGP); if it is sluggish (overdamped), increase the SGP gain.

Repeat Steps 4.c. and 4.d. until the response is slightly under-damped.

e. Start with an SGV command value of 0.1 (SGVØ.1 or SGV,Ø.1).

f . As you did in Step 4.c., enter GO1 or GO,1.

g. Observe the plot on the oscilloscope. If the response is sluggish(overdamped), reduce the SGV gain. Repeat Steps 4.f. and 4.g. until theresponse is slightly under-damped.

☞Refer to the Tuning

Scenario sectionlater in this chapterfor a case example.

h. The flow diagram below shows you how to get the values of theproportional and velocity feedback gains for the fastest, well-dampedresponse in a step-by-step fashion. The tuning principle here is based onthese four characteristics:• Increasing the proportional gain (SGP) can speed up the response time and

increase the damping.• Increasing the velocity feedback gain (SGV) can increase the damping more so

than the proportional gain can, but also may slow down the response time.• When the SGP gain is too high, it can cause instability.• When the SGV gain is too high, it can cause the motor (or valve, hydraulic

cylinder, etc.) to chatter.

Page 23: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

➃ Servo Tuning 51

START

OR

Increase SGPUNTIL

OR

Decrease SGVUNTIL Increase SGV

UNTIL

OR

OR

Decrease SGVUNTIL

STOP

OR

Decrease SGPUNTIL

OR

Decrease SGVUNTIL

Increase SGVUNTIL

Step 5 Use the Integral Feedback Gain (SGI ) to reduce steady state error:

☞Steady state position error is

described earlier in thePerformance Measurements

section.

a. Determine the steady state position error (the difference between thecommanded position and the actual position). You can determine thiserror value by the TPER command when the load is not moving.

NOTEIf the steady state position error is zero or so small that it is acceptable for yourapplication, you do not need to use the integral gain. For hydraulicapplications, it is usually best to use a small SGI value, or use SGIØ while moving anduse SGIn when stopped. The use of the Target Zone Settling Mode (STRGTE) isrecommended.

Page 24: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

52 6270 Motion Controller User Guide

b. If you have to enter the integral feedback gain to reduce the steady error,start out with a small value (e.g., SGIØ.1). After the gain is entered,observe two things from the response:

• Whether or not the magnitude of steady state error reduces

• Whether or not the steady state error reduces to zero at a faster rate

c. Keep increasing the gain to further improve these two measurements untilthe overshoot starts to increase and the response becomes oscillatory.

d. There are three things you can do at this point (If these three things do notwork, that means the integral gain is too high and you have to lower it.):

1st Lower the integral gain (SGI) value to reduce the overshoot.

☞If you are using current control,

convert the offset frommilliamps to volts and enter the

result in the SGILIMcommand.

2nd Check whether the 6270's analog output saturates the ±10V limit; you cando this by observing the signal from a digital oscilloscope. If it saturates,then lower the integral output limit by using the SGILIM command. Thisshould help reduce the overshoot and shorten the settling time.Sometimes, even if the analog output is not saturated, you can still reducethe overshoot by lowering SGILIM to a value less than the maximumoutput value. However, lowering it too much can impair the effectivenessof the integral feedback.

3rd You can still increase the velocity feedback gain (SGV value) further,provided that it is not already at the highest possible setting (causingthe motor or valve to chatter).

Step 6 Use the Velocity Feedforward Gain (SGVF) to reduce position error atconstant speed:

a. Execute a continuous (MC1 command) move, setting the acceleration,deceleration and velocity values appropriate to your application. Set theSGVF value to be the product of SGP ∗ SGV (if SGV = zero, set SGVF equal to SGP).

b. Check the position error at constant velocity by issuing the TPERcommand.

c. Increase SGVF to reduce the position error (repeat steps a and b asnecessary).

Step 7 Use the Acceleration Feedforward Gain (SGAF) to reduce position errorduring acceleration:

a. Execute a continuous (MC1 command) move, setting the acceleration,deceleration and velocity values appropriate to your application. Set SGAFto 0.01 (SGAFØ.Ø1).

b. Check the position error during acceleration by issuing the TPERcommand.

c. Increase SGAF to reduce the position error (repeat steps a and b asnecessary).

Page 25: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

➃ Servo Tuning 53

Tuning Scenario

This example shows how to obtain the highest possible proportional feedback(SGP) and velocity feedback (SGV) gains experimentally by using the flowdiagram illustrated earlier in Step 4 of the Tuning Procedure.

NOTEThe steps shown below (steps 1 - 11) represent the major steps of the process; the actualprogression between these steps usually requires several iterations.

The motion command used for this example is a step command with a stepsize of 100. The plots shown are as they might appear on a scope (X axis =time, Y axis = position).

Step 1 For a starting trial, we set theproportional feedback gain (SGP) to2. As you can see by the plot, theresponse is slow.

In the next step, we should increaseSGP until the response is slightlyunderdamped.

SGP = 2

Commanded Position

Actual Position

Step 2 With SGP equal to 15, the responsebecomes slightly underdamped (seeplot).

Therefore, we should introduce thevelocity feedback gain (SGV) to dampout the oscillation.

SGP = 15

Step 3 With SGV equal to 2, the responseturns out fairly well damped (seeplot).

At this point, the SGP should beraised again until oscillation orexcessive overshoot appears.

SGP = 15SGV = 2

Step 4 As we iteratively increase SGP to105, overshoot and chatteringbecomes significant (see plot). Thismeans either the SGV gain is too lowand/or the SGP is too high.

Next, we should try raising the SGVgain to see if it could damp out theovershoot and chattering.

SGP = 105SGV = 2

Step 5 After the SGV gain is raised to 2.6,the overshoot was reduced butchattering is still quite pronounced.This means either one or both of thegains is too high.

The next step should be to lower theSGV gain first.

SGP = 105SGV = 2.6

Page 26: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

54 6270 Motion Controller User Guide

Step 6 Lowering the SGV gain to 2.3 does nothelp reduce the chattering by much.

Therefore, we should lower the SGPgain until chattering stops.

SGP = 105SGV = 2.3

Step 7 Chattering stops after reducing theSGP gain to 85. However, theovershoot is still a little too high.

The next step should be to try raisingthe SGV to damp out the overshoot. SGP = 85

SGV = 2.3

Step 8 After raising the SGV gain to 2.4,overshoot is reduced a little, butchattering reappears. This meansthe gains are still too high.

Next, we should lower the SGV gainuntil chattering stops.

SGP = 85SGV = 2.4

Step 9 After lowering the SGV gain to 2.2(even less than in Step 7—2.3),chattering stops.

Next we should lower the SGP gain.SGP = 85SGV = 2.2

Step 10 Overshoot is reduced very little afterlowering the SGP gain to 70. (The SGVgain might have been lowered toomuch in Step 9.)

Next, we should try raising the SGVgain again until the overshoot isgone.

SGP = 70SGV = 2.2

Step 11 When we raised the SGV gain to 2.52,the step response became fast andvery stable.

SGP = 70SGV = 2.52

Page 27: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

➃ Servo Tuning 55

Target Zone (Move Completion Criteria)

Under default operation (Target ZoneMode not enabled), the 6270's movecompletion criteria is simply derivedfrom the move trajectory. The 6270considers the current preset move to becomplete when the commandedtrajectory has reached the desired targetposition; after that, subsequentcommands/moves can be executed forthat same axis. Consequently, the nextmove or external operation can beginbefore the actual position has settled tothe commanded position (see diagram).

Pos

ition

Time

Vel

ocity

Commanded

Actual

Actual

Commanded

Time

When the Target Zone Modeis not enabled, the move isconsidered to be completeand subsequent moves cannow be executed.

Move is actuallyCompleted

To prevent premature command execution before the actual position settlesinto the commanded position, use the Target Zone Mode. In this mode,enabled with the STRGTE command, the move cannot be considered completeuntil the actual position and actual velocity are within the target zone (thatis, within the distance zone defined by STRGTD and less than or equal to thevelocity defined by STRGTV). If the load does not settle into the target zonebefore the timeout period set with the STRGTT command, the 6270 detects atimeout error (see illustration below).

Refer to the ErrorHandling section in

the 6000 SeriesSoftware Reference

Guide for errorprogram examples

If the timeout error occurs, you can prevent subsequent command/moveexecution only if you enable the ERROR command to continually check forthis error condition, and when it occurs to branch to a programmed responseyou can define in the ERRORP program.

As an example (assuming scaling is enabled and default scaling values areused), setting the distance zone to ±0.01 inches (STRGTD.Ø1), the velocity zoneto ≤0.5 ips (STRGTVØ.5), and the timeout period to 1/2 second (STRGTT5ØØ), amove with a distance of 8 inches (D8) must end up between position 7.99 and8.01 and settle down to ≤0.5 ips within 500 ms (1/2 second) after thecommanded profile is complete.

Damping is critical. To ensure that a move settles within the distance zone, it must be damped tothe point that it will not move out of the zone in an oscillatory manner. Thishelps ensure the actual velocity falls within the target velocity zone set withthe STRGTV command (see illustration below).

Actual

STRGTD(Distance Zone)

STRGTV(Velocity Zone)

STRGTT(Timeout Period)

Pos

ition

Vel

ocity

Commanded

Failed Move Completion

Timeout Occurs,Error Bit Set

Commanded

Actual

Successful Move Completion

Time

Time

STRGTT(Timeout Period)

Pos

ition

Vel

ocity

Commanded Actual

Commanded

Time

Time

STRGTD(Distance Zone)

STRGTV(Velocity Zone)

Actual

MoveCompleted Move

Completed

TSTLT(Actual Settling Time)

Page 28: Servo Tuning - Motion Control · PDF fileServo Tuning 29 C H A P T E R Servo Tuning In a Hurry? You should tune the 6270 before attempting to execute any motion functions. At a minimum,

56 6270 Motion Controller User Guide

Checking theActual SettlingTime

Using the TSTLT command, you can display the actual time it took the lastmove to settle into the target zone (that is, within the distance zone definedby STRGTD and less than or equal to the velocity defined by STRGTV). Thereported value represents milliseconds. This command is usablewhether or not the Target Zone Settling Mode is enabled withthe STRGTE command.


Top Related