Next Article in Journal
Bearing Fault Diagnosis Based on a Depthwise Separable Atrous Convolution and ASPP Hybrid Network
Previous Article in Journal
Measurement and Simulation Analysis of Noise and Vibration in a Combine Harvester Cab Based on Pivot Noise Transfer Function and Vibroacoustic Coupling Method
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Intelligent S-Curve Acceleration and Deceleration Algorithm in High-Precision Servo Motion Control

1
Intelligent Manufacturing College, Nanyang Institute of Technology, Nanyang 473000, China
2
Institute of Solid State Physics, Chinese Academy of Sciences, Hefei 230031, China
3
Henan Yasheng Electric Co., Ltd., Nanyang 473400, China
*
Author to whom correspondence should be addressed.
Machines 2026, 14(1), 91; https://doi.org/10.3390/machines14010091
Submission received: 16 November 2025 / Revised: 7 January 2026 / Accepted: 8 January 2026 / Published: 13 January 2026
(This article belongs to the Section Automation and Control Systems)

Abstract

To address the issues of vibration in high-speed machining and the challenge of balancing motion smoothness and precision, this paper proposes a cascade control method based on a single-neuron adaptive PID. The method employs a dual closed-loop structure with a position loop and a speed loop, each regulated by a single-neuron adaptive PI controller. By dynamically adjusting the connection weights of the neurons online, real-time tuning of the proportional and integral parameters is achieved, enabling the system to adaptively regulate the control action. Simulation and experimental results demonstrate that the proposed controller ensures a 100% positioning accuracy across diverse motion scenarios with less than 0.05% relative error, enables effectively smooth motion, and effectively suppresses machine tool vibration caused by acceleration and deceleration processes. This significantly improves the system’s dynamic response and motion smoothness, providing an effective solution for high-speed and high-precision machining control.

1. Introduction

In the fields of aerospace manufacturing and industrial high-speed servo motion control, the presence of a large number of short segments in motion trajectories can easily lead to workpiece overcut due to insufficient acceleration and deceleration processes, while frequent speed changes may also cause abnormal vibration of machine tools. Traditional speed control methods struggle to meet the demands of high-speed machining, as their frequent acceleration and deceleration during trajectory operation impose substantial impact on the machine structure, thereby hindering the achievement of high-speed and high-precision machining objectives [1].
As a critical component of motion control systems, acceleration and deceleration control regulates the input signals of servo or stepper motors in a systematic manner to achieve smooth speed transitions [2]. This approach aims at preventing motor stalling, reducing mechanical impact and wear, and optimizing the system’s velocity and trajectory response performance. In CNC machining, implementing smooth acceleration and deceleration control during tool start–stop and path transition processes facilitates the enhancement of machining efficiency, improvement of surface quality, and assurance of machining accuracy [3].
Currently, common acceleration and deceleration velocity profiles in CNC systems mainly include trapezoidal, exponential, S-curve, polynomial, and trigonometric function curves [4,5,6,7,8]. These curves differ in computational complexity and motion control performance, and their mathematical expressions can all be represented as time functions f ( t ) . Although their specific forms vary, the continuity of f ( t ) itself, as well as its first derivative (acceleration) and second derivative (jerk), serves as an important indicator for evaluating whether a velocity profile can enhance the motion smoothness of machine tools and achieve flexible machining.
Trapezoidal and exponential acceleration/deceleration profiles exhibit abrupt changes in acceleration [9], which can induce shocks during high-speed operation and are detrimental to the stable motion of machine tools. In contrast, polynomial curves of cubic and higher orders demonstrate continuity in both acceleration and jerk, while trigonometric curves possess the characteristic of continuity at any order of derivatives, making them theoretically well-suited for flexible machining [10]. However, both types of curves suffer from high computational complexity, and their overemphasis on smoothness leads to sluggish speed response, making it difficult to guarantee precise endpoint positioning in point-to-point motion under low-complexity constraints. In contrast, the S-curve acceleration/deceleration profile achieves a better balance between control complexity and positioning accuracy through an optimized algorithmic structure and control structures, making it more suitable for point-to-point motion control scenarios that require both precision and real-time performance [11].
The FPGA implementation of PID controllers has become a research hotspot [12]. Numerous achievements have been made both domestically and internationally regarding the integration of S-curve acceleration/deceleration algorithms and PID control methods with FPGA technology, leading to a wide range of applications. Chen et al. [13] addressed the challenge of balancing flexibility and low oscillation in S-curve speed regulation for open-loop stepper motor control by proposing a hybrid S-curve planning method. This method, implemented online using FPGA, significantly improves computational speed while ensuring positioning accuracy. Lu et al. [14] proposes a high-precision, vibration-suppressed 4th-order S-curve trajectory planning method for a novel multi-channel double crystal monochromator (DCM) in QXAFS. The method significantly improves positioning accuracy, reducing maximum tracking error to 5.9 arcsec at 36 Hz, compared to conventional trajectories. Liu et al. [15] addresses shock and jitter in a quadruple-speed manipulator caused by its long cantilever. It models the system, optimizes its motion trajectory, and validates improvements through experiments, achieving a minimal tracking error of 0.16 mm. Similarly, Cui et al. [16] tackled the issue of poor flexibility and difficulty in achieving low oscillation in S-curve speed regulation for open-loop stepper motor control. They introduced an online control method for a hybrid S-curve velocity profile. Kuo et al. [17] integrated S-curve trajectory planning into an advanced PID control scheme for a linear motor, serving as the core motion profile. Combined with other techniques, it enabled micron-level precision of 1.5 µm error within an ultra-fast settling time of 0.08 s. Olmedo-García et al. [18] proposes a fuzzy logic controller (Tsukamoto method) for DC motors, comparing it with a PID controller across parabolic, trapezoidal, and S-curve trajectories. Results confirm the fuzzy controller significantly reduces energy consumption up to 11.77% savings with statistical relevance. Wang et al. [19] proposes a compound control strategy for micro-brushed DC motors, integrating a double-loop structure, velocity profile, and optimized feedforward control, reducing the maximum tracking error from 23.75° to 2.7°. Wu G [20] introduces a modified S-curve trajectory algorithm with continuous jerk for robotic point-to-point tasks. It optimizes execution time under kinematic limits, maintains saturated acceleration/jerk for efficiency, and integrates multi-axis synchronization to enhance motion smoothness and reduce residual vibrations. Aunet and Hagen [21] implemented multi-mode control and S-curve planning for stepper motors on an Artix-7 FPGA, verifying its ability to control multiple motors in parallel while maintaining accuracy. However, they also concluded that the S-curve algorithm significantly increases computation complexity. Wu et al. [22] proposes an anti-windup PID control scheme combined with S-curve motion planning for X-Y tables. It effectively mitigates actuator saturation, reduces tracking errors to ±11.23 mm (X) and ±13.63 mm (Y), and improves positioning smoothness. Guo et al. [23] proposes a NURBS curve interpolation strategy for industrial robots, incorporating kinematic and dynamic constraints with S-curve feedrate planning to reduce roughness and contour error. Bussola et al. [24] presents an offline motion planning method that integrates curvature-based speed modulation with jerk- and acceleration-limited S-curves. It automatically smooths trajectories under dynamic constraints, reducing vibration and execution time. Fang, Y. et al. [25] presented a smooth and time-optimal S-curve trajectory planning method. This algorithm offers high curve smoothness and small time lag, effectively achieves smooth and continuous jerk, and reduces minor impacts. Wu and Zhang [26] proposed a jerk-continuous trajectory planning method for robotic arms based on a fourth-order S-curve. Utilizing a multi-axis synchronization algorithm, it achieves smooth motion and generates real-time trajectories that meet kinematic constraints without iterative optimization. Halinga et al. [27] proposes a motion planning method that simultaneously optimizes path and velocity to balance time and energy consumption, using multi-objective optimization and harmonic motion to smooth jerk for improved accuracy and energy savings.
In summary, although the S-curve acceleration/deceleration algorithm can achieve smooth speed control and further enhance curve smoothness by increasing the polynomial order, its high computational complexity is detrimental to precise position control. Although higher-order polynomials exhibit superior continuity, they are prone to increased oscillation and numerical precision degradation, which may instead lead to deterioration in motion performance [28]. Furthermore, the introduction of a large number of high-order terms not only increases the difficulty of solving polynomial coefficients but also imposes a significant computational burden.
In this paper, we propose an a high-precision S-curve profile with a single-neuron adaptive PI cascade controller for motion control. The method retains trapezoidal planning efficiency while ensuring jerk continuity. Its adaptive dual-loop control adjusts parameters online, significantly improving tracking accuracy and enabling precise positioning across varying motion conditions. This enhances motion smoothness and system responsiveness, as validated by simulations and experiments.

