I. Basic Knowledge of Servo Systems
1. What is a servo system?
A servo system , also known as a follow-up system, is a feedback control system used to accurately follow or reproduce a process. A servo system is an automatic control system that enables the output controlled variables, such as the position, orientation, and state of an object, to follow any changes in the input target (or given value).
Its main task is to amplify, transform, and regulate power according to control commands, making the torque, speed, and position control of the drive device highly flexible and convenient. In many cases, a servo system specifically refers to a feedback control system where the controlled variable (the system's output) is mechanical displacement or displacement velocity and acceleration. Its function is to ensure that the output mechanical displacement (or rotation angle) accurately tracks the input displacement (or rotation angle). Its structural composition is not fundamentally different from other forms of feedback control systems.
Note: Servo systems refer not only to electrical servo systems composed of servo motors, but also to hydraulic servo systems composed of servo valves. This article mainly introduces servo motor systems.
2. What is a servo motor? How does it differ from a stepper motor?
Servo motors, also known as actuator motors, are used as actuators in automatic control systems to convert received electrical signals into angular displacement or angular velocity output on the motor shaft. They are divided into two main categories: DC and AC servo motors. Their main characteristics are: no self-rotation when the signal voltage is zero, and a uniform decrease in speed as the torque increases.
The characteristics of servo points will be explained more clearly here in comparison with those of stepper motors:
1. Different control precision
Two-phase hybrid stepper motors typically have step angles of 3.6° and 1.8°, while five-phase hybrid stepper motors typically have step angles of 0.72° and 0.36°. Some high-performance stepper motors also have even smaller step angles. For example, a stepper motor produced by Sitong Company for wire EDM machines has a step angle of 0.09°; a three-phase hybrid stepper motor produced by the German company BERGERLAHR has a step angle that can be set to 1.8°, 0.9°, 0.72°, 0.36°, 0.18°, 0.09°, 0.072°, and 0.036° via a DIP switch, making it compatible with both two-phase and five-phase hybrid stepper motors.
The control precision of an AC servo motor is ensured by a rotary encoder at the rear end of the motor shaft. Taking a Panasonic all-digital AC servo motor as an example, for a motor with a standard 2500-line encoder, due to the quadruple frequency technology used in the driver, its pulse equivalent is 360°/10000 = 0.036°. For a motor with a 17-bit encoder, the motor rotates once for every 2^17 = 131072 pulses received by the driver, meaning its pulse equivalent is 360°/131072 = 9.89 seconds. This is 1/655 of the pulse equivalent of a stepper motor with a step angle of 1.8°.
2. Different low-frequency characteristics
Stepper motors are prone to low-frequency vibration at low speeds. The vibration frequency is related to the load and driver performance, and is generally considered to be half of the motor's no-load starting frequency. This low-frequency vibration, determined by the working principle of stepper motors, is very detrimental to the normal operation of the machine. When stepper motors operate at low speeds, damping techniques should generally be used to overcome low-frequency vibration, such as adding dampers to the motor or using microstepping technology in the driver. AC servo motors operate very smoothly and do not exhibit vibration even at low speeds. AC servo systems have resonance suppression capabilities, which can cover insufficient mechanical rigidity, and the system has an internal frequency analysis function (FFT) that can detect mechanical resonance points, facilitating system adjustments.
3. Different torque-frequency characteristics
The output torque of a stepper motor decreases as the speed increases, and drops sharply at higher speeds. Therefore, its maximum operating speed is generally between 300 and 600 RPM. AC servo motors provide constant torque output, meaning they can output rated torque up to their rated speed (generally 2000 or 3000 RPM), and provide constant power output above the rated speed.
4. Different overload capacities
Stepper motors generally lack overload capacity. AC servo motors, on the other hand, have strong overload capacity. For example, Panasonic's AC servo system features both speed and torque overload capabilities. Its maximum torque is three times its rated torque, which can be used to overcome the inertial torque of inertial loads at startup. Because stepper motors lack this overload capacity, a motor with a larger torque is often selected to overcome this inertial torque during selection. However, the machine does not require such a large torque during normal operation, resulting in wasted torque.
5. Different operating performance
Stepper motors are controlled in an open-loop manner. Excessive starting frequency or load can easily lead to missed steps or stalling. Excessive stopping speed can cause overshoot. Therefore, to ensure control accuracy, the acceleration and deceleration issues must be properly addressed. AC servo drive systems, on the other hand, use closed-loop control. The driver can directly sample the feedback signal from the motor encoder, internally forming position and speed loops. Generally, the missed steps or overshoot issues of stepper motors are not present, resulting in more reliable control performance.
6. Different speed response performance
Stepper motors require 200–400 milliseconds to accelerate from a standstill to their operating speed (typically several hundred revolutions per minute). AC servo systems offer better acceleration performance. For example, the Panasonic MSMA400W AC servo motor accelerates from a standstill to its rated speed of 3000 RPM in just a few milliseconds, making it suitable for control applications requiring rapid start and stop.
3. What is an encoder? What types are there?
An encoder is a device that encodes signals (such as bitstreams) or data and converts them into a signal form that can be used for communication, transmission, and storage. An encoder converts angular displacement or linear displacement into electrical signals; the former is called a code disk, and the latter a code scale. It is a signal feedback device.
Encoders can be classified as follows.
1. Classified according to the different engraving methods of the code disk
(1) Incremental type: a pulse signal is emitted for every unit angle rotated (some emit sine and cosine signals, which are then subdivided and chopped to produce higher frequency pulses). Usually, the output consists of phase A, phase B, and phase Z. Phase A and phase B are pulse outputs that are delayed by 1/4 cycle. The forward and reverse directions can be distinguished based on the delay relationship. Moreover, the frequency can be multiplied by 2 or 4 by taking the rising and falling edges of phase A and phase B. Phase Z is a single-turn pulse, that is, one pulse is emitted for each turn.
(2) Absolute value type: For each reference angle, a unique binary value corresponding to that angle is emitted. Multiple positions can be recorded and measured through an external clocking device.
2. Classification by signal output type
It can be divided into: voltage output, open collector output, push-pull complementary output, and long-line drive output.
3. Classification by encoder mechanical mounting method
(1) Shaft type: The shaft type can be further divided into clamping flange type, synchronous flange type and servo mounting type, etc.
(2) Bushing type: Bushing type can be further divided into semi-hollow type, fully hollow type and large diameter type, etc.
4. Encoders can be classified according to their working principle into: photoelectric type, magnetoelectric type, and contact brush type.
4. How to implement servo control?
1. Servo motors primarily rely on pulses for positioning. Essentially, a servo motor receives one pulse and rotates by the angle corresponding to that pulse, thus achieving displacement. Because servo motors themselves have the function of emitting pulses, they emit a corresponding number of pulses for each rotation angle. This creates a feedback loop with the pulses received by the servo motor, or a closed loop. In this way, the system knows how many pulses were sent to the servo motor and how many were received, allowing for very precise control of the motor's rotation and achieving accurate positioning down to 0.001mm.
DC servo motors are divided into brushed and brushless motors. Brushed motors are low in cost, simple in structure, have high starting torque, wide speed range, and are easy to control. They require maintenance, but maintenance is convenient (replacing carbon brushes). They generate electromagnetic interference and have environmental requirements. Therefore, they can be used in cost-sensitive general industrial and civilian applications.
Brushless motors are small in size, lightweight, powerful, fast-responding, high-speed, low-inertia, smooth-rotating, and stable in torque. While their control is complex, they are easily made intelligent. Their electronic commutation is flexible, allowing for either square wave or sine wave commutation. The motors are maintenance-free, highly efficient, operate at low temperatures, have minimal electromagnetic radiation, and a long lifespan, making them suitable for various environments.
2. AC servo motors are also brushless motors, and they are divided into synchronous and asynchronous motors. Currently, synchronous motors are generally used in motion control because they have a wide power range and can achieve very high power. They have high inertia, low maximum rotational speed, and their speed decreases rapidly as power increases. Therefore, they are suitable for applications requiring low-speed, stable operation.
3. The rotor inside the servo motor is a permanent magnet. The U/V/W three-phase electricity controlled by the driver forms an electromagnetic field, and the rotor rotates under the influence of this magnetic field. At the same time, the encoder built into the motor feeds back signals to the driver. The driver compares the feedback value with the target value and adjusts the rotor's rotation angle accordingly. The accuracy of the servo motor depends on the accuracy (line count) of the encoder.
II. Debugging Steps
1. Initialize parameters
Before wiring, initialize the parameters. On the control card: select the control mode; clear the PID parameters; ensure the enable signal is off by default when the control card is powered on; save this state to ensure the control card is in this state when powered on again.
For servo motors: Set the control mode; enable external control; set the gear ratio of the encoder signal output; set the ratio between the control signal and the motor speed. Generally, it is recommended that the maximum design speed of the servo motor correspond to a control voltage of 9V.
2. Wiring
Power off the control card and connect the signal lines between the control card and the servo motor. The following lines are mandatory: the analog output line of the control card, the enable signal line, and the encoder signal line output by the servo motor. After verifying that the wiring is correct, power on the servo motor and the control card (and PC). The motor should not move at this point and can be easily rotated with external force. If not, check the enable signal settings and wiring. Rotate the motor with external force to check if the control card can correctly detect changes in motor position; otherwise, check the encoder signal wiring and settings.
3. Try the direction
In a closed-loop control system, if the feedback signal is in the wrong direction, the consequences will be disastrous. Enable the servo via the control card. The servo should then rotate at a low speed; this is the so-called "zero drift." Control cards typically have instructions or parameters to suppress zero drift. Use these instructions or parameters to see if the motor's speed and direction can be controlled by them.
If the motor cannot be controlled, check the analog wiring and control mode parameter settings. Confirm that a positive value results in the motor rotating forward and the encoder count increasing; a negative value results in the motor rotating backward and the encoder count decreasing. Do not use this method if the motor is under load and has limited travel. Do not apply excessive voltage during testing; below 1V is recommended. If the directions are inconsistent, modify the parameters on the control card or motor to make them consistent.
4. Suppress zero drift
In closed-loop control, zero drift can negatively impact control performance, and it's best to suppress it. Carefully adjust the zero drift suppression parameters on the control card or servo motor to bring the motor speed close to zero. Since zero drift itself has a degree of randomness, it's not necessary to require the motor speed to be absolutely zero.
5. Establish closed-loop control
Re-enable the servo enable signal via the control card. Input a small proportional gain on the control card; what constitutes "small" is subjective and can be determined by feel. If unsure, input the minimum value allowed by the control card. Enable the control card and the servo again. At this point, the motor should be able to roughly perform movements according to motion commands.
6. Adjust closed-loop parameters
Fine-tuning the control parameters to ensure the motor moves according to the control card's instructions is a necessary task, and this part relies heavily on experience, so we'll skip the details here.