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

In the cold season, wine aids in maintaining body temperature and is advised for military ocers. is paper proposes a study on the multimotor drive control method of the upper-retort-robot based on machine vision for wine brewing automation to meet the demand of military areas located in cold regions, as wine is recommended to keep soldiers’ body temperatures normal in China’s extremely cold regions. Based onmachine vision, the target is converted into an image signal by an image pickup device and is sent to the image processing system. Pixel distribution, brightness, color, and other data are transformed to digital signals, and target attributes are retrieved to control the eld equipment’s operations.eMonte-Carlo approach is used to generate joint variables at random within each joint’s uctuation range. e positive aspects of kinematics model are utilized and the working space of the upper-retort-robot is calculated using multimotor drive control method. e multimotor drive compensates the harmonic ripple torque and establishes the fault-tolerant automatic control of the system to maintain quality of the liquor. e results of the experiments reveal that the robot arm can reach any place within the barrel’s set range. To control the quality of the liquor, the robot will function in an automatic manner. e robot’s transmission performance is capable of meeting the requirements for automated liquor quality control during the production of wine from grapes.e results show that the suggestedmultimotor drive control (MMDCM) approach is robust and viable in terms of robot transmission performance and dexterity.


Introduction
Some of China's border territories are in extremely cold climates, and military o cers are advised to drink alcohol, particularly wine, to maintain a normal body temperature in these situations [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 maintain a normal body temperature in cold climates, as well as providing other health bene ts. To meet the demand for wines in cold climates, cutting-edge technologies and fully automated mechanisms are required. e majority of wineries that serve army facilities with liquors still utilize traditional winemaking processes and make an e ort to keep the wine quality high [3]. Traditional target methods are not only prone to losing targets, but they are also incapable of dealing with a variety of unforeseen events in a timely manner. However, the distillation process of the upper retort requires light, uniform, thin, and accurate mash to be distributed uniformly in the lter [4]. Workers continue to operate this operation, and automation is minimal. Although some vineyards use machine feeding to meet demand, because of the laborious activities involved, productivity is quite low [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]. e upper-retort-robot, guided by machine vision, may considerably reduce manual issues while maintaining uniformity in wine quality to meet the demand for wines for army personnel in cold-climate border locations. e mechanization of the liquor industry has achieved remarkable results after recent years of development especially for serving military needs [7]. e procedure for creating wine can be varied in a number of ways [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]. erefore, at present, manual retort filling and semiautomatic retort filling operations are widely used in domestic retort filling processes. ere are also a few large wineries that utilize fully automatic retort filling processes [10].
e 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]. e 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]. In [14], speed control of a Multimotor System [MMS] based on Fuzzy Neural Model [FNM] is proposed. e idea of this research is to create a FNN for separately excited DC motor drive systems based on a model reference controller, which will be used in a multimachine system using two DC motors. e authors in [15] have suggested a PID method for designing a multirobot system based on target detection. e 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. e 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. e objective of the paper is as follows: To meet the demand for wines in cold climates, cutting-edge technologies and fully automated mechanisms are required. is research combines a mechanical drive with an artificial intelligence system. e application of machine vision is carried out. e suggested machine vision-based robotic system is simulated to ensure its feasibility and robustness. e majorities of wineries that serve army facilities with liquors still utilize traditional winemaking processes and make an effort to keep the wine quality high. An automation process is devised using machine vision to serve the purpose.
A soft computing approach is used in this research paper and the major contributions are as follows: (i) e retort process is refined using machine vision. (ii) e target is converted into an image signal through the image pickup device and then transmitted to the image processing system. e 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.
(iii) e 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. (iv) In collaboration with the digital PID position control algorithm, it controls the multimotor 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. (v) 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. e rest of the paper is structured into different sections. e paper begins with the introduction of the area of the research study, followed by the highlights of the papers. In Section 2, machine vision and its functionality aspects are discussed. In Section 3, the mechanism of multimotor drive control of upper-retort-robot is elaborated. e results are presented in Section 5. e last section summarizes the findings of this manuscript.

Machine Vision
Machine vision uses machines to replace humans for measurement and judgment [15][16][17]. e target is converted into an image signal through an image pickup device and is sent to the image processing system [18]. e 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 [19]. e blue linear bar light source produced by Shanghai Weilang Optoelectronics Technology Co., Ltd., is utilized and 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. e physical map is presented in Figure 1.
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.
First the camera is calibrated to determine its coordinate system and then obtain 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. e coordinate system of the robot's three-dimensional action image is represented by pixel units. e origin of the coordinates is set at the lower left corner of the overall action image, and (u, v) 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 (u 0 , v 0 ) pixels, and set the coordinates of a certain point representing the action image; the coordinate system is obtained as In equation (1), the pixel size of the action image is k × l , and its coordinates are transformed by the following equation: In equation (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 the following equation: In equation (3), M represents the parameter matrix in the camera. e parameters (k, l, u 0 v 0 , f, θ) represent the internal parameters of the camera.
rough the world coordinate system, the three-dimensional motion image of the robot is acquired. e world coordinate system is a three-dimensional rectangular coordinate system established with any point in space as the origin [16]. e relationship between the camera coordinate system and the world coordinate system is as in the following equation: In equation (4), R 3×3 represents the rotation matrix, t 3×1 represents the translation vector, (X C , Y C , Z C ) represents the coordinates in the camera coordinate system, and (X W , Y W , Z W ) represents the world coordinate system. In the three-dimensional space, rotate the two-dimensional rotation of the x, y, z 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 the following equation:

