Research on Fast Identification and Location of Contour Features of Electric Vehicle Charging Port in Complex Scenes

The maturity of automatic driving and parking technologies is gradually driving electric vehicle charging toward automation. The primary condition of automatic charging that has a high significance is the identification of electric vehicle charging ports. This research proposes an automatic system for the identification and positioning of charging ports of electric vehicles. The system is mainly divided into rough and precise positioning. The former is based on the Hough circle and the Hough line, and locates the position information of the charging port. The latter uses the Canny operator to obtain the contour information of the original and gradient images respectively. All the contours of the two images are fitted into ellipses by the quadratic curve standardization (QCS) method, and irrelevant ellipses are screened out. Finally, the perspective-n-point (PNP) algorithm is used to locate the pose information of the charging port. The aubo-i10 6-DOF articulated robot is used to test the recognition and insertion accuracies in different environments. The results show that the average recognition rate of rough positioning is 97.9%, the average displacement error of precise positioning in X, Y and Z directions are 0.60, 0.83 and 1.23 mm, respectively, and the average angle errors in RX, RY and RZ directions are 1.19, 0.97 and 0.50 degrees, respectively. The average success rate is 94.8%. These results demonstrate that the proposed system meets the basic plug-in requirements of electric vehicle charging ports.


I. INTRODUCTION
The usage of electric vehicles is continuously increasing, thanks to their advantages such as energy saving, environmental protection, zero exhaust emissions, and zero consumption of petroleum resources [1]- [4]. At the same time, they have attracted a significant amount of attention from governments and many automobile manufacturers. [5]- [9] The automatic charging of electric vehicles has developed rapidly along with the maturity of autonomous driving and automatic parking technologies [10]. At present, the use of robot plugging is the main solution for carrying out automatic charging of electric vehicles. A few companies and research institutions have proposed their own solutions [11]- [18]. The accurate identification and location The associate editor coordinating the review of this manuscript and approving it for publication was Madhu S. Nair . of the charging port of an electric vehicle is a technology that is key to realizing automatic charging of electric vehicles, and it is also a prerequisite for plugging.
At present, the pose information of the charging port mainly uses laser positioning and visual positioning. Wang [19] used laser positioning by adopting the method of laser scanning of the charging port based on the circular feature positioning. The author used the threshold segmentation method to scan and recognize the charging port, and realized the positioning of the charging port. The positioning and angular accuracy values are within ±1mm and ±1 degrees, respectively. Wang [20] designed an automatic charging pile based on split laser-ultrasonic positioning using the different propagation speeds of laser and ultrasonic signals. The author calculated the relative positions of the charging port and the robotic arm according to the difference in their transmission and reception times.
When the test distance was between 15 cm and 110 cm, and the angle was ±45 degrees, a millimeter level positioning accuracy could be achieved.
The visual positioning is mainly divided into feature recognition and non-feature recognition. The former mainly reduces the recognition difficulty by sticking a specific mark on the charging port, and also requires modifications to the vehicles. Pan et al. [21] proposed a technique based on feature identification, which used the difference between the binary image and the open operation of the image to realize the positioning of feature points. The authors subsequently used the set solving algorithm to obtain the pose with positioning and angular errors of 1.4 mm and 1.6 degrees, respectively. Lu [22] used feature matching to identify the vertices of the feature label of the charging port, and combined it with the perspective-n-point (PNP) algorithm to realize the charging port positioning, no specific positioning accuracy information is given.
The non-feature recognition positioning method does not require vehicle modification. Miseikis et al. [23] proposed an electric vehicle charging port positioning algorithm based on shape matching, and compared the charging port image with the template image. Using the displacement difference and the deformation between the images to identify and locate the charging port. The average displacement and angular errors of 3.0 mm and 10 degrees, respectively, were obtained. Duan [24] used SURF feature point matching to locate indoor targets and completed the insertion process, no specific positioning accuracy information is given. An insertion success rate of 96% were obtained. Yao [25] used binocular vision with HALCON commercial software for positioning, and designed an interactive acquisition software. The average displacement and angular errors of 2.5 mm and 0.8 degrees, respectively, were obtained. Yin [26] explored the recognition and positioning of indoor charging ports using the high and low exposure combination method for recognizing texture features. The recognition rate of the charging ports reached 97%. The Hough circle detection method was used to locate the position of the charging ports. The proposed method needed a long recognition time and strictly required the positioning distance. The displacement and angular accuracies of ±1 mm and ±1 degrees, respectively were obtained.
Most of the above studies were based in the laboratory stage and were not tested under strong outdoor light. A scanning LIDAR is costly and needs the approximate height of the charging port in advance. It is necessary to modify the vehicle charging port for feature recognition, which is not only complicated to operate, but also increases the cost, that is not conducive to popularization and application. The non-feature recognition is comparatively less researched and the current detection methods have low accuracy and poor adaptability.
In this paper, we propose a recognition method that combines monocular vision and non-feature identification. The method uses Hough circle and Hough line for rough positioning, and uses the contour information extraction method to combine the original image and the gradient map. The contours are fitted by the quadratic curve standardization (QCS) method. Finally, the PNP algorithm is utilized to locate the pose information of the charging port. In this way, the charging port can be quickly identified and positioned with high accuracy in different environments. Our contributions in this paper are as follows: 1) We propose a solution for charging port pose positioning based on feature-free recognition. The solution combines rough positioning and precise positioning, which improves the adaptability and positioning accuracy of the algorithm. 2) We use the QCS method to fit the feature contour of the original and gradient images, which improves the positioning accuracy. 3) We test the influence of different complex scenes on the angular and position accuracies of the charging port, and verify the feasibility and effectiveness of the algorithm. The rest of this paper is organized as follows. In Section II, the data collection process and the identification and location methods are introduced. In Section III, an aubo-i10 6-DOF articulated robot is used to verify the recognition accuracy, and the positioning accuracy and success rate of insertion in different scenes are given. The sources of error in the data are discussed in Section IV. In Section V, the experimental results and further research directions are provided.

