Design of an Embedded Rapier Loom Controller and a Control Strategy Based on SRM

Rapier looms are currently important equipment in the weaving process. The control system of the loom determines the performance of the loom, to a large extent. To effectively reduce the production cost and energy consumption and to improve the start-up performance and production efficiency of rapier looms in industrial production, this paper develops an integrated rapier loom control system based on the direct drive of a switched reluctance motor (SRM) spindle and conducts field tests and applications. The contribution and innovation of this paper is to develop a complete set of low-cost control systems, propose an SRM single neuron fuzzy PID speed control strategy based on voltage chopping control and use it for the control of the main shaft drive technology of rapier looms. The integrated rapier loom control system based on the SRM spindle direct drive proposed in this paper reduces the production costs and energy consumption and improves the start-up performance and production efficiency of the rapier loom. This text carries on the systematic plan design to the control system from the hardware system and the software system. First, according to actual needs, starting from the aspect of reducing control costs and combined with the characteristics of embedded systems, such as tailorability, low cost, and strong scalability, this paper proposes a control system hardware structure based on CAN bus communication and a fully embedded STM32. The control system is divided into multiple control modules, such as the main control module, the spindle drive module, and the power transmission coil module. The system conducts a distributed control to the loom through the CAN bus and is equipped with various communication interfaces, such as Ethernet and RS485. Second, combining the characteristics of the SRM with a simple structure, a large starting torque and the operation mode of the loom, the basic control mode of SRM voltage chopping control is determined. To improve the efficiency and start-up performance of the speed control system, the SRM single neuron PID control algorithm is proposed, and a single neuron is used to improve the PID parameters. On this basis, fuzzy control is introduced to adjust the output gain of a single neuron PID control online to improve the system performance and reduce system energy consumption. Finally, the entire set of rapier loom control systems was verified, tested and debugged on site. The results show that each functional circuit works normally, and that the designed control system can meet the speed response demand of the loom at 850 rpm and reduce the production cost and energy consumption. The comparison experiment between the single neuron fuzzy PID algorithm of the motor and the traditional PID control algorithm in the actual loom production process proves that the proposed control algorithm has a better dynamic response performance. The proposed control algorithm effectively improves the starting performance and production efficiency of rapier looms and meets the actual needs of industrial applications.


