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

Authors: Jie Xiao; Wanjie Kang; Guofeng He; Xiangchen Li; Genglong Yan
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

In the cold season, wine aids in maintaining body temperature and is advised for military officers. This 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 on machine 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 field equipment’s operations. The Monte-Carlo approach is used to generate joint variables at random within each joint’s fluctuation range. The positive aspects of kinematics model are utilized and the working space of the upper-retort-robot is calculated using multimotor drive control method. The multimotor drive compensates the harmonic ripple torque and establishes the fault-tolerant automatic control of the system to maintain quality of the liquor. The 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. The robot’s transmission performance is capable of meeting the requirements for automated liquor quality control during the production of wine from grapes. The results show that the suggested multimotor drive control (MMDCM) approach is robust and viable in terms of robot transmission performance and dexterity.


---

## Body

## 1. Introduction

Some of China’s border territories are in extremely cold climates, and military officers 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 benefits. To meet the demand for wines in cold climates, cutting-edge technologies and fully automated mechanisms are required. The majority of wineries that serve army facilities with liquors still utilize traditional winemaking processes and make an effort 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 filter [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]. The 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.The mechanization of the liquor industry has achieved remarkable results after recent years of development especially for serving military needs [7]. The 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]. Therefore, at present, manual retort filling and semiautomatic 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]. In [14], speed control of a Multimotor System [MMS] based on Fuzzy Neural Model [FNM] is proposed. The 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. The authors in [15] have suggested a PID method for designing a multirobot system based on target detection.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. 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.The 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. This research combines a mechanical drive with an artificial intelligence system. The application of machine vision is carried out. The suggested machine vision-based robotic system is simulated to ensure its feasibility and robustness. The 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)
The retort process is refined using machine vision.(ii)
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.(iii)
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.(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.The rest of the paper is structured into different sections. The paper begins with the introduction of the area of the research study, followed by the highlights of the papers. In Section2, machine vision and its functionality aspects are discussed. In Section 3, the mechanism of multimotor drive control of upper-retort-robot is elaborated. The results are presented in Section 5. The last section summarizes the findings of this manuscript.


## 2. Machine Vision

Machine vision uses machines to replace humans for measurement and judgment [15–17]. The target is converted into an image signal through an image pickup device and is sent to the image processing system [18]. 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 [19]. The 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. 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 Figure2.Figure 2
OPTO telemetric lens TC 16M-056.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. 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, andu,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 u0,v0 pixels, and set the coordinates of a certain point representing the action image; the coordinate system is obtained as(1)uv1=1k0u001lV0001xy1.In equation (1), the pixel size of the action image is k×l , and its coordinates are transformed by the following equation:(2)xy1=1ZCf−fcotθ000fsinθ000010XCYCZC1.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:(3)uv1=1ZCfk×−fcotθku000flsinθv0,00,0,1,0XCYCZC=1ZCMXCYCZC1.In equation (3), M represents the parameter matrix in the camera. The parameters k,l,u0v0,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 as in the following equation:(4)XCYCZC1=R3×3t3×101XWYWZW1.In equation (4), R3×3 represents the rotation matrix, t3×1 represents the translation vector, XC,YC,ZC represents the coordinates in the camera coordinate system, and XW,YW,ZW 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:(5)x1y1=cosθsinθ−sinθcosθxy.


## 3. Multimotor Drive Control of Upper-Retort-Robot

### 3.1. 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 shown in Figure3.Figure 3
Process flowchart of the upper retort.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 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. Then 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 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]. 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. The 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. 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 [21, 22]. The working principle of the feeding system is as shown in Figure 4.Figure 4
The working principle diagram of the upper retort system.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 expressionpz to improve the kinematics model:(6)p¯z=−a2s2−d3c2+1875.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), the kinematic equation of the upper robot, describes the position and posture of the fixed coordinate system {4} of Jiont4.(7)T=r11r12r13pxr21r22r23pyr31r32r33p¯z0001.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}. The top of the cloth head device used extends 845 mm along they-axis of the coordinate system {4}. The coordinate system model is revealed in Figure 5.Figure 5
Coordinate system model.Xtool and Ztool 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-retort-robot is calculated and provides a reference for the subsequent trajectory generation. The working space projection is shown in Figure 6.Figure 6
Workspace of the upper-retort-robot.
(a)(b)(c)According to the projection of the feeding range of the three planes and the location relative to the upper-retort-robot, the upper-retort-robot may accomplish the full-coverage of the entire layer of paving duties for a retort drum with a radius of 1600 mm and a height of 2000 mm.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. The 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].


