Abstract: This paper introduces the structure of the PID weight control system for the MK95 cigarette machine and analyzes its control principle: weight signal detection, control process, speed control of the cutting disc motor, implementation of the digital PID control algorithm, and PID parameter selection. System calibration and correction are also discussed. Through analysis of field-acquired data, the cigarette weight control system implemented using the PID control algorithm of a PLC controller demonstrates a simple hardware design, online parameter adjustment, fast system response, and accurate and reliable control, making it a complete replacement for the original analog weight control system.
Keywords: cigarette rolling machine; weight control; PLC; PID algorithm
The traditional MK95 cigarette machine's cigarette weight control system mainly uses analog circuit board control. Therefore, we designed a cigarette weight PID control system. This cigarette weight control system, implemented using a PLC and PID algorithm, has advantages such as fast response, stable adjustment, reliable performance, and convenient maintenance, and can completely replace the traditional weight control system.
1. System Hardware Structure
The hardware structure of the PID weight control system for cigarette making machines is shown in Figure 1. It mainly consists of three parts: cigarette weight detection, cigarette weight signal processing and electronic control system, and actuators. The cigarette weight detection utilizes the principle of a nuclear scanner. When the radiation from the nuclear scanner passes through the cigarette pack, the radiation attenuates, and there is a certain correlation between the amount of radiation attenuation and the cigarette weight. The weight of the cigarette can be measured by the amount of radiation attenuation. The radiation attenuation is converted into an electrical signal by the ionization chamber inside the nuclear scanner. The corresponding cigarette weight signal can be obtained from the output voltage signal of the detector. The conversion formula is as follows:
F = Klg(V/V0)
F: Voltage V corresponds to the weight of the cigarette; K: Proportional coefficient; V: Output voltage of the detector when there is a cigarette; V0: Output voltage of the detector when there is no cigarette.
2.2 Control Process
The voltage signal output by the radiation source detector is converted into a digital value by the A68AD module. The control program compares the measured value with the target value of the cigarette weight, and then controls the cigarette weight after processing by the PID control algorithm.
2.3 Speed control of the cutting disc motor
Due to the requirements for cigarette flavor and quality, the weight distribution of each cigarette is not uniform, typically with higher tobacco density at both ends and lower density in the middle. Therefore, the reducing disc motor, which controls the tobacco density distribution, needs to continuously increment and decrement via a PLC-based electronic control system to control the up-and-down movement of the reducing disc. Furthermore, during the operation of the cigarette machine, the change in cigarette weight (tobacco density) depends on the amount of tobacco supplied to the machine's air chamber and the position of the reducing disc. When the cigarette weight is too heavy or too light, the reducing disc motor controls the disc to move downwards or upwards to increase or decrease the tobacco supply. When the cigarette weight is within the set normal range, the reducing disc moves relatively smoothly up and down to achieve the purpose of controlling both cigarette weight and density distribution. In addition, since the measurement and control system, whether open-loop or closed-loop, must consider the start-up, stop, or acceleration/deceleration of the servo mechanism to obtain smooth motion and high position control accuracy, and the trapezoidal velocity curve has the advantages of simple calculation, fast response speed, and relatively stable control, this control system adopts trapezoidal velocity curve control.
The trapezoidal velocity curve can be divided into three stages in time: the first stage is the acceleration stage, in which the motor accelerates to the maximum speed V at a specified acceleration a; the second stage is the uniform speed stage, in which the motor moves at the maximum speed V at a constant speed; and the third stage is the deceleration stage, in which the motor decelerates to a stop at a deceleration a.
Figure 2 shows the trapezoidal speed-time curve. The motor starts running at time t0 (the origin of the coordinate system) and continues until time t3. The motor's speed is zero before and after the start of the movement.
(1) Acceleration Zone
When the nuclear scanner detects a heavier cigarette density (at which point the reduction disc motor is at position θ1), to accelerate the loudness, the motor operates at an acceleration a for a time t1, and the reduction disc moves to position θ2 accordingly (as shown in Figure 2). At this time,
Δt1 =t1 =v/a, θ2 =v2/2a.
(2) Constant speed region
Afterward, the cutting disc motor runs smoothly at its maximum speed v(t) for a time (t2-t1), at which point the cutting disc reaches position θ3. At this time (t2), the nuclear scanner measures that the weight of the cigarette has reached the lower limit of the set value.
Δt2 =t2 -t1 = (θ3 -θ2) /v -v/a, θ3 =θ2 -v2 /a.
(3) Deceleration zone
When the nuclear scanner detects that the weight of the cigarette has reached the lower limit of the set value, the motor decelerates from its maximum speed until the cutting disc reaches the target position θ4, at which point the motor stops. At this time, Δt3 = t3 - t2 = Δt1, θ4 = -v2/2a.
(4) Speed control
Therefore, the speed value at the corresponding position can be calculated and controlled according to the above formulas. When the actual detected position value is not equal to the position command, the motion controller first calculates the deviation (command value minus actual value), then judges based on the position deviation value, calculates the speed command value, and finally performs speed control.
2.4 PID Control Algorithm
In this cigarette weight control system, the functions originally performed by the hardware PID controller in the analog cigarette weight control system are replaced by software, called a digital PID controller. The resulting algorithm is called a digital PID algorithm. Compared with the analog PID controller, the digital PID controller provides more intuitive data display, facilitates parameter modification, and allows for online parameter adjustment based on experiments and experience, resulting in better control performance.
In analog control systems, the analog expression for the PID control algorithm is:
u(t) =Kp e(t) +1Ti ∫e(t) +Td de(t)
dt (1)
In the formula, Kp is the proportional coefficient; Ti is the integral time constant; Td is the derivative time constant; e(t) is the deviation signal, which is equal to the difference between the given quantity r(t) and the feedback quantity c(s); u(t) is the output signal of the regulator.
The simplified block diagram of its control is shown in Figure 4.
Since the control quantity in a PLC control system can only be calculated based on the deviation value at the sampling time, it must be discretized in order for the PLC control system to realize the control quantity represented by equation (1) in the analog control system. The discretized digital PID expression can be obtained by using integral summation and first-order phase difference approximation as follows:
u(k) =Kp e(k) +KiΣk
i = 0
e(i) +
kd (e(k)-e(k-1)) (2)
In the above formula, T is the sampling period; e(k) is the deviation value of the system at the kth sampling time; and e(k-1) is the deviation value of the system at the (k-1)th sampling time. If the sampling period T is sufficiently small, this formula can closely approximate the analog PID formula, thus making the controlled process very similar to the continuous control process. The above formula is the expression for the discretized positional PID control algorithm.
Similarly, the controller output value at the (k-1)th sampling time can be obtained:
u(k-1) =Kp e(k-1) +KiΣk-1
i = 0
e(i) +
kd (e(k-1)-e(k-2)) (3)
2.5 PID Parameter Selection
There are two available methods for selecting PID controller parameters: theoretical design and trial and error. Theoretical design requires an accurate mathematical model of the controlled object, which is often difficult to achieve in practice. This control system uses the trial and error method to determine the control parameters. This method is more intuitive and easier to operate. During adjustment, the function of each correction element of the PID controller is used. The function of each correction element is briefly described below:
1) Proportional element. Increasing the proportional coefficient Kp will speed up the system response and help reduce static error; however, an excessively large proportional coefficient will cause the system to have a large overshoot and oscillation, which will undermine the stability of the system. In this system, the value of Kp is 0.5.
2) Integral stage. Increasing the integration constant Ti will help reduce overshoot and oscillation, but the elimination of the system's static error will be slower. In this system, Ti is set to 1.2.
3) Differential Component. Increasing the differential constant Td can also speed up the system response, reduce overshoot, and increase stability, but it reduces the system's anti-interference capability. In this control system, Td is set to 0.8.
3. System Calibration and Correction
Due to the nonlinear response of the radiation source detector and the nonlinear relationship between the radiation dose and the system output signal, the cigarette density detection system exhibits nonlinearity. System nonlinearity can be obtained through theoretical estimation and experimental prediction, and its ultimate impact on system control performance can be eliminated or reduced through system calibration and curve correction. To ensure that the pulse signal representing the cigarette weight is consistent with the format required by the control system, and that the pulse width corresponds to the cigarette weight data, the pulse width is calibrated and adjusted based on the center value and upper and lower limits of the weight. The center point and upper and lower limits of the cutting disc motor are determined based on the center value and upper and lower limits of the cigarette weight detection signal, thereby achieving accurate control of the cigarette weight.
4. System Application Effect
This control system has been fully applied to the six MK95 cigarette making machines at Jinan Cigarette Factory. After nearly two years of use, the results have been excellent, fully meeting the requirements of the original control system. We collected a large amount of data at the production site. All samples were cigarettes with a length of 84 mm. Each sample consisted of 100 cigarettes. The weight of a single cigarette was set as wi (i = 1, 2, ..., n). The average weight of the cigarettes was then w0 = 1/n Σni = 1/wi (4)
Cigarette weight deviation Δwi = wi - w0
Standard deviation δn-1 = 1 n-1Σni =1 (wi-w0)2 (5)
coefficient of variation
Cp = δn -1w0 ×100% (6)
The test data are listed in Table 1.
The collected data shows that the standard deviation is small, the data basically follows a normal distribution, the coefficient of variation is small, and the average weight of cigarettes is well controlled.
5. Application Prospects of the System
Because the system uses the PID control algorithm of the PLC controller, the system hardware design is simple, easy to implement and maintain; the PID parameters can be adjusted according to different equipment and vehicle speeds, which is very convenient and quick; at the same time, because the system has a fast response speed and accurate and reliable control, it can completely replace the traditional analog gravity control system.
References:
[1] Xu Dazhong. Theory of AC Motor Speed Regulation [M]. Hangzhou: Zhejiang University Press, 1991. [2] Yi Jikai, Jiang Xiangxian. Principles and Design of Automatic Control for Electrical Drives [M]. Beijing: Beijing University of Technology Press, 1997. [3] Molins. MK95 Cigarette Machine Electrical Control System Instruction Manual [Z]. UK: Molins, 1986. [4] Meng Qinghua. Mathematical Analysis of Cigarette Weight Control [J]. Tobacco Science and Technology, 2001, (6): 22-24. [5] Meng Qinghua, Wang Tankun. Debugging and Maintenance of Weight Controller [J]. Tobacco Science and Technology, 1997, (2): 30-31. (Edited by: Li Zonghong)