e 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. e process flow of the upper retort is shown in Figure 3.  In combination with the actual retort process requirements of the winery, the preliminary drafting process of the retort-up by the robot is as follows: First, it is necessary to ensure that the wine can enter the feeding port of the retortup robot in real time. en the mash is transported by the robot's internal conveying mechanism to the discharge port of the paving head to prepare for the retort. en 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. en real-time monitoring of the temperature information on the surface of the material layer is obtained. 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.
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 an Jiaolong motor that detects the mixing action are the key components of the robot [19,20]. e 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. e 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. e 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. e lifting plate and rotating arm motor adjust the mechanical arm according to the position of the barrel during operation to reach the relevant place in the barrel and wait for the material to be disseminated. en 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. e 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 [21,22]. e working principle of the feeding system is as shown in Figure 4.
Clarifying the range of motion for the upper-retort-end robot's effectors, this will serve as a basis for the fermentation workshop's overall equipment architecture. 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 p z to improve the kinematics model: In equation (6), 1875 represents the distance between the origin of the coordinate system {2} and the lower end of the base in mm. Equation (7) For the upper robot, a tool transformation needs to be defined to reflect the transformation of the top of the cloth head device (and effectors) relative to the coordinate system {4}. e top of the cloth head device used extends 845 mm along the y-axis of the coordinate system {4}. e coordinate system model is revealed in Figure 5.
X tool and Z tool are the X-axis and Z-axis of the fixed cloth head coordinate system. Subsequently, 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-retortrobot is calculated and provides a reference for the subsequent trajectory generation. e working space projection is shown in Figure 6. According to the projection of the feeding range of the three planes and the location relative to the upper-retortrobot, the upper-retort-robot may accomplish the fullcoverage of the entire layer of paving duties for a retort drum with a radius of 1600 mm and a height of 2000 mm. e upper-retort-robot needs to make a reciprocating circular motion around the barrel when spreading materials. e movement is complicated and the air leakage position is required to be accurately reached during the refilling phase. e weight of the robot arm is low when the robot is working, so it adopts an electric method. e control quantity for the electric control valve, which is employed in this system, corresponds to the opening of the electric control valve. At this time, the controller used in the system should as per the digital PID position control algorithm [12].

