Theoretical design and experimental verification of control system for building material packaging unit based on risk management

Facing the shortage of special building materials packaging machinery with thermal insulation and low intelligence, this paper designs a set of mechanical and electrical integration packaging unit control system to reduce the risk of material transportation for different stakeholders. According to risk management tools, the system takes Mitsubishi PLC as the control core and combines with communication module, servo motor drive system and touch screen man–machine interface to realize the risk simulation and automatic control of the packaging unit. The simulation results of PID control model show that the parameters such as speed and torque can be stabilized in a relatively short period of time when the load is suddenly changed within 1.5 s. Theoretical verification of the system has small steady-state error, rapid response, and good control effect. The man–machine interface design was carried out and the actual corresponding test experiment was carried out. The experimental results showed that the overall operation rate of the packaging unit system reached 98.15%, the pass rate was 99.03%, and the production capacity was about 9600 packs/hour, which met the production requirements. The control system of the building material packaging unit designed in this paper realizes the equipment intelligence, has a high degree of automation, and shows good potential application value in the aspects of building information, reduction of construction risks and manufacturing intelligence.

In recent years, the packaging and automation of building materials have gradually received widespread attention from researchers [15][16][17][18][19] .In 2021, Davydov et al. developed a pneumatic unloader and proposed a lifting device to unload and transport building materials to the destination through transportation and lifting, and the results showed that the device can effectively improve the transportation efficiency 17 .In 2022, Liu et al. explored the impact of macro-encapsulation and micro-encapsulation on the encapsulation of building materials, and aimed at the corresponding simulation and model building methods for different packaging methods 18 .Khramov et al. verified that the systematic combination of leather and belt conveyors can efficiently realize the transportation of building materials and the removal of waste materials through theory and experiments 19 .However, there are still few related studies on the automation of control and monitoring of packaging and conveying systems, especially experimental studies on packaging systems.In addition, current research on risk issues in building materials mainly focuses on the safety risks of the materials themselves [20][21][22] and project construction risks [23][24][25] , the risk issues in the packaging and transportation system have hardly been paid attention to.Therefore, the development of a highly automated building materials packaging control system based on the risk issues of packaging and transportation systems, is of great significance to the safety and efficiency of building material construction and the development of intelligent manufacturing technology 26,27 .
This article intends to conduct risk assessment based on different stakeholders and risk management theories, and develop a control system based on PLC control and AC servo system drive to overcome the problems of high labor intensity and low production efficiency of manual packaging of special building materials.By establishing PID control and servo control system models, parameters such as speed and position are optimized, and on-site experiments on building materials packaging are carried out to verify the anti-interference ability, steady-state accuracy and packaging efficiency of the control system.

Risk assessment-based design of a unit control system for packaging construction materials
Risk assessment of construction material packaging unit Sodangi et al. shows that operator risks and equipment management risks affect the safety of packaging unit in 2023 28 .Regarding safety monitoring risks and equipment maintenance risks, Zscheischler et al. argues that risk management should be strengthened, especially in the case of machinery operation 29,30 .The construction material packaging unit is different from the traditional packaging unit, which couples the LEC evaluation and risk index matrix in the study.We complete the evaluation of construction material packaging unit based on the conditional value-at-risk (CVaR) model in this study.
(1) Risk identification: Risk identification uses analytical tools to quickly find the key factors to capture the focus of risk management.Because there are few actual projects on construction material packaging unit, this paper uses literature analysis and Risk Breakdown Structure (RBS) to calculate risk probabilities (Table 1).Consequently, this paper will complete the risk evaluation and simulation from the perspectives of operator risk, equipment management risk, safety monitoring risk, and equipment maintenance risk.(2) (2) Risk evaluation: Different risk factors are quantified and analyzed in a risk evaluation.This approach helps stakeholders to develop targeted risk management measures.The risk factors are quantitatively analyzed by applying LEC evaluation (Eq. 1) 35 through the risk influencing factors mentioned above.In addition, the likelihood of accidents (L), the frequency of human exposure to material packaging machinery (E), and the loss consequences of the occurrence of risk (C) will be referred to where D and L represent the degree of danger and the size of the possibility of accidents, E and C refers to the fre- quency of human exposure to material packaging machinery, respectively.Risk simulation: the risk simulation of construction material packaging unit involves the above LEC evaluation and risk index matrix coupling.Figure 1 shows that the safety monitoring risk of construction material packaging machinery is high risk.Meanwhile, Conditional Value at Risk (CVar) 36 is simulated based on the standard deviation of the normal distribution.The average loss value (ALVR) of CVar at risk level α is shown in Fig. 2, and the color of ALVR is from dark to light.
In the case of exceeding the risk level α, ALVR can help decision makers to identify potential risks at higher α.