2. Analysis and Comparison of Traditional Algorithms

2.1. Trapezoidal Acceleration and Deceleration Control Algorithm

Figure 1 illustrates the trapezoidal acceleration/deceleration control, showing its position, velocity, acceleration, and jerk profiles. The motion comprises three phases: constant acceleration, constant velocity, and constant deceleration, with velocity changing linearly at the start and end [29].
Given the parameters of displacement L , initial velocity v s , constant velocity v c , final velocity v e , acceleration during the acceleration phase a = a m a x , and deceleration during the deceleration phase d = d m a x , the formula for trapezoidal acceleration can be expressed as follows:
a ( t ) = a ,   0 < t < t 1 0 ,   t 1 t < t 2 d ,   t 2 t < t 3
The formula for speed is expressed as:
v ( t ) = v s +   a m a x t ,                   0 < t < t 1 v c ,                                                     t 1 t < t 2 v c + d m a x ( t t 2 ) ,     t 2 t < t 3
The trapezoidal acceleration/deceleration algorithm is easy to implement but features a discontinuous acceleration profile. Abrupt changes during phase transitions can shock the motor, making it suited to low-smoothness applications like emergency braking or mining [30]. The displacement formula for trapezoidal acceleration, deceleration can be expressed as follows:
p ( t ) = v s t + 1 2 a · t 2 , 0 < t < t 1 v s t 1 + 1 2 a · t 1 2 + v c ( t - t 1 ) , t 1 t < t 2 v s t 1 + 1 2 a · t 1 2 + v c ( t - t 1 ) + 1 2 d ( t t 2 ) 2 , t 2 t < t 3
To determine the trapezoidal velocity profile, it is necessary to specify some parameters, while other parameters are determined based on the geometric relationships of the trajectory. However, the user-defined parameters may not always be simultaneously feasible. If a trajectory satisfying the given parameters does not exist, it becomes necessary to adjust the velocity parameters while ensuring that the displacement constraint is met and the velocity does not exceed the boundary limits.
If there is no constant velocity phase, the motion consists only of acceleration and deceleration phases. The maximum velocity reached during the motion is denoted as v f , and the following condition must be satisfied:
L = L a + L d = v f 2 v s 2 2 a + v e 2 v f 2 2 d
v f can be solved as:
v f = a v e 2 d v s 2 2 a d L a d
Now, based on the relationship between v f and v c , v e , v s , the time for acceleration, constant speed, and deceleration is calculated, respectively. The motion is shown in Figure 2.
(1)
v f > v c The presence of a constant speed section indicates that the displacement is long enough to accelerate to the specified constant speed and decelerate to the given final speed.
t 1 = ( v c v s ) / a t 2 = ( L v c 2 v s 2 2 a v e 2 v c 2 2 d ) / v c t 3 = ( v e v c ) / d
(2)
v s < v f < v e , without v c . The given final velocity cannot be achieved. Only the acceleration section exists, and the final velocity must be reduced to ensure that the displacement meets the conditions.
The final velocity is:
v e = v s 2 + 2 a L
The total motion time is:
T t o t a l = ( v e v s ) / a
(3)
v e < v f < v s , without v c . The given final velocity cannot be reached, and only the deceleration section exists. Replace acceleration in Equations (7) and (8) with deceleration, yielding the corresponding velocity versus total time.
(4)
v s < v f and v f > v e , without v c . There are only acceleration and deceleration segments, no uniform speed segment.
The duration of each segment is:
t 1 = ( v f v s ) / a t 2 = 0 t 3 = ( v e v f ) / d

2.2. Exponential Acceleration and Deceleration Control Algorithm