### 3.2. Tuning of Different PID Parameters

Determine the fuzzy relationship between the three parameters of PID (proportional parameterKD , integral action parameter KI , and derivative action parameter KD) and the fuzzy relationship between the deviation derivative ec and the control deviation e. During the operation of electrical equipment, continuity testing is performed on ec 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 ec and control deviation e for the three parameters, so that the dynamic and static performance of the controlled object is better [10]. ec and e are the input items of the fuzzy controller, and the three parameters are the output items. The construction of fuzzy parameter self-tuning control structure is as shown in Figure 7.Figure 7
Fuzzy PID self-tuning debugging structure diagram.In Figure7, Kp represents the proportional coefficient; KI represents the integral coefficient; KD 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 valuert and the actual output value ct of the electrical equipment to be debugged and is derived as given in the following equation:(8)et=rt−ct.The proportional, derivative, and integral of the deviation obtained in equation (9) are linearly combined to form the control variable as follows:(9)ut=Kpet+1Ti∫etdt+Tddetdt.In equation (9), ut represents the controller output; et represents the deviation signal; 1/Ti∫etdt represents the integral control term; Ti represents the integral time constant; Tddet/dt represents the integral control term, and Td 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 the PID. The transformation expression is as follows:(10)∫0tetdt≈T∑j=0kejT=T∑j=0kejdetdt≈ekT−ek−1TT=et−ek−1T.In equation (10), T represents the number of system startup debugging items, k=0,1,2,⋯.In the process of discretization, if the value ofe 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. The 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. The four-point central difference does not directly use ek but takes the error average e¯k at four different moments as the benchmark. The expression is as given in(11)e¯k=ek+ek−1+ek−2+ek−34.After the weighted summation process is performed, the approximate differential is obtained as expressed in the following equation:(12)e¯kT=ek−e/1.5T+ek−1−e/0.5T+e−ek−2/0.5T+e−ek−3/1.5T4.After simplification equation (13) is obtained:(13)e¯kT=16Tek+3ek−1−3ek−2−ek−3.Then the improved parameter self-tuning control based on fuzzy PID can be expressed as given in the following equation:(14)uk=kpek+TTi∑i=0kei+Td6Tek+3ek−1−3ek−2−ek−3.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.(15)Wet=∑i≠kcηKmi2c−1−cos2α−i−1×4πc=4ηKmi+∑i≠kcηKmi2ηKmi2cos2α−i−1×4πc.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; Wet indicates the instantaneous electromagnetic torque; Km 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.The constant value in equation (15) determines the average output torque and the alternating variable determines the output pulsating torque [12]. The motor is in phase asymmetric operation after the defect, and the fault-tolerant control method is the process of regulating the current of the normal phase. The 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. The 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:(16)iβ5=iγ5=iβ7=iγ7=0.When the harmonic current injection times are set to 3 or 5 times, the expression obtained is as shown in the following equation:(17)iβ7=iγ7=0.When the harmonic current injection times are set to 3, 5, and 7, the expression obtained is as shown in the following equation:(18)i3≠0,ia≠0,i7≠0.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):(19)W=1010cosθsinθcos3θsin3θcos2θsin2θcos6θsin6θcos3θsin3θcos9θsin9θ⋮⋮⋮⋮cosnθsinnθcos3nθsin3nθ.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. Therefore, the minimum copper loss is taken as an additional condition, and the stator copper loss is set as shown in the following equation:(20)H=RIiwIi.In equation (20), Ii represents the phase current vector; R represents the resistance. Based on the results obtained above, a fault-tolerant automatic control strategy is formulated.


