Development of underground coal mine drainage monitoring system based on DSP

: Aiming at solving problems such as non-linear, time-varying parameters, and weak digital computing capability in the underground drainage system, the monitoring system is built based on a digital signal processor (DSP). Adopting DSP28335 as its control core, the hardware circuit and software program are designed in this monitoring system. The single-neuron fuzzy proportional, integration, and differential (PID) control algorithm with feedforward proportional and differential compensation is proposed in this study. The simulation results are compared and analysed with a traditional PID algorithm, fuzzy PID algorithm, and single-neuron fuzzy PID algorithm with feedforward in Matlab/Simulink, and the experimental platform is built to verify the application effect of three control algorithms. The simulation and experiment results show that the single-neuron fuzzy PID algorithm with feedforward has significant advantages such as shorter adjustment time, good adaptivity, and strong anti- interference ability, which could effectively improve the work efficiency of an underground mine drainage monitoring system.


Introduction
The main function of the coal mine drainage monitoring system is to discharge the accumulated water in the coal mine production timely to avoid serious water seepage accident and to ensure the safety of the underground personnel and equipment. As one of the six major production systems in the coal mine, the drainage system not only undertakes the drainage task but also consumes 19-25% of the electric energy of the whole coal mine production system [1,2]. Therefore, improving the working efficiency of the drainage monitoring system is especially important.
At present, most of the controllers used in mine drainage systems are based on single-chip microcomputers [3,4] and PLC [5][6][7] design. The main control methods are fuzzy control, fuzzy proportional, integration, and differential (PID) control or neural network PID control, and so on. The fuzzy control method proposed in [8][9][10] is based on the water level, the water level change rate is used to determine the number of underground water pumps started, which can avoid centralised drainage during electricity consumption peak. However, simply using the fuzzy control method requires enough variable grading; otherwise, it will cause oscillation near the equilibrium point.
In [11], an adaptive fuzzy output-feedback back-stepping control approach has been developed for a class of switched stochastic pure-feedback non-linear systems. However, it is difficult to satisfy the condition that all states are available for measurement in the actual coal mine drainage monitoring system.
In [12], the local asymptotic tracking control problems for a class of uncertain switched non-linear systems are investigated. The controller can track the desired trajectories at different switching rates, so the controller is not continuously controlled and is more unstable. Also, in the process of controller design based on the back-stepping method, it is necessary to repeat differential for the virtual control signal, there is 'the explosion of complexity'. Then, in [13], the authors introduce the small-gain approach to replace the complicated differential operation. To a certain extent, this method solves the problem that the calculation is too complicated, but the error introduced by the small-gain approach itself is not calculated and compensated.
In [14], the authors have considered the dynamic output feedback control design problem for a class of discrete-time nonlinear systems with linear fractional parametric uncertainties. The T-S model is introduced to linearise the non-linear object. Under the precondition of parameter uncertainty and immeasurable state, the output feedback controller is designed. However, the problem of conservative in the design process of the controller has not been fundamentally solved, and the control process is redundant, so this method is not suitable for real-time control in the coal mine.
The fuzzy PID control method proposed in [15][16][17][18] uses fuzzy control to modify the PID control parameters to complete the parameter self-tuning, which can realise the control of traditional PID for non-linear systems such as mine drainage. However, the fuzzy PID control still needs to refer to the experience to select the initial control parameters. The poor initial parameter values will seriously affect the control performance of the drainage monitoring system.
The neural network adaptive PID control method proposed in [19,20] combines neural network and PID control to achieve precise control of the water level of the water sump. However, the amount of computation of the control algorithm is too large, and the weight adjustment is very complicated.
Based on the research of the existing coal mine drainage monitoring system, this paper applies the digital signal processor (DSP), DSP28335, to the drainage monitoring system instead of the original single-chip microcomputer and PLC, to give full play to the high-speed data operation ability of DSP, which can greatly improve the processing speed, stability, and control accuracy of the monitoring system. A single-neuron fuzzy PID control algorithm with feedforward proportional and differential (PD) compensation is proposed. The weight value of the neuron is adjusted by learning rules, and the output gain of the neuron is adjusted by fuzzy control, which overcomes the problems of non-linearity and timevarying parameters in the underground drainage system of a coal mine. The way of weight adjustment is simple and easy to realise.