Figure 3 presents the parameters (position, velocity, acceleration, and jerk) for the exponential acceleration/deceleration algorithm. It features exponential acceleration, constant velocity, and exponential deceleration phases [31], with start/end velocities varying by a predefined law.
Traditional trapezoidal and exponential acceleration/deceleration algorithms suffer from impulse shocks (four for trapezoidal and two for exponential) that degrade motion smoothness and accuracy. The exponential algorithm, though less impulsive, is computationally complex. In this work, we introduce a single-neuron cascade PID controller for adaptive adjustment. The proposed method maintains simplicity, eliminates abrupt acceleration changes, and significantly improves motion smoothness, accuracy, and adaptability.

3. Path-Tracking Control Algorithm for S-Curve Acceleration and Deceleration Planning

Trapezoidal velocity planning suffers from discontinuous acceleration curves, which can introduce shocks detrimental to system operation. From a mechanical perspective, abrupt acceleration changes may cause equipment vibration or even structural damage [32]. To achieve precise positioning in high-speed servo motion, it is necessary to ensure not only positioning accuracy but also the continuity of jerk by adopting an S-curve acceleration/deceleration strategy. Accordingly, in this paper, we propose an improved S-curve planning method based on the trapezoidal framework, integrated with a single-neuron cascade PID controller to achieve high-precision position tracking.
Cascaded PID control systems are typically employed in complex control applications to achieve higher precision [33]. However, traditional cascaded PID controllers, with their fixed parameters, struggle to effectively handle nonlinear and time-varying operating conditions. In this paper, a single-neuron PID controller with self-learning and adaptive capabilities is introduced. By dynamically adjusting the neuron’s weighting coefficients through an iterative algorithm, the PID parameters are tuned in real time, enabling rapid and accurate position tracking and enhancing the control precision of the stepper motor. Given the sensitivity of the derivative term to high-frequency noise, and considering the presence of electromagnetic interference and sensor sampling noise in practical industrial motion control environments, the proposed single-neuron PID controller does not incorporate a derivative unit, retaining only the proportional and integral terms. The controller output drives the actuator, while the system output is fed back to the input, forming a closed-loop control structure. Figure 4 illustrates the configuration of this single-neuron PID controller.
Both the position loop and the speed loop employ a three-layer feedforward neural PID network, forming a dual closed-loop control structure with the outer loop for position control and the inner loop for speed control. The three-layer feedforward PID network consists of an input layer, a hidden layer, and an output layer. For the position layer, the input layer contains two neuron nodes that receive the target position input U p * and the actual rotor position U p from the encoder, respectively. The hidden layer comprises two neuron nodes responsible for implementing the proportional and integral functions. The output layer consists of a single neuron node that yields the computed result of the neural position PID, which serves as the reference input for the neural speed PID controller. This output is then processed along with the actual rotor speed feedback from the encoder. Finally, the computed result from the speed PID controller is delivered to the stepper motor. The system block diagram of the dual closed-loop position-speed control for the stepper motor using the single-neuron PID controller is shown in Figure 5. For clarity of presentation, the stepper motor driver is not included in the diagram.
As shown in the figure above, the block diagram consists of a speed loop and a position loop, forming a dual-loop control system. In the specific implementation of this system, the desired value and the feedback value are directly fed as two independent inputs into the single-neuron cascade PID controller. the error value is calculated, the controller adjusts the control signal in real time to drive the system, enabling the actual output to converge toward the desired value and thereby achieving the control objective. Considering the high-frequency noise interference associated with the derivative term, we employ the proportional and integral terms for control. The corresponding discrete-time system formula for the series-cascaded PID controller is as follows [34]:
Δ U k = U k U k 1 = k p e k e k 1 + k i e k
In a dual-loop control system, the control output of the position loop (outer loop) is the velocity signal v , with the desired position X r being the input and the actual position X the output. In this configuration, the control objective of the position loop is to ensure that the actual position X matches the desired position X r . The relationship between position and velocity can be described by an integral.
In this paper, since only the proportional and integral actions are employed, the discrete transfer function of the incremental PI controller for the position loop is given as follows:
G 1 z = k p 1 + k i 1 z z 1
In the dual-loop control system, it should be noted that both the inner and outer loops require an integrator for control, which corresponds to the integration relationship from position to velocity. In the discrete-time domain, this integration relationship can be expressed as follows:
G z 1 = T z z 1
If the sampling time period T is 1, then the integration relationship can be expressed as follows:
G z 1 = z z 1
The discrete transfer function of the incremental PI controller for the speed loop is given as follows:
G 2 z = k p 2 + k i 2 z z 1
Assuming the transfer function of the controlled plant (motor) is a first-order system:
G z 2 = G s = 1 s + 1
The system is discretized using the bilinear transformation. Let the sampling period be denoted as S :
S = 2 T 1 z 1 1 + z 1
Thus, the discrete transfer function of the controlled object is
G z 2 = 1 + z 1 3 z 1
The inner loop transfer function includes the transfer function of the inner loop PI controller and the controlled object:
G i n n n e r z = G 2 z G z 2 = k p 2 + k i 2 z z 1 1 + z 1 3 z 1
The transfer function of the position loop, speed loop PID controller, and the transfer function of the controlled object are concatenated to obtain the total transfer function:
G t o t a l z = G 1 z G z 1 G i n n n e r z = k p 1 + k i 1 z z 1 k p 2 + k i 2 z z 1 1 + z 1 3 z 1 2
The corresponding closed-loop transfer function is given as follows:
T ( z ) = Y ( z ) R ( z ) = G t o t a l ( z ) 1 + G t o t a l ( z )
The stability of the overall system depends on whether all the system poles lie inside the unit circle in the Z-plane. By setting the denominator of the closed-loop transfer function to zero and substituting the overall transfer function into it, we obtain the characteristic equation after simplification:
( z 1 ) 2 ( 3 z 1 ) + [ k p 1 ( z 1 ) + k i 1 z ] [ k p 2 ( z 1 ) + k i 2 z ] ( z + 1 ) = 0
Set A = [ k p 1 ( z 1 ) + k i 1 z ] and B = [ k p 2 ( z 1 ) + k i 2 z ] . Expansion yields a higher order polynomial, whose roots represent the poles of the closed-loop system:
D ( z ) = a n z n + a n 1 z n 1 + + a 1 z + a 0 = 0
The roots of this polynomial can be solved using the Jury stability criterion, and the root locus is determined by four parameters, K p 1 , K i 1 , K p 2 , and K i 2 , which correspond to the four weighting values at discrete time instants ( w p 1 ( k ) , w p 2 ( k ) , w v 1 ( k ) , and w v 2 ( k ) ). By dynamically adjusting these weights through the single-neuron PID control system, precise motion tracking is achieved.
The online adjustment of the weights enables real-time self-tuning of the cascaded single-neuron PID controller, with the supervised Hebb learning rule as its core mechanism. Specifically, for the position loop controller, let the position error input at time e p ( k ) = P * [ k ] P [ k ] , and the output velocity command be V * [ k ] . The proportional and integral weights are denoted as w p 1 ( k ) and w p 2 ( k ) , respectively, and are updated according to the following formulas:
w p 1 ( k + 1 ) = w p 1 ( k ) + η p 1 e p ( k ) x p 1 ( k )
w p 2 ( k + 1 ) = w p 2 ( k ) + η p 2 e p ( k ) x p 2 ( k )
η p 1 and η p 2 represent the learning rates for the proportional and integral terms, respectively. These adjustable parameters determine the step size and convergence speed of the value adjustments. x p 1 ( k ) = e p ( k ) denotes the proportional state, reflecting the magnitude of the current error, while x p 2 ( k ) = e p ( k ) e p ( k 1 ) indicates the status of the expression, reflects the accumulation and variation in the error over time.
The speed loop obtains the proportional and integral weight values in the same manner as the above formula; x v 1 ( k ) and x v 2 ( k ) , respectively, represent the speed error at the current moment and the historical cumulative sum of the speed error.
w v 1 ( k + 1 ) = w v 1 ( k ) + η v 1 e v ( k ) x v 1 ( k )
w v 2 ( k + 1 ) = w v 2 ( k ) + η v 2 e v ( k ) x v 2 ( k )
Speed error is expressed as e v ( k ) = V * [ k ] V [ k ] , the pulse output at time step k is represented as u ( k ) = u ( k 1 ) + Δ u ( k ) , which is used to drive the actuator.
u ( k ) = w v 1 ( k ) e v ( k ) + w v 2 ( k ) e v ( k )
Assume that the inputs to the neuron w v 1 ( k ) and w v 2 ( k ) are bounded. Furthermore, assume there exists a set of ideal constant weights w * v 1 and w * v 2 , when w * v 1 = w * v 2 , the steady-state tracking error is zero, e v ( k ) = 0 , The weight estimation errors are defined as w ˜ v i ( k ) = w v i * w v i ( k ) , A Lyapunov function candidate is defined as in Equation (28):
V ( k ) = 1 2 η v 1 w ˜ v 1 2 ( k ) + 1 2 η v 2 w ˜ v 2 2 ( k )
The forward difference Δ V ( k ) can be expressed as:
Δ V ( k ) = 1 2 η v 1 [ w ˜ v 1 2 ( k + 1 ) w ˜ v 1 2 ( k ) ] + 1 2 η v 2 [ w ˜ v 2 2 ( k + 1 ) w ˜ v 2 2 ( k ) ]
Substituting the weights from Equations (25) and (26) into the definition of the weight error and combining it with Equation (29), the following expression Δ V ( k ) is obtained:
Δ V ( k ) e v 2 ( k ) [ ( 1 η v 1 2 ) x v 1 2 ( k ) + ( 1 η v 2 2 ) x v 2 2 ( k ) ]
When the learning rates η v 1 and η v 2 are within the range of (0, 2), Δ V ( k ) 0 holds consistently. According to the Lyapunov stability proof, V ( k ) is non-increasing and has a lower bound, the velocity tracking error, e v ( k ) converges asymptotically to zero. Consequently, Δ w v i ( k ) tends to zero, meaning the weights w v i ( k ) cease to change and converge asymptotically to constant values. The smooth variation in the weights, denoted by lim k [ w ( k + 1 ) w ( k ) ] = 0 , ensures that the control input u ( k ) derived from the linear combination of the converged weights and the bounded errors according to Equation (27) is also smooth, and its increment Δ u ( k ) = u ( k ) u ( k 1 ) is bounded.
In a discrete-time system, the following equation holds:
a ( k ) v ( k ) v ( k 1 ) T s
j ( k ) a ( k ) a ( k 1 ) T s
Since acceleration a ( k ) is proportional to the velocity v ( k ) , and jerk is proportional to Δ 2 u ( k ) , the analysis above thus verifies the smoothness of the acceleration profile and the boundedness of the jerk, thereby guaranteeing the smoothness of the motion.
In each control cycle, the system sequentially performs three operations: computation, execution, and adjustment, enabling dynamic adaptive regulation. Based on the current error and weighting parameters, it calculates the optimal control quantity u ( k ) . When this quantity is transmitted to actuators like motors, the system responds by generating a new speed. The feedback then yields a new speed error, which drives the execution phase. Finally, the execution results are used to adjust the proportional weights and integral weights, thereby achieving intelligent control of the overall motion.
In this paper, we present a hierarchical single-neuron adaptive PI control scheme for a cascaded dual-loop system with an outer position loop and an inner velocity loop. Unlike traditional explicit multi-spline S-curve planning methods, the method proposed in this paper can adaptively adjust weight parameters. So the acceleration of the planned movement is smooth and the precise arrival of various complex movement situations is realized. Its core innovation lies in mapping traditional PI parameters to adaptive neuron connection weights. The position and velocity neuron controllers dynamically adjust their weights online based on tracking errors, enabling cooperative learning. This structure ensures precise positioning and dynamic response in the outer loop, along with smooth speed regulation and disturbance rejection in the inner loop. By omitting the derivative term, the system avoids high-frequency noise interference, significantly improving adaptability to nonlinear conditions while enhancing control performance.
Figure 6 displays position, velocity, acceleration, and jerk with single-neuron cascaded PID control.
Compared with traditional trapezoidal acceleration/deceleration, the proposed method, which integrates S-curve planning with a single-neuron PID controller, successfully achieves a smooth and continuous acceleration transition during start–stop phases. The single-neuron adaptive mechanism dynamically adjusts control parameters in real-time, effectively eliminating the mechanical shock caused by abrupt acceleration changes in trapezoidal algorithms. This significantly enhances the operational smoothness and control accuracy of the system. Furthermore, for the various intelligent S-curve motion scenarios described in Section 2.1, the system maintains precise motion positioning, which is attributed to the adaptive tracking capability of the single-neuron PID controller under varying conditions.

