Design of automatic packaging machine control system
2026-04-06 04:47:54··#1
[Abstract]: This paper designs an automatic packaging machine control system based on the MPC05 motion controller. During packaging, the servo motor follows the spindle motor according to a certain pattern. The control system uses a classic proportional-integral-derivative (PID) control algorithm to control the servo motor. This packaging machine system not only produces products with good length consistency but also allows for online modification of bag length and packaging speed. I. Introduction With the development of computer power electronics technology, mechatronics products are emerging in various countries. Many categories of products, such as machine tools, automobiles, home appliances, packaging machinery, textile machinery, and printing machinery, see new developments every year. Mechatronics technology has received increasing attention from all sectors, playing a significant role in improving work efficiency, people's lives, saving energy, and enhancing enterprise competitiveness. In the packaging industry, most packaging machines use PLCs to control the horizontal sealing motor. This solution uses analog signals to track the speed following the spindle motion. The consistency of packaged products using this control system is not ideal, and more importantly, it is difficult to increase the packaging speed to over 200 bags/minute, which does not meet the urgent requirements of enterprises to improve work efficiency. Therefore, we designed a packaging machine control system based on the MPC05 motion controller. This system possesses two important characteristics: high product quality and high packaging efficiency, and also features color mark tracking functionality. II. Working Principle Figure 1 shows a schematic diagram of a packaging machine. 8. The longitudinal sealing roller is driven by an asynchronous motor (main shaft motor). 9. The heat sealing roller, 10. The cold sealing roller, and 12. The cutter are driven by a servo motor (slave shaft motor). The slave shaft motor follows the main shaft in a tracking motion. The working principle is that the MPC05 motion controller receives signals from the main shaft encoder and, based on the encoder pulse count, drives the servo motor to follow the main shaft in a corresponding tracking motion according to a certain motion law. This servo motor simultaneously drives the heat sealing roller, cold sealing roller, and cutter through chain transmission. The heat sealing roller shaft is equipped with an encoder with a 1:4 reduction ratio for closed-loop control. The encoder value is compared with the theoretically expected distance traveled by the servo motor for PID adjustment, enabling the slave shaft servo motor to follow the main shaft motor in a fully closed-loop position tracking manner. III. Controller Design The control system uses an FPGA+DSP controller. Figure 2 shows the controller's structure. FLASH memory is used to store the DSP program, and any extra space can be used to store configuration programs, machining programs, system process parameters, and field data. NAND FLASH memory is used for large-scale on-board storage, storing configuration data, machining data, etc. The core of the controller is the DSP and FPGA. The DSP implements CPU functions, and the FPGA implements control and I/O functions. Machining files can be downloaded via RS232 or copied via USB flash drive. The controller receives signals from the spindle encoder and the slave encoder. The output pulse direction signal is connected to the servo motor driver, and the I/O ports are connected to stop or start signals, etc. Two serial ports are used: Serial Port A is a PC interface, using the Panasonic servo data transmission protocol; Serial Port B is a human-machine interface, using the standard Modbus protocol. IV. Control Program Design Since the longitudinal sealing roller and the transverse sealing roller have the same circumference of 300mm, and the transverse sealing roller has four ribs, each rotation of the transverse sealing roller can package four bags of product. If the bag length is 300/4 = 75mm, then it is synchronous following, meaning the distance traveled by the horizontal and vertical sealing rollers for packaging one bag is equal. If the bag length is greater than 75mm, the horizontal sealing roller should decelerate in the non-meshing zone and then accelerate to synchronize with the main shaft, preparing for the next meshing. If the bag length is less than 75mm, the horizontal sealing roller should accelerate in the non-meshing zone and then decelerate to synchronize with the main shaft, preparing for the next meshing. In the meshing zone, the horizontal and vertical sealing rollers need to move synchronously; otherwise, if the horizontal sealing roller speed is higher than the vertical sealing roller speed, film tearing will occur; if the horizontal sealing roller speed is lower than the vertical sealing roller speed, film piling will occur. These phenomena will affect the quality of the processed product, and in severe cases, may even tear the packaging film. Figure 3 shows a model of the driven shaft motor movement. Let A represent the main shaft and B represent the driven shaft. First, calculate the cycle lengths (cycle length refers to the number of pulses required to package one bag) and synchronization coefficients of A and B. Then, divide the cycle of A into 5 segments as shown on the horizontal axis in Figure 3. Based on the lengths of these 5 segments and the synchronization coefficient, calculate the asynchronous coefficient. Finally, calculate the lengths of the corresponding 5 segments of B: synchronous segment, acceleration/deceleration segment, asynchronous segment, deceleration/acceleration segment, and synchronous segment. In the first synchronous segment, the two teeth of the horizontal sealing roller mesh. The acceleration/deceleration segments in the middle accommodate different bag lengths, allowing for variable bag lengths. The final short synchronous segment ensures a smoother transition to the next meshing synchronous segment (all lengths are in pulse count). The position control of the slave shaft uses the mature and classic PID control. PID control has advantages such as simple principle, ease of use, and good adaptability. Here, we use an incremental PID control algorithm. Incremental PID control has many advantages: (1) Since the computer outputs an increment, the impact of erroneous actions is small, and logical judgment can be used to remove it when necessary; (2) There is no need to accumulate in the formula. The determination of the control increment is only related to the most recent k sampled values, so it is easier to obtain a better control effect through weighted processing. The PID controller is a linear regulator. It subtracts the set value (the number of pulses that each segment of the slave shaft should send) from the actual output value (the value of the slave shaft encoder) to obtain the control deviation. The proportional coefficient (P), integral coefficient (I), and derivative coefficient (D) are linearly combined to form the control variable (the pulse frequency of the servo motor). The formula for calculating the increment of the control variable is: Where T is the sampling period, K is the proportional coefficient. Increasing the proportional coefficient K can reduce the steady-state error, but when K is too large, it will make the dynamic quality worse and cause the system to be unstable. TI is the integral constant. The larger TI is, the weaker the integral effect. The addition of the integral element can eliminate the static error and make the system tend to be stable. TD is the derivative coefficient. Differential control can improve the dynamic characteristics of the system and increase control accuracy. However, if TD is too large or too small, the overshoot will increase and the settling time will be longer. Since this system uses a constant sampling period T, once the three control parameters K, TI, and TD are determined, the control variables can be determined. We have already derived the values of these three parameters through on-site debugging. V. Functions of the Automatic Packaging Machine System This automatic packaging system uses EasyView as the human-machine interface, which is user-friendly and feature-rich, suitable for on-site packaging machine operation. The peripheral equipment and core components in the control system are all industrial-grade products, ensuring the safety, stability, and reliability of the packaging machine during use. Simple basic parameter settings allow for separate settings of packaging speed, bag length, bag length parameters, PID coefficients, etc. For a fixed roller, the bag length constant is constant. For example, if the roller circumference is 300mm and the roller has four ribs, the bag length constant is 75mm. This packaging machine system allows online modification of bag length and packaging speed. The packaging speed range is 20-200 bags/min, and the bag length range is 40-160mm. The system's driven shaft motor uses a Panasonic 750W AC servo motor with medium inertia, employing precise servo position control for continuous transmission, accurate positioning, and excellent low-speed characteristics, ensuring system control precision from the hardware level. Therefore, the packaged products have good length consistency and minimal error, within ±1mm. High packaging speed and high precision are the system's greatest features. One-button setting for color mark tracking automatically detects errors. High cursor positioning accuracy reduces the requirements for photoelectric sensors, lowering manufacturer's component and maintenance costs. Whether in color tracking or CNC length setting mode, it automatically detects paper breaks and automatically stops the machine upon a break. Fuzzy error-tolerant technology is used during color tracking packaging, allowing for individual missing color marks and automatically tracking and compensating. Furthermore, the system has an automatic counting function, and all operating parameters are automatically memorized and saved. VI. Conclusion Practical results show that the automatic packaging machine control system developed here is widely applicable to bag making, filling, and packaging of various liquids, viscous substances, powders, and granular materials in related industries. The system has been successfully applied to packaging instant noodles, bagged shampoo, and other products, operating stably and producing excellent product consistency. Especially for instant noodle packaging, where the tolerance for bag error is not particularly stringent, but a packaging speed of over 200 bags per minute is crucial, the automatic packaging system not only reduces manpower and material costs but also significantly improves productivity.