Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tuning with SPiiPlus Controllers Time Domain Approach Boaz Kramer Control & Applications Development Manager Copyright 2006.

Similar presentations

Presentation on theme: "Tuning with SPiiPlus Controllers Time Domain Approach Boaz Kramer Control & Applications Development Manager Copyright 2006."— Presentation transcript:

1 Tuning with SPiiPlus Controllers Time Domain Approach Boaz Kramer Control & Applications Development Manager Copyright 2006

2 Basic Control System General control system can be divided into:
Controller – control laws Drive – power converter Machine – plant, motors and feedback devices The plant receives two types of signals: Controller output from the drive Disturbances Copyright 2006

3 Basic Control Principles
The goal of the control system: Make the plant follow the command “as good as possible” despite the presence of disturbances while ensuring that the system is stable. The process of tuning: Adjusting the parameters of the control laws to attain a quick, stable command response. Robust operation: Control laws must be designed with enough margins to accommodate reasonable changes in the system, and from one system to another, such as change in motor constant, driver gain… Copyright 2006

4 SPiiPlus Control Loops
Cascaded control loops structure, ideal for motion control applications: Current loop (external / internal drive) Velocity loop Position loop The position loop generates a command to the velocity loop. The velocity loop generates a command to the current loop. Copyright 2006

5 SPiiPlus Servo Algorithm
Position and Velocity Loops Copyright 2006

6 Tuning Approach (1) An inner loop should be faster than an outer loop
Current response should be faster than velocity response Velocity response should be faster than position response “Faster” => higher bandwidth The inner loops operates with higher bandwidth, at a higher frequency zone. Typical values of bandwidths : Current loop – 0.5 kHz- 1 kHz Velocity loop – 50 Hz – 200 Hz Position loop Hz – 50 Hz High Frequency zone Low Frequency zone Copyright 2006

7 Tuning Approach (2) Velocity loop Position loop Current loop Hz 50 200 1,000 An inner loop should be faster than an outer loop Current response should be faster than velocity response Velocity response should be faster than position response Each closed loop looks like a low pass filter To the velocity loop, the current closed loop looks almost like an amplifier with pure gain To the position loop, the velocity closed loop looks almost like an amplifier with pure gain Copyright 2006

