Charlotte Stonestreet
Managing Editor |

Home> | CONTROLS | >Motion Controls | >The basics of frequency response |

Home> | DRIVES & MOTORS | >Servo Motors & Drives | >The basics of frequency response |

Home> | CONTROLS | >Systems | >The basics of frequency response |

### Editor's Pick

# The basics of frequency response

30 June 2021

A correctly tuned servo system can enhance stability, precision and productivity, but how are these outcomes best achieved? Joseph Profeta explains

IF INHERENT system resonance becomes excited, instability will likely ensue. Generally, if motor safety parameters are set up correctly, this will cause noise and an error message indicating excess current to the motor, disabling the axis. However, mechanical damage can ensue when uncontrolled motion slams the load into the hardstop.

Consider an application example requiring output control of an inertial mass so a machine can move in a specific direction, or to a set position. Subtracting the feedback signal (Y) from the desired signal (Yd), gives an error signal (E), which the controller can use to give the machine an actuation signal (U). With a stable, robust controller, the output will track the desired input in the presence of both external disturbances (D) and some plant variation. Typical system outputs controlled are position, velocity, current, or force but any measurable variable can be subjected to closed loop control. Often, tuning takes place in the time domain, but engineers can use the frequency domain to optimise performance.

Using the frequency domain for tuning provides more information, which, in conjunction with time domain information, can enable optimal servo system performance for the specific motion required.

Basically, a frequency response is the system’s steady-state response to a sinusoidal input. For linear systems, the output and input frequencies are the same but may have differing magnitude and phase. At each frequency, output magnitude and phase is compared to input magnitude and phase. The magnitude and phase of this comparison is plotted against frequency – called a Bode plot. Most controllers have tools for measuring and collecting frequency response including discrete sinusoids, white noise and multi-sine methods.

FFTs (Fast Fourier Transforms) also study frequency content in a time signal. This can help find oscillation frequency. The Bode plot will provide more information such as resonance width and depth and the resonance effect on system stability.

**Applying the tools**

To apply the tools it helps to have a system model. By thinking of the system as a set of masses connected by springs and dampers, a mathematical model of the system can predict the system’s response to a specific input. Model complexity increases with masses considered - often a two-mass model suffices to predict first order responses, providing insight into system tuning.

Consider a linear axis with a load requiring accurate positioning. The task is to control the second mass position based on force applied to the first mass. Mass 2’s position will depend on the effects of the spring, damper, relative ratio of the masses and any system disturbances, e.g. friction created by bearings or errors due to the sensor measuring Mass 1’s position. It is not always possible or cost-effective to measure Mass 2’s position.

When considering system reaction to an input, two frequency domain parameters are relevant: bandwidth and damping. Higher bandwidth is synonymous with faster rise time and better system performance, while decreasing damping equates to more oscillation. High bandwidth and low damping usually imply higher throughput.

**Loop gain: pathway to stability**

When enabling an axis, uncontrollable slamming into the hardstop usually leads us to consider tuning. However, high pitch in a system may also indicate instability. It is preferable to tune the system such that it is robust, eliminating high pitches, oscillations and uncontrolled movements. When using the time domain, this is not always possible without unnecessarily lowering system performance by reducing bandwidth of a low pass filter until the resonant response is sufficiently dampened. By using the frequency domain it is possible to optimise notch filters to dampen the resonant response and keep the bandwidth higher than when just using time domain tuning techniques.

To do this, loop transmission response (or loop gain) is used. Theoretically, as long as there is minimal gain and phase margin, the system will be stable. Practical values for a robust system are a gain margin of at least 6dB and a phase margin at least 30°. The Gain margin is the difference from the 0dB line to the gain curve at the frequency where the phase crosses 180°. The Phase margin is measured from the phase curve to the 180° at the frequency where the loop gain crosses the 0dB line.

Consider the loop transmission of a system exhibiting resonance at 5 rad/sec. Here, a notch filter of similar depth and width can dampen machine resonance – although it still exists in the mechanical system, meaning it can be excited.

With the ‘notching out’ of resonance from the control loop, it becomes possible to increase overall system gain, extend bandwidth to provide faster rise times and increase machine performance. Below the plant is red, the notch filter green, and the resulting response black.

Whenever performing stabilisation, seek to aim for maximum bandwidth and minimum phase loss, although in practice, some judgement is usually required to determine the acceptable margin. When looking at a loop transmission plot, examine both the phase crossover frequencies for sufficient gain margin and areas around those points for low gain margins.

**Loop shaping, step by step**

Before tuning, tighten all bolts and level the machine.

For the control loop structure shown, the initial tuning step is setting gains Kpos and Kp to very low values with Kp=10Kpos and Ki=0. Use the standard autotune tool at a low bandwidth to get a good starting point for loop shaping. Autotune will stimulate the system with a series of sinusoids and calculate a basic set of gains with sufficient stability to run a loop transmission.

After collecting a loop transmission, identify the point of maximum phase in the plot, then maximise the crossover frequency based on the slope of the phase plot by increasing the magnitude response – being wary of resonant modes at low-to-mid frequency and keeping an eye on gain margin.

The next task is to introduce a low-pass filter. Set filter frequency as high as possible to minimal phase margin, but low enough to suppress sensor noise. However, ensure the filter is not set so low as to reduce machine performance. A good guide is to apply a low-pass filter at approximately 10 times the crossover frequency, avoiding phase loss.

Next, apply a notch filter on the centre frequency of any resonance. Adjust the depth and width of the notch to sufficiently flatten the gain curve at the notch. It should now be possible to raise the gain curve while maintaining sufficient gain margin and phase margin. Positive outcomes will include greater bandwidth, better axis stability, and higher machine throughput.

For best practice, use the time domain again to see how the system responds to specific machine operations, such as contouring, repeating as necessary. This process should be repeated at different system operating points.

Loop shaping on the system has many benefits, including the use of measured data rather than analytic models to understand the system’s resonant character, insight into non-linear effect, quantitative stability measures and, most importantly, improved system performance over tuning in the time domain alone.

*Joseph Profeta Ph.D. is director - control systems group, Aerotech*