A. INTRODUCTION OF CHARGING PORT
This research mainly identifies the GBT 20234.3-2011 DC fast charging port [27]. Figure 1 shows the charging port structure diagram and relative position information. The charging port consists of a total of nine cylindrical holes, which correspond to DC protective ground, DC power supply positive, DC power supply negative, vehicle connection confirmation, low voltage auxiliary power positive, low voltage auxiliary power negative, charging terminal communication and power supply connection confirmation. There are mainly three types of holes: 1) large (DC−, DC+) with outer and inner diameters of 25.4 mm and 12 mm, respectively; 2) middle (PE) with outer and inner diameters of 15.1 mm and 6 mm, respectively; 3) small (S-, CC2, CC1, S+, A−, A+) with outer and inner diameters of 10.3 mm and 3 mm, respectively.

B. CONSTRUCTION OF PLUG-IN EXPERIMENTAL PLATFORM
The plug-in experimental platform is shown in Fig. 2 and mainly includes: vision system, control system and robot actuator. The vision system is responsible for image collection and consists of light source, camera and lens. The control system is the industrial personal computer, which is responsible for image processing, identification VOLUME 10, 2022  and positioning. It sends commands to the actuator that is responsible for the final plug-in work. Figure 3 shows the test docking platform. The charging port is fixed on the aluminum alloy profile. First, the camera follows the robotic arm to search for the charging port's location. After acquisition of the image of the charging port, the control system analyzes and processes the image information to obtain the position and posture information of the charging port. Subsequently, the robot adjusts the displacement and posture to reach the aiming position and perform repositioning. Finally, it performs the insertion, thereby completing the entire insertion process.
The AUBO-i10 six-degree-of-freedom articulated robot is used in this study. Its maximum insertion and extraction force is 10 kg, repeat positioning accuracy is 0.05 mm, and arm span is 1563.2 mm. The camera uses the MER-125-30GM/C-P Mercury Gig PoE series industrial camera from Daheng imaging Co., Ltd. It has a resolution of 1292964 and a camera pixel size of 3.75 µm3.75 µm. The distortion coefficient is equal to −1367.811257. This coefficient indicates the radial distortion variable level: if it is negative, the distortion is a barrel type distortion; otherwise, it is a pillow type distortion. The camera uses the 8 mm lens of the M0814-MP2 model manufactured by Combada.
It is necessary to obtain the calibration parameters of the camera for locating the target pose information. In the insertion experiment, the obtained posture should be converted to the robot tool coordinate system, which requires hand-eye calibration. The system calibration in this study includes camera calibration and hand-eye calibration. These calibrations are realized by the Zhang calibration method [28], [29] and the Axelrod calibration method [30], respectively.