Construction material packaging unit
Based on the above-mentioned risk management of equipment management risk, safety monitoring risk and operational risk, the design of building materials packaging unit corresponds to one of the three stages, that is the preparation stage (equipment management), working stage (safety monitoring) and completion stage (operational risk).The packaging object of the hard-core packaging unit for building materials is special thermal insulation building materials.The packaging unit mainly consists of a carton comprehensive packaging machine, a transparent paper packaging machine and a conveyor, as shown in Fig. 3.The packaging process is mainly divided into three parts: boxing, labeling and outer film packaging.
(1) Preparation stage: Qualified building materials are transported from the transparent paper packaging machine to the carton packaging machine channel (1 in Fig. 3).The sensor detects that the building materials are in place and starts the stacking task.The small boxes are formed into two rows of five bags of small boxes side by side through the cylinder lifting and loading mechanism.At the same time, the carton conveyor transports the printed empty cartons from the clamp-type storage bin (2 in Fig. 3) to the main conveyor belt.(2) Working stage: The paper turning process is carried out by the paper turning mechanism (5 in Fig. 3) between the unpacking mechanism (3 in Fig. 3) and the rope tensioning mechanism (6 in Fig. 3).First open the box cover and sulfuric acid paper, and then start packaging the building materials after the photoelectric switch detects that the empty carton (4 in Fig. 3) is in place.The cylinder piston presses into the small carton (9 in Fig. 3) and passes through the cartoning mechanism (7 in Fig. 3), paper covering mechanism (8 in Fig. 3), closing mechanism (10 in Fig. 3), and labeling mechanism (12 in Fig. 3) for processing, and then sent to the box outer film packaging machine by the chain conveyor (13 in Fig. 3).(3) Completion stage: The building material boxes arrive at the pushing mechanism (14 in Fig. 3), and after photoelectric detection, the outer film packaging machine (15 in Fig. 3) is started.The box conveyor belt and various mechanisms work in regular cycles.The building material boxes are delivered to the jacking station, wrapped with outer film, and both ends are hot-melt sealed to complete all packaging.

Design of control system of packing unit
The main task of the construction material packaging unit is to complete the three links of boxing, labeling and outer film packaging, but each link includes multiple processes.Therefore, several control units must cooperate and coordinate with each other, which puts forward certain requirements for the intelligence of the control system.The realization principle of the intelligent control system is to form a complex system through the Internet to form the monitoring layer, control layer and equipment.The network topology of the control system is shown in Fig. 4.
From the perspective of the equipment layer, the CAN-based fieldbus technology [38][39][40] can not only realize the information exchange between the underlying equipment and the controller, but also can be directly connected through a cable without the I/O module interface.It is also free to access or move devices without disconnecting from network power.In the control layer, N:N network connections can be used between PLCs, and smart devices, such as computer interfaces, can be connected to PLC processors and I/O ports.
The upper computer system such as touch screen or industrial computer can directly manipulate the lower computer.The monitoring layer embeds the TCP/IP protocol in the Ethernet processor, and the Ethernet is directly connected to the processor without special modules and network components.The main controller of the packaging unit is PLC, which is responsible for the operation and control of labeling machine, conveyor, servo motor, frequency converter and vacuum pump.The information collection of the underlying equipment on site is mainly completed by various sensors, including 14 photoelectric switches, 4 proximity switches, and 1 pressure detection switch.There are 3 manual operation buttons for start, stop and emergency stop, and 2 manual/automatic work mode switching switches.During the speed regulation process of the frequency converter, it is necessary to check whether the running state is good or not, which occupies two input points.The status indicator lights are set to power on, normal operation, and fault alarm, which can clearly see the working status of the system.To sum up, a total of 22 digital input signals and 22 digital outputs are required.According to the working characteristics of the construction material hard box packaging unit, Mitsubishi FX3U-48MR PLC is selected, and a positioning module is added to meet the needs of positioning control in equipment production.The I/O address assignment of the control system interface is shown in Table 3.
Combined with the technological process and control requirements of the building material hard box packaging unit, and through the analysis of the action sequence between the various actuators, the program design of the PLC software control is mainly composed of a main program and multiple subroutines.When the packaging unit is working, it needs to control a variety of operating signals.The main program is mainly used to process logic signals such as start, stop and emergency stop, including the signal of each station in place, and various initialization default value signals before the unit starts, the selection signal of automatic or manual working mode, and multiple reset signals, etc.
Subroutines include manual subroutines, automatic subroutines, alarm subroutines and historical data report subroutines, etc., which are responsible for processing commands generated by human-computer interaction, and finally realize the function of automatic packaging production of building material hard box units.Algorithm implementation of control flow is shown in Fig. 5.

