INTERNATIONAL JOURNAL OF COMPUTERS COMMUNICATIONS & CONTROL ISSN 1841-9836, 11(3):394-404, June 2016. A New Adaptive Fuzzy PID Control Method and Its Application in FCBTM J.G. Lai, H. Zhou, W.S. Hu Jingang Lai*, Hong Zhou, Wenshan Hu Department of Automation, Wuhan University Wuhan, 430072, Hubei China *Corresponding author: henanlaijingang@163.com Abstract: The process of tension control for material testing using the Flexible Circuit Board testing machine (FCBTM) is featured with multi-variable, nonlinearity, time delays and time variation. In order to ensure the tension precision, the stability of servo motor’ speed and the reliability of test results, this paper establishes an accurate system model for the FCBTM, in which a novel three-dimensional adaptive fuzzy PID controller is designed. Specially, the simulation results show that the proposed adaptive fuzzy control method is not only robust to the external disturbance but also with more excellent dynamic and steady-state characteristics than traditional ones. Keywords: Flexible Circuit Board testing machine (FCBTM); tension control; adap- tive self-tubing, fuzzy PID control. 1 Introduction With the development of science and technology, electronic products become increasingly miniaturized, lightweight and thinner. Recent years have witnessed the increasing attention on the Flexible Circuit Board (FCB) and its applications in the manufacturing and printing of electronic components. Owning to the features of high wiring density, three-dimensional wiring, light weight and thin, the FCB has been more and more directly used to the electronic component of manufacture and printing in recent years, meanwhile the market demand is also growing rapidly. However, the common FCBTM is quite obsolete, which results in the unstable performance and low automation. This conflict between the huge market demand and the status quo makes the design of new testing equipment for FCB material properties become very urgent. Therefore, it is quite significance to research and design the new material FCBTM. The servo motor and its controller circuit of FCBTM are composed of many mechanical and electrical components which are highly nonlinear. They are used to load the measured object, where the parameters of measured object exist uncertainty, nonlinear factors and others, thus, by which the system is susceptible to be influent. During the test, in particular, the change of hardness of FCB samples can cause changes of the load scale factor on the deformation of force and displacement. With the dramatic increase of the required test fineness, it makes the precise critical in the control process of FCBTM. Traditional FCBTM usually uses the conventional PID algorithm. However, the control rate of FCBTM varies greatly for the different material properties, which directly affects the rate of change of the load. Fuzzy control theory is an effective solution, but simply because of the lack of the integrator team, the steady state error and the disturbance rejection are difficult to be eliminated. Especially in the case of classification variables are not enough, it often produces small oscillations around the equilibrium point. The PID control method introduces fuzzy controller and uses fuzzy reasoning, which will automatically implemented the optimum adjustment for PID parameters KP , KI and KD [1]- [3]. Because FCBTM is a nonlinear and time-varying system, simple fuzzy control or PID control is difficult to achieve the desired effect. The use of fuzzy PID composite control, combining the PID control and fuzzy control, which Copyright © 2006-2016 by CCC Publications A New Adaptive Fuzzy PID Control Method and Its Application in FCBTM 395 can not only play the fuzzy control advantage of robustness, good dynamic response, fast rise time and overshoot small, but also have features of both quality and steady precision dynamic tracking characteristics. It can make system to obtain good static and dynamic characteristics. In the testing machine system, fuzzy adaptive PID parameter controller is a PID controller on the conventional basis of the application of fuzzy set theory to establish binary continuous function between parameters KP , KI and KD, and absolute deviation value |E| and absolute paranoia changes value |EC|. It should be pointed out that classical fuzzy PID controller requires a three-dimensional rule base which makes the design process more difficult [4]- [5]. To overcome this drawback and focus on reducing the dimension of fuzzy system, this paper presents a two- stage fuzzy PID controller with fuzzy switch and uses it to control the tension in a FCBTM. This controller uses two-dimensional inference engine (rule base) to perform reasonably the task of a three-dimensional controller.   Kp = f1 (|E| , |EC|) KI = f2 (|E| , |EC|) KD = f3 (|E| , |EC|) (1) According to the different of |E| and |EC|, it is able to online self-tubing parameters KP , KI and KD, which is the key to achieve fuzzy adaptive PID controller design [6]- [7]. In this paper, the goal is to improve the accuracy of load control of FCBTM. The new three-dimensional adaptive fuzzy PID controller could be used to universal testing machine. 2 The Establishment of FCBTM Model In the course of testing FCB materials, first, the test sample is sandwiched between the movable beam and the base of testing machine, then by controlling the DC servo motor speed to drive the moving beam up and down via moving the transmission mechanism. Finally, the trial loading process is completed. The control parts of the whole system including: the DC motor control part, the mechanical transmission part, human machine interface(HMI), sensor signal feedback section and so on as shown in Figure 1. Interested readers can find further information about the detailed design and implementation of the hardware and software of FCBTM in [12]. Figure 1: Structure diagram of control system of FCBTM 396 J.G. Lai, H. Zhou, W.S. Hu 2.1 The DC Servo Motor Part The equivalent circuit of DC servo motor is as follows: The field voltage of Ua which is the system input signal; while θ is a motor shaft angle [8], [11], which is a system output. Ja d2θ dt2 + B dθ dt = M = Kia (2) The voltage balance equation of armature circuit of DC servo motor: Ua = Raia + La dia dt + ea (3) Laplace transforms for (2) and (3), then collate them and get the system transfer function of DC motor : F(s) = θ(s) Ua(s) = K s(Las + Ra)(Js + B) = Km s(τas + 1)(τes + 1) (4) where Km is the motor gain Km = KRaB ; τa = La Ra is the electrical time constant of the motor; τe = J B is the mechanical time constant of the motor; J is the total moment of inertia converted to the motor shaft; B is the viscous friction coefficient. 2.2 The Mechanical Transmission Part In this part, θ is the motor rotation angle and it is the input signal. The axial displacement of the movable beam of test machine Y is the output signal, the transfer function between the rotational angle input and movable beam is as follows [10]: Gj(s) = Y (s) θ(s) ≈ ( Z1 Z2out · Z2in Z4 · L 2π )K Js2 + Bs + K = Z1 Z2out · Z2in Z4 · L 2π · w2n s2 + 2ξwns + w2n (5) Z1, Z2out, Z2in and Z4 are the motor outputs shaft gear, the external gear wheel transition, the internal tooth gear teeth and the axle, respectively; L is ball screw pitch; wn = √ K/J is the non-damped natural frequency; ξ = B(2 √ JK) is damping ratio of the mechanical system. 2.3 The Sensor Signal Transmitting Part The sensor feedback transfer part of tension and displacement can be approximated as a proportional component, respectively, Kc and Ke. The value of Kc and Ke is 1 according to the actual situation. 3 Dimensional Adaptive Fuzzy PID Controller Design Fuzzy adaptive PID controller is mainly based on the system generated during the operation of error E, error rate EC and acceleration of error rate ER to online self-tubing PID parameters, which allows the system to ensure low overshoot and can achieve fast convergence. During the loading control process of FCBTM, conventional fuzzy adaptive PID controller only uses the error E and error variation EC as input to meet the self-tubing PID parameters requirements at different moments, which is also known as two-dimensional fuzzy controller [9]. The geometry detonation problem of multi-variable fuzzy control rule is solved, and a greater controllable scope is obtained. However, when the outputs of the control system of FCBTM enter the stage of steady-state approximation, the stability of this kind fuzzy PID control will decline, and the A New Adaptive Fuzzy PID Control Method and Its Application in FCBTM 397 controller will not be possible to generate error measure to eliminate this instability. At this point, if the acceleration ER (the second derivative of the error) of the error changes EC is added as fuzzy PID control input, it will make the system have a good steady precision. This is called three-dimensional fuzzy PID controller. However, the increase of dimension will definitely increase the difficulty of the control algorithm, and affect the control response speed. Given the above analysis, in order to effectively use three-dimensional fuzzy PID controller to solve the contradiction of the traditional two-dimensional fuzzy PID controller requiring quick response and stability, when the controller of sample load was designed, if the error is large |EC| ≥ e0, then the conventional two-dimensional fuzzy PID control (hereinafter, the Fuzzy1) is selected as the controller, but when the error is small |EC| < e0, the acceleration of change of error is introduced as a new input value, based on the positive negative to reselect a new fuzzy control rules to adjust the PID parameters online, the specific three-dimensional fuzzy PID control principle is shown in Figure 2. Figure 2: Structure of the proposed three-dimensional adaptive fuzzy controller Based on experience to inform the error range of actual system and determine an error limit e0, when the error meets |EC| ≥ e0, we choose the fuzzy rules Fuzzy1 of traditional two-dimensional fuzzy PID control; however, when the error meets |EC| < e0, in accordance with ER positive and negative reselect the fuzzy rules of three-dimensional fuzzy PID control. When ER is bigger than 0, we select fuzzy rules Fuzzy2. Otherwise perform fuzzy rules Fuzzy3, in order to achieve the PID parameters KP , KI and KD on-line modification and self-tubing. So when implement control action on the testing machine loading process, we have chosen to use two-dimensional fuzzy control table to achieve the three-dimensional fuzzy control function, essentially which can be seen as the dimensionality reduction of three-dimensional fuzzy control via reducing the number of dimensions to increase the response speed, at last form a three-dimensional fuzzy PID control on testing machine. In the course of designing the three-dimensional fuzzy PID controller on testing machine, the most critical is to give fuzzy control rules adopted in different operating stages of the system. Next corresponding fuzzy control rules will be designed, depending on the system error variance at different times. 3.1 Select Input and Output Variables and Fuzzy Input Parameters Due to the loading control of FCBTM including various tasks (such as tension and velocity control, etc.), it detects the value of error E (k), error rate EC (k) and the acceleration of error rate ER (k) and adjusts KP , KI and KD according to the fuzzy rules in each sample period. Then the DC servo drive unit is employed to tune the speed of motor, when fuzzy controller received the voltage signal from the fuzzy PID controller. 398 J.G. Lai, H. Zhou, W.S. Hu Therefore, fuzzy logic systems can make the error E, the error change EC and change of acceleration ER of each control period as input variables, and put the parameter adjustment values KP , KI and KD as the output variables, at last form a three inputs and three outputs system. The calculation formula of each control cycle is as follow :  KP = KP0 + ∆KP , KI = KI0 + ∆KI, KD = KD0 + ∆KD, (6) ĄĄ where KP0, KP0 and KP0is the initial setting of PID parameters which are able to be given in advance based on practical experience. Due to the high requirements on control quality, when fuzzy each input, we will quantify the system error E and the error change EC to 13 levels, with −6,−5,−4,−3,−2,−1,0,1,2,3,4,5,6 representation. Since the control system is to control two kinds physical of tension and speed, even if only to control tension rate, its rate range can also be within a wide range from 0 MPa/s to 5 MPa/s. Therefore, a simple fuzzy unification is not appropriate only based on the absolute value of E and EC. However, if we respectively use different fuzzy methods according to the different control methods, then it is quite tedious and can not be exhaustive. So the relative values of E and EC are used to quantify and can be expressed as follows :  er(k) = e(k) r(k) ecr(k) = ec(k) e(k−1) (7) where r(k) is the desired control value of the system, further designs the fuzzy quantitative equations are as follows: E(K) =   −6 ⌈er(k) × 100⌉ < −5 ⌈er(k) × 100⌉ − 5 ≤ ⌈er(k) × 100⌉ ≤ −0.5 0 − 0.5 ≤ ⌈er(k) × 100⌉ ≤ 0.5 ⌈er(k) × 100⌉ + 1 0.5 ≤ ⌈er(k) × 100⌉ ≤ 5 6 ⌈er(k) × 100⌉ > 5 (8) EC(K) =   −6 ⌈ecr(k) × 100⌉ < −5 ⌈er(k) × 100⌉ − 5 ≤ ⌈ecr(k) × 100⌉ ≤ −0.5 0 − 0.5 ≤ ⌈ecr(k) × 100⌉ ≤ 0.5 ⌈er(k) × 100⌉ + 1 0.5 ≤ ⌈ecr(k) × 100⌉ ≤ 5 6 ⌈ecr(k) × 100⌉ > 5 (9) Based on the style, the variables of E and EC are put into a certain one in the 13 quantization levels in each control period. The basic output domain of ∆KP , ∆KI and ∆KD of fuzzy PID controller can be properly selected based on experience. The basic domain of ∆KP , ∆KI and ∆KD were taken as [-0.3, 0.3], as [-0.06, 0.06] and as [-3, 3], respectively. The quantization levels of their fuzzy variables are the same as E and EC. 3.2 Determination on The Set and Membership of The Fuzzy Controller The selection of membership function has a certain impact on the whole fuzzy system con- trol process. According to the foregoing analysis on the FCBTM load control principles and A New Adaptive Fuzzy PID Control Method and Its Application in FCBTM 399 procedures, in order to facilitate the calculation, this article uses the same kind of membership functions for the input variables E, EC and output variables ∆KP , ∆KI and ∆KD. The fuzzy subset of input and output variables is: NB, NM, NS, ZO, PS, PM, PB, respectively: Negative Big, Negative Middle, Negative Small, Zero, Positive Small, Positive middle, Positive Big. Fig- ure.3 shows membership function of and in Fuzzy1. Its basic domain is [-3, 3], and its fuzzy domain is [-6, 6], where NB and PB are defined using Gaussian function as normal, the other fuzzy subsets are defined using trigonometric functions. Figure 3: E and EC membership function in Fuzzy1 When the system enters the control later stages and the error is small |E| < e0, then different fuzzy functions should be selected according to the positive and negative of the acceleration of error, in order to achieve high precision control for the testing machine. Fuzzy2 and Fuzzy3 are, respectively, the fuzzy controller when ER > 0 and ER ≤ 0. The specific membership function is as shown in Figure.3, NB and PB are defined as normal Gaussian function, and the other fuzzy subsets are defined as using trigonometric functions. At this time, the basic domain of E and EC is still [-0.6, 0.6] and the fuzzy domain is still [-6, 6], and theirs membership function is as shown in Figure 4. Figure 4: E and EC membership function in Fuzzy2 and Fuzzy3 The output variables (∆KP , ∆KI and ∆KD) of fuzzy controller have the same fuzzy subsets and membership functions. In Fuzzy1-3 the membership function of ∆KP is as shown in Figure.5 and its basic domain is [-0.3, 0.3], the basic domain of ∆KIis [-0.06, 0.06]. However, in Fuzzy1-2 the basic domain of ∆KD is [-3, 3], compared to the Fuzzy3 is [-0.6, 0.6]. In this effort, when EC changes, the tuning principles of PID parameters KP , KI and KD are as follows: Table 1 is the three-dimensional fuzzy PID control rules on the testing machine in the whole process. Fuzzy1 is employed when E is larger, while Fuzzy2-3 is chose when E is smaller. At this time, when ER is lager than 0, we choose Fuzzy2; when ER is not lager than 0, we use Fuzzy3. Thus the output of the system is tuned in the opposite direction. 400 J.G. Lai, H. Zhou, W.S. Hu Figure 5: Domain and membership function of ∆KP Table 1: Fuzzy1-3 control rule 3.3 The Fuzzy Reasoning and Precise Operation In the course of real-time control of the FCBTM, the specific works are as follows: 1) Firstly we calculate a moment error value E (k) on tension or speed, which is relative to the last moment. Then adopt the difference method to calculate the value of EC (k); 2) Then we fuzzy quantification for E and EC according to formula (4)-(7), and find their memberships in the quantization interval; 3) Thirdly the corresponding inference calculations are launched according to the fuzzy con- trol rules in table1, and find the membership corresponding language value on ∆KP , ∆KI and ∆KD; 4) The gravity method is used to solve fuzzy, then makes ∆KP , ∆KI and ∆KD parameter mapping to the respective basic domain range, eventually obtained ∆KP , ∆KI and ∆KD the precise adjustment value; 5) The defuzzification uses the weighted average method. System after defuzzification gets A New Adaptive Fuzzy PID Control Method and Its Application in FCBTM 401 a good parameter tuning PID controller, who is then use to achieve the control of the loading process of FCBTM. 4 The Simulation on FCBTM In this paper, we use SimuLink module in MATLAB software for numerical simulation. The parameters on DC servo motor are, respectively, La = 0.02H, Ra = 1.36Omega, J = 1.05×10−4, B = 4.5 × 10−4, the K = 0.025, Ta = 0.015, Te = 0.23. Mechanical transmission part of the relevant parameters are as follow: Z1 = 30, Z2out = 90, Z2in = 30, Z4 = 90, L = 5mm/rad, then ξ = 0.5, wn = 100. Taking the FCBTM introduced in section 3 as example to study the steady state and transient characteristics of the proposed control strategies incorporating the conventional PID, two-dimensional fuzzy PID and three-dimensional fuzzy PID controller. 4.1 Comparative Performance Analysis In order to compare the differences between different control methods, firstly, the conventional PID control simulation model on the testing machine control system was built. The initial value of PID was gotten by the method of online debugging trial and the initial values were: 1, 0.5 and 0.03. Secondly, the fuzzy the rules of fuzzy control in Table1 are compiled into incorporated into the fuzzy inference system editor, simultaneously, determine the input and output variables domain membership function. Then we can create one fuzzy controller in SimuLink. The quantiza- tion factors of output variables ∆KP , ∆KI and ∆KD were 0.5, 0.05 and 0.05. After that the conventional two-dimensional adaptive fuzzy PID control simulation model is built. Finally build a three-dimensional FCBTM fuzzy PID controller simulation model as shown in Figure.6. The quantization factors of output variables ∆KP , ∆KI and ∆KD were: 0.5, 0.05 and 0.05. Figure 6: Dimensional Fuzzy PID controller simulation model The loading process of FCBTM with constant strain rate can be equivalent to give a step input signal to the FCBTM system. Therefore, the three above-mentioned system simulation models all input a step signal, the corresponding curves are shown in Figure 7. The simulation time of this system is 15s, and the sample frequency is 0.01s. It can be seen that the tension responses of FCBTM under three controllers are approached and stabilized under the unit step input signal. As can be seen from the figure 7, the fuzzy PID controller using three-dimensional FCBTM control system has a small overshoot, and rise time, steady state can be achieved quickly. 402 J.G. Lai, H. Zhou, W.S. Hu Figure 7: Comparison of tension response under three controllers 4.2 Robustness Analysis Input and outer disturbance, system structure and parameter variation are the main measures to see about system robustness performance. Due to the interference of control systems are vulnerable to electromagnetic noise, in this section, outer periodic a step perturbation signal is used to analyze the robustness of the three controllers. We add a step perturbation to the FCBTM at 7s, which was used to analysis the anti-interference ability and stability of the three algorithms. The simulation results are shown in Fig.8. It can be seen that under the three controllers system can attain stability finally although the transient responses are influenced by the step perturbation signal more or less. The influence by disturbance under PID controller is much more than that of two-dimensional and three-dimensional fuzzy PID controllers. The variation of response under three-dimensional fuzzy PID controller may be ignored at certain error range. Further research shows that the robustness of the three-dimensional fuzzy PID control system is also excellent when the periodic pulse disturbance signal occurs at the input port. 5 Conclusion This article adopts the fuzzy adaptive PID control method, (namely the two-dimensional fuzzy PID control system added a third variable that is the rate of change of the error), to reduce the response time of the FCBTM system while reducing overshoot and ultimately improve the steady-state performance. And three-dimensional fuzzy adaptive PID controller implementation process on FCBTM has been described in details. The salient feature of the proposed controller is that it does not require an accurate model of the controlled plant, and the design process is lower than that of the other PID controllers. The practical control effect and simulation based on the Matlab show that the proposed controller not only is robust, but also it gives excellent dynamic and steady-state characteristics compared with traditional controllers. A New Adaptive Fuzzy PID Control Method and Its Application in FCBTM 403 Figure 8: Comparison of tension response with disturbance 6 Acknowledgement This work was supported by National Key Technology Support Program of China under Grants 2013BAA01B01 and the National Natural Science Foundation of China under Grants 61374064 and by the Fundamental Research Funds for the Central Universities 2014208020201. Bibliography [1] Duan X.G., Deng H., and Li H.X.(2013); A Saturation-Based Tuning Method for Fuzzy PID Controller, IEEE Trans on Industrial Informatics, 11: 5177-5185. [2] Chalui H. and Sicard P. (2012); Adaptive fuzzy logic control of permanent magnet synchronous machines with nonlinear friction, IEEE Trans on Industrial Informatics, 59(2):1123-113. [3] Benitez-Perez, H., Ortega-Arjona, J., Rojas-Vargas, J. A., and Duran-Chavesti, A. (2016); Design of a Fuzzy Networked Control Systems. Priority Exchange Scheduling Algorithm. International Journal of Computers Communications & Control, 11(2): 179-193. [4] Du, Z., Lin, T. C., and Zhao, T. (2015); Fuzzy Robust Tracking Control for Uncertain Non- linear Time-Delay System, International Journal of Computers Communications & Control, 10(6): 52-64. [5] Hu B., Mann G., and Raymond Gosine G, (2001); A Systematic Study of Fuzzy PID Con- trollers Function Based Evaluation Approach, IEEE Trans on Fuzzy Systems, 9: 699-711. [6] Hu B., Mann G., and Raymond Gosine G(1996); Theoretic and Gentic Designs of A Three- rules Fuzzy PI Controller, IEEE Trans on Fuzzy Systems, 16:489-496. [7] Clarke D.W.(1996); Adaptive Control of a Materials-testing Maechine, IEEE Trans on Fuzzy Systems, 13:1-4. [8] Han Z.G., Shen Y. (2010), An Improved Design Method of Three-dimensional Fuzzy Control, Control Engineering of China, 13(1):1-4. 404 J.G. Lai, H. Zhou, W.S. Hu [9] Liu X. J., Cai T.Y., etal.(1998); Structure analysis of three-dimensional fuzzy controller, Control Engineering of China, 24(2):230-235. [10] Chen B., etal.(2006); Electric drive control system, Machinery Industry Press, Beijing, 2006. [11] Lai, J.G., Zhou, H., Lu, X.Q., and Liu, Z.W (2016); Distributed power control for DERs based on networked multiagent systems with communication delays, Neurocomputing, 179:135-143. [12] Lai J.G., Lu X.Q.(2012); The Application of Embedded System and LabVIEW in Flexi- ble Copper Clad Laminates Detecting System, International Journal of Information and Computer Science , 1: 4-10.