## 3.1. 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 shown in Figure3.Figure 3
Process flowchart of the upper retort.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 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. Then 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 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]. 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. The 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. 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 [21, 22]. The working principle of the feeding system is as shown in Figure 4.Figure 4
The working principle diagram of the upper retort system.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 expressionpz to improve the kinematics model:(6)p¯z=−a2s2−d3c2+1875.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), the kinematic equation of the upper robot, describes the position and posture of the fixed coordinate system {4} of Jiont4.(7)T=r11r12r13pxr21r22r23pyr31r32r33p¯z0001.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}. The top of the cloth head device used extends 845 mm along they-axis of the coordinate system {4}. The coordinate system model is revealed in Figure 5.Figure 5
Coordinate system model.Xtool and Ztool 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-retort-robot is calculated and provides a reference for the subsequent trajectory generation. The working space projection is shown in Figure 6.Figure 6
Workspace of the upper-retort-robot.
(a)(b)(c)According to the projection of the feeding range of the three planes and the location relative to the upper-retort-robot, the upper-retort-robot may accomplish the full-coverage of the entire layer of paving duties for a retort drum with a radius of 1600 mm and a height of 2000 mm.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. The 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].


## 3.2. Tuning of Different PID Parameters

Determine the fuzzy relationship between the three parameters of PID (proportional parameterKD , integral action parameter KI , and derivative action parameter KD) and the fuzzy relationship between the deviation derivative ec and the control deviation e. During the operation of electrical equipment, continuity testing is performed on ec 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 ec and control deviation e for the three parameters, so that the dynamic and static performance of the controlled object is better [10]. ec and e are the input items of the fuzzy controller, and the three parameters are the output items. The construction of fuzzy parameter self-tuning control structure is as shown in Figure 7.Figure 7
Fuzzy PID self-tuning debugging structure diagram.In Figure7, Kp represents the proportional coefficient; KI represents the integral coefficient; KD 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 valuert and the actual output value ct of the electrical equipment to be debugged and is derived as given in the following equation:(8)et=rt−ct.The proportional, derivative, and integral of the deviation obtained in equation (9) are linearly combined to form the control variable as follows:(9)ut=Kpet+1Ti∫etdt+Tddetdt.In equation (9), ut represents the controller output; et represents the deviation signal; 1/Ti∫etdt represents the integral control term; Ti represents the integral time constant; Tddet/dt represents the integral control term, and Td 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 the PID. The transformation expression is as follows:(10)∫0tetdt≈T∑j=0kejT=T∑j=0kejdetdt≈ekT−ek−1TT=et−ek−1T.In equation (10), T represents the number of system startup debugging items, k=0,1,2,⋯.In the process of discretization, if the value ofe 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. The 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. The four-point central difference does not directly use ek but takes the error average e¯k at four different moments as the benchmark. The expression is as given in(11)e¯k=ek+ek−1+ek−2+ek−34.After the weighted summation process is performed, the approximate differential is obtained as expressed in the following equation:(12)e¯kT=ek−e/1.5T+ek−1−e/0.5T+e−ek−2/0.5T+e−ek−3/1.5T4.After simplification equation (13) is obtained:(13)e¯kT=16Tek+3ek−1−3ek−2−ek−3.Then the improved parameter self-tuning control based on fuzzy PID can be expressed as given in the following equation:(14)uk=kpek+TTi∑i=0kei+Td6Tek+3ek−1−3ek−2−ek−3.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.(15)Wet=∑i≠kcηKmi2c−1−cos2α−i−1×4πc=4ηKmi+∑i≠kcηKmi2ηKmi2cos2α−i−1×4πc.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; Wet indicates the instantaneous electromagnetic torque; Km 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.The constant value in equation (15) determines the average output torque and the alternating variable determines the output pulsating torque [12]. The motor is in phase asymmetric operation after the defect, and the fault-tolerant control method is the process of regulating the current of the normal phase. The 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. The 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:(16)iβ5=iγ5=iβ7=iγ7=0.When the harmonic current injection times are set to 3 or 5 times, the expression obtained is as shown in the following equation:(17)iβ7=iγ7=0.When the harmonic current injection times are set to 3, 5, and 7, the expression obtained is as shown in the following equation:(18)i3≠0,ia≠0,i7≠0.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):(19)W=1010cosθsinθcos3θsin3θcos2θsin2θcos6θsin6θcos3θsin3θcos9θsin9θ⋮⋮⋮⋮cosnθsinnθcos3nθsin3nθ.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. Therefore, the minimum copper loss is taken as an additional condition, and the stator copper loss is set as shown in the following equation:(20)H=RIiwIi.In equation (20), Ii represents the phase current vector; R represents the resistance. Based on the results obtained above, a fault-tolerant automatic control strategy is formulated.