Control function model of automatic packaging production line
The main controller of the packaging unit is PLC, which is responsible for the operation and control of servo motors, conveyors, frequency converters, vacuum pumps, etc.The principles and mathematical models involved in each part are introduced in detail in this section.

Control function model of automatic packaging production line
Modern AC servo systems include servo motors, power converters, controllers, detectors, etc. 41 .When designing the control system of the packaging unit, it is necessary to ensure that the equipment can run stably with a certain accuracy, and at the same time, there is no large speed fluctuation under various disturbances, so as to ensure that the product packaging is free from damage and the external surface is smooth and smooth.This  www.nature.com/scientificreports/ is the case in the field of industrial automation.PID control algorithm is usually used for closed-loop control problems.When the target model is determined and the working environment and operation steps are basically unchanged, the PID control strategy is effective and has been widely used in dynamic control.The control method adopted by the PID algorithm is as follows: in the control system of the packaging unit, the PLC compares the target values of various parameters with the actual values measured by the sensors and transmitters, and uses the PID calculation to obtain the frequency converter and Operating control value of the servo drive.The inverter can output the power supply voltage corresponding to the frequency to control the various actuators of the packaging unit.By adjusting parameters such as torque, speed and pressure, and then modulating the pulse width of the solid-state relay, the power supply voltage of the servo drive is controlled.The adjusted position parameter reaches a stable value, and the control structure diagram is shown in Fig. 6.Before using the PID operation command, the given value, measured value and control parameters must be set and adjusted.Among them, the given value is the system demand value set on the touch screen, the actual value in the production process is measured by the sensor, the actual value is generated by the feedback of the transmitter and the A/D module, and the final value of the control parameter is related to PID operation.
Each part of the packaging machine of the hard box packaging unit for building materials is driven by a separate motor, and the main shaft is connected to the motor to drive the actuator.Therefore, the coordinated control of the speed and distance of each part of the actuator can be realized by controlling the motor speed and torque control.To achieve high-performance speed regulation, it is necessary to introduce the model 42 .When studying its mathematical model, it is usually considered that its magnetic circuit is linear in an ideal state, the iron core has no loss, and the simplified model in the d-q coordinate system is established without considering the frequency change and harmonic influence.
Stator voltage equation: Rotor voltage equation: Stator flux equation: Rotor flux equation: Electromagnetic torque equation: where R S and R r are the internal stator and rotor resistances of the asynchronous motor, respectively.L S , L r and L m are the equivalent self-inductance and mutual inductance of the stator and rotor inside the asynchronous motor, respectively.u ds , u qs , u dr , u qr are respectively stator and rotor voltage d, q axis components.i ds , i qs , i dr , i qr are the stator and rotor current d, q axis components respectively.ds , qs , dr and qr are respectively the stator and rotor flux d, q axis components.w e is the angular velocity, and p n is the pole logarithm.The vector control strategy mainly takes decoupling control as the core, so the coordinate transformation of the current is carried out.Three-phase-two-phase stationary coordinate transformation: (2) uds = Rsids + p ds − we qs uqs = Rsiqs + p qs − we ds