C. CONSTRUCTION OF PLUG-IN EXPERIMENTAL PLATFORM
The charging port is fixed on the aluminum alloy shelf by the robot teach pendant during data collection. The robot moves the charging gun head into the charging port. The end posture of the robot in this state is known as the robot zero state, which is used to calculate the zero pose information of the charging port. The position of the charging port is fixed and the end of the robot is pulled out of the charging port. Subsequently, the robot collects the image data of the charging port in different poses. It records the pose information of the robot and obtains the pose information of the charging port, which is used as the reference standard for algorithm identification in this research.
The charging port used in this study has been plugged in approximately 30,000 times. To deal with the large variations in the test environment, this research designed the camera automatic exposure algorithm. The algorithm adjusted the exposure time of the image to maintain the average brightness value of the image to medium brightness, and set the range of 100-130. The charging port image information was collected at the Auto Finance Port in Jiading District, Shanghai. The experiment was carried out in both sunny and cloudy environments to ensure the stability of the algorithm to weather conditions. During the image collection, we chose indoor and outdoor environments to ensure adaptability to different types of scenes. We collected photos in the morning, noon and evening to adapt to different light angles, which improves the effectiveness of the data and provides guarantee for the algorithm adaptability.
Based on the actual application scenarios of rough positioning, following are the parameters for the images collected in this study: The ranges in X, Y and Z directions are [−200, 200] Table 2, and images representing different samples are shown in Fig. 5.

D. IDENTIFICATION AND POSITIONING OF CHARGING PORTS
This research is mainly divided into two stages: rough positioning and precise positioning. Figure 6 shows the charging port identification scheme.  For rough positioning, the image is first converted into a grayscale image, and filtered using a 5 × 5 convolution kernel. As the periphery of the charging port is composed of circles and straight lines, it is identified and located based on these features. The specific steps are: 1) Set the maximum and minimum radii of the detection circle according to the approximate recognition range of the charging port from the camera, 2) Extract the detected circle information, 3) Use the Hough line to detect the straight line within the circle. If a certain proportion is detected as a straight line, it can be considered that the closed area is composed of the circle and the straight line is the area of the charging port, 4) Based on the pixel size of the charging port and the position information of the center point in the image, the actual three-dimensional position information of the charging port is obtained using similar triangles. The robot drives the gun head to make the first adjustment keeping the camera at the focus position, which completes the rough positioning process.
The precise positioning is based on the extracted image of the charging port area. The Canny operator is used to obtain the contours and the gradient map of the area, respectively. The minimum circumscribed rectangles of all contours are respectively obtained. The length-to-short-diameter ratio and the size of the long-diameter of the circumscribed rectangle are comprehensively used to filter out part of the contour information, and the QCS method is used to fit the contour into an ellipse. Finally, the average value of the center coordinates of each feature point is calculated. The direct linear transform (DLT) algorithm needs at least six feature points, so when the effective feature points information is more than 6, the calculated position of the center pixel of each charging pinhole is combined with its position relative to the three-dimensional coordinate point. The pose information of the charging port relative to the camera is obtained using the PNP algorithm, which is then converted into the pose information executed by the robot. The robot is instructed to complete the docking task.

E. ROUGH POSITIONING OF CHARGING PORT 1) FEATURE RECOGNITION METHOD OF CHARGING PORT BASED ON ROUGH LOCATION
Taking the side view of the car as the reference plane, the center of the circular feature on the periphery of the charging port is set as the coordinate origin, as shown in Fig. 7. As the center of the semicircle of the charging port area is consistent with the center of the charging port, it can be approximately regarded as the center of the charging port. Due to symmetry, the origin of the coordinate system will not shift regardless of whether the area rotates around the X axis or the Y axis. The rotation around the Z axis is insignificant when the car is parked normally on the road, hence it is ignored. Therefore, the origin of the coordinate system can be used as the target point, i.e., the three-dimensional coordinates of the point in the camera coordinate system are the required rough positioning results.