## 4. Experimental Analysis

### 4.1. Experimental Setup

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, semiclosed loop AC servo control is used. The 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. The robot motor driver is shown in Figure8.Figure 8
Part of the scene diagram of the automatic retort distillation production line and the robot motor driver.The GPU model is Ge Force GTX1080Ti, 8 GB, GDDR5X, 1733 MHz. The 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 Theano 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. The configuration of the experimental environment is as shown in Table1.Table 1
Experimental environment configuration.
Operating systemUbuntu16.04Memory24 Core 64gProcessorIntel(R)Core(TM)i7-8700kDisk200 GB SSD + 3 TB hard diskPrograming languagePython 3.6Development environmentPycharm community edition 2019OthersKeras, Numpy, Pandas, Scikit-LearnThe 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. 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.


### 4.2. Experimental Results

According to the above MATLAB program, the robot workspace is drawn, and the robot workspace is shown in Figure9.Figure 9
Schematic diagram of the robot workspace.In Figure9, 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. The Jacobian matrix of the robot essentially contains some important information of the robot, such as position, direction, and joint limitations of the end effector. Therefore, 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:(21)λ=detJJT.The robot Jacobian matrix is given in equation (21). The variable is simulated using the MATLAB programme for the motion space simulation stated before, and the equations are presented in equations (22) and (23):(22)J=−1800sina,−1500sina+b;1800cosa+1500cosa+b,1500cosa+b,(23)λ=detsqrtJ.∗J.′.The simulation image of the robot’s dexterity is given in Figure10.Figure 10
Robot dexterity.As seen in Figure10, 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. There is an angleθ3 between the speed direction vector of the linear velocity VB at the end of the rear arm and the joint axis of the forearm during robot movement. 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 the following equation:(24)k=cosθ3.In equation (24), k∈0,1, when θ3=0, cosθ3=1. The 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
Robot transmission performances.Figure11 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.


## 4.1. Experimental Setup

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, semiclosed loop AC servo control is used. The 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. The robot motor driver is shown in Figure8.Figure 8
Part of the scene diagram of the automatic retort distillation production line and the robot motor driver.The GPU model is Ge Force GTX1080Ti, 8 GB, GDDR5X, 1733 MHz. The 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 Theano 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. The configuration of the experimental environment is as shown in Table1.Table 1
Experimental environment configuration.
Operating systemUbuntu16.04Memory24 Core 64gProcessorIntel(R)Core(TM)i7-8700kDisk200 GB SSD + 3 TB hard diskPrograming languagePython 3.6Development environmentPycharm community edition 2019OthersKeras, Numpy, Pandas, Scikit-LearnThe 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. 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.


## 4.2. Experimental Results

According to the above MATLAB program, the robot workspace is drawn, and the robot workspace is shown in Figure9.Figure 9
Schematic diagram of the robot workspace.In Figure9, 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. The Jacobian matrix of the robot essentially contains some important information of the robot, such as position, direction, and joint limitations of the end effector. Therefore, 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:(21)λ=detJJT.The robot Jacobian matrix is given in equation (21). The variable is simulated using the MATLAB programme for the motion space simulation stated before, and the equations are presented in equations (22) and (23):(22)J=−1800sina,−1500sina+b;1800cosa+1500cosa+b,1500cosa+b,(23)λ=detsqrtJ.∗J.′.The simulation image of the robot’s dexterity is given in Figure10.Figure 10
Robot dexterity.As seen in Figure10, 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. There is an angleθ3 between the speed direction vector of the linear velocity VB at the end of the rear arm and the joint axis of the forearm during robot movement. 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 the following equation:(24)k=cosθ3.In equation (24), k∈0,1, when θ3=0, cosθ3=1. The 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
Robot transmission performances.Figure11 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.


## 5. Summary

To meet the demand for wines in cold climates, cutting-edge technologies and fully automated mechanisms are required. This research combines a mechanical drive with an artificial intelligence system. The application of machine vision is carried out. The suggested machine vision-based robotic system is simulated to ensure its feasibility and robustness. The 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. 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.



---

*Source: 4034874-2022-08-10.xml*