Conveyor control model
According to the work content, the conveyor belt in the production line can be divided into two parts: the robot carrying end conveyor belt, the through hole and the packing section conveyor belt.According to the composition of the conveyor belt, the above two types of conveyor belts both use chain drive 43 .The current conveyor belt speed can be calculated using Eq. ( 10).
where p represents the side length of the conveyor belt, z represents the number of sensors, and the variables n 1 and n 2 are the rotational speeds of two single sprockets respectively.It can be seen that during the operation of the conveyor belt, the speed of conveyor belt can be controlled by controlling the rotation speed of the two sprockets.During the speed control process, the impact of the weight of objects on the surface of the conveyor belt on the speed needs to be considered to ensure speed control accuracy.If the displacement resistor signal changes continuously, the change value of the signal is directly used to drive the brake, thereby adjusting the braking torque in the controller to keep the tension constant.In this way, automatic adjustment of torque and constant tension control of packaging can be The control of constant tension follows the physical principle of rigid body rotation, and its expression is: where M is the moment, d is the moment arm that controls the rotating axis, and F is the acting force.In the actual packaging and unloading process, the value of d can be the radius of the packaging box.

Control model of packaging volume and frequency
The setting of the system software program communication transmission clock determines the frequency of system control task execution.The input clock frequency of each timer can be expressed as: where f PC , f TC0 and f TC1 represent the controller bus, configuration register and frequency division value of the timer, respectively.According to the above method, according to the designed production line process operation mode, the setting of the communication transmission clock frequency of the control equipment and mechanical equipment is completed in sequence.
The calculation program of the production line control volume mainly occurs in the architecture controller.The real-time signal detection results of the sensor are input into the controller, and the operating parameters of each mechanical equipment in the actual packaging production line are set.From this, Eq. ( 13) can be used Calculate the control volume of the production line.
where n 0 and n i are the operating parameter setting values and detection values of any mechanical equipment in the production line.The calculation result of Eq. ( 12) is used as the control instruction output by the controller and distributed to each production line mechanical equipment.

Performance simulation verification of packaging unit control system
In order to further verify the performance of the control system of the packaging unit, according to the abovementioned analysis and modeling of the servo drive control system, a PID control simulation model is designed on the MATLAB/Simulink platform, and the simulation analysis is carried out.It can be seen from Fig. 7 that the control architecture mainly includes four parts: position loop PID regulator, speed loop PID regulator, current loop PID regulator, SPWM algorithm, etc.
The purpose of adopting three closed-loop control of position, speed and current is to track quickly when the position coordinate or torque value changes, and to make the tracking performance good.The Simulink simulation model of the control system is shown in Fig. 8. Figure 9 shows the simulation results of the control system performance under different operating conditions.It can be seen from Fig. 9a and c that under the square wave signal input, when the motor is started without load and the motor accelerates, a large torque and speed are required.After the load is added, the torque and speed recover quickly in a short time.www.nature.com/scientificreports/It can be seen from the three-phase current change curve in Fig. 9b that the motor needs a large current when it starts to accelerate, and the current can return to normal after the load is added.It can be seen from Fig. 9d that the motor can reach the designated position smoothly with almost no overshoot.When the motor load changes suddenly, the dynamic response effect is good, and the new position can be tracked.The flux linkage change curve in Fig. 9e shows that the flux linkage can still be effectively tracked when the motor load changes suddenly, indicating that the dynamic performance of the control system is better.
Overall, the motor can reach a steady state in a short period of time after starting.After adding load disturbance, although the waveform has small fluctuations, it can quickly return to stability.Each output can also adapt to the change of sudden load in time, fully meeting the control requirements.