Composition of the drainage system
The composition of the drainage system includes a centrifugal pump and its components are centrifugal pump, pump motor, various valve components (drain valve, check valve, one-way bottom valve etc.), monitoring instruments (vacuum gauge, pressure gauge), and drainage pipe. To improve the operation reliability of the drainage system, this paper uses redundant design J. Eng to build three drainage pipes for use, maintenance, and standby. The start and stop of the pump have a strict operation process, which must be operated in accordance with the specifications; otherwise, it will cause irreversible damage to the drainage equipment. The pump and its components are shown in Fig. 1.
When the underground mine water gushes continuously and the water level of the water warehouse continues to rise, the system chooses the ultrasonic liquid level sensor and the float liquid level sensor to be used together, and the collected water level signal is transferred to DSP through the conditioning circuit. DSP judges the underground water inflow and the real-time water level information according to the output information of the sensor. When the water level of the water tank exceeds the warning water level, DSP sends out control instructions to drive the jet pump to vacuum the pump, and the pressure sensor monitors the vacuum degree of the pump inlet and the pressure of the outlet. When it is detected that the inlet negative pressure meets the pump opening condition, DSP controls the pump motor to run through the frequency converter. The pressure at the outlet of the water pump will increase with the operation of the pump motor. When the threshold set by the system is reached, DSP issues control instructions to turn off the jet pump and open the solenoid directional valve to start drainage until the water level falls to a safe water level and then turn off the drainage gate valve and the pump motor in turn.

Working principle of the drainage monitoring system
The drainage monitoring system is designed based on DSP, which adopts a master-slave structure design. The master workstation is PC, and the slave workstation is DSP controller, various types of monitoring sensors, communication modules, D/A conversion circuits, frequency changers, water pump sets etc. The block diagram of the DSP control system is shown in Fig. 2.
When the system starts to work, the signals collected by the sensor, such as water level, bearing temperature, pressure of water pump outlet, and drainage pipe flow, are first transmitted to the DSP controller through the regulating circuit, and then transmitted to the host computer via Ethernet, and then displayed in the form of the real-time curve through the monitoring interface of the host computer. The alarm threshold is determined according to the actual operating conditions, and an alarm is given in time in case of abnormal flow, pressure, temperature, and other signals.

Microprocessor
DSP (TMS320F28335) is selected as the microprocessor of this monitoring system. It is one of the 28× Delfino floating-point series of TI Company. The main frequency is up to 150 MHz. It integrates an on-chip two-way serial communication interface and a 12-bit 16-channel analogue-to-digital converter. It can receive multichannel output signals of the monitoring sensors, and automatically store the conversion results in the corresponding result register ADCRESULT 0-15. There is 88 controllable general-purpose input/output (GPIO) ports integrated on the chip, of which GPIO28(35)/SCIRXD (receive) and GPIO29(36)/ SCITXD (transmit) are serial communication interfaces.

Digital/analogue conversion circuit
Since the input control quantity of the frequency changer is analogue quantity and the output quantity of the DSP system is digital quantity, the monitoring system selects DAC7725, a highprecision digital-to-analogue conversion chip, to realise the conversion from a digital signal to an analogue signal. The conversion chip is a voltage output type digital-to-analogue converter (DAC), and the output voltage range is ±10 V. It can be directly connected to the input port of the frequency changer through the VOUTA, VOUTB, VOUTC, and VOUTD analogue signal output ports of this conversion chip.
The frequency changer can adjust the supply voltage and frequency of the pump motor by the input analogue voltage value. So, it can adjust the pump output flow by controlling the speed of the pump motor. According to the actual water gushing condition in an underground coal mine, the speed of the pump motor is reduced when the required flow is reduced. By adopting the principle of avoiding apex and filling valve, the pump motor can run under the condition of high efficiency and can save electric energy. The connection circuit between the DAC module and the DSP is shown in Fig. 3.

Ethernet communication
There is usually a certain distance between the mine water sump and the control centre on the ground. There are many control equipment and monitoring equipment in the underground coal mine. Therefore, the industrial Ethernet technology with a high data transmission rate and strong anti-interference ability [21,22] is used to realise data transmission between underground coal mine and ground monitoring centre. Firstly, the MAX3232 conversion chip is adopted to convert the output TTL level signal of the DSP28335 serial communication port into the standard RS232 signal. Then the embedded network module ZNE-100T is chosen to upgrade RS232 to Ethernet to achieve long-distance transmission. The connection circuit between the ZNE-100T module and the MAX232 conversion chip is shown in Fig. 4.

DSP system software design flow
The main program of the lower computer of the drainage monitoring system is designed in the CCS6.0 integrated development environment, and the C language is used as the programming language. The design flow of the main program is to complete the system initialisation work first, and then perform data processing on the collected signals received in real time. According to the data operation results, the running state of the underground drainage system and the water level information of the water sump are judged, and then the control algorithm is called to realise startstop control and speed control of the pump motor. The main program flow chart is shown in Fig. 5.