4. Simulation and Experiment

(1)
Simulation of Single-Neuron PID Control Weights
The learning rate is a hyperparameter that needs to be preset. Through training, a grid search was conducted on different combinations of learning rates using Maximal Jerk and Relative Error as metrics. After balancing these factors, a combination of learning rates with low Relative Error and low jerk peak was selected.
Taking the learning rates as 0.20, 0.20, 0.15, and 0.10, the single-neuron PID control algorithm was simulated in MATLAB R2021b environment, where the PC setup involved AMD Ryzen7 4800 H 2.90 GHz processor from Santa Clara, CA, USA and the normalized dynamic adjustment process of the proportional and integral weights is shown in Figure 7. The two sets of parameters for the cascaded PID inner and outer loops were dynamically adjusted separately after normalization. The results show that the weights of the control components underwent rapid adaptive adjustments during the initial stage and stabilized around 0.1 s, with continuous optimization of PID parameters. This verifies the excellent response speed and strong adaptive performance of the control strategy.
(2)
Simulation and Experimental Verification of Motion
In the actual test environment, the parameters were reconfigured as follows: the acceleration was set to 500 pulses/s2, initial speed to 1500 pulses/s, target speed to 3000 pulses/s, and target position to 30,000 pulses. The test was conducted with a sampling rate of 20 MHz. After the incorporation of the single-neuron PID controller for real-time parameter adjustment, the system was simulated in MATLAB. Furthermore, to validate the algorithm’s effectiveness, a comprehensive test platform was constructed, linking the program test board to a waveform recorder. The board was simultaneously connected to a three-axis test platform for experimental verification. The experimental setup is illustrated in Figure 8.
The entire motion cycle was recorded using a waveform recorder, capturing the actual PWM output during S-curve acceleration and deceleration. Figure 9 illustrates the resulting motion profile, highlighting the acceleration, constant-velocity (labeled 1), and deceleration (labeled 2) phases. The phase after deceleration is labeled as three. A detailed view of the constant-speed, deceleration, and post-deceleration phases reveals each PWM waveform’s duty cycle and control period. The constant-speed phase exhibits a higher duty cycle with denser pulses. During deceleration, both the pulse frequency and duty cycle gradually decrease, confirming the stability of the S-curve planning module. After deceleration, the duty cycle becomes significantly lower, and the waveform shows greater discontinuity.
The actual measured data are integrated to generate comparative plots of velocity, acceleration, and jerk, with the corresponding experimental results illustrated synchronously in Figure 10, Figure 11 and Figure 12.
After incorporating the single-neuron cascaded PID for regulation, the system’s velocity and acceleration curves exhibit excellent continuity and smoothness, with no abrupt changes or oscillations, which fully validates the superior performance of the proposed control strategy in ensuring overall motion smoothness. The method effectively mitigates the shock problems inherent in traditional algorithms during acceleration and deceleration, significantly improving motion steadiness.
By converting the peak change in acceleration during the motion, the values shown in Table 1 are obtained. Compared with other algorithms reported in the literature, the proposed intelligent S-curve algorithm yields a smaller maximum acceleration change, reflecting the overall system’s favorable smoothness characteristic. Motion is continuous at the C3 level, representing the continuity of the system’s jerk.
To comprehensively evaluate the tracking performance and dynamic adaptability of the system, physical experiments were conducted on a hardware platform. Real time comparison between the planned position and encoder feedback was performed via a motion control board to acquire tracking error. Four velocity profiles, designed from kinematic relations among initial, target, and final speeds, were applied to cover key motion states including acceleration, constant speed, deceleration, and composite motion. The detailed experimental configurations are provided in Table 2:
To evaluate the trajectory tracking performance of the system, this paper employs Maximum Error, Root Mean Square Error (RMSE), Relative Error, and Positioning Accuracy for comprehensive analysis. The specific results are shown in Table 3:
The system achieves 100% positioning accuracy under four different speeds with a 30,000-pulse stroke. The Maximum Error is 25.3 pulses, and the RMSE is significantly lower than the Maximum Error. Both the RMSE and Relative Error are minimal, demonstrating the system’s exceptional tracking precision and robust stability.
Experimental data were collected from the physical hardware system via the host computer, and the resulting path-tracking diagram for the intelligent S-curve acceleration/deceleration motion is shown in Figure 13. The figure clearly illustrates that the measured trajectory closely aligns with the planned path, with precise positioning achieved under all four test conditions.
The experimental results under multiple speed conditions demonstrate that the control architecture based on the single-neuron cascaded PID not only ensures smooth motion but also achieves high-precision position tracking, effectively guaranteeing accurate arrival at the target position.