Experimental test of control system performance
The control system of the building material packaging unit designed in this paper is controlled by the Wei-Lun-Tong touch screen.The man-machine interface uses modular programming method.By assigning addresses and data to the corresponding modules, the touch screen online simulation and compiling and downloading are completed.The man-machine interface has the characteristics of easy operation and information visualization, and the information transmission between the user and the operating system can be conveniently carried out 44,45 .Through the man-machine interface, users can efficiently modify and debug the parameters of the control system, and the relevant historical data of PLC can also be queried through the man-machine interface.
According to the design requirements, it is necessary to design the interfaces corresponding to the automatic and manual working modes.The manual interface includes the jog operation and step operation of each pneumatic actuator.In order to prevent mis-operation by non-professional operators, a user login password is  www.nature.com/scientificreports/set in the setting interface, as shown in Fig. 10a. Figure 10b and d show the automatic operation interface and manual operation interface.After confirming the setting of relevant parameters such as speed and output (seen in Fig. 10c), the system can enter the fully automatic operation or manual debugging mode interface.After the simulation is completed, in order to further verify the feasibility of the packaging unit, the on-site operation and debugging of the packaging unit system is carried out based on the touch screen interface.Table 4 shows the experimental performance indicators of the building material packaging automatic control system.The fast recovery of the position can be observed within 1 s no matter in the no-load or loaded state.After the motor starts, although the steady-state error in the load state is slightly higher than that in the no-load state, it can still reach the steady state in a short time.The torque and speed under load state are slightly higher than those under no-load state, and each output can adapt to the change of sudden load in time.
Table 5 shows the running speed field test data recorded by multiple tests.It can be seen from the test data that the operating rate of the whole machine is 98.15%, indicating that the mechanical structures and electrical control  components can operate in harmony; after a certain period of continuous operation, the production capacity of the packaging unit can reach about 9600 boxes/h, which meets the needs of industrial production.The rated production capacity has improved the production efficiency, and the qualified rate has reached 99.03%, within a reasonable range, the packaging quality is basically qualified, and the control effect is good.The test analysis shows that the operation of the designed carton packaging unit is consistent with the requirements, which fully verifies the effectiveness of the control system.In order to further verify the contribution and advantages of the automatic packaging control system in this study, we further compared the performance of the automatic packaging control system designed by other researchers in terms of pass rate, production capacity, and overall effective operation rate.It should be emphasized that since this article is the first study on the automatic packaging system of special building materials (no other similar systems were found through WOS and Google databases), we chose similar automatic packaging systems such as hard cigarette boxes and automatic bagging of cement packaging.Packaging systems for comparison.Obviously, from the comparison results in Table 5, it can be seen that the automatic packaging system for building materials in this article is much higher than the automatic packaging system for hard cigarette boxes in terms of pass rate, production capacity, and overall effective operation rate 46 .Compared with the cement packaging automatic bagging and packaging system, the system performance between the two maintains almost the same advantages 47 .However, it should be noted that the packaging process of cartons is far more complicated than bagging.Therefore, overall, the automatic packaging system for special building materials in this article has better performance, with the pass rate, production capacity and overall effective operation rate reaching 99.03%, 9600 boxes/h and 98.15% respectively.Obviously, multi-module coupling based on risk model, PLC control, PID control and AC servo system drive control has effectively improved the performance of the automatic packaging system for special building materials.

Multi-field applicability and sustainability analysis of automatic packaging system
The technology and principles of automatic packaging systems for building materials also have potential application value in other industrial fields, such as food and beverages, medical equipment, hard-packed cigarettes, electronic products, etc. Servo motors, stepper motors, PLC control and other modules are very similar to other product packaging systems.If they are improved according to the packaging size and control requirements, they can be fully adapted to the automatic packaging of other items.Machine vision technology and automated assembly equipment can help realize automatic packaging and detection of food and beverage products, automatic packaging and assembly of medical devices, automatic assembly of electronic products, etc. 48,49 .
In the current industrial environment, our automated packaging systems for building materials strive to improve packaging efficiency while also paying attention to environmental impact and sustainability.The following are the considerations and advantages of our system in this regard: (1) Resource utilization efficiency: The system reduces material waste and loss and improves resource utilization efficiency through automated and precise packaging processes.(2) Energy saving: Due to efficient automated workflow, the system can reduce energy consumption, thereby reducing negative impact on the environment.(3) Reduce human errors: Automated systems reduce human errors and losses, reduce the production of substandard products, and are conducive to environmental protection and sustainability.(4) Sustainable packaging material selection: We encourage the use of sustainable packaging materials, and the system can adapt to multiple types of packaging materials, thereby reducing the impact on the environment.
These considerations and advantages reflect our system's focus on environmental impact and sustainability in the current industrial environment, and are committed to reducing resource waste and environmental burden.

Case study
This case study is a secondary validation of the feasibility and practicality of the PID risk control model simulation using a new type of foam (EPP) as packaging material.