a: CIRCULAR FEATURE DETECTION BASED ON HOUGH CIRCLE ALGORITHM
The basic idea of the Hough circle algorithm [31] is as follows: Every non-zero pixel point may be a point on the circle. By converting it into polar coordinates, a voting mechanism is used to find the circle. The specific operations are given below: The parametric equation of a circle can be defined as follows: where x and y are the pixel positions, a and b are the coordinates of the center of the circle, and r is the radius of the circle. For a given point (x, y), we can draw all circles in a three-dimensional coordinate system. This operation is performed on all coordinate points in the space. If two different points intersect in abr space, they have a common set of (a, b, r). If there is a high number of intersections on the same circle, it means that the circle is composed of a large number of points. By setting a threshold value, the circular feature of the outer periphery of the charging port can be obtained.
This study sets the detection radius range between [120, 320] based the actual scene. The distance of the center of the detected circle is set to infinite for eliminating irrelevant interference and detecting a suitable circular feature. The smaller the center accumulator, the more likely it is for the false circle to be detected. When the value of center accumulator is 100, it can meet the detection requirements. Figure 8(a) shows the detection performance.

b: LINEAR FEATURE DETECTION OF CHARGING PORT BASED ON HOUGH LINE
The basic idea of Hough's straight line algorithm [32] is as follows: Transform between rectangular coordinates and polar coordinates. Map straight lines through points, manipulate all pixels, the intersection of polar coordinate curves is the detected possible straight line. The specific operations are given below: which can be transformed as In (2) and (3), ρ is the distance from the coordinate origin to the straight line, θ is the angle between the vertical line from the coordinate origin to the straight line and the X axis, and x, y are the positions of each pixel on the image.  For each point (x, y) on the image boundary, use (3) to find the ρ value corresponding to each value of θ. In the parameter space, set an accumulator s, find the unit corresponding to ρ and θ, and the unit accumulator is incremented by one. Perform these operations on all points in the rectangular coordinate system to check the value of each accumulator in the parameter space. The x and y coordinates corresponding to the highest accumulator value are the parameters of the linear equation in the rectangular coordinate system.
Based on the actual scene, this study sets the line segment distance and line angle accuracy to a single pixel. The higher the value of the linear accumulator, the longer the length of the detected line segment, and the smaller the number of detected line segments. According to the actual length of the upper line of the charging port, the accumulator is set to 100, the minimum line length is 20 pixels, and the target line has a certain width. Based on the actual width information, the maximum allowable fracture length is set to five pixels. Figure 8(b) shows the line feature recognition result.

2) COORDINATE CALCULATION OF CHARGING PORT LOCATION BASED ON ROUGH POSITIONING
The calculation principle of rough positioning is obtained according to the camera aperture imaging model, as shown in Fig. 9. The camera coordinate system is represented by O c , O is the image physical coordinate system, O i is the image pixel coordinate, O w is the world coordinate system, and the axis of the dotted line is the optical axis. The O w coordinate system is established at the intersection of the plane of the It is assumed that the rectangular area of the charging port is parallel to the camera imaging surface 0-xy, because the rough positioning does not need to calculate the charging port attitude.
In Fig. 10, the closed figure composed of a large green circle and a straight line is the charging port area under three-dimensional world coordinates. The circle diameter D w is equal to 210 mm. The closed figure composed of small green circles and straight lines is the projection of the charging port area on the imaging surface of the camera. The target point is represented by A, which is also the center point of the charging port area. Its coordinates in the O w coordinate system are (X , Y , 0). The projection point of the target point on the imaging surface of the camera is given by a. Its coordinates in the O i and O coordinate systems are (u, v) and a(x, y), respectively. The distance between the O w and O c coordinate systems is equal to D z . As the postures of the O w and O c coordinate systems are the same, the threedimensional coordinates of the target point A in the latter coordinate system is (X , Y , D Z ), which is the result of rough positioning. Using the principle of similar triangles, we can get: where X and Y are the actual spatial positions of the target point relative to the camera. The position of the target point in the image is represented by x, y, D w is the size of the target circular feature, and D i is the size of the pixel occupied by the circular feature. The camera resolution used by the automatic charging system is 1292 × 964, which means that the origin of the O coordinate system is given by (646, 482) in the O i coordinate system. Thus, the relationship between O i and O coordinates is as follows: The distance D from the origin of O w to the point A is given by the Pythagorean theorem as The pixel size of the camera is 3.75 µm×3.75 µm, therefore, the distance d from point a to the origin of the O coordinate system is given by Using the principle of similar triangles, the distance D z between O w and O c coordinate systems, which is in fact the distance between the camera and the charging port is as follows: where f is the focal length of the camera. In summary, the coordinate value of target point A in the O c coordinate system is derived, which is the final result of rough positioning: Using (9), the rough charging port position information can be calculated. The calculated position can guide the end of the robot to move to the camera focal length position, and provide a guarantee for precise positioning of the charging port.

