Share this

Servo drive optimization method for CNC systems

2026-04-06 03:34:54 · · #1

summary

The drive and motor data of each axis of a machine tool, such as the speed loop and position loop gain, directly affect the dynamic operating characteristics of the axis. Improper settings of these parameters can lead to vibrations during machine tool operation, servo motor noise, making machining impossible, and even damaging the lead screw and guide rails. Therefore, optimizing the drive parameters is essential to achieving good part machining accuracy.

Keywords: velocity loop; position loop; optimization

Currently, the main CNC systems configured on CNC machine tools are Japanese FANUC and German SIEMENS systems. Improving the dynamic characteristics of the servo drive system is a very important task that maintenance and debugging personnel must undertake.

The purpose of servo drive optimization is to achieve the best match between the electromechanical system and the machine tool, thereby obtaining optimal stability and dynamic performance. In CNC machine tools, mismatches between the electromechanical system and the machine tool often cause problems such as machine vibration, overcutting of machined parts, and poor surface quality. Servo drive optimization is especially essential in mold machining.

The servo drive of a CNC system includes three feedback loops: a position loop, a speed loop, and a current loop, as shown in Figure 1. The innermost loop has the fastest response speed, and the response speed of the intermediate loops must be higher than that of the outermost loop. Failure to adhere to this principle will result in vibration or poor response.

Figure 1 Servo system control loop

The general principle of servo optimization is that the position control loop should not exceed the response of the speed control loop. Therefore, to increase the position loop gain, the speed loop gain must be increased first. Simply increasing the position loop gain can easily cause machine tool vibration, leading to increased, rather than decreased, speed commands and positioning times. When performing servo optimization, the machine tool's mechanical properties must be understood, as system optimization is based on the mechanical assembly performance. This means ensuring not only the servo drive's responsiveness but also the high rigidity of the mechanical system.

Taking the Japanese FANUC 0iC system as an example, this article explains the servo drive optimization process in detail. The main process involves optimization and adjustment on the servo adjustment screen, as shown in Figure 2.

Figure 2 FANUC Servo Adjustment Screen

First, set bit 3 of function parameter P2003 to 1, set loop gain parameter P1825 to 3000, and increase speed gain parameter P2021 from 200. After each increase of 100, use JOG to move the coordinates to see if there is vibration, or to see if the servo waveform (TCMD) is smooth.

Note: Speed ​​gain = [Load inertia ratio (parameter P2021) + 256] / 256 * 100. The load inertia ratio represents the ratio of the motor's inertia to the load's inertia, which is directly related to the specific machine tool and must be adjusted.

Servo waveform display: Change parameter P3112#0 to 1 (after adjustment, be sure to restore it to 0), power off and then power on again. Set the sampling time to 5000. If adjusting the X-axis, set the data to 51, and check the actual speed.

Figure 3 Servo waveform setting screen

If the waveform is not smooth during startup (as shown in Figure 4), it indicates that the servo gain is insufficient and needs to be increased. If there are fluctuations in the straight line in the middle, it may be due to vibration caused by high gain, which can be changed by setting the parameter 2066=-10 (increasing the servo current loop by 250um).

Figure 4 Servo waveform display screen

N-Pulse Suppression: During adjustment, the increased speed gain caused a small-range oscillation (low frequency) when the machine tool stopped. This can be seen from the position error on the servo adjustment screen; without a command (when stopped), the error fluctuates around 0. This oscillation can be eliminated using the single-pulse suppression function. Adjust as follows:

a) Parameter 2003#4=1. If the oscillation varies within the range of 0-1, this parameter can be set.

b) Set parameter 2099 to 400

4) Explanation regarding 250um accelerated feedback:

The motor is elastically connected to the machine tool. The load inertia is greater than the motor inertia. When adjusting the load inertia ratio (greater than 512), vibrations of 50-150HZ will occur. In this case, do not reduce the value of the load inertia ratio; this parameter can be set to improve the situation.

This function multiplies the acceleration feedback gain by the differential value of the motor speed feedback signal, and uses the compensation torque command Tcmd to suppress the oscillation of the speed loop.

5) High gain in the speed and position loops improves the response and rigidity of the servo system. This reduces machining shape errors and increases positioning speed. This effect simplifies servo adjustment. HRV2 control improves the overall servo performance of the system. After servo adjustment with HRV2, HRV3 can be used to improve high-speed current control, enabling high-precision machining. Table 1-1 shows the standard HRV2 high-precision servo setting parameters.

Table: 1HRV2 High-Precision Servo Control Setting Parameters

Parameter number

Setting value

significance

Setup Instructions

2004

0X000011

HRV2 control effective

These three parameters are automatically set through motor parameter initialization. When initializing the motor parameters, the motor code number selected is the motor code in parentheses in the motor code table, which can achieve HRV2 control.

2040

Standard setting value

Current loop integral gain

2041

Standard setting value

Current loop proportional gain

2003#3

1

Effective PI control

2017#7

1

Speed ​​ring proportional term high-speed processing function

If the machine tool vibrates, this parameter can be set to 0.