DSP system control algorithm design
The single-neuron adaptive PID algorithm selected by the DSP system can meet the real-time requirements of mine drainage [23], while the introduction of fuzzy control can integrate the timevarying dynamic characteristics of water gushing into the fuzzy control rules with workers' experience and expert knowledge so that the control has a certain level of intelligence. In the feedforward channel of the control algorithm, PD compensation components are introduced [24,25]. The proportional component can change the amplitude of the water-level tracking signal of mine sump, and the differential component can adjust the phase of the water-level tracking signal. It avoids the vibration of the motor caused by the frequent change of the system output controlled quantity when the water level input signal is disturbed.
The single-neuron fuzzy PID control algorithm with feedforward PD compensation is used in the DSP control system. This algorithm is based on the water level deviation between the actual water level measured by the liquid level sensor and the initial set safe water level. The speed of the water pump motor is adjusted by controlling the analogue voltage of the frequency changer to realise the control of the water level of the coal mine water sump. The functional block diagram of the single-neuron fuzzy PID control with feedforward PD compensation is shown in Fig. 6.
Single-neuron PID has the advantage of integrating traditional PID control with neurons. The single-neuron PID algorithm combined with fuzzy control can fully exert its ability to approximate non-linear functions and achieve effective control for non-linear systems such as mine drainage. The block diagram of the single-neuron fuzzy PID algorithm is shown in Fig. 7.
The single-neuron fuzzy PID algorithm has three inputs, which are: where x 1 (k) is the water level deviation between the initial water level set value l PS (k) and the measured water level value l S (k) of the water sump during the kth sampling, x 2 (k) is the change rate of water level deviation and x 3 (k) is the first-order differential of the deviation value, reflects the variation trend of water level deviation. The adaptive learning process is completed by using the supervised Hebb learning rules to adjust the weights. The learning algorithm is: Where w i (k) is the connecting weight of the input signal, γ i (k) is the learning signal, η i is the learning rate i = I, P, D , c is the intelligent control scale factor, which is a constant and takes 0 in the actual application, and z(k) is the teacher signal.
The control algorithm of single-neuron PID is as follows: where u p (k) indicates the output signal of a single neuron at the kth sampling and K(k) is the output gain of a single neuron at the kth sampling. Substituting formula (2) in formula (3), normalising the learning algorithm, the final output of the controller is obtained as follows: where w i ′(k) represents the adjusted signal connection weight The weights are adjusted as follows: where η P , η I , and η D , respectively, represent the learning rate of proportional integral and differential. After the learning algorithm is normalised, it can effectively improve the convergence while speeding up the learning rate. It can be seen from (4) that the value of K has a great influence on the performance of a single-neuron PID controller . To further improve the control performance of the drainage monitoring system, fuzzy control is introduced to adjust the K value. The purpose of the fuzzy rule is to output a large K when the water level deviation is large and decrease the K value when the water level deviation is small, thus the response of the system is fast and does not oscillate.
The fuzzy control takes the water level deviation e and the change rate of water level deviation e c as the input amount takes the dynamic adjustment amount ΔK of the output gain K of the neuron controller as the output amount and by the following formula: The final amount of neuron output gain is obtained, where K 0 is the initial value of the output gain. The calculation process of ΔK is as follows.
The Therefore, due to the large variation range of water level deviation, deviation change rate, and dynamic gain adjustment, the membership function is defined as a triangle membership function. The membership function is shown in Fig. 8.
On the basis of simulation and experiment, combined with the actual drainage experience of an underground coal mine, the fuzzy control rule table of the drainage monitoring system is constructed. The output of the fuzzy control is obtained by querying the preestablished fuzzy control rule table. To obtain the accurate gain dynamic adjustment value, the de-fuzzification operation is implemented by using the centroid method, which is very sensitive to the input changes. The fuzzy control rule table of the neuron output gain dynamic adjustment amount ΔK is shown in Table 1.
The input signal of the feedforward PD controller is the initial water level setting value l PS (k). After the input signal is corrected by PD links, it can increase the response speed of the system as an additional input of the system. According to the transfer function of the feedforward channel: The output of the feedforward controller can be obtained as follows: The final output of the control algorithm is the sum of the singleneuron fuzzy PID output u p (k) and the feedforward PD output u(k) = u p (k) + u f (k) (10)