F. PRECISE POSITIONING OF CHARGING PORT POSE 1) OVAL FEATURE RECOGNITION OF CHARGING PORT
Precise positioning is based on the roughly positioned recognition area, which is processed using Gaussian filtering. In order to detect further feature information, this research uses the Canny operator to extract the contour information of the original and gradient images, as shown in Figs. 12(c) and (b). Finding all circumscribed rectangles of the contour information of the two images, the irrelevant information is filtered out according to the aspect ratio of the circumscribed rectangles. The contour information with aspect ratios between 1 and 1.2 is retained, and then the QCS method is used to fit an ellipse to the contour information. Finally, the misidentified ellipse is screened out based on the ellipse position information and the ratio of length to short diameter.
In this study, the QCS method [33] is used to fit the ellipse features. The points on the ellipse can be expressed by quadratic polynomials in the plane coordinate system. Following are the steps for obtaining the standard curve equation. First, the coordinates of the plane coordinate system are fitted to determine the coefficients of the quadratic curve equation in the plane coordinate system. Then, the quadratic mixed multiplication term and the first-order term are eliminated through translation and rotation between the coordinate systems. Last, the standard curve equation is obtained. The parameters of the ellipse can be determined using the curve equation in the coordinate system.
Suppose the coordinates of n points observed on the quadratic curve on the plane are given as (x i , y i ) = M i (i = 1, 2, · · · , n). The quadratic curve equation can be expressed as follows: where a 1 , a 2 · · · a 5 are the undetermined coefficients. After normalization, (10) can be expressed as where a 1 , a 2 , · · · a 5 are the normalized undetermined coefficients. The error equation listed in (11) is as follows: The initial value of parameters a 1 , a 2 , · · · a 5 are set to 0. The error equations of all measurement points are listed and solved to obtain the absolute values of the parameters. The iterations continue until the curve equation coefficients are obtained. The geometric characteristic parameters of the standardized ellipse can be expressed as The fitting performance is shown in Figs. 11(e) and (f). Combining the contour information of the two, in this study, ellipses with ratios between 1 and 1.2 were selected based on the ratios of the lengths to the short diameters. The interference circle is removed according to the relative position. Finally, the actual effective feature circle is obtained, and the average of the center coordinates of the ellipse near the same feature point is calculated as the target center point of the feature point. Figure 11 shows the specific identification process.

2) SOLVING THE POSE OF THE CHARGING PORT
The PNP is a method to obtain the pose from the mapping relationship of 3D to 2D points. Knowing the real coordinates of N spatial points in the world coordinate system and the projection of the corresponding spatial points on the image, the pose of the camera can be calculated, namely the There are many ways to solve the PNP problems, and different methods use different number of feature points. As there are multiple characteristic points in the charging port, the automatic charging system uses the direct linear transform (DLT) [34] method to solve the pose of the charging port.
The principle of DLT algorithm is as follows: The coordinates of a point P in the charging port image and the feature point on the imaging plane are given by P = (X , Y , Z , 1) T and x 1 = (µ 1 , v 1 , 1) T , respectively. At this time, the position t(x, y, z) and attitude R(Rx, Ry, Rz) of the camera are unknown. Both R and T are defined as 3 × 4 matrices, which contain translation and rotation information, respectively, as shown in (14).
Eliminate s with the last line to get two constraints, shown in (15) as follows: (15) To simplify the representation, the row vector T is defined as Therefore, the two constraints can be rewritten as follows: The characteristic points of each charging port can be given by the two constraint equations in (17). We can obtain the following system of equations when the number of characteristic points of charging port is equal to N : It can be noted from (18) that with this method, at least six characteristic points of the charging port are needed to complete the pose calculation of the charging port.

