## 2 The Mathematical Model
### The Mathematical Basis of Feedback and Feedforward Control  
In a feedback control system, the feedback object is controlled by deviation. When interference is present, the controlled variable initially strays from the desired value, prompting the regulator to carry out corrective action based on this deviation to counteract the interference. With continuous interference, the system consistently lags behind, and this ultimately results in a steady-state tracking error, impacting the system's final trajectory and leading to machine errors.  
Feedforward control operates as an open-loop control system that adjusts in response to disturbances; when a disturbance affects the system, corrective action is immediately triggered based on the level of the disturbance. In theory, feedforward control can effectively eliminate any deviations caused by disturbances. Because the positioning accuracy of the permanent magnet synchronous motor cannot meet the requirements of the high-precision servo system and the dynamic response speed of the position is slow, there is a large tracking error, and there is still much room for improvement. Therefore, a differential feedforward link is added between the given signal and the given speed output to improve the dynamic tracking performance for the system's position and reduce the position dynamic tracking error to a certain extent [23].  
Additionally, the primary role of feedforward control is to increase the system's bandwidth, alleviate the controller's workload, and decouple the nonlinear components. Most of the current control methods rely on differential adjustments. This means that when the system's output deviates from its expected value, it adjusts based on that deviation. In contrast, feedforward control monitors the amplitude and behavior of the disturbance signals. The feedforward controller then responds correspondingly to compensate for these disturbances in advance. This proactive approach minimizes the impact of interference on the system's output, thereby achieving a stable output.  
Moreover, feedforward control enables direct control without delay, which enhances the system's response rate. However, it requires an accurate understanding of the controlled object's model and the system characteristics. Compared to feedback control, feedforward control offers more timely adjustments and is not hindered by system lag. The structure of feedforward control is illustrated in Figure 3.  
The transfer function from the input \(X(s)\) to the system output \(Y(s)\) can be observed in the figure above.  
\[G_{0}(s)=\frac{Y(s)}{X(s)}=\frac{G_{p}(s)G_{p}(s)+G_{f}(s)G_{b}(s)}{1+G_{p}(s)G _{b}(s)} \tag{7}\]  
Moreover, in a system with an error \(E(s)=X(s)-Y(s)\), the transfer function from the system error to the input is  
\[G(s)=\frac{E(s)}{X(s)}=\frac{1-G_{f}(s)G_{b}(s)}{1+G_{p}(s)G_{b}(s)} \tag{8}\]  
If \(1-G_{f}(s)G_{b}(s)=0\), then \(G_{f}(s)=1/G_{b}(s)\); then, the system error \(E(s)\) can be made zero.  
In practical applications, achieving a system error of zero is impossible, but it is possible to minimize the tracking error within an acceptable range. When the system incorporates feedforward control versus not incorporating feedforward control, the denominator  
Figure 3: System structure diagram of feedback and feedforward control.  
of the transfer function remains the same, indicating that the poles of both transfer functions are identical. Therefore, the introduction of feedforward control does not compromise the system's stability; instead, it significantly enhances the system's steady-state accuracy without altering the initial system's parameters or structure. Furthermore, ensuring the dynamic performance of the system is also easily achieved with the implementation of feedforward control.