I. INTRODUCTION
As the most important textile weaving equipment, looms are in great demand in the textile industry. Looms can be divided into two categories: shuttleless looms and shuttle looms. Shuttleless looms have a high weaving efficiency and automation and have essentially replaced shuttle looms [1]. The rapier loom is a type of shuttleless loom with a high degree of automation and a good efficiency. It has become the main type of woven fabric production [2]. Rapier looms originated in Europe, and most of the major foreign rapier loom manufacturers are also located in Europe, including Picanol, Itema, Dornier, etc. As a veteran manufacturer of rapier looms, many different manufacturers also have their own different technical characteristics and advantages. The control systems of foreign loom manufacturers mostly use embedded microcontrollers as the control core and control the actuators on the looms through a field bus. In terms of function, power transmission coils, electronic scissors, and direct spindle drives have essentially become standard equipment. All of them can achieve remote monitoring of the loom through the network interface, and the degree of information and execution efficiency are high. At the same time, the drive technology of different motors on the loom is mastered, and the dynamic and static performance of the starting motor is good. However, the degree of integration is low, and the cost is high. The research and development of rapier looms in China started late, but with the development of industrial automation technology in recent years, domestic looms have also made considerable progress, and they have essentially achieved automated production. Various technical indicators of looms are also approaching imported high-end looms, especially in terms of speed, which are close to foreign looms. Rapier looms with a speed of 600 rpm or more have been industrialized. However, few domestic enterprises develop and produce new high-speed mechatronics rapier looms, and a lack of advanced technology has independently developed [3]. These problems lead to the low efficiency and high energy consumption in the production of looms. The high-end products of some manufacturers adopt spindle direct drive technology, but its popularity is not high [4]. This problem leads to the poor dynamic and static performance of the spindle direct drive motor. Fig. 1 shows the model structure diagram of a rapier loom.
Compared with foreign looms, domestic rapier looms have generally reached a higher level in terms of speed. The follow-up development of the rapier loom is no longer blindly pursuing speed but should combine the current needs of ''intelligent manufacturing'' and ''energy conservation and emission reduction'' and pursue a higher degree of integration, networking and execution efficiency, reduce cost and energy consumption, break technical barriers and popularize spindle direct drive technology [5], [6]. The control system is the heart of the loom, and achieving these requirements depends, to a large extent, on the control system. Therefore, this paper studies and analyzes the control requirements and system structure of rapier looms. To effectively reduce the production cost and energy consumption of rapier looms in industrial production and further improve the starting performance and production efficiency of rapier looms, an integrated rapier loom control system based on a switched reluctance motor (SRM) spindle direct drive is developed in this paper. Fig. 2 shows the structural diagram of a rapier loom.
Currently, most of the major rapier loom manufacturers in Europe have adopted permanent magnet synchronous motor (SRM) speed regulation systems with direct rotation structures, which simplify the mechanical structure and are more energy-saving and efficient than the frequency conversion speed regulation system [7], [8]. Compared with permanent magnet synchronous motors, SRMs have a simple structure and a lower cost. The maximum allowable temperature rise is high, and there will be no demagnetization of the permanent magnet synchronous motor due to long-term overheating [9]. In terms of the performance, the starting torque of the switched reluctance motor can reach twice the rated torque, but the effective current at start-up is only 1/3 of the rated current. Switched reluctance motors can start, stop, and reverse frequently and have a high efficiency over a wide speed and power range [10]. Based on the above characteristics, SRM is very suitable for the direct transmission of the loom, so it has become the favored object of major loom manufacturers. Fig. 3 is the structural diagram of the switched reluctance motor.
The use of SRM on looms first began in Europe, and the SUMO motor used on Picanol looms was SRM. The efficiency of SRM can reach 95%, which can save approximately 10% compared with the traditional frequency conversion speed control system, and the speed control performance is also better [11]. There are currently also many manufacturers applying SRM to the direct drive of loom spindles in China, such as the high-grade rapier loom models produced by Zhejiang WANLI and Shandong RIFA; however, most manufacturers still use the mode of variable frequency speed regulation and indirect transmission. Therefore, the development and popularization of the switch reluctance motor speed control system for looms is of great significance to promote energy savings and emission reduction and to improve the competitiveness of domestic looms.
The prototype of SRM appeared earlier, but due to its switching characteristics, limited by the technical conditions at the time, the motor's operating characteristics were very poor. With the development of power semiconductor devices, the superior performance of switched reluctance motors has been fully exploited and brought into play. Foreign countries have conducted application research on switched reluctance motors since the 1960s. The advent of the switched reluctance motor speed control system (SRM) has attracted attention from all over the world. China started the research and application promotion of SRM in the 1980s and launched the domestic KC series SRM in the 1990s. To date, SRM has been successfully applied in dozens of industries, such as electric vehicles, oil exploration, lifting, home appliances, textile machinery, and machine tools [12]- [15].
Through a comparison of existing research in related directions, SRM is more widely used in the driving system of looms. Niu studied SRM for textile machinery, designed various hardware circuits with DSP chips as the control core, and adopted the combination of current chopping and angle position control for speed regulation. The system simplified the mechanical structure, improved the loom production efficiency, and reduced the production cost, but the degree of integration and networking the system was not high, and the energy consumption was large [16]. Liu designed the spindle direct drive SRM of a rapier loom with a dual core hardware structure of DSP and MCU. This dual processing architecture that switches the reluctance motor speed regulation system can satisfactorily meet the driving requirements of rapier looms and improve the cost control and networking degree. However, the dynamic and static performance of motors in the system is not very good, and the execution efficiency of looms is not very high [17]. Bi designed an SRM controller for an air-jet loom, which takes an STM32 single chip microcomputer as the core and adopts a current speed double closed-loop PI control algorithm. Compared with a traditional loom drive system, this switched reluctance motor speed regulation system not only has the advantages of energy savings, but also reduces the development cost of the drive system. However, the actual production efficiency of the entire system still needs to be improved [18]. According to the relevant literature, the current SRM used in looms mostly takes DSP or MCU as the control core combined with the PI algorithm to adjust the speed and current. However, SRM is a typical nonlinear system, and the effect of traditional PI regulation control is limited [19]. Currently, intelligent control algorithms such as fuzzy control and genetic algorithms have been increasingly widely used in industrial control [20]. Some intelligent control algorithms have been applied to SRM and have achieved good control results in other fields [21]. Li Mengqiu used the offline method to train the current angle torque samples and constructed a new observer based on a BP neural network to replace the traditional DTC observation link, which solved the problems of a large data volume, slow feedback and low real-time performance of the traditional high-power motor DTC observation method [22]. However, the design of the control strategy does not improve the dynamic or static performance of the system, nor the actual production efficiency. Li constructed a new direct adaptive RBF neural network controller to deal with parameter changes, external disturbances, and input saturation of the SRM drive system at the same time. The ideal control law of the SRM drive system is approximated by a neural network, and the neural network parameters are modified in real time based on Lyapunov theory. MLP technology is introduced to reduce the number of online updating parameters and ensure the stability of the system. However, the four quadrant operation of the motor is not considered, and the motor efficiency needs to be improved [23]. A. Uysal combined fuzzy control with PID control to determine the proportional integral differential gain through fuzzy reasoning. This method is simple, efficient, and widely used. It not only overcomes the disadvantage where the PI control cannot adapt to a nonlinear motor but also makes up for the limitation of fuzzy control alone. However, the actual operation efficiency of the system is not ideal [24]. Lu integrated a neural network based a on fuzzy PID control. A BP neural network is used as the fuzzy inference device, and the speed deviation is used as the feedback. Through the fuzzy inference of the deviation and its first-and secondorder change rates, the real-time optimal PID parameters of the SRM running in the full speed range are generated. This method significantly improves the control performance of the speed regulation system, but since intelligent control is still in the development stage, the theoretical significance of the control strategy is greater than the practical significance, and needs to be further developed [25]. Xu Jie combined an RBF neural network with predictive control. The RBF neural network is used as the prediction model of the control system to output the predicted speed of the motor. After feedback correction and rolling optimization, the error is adjusted in real time to correct the prediction data so that the RBF neural network and model predictive control complement one another. Compared with the traditional control strategy, this control method has the advantages of a strong network approximation and generalization ability and a small error. However, due to the introduction of the dual objective cost function of torque error and phase current in the control system, the complexity is relatively high [26].
In summary, as the heart of a loom, the control system, to a large extent, determines the performance and advancement of the loom. The research goal of this article is to effectively reduce the production cost and energy consumption of rapier looms in industrial production and to further improve the operation performance and production efficiency of rapier looms. This paper proposes and independently develops an integrated rapier loom control system based on the direct drive of the switched reluctance motor (SRM) spindle and conducts field tests and practical applications of the control system. First, this paper studies the structural composition and process flow of the rapier loom. Then, from the aspects of improving the degree of integration, networking and scalability of the system and reducing the control cost, combined with the characteristics of tailoring, low cost and strong scalability of the embedded system, the hardware structure of the embedded STM32 control system based on CAN communication is proposed, which reduces the cost on the basis of improving the networking and integration. Combined with the operating characteristics of the loom, the basic control method of SRM voltage chopping control is determined. To improve the efficiency and operating performance of the speed control system, the SRM single neuron PID control algorithm is proposed, and a single neuron is used to improve the PID parameters. On this basis, fuzzy control is introduced to adjust the output gain of a single neuron PID control online in order to improve the dynamic and static performance of the system and reduce its energy consumption. The control system proposed in this paper has a wide range of applications and is suitable for the rapier loom control system commonly used in actual industrial production. In this paper, SRM is installed on the actual loom, and the control system is debugged on site. First, the embedded hardware control circuit is tested. The test results of the system show that each functional circuit works normally. The designed control system can therefore meet the speed response requirements of an 850 rpm loom and has the basic conditions of system networking, which improves the degree of system integration and networking and reduces the cost. Second, a comparison experiment was conducted between the single neuron fuzzy PID algorithm of a switched reluctance motor and a traditional PID control algorithm on a 5.5 kW three-phase 12/8-pole SRM. Experiments have proven that the proposed control algorithm has a better dynamic and static response performance while improving the actual production efficiency and reducing the energy consumption.
For the SRM speed control system used in rapier loom, there are some performance requirements for the switched reluctance motor. First, the hardware circuit of the speed control system can work normally and meet the speed response requirements of a switched reluctance motor at 850 r/min. In addition, a switched reluctance motor controlled by a single neuron fuzzy PID algorithm should have good dynamic and static performances. Specific indicators are reflected in the overshoot, rise time, peak time and regulation time. Under the same experimental conditions, compared with the traditional PID algorithm, the SRM controlled by a single neuron fuzzy PID algorithm is in a reasonable range in terms of the steady-state error. The overshoot, rise time, peak time and regulation time are significantly improved compared with the traditional PID algorithm, which shows that under the single neuron fuzzy PID control algorithm, the response speed of the switched reluctance motor is faster and the speed stability is higher.
The challenge faced by the proposed system is first because of the highly nonlinear characteristics of the switched reluctance motor operating system. Additionally, it is difficult to establish an accurate mathematical model, and there are large and complex challenges with calculations. The single neuron fuzzy PID algorithm used in this paper can solve these problems on the premise of realizing the control goal in order to improve the starting performance and production efficiency of rapier looms and reduce energy consumption. Second, this system faces the challenges of low integration and networking for rapier loom control systems and a high overall cost. Combined with the tailorability, low cost and strong scalability of embedded systems, this paper proposes the hardware structure of a fully embedded STM32 control system based on a CAN bus, which provides a stable and reliable hardware platform for implementation of the algorithm.