A. ROUGH POSITIONING TEST
Rough positioning is mainly divided into two stages: charging port identification and spatial coordinate positioning. In the former, the recognition is considered as precise and not affecting the precise positioning when the difference between the center of the recognized charging port and the actual center pixel is less than one-sixth of the circle radius. The position of the charging port is based on the actual location information. The difference between actual location and the recognized position is the basis for determining the positioning accuracy [21]. The recognition conditions of nine specific scenes are shown in Fig. 12, and the recognition accuracy is shown in Table 3.  It can be concluded from Table 3 that in rough positioning, the recognition accuracies of indoor conditions, outdoor cloudy days and evenings are almost identical. The average recognition accuracy is about 99.1%. The recognition performance in the morning and noon on sunny days is poor, with an average recognition accuracy of 93.5%. The overall average recognition accuracy is 96.3%. Therefore, it can be gathered that the charging port recognition under strong light has a greater impact, and the recognition accuracy of the charging port is higher under weak light. The main reason for this behavior is that under low light, the light source of the charging port mainly comes from the built-in fill light, which is stable. Under strong light, the sunlight affects the illumination from the built-in fill light, which affects the recognition performance.

B. ROUGH POSITIONING TEST
In this study, the difference between the actual and recognized poses is the criterion for judging the precise positioning accuracy [21]. In the data collection content of the second part, the actual relative position and attitude of the charging port relative to the camera are acquired. The recognized posture is obtained by the algorithm in this article. Figure 13 shows the recognition performance in different scenarios, and Table 4 shows the specific recognition accuracy.
It can be concluded from Table 4 Table 5.
Based on the above test environment, the recognition algorithm described in this study is used for positioning, and the aubo-i10 robot with six degrees of freedom is used for insertion.
For rough positioning, the successful recognition rate for all indoor scenes, outdoor cloudy days and night are 98.3%. The successful recognition rate of outdoor sunny days (A.M., noon and P.M.) environment are 92.8%. The average successful recognition rate is 95.6%. For precise positioning, the success rate under both all indoor scenes and night is 97.8%. Under outdoor cloudy day (morning, noon and afternoon) and outdoor sunny days (A.M., noon and P.M.) environments, the success rates of insertion are 94.4% and 92.2%, respectively. The average success rate of insertion is 94.8%.

IV. DISCUSSION
In the insertion experiment of electric vehicle charging port, there are three main error sources affecting the positioning accuracy and leading to insertion failure.

A. FEATURE POINT IDENTIFICATION AND FITTING RELATED ERRORS
This study uses the contour information from the original image and the gradient map to increase the number of features for contour detection, as shown in Fig. 11. However, the detection performance still suffers from errors. The main error is related to the ellipse recognition, specifically: edge detection of charging port features, ellipse fitting method, and varying degrees of abrasion and deformation during the process of using the charging port, which cause a relatively large error. A detailed analysis of the error is as follows.
The Canny operator is used to set the high and low thresholds for edge detection. If the threshold is set too low, it is easy to detect excessive contour information. If the threshold is set too high, it is easy to lose part of the contour information under uneven illumination, especially in the outdoor strong light scene environment. As shown in Fig. 14, under indoor and outdoor conditions, the indoor scattered light B and the supplementary light C are the light sources of the charging port. At night, the supplementary light C is the main light source. The light of the charging port is relatively uniform, and in outdoor sunny days, direct sunlight A is the main light source of the charging port. The brightness of the supplementary light and the surrounding scattered light can be ignored.
A large angle between the optical axis of the sun and the axis of the charging port causes uneven illumination of the charging port, forming an internal shadow. The brightness of the outer and inner charging columns is high and low, respectively, and the brightness of the same charging column will also be significantly different, as shown in Fig. 15. This difference causes high recognition uncertainty, which is also the main reason for low recognition accuracy in outdoor sunny days.
The QCS is used for ellipse fitting, which mainly uses the principle of polynomial fitting, translation and rotation   between coordinate systems to obtain ellipse parameters. This method is simple and easy to calculate, but results in fitting data loss, which causes ellipse fitting deviation.
In terms of the wear and deformation of the charging port, the charging port will undergo different degrees of wear and deformation during use. As shown in Fig. 16, this situation will affect the edge detection and ellipse fitting results. The PNP algorithm is used for three-dimensional mapping. It is necessary to establish a mapping relationship between two-dimensional and three-dimensional points. As the relative positional relationship of the three-dimensional point space changes, it directly causes error in the solution given by the PNP algorithm, leading to positioning error of the charging port.

