# Analysis of a Novel Automatic Control Approach for the Free Forging Hammer
## 4 Control Schemes for Free Forging Hammer
### Control Strategy  
In order to increase the machining accuracy and achieve high precision control, the input signal u must be processed before it can be sent out. To achieve this goal, a control scheme for the free forging hammer is established in Figure 11. As a large amount of external disturbance exists in the forging process, it is difficult for the traditional control method to achieve precise control of the striking energy. Therefore, a control method that combines fuzzy control and PID control is adopted in this paper. The online tuning of the key PID parameters through fuzzy control not only has the flexibility and speed of fuzzy control, but also inherits the advantages of the high precision of the PID control algorithm, so as to realize high-performance tracking control of the free forging hammer striking system. The PID controller is composed of a proportional unit (P), an integral unit (I), and a differential unit (D). The actual control signal \(u(t)\) is adjusted according to the control deviation \(e(t)\) formed by the given value \(r(t)\) and the actual output value \(y(t)\). After discretization, the PID control output equation can be described by  
\[u(t)=k_{p}e(t)+k_{i}\sum_{j=0}^{k}e(j)T+k_{d}\frac{e(k)-e(k-1)}{T} \tag{11}\]  
where \(e(t)=r(t)-y(t)\) is the PID control quantity; \(k_{p}\) is the scale factor; \(k_{i}\) is the integral coefficient; \(k_{d}\) is the differential coefficient; \(T\) is the sampling period; and \(j\) is the sampling number, where \(j=1,\ 2,\ 3,\cdots,\ k\). Although the PID control algorithm is widely used in the field of industrial automation control, it also has its shortcomings. In general PID control systems, PID parameters are determined and unchanged in the entire manufacturing process. However, for some systems with strong coupling, time-varying parameters, and nonlinearity, conventional PID control can hardly meet the control requirements. Therefore, in order to take advantage of PID adjustment and improve the disadvantages of parameter invariance, this paper combines fuzzy control method with PID control theory to achieve the best adjustment of PID parameters. \(k_{p}\), \(k_{i}\), and \(k_{d}\) are tuned online, according to different deviation e and the deviation change rate ec. After obtaining the new \(k_{p}\), \(k_{i}\), and \(k_{d}\), the conventional PID controller outputs the control signal to the controlled object, which improves the adaptability of the PID algorithm, as shown in Figure 12.  
From Figure 12, the PID controller is calibrated by the fuzzy controller. Deviation e and the deviation rate ec are used as the input, and the corrections of three parameters (\(\Delta k_{p}\), \(\Delta k_{i}\), and \(\Delta k_{d}\)) are used as the output. The basic domain of e, ec, and \(k_{d}\) is {-3, -2, -1, 0, 1, 2, 3}, and the basic domain of \(k_{p}\) and \(k_{i}\) is {-0.3, -0.2, -0.1, 0, 0.1, 0.2, 0.3}. The fuzzy subset is divided into seven levels (including NB-negative big, NM-negative medium, NS-negative small, Z-Zero, PS-positive small, PM-positive middle, and PB-positive big). The membership function of each variable selects the z-shaped membership function on the left, the s-shaped membership function on the right, and the  
Figure 11: Automatic control system of the free forging hammer. Figure 12: Principle of fuzzy-PID control system. combined function form of the trigonometric function in the middle. The membership curves of e, ec, \(k_{d}\), \(k_{p}\), and \(k_{i}\) are shown in Figure 13. Control rules of parameters \(k_{d}\), \(k_{p}\), and \(k_{i}\) are shown in Table 2. According to the control rules, the fuzzy relation (\(R_{k_{x}}\)) of PID parameters can be expressed as follows:  
\[R_{k_{x}}=\ell\left[\left(A_{i}\right)_{e}\&\left(A_{j}\right)_{ec}\right]*C_{ k_{x}} \tag{12}\]  
where \(A_{i}\) is the fuzzy relation of \(e\), \(A_{j}\) is the fuzzy relation of \(ec\), and \(C_{k_{x}}\) is the fuzzy relation of PID parameter \(k_{x}\).