5. Discussion

Compared with existing studies, this work explicitly addresses the challenge of achieving precise position control under smooth motion planning. Conventional methods, such as multi-spline curve fitting, often prioritize trajectory smoothness but may struggle to ensure terminal positioning accuracy in closed-form solutions, leading to discrepancies between planned and executed motion. The method proposed in this paper overcomes this limitation through parameter self-adaptation, effectively balancing smoothness with high positioning accuracy across various speeds and operational conditions. It is worth noting that only a limited number of existing publications on S-curve motion provide quantitative evaluations of terminal positioning accuracy. In contrast, this study systematically assesses motion accuracy and stability using four metrics: Maximum Error, RMSE, Relative Error, and Positioning Accuracy. Carabin G [37] developed an analytical method to minimize energy consumption in 1-DoF mechatronic systems for point-to-point motion, deriving a closed-form solution for various trajectory profiles, with numerical and experimental results validating its effectiveness in reducing energy expenditure. However, the study did not mention the Positioning Accuracy of its movement. Wu Z [38] proposes a novel point-to-point trajectory planning algorithm (PTPA) for industrial robots. It generates jerk-limited, time-optimal, and synchronized motion profiles. Experiments on a 6-axis robot confirm its efficiency, with all joint errors under 0.04° at the motion endpoint. Olmedo-García L F [18] implemented a Tsukamoto fuzzy logic controller for energy-efficient DC motor control. Compared to a PID controller tested with parabolic, trapezoidal, and S-curve trajectories, it achieved up to 11.77% energy reduction while maintaining tracking errors below 0.25%, with statistically validated results confirming its viability as a software-based energy-saving solution. In terms of tracking precision, the method proposed in this paper achieves a maximum relative error not exceeding 0.05%, and the Positioning Accuracy is 100%, which is superior to the results reported in the aforementioned literature.