B. CAMERA RELATED ERRORS
Both the camera and hand-eye calibration methods will affect the overall camera calibration accuracy, consequently affecting the positioning accuracy. It is especially possible for uncertainty errors to be introduced in the hand-eye calibration process. When a large impact is encountered, it will cause errors due to the micro-movement of the camera and the tip of the gun. This error is generally large and occurs during the test. The camera resolution will also affect the recognition accuracy. The higher the resolution, the higher the recognition accuracy, and vice versa. When the camera is at a non-focal distance, the image is blurred that will cause difficulty in contour recognition. Future research can focus on mitigating the image deblurring under non-focal distance recognition accuracy.

C. ROBOT ERROR
The robot used in the experiment is the AUBO-i10 robot produced by AUBO. The repeated positioning error of the robot is 0.05 mm. During the insertion process, disturbance of the base and articulated arm due to the excessive insertion and extraction forces will also cause uncertainty errors.
Therefore, in charging port identification and positioning, the main error is the identification of the characteristic points of the charging port, which is the main optimization objective in the later stage.

V. CONCLUSION
In this study, a complete recognition system of electric vehicle fast charging port was designed and applied to an automatic charging scene of electric vehicle. The recognition process combined Hough circle and Hough line to obtain the position information of charging port. More effective contour information could be obtained using the image contour information obtained under the fusion of original and gradient images, which improved the recognition accuracy. The QCS method was used to fit the internal contour of the charging port and eliminate the misjudged ellipse. Finally, the PNP algorithm was used to obtain the three-dimensional pose. The robot attitude was adjusted according to the pose information of the charging port to complete the insertion process.
The precision positioning was mainly divided into three situations according to the recognition rates in different scenarios. The indoor (sunny, cloudy or night) test gave the best results, followed by the outdoor cloudy environment and the outdoor sunny day at noon. The average displacement and angle accuracy (X, Y, Z, RX, RY, RZ) are 0.60 mm, 0.83 mm, 1.23 mm, 1.19 degrees, 0.97 degrees, and 0.50 degrees, respectively. The overall average success rate was 94.8%.
Further research will focus on optimizing the recognition algorithm to improve the feature point recognition accuracy. Furthermore, to deal with the recognition error caused by the specificity of the charging port, a more effective false circle screening method will be proposed. His current research interests include computer vision and cable-driven snake arm robot for aeroengine.
SHICHUN DI received the B.S. degree in mechanical engineering from the Dalian Railway Institute (now Dalian Jiaotong University), Dalian, China, in 1986, and the M.S. and Ph.D. degrees in mechanical engineering from the Harbin Institute of Technology, Harbin, China, in 1989 and 1995, respectively.
He is currently a Professor and Ph.D. Supervisor with the School of Mechatronics Engineering, Harbin Institute of Technology. He has successively presided over and undertook key projects of the National Natural Science Foundation, 863 key projects, a number of provincial and ministerial-level key projects, and a number of international cooperation projects. With his efforts, EDM high-speed compound milling technology has been successfully applied in the production of aerospace key parts, robot technology, and large area micro-arc oxidation treatment. His current research interests focus on robotics, automatic charging robot, and intelligent three-dimensional garage.
Prof. Di has been the Vice-Chairman of Electrical Machining Branch of Chinese Mechanical Engineering Society.