II. RESEARCH GOALS, CONTENT AND INNOVATION A. RESEARCH GOALS AND CONTENT OF AN EMBEDDED RAPIER LOOM CONTROLLER AND CONTROL STRATEGY DESIGN BASED ON SRM
The research goal of this article is to effectively reduce the production cost and energy consumption of rapier looms in industrial production and to further improve the operation performance and production efficiency of rapier looms. This paper designs an integrated rapier loom control system based on the direct drive of the switched reluctance motor (SRM) spindle. The focus is on the hardware circuit design of the fully embedded STM32, based on CAN bus communication and the design of the SRM single neuron fuzzy PID speed control strategy, which is based on voltage chopping control. Finally, experimental verification is performed.
The research content of this article is divided into three parts. The first part is the analysis and research of the control system structure. The structure and process flow of the rapier loom are studied, and on this basis the control requirements of the control system are determined. Then, from the aspects of VOLUME 10, 2022 improving the degree of system integration and networking, and reducing the control cost, combined with the characteristics of tailoring, a low cost and a strong scalability of the embedded system, the hardware structure of the fully embedded STM32 control system based on CAN communication is designed. This paper designs a hardware circuit with an STM32 single-chip microcomputer as the control core and divides the control system into multiple control modules, such as the main control, spindle drive, and electric roll. The system performs distributed control to the loom through the CAN bus and is equipped with various communication interfaces, such as Ethernet and RS485. The hardware design provides a stable and reliable hardware platform for the control system.
The second is the SRM speed regulation control strategy. The PID algorithm is widely used, but it is not good enough for a nonlinear system control. Therefore, the goal is to improve the speed control effect of SRM, improve the operating performance of the system, and improve production efficiency and reduce energy consumption. By analyzing the basic speed regulation strategy of SRM, combined with the operating characteristics of the loom, the basic control method of SRM voltage chopping control is determined. To improve the adaptive ability of the speed control system and ensure the real-time performance of the control algorithm, the SRM single neuron PID control algorithm is proposed, and a single neuron is used to improve the PID parameters. On this basis, this paper introduces fuzzy control to adjust the output gain of a single neuron PID control online to improve the performance of the system. The simulation model of the system is established by using SIMULINK, and the simulation results show that the control algorithm can effectively improve the speed regulation performance of the system.
The last part is the experimental verification part. The hardware circuit is tested in this paper. The test results of the system show that each functional circuit works normally. The designed control system can meet the speed response requirements of a loom at 850 rpm and has the basic conditions of system networking, which improves the degree of system integration and reduces the cost. This thesis conducted a comparative experiment on SRM's single neuron fuzzy PID algorithm and PID algorithm. The results show that the single neuron fuzzy PID algorithm has better dynamic and static characteristics. Then, the control system and SRM were tested on the actual loom experimental platform. The control system can run stably, the actual production efficiency of the loom is improved, and energy consumption is reduced.