2006#4

1

Speed ​​feedback readout is valid for 1ms

2016#3

1

The variable proportional gain function is active when stopped.

2119

2 (1µm detection)

20 (0.1um detection)

Variable proportional gain at stop: Stop judgment level (detection unit)

1825

5000

Servo loop gain

If the machine tool vibrates, reduce the value of this parameter.

2021

512

Speed ​​loop gain

If the machine tool vibrates, reduce the value of this parameter.

2202#1

1

Switching the cutting/rapid traverse speed loop gain is effective.

2107

150

Speed ​​loop gain during switching

The SIEMENS 810/840D system features an automatic optimization function. The drive system automatically tests and analyzes the frequency characteristics of the regulator under load to ensure the regulator's proportional gain and integral time constant. If the automatic optimization results are not ideal and fail to achieve the optimal control effect for the machine tool, manual optimization is required.

First, we will give a detailed introduction to the specific steps of automatic optimization for SIEMENS 810/840D.

Before optimization, the machine tool should be in JOG mode. In the screen shown in Figure 5, you can select Without PLC so that the PLC will not be effective during the optimization process.

Figure 5. 840D Automatic Image Optimization

Specific steps for optimizing the PCU50 axis in SIEMENS 840D:

1. Menu → Start → Drive/Servo Axis → Extension → Automatic Control Settings

2. In the automatic control settings window: set the upper and lower limits without PLC.

3. Press the start button on the right-hand vertical menu. The message "Start Mechanical System Measurement Part 1" will be displayed. → Confirm.

4. Press the "Program Start" button; the motor will rotate forward. Then, the message "Starting Mechanical System Measurement Part 2" will be displayed → "Confirm".

5. Press the "Program Start" button again; the motor will reverse. Then, the message "Starting currently controlled measurement" will appear → "Confirm".

6. Press the "Program Start" button again. Then, the message "Controller data calculation begins" will appear → "Confirm".

Window display:

7. Press the "Save" button in the vertical menu on the right, then the message "Start measuring speed control loop" will appear → "OK".

8. Press the "Start Program" button again. Manually modify the driver parameter 1407 as needed.

Automatic optimization does not always yield ideal results, and manual optimization is often necessary. Manual optimization typically begins by utilizing the results of automatic optimization to better determine the proportional gain and integral time constant of the regulator, building upon the original parameters. Finally, various filter control data are set based on measurement results to eliminate resonance points in the drive system.

Speed ​​control loop manual optimization

The speed control loop optimizes two key parameters: proportional gain and integral time constant. First, determine the proportional gain, then optimize the integral time constant. If the integral time constant MD1409 of the speed regulator is adjusted to 500ms, the integral element is effectively ineffective, and the PI speed regulator transforms into a P regulator. To determine the initial value of the proportional gain, start with a small value and gradually increase it until the machine tool resonates, producing a whistling sound from the servo motor. Multiply this initial proportional gain by 0.5 to obtain the initial value for the first measurement.

The reference frequency response is the most important method for optimizing Kp (MD1407) and Tn (MD1409). The amplitude (dB) and phase diagrams shown in Figure 1-6 after optimization illustrate how the actual speed follows the setpoint; 0dB indicates that the actual speed and the setpoint have the same amplitude; 0 phase indicates that the actual speed follows the setpoint with minimal delay. Manual optimization involves extensive and repeated adjustments to the Kp (MD1407) and Tn (MD1409) values ​​to maintain the frequency response amplitude within the widest possible range around 0dB without unstable oscillations. Continuous adjustment of filter parameters may also be necessary for further optimization.

Figure 6 Reference Frequency Response Diagram

Optimization of position control loop

Position loop optimization primarily involves optimizing the position regulator. The main control data affecting the position regulator is its servo gain factor, as it is closely related to the system's following error. Adjusting the position regulator's servo gain factor requires a high proportional gain in the speed regulator; therefore, optimizing the speed regulator is fundamental to adjusting the position regulator's characteristics.

The goal of adjusting the servo gain factor should be to minimize the system's following error. Increasing the servo gain factor can reduce the system's following error, but the servo gain factor should not be adjusted too high, otherwise it will lead to system overshoot or even oscillation. Generally, to obtain higher contour machining accuracy, the servo gain factor should be increased as much as possible. The servo gain factor is set in the machine tool parameters MD3220.

The simplest way to optimize the position adjuster is to observe its following characteristics. When the servo gain coefficient changes, you can see the change in following error on the operation panel, and determine whether the servo gain factor has reached its optimal level. As shown in Figure 7.

Figure 7 Axis Service Screen

Through debugging the speed and position loops of FANUC and SIEMENS systems, it was found that adjusting machine tool parameters is a complex and tedious task. Because the parameters are interconnected, repeated debugging and adjustments are necessary to determine the optimal parameters. The quality of parameter optimization directly determines the machining results.

Read next

CATDOLL 115CM Mimi TPE

Height: 115cm Weight: 19.5kg Shoulder Width: 29cm Bust/Waist/Hip: 57/53/64cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22