6. Conclusions

In this paper, we propose an intelligent S-curve acceleration/deceleration method based on single-neuron cascade PID control to address the impact issues caused by abrupt acceleration changes in traditional trapezoidal algorithms. The method integrates the smooth planning of S-curves with the online parameter self-adjustment capability of single neurons, enabling adaptive and precise tracking of complex motion trajectories. The proposed method achieves a critical balance between motion smoothness and positioning accuracy, ensuring complete and precise arrival at the target position under various complex operating conditions—an aspect often overlooked in existing S-curve planning techniques. Furthermore, by adjusting the corresponding parameters of the single-neuron PID system algorithm, the overall smoothness of motion acceleration can be flexibly regulated. Experimental results demonstrate that the proposed method exhibits advantages in both high-precision positioning and smoothness. It effectively suppresses vibration and impact, and significantly improves the control performance and adaptability of the system, providing an effective intelligent solution for high-precision motion control.

Author Contributions

Conceptualization, F.L.; methodology, F.L.; validation, F.L.; formal analysis, N.L.; investigation, X.Y.; resources, N.L. and S.Z.; writing—original draft, N.L.; writing—review and editing, L.X.; visualization, L.X.; supervision, T.Z.; project administration, F.L.; funding acquisition, F.L. All authors have read and agreed to the published version of the manuscript.

Funding

The authors gratefully acknowledge the financial support provided by the Henan Provincial Natural Science Foundation (Grant No. 252300421932), Nanyang Major Special Project for Collaborative Innovation (Grant No. 22XTCX12005), Henan Province University-Enterprise Collaborative Innovation Project (Grant No. 26AXQXT079), Nanyang Major Science and Technology Special Project (Grant No. 25ZDZX010).

Data Availability Statement

The data presented in this study are available from the corresponding author upon reasonable request.

Conflicts of Interest