B. INNOVATION OF EMBEDDED RAPIER LOOM CONTROLLER AND CONTROL STRATEGY DESIGN BASED ON SRM
1. In order to change the current situation of a low level of networking and integration of the loom control system and high production cost in the past, combined with the characteristics of tailorability, low cost and strong scalability of embedded systems, this paper innovatively proposes the hardware structure of embedded STM32 control systems based on CAN communication, which reduces the cost based on improving networking and integration. 2. To change the current situation of a low efficiency and low operating performance of the traditional loom speed control system, this paper innovatively proposed the SRM single neuron PID control algorithm and used it in the actual production control of the loom. This article uses a single neuron to improve the PID parameters, which makes the loom more efficient during the actual production process and better in terms of running performance. 3. To change the current situation of high energy consumption in the actual production process of traditional looms, this paper innovatively introduces fuzzy control theory to adjust the output gain of a single neuron PID control online and applies it to the actual production control of looms to improve the dynamic and static performance of the system and reduce the energy consumption of the system.
In terms of cost, compared with the previous control structure of electrical equipment, such as a frequency converter and servo driver with PLC as the control core, the hardware structure of the embedded STM32 control system, based on CAN bus communication proposed in this paper, generally can effectively reduce the cost on the basis of improving networking and integration. In addition, in the control of a rapier loom, compared with the traditional permanent magnet synchronous motor, the use of a switched reluctance motor also greatly reduces the cost of the loom control system. In terms of energy savings, compared with the traditional asynchronous motor and frequency converter as the main transmission system of the loom, the energy consumption of the switched reluctance motor applied to the main transmission system of the loom is greatly reduced under the same production capacity. The starting torque of the switched reluctance motor can reach twice the rated torque, but the effective current is only one-third of the rated current, which effectively saves energy. In terms of improving the production efficiency and operation performance, after repeated experimental demonstration, the efficiency of the switched reluctance motor speed regulation system is at least more than 3% higher than that of the traditional asynchronous motor plus the frequency converter. When the motor runs at a low speed, the energy-saving effect is more obvious, and the efficiency can be at least 10% higher. In addition, this paper proposes a single neuron fuzzy PID strategy for a switched reluctance motor in the actual production control of a rapier loom, which combines the respective advantages of a single neuron algorithm and fuzzy control algorithm to make the actual switched reluctance motor run better, which is embodied in a smaller speed overshoot, a faster speed response and a more stable speed.

III. THE OVERALL STRUCTURE DESIGN OF THE CONTROL SYSTEM A. HARDWARE STRUCTURE DESIGN OF THE CONTROL SYSTEM
In terms of the hardware design, the control system is divided into six hardware modules: the main control module, power transmission coil module, spindle drive module, weft selection and selvedge module, dobby drive module and tension detection module. As shown in Fig. 4, the main control module is the control core of the system. It comprehensively detects the running status of the loom according to external input signals, such as the buttons and encoders of the loom. Then, the control signal is output according to the technological process and it can communicate with other modules through the CAN bus at the same time to coordinate the work of other modules. The tension detection module is responsible for processing the tension sensor information and provides accurate tension information for the main control module and the let-off and curling module. The weft selection and selvedge module is used to drive the weft selection and selvedge stepper motors to complete the corresponding actions. The power transmission coil module is used to drive the let-off curling motor and keep the tension stable. The spindle drive module is used to drive a switched reluctance motor. The dobby drive module drives the corresponding electronic dobby electromagnet to control the up and down movement of the heald frame according to the drive signal of the main control module. In the design of PCB boards, the design of some key circuits uses integrated modules to improve the degree of integration of the hardware system. In addition, in the selection of the communication serial port, the corresponding communication method is selected according to the demand to improve the network degree of the system. Fig. 4 shows the hardware structure of the rapier loom control system.

B. THE OVERALL STRUCTURE DESIGN OF THE SRM SPEED CONTROL SYSTEM
The digital controller uses an STM32F407VET6 microcontroller. The digital controller detects the rotor position through the position sensor, determines the conduction phase and calculates the speed. Then, the motor speed is compared with the given speed to obtain the speed difference, the PWM duty ratio is calculated, and the power converter is driven to turn on the corresponding phase coil of the motor in order to achieve speed adjustment. In the switched reluctance motor speed control system, the power converter is a very important part, as it provides energy for the motor. The SRM used in this article is a three-phase 12/8 pole, and the power converter circuit using an asymmetric half-bridge topology is a better choice. The power converter adopts an asymmetric halfbridge topology. The power converter in this article has three independent bridge arms. Each bridge arm is composed of freewheeling diodes and IGBTs. The SRM used in this article is a three-phase 12/8 pole with a rated power of 5.5 kW. The Hall position sensor used for position detection is fixed inside the SRM. In the control strategy of SRM, because the voltage chopping control has good dynamic characteristics and a wide-range speed adaptability, it is quite suitable for driving the SRM, so this paper chooses the voltage chopping control as the basic control strategy of SRM. Current detection is indispensable in the process of speed regulation. Its function is to limit the current during the motor start-up phase and limit the maximum current when the motor is locked or overloaded in order to protect the motor and the drive circuit. In this part of the speed adjustment algorithm, this paper adopts a single neuron fuzzy PID control strategy based on SRM. Fig. 5 shows the overall structure of the SRM speed control system.
In the application of rapier looms, there are some specific and complicated parts of the SRM drive control. The power converter provides energy for the switched reluctance motor. The digital controller then provides a development platform for the realization of the algorithm. When detecting the rotor position, the Hall switch sensor is used as the core of the rotor position detection circuit to detect the rotor position. When performing current detection, it is necessary to build a current detection circuit to detect the magnitude of the current.

IV. SINGLE NEURON FUZZY PID CONTROL STRATEGY BASED ON SRM
The PID control algorithm is the most commonly used motor speed control algorithm, but the PID algorithm has a poor control effect on nonlinear systems. When the system parameters change, the parameters of the PID algorithm need to be VOLUME 10, 2022 adjusted accordingly. The intelligent optimization algorithm gives new vitality to the PID algorithm. The PID parameters are adjusted online through an intelligent algorithm to make the PID algorithm more adaptable [27], [28].
The electromagnetic characteristics of SRMs are highly nonlinear, are affected by the eddy current, hysteresis and other effects. Therefore, it is difficult to establish an accurate mathematical model, and there are problems with a large amount of calculations and a complex calculation structure. The fuzzy control algorithm is based on the corresponding relationship between the input fuzzy quantity and the output fuzzy quantity established based on expert knowledge. Therefore, the fuzzy control algorithm does not require an accurate mathematical model in practical applications, and it has a strong robustness. This is the reason for adding a fuzzy control algorithm to the SRM speed control system. The single neuron control algorithm has a strong performance in self-learning and self-optimization. The single neuron control algorithm can effectively reduce the amount of calculations under the condition of achieving normal control, which is very suitable for applications in SRM speed control systems. This is the reason for adding a single neuron control algorithm in the SRM speed control system.
In summary, in order to make the PID control algorithm have a better control effect over a wider speed range, a single neuron control algorithm is used to adjust the three PID parameters online. At the same time, a fuzzy control algorithm is used to adjust the output gain of a single neuron PID online based on expert knowledge and to further optimize the control output of the PID algorithm.

