# Design and Implementation of Spring Cable Shaping Method Based on Fuzzy Control
## 4 Realization of Current Heating Shaping Control
### Realization of Temperature Control Algorithm for Spring Cable Shaping Based on Fuzzy Theory
#### 4.2.1 Parameter Fuzzy Distribution  
In order to make the temperature of the spring cable quickly reach the set process temperature, it is necessary to raise the temperature of the winding bar as high as possible. However, if the temperature of the winding bar is too high, exceeding 180 \({}^{\circ}\)C, the outer material of the cable begins coking. In order to achieve a better shaping effect and ensure the quality of the outer coating of the cable, in the temperature control, the upper limit threshold of the heating temperature of the winding bar is set at 160 \({}^{\circ}\)C, and the domain range of the temperature deviation \(e_{2}\) of the winding bar is from 0 \({}^{\circ}\)C to 160 \({}^{\circ}\)C; according to the empirical data of wire baking method 110 \(\pm\) 10 \({}^{\circ}\)C\(\rightarrow\)130 \(\pm\) 10 \({}^{\circ}\)C, the upper limit of heating temperature of spring cable is 140 \({}^{\circ}\)C, and the range of deviation \(e_{1}\) is from 0 \({}^{\circ}\)C to 140 \({}^{\circ}\)C; in temperature control, the scope of PLC control signal \(I\) is from 4 mA to 20 mA.  
American cybernetics expert [PERSON] put forward the concept of fuzzy sets and extended the fuzzy sets to interval from 0 to 1. Membership function is the key concept of representing fuzzy sets from [7] to [8]. Generally, the methods of representing fuzzy sets with membership function include triangular function, bell function, Gaussian function, trapezoidal function and Sigmoid function from [9] to [10]. In order to reflect the linear relationship among temperature deviation \(e_{1}\), \(e_{2}\) and control current \(I\), and to facilitate programming, the membership function selects triangular function.  
Dividing the fuzzy sets into multiple subsets with coupling relationships can effectively improve the control effect. In theory, the more the number of fuzzy subsets, the higher the control accuracy. Considering the fast heating speed of current heating and the timeliness of control, the output is divided into six states: \(Z\)(zero), \(V\)S(very small), \(S\)(small), \(M\)(medium), \(B\)(big) and \(VB\)(very big or full load output). Therefore, six fuzzy subsets \(Z\), \(VS\), \(S\), \(M\), \(B\)_and \(VB\)_ are defined to represent zero, very small, small, medium, big and very big, respectively, covering all fuzzy domains [11]. For the convenience of programming, trigonometric function is selected as membership function [12]. If interval from \(x_{0}\) to \(x_{1}\) is used to represent the range of a parameter \(x\), and \(a\), \(b\), \(c\) are used to represent the segmentation points of membership function, and \(x_{0}<a<b<c<x_{1}\) is satisfied, then membership function is expressed as follows:  
\[Z(x)=0,\ \ x=x_{0}\]  
\[S(x)=a-x/a-x_{0},\ \ \ \ \ \ \ x_{0}<x\leq a\]  
\[S(x)=\left\{\begin{array}{ll}x/a,&x_{0}<x\leq a\\ b-x/b-a,&a<x\leq b\\ \end{array}\right.\]  
\[M(x)=\left\{\begin{array}{ll}x-a/b-a,&a\leq x\leq b\\ c-x/c-b,&b<x\leq c\\ \end{array}\right.\]  
\[B(x)=\left\{\begin{array}{ll}x-b/c-b,&b\leq x\leq c\\ x_{1}-x/x_{1}-c,&c<x\leq x_{1}\\ \end{array}\right.\]  
\[VB(x)=x-c/x_{1}-c,\ \ \ \ \ \ c\leq x\leq x_{1}\]  
The specific shape of the each parameter membership function is determined by the segment points \(a\), \(b\) and \(c\) on the interval from \(x_{0}\) to \(x_{1}\). The fuzzy distribution design of each parameter range is set as, the range of \(e_{1}\) is select from 0 \({}^{\circ}\)C, 20 \({}^{\circ}\)C, 60 \({}^{\circ}\)C, 90 \({}^{\circ}\)C to 140 \({}^{\circ}\)C, the range of \(e_{2}\) is select from 0 \({}^{\circ}\)C, 40 \({}^{\circ}\)C, 80 \({}^{\circ}\)C, 110 \({}^{\circ}\)C to 160 \({}^{\circ}\)C, and the range of \(I\) is select from 4 mA, 5 mA, 8 mA, 12 mA to 20 mA.