Author Shaoyu Zhao was employed by the company Henan Yasheng Electric Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Wang, Y.-L.; Zhang, Y.-B.; Cui, X.; Liang, X.-L.; Li, R.-Z.; Wang, R.-X.; Sharma, S.; Liu, M.-Z.; Gao, T.; Zhou, Z.-M.; et al. High-speed grinding: From mechanism to machine tool. Adv. Manuf. 2025, 13, 105–154. [Google Scholar] [CrossRef]
  2. Lin, Y.J.; Chou, P.H.; Yang, S.C. Parameter Identification and Controller Design for Limited-Angle Servo Motor Drives Using Acceleration Estimation Technique. In Proceedings of the IECON 2024–50th Annual Conference of the IEEE Industrial Electronics Society, Chicago, IL, USA, 3–6 November 2024; IEEE: New York, NY, USA, 2024; pp. 1–6. [Google Scholar]
  3. Kombarov, V.; Sorokin, V.; Tsegelnyk, Y.; Plankovskyy, S.; Aksonov, Y.; Fojtů, P. Smooth acceleration of transverse axis movements in CNC threading machining. Int. J. Mechatron. Appl. Mech. 2023, 2023, 219–225. [Google Scholar]
  4. Omirou, S.; Charalambos, C. Exploitation of the powerful capabilities of the parametric programming technique for maximizing the efficient operation of CNC machine tools. ResearchSquare 2023. preprint. [Google Scholar]
  5. Wang, Z.-M.; Xu, T.; Zhou, J. Machining accuracy reliability analysis of CNC machine tools based on product-of-exponential theory. J. Lanzhou Univ. Technol. 2025, 51, 46. [Google Scholar]
  6. Nie, M.; Zou, L.; Zhu, T. Jerk-continuous feedrate optimization method for NURBS interpolation. IEEE Access 2023, 11, 25664–25681. [Google Scholar] [CrossRef]
  7. Wang, Z.; Jian, Z.; Teng, X.U. Machining accuracy reliability analysis of multi-axis CNC machine tools based on polynomial chaos expansions. J. Lanzhou Univ. Technol. 2024, 50, 42–50. [Google Scholar]
  8. Boryga, M. Trajectory planning for tractor turning using the trigonometric transition curve. Agric. Eng. 2023, 27, 203–212. [Google Scholar] [CrossRef]
  9. Xiang, F.; Luo, Z. Research Status and Application of Acceleration and Deceleration Control Algorithms. In International Workshop of Advanced Manufacturing and Automation; Springer Nature: Singapore, 2024; pp. 58–65. [Google Scholar]
  10. Wei, J.; Sun, C.; Zhang, X.J.; Wang, E.J.; Law, D. An efficient and accurate interpolation method for parametric curve machining. Sci. Rep. 2022, 12, 16000. [Google Scholar] [CrossRef]
  11. Yu, D.Y.; Ding, Z.; Tian, X.Q. Incomplete smooth S-curve acceleration and deceleration feedrate planning modeling and analysis. Int. J. Adv. Manuf. Technol. 2022, 120, 7171–7185. [Google Scholar] [CrossRef]
  12. Ali, A.; Bingi, K.; Ibrahim, R.; Devan, P.A.M.; Devika, K. A review on FPGA implementation of fractional-order systems and PID controllers. AEU-Int. J. Electron. Commun. 2024, 177, 155218. [Google Scholar] [CrossRef]
  13. Chen, Z.; Gao, X.; Wang, A.; Liang, Z.; Zhang, X. An online open-loop S-curve velocity profile control method for stepping motors on FPGA. IEEE Trans. Ind. Electron. 2024, 71, 16452–16462. [Google Scholar] [CrossRef]
  14. Lu, H.; He, S.; Feng, Z.; Xiao, X. High precision fixed time 4-order S-curve trajectory planning for multi-channel double crystal monochromator. In Proceedings of the 2023 International Conference on Advanced Robotics and Mechatronics (ICARM), Sanya, China, 8–10 July 2023; IEEE: New York, NY, USA, 2023; pp. 786–791. [Google Scholar]
  15. Liu, Q.; Yan, J.; Yang, C.; Cheng, Y. Impact reduction design and control of quadruple-speed manipulator based on motion curve optimization. J. Braz. Soc. Mech. Sci. Eng. 2024, 46, 130. [Google Scholar] [CrossRef]
  16. Cui, J.; Du, Z.; Chen, N.; Liu, Q.; Xu, H.; Liu, Y.; An, H.; Li, H. Multi-axis Synchronous System Based on Adaptive S-Curve Algorithm. In Proceedings of the International Conference on Mechanical Manufacturing Technology and Material Engineering, Wuhan, China, 2–4 August 2024; Springer Nature: Singapore, 2024; pp. 12–19. [Google Scholar]
  17. Kuo, Y.L.; Cheng, P.L. Precision Position Control of a Permanent Magnet Linear Synchronous Motor Using Advanced PID Control. In Proceedings of the 2025 IEEE International Electric Machines & Drives Conference (IEMDC), Montreal, QC, Canada, 11–14 May 2025; IEEE: New York, NY, USA 2025; pp. 1280–1285. [Google Scholar]
  18. Olmedo-García, L.F.; García-Martínez, J.R.; Rodríguez-Reséndiz, J.; Dublan-Barragán, B.S.; Cruz-Miguel, E.E.; Barra-Vázquez, O.A. Tsukamoto fuzzy logic controller for motion control applications: Assessment of energy performance. Technologies 2025, 13, 387. [Google Scholar] [CrossRef]
  19. Wang, B.; Gou, M.; Yang, Z.; Qiu, S. A Synchronous Tracking Algorithm for Positioning Servo System with Double-loop Control. IEEE Trans. Ind. Appl. 2024, 61, 279–288. [Google Scholar] [CrossRef]
  20. Wu, G. Trajectory Synthesis with Four-Order S-Curve. In Parallel PnP Robots: Dynamic Control and Motion Planning; Springer Nature: Singapore, 2025; pp. 245–272. [Google Scholar]
  21. Aunet, S.; Hagen, A. FPGA Based Hybrid Stepper Motor Control. Master’s Thesis, NTNU, Trondheim, Norway, 2024. [Google Scholar]
  22. Wu, H.M.; Chen, C.W.; Nian, C.Y. Experimental Validation of Positioning Control for an X–Y Table Using S-Curve Velocity Trajectory. Machines 2025, 13, 363. [Google Scholar] [CrossRef]
  23. Guo, Y.; Niu, W.; Liu, H.; Zhang, Z.; Zheng, H. NURBS curve interpolation strategy for smooth motion of industrial robots. Mech. Mach. Theory 2025, 205, 105885. [Google Scholar] [CrossRef]
  24. Bussola, R.; Incerti, G.; Remino, C.; Tiboni, M. S-curve trajectory planning for industrial robots based on curvature radius. Robotics 2025, 14, 155. [Google Scholar] [CrossRef]
  25. Fang, Y.; Hu, J.; Liu, W.; Shao, Q.; Qi, J.; Peng, Y. Smooth and time-optimal S-curve trajectory planning for automated robots and machines. Mech. Mach. Theory 2019, 137, 127–153. [Google Scholar] [CrossRef]
  26. Wu, G.; Zhang, N. Kinematically Constrained Jerk–Continuous S-Curve Trajectory Planning in Joint Space for Industrial Robots. Electronics 2023, 12, 1135. [Google Scholar] [CrossRef]
  27. Halinga, M.S.; Nyobuya, H.J.; Uchiyama, N. Generation and experimental verification of time and energy optimal coverage motion for industrial machines using a modified S-curve trajectory. Int. J. Adv. Manuf. Technol. 2023, 125, 3593–3605. [Google Scholar] [CrossRef]
  28. Kombarov, V.; Sorokin, V.; Fojtů, O.; Aksonov, Y.; Kryzhyvets, Y. S-curve algorithm of acceleration/deceleration with smoothly-limited jerk in high-speed equipment control tasks. MM Sci. J. 2019, 2019, 3264–3270. [Google Scholar] [CrossRef]
  29. Yang, Z.; Wang, B.; Gou, M.; Qiu, S. A compound control strategy of micro-dc motor based on trapezoidal velocity profile and feedforward control. In Proceedings of the 2023 26th International Conference on Electrical Machines and Systems (ICEMS), Zhuhai, China, 5–8 November 2023; IEEE: New York, NY, USA, 2023; pp. 668–672. [Google Scholar]
  30. Fang, S.; Cao, J.; Zhang, Z.; Zhang, Q.; Cheng, W. Study on high-speed and smooth transfer of robot motion trajectory based on modified S-shaped acceleration/deceleration algorithm. IEEE Access 2020, 8, 199747–199758. [Google Scholar] [CrossRef]
  31. Bahar, A.; Meybodi, M.R.; Pozo, F.; Karami, S. Consistent Exponential Control Algorithm for Building Structures. Structures 2024, 70, 107528. [Google Scholar] [CrossRef]
  32. Agnello, A.; Dosch, J.; Metz, R.; Sill, R.; Walter, P. Acceleration sensing technologies for severe mechanical shock. Sound Vib. 2014, 48, 8–19. [Google Scholar]
  33. Shah, P.; Agashe, S. Review of fractional PID controller. Mechatronics 2016, 38, 29–41. [Google Scholar] [CrossRef]
  34. Zhang, S.; Chi, R. Model-free adaptive PID control for nonlinear discrete-time systems. Trans. Inst. Meas. Control 2020, 42, 1797–1807. [Google Scholar] [CrossRef]
  35. Macfarlane, S.; Croft, E.A. Jerk-bounded manipulator trajectory planning: Design for real-time applications. IEEE Trans. Robot. Autom. 2003, 19, 42–52. [Google Scholar] [CrossRef]
  36. Chettibi, T.; Lehtihet, H.E.; Haddad, M.; Hanchi, S. Minimum cost trajectory planning for industrial robots. Eur. J. Mech.-A/Solids 2004, 23, 703–715. [Google Scholar] [CrossRef]
  37. Carabin, G.; Vidoni, R. Energy-saving optimization method for point-to-point trajectories planned via standard primitives in 1-DoF mechatronic systems. Int. J. Adv. Manuf. Technol. 2021, 116, 331–344. [Google Scholar] [CrossRef]
  38. Wu, Z.; Chen, J.; Bao, T.; Wang, J.; Zhang, L.; Xu, F. A novel point-to-point trajectory planning algorithm for industrial robots based on a locally asymmetrical jerk motion profile. Processes 2022, 10, 728. [Google Scholar] [CrossRef]