Algorithm flow
(i) Firstly, the current water level value l S (k) measured by the liquid level sensor is compared with the safe water level set by the system to calculate the water level deviation e.
(ii) The input signal x i (k) is calculated according to formula (1), and the weight w i (k) of the input signal is calculated by the Hebb learning rule.
(iii) Adding the dynamic adjustment value ΔK calculated by the fuzzy controller to the initial gain value K 0 of the neuron, the neuron output gain K is obtained.
(iv) The output control quantity u p (k) of the neuron was calculated, and then the output quantity u f (k) calculated by the feedforward PD controller is added to get the final output control quantity u(k).
That is the analogue voltage to control the speed of the pump motor.  (v) Through frequency changer, the water pump is controlled to drain until the water level returns to the safe level value.

Simulation experiment
In the underground coal mine drainage process, it is a pure lag process from starting the pump motor to discharging the water of the sump to the drainage pipe. For the drainage pipe, the water flow gradually increases to a steady level, this changing process is an inertial process. Therefore, the drainage system of the underground coal mine can be regarded as a first-order inertia link with pure lag. The approximate mathematical model of the drainage system is as follows [26]: The simulation model of water level control system based on conventional PID control, the fuzzy PID control and the singleneuron fuzzy PID with feedforward PD compensation control was established in the environment of Matlab/Simulink. The simulation results were also compared and analysed. The simulation model of the single-neuron fuzzy PID control with feedforward PD compensation is shown in Fig. 9.
Assuming that the sampling time is 0.1 s and the simulation time is 120 s, the initial values of the single-neuron weights w 1 , w 2 , and w 3 are 0.3, 0.3, and 0.3, respectively. The neuron output initial gain value K = 20. k d = 1.75 is the learning rate i = I, P, D , where η I = 0.2, η P = 0.2, and η D = 0.5. When the feedforward link is selected, the initial PID parameters are selected as k p = 0.01 and k d = 1.75. Under the action of the unit step signal, the simulation output waveform is shown in Fig. 10.
From the above figure, we can see three-step response curves under three different control strategies such as PID control，fuzzy PID control, and single-neuron fuzzy PID control with feedforward PD. Under three control strategies, the time required to reach the steady state for the system is 37, 32, and 28 s, respectively, and the overshoot of PID algorithm and fuzzy PID algorithm is 22 and 4%, respectively, while the single-neuron fuzzy PID algorithm with feedforward has almost no overshoot.
At t = 60 s, an interference signal is added to the water level, it can be seen from the simulation waveform that there are some fluctuations in the tracking response curve of the system. The single-neuron fuzzy PID control algorithm with feedforward produces a smaller overshoot than the other two control algorithms, and the settling time is also shorter than the other two control algorithms. It shows that the proposed single-neuron fuzzy PID control algorithm with feedforward has better adaptivity to interference signals.

Experimental verification
To verify the application effect of the control algorithm proposed in this paper in actual drainage, a drainage system control experiment platform is established under existing laboratory conditions, as shown in Fig. 11.
In Fig. 10, the two water tanks represent water sump and water source, respectively, and the safe water level is set at 0.2 m. Before the water pump is started, the water level of the water sump is 0.5 m, and the water level of the water source is 0.1 m. When the drainage monitoring system is started, the liquid level sensor transmits the water level signal to the DSP controller. The DSP controller, respectively, adopts the conventional PID algorithm, the fuzzy PID algorithm, and the single-neuron fuzzy PID algorithm with feedforward to control the frequency changer. The frequency converter drives the water pump motor to drain off the water until the safe water level of the water sump is reached. Under the action of the above three control algorithms, the monitoring system, respectively, needs 64, 54, and 52 s to discharge the accumulated water in the water sump to the safe water level of 0.2 m. Through experimental verification, it can be obtained that the single-neuron fuzzy PID control algorithm with feedforward can reach early the safe water level and speed up the drainage speed of the system prior to the other two control algorithms in practical drainage application.

Conclusion
In this paper, a coal mine drainage monitoring system is constructed based on DSP, DSP28335. A single-neuron fuzzy PID algorithm with feedforward PD compensation is proposed and applied to the drainage monitoring system. The experimental results show that the algorithm has good control performance, can improve the response speed and anti-interference of the drainage system, and can enhance the operation reliability of the drainage system. Owing to the strong randomness of water gushing in the coal mine, it is usually difficult to predict it intuitively. If the appropriate control algorithm can be further selected to construct an accurate water level prediction model, the drainage system can be fully prepared in advance and the safety factor of the whole coal mine production system can be improved.

Acknowledgments
The work presented in this paper was funded by the key research and development project of Shaanxi Province (2018GY-010).