A. THE BASIC CONTROL STRATEGY OF THE SRM 1) WORKING PRINCIPLE OF THE SRM
The operation of the SRM follows the ''principle of minimum reluctance'', that is, the magnetic flux is closed along the path of least reluctance [29]. Fig. 6 shows a simplified diagram of the internal stator and rotor structure of the SRM. When the B-phase control switch is closed, the B-phase starts to be energized and generates a magnetic field force. The generated magnetic field force moves the salient poles of the rotor to the salient poles of the stator until the axis between the salient poles of the rotor and the stator is aligned. Then the phase windings are energized one by one, and the rotor rotates. The rotation direction of the SRM has nothing to do with the current direction of the phase windings, and the rotation direction of the motor can be changed by changing the winding energization sequence. Fig. 6 shows a simplified diagram of the SRM structure.

2) THREE CONTROL METHODS OF THE SRM
SRM has many controllable quantities. According to the different controllable quantities, it is divided into three basic speed regulation methods: voltage chopping, current chopping and angle position control [30]. Voltage chopping control is also called voltage PWM control. Under the condition  of a fixed switching angle of each phase, the coil current is changed by adjusting the PWM duty cycle to control the speed. During the period when the phase winding is turned on, the phase current rises rapidly; during the period when the phase winding is turned off, the current continues to flow with the phase winding through the freewheeling diode. This control method has good dynamic characteristics and a wide range of speed adaptability, which is very suitable for driving the loom SRM. The dynamic response of current chopping control is poor, which is suitable for occasions with a low speed. Angular position control is suitable for high-speed motor operation control but not suitable for the control system designed in this paper. Therefore, this article chooses voltage chopping control as the basic control strategy of SRMs.

B. RESEARCH ON SINGLE NEURON PID CONTROLLER BASED ON SRM 1) PID ALGORITHM AND ITS DISCRETIZATION
The basic structure of the PID algorithm is shown in Fig. 7.
The deviation e(t) is obtained by comparing the output y(t) with the reference input r(t), and then through the proportional, integral, and derivative action, the controlled object is adjusted by the actuator. The basic equation is shown in Equation (1).
In the equation, k P is the proportional coefficient, T I is the integral time, T D is the derivative time, e(t) is the input error, and u(t) is the final control output.
To achieve PID control in the controller, it needs to be discretized. When the sampling time is small enough, the integral part can be regarded as the accumulation of the error obtained for each sampling, as shown in Equation (2): In the equation, t and T are sampling times. the differential part can be expressed as:.
Therefore, the PID algorithm equation can be discretized as: k P , k I and k D are the three parameters of the PID algorithm that need to be adjusted: proportional, integral and derivative, respectively. The three parameters of the PID algorithm play a decisive role in the control performance. The tuning of the three PID parameters has always been based on experience and system characteristics using trial and error. Later, the critical proportionality method and the extended response curve method were used to tune the PID parameters. The PID parameters obtained by either method are only applicable to linear systems; they are not completely applicable to nonlinear systems. Therefore, it is a good choice to use a neural network to perform online self-tuning of PID parameters.

2) SINGLE NEURON MODEL
A single neuron is the basic component of a neural network, and its structure is shown in Fig. 8 [31].
In Fig. 8, x i is the input signal of the neuron, w i is the weight of the input signal, and θ is the neuron threshold. The neuron will process the input signal in a certain way to obtain the total result. The commonly used method is the linear weighted sum method, and its calculation equation is: The processing result net of the single neuron input signal can give the final output y of the single neuron through the activation function, and the relationship between them can be simply expressed as: To make the neuron have the ability of self-learning and self-adaptation, the weight w i must be modified. According to whether the learning process introduces the expected output as a reference, this can be divided into two types: supervised and unsupervised learning [32]. The unsupervised Hebb learning rules are as follows: In the equation, w i (k) is the change in the weight, η i is the learning efficiency, y(k) is the neuron output, and v i (k) is the neuron input. Unsupervised learning rules have no external reference, and learning has a certain degree of blindness. The supervised delta learning rules are as follows: In the equation, r(k) is the external expected output. The supervised learning rules have an external reference, which can make the neuron learn in the direction of the fastest reduction of error. Combining the above two rules to obtain the supervised Hebb rule can give play to the advantages of the two learning rules. The specific rules are [33]:

3) DESIGN OF A SINGLE NEURON PID CONTROLLER
The deviation value e(k), the integral link k i=0 e(i), and the differential link (e(k) − e(k − 1)) of the PID algorithm are used as the information input of a single neuron, and the three parameters of the PID algorithm are used as weights to adjust online through self-learning so that the threshold θ is 0. As a result, a single neuron PID controller model can be obtained, where the output of the controller is: In the equation 1)). To ensure the convergence of the control strategy, the weights are normalized, where the normalized coefficient is The weight w i is adjusted using the supervised Hebb learning rules, where the specific equations are:    w 1 (k + 1) = η P e(k)y(k)x 1 (k) + w 1 (k) w 2 (k + 1) = η I e(k)y(k)x 2 (k) + w 2 (k) w 3 (k + 1) = η D e(k)y(k)x 3 (k) + w 3 (k) (11) In the equations, η P , η I and η D are the learning rates of the three coefficients for proportional, integral and derivative, VOLUME 10, 2022 respectively. For the initial weight w i (0) of each input quantity, because the weight will quickly approach the optimal solution after the iteration starts, it can be set arbitrarily. The learning rate of the weights mainly affects the adjustment time of the system. The learning rate is preferably larger, and it is adjusted according to the actual operation of the system. After the weight is normalized, its range is between 0 and 1. If the output is not amplified, it will affect the speed of the controller. The larger the output gain K is, the faster the system response and the better the rapidity, but an overshoot will increase accordingly, and oscillations will even occur. If K is too small, then the dynamic response speed of the system will be reduced. If the gain in the controller is not adjusted, then the control effect will be reduced. Therefore, the fuzzy controller is introduced to adjust the K value online according to the system error information, and at the same time the single neuron PID output gain is fuzzy adjusted according to the speed error and the error rate of change.