Tuning of Different PID Parameters.
Determine the fuzzy relationship between the three parameters of PID (proportional parameter K D , integral action parameter K I , and derivative action parameter K D ) and the fuzzy relationship between the deviation derivative e c and the control deviation e. During the operation of electrical equipment, continuity testing is performed on e c 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 e c and control deviation e for the three parameters, so that the dynamic and static performance of the controlled object is better [10]. e c and e are the input items of the fuzzy controller, and the three parameters are the output items. e construction of fuzzy parameter selftuning control structure is as shown in Figure 7.
In Figure 7, K p represents the proportional coefficient; K I represents the integral coefficient; K D 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. e 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. e PID control deviation is obtained by subtracting the given parameter value r(t) and the actual output value c(t) 1875mm 845 mm  of the electrical equipment to be debugged and is derived as given in the following equation: e proportional, derivative, and integral of the deviation obtained in equation (9) are linearly combined to form the control variable as follows: In equation (9), u(t) represents the controller output; e(t) represents the deviation signal; (1/T i ) e(t)dt represents the integral control term; T i represents the integral time constant; T d de(t)/dt represents the integral control term, and T d represents the derivative time constant. en 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 the PID. e transformation expression is as follows: In equation (10), T represents the number of system startup debugging items, k � 0, 1, 2, · · ·.
In the process of discretization, if the value of e is too small, the controller will be greatly affected by external interference [13]. erefore, in order to eliminate the influence of interference, the PID control process needs to be improved. e standard approach of obtaining the average value through numerous consecutive sampling can be used to filter out short-term and fast-changing interference, such as the sudden error of system A/D conversion [14]. However, because the difference term in the method is particularly sensitive to changes in value, when an error occurs, the error of the difference term is estimated and result will be greater. At this time, the four-point central difference calculation can be used to improve the difference term. e four-point central difference does not directly use e(k) but takes the error average e(k) at four different moments as the benchmark. e expression is as given in After the weighted summation process is performed, the approximate differential is obtained as expressed in the following equation: After simplification equation (13) is obtained: en the improved parameter self-tuning control based on fuzzy PID can be expressed as given in the following equation: Fuzzy reasoning Because the current is reset to 0 and no longer participates in energy conversion, torque ripple is created by phase torque loss, resulting in torque ripple [15]. As a result of the law of conservation of energy, the instantaneous electromagnetic torque can be estimated as shown in equation (15) when the permanent magnet synchronous motor is disconnected.
Equation (15) consists of a constant quantity and an alternating variable. In equation (15), e represents the capacity value; t represents the time; η represents the instantaneous electromagnetic torque; W e (t) indicates the instantaneous electromagnetic torque; K m indicates the harmonic current injection value; i indicates the constant value of the fundamental torque current component of the motor before and after the fault; c indicates the phase of the permanent magnet synchronous motor; α indicates the current axis. e constant value in equation (15) determines the average output torque and the alternating variable determines the output pulsating torque [12]. e motor is in phase asymmetric operation after the defect, and the faulttolerant control method is the process of regulating the current of the normal phase. e fault-tolerant automatic control strategy formulated at this time utilizes the permanent magnet synchronous motor and its inherent n harmonic subspace to control the degree of freedom. e harmonic pulsing torque is compensated by dividing H types of harmonic current injection modes several times, resulting in fault-tolerant automatic control of the system. When the harmonic current injection times are set to 3 times, the expression obtained is as shown in the following equation: When the harmonic current injection times are set to 3 or 5 times, the expression obtained is as shown in the following equation: When the harmonic current injection times are set to 3, 5, and 7, the expression obtained is as shown in the following equation: Among the above three sets of formulas, β and c 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 equation (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. erefore, the minimum copper loss is taken as an additional condition, and the stator copper loss is set as shown in the following equation: In equation (20), I i represents the phase current vector; R represents the resistance. Based on the results obtained above, a fault-tolerant automatic control strategy is formulated.

Experimental Setup.
e 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 upperretort-robot can meet the requirements in terms of speed and position accuracy, semiclosed loop AC servo control is used. e model gathered from the information that the VPL low inertia servo motor from the American A-B company (Rockwell Automation) has an optical encoder, and the accuracy and power can match the criteria of use. At the same time, it is matched with the K5500 series driver. e robot motor driver is shown in Figure 8. e GPU model is Ge Force GTX1080Ti, 8 GB, GDDR5X, 1733 MHz. e deep learning framework is keras 2.1.2, and the ATT-LSTM network is built using the sequential model. Keras is a bundled Tensor Flow and eano framework. It is a high-level neural network API that is completely edited by Python. It has the characteristics of modularity and scalability. It can quickly build a network and transform ideas into results. e configuration of the experimental environment is as shown in Table 1.
e methods used are mature, and the applicant is already proficient in relevant methods and is proficient in MATLAB simulation, programming, and motor drive related technical means and has the hardware and software conditions for each link of the test. e 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 Mathematical Problems in Engineering 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 upperretort-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. In Figure 9, the two barrels in the yellow area are completely in the working space of the robot, indicating that the robot arm can reach any position in the barrel within the defined range. e Jacobian matrix of the robot essentially contains some important information of the robot, such as position, direction, and joint limitations of the end effector. erefore, the dexterity of the robot according to the Jacobian matrix can be ascertained and can be defined as a new variable as shown in the following equation: e robot Jacobian matrix is given in equation (21). e variable is simulated using the MATLAB programme for the motion space simulation stated before, and the equations are presented in equations (22) e simulation image of the robot's dexterity is given in Figure 10.
As seen in Figure 10, 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, a transmission angle is defined. ere is an angle θ 3 between the speed direction vector of the linear velocity V B at the end of the rear arm and the joint axis of the forearm during robot movement. erefore, 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 the following equation: In equation (24), k ∈ [0, 1], when θ 3 � 0, cos(θ 3 ) � 1. e transmission performance between the two arms is the best at this time. When θ 3 � π/2, cos(θ 3 ) � 0, the transmission performance at this time is the worst. At the same time, MATLAB is used to simulate the value of k, and the result of the robot transmission performance is as shown in Figure 11. Figure 11 shows that k is predominantly concentrated in the areas of 1 and − 1, where transmission performance is excellent, whereas the distribution near 0 is sparse, indicating that transmission performance is poor. It shows that the transmission performance of the robot can meet the needs of the work.

Summary
To meet the demand for wines in cold climates, cutting-edge technologies and fully automated mechanisms are required. is research combines a mechanical drive with an artificial intelligence system. e application of machine vision is carried out. e suggested machine vision-based robotic system is simulated to ensure its feasibility and robustness. e majorities of wineries that serve army facilities with liquors still utilize traditional winemaking processes and make an effort to keep the wine quality high. An automation process is devised using machine vision to serve the purpose. e 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. e machine vision algorithm and driving algorithm are further optimized, so that the upperretort-robot guided by machine vision can automatically unload materials quickly and accurately as per the predefined goals. e brewing retort is automated with the proposed machine vision-based mechanism. e 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.
Data Availability e data are available to researchers on request. Disclosure e article is available at Research Square as preprint and available online at https://assets.researchsquare.com/files/rs-1078165/v1_covered.pdf?c�1637001861.

Conflicts of Interest
e authors declare that they have no conflicts of interest.  Mathematical Problems in Engineering 9