In the industrial production, the closed-loop control PID controller FX2N Mitsubishi method PID controller FX2N Mitsubishi is often used to control the temperature, pressure, flow and so on. PID controller has been widely used in the simulation of control system and digital control system. This is because this method does not require precise control system mathematical model, and has strong flexibility and adaptability. However, in the digital PLC control system, the ordinary PID algorithm is dependent on all the past states, which can cause the system to make the system stability. Incremental PID control algorithm for each output only output control increment, if necessary, the output of the fault can be limited by the logic of logic, thereby reducing the impact of the PID error caused by the system to bring serious consequences.
In the actual system, the PLC control module can be used in the PID process control module of PLC, but it is necessary to design a PID controller based on the FX2N control algorithm.
1 control principle
1. 1 PID control principle
PID controller design is based on the PID control law of the continuous system, the digital PLC control equation, which is written in the form of discrete PID control equation, and then according to the discrete equation of control program design.
In continuous system, the typical PID closed-loop control system is shown in Figure 1, the sp (T) is given, PV (T) is the feedback quantity, the output of C (T) is the system.
The input / output relationship of PID controller:
M (T) is the output of the controller. M0 is the initial value of output; E (T) =sp (T) -pv (T) is the error signal; Kc is proportional coefficient; T1 is the integral time constant; TD is the differential time constant.
3 (1) of the right side of the medium number are respectively proportional, integral, differential, and they are proportional to the error and error of the integral and differential. Assuming that the sampling period is Ts, the system starts running at t=0, and the rectangular integral is used to approximate the exact integral. The differential is approximated by the differential approximation (1). The output of the controller is n:
In the formula: EN-1 is the error value of the second sampling time of n-1; K1 is the integral factor; KD is the differential coefficient
By the formula (2), the output of the controller is the result of the error accumulation of the results, will make the overshoot is too large, and these in some industrial process is not allowed. So the conventional PID control algorithm is difficult to control the process.
1. 2 incremental PID control rules
The expression of the formula (2) can be derived from the Mn-1 expression by the recursive principle:
A=KC+KI+KD; B=KC+2KD; C=KD. A, B, and C are constant, which is related to the sampling period, the proportional coefficient, integral time constant and the differential time constant.
By the formula (4), the incremental PID algorithm is based on the improvement of the ordinary PID algorithm. It overcomes the dependence of the position type PID to all the past states, the output of the computer controller is only incremental, so the output of the error is relatively small, it is necessary to use the method of logical judgment to eliminate this effect, and thus will not seriously affect the operating system. The formula does not need to cumulative error, control increment] Mn determine the only and last n, n-1, n-2 sampling value and easier by weighted processing and obtain good control effect.
2 PLC software design
2. 1 program process
In the initialization, the parameters KC, KI, KD and TS are selected according to the system performance requirements, and the A, B, C, and set the initial value en-1=en-2=0.
3. 2 control algorithm parameters
Parameter setting is the core content of control system design. It is based on the characteristics of the controlled process to determine the proportion of PID controller, integral time and differential time to improve the system's dynamic characteristics and static characteristics, to achieve the best control effect. In this paper, the critical ratio method is used. Assuming that the degree of control is 1.05, according to the empirical selection of the critical ratio of Kr=20%, the critical oscillation period Tr=60s, the initial value of s TS=O.90, TI=30, s KC=O.126, s TD=8.
3 conclusion
On the basis of analyzing the common PID control algorithm, this paper presents the control principle of the incremental PID algorithm, and implements the improved PID algorithm on the MITSUBISHI FX2NPLC. The results from the model show that this method can effectively reduce the overshoot of the system, so that it can get better control effect, so it has good reference function in practical engineering application.