C. FUZZY CONTROL ONLINE ADJUSTMENT OF A SINGLE NEURON PID CONTROLLER GAIN
The single neuron fuzzy PID structure is shown in Fig. 9. On one hand, the speed deviation is sent to the single neuron PID controller, and on the other hand the error rate of change is calculated and sent to the fuzzy controller. The output of the single neuron PID is multiplied by the fuzzy adjusted gain K, which is the final output of the controller.
Fuzzy control is a control technology that can convert natural language into a specific control output, including three steps: fuzzification, fuzzy inference and defuzzification.

1) DETERMINATION OF THE FUZZY DOMAIN
First, the input and output are fuzzified. Fuzzification is the process of transforming a physical quantity into a fuzzy quantity and scaling it to the respective scope of the universe. The fuzzy level of input and output is divided into 7 levels: {NB, NM, NS, ZO, PS, PM, PB}. The value of the controller gain K should be greater than 0, so the following equation is used to adjust the value of K: In the equation, K is the adjusted gain, K is the output gain of the fuzzy controller, and K 0 is the initial gain.
Set K 0 to 3, and the domain of output K is [-3,3]. Set the domain of motor speed deviation e to [-300,300] and the ; k K = 1 (13)

2) DETERMINATION OF THE MEMBERSHIP FUNCTION
The membership function is a function used to express the fuzzy relationship between the input and output parameters and fuzzy variables. The membership function has triangular, Gaussian, bell, and S-shaped forms, as well as others.
When determining the membership function, it can be flexibly selected according to actual control requirements and not limited to a certain form [34]. When the speed deviation is large, due to the need for a fast adjustment, the fuzzy set resolution can be reduced to achieve a fast response. When the deviation is small and close to the center of the collection, the control accuracy needs to be increased, and the fuzzy collection can be made closer to the center to increase the resolution [35]. According to the above analysis, taking the input deviation e as an example, the membership degree relationship shown in Fig. 10 is established.

3) THE ESTABLISHMENT OF FUZZY RULES
Fuzzy rules are the corresponding relationship between the input fuzzy amount and the output fuzzy amount established based on expert knowledge. According to actual debugging experience, the adjustment of the K value should meet the following principles: when e is large, a large gain K should be maintained to make the speed close to the reference speed. When e is in the middle, if ec is large, then the value of K should be appropriately reduced to avoid a large overshoot; if ec is small or moderate, then the value of K can be appropriately increased; when e is small, if ec is moderate or large, it means that the motor is close to the reference speed, but the speed is still changing rapidly. At this time, a small K value should be used. If ec is small, then the system is close to stability, and a moderate K value should be used to maintain a stable state. According to the above analysis, the specific fuzzy rules are shown in Table 1. To improve the real-time performance of the system, the fuzzy control in the controller adopts an offline calculation and online adjustment. The fuzzy output is calculated with the help of MATLAB and the data is stored in the ROM of a one-chip computer. According to the distribution of the membership function, when selecting the value, follow the value method of a large resolution at both ends and small resolution in the middle.

D. CONTROL ALGORITHM SIMULATION RESEARCH
SRM has the characteristics of a magnetic circuit saturation, a non-sinusoidal current, and strong coupling between various parameters, making it very difficult to model and analyze. To facilitate an engineering analysis, a large amount of linearization of SRM can obtain a linear model and quasi-linear model of SRM, but the accuracy of these two models is low. Therefore, this paper uses SIMULINK to construct the SRM nonlinear dynamic simulation model through a twodimensional look-up table of the motor parameters. Fig. 11 shows the SRM voltage chopping control PID algorithm speed regulation model built by SIMULINK. The model consists of five modules: PID, position detection, power converter, speed calculation and the SRM motor body. The speed calculation module calculates the motor speed according to the motor output torque and load torque and outputs the angular speed of the motor rotor. The PID algorithm module outputs the PWM wave according to the input deviation. The position detection module accumulates the motor rotor speed to obtain the motor rotor position and then outputs A, B, and C three-phase conduction control signals according to the set conduction and shutdown angles. The power converter supplies power to each phase of the SRM according to the conduction control signal. The PWM wave output by the PID module and the conduction signal output by the position detection module are ANDed through the three-input logic unit and the current limiting unit. When the phase current is below 30 A, the converter is allowed to be turned on. The SRM module then calculates the current of each phase and the output torque of the motor based on