Project background
The investment estimate of the project for the production and construction of new type of foam plastic (EPP) products in Muding County is 120 million RMB.The project is applied in the fields of industry, construction and insulation packaging.the EPP is light in quality, which can reduce the weight of items substantially and can be recycled.

Case simulation
We can find that the building material packaging unit is completed according to the process shown in Fig. 11.
(1) Setting targets: According to the quality and risk control requirements of construction material packaging, set the target value of risk control level as low risk.It also requires risk identification and assessment.(2) Collect data: Install sensors to monitor the operation status and packaging quality of construction material packaging machinery in real time, including personnel, equipment, monitoring and maintenance.(3) Design controller: PID controller can calculate the control quantity according to the real-time error signal, and transfer it to the construction material packaging machinery to adjust the parameters in the packaging process to achieve the control target.

Conclusion and perspectives
This paper completes the risk assessment based on LEC evaluation, risk index matrix and CVaR model.According to the design of the control system of the building material packaging unit from the perspective of personnel, equipment, monitoring and maintenance risks, the automation and intelligent control of the production process of the packaging process has been completed.Using networked and intelligent technology, the information collected by the sensor on the field equipment layer and the PLC control layer are transmitted to each other, and the signal is received by the host computer through Ethernet, and the information layer man-machine interface intelligently monitors and manages the production process.It can not only alarm in time for the faults that occur during the operation process, but also set the operating speed and count the box output of the cumulative shift, which fully meets the process and control requirements.Since the packaging unit has certain requirements on the stability and positioning accuracy of the control system, a mathematical model of the servo control system was established and simulated with Simulink based on the PID control model, which is mainly used to optimize parameters such as speed and position.The comparison of simulation results shows that under different working conditions, the control system has strong antidisturbance ability and high steady-state accuracy, and has good robustness.Finally, the on-site experiment of building material packaging was further carried out.During the experiment, the packaging unit can effectively and smoothly run from boxing, labeling to outer film packaging, and the production capacity and pass rate are as high as 97%, which verifies the reliability of the control system.The packaging unit control system designed in this paper combines the risk management model, and lays the foundation for the design of the mechatronics program for building material packaging production, and provides a certain reference and promotion value for intelligent control in other industries.

Figure 1 .
Figure 1.Risk index matrix coupling.Notes: Red is very high risk.

Figure 4 .
Figure 4. Schematic diagram of the network structure of the control system.

Figure 7 .
Figure 7. Structural diagram of servo control system based on PID controller.

Figure 8 .
Figure 8. Simulink simulation model diagram of the control system.

Figure 9 .
Figure 9. Simulation results of the control system performance under different operating conditions.

( 4 )
Risk assessment: The risk assessment model is combined with the construction material packaging control model to analyze the risk situation of the construction material packaging machinery in real time, and dynamically adjust the parameters of the PID controller according to the changes in the degree of risk in order to achieve risk control.(5) Simulation and analysis: The construction material packaging control model is simulated and analyzed using Matlab and Python, and the stability and accuracy of the PID control model, as well as the control effect on the risk are verified.(6) Optimization and improvement: Based on the results of the simulation analysis, the PID control model is optimized and improved, including the updating of risk factors and the adjustment of the parameters of the PID controller in order to ensure the risk control of the construction material packaging unit.

Table 1 .
Key risk influencing factors for material packaging unit in Web of Science, 2022.Probability = Number of papers/Total number papers, TotalProbability = p a + p b + p c .

Table 2 .
Four-level risk classification in material packaging unit.Order of probability according to Table1, source fromBaybutt, (2018)

Table 3 .
I/O address assignment of control system interface.

the caddy stack complete? Start System initialization whether the empty box is in place? Enter the operation interface and select retry Enter the operation interface and select retry Cylinder action Complete paper covering and box closing Reached the labeling fixed position Yes Yes No No Is the labeling done? The number of label accessories does not change and an alarm is issued Box delivery Transparent paper wrapping Is the package done? Detect sensor without feedback signal and alarm Carton packing process ends Packing of the next batch of small packs Yes Yes No No
Figure 5.Control flow chart of building material packaging unit.Vol.:(0123456789) Scientific Reports | (2024) 14:462 | https://doi.org/10.1038/s41598-023-51102-3

Table 4 .
Experimental performance index of control system.

Table 5 .
Production capacity and production efficiency of packaging unit system.