Design of Automatic Production System for Multi-agent Edible Fungus Inoculation

The automatic production system of edible fungus and fungus coating includes feeding robot, rod pulling robot, fungus injection system, cotton ball sealing system, detection system, feeding robot and assembly line. In the process of automatic bacteria injection, the work process is complicated because the space, function, and time of each part are different. It is difficult to achieve coordinated control of various devices using a single system. Therefore, multiple agents are established for the actual running multi-stage production system. Through the FA/C protocol, the agents communicate with each other, and the Manager-Agent is used to coordinate the control of each Task-Agent. Multi-agents are used to coordinately control the inoculation process of edible fungus bag, which is safe and reliable to meet the requirements of automatic inoculation of edible fungus bag.


Introduction
China has identified the edible fungus industry as a sunrise industry in the 21st century. At present, the infusion of bacteria in the bag is mainly in a semi-artificial state, and the working environment is likely to cause damage to the respiratory tract, skin, and reproductive system of the practitioner. Automatic fungus injection production equipment has low efficiency and high failure rate. Therefore, it is urgent to solve the technical bottleneck in the development of the edible fungus industry and develop efficient and intelligent special equipment. The mushroom bag is the growth body of edible fungus (fungus, etc.), and its production equipment is a special equipment for continuous filling. It is mainly composed of ingredients storage, bagging, sterilization, inoculation, and perforation systems. The inoculation system is the core part with high technical content and difficult design and manufacturing. At present, domestic fungus coating equipment is basically in a semi-artificial state, so the research on the automatic control system of edible fungus coating fungus is beneficial to improve the production efficiency and quality of edible fungi.

Multi-Agent System
With the increase in the complexity of system function requirements, traditional individual system control methods can no longer meet the requirements for achieving fast and effective complex task control. In order to give full play to the individual's autonomous control function and realize the collaborative control of the overall system through the organic combination of individual behaviors, multi-agent systems have been proposed.

Multi-agent System Characteristics
A multi-agent system is an organic combination of multiple relatively independent functions of individual systems. The purpose is to decompose a system with complex functions into a simple one that can be coordinated through information interaction, and is easy to manage and use. system. Multi-agent system studies the target knowledge and skill planning of agents and how to use coordination between agents to solve complex problems. The main research content includes interactive communication between agents, coordination and cooperation between agents, and conflict resolution between agents. Its general characteristics are autonomy, distribution, coordination, and sometimes need to have self-organization ability, learning ability and reasoning ability. These characteristics make it have strong robustness and reliability when solving practical application problems, and have high problem solving efficiency [1,2].

Research Status of Multi-agent Systems
Generally speaking, there are two main processes in the research of multi-agent systems. In the early stage of research on multi-agent systems, most of the research work focused on the establishment and analysis of multi-agent models. With the introduction of mathematical theories, multi-agent systems have been developed more in-depth, and the focus of research has also shifted from model research to coordinated control between multi-agent systems. In the stage of multi-agent model research, a typical experimental system is a small robot soccer, which uses a centralized control method. With the shift of research focus, the research focus of the multi-agent experimental system has also changed. For example, the medium-sized robot football system has begun to consider the autonomous decision-making of the agent and adopts a distributed control method. However, the function of the robot football is too single and is not suitable for multiple a general research tool for coordinated control of agents [3,4].
The model of the multi-agent system is abstracted from the behavior of actual animals. In 1986, Reynolds proposed the Boid model to simulate the behavior of birds gathering and flying, and proposed three multi-agents to avoid collisions, be consistent in speed, and gather toward the center. basic rules. Since then, multi-agent technology has been deeply studied. Japan's H. asama and Fukuda respectively proposed the ACTRESS model and the CEBOT model. The ACTRESS model forms an autonomous multi-agent system by connecting robots with peripheral devices and computers. The CEBOT model proposes that each robot can move autonomously, does not set a global model, does not use a centralized control method, but dynamically reconstructs according to different tasks and environments, so that the multi-agent system has the ability to learn and adapt. American scholars K. Jin and G. Beni have studied the SWARM model, which is also a distributed system composed of a large number of robots. Its main feature is that the robots themselves are not intelligent, but when they form a system, they will show a group of Intelligence [5]. Until 1995, Vicsek et al. analyzed the multi-agent system from mathematical theory, Tanner et al. explained the model theoretically, and proposed the Vicsek model from the perspective of statistical mechanics, which became a milestone in the development of multi-agent coordinated control theory. . Toner and Tu used the continuum mechanics method to establish a self-driving particle model. Levine et al. established a fully connected cluster model based on the particle model. Mogilner and Eldstein-Keshet, Topaz and Bertozzi also established several cluster continuous models. In order to support the research of multi-agent systems and promote the application of multi-agent systems, the European Union has set up a special topic for multi-agent system research -"multiple autonomous robots system for transport and handing application")". The research of multi-agent systems has made great progress in the past two decades [6][7][8].

The Hardware Composition of the Edible Fungus Inoculation System
The edible fungus package inoculation system mainly includes several intelligent bodies such as feeding robot, rod pulling robot, bacteria injection system, cotton ball sealing system, detection system, feeding robot and assembly line. Complete the transportation of the bacteria bag, automatic bacteria injection and quality inspection functions.
(1)The feeding robot can complete the precise placement of the bacteria basket. After sterilization, the bacteria bag will be injected into the bacteria. The feeding robot will accurately place the bacteria basket in the corresponding position of the assembly line. There are 12 bacteria bag in the bacteria basket. The placement position of the bacteria bag is shown in Figure 1.  (2)Twelve clamps are installed on the rod pulling robot, which can simultaneously clamp the rods placed in the center of the 12 bacteria packs. The rod pulling robot consists of a bacteria basket positioning mechanism system, a hydraulic upgrade system and a rod pulling control system. The bacterial basket positioning mechanism system completes the precise positioning of the bacterial basket position, so that the rod pulling fixture can accurately find the bacterial rod and pull it up. The hydraulic upgrade system can lift and drop the bacteria basket, ensuring that the bacteria stick can be pulled out smoothly.
(3)The bacteria injection system completes the injection of bacteria into the bacteria bag in the bacteria basket. The bacteria injection system consists of 12 injection heads. The position sensor is placed on the injection head to ensure the accuracy of the amount of bacteria injected. Edible fungus liquid is a kind of liquid mycelium used for inoculation of edible fungi. Nowadays, the fungus liquid is usually artificially injected into the fungus bag containing the cultivation base material to make the edible fungus grow. Because liquid hyphae is not easy to store, it has high requirements for survival environment, pH value, culture temperature, ratio, etc.; it is difficult to guarantee the same dosage for each injection; there is no uniform standard for the working environment; the use of tools cannot guarantee timely elimination; Due to repeated use and other reasons, the efficiency of bacterial injection is reduced, the bacterial liquid is contaminated again, and the qualified rate of bacterial packs is reduced, which is not conducive to the problems of edible fungus cultivation. In order to solve the above problems, this article adopts the principle of one-way peristaltic injection. The fluid only contacts the tube wall and does not contact the body to ensure the consistent injection environment and avoid secondary contamination of the bacterial liquid. At the same time, there are injection accuracy, repeat accuracy, and stability accuracy Higher merit. The device adopts a driving unit to drive multiple groups for use at the same time, and complete multiple groups of injections in one action, which can greatly improve production efficiency. 4 balls to ensure that cotton balls of similar size can accurately enter the cotton ball sealing structure, and finally the sealing operation is completed by the cotton ball mechanism.
(5)The detection system mainly uses the camera to complete the detection of whether the bacteria bag seal is qualified. The detection system combines the convolutional neural network algorithm to design an automatic detection system for the images of qualified products of the bacteria bag seal. The system is mainly divided into two modules, namely the photo data management module and the qualified product image automatic detection module. The main function of the photo data management module is the storage of the sealed image of the bacteria bag and the query of the image recognition result. The automatic detection module for qualified products completes image preprocessing and feature extraction. Figure 3 shows the composition of the detection system. (7)The unloading robot mainly removes the bacteria bag that has been injected with bacteria from the assembly line and puts it in the transport vehicle.
Estment of this equipment effectively guarantees the cleanliness of the production area and the safety of operators.

Multi-agent Collaboration
Collaboration means that each agent coordinates their actions and completes their work through mutual cooperation. As mentioned above, the purpose of establishing a multi-agent system is to solve the task goal that a single agent cannot accomplish. However, since the actions of each agent in the system are independent, and the knowledge, abilities, and goals of each agent are not the same, conflicts will inevitably occur during the operation of the system. How to solve the conflict problems encountered through coordination and cooperation between agents is one of the core problems studied in this paper, and it is also to ensure that the designed system has the ability and efficiency to solve problems [9,10].
According to the degree of collaboration between various agents and their respective target relationships, the collaboration of agents can be divided into multi-party planning collaboration, organizational collaboration and contract network agreement. This paper chooses the multi-party planning collaboration model as the collaboration scheme. The multi-party planning collaboration model simplifies the collaboration issues in the work of the agent through planning to avoid divergence or conflict. In order to complete the collaborative planning, each agent needs to formulate a plan before the start of their respective actions, and use information and communication to coordinate to resolve conflicts between their respective plans. Once the final plan is decided, no further changes are allowed. The more classic application of this model is the FA/C agreement (Functonally Accurate/Cooperative) formulated by Lesser. This model is suitable for situations where tasks are difficult to decompose and there are many uncertain information. The specific structure diagram is shown in Figure 4.

Agent Software Implementation
The software design of the agent is carried out on the basis of the hardware design, and the software program is equivalent to the soul of the agent. In order to integrate the functions of each hardware module, the following principles must be followed when designing any system software: Readability and easy maintenance; Reasonability and accuracy; Reliability; Real-time; Testability.

Program Design of Manager-Agent.
Manager-Agent performs system initialization before working. The initialization content here includes: clock initialization, communication initialization, motor drive, button display and other module initialization. The design flow chart is shown in Figure 5. The specific content is as follows: After the system is powered on, the clock is initialized to allocate and activate the clock source for each module, and the hardware resources of each module are initialized. Communication initialization, responsible for program debugging and command receiving and sending during the whole work process of the agent; motor drive initialization, according to commands to control the running speed of each part of the pipeline; button display initialization can complete the system parameter setting and working process Real-time display of data.

Program
Design of Manager-Agent. The program flow of Ask-Agent is similar. They all receive the task information passed by Manager-Agent, and then complete their own tasks according to the task information. After the task is completed, the information is fed back to Manager-Agent. The specific process is shown in Figure 6. Shown. The specific working process takes the cotton ball sealing agent as an example. When the bacteria basket reaches the specified position, the cotton ball sealing conveyor line of the assembly line stops running, the Manager-Agent will issue a sealing command to the cotton ball sealing agent, and the cotton ball sealing agent will The prepared cotton ball is stuffed into the bacteria bag to complete the sealing operation. Then, the cotton ball sealing agent sends a completion signal to the Manager-Agent, and the cotton ball sealing conveyor line starts to run and enters the next process.

Conclusion
The control of intelligent production of edible fungi inoculation is a complex industrial process based on space, function, and time. The use of a single system will lead to failure due to insufficient knowledge, resources, information and capabilities. This article focuses on the positioning and automatic Multi-stage production systems such as rod pull, automatic inoculation, and cotton ball sealing have established various agents in the production stage. According to the FA/C agreement, a general and scalable production line system model has been constructed to realize mutual communication and collaboration between various agents. Complete the inoculation task. The established automatic production system based on multi-agent edible fungus bag inoculation is simple, safe and reliable, and meets the requirements of automatic inoculation of edible fungus bag.