PID Control for Vibration

PID Control for Vibration: First Find the Frequency, Then Tune the Loop
Vibration control is different from ordinary temperature, pressure or level control. In a mechanical system, the important question is often not simply how large the error is, but at what frequency the system is moving and why that motion exists.
Servo axes, robots, flexible machines, winders, test rigs and precision positioning equipment can all suffer from unwanted oscillation. The result may be:
poor settling,
position error,
surface-quality problems,
mechanical fatigue,
audible noise,
or reduced machine speed.
A PID controller can be part of the solution, but it should not be treated as a universal vibration-cancellation device.
Before changing Kp, Ki or Kd, identify the dominant vibration frequency and determine whether the source is control-related, mechanical, or an external disturbance.
Not Every Vibration Is Resonance
A machine can vibrate because of:
rotor imbalance,
misalignment,
bearing faults,
gear mesh,
periodic process forces,
servo commands,
external mechanical excitation.
Mechanical resonance is a more specific condition. It occurs when the system is excited near one of its natural modes and the resulting motion becomes disproportionately large.
A flexible coupling, long shaft, belt system, gearbox, machine frame or high inertia ratio can introduce resonant modes.
This is why increasing servo control gains can sometimes make a machine noisier instead of more accurate.
Why Natural Frequency Matters
A mechanical structure stores and releases energy.
At particular frequencies, stiffness and inertia can combine to produce strong oscillation.
If the servo loop has significant gain near that frequency, the controller can unintentionally keep exciting the mechanical mode.
A machine may therefore behave quietly at moderate gains but begin producing a high-pitched sound or visible oscillation after tuning is made more aggressive.
The correct diagnosis is not automatically “the PID is unstable”. The control loop may simply have reached a mechanical resonance that limits usable bandwidth.
How Is Vibration Measured?
The feedback variable depends on the application.
Accelerometers are widely used for structural and machine vibration because they measure acceleration directly.
Velocity measurements can be useful for rotating machinery and overall vibration severity.
Displacement sensors can measure shaft or structural movement.
An encoder can reveal oscillation in a servo motor or mechanical axis.
But sensor location matters.
A motor encoder may show excellent motor-side position while the load on the other side of a flexible coupling continues to vibrate.
The controller can only react to what the feedback system actually measures.
Motor-Side Feedback Can Hide Load-Side Vibration
Consider a servo motor connected to a large load through a flexible shaft.
The motor encoder reports motor position accurately.
But the shaft twists under torque.
The motor may appear settled while the load is still oscillating.
This can become important in high-accuracy position control.
Depending on the machine, an additional load-side encoder, linear scale or accelerometer may provide information that cannot be obtained from the motor encoder alone.
What Do P, I and D Actually Do in a Vibration Problem?
Proportional action increases the restoring response to present error.
Higher P gain can improve stiffness and response, but it can also push control bandwidth closer to a mechanical resonant mode.
Integral action removes persistent or very-low-frequency offset.
This point is often described incorrectly in simplified PID articles:
Integral action does not automatically “integrate away” a periodic vibration.
A sinusoidal vibration repeatedly changes sign. An ordinary integrator is not a frequency-selective vibration cancellation filter.
Too much integral action may instead reduce phase margin and make low-frequency oscillation worse.
Derivative action responds to rate of change and can provide a damping-like effect in some systems.
However, mechanical vibration signals and accelerometer data often contain considerable high-frequency content. Excessive derivative action can therefore amplify measurement noise.
The general behaviour of these terms is covered in P, I and D components.
Why a Notch Filter Can Be More Useful Than More PID Gain
A notch filter is designed to reduce loop response over a narrow frequency band.
If mechanical analysis identifies a strong resonance at a particular frequency, the notch can reduce the amount of controller energy applied near that resonance.
This allows the machine to maintain useful loop gain at other frequencies without continuously exciting the problematic mechanical mode.
A notch filter is not a replacement for PID. It is a frequency-selective tool used to keep the control loop from strongly exciting a known resonant mode.
Servo manufacturers commonly include dedicated resonance-suppression functions because mechanical resonance cannot always be handled efficiently with ordinary Kp, Ki and Kd changes.
Notch Filter, Anti-Resonance and Vibration Suppression Are Not the Same Thing
Modern servo systems can provide several separate tuning tools.
For example, Yaskawa distinguishes:
notch filtering for particular higher-frequency resonances,
anti-resonance control for another mechanical resonance range,
and vibration suppression for lower-frequency load oscillation.
This distinction matters because a machine that rocks slowly after motion is not necessarily suffering from the same phenomenon as a servo mechanism producing a high-pitched resonant sound.
Using the correct control tool begins with identifying the frequency region.
Low-Frequency Load Oscillation Is a Different Problem
A machine frame or suspended load may oscillate at only a few hertz.
A flexible servo mechanism may resonate at hundreds of hertz or more.
Those problems have very different timing requirements.
Low-frequency oscillation may involve:
a large moving load,
long mechanical arms,
compliant machine frames,
low-frequency command excitation.
High-frequency resonance may come from:
motor coupling stiffness,
shafts,
belts,
gear teeth,
local structural modes.
Therefore “the machine vibrates” is not yet a useful control diagnosis.
Transient Vibration After a Move
A servo axis may complete a rapid position command and then continue oscillating around the target for several cycles.
This is often a settling or transient vibration problem.
The commanded acceleration or jerk may have excited a flexible mode in the load.
Reducing servo gain is one possible response, but not the only one.
Other approaches include:
input shaping,
lower jerk,
modified acceleration profiles,
load-vibration suppression,
mechanical damping.
This type of problem is closely connected with PID position control and motion-profile design.
Active Vibration Control
Active Vibration Control uses a sensor, control algorithm and actuator to generate a controlled force that reduces mechanical motion.
A simplified structure is:
Vibration sensor → Controller → Actuator → Mechanical structure
The actuator may be:
a servo motor,
a voice-coil actuator,
a piezo actuator,
an active mass,
or another electromechanical system.
The important requirement is not simply to apply force opposite to the current measured value.
The corrective force must arrive with suitable magnitude and phase.
Why Phase Delay Can Turn Damping into Excitation
A vibration-control system contains delay.
The sensor has response time.
The signal may pass through filters.
The controller needs computation time.
A network may add communication delay.
The actuator also has dynamics.
If the corrective force arrives too late, it may no longer oppose the mechanical motion.
Instead, it can add energy to the oscillation.
This makes real-time PID timing especially important in vibration applications.
Latency and jitter become phase errors.
Can a Standard PLC Control Mechanical Vibration?
Sometimes.
If the vibration frequency is low and the PLC has sufficiently fast and deterministic I/O and task execution, an outer vibration-control loop may be practical.
But a standard PLC is not automatically suitable for suppressing a resonance at several hundred hertz.
High-frequency vibration control may be better handled by:
the servo drive itself,
a dedicated motion controller,
DSP hardware,
an FPGA,
or a real-time industrial computer.
This is where PID with FPGA and PID with industrial PCs become relevant.
Sampling Rate Is Part of the Control Design
Digital vibration control does not observe continuous motion directly. It samples the signal.
According to the Nyquist principle, a frequency above half the sampling frequency cannot be represented correctly without aliasing.
But operating barely above the theoretical Nyquist limit is usually not enough for good feedback control.
Accurate amplitude and phase information requires a useful sampling margin above the intended control bandwidth.
Appropriate anti-alias filtering is also necessary.
If high-frequency vibration folds back into the measured frequency range, the controller may react to a frequency that is not really present there.
Accelerometer Wiring and Noise Matter
High-quality control cannot be built from a poor measurement.
Accelerometer and other low-level analog signals may be affected by:
switching power supplies,
inverter cables,
ground currents,
electromagnetic interference,
physical cable movement.
Good cable routing, grounding, differential measurement and appropriate filtering are part of vibration-system design.
This is directly related to industrial analog signal quality.
FFT Helps Answer “What Frequency Is the Problem?”
A time-domain trend shows that the machine is oscillating.
An FFT - Fast Fourier Transform helps show where vibration energy is concentrated in frequency.
For example, a strong peak around 320 Hz can point the engineer toward a mechanical mode or periodic excitation in that region.
This is why servo tuning software often provides mechanical-analysis or FFT-type functions.
A notch filter becomes meaningful only after a target frequency is known.
Torque Oscillation Can Be the Source of Mechanical Vibration
The vibration sensor is not always the origin of the problem.
If motor torque repeatedly oscillates, the drive is applying a periodic force to the mechanical structure.
The problem may therefore begin in:
the speed loop,
the current loop,
the torque command,
or interaction with mechanical resonance.
This connects vibration control directly to PID torque control and current control.
If torque-command and motor-current trends contain the same dominant frequency as the mechanical vibration, the control system may be feeding the mode.
Speed-Loop Tuning Can Excite Resonance
The servo speed loop is another common source of interaction.
Higher velocity-loop gain can increase disturbance rejection and stiffness, but only while adequate phase margin remains.
Once the loop approaches a flexible mechanical mode, additional gain may produce:
audible resonance,
speed ripple,
torque ripple,
position oscillation.
Servo tuning therefore cannot be separated from mechanical frequency response.
Passive Mechanical Fixes Can Be Better Than Active Control
Not every vibration should be solved in software.
If the machine has:
a loose mounting,
poor balancing,
a weak frame,
a damaged bearing,
an unsuitable coupling,
or excessive mechanical compliance,
the correct solution may be mechanical.
Increasing stiffness, improving balance, adding damping or correcting alignment can provide more reliable improvement than adding another controller.
A PID loop cannot turn a mechanically defective machine into a rigid structure.
Resonant Frequency Can Change with Load
A machine does not always have one fixed resonance under all conditions.
Payload, roll diameter, robot configuration or moving mass can change:
effective inertia,
structural stiffness,
resonant frequency.
A fixed notch tuned for one operating point may no longer line up correctly after the machine configuration changes.
Applications with strongly changing mechanical dynamics may therefore benefit from:
adaptive notch filters,
gain scheduling,
operating-region-specific tuning.
This illustrates one of the differences between fixed PID and the wider approaches described in PID and other control strategies.
How Should PID Tuning Be Approached?
First confirm that the mechanical system is healthy.
Then determine the dominant vibration frequency and identify whether the mode is load-side, motor-side or structural.
When increasing proportional gain, observe:
settling time,
oscillation amplitude,
resonant noise,
position error,
torque ripple.
Use integral action only where persistent low-frequency error actually requires it.
Use derivative or damping effects with attention to sensor noise and phase.
General tuning principles are covered in PID gain and tuning.
What Should Be Recorded During Vibration Troubleshooting?
Where possible, record the following signals on the same time base:
Acceleration or vibration signal
Position error
Motor velocity
Torque command
Motor current
Servo or PID output
Limit states
Machine operating speed
A normal SCADA trend may be useful for slow machine oscillations.
For fast servo resonance, use a high-speed drive trace or data-acquisition system instead of assuming the SCADA historian sampled fast enough.
Common Vibration-Control Problems
A high-pitched sound appears as servo gain is increased: investigate high-frequency mechanical resonance and notch filtering.
The load continues rocking after the commanded move has finished: investigate low-frequency load vibration, command shaping, jerk and vibration-suppression functions.
The motor encoder looks stable but the machine still shakes: inspect load-side compliance and consider additional load-side measurement.
The accelerometer signal is noisy: inspect sensor mounting, cable routing, grounding, sample rate and anti-alias filtering.
The controller increases vibration rather than reducing it: verify control direction, phase delay and real-time timing.
The vibration only appears at one machine speed: rotational excitation or one of its harmonics may be crossing a mechanical natural frequency.
The machine behaves well with one payload and poorly with another: inertia and resonant frequency may have changed.
A notch filter works in one operating region but not another: the resonance may be moving with the mechanical configuration.
For general feedback problems, see PID troubleshooting.
Typical Applications
Servo machinery: reducing settling oscillation and resonance after high-speed motion.
Robotics: flexible-link vibration and configuration-dependent resonances.
Winders: roll and structural oscillation as diameter and inertia change.
Precision manufacturing: reducing vibration in cutting, printing, inspection and surface-processing machinery.
Test equipment: generating or suppressing controlled mechanical vibration.
Active isolation platforms: protecting precision optical or measurement equipment from environmental vibration.
In many of these systems, motion control and vibration suppression are two layers of the same machine-control architecture.
Vibration-Control Commissioning Check
1. Has the mechanical source of the vibration been investigated?
2. Is the dominant vibration frequency known?
3. Is the sensor mounted at the location that matters to the process?
4. Have motor-side and load-side motion been separated?
5. Is the sample rate adequate for the frequency range being controlled?
6. Is anti-alias filtering appropriate?
7. Are latency and jitter low enough for the required bandwidth?
8. Is the servo gain exciting a mechanical mode?
9. Is the notch or anti-resonance filter centred on the real problem frequency?
10. Is integral action genuinely required?
11. Is derivative or damping action amplifying sensor noise?
12. Is the motion profile exciting the structure unnecessarily?
13. Has the mechanical system been repaired or stiffened where appropriate?
14. Has an FFT or high-speed servo trace been captured?
15. Has the final setting been verified across real load and speed conditions?
Related PID, Servo and Vibration-Control Topics
PID and motion fundamentals: What Is PID? - PID with Servo Motors - Motion Control - Encoders
Servo-loop interaction: PID Position Control - PID Speed Control - PID Torque Control - PID Current Control
Tuning and timing: PID Gain and Tuning - Time Delay and System Dynamics - Real-Time PID - PID Troubleshooting
Control platforms and advanced methods: PID with PLCs - PID with Industrial PCs - PID with FPGA - PID and Other Control Strategies
Vibration suppression is a frequency-domain as well as a feedback-control problem. PID gains, mechanical resonances, sensor location, actuator bandwidth, sampling rate, phase delay and structural dynamics should be considered together rather than tuning the controller in isolation.