8 Zone-based Tuning Approach (1)
A frequency zone-based tuning approach: Tune one loop at a time, in the following order: Current loop (the fastest control loop) Velocity loop Position loop (the slowest control loop While tuning a control loop, turn off all outer loops When tuning the current loop, turn off the velocity and position loops When tuning the velocity loop, turn off the position loop Inside the loop, turn off all low frequency elements and tune high frequency elements first The higher the bandwidth of an inner loop (= the internal loop responds faster), the better the stability of the outer loop. So the goal is to tune a loop the maximum bandwidth possible while keeping it stable and robust (= low sensitivity to small changes) Copyright 2006

9 Zone-based Tuning Approach (2)
Always tune the control loop with higher frequency zone first. Turn off all outer, slower loops and tune the inner loop first. Inside the loop turn off all lower frequency elements and tune high frequency elements first. When inner loop is tuned, it acts like a low-pass filter within the outer loop. Continue and tune the next outer loop. Higher bandwidth of internal loop (the internal loop responds faster) improves the stability of the external loop. Copyright 2006

10 Zone-based Tuning Approach (3)
Copyright 2006

11 Zone-based Tuning Approach (4)
High Frequency zone Low Frequency zone Current loop: SLIKP SLIKI Velocity loop: SLVSOF SLVKP SLVKI Position loop: SLPKP Tune the PI filter in the current loop (first proportional gain, then integral gain) Set the low pass filter to 700 Hz. Disable the Notch filter. Tune the PI filter in the velocity loop (first proportional gain, then integral gain) Tune the low-pass filter/ Notch filter to attenuate high-frequency resonances. Tune the P filter in the position loop Copyright 2006

12 Control algorithms in the SPiiPlus
Control elements used in the SPiiPlus control algorithm: PI filter Low pass filter Notch filter Copyright 2006

13 PI Filter (1) The proportional-integral (PI) filter is a basic control element. It is included in the current loop and velocity loop. In certain cases also in the position loop. Sum of two signals: One proportional to the error = P x Error One proportional to the integral of the error = The proportional term (SLxKP) provides responsiveness, affects the bandwidth (how fast the response is) The integral term (SLxKI) ensures that the average error is driven to zero. Copyright 2006

14 PI Filter (2) Frequency response of a PI filter: SLxKI/20 [Hz]
The proportional gain dominates the higher frequency zone. The integrator gain dominates the lower frequency zone. So, first tune the gain, while turning off the integrator! In SPiiPlus the frequency of the PI zero is always at: SLxKI/20 [Hz] SLxKI/20 [Hz] Copyright 2006

15 PI Filter (3) PI Filter Digital Implementation: Copyright 2006

16 Low Pass Filter (1) SPiiPlus provides a second order low-pass filter. In many cases, it can be used to increase the overall bandwidth of the velocity loop. It attenuates high frequency noise and resonances (=phenomenon in which the plant has high gain around one frequency). Bode plot of 2nd order low-pass filter with different damping factors. Copyright 2006

17 Low Pass Filter (2) The second order low-pass filter attenuates all signal components above a certain frequency. The frequency is specified by the SLVSOF variable. Filter damping is determined by SLVSOFD variable. In many cases a proper reduction of the low pass filter bandwidth (relative to its default value) allows to further increase the velocity gain. The major disadvantage of the second order low pass filter is that it affects stability by adding a significant amount of phase lag and thus reducing the phase margin. Usually, SLVSOF has to be times above the velocity loop bandwidth. Thumb rule: set SLVSOF=SLVKI. Copyright 2006

18 Notch Filter(1) SPiiPlus provides a Notch Filter. In many cases, it can be used to increase the overall bandwidth of the velocity loop. The Notch filter attenuates only a narrow band of frequencies. It is usually set above the bandwidth of the velocity loop. Bode plot of Notch filter with different widths Copyright 2006

19 Notch Filter(2) Notch filter advantage:
less phase lag contribution in comparison to the low-pass filter. Notch filter disadvantages Usually the transfer function of the plant has to be known in order to place the Notch filter properly. The Notch bandwidth has to be sufficiently wide : resonant frequencies may vary slightly in different machines of the same kind. The resonant frequency may depend also on the position of the axes. Copyright 2006

20 Notch Filter(3) Notch filter parameters: SLVNFRQ – Notch frequency
SLVNWID – Notch width (3 dB points) SLVNATT – attenuation (absolute units) It is not recommended to use the Notch filter before measuring the frequency response of the system using SPiiPlus FRF Analyzer. Copyright 2006

21 Before starting tuning…
Open the Adjuster Define the Safety Parameters Define the drive/motor/encoder parameters in Axis Setup dialog Copyright 2006

22 Important Safety Parameters
Critical position error: CERRI(idle) CERRV(velocity) CERRA(acceleration) RMS protection : XRMS (nominal current in %) XRMST (time constant in msec) Current limits: XCURI(idle) XCURV(velocity) Maximum velocity: XVEL has important effect on velocity scale factor! Maximum acceleration: XACC Copyright 2006

23 Axis Setup Define the following:
Control configuration: single loop or dual loop control. Drive type and parameters: DC amplifier, DC brushless amplifier with hardware or software commutation. Motor type and parameters: type, number of poles (for rotary motor), magnetic pitch (for linear motor). Encoder type and parameters: primary/secondary encoders, type (AQB, SIN-COS etc), resolution, multiplier(internal/external). Some parameters (like amplifier/motor ratings) are not used by the controller. Copyright 2006

24 Current Loop Tuning Open the Current Loop Adjustment in the Adjuster.
Set SLIKI to zero, or set it very low (like 100). Set SLIKP low (like 10). Apply a square wave : set the amplitude 5-10% Set the pulse length 4-10msec. Press “Run”. Raise SLIKP gradually as long as high frequency effects (noise) are not noticed and there is little or no overshoot. Changing SLIKI should not require returning to change SLIKP. Raise SLIKI starting with zero, until overshoot is excessive, usually 10% - 15%. Typical values : ,000 If later on, you notice that the current loop is noisy, then it is recommended to further reduce SLIKP. Copyright 2006

25 Current Loop Tuning Copyright 2006

26 Before Going on… Before going on to velocity and position loop tuning.
There are few additional steps that should be made Commutation for Brushless motors Open loop verification Copyright 2006

27 Commutation In any electrical motor, the electromagnetic torque is generated because of an interaction between a magnetic field and a current. The produced torque is proportional to the following cross product: where: :magnetic flux vector :current vector :angle between the vectors If the two vectors are perpendicular, the torque is proportional to the current, which is the basic and most important requirement for high performance servo action. Copyright 2006

28 DC –Brush Motor Commutation
The magnetic field is generated by permanent magnets. The brushes and commutator make sure the armature current is always maintained perpendicular to the magnetic field. Copyright 2006

29 Brushless Motor Commutation (1)
In case of DC Brushless motor (permanent magnet synchronous motor): The magnetic field is generated by the permanent magnets. 3-phase sinusoidal currents generate a current vector. “Sinusoidal Commutation”: The commutation angle f determines the current vector orientation. It is desirable to keep the current vector perpendicular to the magnetic field. Copyright 2006

30 Brushless Motor Commutation (2)
In the commutation process of brushless motors: A stationary current vector is generated.The motor “jumps” to align with it The current vector is then shifted 90. The current vector is maintained perpendicular: If the permanent magnet field moves, the current vector moves with it. Copyright 2006

31 Brushless Motor Commutation (3)
If the encoder is incremental, the process has to be repeated after each controller powerup. We have to distinguish between: Initial commutation adjustment (during the first setup) Commutation after each powerup. Initial commutation setup also includes: Phase sequence identification Commutation parameters verification Copyright 2006

32 Commutation Preferences (1)
First-time commutation is executed by running commutation setup from the Adjuster. Copyright 2006

33 Commutation Preferences (2)
Commutation Preferences Dialog: Copyright 2006

34 Commutation Preferences (3)
Excitation Current - define amplitude of generated current vector in %, sufficiently high to overcome system friction and active load. Default is 0.95 x XRMS. Search Velocity – determines velocity of commutation process in user units/second. It is recommended to set velocity between 1 – 1/5 of magnetic pitch per second. Settling Time - determines time assigned to motor for settling in detent points. Default is 1000 msec. Initial Commutation Offset – determines initial detent point in degrees. By setting a proper value (if known, for example, if the axis is known to rest close to a limit when off) user can avoid or decrease an initial motor jump. Default value is 0 degrees. Copyright 2006

35 Commutation Preferences (4)
Commutation Schemes –different commutation schemes are provided: “Detent Point” (default) – encoder based only. Index based commutation schemes: finds the correct commutation phase at the index. The value can be used later on in startup/homing programs. Hall commutation scheme (for SPiiPlus CM) – commutation is initiated based on Hall sensors, and closed-loop operation can start immediately after powerup. Maximum Search Distance – sets maximum allowed distance for searching for a limit or an index. Check Motor & Feedback Parameters Default (button) – loads default values. Copyright 2006

36 After Powerup…. Method 1: The Adjuster can generate a startup program based on the chosen commutation scheme. The program can be used as part of the homing routine. In all schemes the motor initially jumps to align with the current vector. Method 2: Use the “COMMUT” command: brings the current vector to the motor in closed-loop. The current vector can be controlled with high bandwidth and motor hardly moves. Method 3: Initial hall-based commutation: Move in six steps till the first hall transition and automatically switch to sinusoidal commutation. Copyright 2006

37 Commutation Method 1 When the commutation bit (MFLAGS.9) is off and motor is enabled: the commutation phase is incremented according to the desired position (“stepper mode”): KPOLE converts encoder counts to electrical degrees When fields are aligned it is assumed: DP=CP When MFLAGS.9 =0 and motor is disabled: the commutation phase is incremented according to the feedback position. When MFLAGS.9 =1 the commutation phase is incremented according to the feedback position and 90 degrees are added: Copyright 2006

38 Commutation Method 1 Example for Method 1: X_MFLAGS.9 = 0 ! Commutation bit off X_DCOM = ! Constant drive command ENABLE X ! Align fields WAIT ! Wait for motor to settle PTP/RVE X, X_SLCPRD/4 , X_SLCPRD/4 ! Move slowly WAIT ! Wait for motor to settle DISABLE X X_DCOM = ! Reset constant drive command X_MFLAGS.9= ! Commutation on STOP Q: Is it really required to move ? Q: What about hard stops ? Vertical axis ? Important note: When MFLAGS.9 = 0 the motor can be moved in stepper mode, without relaying on feedback. This is an important feature, that can also be used for troubleshooting the hardware ! Copyright 2006

39 COMMUT Command Closed loop control of the commutation phase:
Examples: COMMUT X !use default current and settling time COMMUT X, 10 !use 10% current and default settling time COMMUT X, 10, 1000 ! Use 10% current and 1000msec The algorithm is executed 3 times (3 “ticks”) to eliminate unstable equilibrium. Before using COMMUT for the first time: First time Adjustment must be performed. Motor has to adjusted with proper stability margins. Copyright 2006

40 Open Loop Verification
Required to eliminate positive feedback for DC motors. Positive drive command should yield positive move (=encoder counts up). Can be also used to compensate amplifier offset. In case of brushless motors: after the initial commutation process the polarity is guaranteed. Copyright 2006

41 Velocity Loop Tuning Set SLVKI to zero, or set it very low. Set SLVKP low. Enable the motor. If it is noisy – reduce SLVKP Apply a square wave velocity command and raise SLVKP no higher than the high frequency effects (noise, resonances) allow. When motor is noisy or oscillating, it is recommended to lower SLVKP by 50% (to ensure gain margin). Changing SLVKI should not require returning to change SLVKP. Raise SLVKI from zero until overshoot is excessive, usually 10% - 15%. Copyright 2006

42 Velocity Loop Tuning Copyright 2006

43 Effect of XVEL Parameter
Verify the value of the maximum velocity, XVEL before starting the velocity loop tuning! The parameter has two major roles: Limits the amplitude of the velocity command. Defines the feedback velocity scale factor. If XVEL is larger than 2E+6 counts/sec, the velocity scale factor is reduced proportionally to the XVEL parameter. This affects the dynamic range of the velocity gain SLVKP. Copyright 2006

44 Integrator Limit The integrator limit is used to prevent the integrator from exceeding a certain value. For the velocity loop the parameter is SLVLI. Default value -50%. The integrator limit should be sufficiently high, zeroing the velocity error while the system is moving at maximum constant velocity. The default value of 50% is usually adequate for many systems. Nevertheless, in some cases it is desirable to modify the value. If the value is too high it may cause undesirable overshoots or saturation, especially in high-inertia or short stroke systems. Copyright 2006

45 Position Loop Tuning The position loop is tuned after the velocity loop. The position loop includes a proportional gain KP. Apply a point-to-point profile with the highest-acceleration command to be used in the application. Increase KP to minimize the position error. Copyright 2006

46 Position Loop Tuning (2)
Copyright 2006

47 Position Loop Tuning (3)
If the velocity loop is properly tuned, the position loop bandwidth approximately equals KP (rad/sec) independent of the motor parameters. Copyright 2006

48 Velocity and Acceleration Feedforward
Feedforward compensations greatly improve the command response without producing stability problems. The ideal feedforward produces the expected command. Thus, the control loop only needs to add corrections due to disturbances. Velocity Feedforward – is set automatically to compensate the velocity feedback. As a result, the average position error is zeroed during constant velocity. Acceleration Feedforward (SLAFF)– should be tuned to maximally decrease the position error during acceleration and deceleration. Copyright 2006

49 Summary (1) The SPiiPlus provides a cascaded control loops structure: An internal current loop, a velocity loop on top of it and a position loop on top of the velocity loop. This structure is ideal for most motion control applications and allows easy and fast tuning using a frequency zone-based approach. Internal loops are tuned first, with the external loops disabled. The tuning goal should be to get the maximum bandwidth for each loop while maintaining its stability. A methodical tuning flow-chart was provided for each loop. High-order filters, like a 2nd order low pass and a Notch filter, can be used to attenuate resonances and further increase the system bandwidth. Advance commutation methods allow easy and reliable commutation of brushless motors. Copyright 2006

50 Summary (2) Further improvement can be achieved by using frequency response tools, like the SPiiPlus FRF Analyzer. The SPiiPlus standard control algorithm will result exceptional results in most motion control applications. Nevertheless, in very demanding applications a customized algorithm that was specifically tailored for an application can further improve performance ACS-Tech80 has established a Control and Application Development group to help customers optimize the performance of their machines and to provide them with a competitive advantage over their industry peers. Copyright 2006

51 Control & Application Development
Services provided by the Control & Application Development group include: Tailored customization of the standard servo algorithms offered in ACS-Tech80 products for specific applications Development of unique algorithms to maximize machine performance and modeling Simulation and analysis of control systems. Particular expertise has been gained in the following areas: Mitigation of mechanical resonances Non-linear control algorithms Dual loop systems Gantry systems Observers Control of special motors Gain scheduling techniques Disturbance rejection improvement Special motion profiles Copyright 2006

Download ppt "Tuning with SPiiPlus Controllers Time Domain Approach Boaz Kramer Control & Applications Development Manager Copyright 2006."

Similar presentations

Ads by Google