2) SRM ONTOLOGY SIMULATION MODEL
With reference to the 5.5 kW motor used in the experiment, a simulation model of the SRM motor, as shown in Fig. 12, is established. Similar to the position detection module, the model first calculates the current rotor position according to the input angular velocity and maps the three-phase rotor position in the range of 0 to 45 degrees. Then, each phase submodule calculates the output phase torque and the phase current according to the current angle and input voltage. Each phase current is independent, and the sum of each phase torque is the motor output torque. Fig. 13 shows a single-phase SRM nonlinear dynamic simulation model constructed using a two-dimensional lookup table of SRM data.
Each phase of the motor has the same electromagnetic characteristics, but the mechanical angle of the phase VOLUME 10, 2022 difference is 15 • , so the simulation models of the other two phases are the same as in Fig. 13. The inputs of the model are the rotor angle and the phase voltage, and the output is the phase current and torque. Through Equation 14, the current phase current is obtained in the model with the help of a controlled current source and a series of calculations.
where i is the phase current, U is the phase voltage, R is the winding resistance, and L(θ, i) is the phase inductance. Table 1 and Table 2 in Fig. 13 are two-dimensional lookup tables of the motor torque T (i, θ) and inductance data L(i, θ), respectively. As shown in Fig. 14, according to the phase current and the current angle, the phase state can be obtained with the help of a two-dimensional look-up table.

3) REALIZATION OF A SINGLE NEURON FUZZY PID CONTROLLER
Because the fuzzy control output adopts offline calculations and an online search, the program design will mainly realize a single neuron PID. The single neuron fuzzy PID program flow is shown in Fig. 15.
The timer is started at the beginning of the program so that the timer can generate a fixed frequency interrupt, initialize the seven parameters of the single neuron PID, and enter the first operation. First, calculate the speed deviation e and the deviation change rate ec, then query the offline output table of the fuzzy controller according to the result, and calculate the gain K . The controller calculates the PWM output duty cycle, updates the corresponding registers, and then updates the weights according to the learning rules for the next calculation. Finally, wait for the timer interrupt to be generated, and perform the next calculation in the interrupt processing function.

4) COMPARATIVE ANALYSIS OF THE SIMULATION RESULTS
The simulation models of the three control algorithms are simulated separately. The proportional, integral, and differential coefficients of the PID control algorithm are 4, 1.5 and 0.001, respectively. The learning rate of the three parameters in the single neuron PID algorithm is 0.5, 0.3 and 0.1, and the gain K is 3. The parameter setting in the single neuron fuzzy PID is the same as the single neuron PID, the simulation is conducted under no-load conditions, and the target speed is set to 1500 r/min. The simulation results are shown in Fig. 16.  Among the three control algorithms, the PID algorithm has the largest overshoot at approximately 5.5%, and it takes the longest to reach a steady state. The single neuron PID algorithm has no overshoot, but the response speed is reduced. Although the single neuron fuzzy PID algorithm has a 1.3% overshoot, it has the fastest response speed. Compared with the traditional PID algorithm for motor control, the single neuron fuzzy PID algorithm not only reduces the overshoot, but also improves the response speed of the motor. Although the single neuron fuzzy PID algorithm for motor control has some overshoots compared to the single neuron PID algorithm for motor control, the response speed of the motor has been significantly improved. The speed control of the switched reluctance motor is particularly important for the demand for the dynamic response speed in the actual production of rapier looms. The existence of a moderate amount of overshoot is acceptable for the control of a switched reluctance motor. Therefore, a comprehensive comparison shows that the single neuron fuzzy PID algorithm has a better control effect.
Reducing the overshoot and improving the response speed of the motor are of great significance to the actual production requirements of rapier looms. Reducing the overshoot means reducing the error in the production process of the rapier loom so that the motor can enter the rated speed state faster, thereby making the actual production process of the rapier loom more accurate. Increasing the response speed of the motor means that the rapier loom can enter the production operation faster, thus improving the actual production efficiency. Fig. 17 shows the relationship between the SRM motor speed and the load torque. In Fig. 17, A1 and A0 divide the entire graph into three parts. The area under A1 is called the second voltage drop control area. This area is characterized by a voltage drop, and the excitation width of the switched reluctance motor is enlarged. The middle area between A1 and A0 is called the first voltage drop control area. This area is characterized by a voltage drop, and the excitation width of the switched reluctance motor is normal. The area above A0 is called the usual control area, which is characterized by no voltage drop, and the excitation width of the switched reluctance motor is normal. Fig. 17 shows that the load torque of the switched reluctance motor remains unchanged until the rotational speed of the switched reluctance motor does not reach the critical value. When the rotational speed of the SRM reaches the critical value, the SRM reaches its rated power for operation, and the load torque is inversely proportional to the rotational speed of the SRM.

B. SRM MOTOR DRIVE ALGORITHM EXPERIMENT
To compare the single neuron fuzzy PID control algorithm and the traditional PID control algorithm, this paper conducts experiments on the actual motor speed change trend under the control of the two control algorithms. The drive board sends the speed data to the embedded STM32 control system based on CAN communication and then collects and processes the data.
Setting the target speed to 1500 r/min, the ratio, integral, and derivative parameters of the traditional PID algorithm are 5, 1, and 0.002, respectively, and the learning rate of the single neuron fuzzy PID algorithm is set to 0.6, 0.2, and Due to the limitation of the calculation method of the motor speed in the program, the motor speed can be accurately calculated after the rotor has rotated by at least 15 degrees, and the speed calculation data are 0 before this. Therefore, the speed data are linearized during a period of time at startup. The overshoot, rise time, peak time and other indicators of the two algorithms are calculated, as shown in Table 2. A comparative analysis of the indicators of the test results of the two algorithms shows that there is no significant difference between the two control algorithms in terms of steadystate error, both of which are less than 1%. Compared with the PID algorithm, the single neuron fuzzy PID algorithm has a smaller overshoot and a faster ascent speed, and the control effect is obviously better than PID control.
The experimental data show that, compared with the traditional PID algorithm, the single neuron fuzzy PID algorithm reduces the overshoot of the switched reluctance motor and improves the dynamic performance of the motor, which is of great significance to the actual production requirements of rapier looms. On one hand, reducing the overshoot means reducing the error in the production process of the rapier loom, making the motor enter the rated speed state faster, and making the actual production process of the rapier loom more accurate. On the other hand, improving the response speed of the motor means that the rapier loom can enter the production operation faster, thereby improving the actual production efficiency.    Fig. 19 shows a domestic 910 rapier loom, the main motor of which is replaced with a switched reluctance motor, and on-site debugging is performed. To effectively reduce the control cost of the rapier loom, the hardware control system adopts the fully embedded STM32 control system based on the CAN bus. To reduce the production energy consumption and improve the dynamic performance and production efficiency of the rapier loom, the single neuron fuzzy PID control algorithm based on voltage chopper control is used to control the switched reluctance motor used in the rapier loom.