Figure 1. Motion profiles of the traditional trapezoidal acceleration and deceleration algorithm: (a) position curve; (b) velocity curve; (c) acceleration curve; (d) jerk curve.
Figure 1. Motion profiles of the traditional trapezoidal acceleration and deceleration algorithm: (a) position curve; (b) velocity curve; (c) acceleration curve; (d) jerk curve.
Machines 14 00091 g001
Figure 2. Motion at different speeds: (a) v f > v c ; (b) v s < v f < v e ; (c) v e < v f < v s ; (d) v s < v f and v f > v e , without v c .
Figure 2. Motion at different speeds: (a) v f > v c ; (b) v s < v f < v e ; (c) v e < v f < v s ; (d) v s < v f and v f > v e , without v c .
Machines 14 00091 g002
Figure 3. Motion profiles of the exponent acceleration/deceleration algorithm: (a) position curve; (b) velocity curve; (c) acceleration curve; (d) jerk curve.
Figure 3. Motion profiles of the exponent acceleration/deceleration algorithm: (a) position curve; (b) velocity curve; (c) acceleration curve; (d) jerk curve.
Machines 14 00091 g003
Figure 4. Structure of the single-neuron-based PID controller.
Figure 4. Structure of the single-neuron-based PID controller.
Machines 14 00091 g004
Figure 5. Block diagram of a dual-closed-loop position and velocity control system.
Figure 5. Block diagram of a dual-closed-loop position and velocity control system.
Machines 14 00091 g005
Figure 6. Motion profiles: (a) position, (b) velocity, (c) acceleration, and (d) jerk under different smoothing factors.
Figure 6. Motion profiles: (a) position, (b) velocity, (c) acceleration, and (d) jerk under different smoothing factors.
Machines 14 00091 g006
Figure 7. The weight variation curve of the single-neuron PID controller.
Figure 7. The weight variation curve of the single-neuron PID controller.
Machines 14 00091 g007
Figure 8. Experimental setup diagram.
Figure 8. Experimental setup diagram.
Machines 14 00091 g008
Figure 9. Acceleration/deceleration PWM waveform diagram with single-neuron-based PID.
Figure 9. Acceleration/deceleration PWM waveform diagram with single-neuron-based PID.
Machines 14 00091 g009
Figure 10. Speed curve of waveform recorder for intelligent S-curve algorithm.
Figure 10. Speed curve of waveform recorder for intelligent S-curve algorithm.
Machines 14 00091 g010
Figure 11. Acceleration curve of waveform recorder for intelligent S-curve algorithm.
Figure 11. Acceleration curve of waveform recorder for intelligent S-curve algorithm.
Machines 14 00091 g011
Figure 12. Jerk curve of waveform recorder for intelligent S-curve algorithm.
Figure 12. Jerk curve of waveform recorder for intelligent S-curve algorithm.
Machines 14 00091 g012
Figure 13. Motion tracking under various speed states: (a) v e < v s < v f ; (b) v e < v f < v s ; (c) v s < v f < v e ; (d) v s < v e < v f .
Figure 13. Motion tracking under various speed states: (a) v e < v s < v f ; (b) v e < v f < v s ; (c) v s < v f < v e ; (d) v s < v e < v f .
Machines 14 00091 g013
Table 1. Comparison of the maximal jerk and continuity level of multiple planning modules.
Table 1. Comparison of the maximal jerk and continuity level of multiple planning modules.
Motion ModelMaximal Jerk [rad/s3]Continuity Level
Quintic Polynomial [35]40C2
Cubic Spine [36]39.83C2
Fourth-order S-curve [26]39.38C3
Intelligent S-curve35.52C3
Table 2. Setting of speed-related parameters under different motion conditions.
Table 2. Setting of speed-related parameters under different motion conditions.
GroupInitial Speed
(pul/s)
Target Speed
(pul/s)
End Speed
(pul/s)
Acceleration
(pul/s2)
Target Position
(pul)
11500300000.000530,000
23000150000.000530,000
30150030000.000530,000
40300015000.000530,000
Table 3. Planning motion error result.
Table 3. Planning motion error result.
GroupMaximum Error (pul)RMSE (pul)Relative ErrorPositioning Accuracy
115.61.830.0061%100%
27.30.6530.0022%100%
325.32.340.0448%100%
413.91.680.0056%100%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Liu, F.; Li, N.; Xiong, L.; Yang, X.; Zhao, S.; Zhai, T. Intelligent S-Curve Acceleration and Deceleration Algorithm in High-Precision Servo Motion Control. Machines 2026, 14, 91. https://doi.org/10.3390/machines14010091

AMA Style

Liu F, Li N, Xiong L, Yang X, Zhao S, Zhai T. Intelligent S-Curve Acceleration and Deceleration Algorithm in High-Precision Servo Motion Control. Machines. 2026; 14(1):91. https://doi.org/10.3390/machines14010091

Chicago/Turabian Style

Liu, Feng, Nian Li, Lei Xiong, Xu Yang, Shaoyu Zhao, and Tiansong Zhai. 2026. "Intelligent S-Curve Acceleration and Deceleration Algorithm in High-Precision Servo Motion Control" Machines 14, no. 1: 91. https://doi.org/10.3390/machines14010091

APA Style

Liu, F., Li, N., Xiong, L., Yang, X., Zhao, S., & Zhai, T. (2026). Intelligent S-Curve Acceleration and Deceleration Algorithm in High-Precision Servo Motion Control. Machines, 14(1), 91. https://doi.org/10.3390/machines14010091

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop