Multi-motor Drive Control Method of Upper-Retort-Robot Based on Machine Vision

: A research on the multi - motor drive control method of the upper - retort - robot based on machine vision is proposed in this paper for wine brewing automation to suffice the demand of military areas situated in cold regions as wine is recommended to keep the body temperature of soldiers normal in highly cold regions of China. Based on machine vision, the target is converted into an image signal by an image pickup device and is sent to the image processing system. The pixel distribution, brightness, color and other information are converted into digital signals and the target features are extracted to control the actions of the field equipment. The Monte - Carlo method is exploited to randomly generate joint variables within the variation range of each joint. The positive aspects of kinematics model are utilized and the working space of the upper - retort - robot is calculated using multi - motor drive control method. The multi - motor drive compensates the harmonic ripple torque, and establishes the fault - tolerant automatic control of the system to maintain quality of the liquor. The experimental results show that the robot arm can reach at any position in the barrel within the defined range. The robot will work in an automated mode to control the quality of the liquor. The transmission performance of the robot can meet the requirements of the automated quality control of the liquor during processing of wine from grapes. The results are obtained for robot transmission performance and robot dexterity which proves the robustness and viability of the proposed multi - motor drive control method (MMDCM).


Introduction
Some of the border areas in China are situated in very cold regions and liquor consumption especially wine is recommended for the military officers to keep the body temperature normal in chilled zones [1]. Liquor brewing technology is growing day by day and the demand for wines is gradually increasing especially in defense services for the soldiers who have to perform duties in extremely cold regions [2]. Wines help to keep the body temperature normal in cold regions and also have other health benefits. To supply wines in cold regions, there is a requirement of the latest technologies and fully automated mechanisms to fulfill the demand. Most of the wineries that supply liquors to army bases still use traditional winemaking techniques, and attempts to retain the wine quality good [3]. However, the distillation process of the upper retort requires light, uniform, thin, and accurate mash to be distributed uniformly in the filter [4]. This process is still operated by workers and the degree of automation is almost negligible. Although some wineries implement machine feeding but in order to meet the needs, the production is very low due to the involvement of the manual operations [5]. However, the control of steam volume and quality cannot be guaranteed and manual adjustment is required most of the time. It is resulting in high labor intensity, high labor costs, and unsteady wine quality [6]. The upper-retort-robot guided by machine vision can greatly solve the manual problems and can retain uniformity in the quality of the wines to serve the demand of wines for army personnel in border areas situated in cold regions.
The mechanization of the liquor industry has achieved remarkable results after recent years of development especially for serving military needs [7]. There can be n number of variations in the procedure of wine making process [8]. In retort process of liquor brewing, the overall operation is complicated and it is difficult to devise the automation without embedding a smart mechanism to control the quality of the wine [9]. Therefore, at present, manual retort filling and semi-automatic retort filling operations are widely used in domestic retort filling processes. There are also a few large wineries that utilize fully automatic retort filling processes [10]. The automatic upper-retort-robot paving operation mostly adopts the shaking type and the rotary type feeding; the shaking type feeding is based on the design of a general six-axis automatic industrial robot, and the retort paving is based on the shaking of the hopper [11]. The rotating upper retort allows the discharge port to rotate around the inside of the retort barrel, and the swing arm mechanism adjusts the rotation radius of the rotating mechanism [12]. Most of the two paving methods use the infrared thermal imager gas detection technology to realize the guidance of the feed opening and to comprehend the accurate feeding [13].
The vision technology is used in many other fields. Today, with the rapid development of soft computing techniques, many fields have widely used soft computing for automation of the manual system. Soft computing plays role in personal lives, military services and in industries. The soft computing based research in the area of machine vision has been evolved in recent years, and it is also adopted by the majority of research oriented activities and defense services. For the traditional industry of winemaking, the application of artificial intelligence technology still has a scope to evolve which can greatly impact the wine quality to suffice the requirement of army centers located in the cold regions.

Major Contributions of the soft computing based research study
 The retort process is refined using machine vision.
 The target is converted into an image signal through the image pickup device, and then transmitted to the image processing system.  The pixel distribution, brightness, color and other information are converted into digital signals, and the target features are extracted to control the actions of the field equipment.
 The Monte-Carlo method is used to randomly generate joint variables within the variation range of each joint. Combined with the positive kinematics model, the working space of the upper-retort-robot is calculated and used as the follow-up trajectory.
 In collaboration with the digital PID position control algorithm, it controls the multi-motor drive, compensates the harmonic pulsating torque, and realizes the fault-tolerant automatic control of the system to make the upper-retort-robot work under the guidance of machine vision.  Fast and accurate automated feeding process is devised according to the set target to meet the requirements for steam volume during the feeding process to ensure the quality and output of the wine.

Structure of the manuscript
The paper is structured into five sections. The paper begins with the introduction of the area of the research study, followed by the highlights of the papers. Next part of the paper covers machine vision and its functionality aspects. The third section elaborates the mechanism of multi-motor drive control of upper-retort-robot. The results are presented in the very next section. Final section summarizes the findings of this manuscript.

Machine vision
Machine vision uses machines to replace humans for measurement and judgment. The target is converted into an image signal through an image pickup device and sent to the image processing system. The pixel distribution, brightness, color and other information are converted into digital signals, and the target features are extracted to control the actions of the field equipment. The blue linear bar light source produced by Shanghai Weilang Optoelectronics Technology Co., Ltd., the model is VL-LS2-D150. Considering the resolution, volume, computer interface, acquisition speed and other factors, this study chooses the MVC1024 DLM-GE35 linear array CCD electrical coupling device produced by Beijing Microvision Company as the image acquisition equipment. The physical map is presented in Figure 1.

Figure 1 Linear CCD camera MVC1024LM-GE35
In order to match the interface type and the size of the image sensor of the line scan camera MVC1024DLM-GE35, and to reduce the system magnification change due to the slight change in the working distance during the image acquisition process. In this study, the telecentric lens TC 16M-056 produced by Italian OPTO was selected as the auxiliary image acquisition equipment as Figure 2.

Figure 2 OPTO telecentric lens TC 16M-056
This article first calibrates the camera to determine its coordinate system, and then obtains the three-dimensional motion image of the robot. It mainly includes the robot's three-dimensional motion image coordinate system, camera coordinate system and world coordinate system. The coordinate system of the robot's three-dimensional action image is represented by pixel units. The origin of the coordinates is set at the lower left corner of the overall action image, and ( , ) uv is set to indicate the coordinates of a certain point of the action image, all representing the unit pixel of the action image. Suppose the origin of the coordinate system is at 00 ( , ) uv pixels, and set the coordinates of a certain point representing the action image, and the coordinate system is obtained as: In formula (1), the pixel size of the action image is kl  , and its coordinates are transformed by formula (1) to obtain: In formula (2), f represents the focal length of the camera, and  represents the skewness of the camera coordinate system.
On this basis, determine the relationship between the action image and the camera coordinate system, as shown in formula (3).
In formula (3), M represents the parameter matrix in the camera. The parameters k l u v f  represent the internal parameters of the camera. Through the world coordinate system, the three-dimensional motion image of the robot is acquired. The world coordinate system is a three-dimensional rectangular coordinate system established with any point in space as the origin [16].
The relationship between the camera coordinate system and the world coordinate system is shown in formula (4).
In formula (4), 33 R  represents the rotation matrix, 31 t  represents the translation vector, represents the coordinates in the camera coordinate system, and ( , , ) W W W X Y Z represents the world coordinate system. In the three-dimensional space, rotate the two-dimensional rotation of the z y x , , coordinate axis obtained above to determine the coordinate angle of the robot's three-dimensional motion image to complete the image acquisition as shown in formula (5).

The working principle of upper-retort-robot
In the field of industrial wine making, retort is the process of evenly spreading the fermented mash into a retort barrel with a diameter of 1.6 m and a depth of 0.8 m. The process flow of the upper retort is as Figure 3. In combination with the actual retort process requirements of the winery, the preliminary drafting process of the retort-up robot is as follows: First, it is necessary to ensure that the wine can enter the feeding port of the retort-up robot in real time. Then the mash is transported by the robot's internal conveying mechanism to the discharge port of the paving head to prepare for the retort, and then the 60-90 mm (3 layers) mash is evenly spread on the bottom of the retort barrel, and the wine is steamed at the bottom of the retort barrel. Then real-time monitoring of the temperature information on the surface of the material layer, when the temperature is too high (about to leak), it needs to be fixed-point replenishment; when the temperature is moderate, continue to spread a layer of material evenly. Repeat the operation until the retort bucket is full, and then switch to another retort bucket to perform the same operation.
The robot is mainly composed of a chassis, a column, two mechanical arms, a servo motor that controls the rotation of the chassis and the rotation of the mechanical arm, and a Jiaolong motor that apprehends the mixing movement [17,18]. The chassis not only supports the entire robot, but also can be driven by the servo motor 1 to establish the rotation on the horizontal plane. The robot arm 1 is connected with the base through the column; and the robot arm 1 and the column are connected by the ball screw. Driven by the servo motor 2, the robot arm is controlled to move up and down on the vertical plane; the two mechanical arms are connected by gear meshing, and the rotation of the mechanical arm 2 is established through the movement of the servo motor 3. During working, the lifting plate and the rotating arm motor first adjust the mechanical arm according to the position of the barrel to reach the corresponding position in the barrel to wait for the material to be spread. Then start the feeding equipment to send the raw materials into the hopper, and the raw materials reach the sprinkler under the push of the screw. The spreading port automatically adjusts the spreading position according to the thickness of the material layer fed back by the vision system and the air leakage in the barrel to ensure that the raw materials are spread evenly and the thickness is consistent until the entire barrel is spread [19,20]. The working principle of the feeding system is as Clarifying the position that the end effector of the upper-retort-robot can reach can provide a basis for the overall equipment layout of the subsequent fermentation workshop. When defining the above motion transformation, it is considered that the origin of the upper robot is located at the boom tilting mechanism, that is, the origin of the coordinate system {2}. In order to complete the model and analyze the working space, transform the base, transfer the origin of the robot to the lower end of the base connected to the ground, and replace the following expression z p to improve the kinematics model.
In formula (6)   working space projection is shown in Figure 6.

Multi-motor drive control
The upper-retort-robot needs to make a reciprocating circular motion around the barrel when spreading materials. The movement is complicated and the air leakage position is required to be accurately reached during the refilling phase. The weight of the robot arm is low when the robot is working, so it adopts an electric method. For the actuator used in this system, the electric control valve, the control quantity corresponds to the opening of the electric control valve. At this time, the controller used in the system should be a digital PID position control algorithm [12]. Determine the fuzzy relationship between the three parameters of PID (proportional parameter D K , integral action parameter I K , derivative action parameter D K ) and the fuzzy relationship between the deviation derivative c e and the control deviation e . During the operation of electrical equipment, continuity testing is performed on c e and e . And based on the principle of fuzzy control, the three PID parameters are repeatedly modified to adapt to the different requirements of different deviation derivatives c e and control deviation e for the three parameters, so that the dynamic and static performance of the controlled object is better [10]. Define c e and e as the input items of the fuzzy controller, and the three parameters as output items. The construction of fuzzy parameter self-tuning control structure is shown in Figure 7. In Figure 7, p K represents the proportional coefficient; I K represents the integral coefficient; D K represents the differential coefficient. In the debugging process, firstly, make the integral coefficient adjustment and the differential coefficient adjustment invalid, so as to adjust the proportional coefficient [11]. If the output of the fuzzy parameter is volatile, the scale factor is enlarged until the fuzzy parameter changes have regularity. After setting the proportional coefficient P , set the integral coefficient I . The adjustment process of the integral coefficient is opposite to that of the proportional coefficient. After the integral coefficient I is set, the differential coefficient D is set in the same manner as the proportional coefficient.
The PID control deviation is obtained by subtracting the given parameter value   rt and the actual output value   ct of the electrical equipment to be debugged, and its formula is given in expression (8).
The proportional, derivative, and integral of the deviation obtained in formula (9)    d de t T dt represents the integral control term, and d T represents the derivative time constant. Then use the data approximation method to complete the realization of the PID control law in the computer [12]. If there are fewer test items T , use summation instead of integral, use difference quotient instead of derivative, and discretize PID, that is, its transformation expression is as follows:  (10) In formula (10), T represents the number of system startup debugging items, 0,1, 2, k  L . In the process of discretization, if the value of e is too small, the controller will be greatly affected by external interference [13]. Therefore, in order to eliminate the influence of interference, the PID control process needs to be improved. For the short-term and fast-changing interference, such as the sudden error of the system A/D conversion, it can be filtered out by the conventional method of obtaining the average value through multiple consecutive sampling [14]. However, because the difference term in the algorithm is particularly sensitive to the change of the value, when the error occurs, the error of the result calculated by the difference term will be larger. At this time, the four-point central difference calculation can be used to improve the difference term. The four-point central difference does not directly use   ek , but takes the error average   ek at four different moments as the benchmark. The expression is given in formula (11).
After the weighted summation process is performed, the approximate differential obtained can be expressed in formula (12).  (14) Because the current is reset to 0, it no longer participates in energy conversion, resulting in torque ripple problem caused by phase torque loss [15]. Therefore, according to the law of conservation of power, the instantaneous electromagnetic torque when the permanent magnet synchronous motor is disconnected can be calculated as shown in formula (15 The above formula consists of a constant quantity and an alternating variable. In formula (15) The constant value in the formula determines the average output torque; the alternating variable determines the output pulsating torque [12]. The motor after the fault is in a state of phase asymmetric operation, and the process of adjusting the current of the normal phase is the fault-tolerant control process. The fault-tolerant automatic control strategy formulated this time utilizes the permanent magnet synchronous motor and its inherent n harmonic subspace to control the degree of freedom.
By dividing H kinds of harmonic current injection modes many times, the harmonic pulsating torque is compensated, and the fault-tolerant automatic control of the system is realized. When the harmonic current injection times is set to 3 times, let the expression be as shown in formula (16).
When the harmonic current injection times are set to 3 or 5 times, let the expression be as shown in formula (17).
When the harmonic current injection times are set to 3, 5, and 7, let the expression be as shown in formula (18).
Among the above three sets of formulas;  and  represent the axis of harmonic current; a represents a positive integer. Take the above formula as an example; delete the columns related to the 5th and 7th harmonic currents in the transformation matrix to obtain the transformation matrix as shown in matrix (19 In formula (19),  represents the current axis after transformation. After the harmonic current is injected, the output torque performance of the motor is improved, but the introduced harmonic current will increase the stator copper consumption and reduce the motor efficiency. Therefore, the minimum copper loss is taken as an additional condition, and the stator copper loss is set as shown in formula (20).
In formula (20), i I represents the phase current vector; R represents the resistance. According to the above analysis process, the above formula is converted and set. Based on the results obtained above, a fault-tolerant automatic control strategy is formulated.

Experimental program
The experimental environment selects the Geek Cloud server, which provides a variety of configurations of services, and uses on-time billing. You can choose to occupy or share it alone, which has a very high cost performance. In order to ensure that the designed upper-retort-robot can meet the requirements in terms of speed and position accuracy, semi-closed loop AC servo control is used in this subject. The model learned from the information that the American A-B company (Rockwell Automation) VPL low inertia servo motor has an optical encoder, and the accuracy and power can meet the requirements of use. At the same time, it is matched with the K5500 series driver. The robot motor driver is as Figure 8.  Table 1. The methods used are mature, and the applicant is already proficient in relevant methods, and is proficient in MATLABA simulation, programming, motor drive related technical means, and has the hardware and software conditions for each link of the test. The specific experimental program is as follows: (1) Analyze current machine vision algorithms through reading and research of relevant literature; through analysis of existing algorithms, select appropriate algorithms or improve existing algorithms based on the actual environment of the brewing retort.
(2) Data collection: On-site collection of images, temperature, humidity and other data during the retort filling process; (3) Import the collected data into the machine vision algorithm, and the simulation optimization algorithm makes the output control amount optimal.
(4) Import the vision algorithm into the microcontroller, and drive the simple automatic upper-retort-robot to automatically unload the material according to the set target.

Experimental results
According to the above MATLAB program, the robot workspace is drawn, and the robot workspace is shown in Figure 9.
The simulation image of the robot's dexterity is given in Figure 10. As you can see from Figure 10 that the robot dexterity  value range is above the x-y plane, indicating that  will not be equal to zero, and there will be no singular configuration phenomenon when the robot is working.
In order to simulate the transmission performance of the robot, define a transmission angle. During the movement of the robot, there is an angle of 3  between the speed direction vector of the linear velocity B V at the end of the rear arm and the joint axis of the forearm. Therefore, we define this included angle as the transmission angle between the two arms of the robot, and use the cosine value to indicate the excellent transmission performance, which is defined in formula (24).

Figure11. Robot transmission performances
It can be seen from Figure 11 that k is mainly concentrated in the areas of 1 and -1 where the transmission performance is better, while the distribution near 0 where the transmission performance is poor is sparse. It shows that the transmission performance of the robot can meet the needs of the work.

Conclusion
This article combines artificial intelligence algorithm with mechanical drive. The usage of machine vision is made. The robotic mechanism is simulated to verify the feasibility and robustness of the proposed machine vision based mechanism. The algorithm parameters are fine-tuned according to the field measured data to deliver the best output. A simple and automatic retort loading robot is designed and developed to apprehend visual algorithm control to drive the robot to load materials automatically. The machine vision algorithm and driving algorithm are further optimized, so that the upper-retort-robot guided by machine vision can automatically unload materials quickly and accurately as per the predefined goals. The brewing retort is automated with the proposed machine vision based mechanism; the results are calculated on the basis of accuracy in robot transmission and robot dexterity.
It is proved that the proposed machine vision based mechanism can improve the robotic performance by improving the transmission and dexterity, it also promotes automation to suffice the wine requirement in cold regions of army bases in China.

Ethical approval
The work presented in this manuscript is performed in the simulated and controlled III.

Conflict of interest
The authors have no conflicts of interest to declare that are applicable to this article.

Informed Consent
The work described in this manuscript is original and is not under submission to any other journal at present. The authors have contributed equally for the preparation of this manuscript. The authors give consent for transferring the copy-rights to the Soft Computing journal.