C. FIELD TEST OF THE CONTROL SYSTEM
The test control algorithm is a single neuron fuzzy PID algorithm, and the parameter settings are the same as those when there is no load. Limited to the mechanical conditions of the experimental loom, the target speed is set to 1000 r/min, and other mechanisms on the loom do not move and only use the motor to drive the main shaft to rotate. The speed curve of the motor is shown in Fig. 20. The motor reaches the set speed in approximately 50 ms and stabilizes quickly. The test results show that the SRM can drive the main shaft to operate normally on the experimental loom.
In terms of cost, compared with the previous control structure of electrical equipment, such as a frequency converter and servo driver with PLC as the control core, the hardware structure of the embedded STM32 control system based on CAN bus communication proposed in this paper can, in general, effectively reduce the cost on the basis of improving networking and integration. In addition, this paper proposes a single neuron fuzzy PID strategy for a switched reluctance motor in the actual production control of a rapier loom, which combines the respective advantages of a single neuron algorithm and fuzzy control algorithm to make the actual switched reluctance motor run better, which is embodied in a smaller speed overshoot, a faster speed response and a more stable speed.

VI. CONCLUSION
This article mainly introduced a type of SRM embedded rapier loom controller and control strategy design research. This paper analyzed the development status of the rapier loom and its control system and summarized the development trend, content and deficiencies of the research-related directions. To effectively reduce the production cost and energy consumption of rapier looms in industrial production and to further improve the operating performance and production efficiency of rapier looms, this article independently developed and designed a complete low-cost control system based on CAN bus communication and a fully embedded STM32. In this paper, an innovative SRM single neuron fuzzy PID speed control strategy based on voltage chopping control is proposed and used in the control of the main shaft drive technology of rapier looms.
In terms of hardware, this paper analyzes the weaving principle and control requirements of rapier looms and determines the hardware structure of the integrated control system. This article analyzes the functions and controlled requirements of each mechanism on the loom, combined with the specific controlled loom. According to the control requirements of the loom, this paper determines the design mode of the fully embedded STM32 based on CAN bus communication in the hardware part of the control system. This article divides the control system into multiple functional modules, such as the main control module, the power transmission coil module, and the spindle drive module. Compared with the traditional loom control system, the integration is improved, and the control cost is reduced.
In terms of algorithms, this paper analyzed the three basic control strategies of SRMs and determined the voltage chopping control method of SRMs according to the number of motor phases, position detection methods, and specific use occasions of the motor. Due to the nonlinear and variable structure characteristics of SRM, a single neuron fuzzy PID speed closed-loop control algorithm was proposed, which uses a single neuron to improve the PID parameters and adjusts the single neuron output gain through fuzzy control.
Finally, the actual running process of the loom was tested, and the comparison showed that the control system can meet the speed response requirement of the loom at 850 r/min and can make the loom run stably. Compared with the traditional PID algorithm, the single neuron fuzzy PID algorithm has better dynamic and static performances in motor speed regulation. The entire system achieves the goal of reducing production costs and energy consumption and improving the operating performance and production efficiency of the loom.
In the future, the improvement of the SRM-based embedded rapier loom controller and control strategy is mainly reflected in the following aspects.
1. With the progress of science and technology, in future development research on remote control systems is imperative. Therefore, to meet future development needs, wireless transmission modules or industrial Ethernet modules should be added to the design of the embedded rapier loom controller system in the future to meet the needs of industrial interconnection. At the same time, the data transmission rate should be continuously increased. 2. As the braking requirements of looms increase, an SRM with a higher precision can be used to conduct SRM braking research and further simplify the main transmission mechanism of the loom. In addition, the main transmission structure of the loom is indirect transmission. In a follow-up study, the main transmission structure was further tested after mechanical transformation. In the future design of this subject, it will be necessary to further develop new solutions on the basis of satisfying system functions, simplify the system structure, and making the entire system more compact. To improve the intelligence of the system, this subject should consider adding system fault diagnosis and intelligent prediction functions in the future design process. In future work, when designing the switched reluctance motor control system, we will consider a distributed solution in the system design process to integrate the machine into the actual loom factory management system. we will also consider integrating the proposed system in an IEC 61499 distributed solution due to the relevance of switched reluctance motor control systems in a distributed architecture.

DATA AVAILABILITY
The code and data used to support the findings of this study have been deposited in the Design of an Embedded Rapier Loom Controller and a Control Strategy Based on SRM repository and can be obtained from the corresponding author upon request. LINHAN SHI received the bachelor's degree in measurement and control technology and instrumentation from the Hebei University of Technology, in 2019, where he is currently pursuing the master's degree in electronic information. His interests include intelligent perception and control and embedded development.
PING LIU received the graduate degree from the Hebei University of Technology, in 2020, where she is currently pursuing the master's degree. Her research interests include intelligent control and health management.
FURONG HAN received the graduate degree from the Hebei University of Technology, in 2020, where she is currently pursuing the master's degree. She is an Assistant Engineer with Jiangsu Career Leader Intelligent Control Automation Technology Company Ltd. Her research interests include intelligent control and health management.
WEILING LIU received the bachelor's and master's degrees in mechanical engineering from the Hebei University of Technology, in 1995 and 1998, respectively, and the doctorate degree from Tianjin University, in 2006. From 2009 to 2011, she conducted postdoctoral research with Bao Jingling at the Tianjin Academy of Environmental Sciences. She is currently an Associate Professor with the Hebei University of Technology. Her main research interests include artificial intelligence and automation control.