This application claims the benefit of China Patent Application No. 202111445414.1 filed Nov. 30, 2021, the entire contents of which are incorporated herein by reference in its entirety.
The disclosure relates to a method and system for detecting a parking state of a vehicle in a battery swap platform, and a battery swap platform including such a system.
At present, there are two main modes of energy supply for an electric vehicle: vehicle charging and battery swap (i.e., battery replacement). The vehicle charging mode can be divided into alternating current slow charging and direct current fast charging, where time required for the alternating current slow charging is long and is limited by a parking lot. In addition, although the direct current fast charging has high power and short charging time, it has a large impact on a grid and also reduces service life of the battery. On the contrary, the battery swap mode can reduce damage to battery life while providing rapid energy supply for the electric vehicle. In addition, the battery swap mode can implement “peak shaving and energy storage” of the power load of the grid, and therefore improve the comprehensive utilization efficiency of power devices.
During battery swapping, a special device is generally required to remove the discharged battery from a vehicle chassis and then reinstall a new or fully charged battery. Such a battery swap platform is generally set to be automatic or semi-automatic, and before performing the battery swapping, the electric vehicle needs to be accurately parked in a preset position of the battery swap platform, which is particularly important especially in the case of automatic battery swapping. An automatic detection of a parking state of a vehicle in the battery swap platform can not only prevent a misoperation on the vehicle, but also reduce operating costs of the battery swapping.
An objective of the disclosure is to prevent a misoperation performed on a vehicle when the vehicle is battery swapped and therefore reduce battery swapping time.
In addition, the disclosure also aims to solve or alleviate other technical problems existing in the prior art.
In order to solve the above technical problems, a task proposed according to an aspect of the disclosure is to provide a method for detecting a parking state of a vehicle in a battery swap platform.
According to an aspect of the disclosure, there is provided a method for detecting a parking state of a vehicle in a battery swap platform, including the following steps:
a) using a panoramic camera apparatus to obtain an image of the battery swap platform, where the vehicle is parked on the battery swap platform;
b) inputting the image into a model, where the model is constructed based on a plurality of sets of training data including a sample image and labeling information, and the labeling information depicts whether the vehicle reaches a preset position of the battery swap platform in the sample image; and
c) processing the image based on the model to determine whether the vehicle is parked in the preset position of the battery swap platform.
According to the method for detecting a parking state of a vehicle in a battery swap platform proposed in the aspect of the disclosure, a calibration image is constructed to detect whether there is imaging deformation in the panoramic camera apparatus, and the calibration image is based on a source image of the battery swap platform that is obtained when the vehicle is not parked and a stroke image of a wheel fixing apparatus of the battery swap platform.
According to the method for detecting a parking state of a vehicle in a battery swap platform proposed in the aspect of the disclosure, the stroke image is converted into an RGB image and a grayscale image, and the calibration image is constructed based on the RGB image and a normalized grayscale image of the grayscale image, where a numerical value of the normalized grayscale image is 0 or 1.
According to the method for detecting a parking state of a vehicle in a battery swap platform proposed in the aspect of the disclosure, when the training data is constructed, ROI processing is performed on the image of the battery swap platform that is obtained by the panoramic camera apparatus, to obtain the sample image, where a height and/or a width of the sample image has a deviation in accordance with a normal distribution with respect to a preset value.
According to the method for detecting a parking state of a vehicle in a battery swap platform proposed in the aspect of the disclosure, whether a central area of a wheel reaches a preset position of a wheel fixing apparatus of the battery swap platform in the sample image is determined to obtain the labeling information assigned to the sample image.
According to the method for detecting a parking state of a vehicle in a battery swap platform proposed in the aspect of the disclosure, the wheel fixing apparatus is constructed as a V-shaped roller chute, and whether a projection of the central area of the wheel is located on a central axis of the V-shaped roller chute is determined, or whether the central area of the wheel is located between two vertical contact normals is determined, where the two vertical contact normals respectively pass through two end tangent points of the wheel and the V-shaped roller chute in the sample image, to obtain the labeling information assigned to the sample image.
According to the method for detecting a parking state of a vehicle in a battery swap platform proposed in the aspect of the disclosure, the model is constructed based on a convolutional neural network model, and the model has an input layer, a hidden layer including a feature filtering module and a Canoe module, and an output layer, where the model is based on a Fish activation function:
According to the method for detecting a parking state of a vehicle in a battery swap platform proposed in the aspect of the disclosure, the Canoe module includes a Reshape layer, a convolutional layer, a Sigmoid layer, a flatten layer, and a fully connected layer, where a format of an image from the input layer is converted from NHWC to N1W (HC) based on the Reshape layer.
In addition, according to another aspect of the disclosure, there is provided a system for detecting a parking state of a vehicle, the system being enabled to be used in a battery swap platform, and including:
a panoramic camera apparatus enabled to be arranged at the battery swap platform and configured to obtain an image of the battery swap platform, where the battery swap platform is configured to park the vehicle;
a determining apparatus connected to the panoramic camera apparatus and configured to process the image from the panoramic camera apparatus based on a model and determine whether the vehicle is parked in a preset position of the battery swap platform, where the model is constructed based on a plurality of sets of training data including a sample image and labeling information, and the labeling information depicts whether the vehicle reaches a preset position of the battery swap platform in the sample image; and
a triggering apparatus arranged in the battery swap platform and connected to the determining apparatus and configured to trigger or stop a battery swapping process of the vehicle based on a determining result of the determining apparatus.
According to the system provided in the another aspect of the disclosure, the system has a calibration apparatus, and the calibration apparatus is configured to detect, based on a calibration image, whether there is imaging deformation in the panoramic camera apparatus.
According to the system provided in the another aspect of the disclosure, the calibration apparatus includes a calibration image generator configured to generate a calibration image based on a source image of the battery swap platform that is obtained when the vehicle is not parked and a stroke image of a wheel fixing apparatus of the battery swap platform. According to the system provided in the another aspect of the disclosure, the system has a preprocessing apparatus connected to the panoramic camera apparatus and configured to perform ROI processing on the image of the battery swap platform that is obtained by the panoramic camera apparatus and output the sample image, where a height and/or a width of the sample image has a deviation in accordance with a normal distribution with respect to a preset value.
According to the system provided in the another aspect of the disclosure, the system has a labeling information generator connected to the preprocessing apparatus and configured to determine whether a central area of a wheel reaches a preset position of a wheel fixing apparatus of the battery swap platform in the sample image and generate, based on the determining result, the labeling information assigned to the sample image.
According to the system provided in the another aspect of the disclosure, the wheel fixing apparatus is constructed as a V-shaped roller chute.
According to the system provided in the another aspect of the disclosure, the panoramic camera apparatus is configured as a fisheye camera.
According to the system provided in the another aspect of the disclosure, the fisheye camera is arranged such that the fisheye camera is aligned with a central area of a wheel when the vehicle is parked in the preset position of the battery swap platform.
Finally, according to another aspect of the disclosure, there is provided a battery swap platform including such a system.
The method and system for detecting a parking state of a vehicle in a battery swap platform and the battery swap platform according to the disclosure have the following benefits: The parking state of the vehicle in the battery swap platform can be automatically detected by applying the model based on deep learning, so that a misoperation on the vehicle and damage to the battery can be prevented.
The disclosure is illustrated in more detail below with reference to the accompanying drawings, in which
It can be readily understood that according to the technical solution of the disclosure, those of ordinary skill in the art may propose a plurality of interchangeable structures and implementations without changing the essential spirit of the disclosure. Therefore, the following specific embodiments and the accompanying drawings are merely exemplary descriptions of the technical solutions of the disclosure, and should not be construed as the entirety of the disclosure or construed as limiting the technical solution of the disclosure.
Directional terms, such as up, down, left, right, front, rear, front side, back side, top, and bottom, which are or may be mentioned in this description, are defined with respect to the structures shown in the accompanying drawing, and are relative concepts, and therefore may correspondingly vary depending on different positions and different conditions in use. Therefore, these or other orientation terms should not be construed as restrictive terms as well.
The battery swap platform mentioned herein should be understood as a battery swap platform or a battery swap apparatus for replacement operations of a traction battery of a vehicle, such as a stationary, movable or foldable battery swap platform or battery swap apparatus. The battery swap platform can also be understood as a building-type battery swap station separated from the outside world. In addition, the battery swap platform can further be relate to a so-called battery charging and swap platform or battery charging and swap station.
a) using a panoramic camera apparatus to obtain an image of the battery swap platform, where the vehicle is parked on the battery swap platform;
b) inputting the image into a model, where the model is constructed based on a plurality of sets of training data including a sample image and labeling information, and the labeling information depicts whether the vehicle reaches a preset position of the battery swap platform in the sample image; and
c) processing the image based on the model to determine whether the vehicle is parked in the preset position of the battery swap platform.
It should be noted that the step names mentioned above (and further be mentioned below) are merely used to distinguish between the steps and facilitate reference of the steps, and do not represent a sequence relationship between the steps, and the flowcharts including the drawings are merely examples of performing the method. Without significant conflict, the steps may be performed in various orders or simultaneously.
On the whole, the parking state of the vehicle on the battery swap platform can be visually determined directly based on a trained model, thereby avoiding a misoperation during an automatic or semi-automatic battery swapping process, for example, the battery swapping is started before the vehicle is parked or the battery swapping is started when the vehicle is not in a stopped state, and thus the time required for the battery swapping process can be reduced.
In step a), compared to a local image of the vehicle and the battery swap platform that is obtained by using a common method, the panoramic camera apparatus is used to obtain a panoramic image of the battery swap platform and the vehicle parked thereon, so that not only an overall grasp of a vehicle state (for example, a confirmation of the front and rear orientation of the vehicle) can be obtained, a relationship between the vehicle and the surroundings can also be obtained intuitively, which provides possibility of interaction with the battery swap platform, in particular with the main control system of the battery swap station. In addition, only one panoramic camera apparatus may be provided in step a), which makes it substantially unnecessary to change original hardware facilities of the battery swap platform. Herein, the panoramic camera apparatus can be configured as, but not limited to, a fisheye camera, and the panoramic camera apparatus further includes, for example, a camera apparatus in the form of a wide-angle lens or another camera apparatus that may obtain panoramic images.
Next, the model used in step b) is explained in more detail. Herein, a trained model can be understood as any one of models based on deep learning or machine learning, such as a neural network model, in particular a convolutional neural network model (CNN model for short) or a recurrent neural network model (RCNN model for short). Herein, the convolutional neural network model can be implemented, for example, in the form of VGGNet, GoogleNet, ResNet, DenseNet, LeNet, or the like.
It is known that before starting an actual detection process, the model to be used needs to be pre-trained by using a plurality of sets of training data, that is, the model is trained by using a combination of a plurality of sample images and labeling information assigned thereto. Optionally, according to the method, before training image data is collected, the panoramic camera apparatus to be used is first calibrated to determine whether there is imaging deformation therein, which can improve the efficiency of training and learning and thus improve the efficiency of a subsequent detection process, and the imaging deformation is caused by, for example, a change in an installation position of a camera. The calibration process can also take place after model building or before starting the detection.
According to the method, the actual image of the battery swap platform that is obtained when the vehicle is not parked is compared with the established calibration image, so that whether there is imaging deformation in the panoramic camera apparatus can be inferred. The calibration image Ij is constructed based on a source image Is of the battery swap platform that is obtained at a time point when the vehicle is not parked on the battery swap platform and the panoramic camera apparatus is in a correct mounting position and a stroke image I of a wheel fixing apparatus of the battery swap platform. The stroke image I of the wheel fixing apparatus is saved as a layer, in particular as a PNG image. For example, the stroke image I can be divided into a three-channel RGB image Ic and a one-channel (i.e., Alpha channel) grayscale image Im. Correspondingly, the number of channels of the source image Is is, for example, 4. The source image is, for example, a PNG image. Only the RGB channels of the source image are used when the calibration image is constructed, and certainly, the number of channels of the source image can alternatively be set to 3, for example, the source image is in a format of JPG or BMP. Herein, the source image Is, the RGB image Ic and the grayscale image Im of the stroke image I have the same width and height. Therefore, the construction of the calibration image can include the following steps:
Based on this, the construction of the calibration image can also be represented by the following formula:
It should be noted that the construction of the calibration image is not limited to the method mentioned above, but can also be implemented in other manners, for example, it is also feasible that the calibration image is a predetermined calibration image. The calibration image is constructed, so that it is ensured that an impact caused by imaging deformation due to internal and external reasons during future use of the panoramic camera apparatus can be prevented, thereby preventing a determining error, and improving maintainability thereof.
For example, when the panoramic camera apparatus is configured as a fisheye camera, the calibration image constructed according to the above method can be shown in
The construction of the training data includes construction of the sample image and generation of the labeling information, where the image collection for constructing the sample image includes: the image collection performed before model building (which can also be referred to as a primary image collection stage) and the image collection performed after the model building (which can also be referred to as an iterative image collection stage). In the primary image collection stage, image data entering a collection range is recorded, and a recorded video file is saved every other frame. However, in the iterative image collection stage, the recorded image is screened and arithmetic reasoning is performed by using the constructed model, and an image within a preset range is output. Herein, in the iterative data collection stage, the efficiency of screening image data by using the model is increasingly higher with the passage of time and the improvement of the model, and the generated image is increasingly targeted, so that performance of the model and prediction accuracy can be gradually improved.
Considering a size of a panoramic image and requirements for input parameters of the model, ROI (Region of Interest) processing is required for the collected image before the collected image is input into the model, for example, a region of interest in a specified format is cut from an image screened during a training process. Herein, the region of interest is located at the center of the image and its format is represented as HWC, for example, an image with a size of 256×512×3, where H represents the image height (in the unit of the number of pixels), W represents the image width (in the unit of the number of pixels), and C represents the number of channels. According to the method, in order to increase robustness of the training data and simulate a tolerance generated during actual batch installation, the obtained region of interest can have a certain deviation from a preset value (such as the width and height mentioned above) of a specified format, and randomness of the deviation is in accordance with a normal distribution. Specifically, the obtained region of interest has a random deviation in the width direction (which can also be referred to as the x axis of the image coordinate system) and the height direction (which can also be referred to as the y axis of the image coordinate system) with respect to the original size. For example, the obtained region of interest can have a random deviation of 2%, where the median value is μ=0, the variance in the x axis direction is σx=2.25, and the variance in the y axis direction is σy=3.37. The image obtained after being subjected to the ROI processing is used as the sample image for a subsequent labeling process and model training. In addition, the ROI processing process mentioned herein can alternatively be performed when the actual detection process is started, that is, before step b), the ROI processing is performed on the image obtained in step a).
Then, the collected sample image can be labeled by using a binary classifier; if a wheel reaches the preset position of the battery swap platform, labeling information “1” is given; otherwise labeling information “0” is given; and the labeling process can be completed by using a commonly used binary classifier.
Optionally, according to the method, if the central area of the wheel reaches the preset position of the wheel fixing apparatus of the battery swap platform in the collected sample image, the labeling information “1” is given; otherwise the labeling information “0” is given. Optionally, the wheel fixing apparatus can be optionally constructed as a V-shaped roller chute, as shown in
In addition, according to the method, an output image for the collected sample image is obtained by generating an image and a mask tensor through a drawing function in a manner similar to that used to construct the calibration image, to simplify an image labeling process. The output image includes a contact tangent of the wheel to the V-shaped roller chute and contact normals perpendicular to the V-shaped roller chute, in particular vertical contact normals in the image, where the contact tangent and the contact normals are determined by two end tangent points of the wheel and the V-shaped roller chute. More specifically, the end tangent points are intersection points of the wheel and the boundary lines of the V-shaped roller chute, and can be imaginary or actually existing end tangent points. As shown in
In contrast, as shown in
In addition, when the vehicle does not fully reach into contact with the V-shaped roller chute, that is, when there is only one real end tangent point, the contact tangent passes through the end tangent point and is perpendicular to the central axis of the V-shaped roller chute, and the two contact normals separately pass through the real end tangent point and the imaginary end tangent point determined by the contact tangent. In this case, if the central area of the wheel is located between the two contact normals, the labeling information “1” is given, otherwise, the labeling information “0” is given.
The labeling information obtained by using the above method can be saved as a labeling file, for example, in the form of LBL, and form the plurality of sets of training data together with the corresponding sample image mentioned above, and the plurality of sets of training data can also be referred to as a training data set. It should be noted that pre-labeling of the sample image is not limited to the method mentioned above.
As mentioned above, the model used in the method can be constructed in the form of a convolutional neural network model having an input layer, a hidden layer, and an output layer, where the hidden layer includes a feature filtering module and a Canoe module, as shown in
where x is a feature matrix of the image.
As shown in
In addition, certainly, other types of activation functions can alternatively be employed under the condition of ensuring the required calculation speed and accuracy.
In addition, the feature filtering module can be implemented by a graphics processing unit (GPU), a general purpose processor (GPP), or the like. For example, in an implementation shown in
According to the method, the Canoe module includes the following:
and the transformation function of the Sigmoid is:
format is eventually converted into a
format;
In the output layer, a determining result is output as a probability value by using Softmax function, and a Softmax Cross Entropy loss is used. In addition, “1” or “0” can also be directly output in the output layer to indicate whether the vehicle is correctly parked on the battery swap platform, or other manners are also feasible.
The disclosure further includes a system 100 for detecting a parking state of a vehicle in a battery swap platform, as shown in a block diagram in
a panoramic camera apparatus 110 provided at the battery swap platform and configured to obtain an image of the battery swap platform, where the battery swap platform is configured to park a vehicle;
a determining apparatus 120 connected to the panoramic camera apparatus 110 in a signal transmitting manner and configured to determine whether the vehicle is parked in a preset position of the battery swap platform in the image from the panoramic camera apparatus 110 and output a determining result in the form of a signal; and
a triggering apparatus 130 arranged in or at the battery swap platform and connected to the determining apparatus 120 to directly or indirectly trigger or stop a battery swapping process of the vehicle based on the signal sent by the determining apparatus 120.
Based on the signal output by the determining apparatus 120, the triggering apparatus 130 can directly or indirectly control the battery swapping process. For example, in a fully automated battery swap platform, the triggering apparatus can automatically activate or deactivate the apparatus connected thereto for implementing the battery swapping process, thus avoiding misoperation performed on the vehicle when the vehicle is not accurately parked, to avoid damage to the battery. The triggering apparatus 130 can be configured as a switch for switching on or off an apparatus for implementing a battery swapping operation or as an alarm or another similar apparatus for giving a visual or audible alarm to a worker in a semi-automated battery swap platform.
In addition, the panoramic camera apparatus 110 can optionally be configured as a fisheye camera, as explained in the method according to the disclosure, the fisheye camera can be arranged beside the battery swap platform and can obtain an image of the battery swap platform, and a vehicle with a battery to be swapped is parked on the battery swap platform, which is explained in more detail below with reference to
According to disclosure, the fisheye camera 110 is arranged such that it can be aligned with the central area of the wheel and can display the wheel and/or the wheel fixing apparatus of the battery swap platform accurately and substantially without distortion in the center area of a picture that it takes. Further, the system can further include two or more panoramic camera apparatus, which can be arranged at two sides of the battery swap platform, for example, each wheel can be assigned a fisheye camera for improving the accuracy of the system. In the embodiment shown in
Optionally, the system 100 further includes a calibration apparatus 140 configured to detect, based on a calibration image, whether there is imaging deformation in the panoramic camera apparatus 110, and the imaging deformation can be caused by a change in the position of the panoramic camera apparatus. Optionally, the calibration apparatus 140 further includes a calibration image generator 141 configured to generate a calibration image or have a calibration image stored thereon, and for the calibration image, reference is made to the explanations of the method according to the disclosure given above.
Optionally, the system 100 can further have a preprocessing apparatus 150 connected to the panoramic camera apparatus 110, and the preprocessing apparatus is configured to cut an image of a specified size from an image from the panoramic camera apparatus. For example, during construction of a sample image, ROI processing can be performed on the collected image and the sample image can be output. In addition, during detection, the collected image can be cut into an image of a specified size to be output to the determining apparatus 120. For this, reference is made to the explanations of the method according to the disclosure given above.
Optionally, the system 100 can further include a labeling information generator 160 connected to the preprocessing apparatus 150 and configured to determine whether a central area of a wheel reaches a preset position of a wheel fixing apparatus of the battery swap platform in the input sample image and generate corresponding labeling information based on the determining result, and input the labeling information into the determining apparatus 120.
Optionally, the labeling information generator 160 is configured to determine whether a projection of the central area of the wheel is on a central axis of the V-shaped roller chute, or configured to determine whether the central area of the wheel is located between two vertical contact normals, where the two vertical contact normals respectively pass through two end tangent points of the wheel and the V-shaped roller chute in the sample image, and the labeling information assigned to the sample image is generated based on the determining result. For this, reference is made to the explanations of the method according to the disclosure given above.
Optionally, the determining apparatus 120 includes a processor 121 on which a model is stored, where the model is constructed based on a convolutional neural network model, and the model has an input layer, a hidden layer including a feature filtering module and a Canoe module, and an output layer. For this, reference is made to the explanations of the method according to the disclosure given above.
Finally, the disclosure further relates to a battery swap platform including such a system that can be connected to or integrated into a main control system of the battery swap platform.
In general, the disclosure has the following advantages over the previous/prior art:
1. A low-cost camera may be selected as a data collection source for a panoramic camera apparatus.
2. Installation is simple, and after the installation, algorithm empowerment can be obtained by deploying an algorithm model.
3. A deep convolutional neural network may be used to construct a model to implement a computer vision determination, without positioning an observation element, and a direct input into an overall determination algorithm logic is implemented, so that accurate positioning information of a vehicle may be obtained.
4. There is no strong dependence on involved hardware facilities, and as long as algorithm development and data collection standards described subsequently are met, training, development, and implementation of a model may be implemented.
5. The model may be upgraded according to actual operational conditions to obtain higher quality.
6. Installation is flexible, and in an actual scenario, a determination may be completed by performing installation only at one position. For a scenario where higher accuracy is required, a plurality of sensor groups may be installed at a time and assigned algorithms, and a more reliable determination output may be obtained by means of a voting mode.
7. High accuracy, high reliability, and compatibility with a plurality of data forms, including but not limited to (a color image, an infrared image, a scanning image, a point cloud image, etc.) may be implemented.
8. Less changes are made to the hardware structure, and the operability is great, which is suitable for batch application in a large-scale scenario.
It should be understood that all of the above preferred embodiments are exemplary rather than limiting, and any modification or variation made by those skilled in the art to the specific embodiments described above without departing from the concept of the disclosure shall fall within the scope of legal protection of the disclosure.
Number | Date | Country | Kind |
---|---|---|---|
202111445414.1 | Nov 2021 | CN | national |