Method for automatically calibrating pixel ratio by calculating geometric parameters of contact network
1. A method for automatically calibrating a pixel ratio by calculating geometrical parameters of a contact network is characterized by comprising the following steps:
identifying the characteristic points, selecting a plurality of fixed characteristic points, identifying the characteristic points through an identification device, and calculating to obtain a pixel ratio according to structural parameters given by a pantograph manufacturer or the actual distance of the manually and accurately measured characteristic points;
deep learning training, namely acquiring identification characteristic points aiming at a complex background and different pantograph models in the running process of a vehicle, automatically identifying and training the characteristic points, and constructing an identification model;
and automatic parameter correction, namely automatically identifying the characteristic points according to a set period, simultaneously calculating a pixel ratio, performing mean square error correction on the calculated pixel ratio and the previous pixel ratio, and writing the mean square error correction into a system parameter table.
2. The method for calculating the automatic calibration pixel ratio of the geometric parameters of the overhead line system according to claim 1, wherein the feature points are identified by an identification device, and sample training is performed in advance before the identification device leaves a factory to achieve the identification capability of the basic feature points.
3. The method for calculating the automatic calibration pixel ratio of the geometric parameters of the overhead line system as claimed in claim 1, wherein the identification device is installed before the identification position to measure the actual distance value of the feature point in advance, set as L0, and write into the system configuration parameter table.
4. The method for automatically calibrating the pixel ratio in the geometric parameter calculation of the overhead line system of claim 1, wherein the identification device detects the characteristic point in the initial state of power-on start, calculates the initial value of the pixel ratio as P0, and writes the initial value into a system parameter table.
5. The method for automatically calibrating the pixel ratio in the geometric parameter calculation of the overhead line system as claimed in claim 4, wherein the initial value of the pixel ratio is the ratio between the value identified by the initial feature point and the actual measurement result, the feature points are point1 and point2, the pixel coordinates are (x1, y1) and (x2, y2), and the distance between the two actually measured feature points is L0;
the subsequent pixel ratio P1-Pn is calculated by the same method as the initial pixel ratio P0.
6. The method for automatically calibrating the pixel ratio in catenary geometric parameter calculation according to claim 4, wherein after the initial pixel ratio value P0 is calculated, the geometric parameters are calculated according to the initial pixel ratio value, and the geometric parameters are used for pantograph state identification, real-time alarm and defect analysis.
7. The method for calculating the automatic calibration pixel ratio of the geometric parameters of the overhead line system according to claim 1, wherein the recognition model improves the recognition degree through automatic training in the actual sample training and sampling processes, and the actual recognition result is continuously substituted into the recognition model to continuously optimize and update.
8. The method for calculating the automatic calibration pixel ratio of the geometric parameters of the overhead line system according to claim 1, wherein the automatic parameter correction adopts an iterative updating mode, the pixel ratio parameter of 30 days before each time is taken to perform mean square error calculation to calculate the error range, and the calculation formula is as follows:
in the formula, q is a first error value, and P' is a pixel ratio of 30 days in history.
9. The method for calculating the automatic calibration pixel ratio of the geometric parameters of the overhead line system according to claim 8, wherein after the first error value q is calculated, the mean square error of the pixel ratio parameters obtained on the same day is calculated to obtain the error value Qn of the current measurement point, and the calculation formula is as follows:
in the formula, Qn is the error value of the current measurement point, Pn is the pixel ratio of the current measurement point, whenWhen the Pn parameter is valid, the Pn parameter is replaced by P0 in a mean value mode, and the calculation process is as follows:
Background
Most of domestic vehicle-mounted contact network monitoring device manufacturers use a fixed calibration tool to calibrate a final pixel ratio by means of a heating resistor or other special marks before calculating the geometric parameters of the contact network; when the device is installed, a specially-made calibration tool is fixed at the position of a pantograph of the car roof, the position of the mark is adjusted or the pixel ratio is calculated in a multi-point acquisition mode.
The calibration tool needs to be fixed at the pantograph of the car roof for measurement, operation needs to be carried out on the car roof during installation, potential safety hazards are large in the calibration process, periodic repeated calibration needs to be carried out in the system operation process to guarantee the measurement accuracy of geometric parameters, and meanwhile, the maintenance cost is increased for a vehicle operation unit.
Disclosure of Invention
Therefore, the invention provides a method for automatically calibrating a pixel ratio by calculating geometrical parameters of a contact network, and aims to solve the problems of low precision and high cost of the existing geometric parameter calibration of the contact network.
In order to achieve the above purpose, the invention provides the following technical scheme:
the invention discloses a method for calculating geometric parameters of a contact network and automatically calibrating a pixel ratio, which comprises the following steps:
identifying the characteristic points, selecting a plurality of fixed characteristic points, identifying the characteristic points through an identification device, and calculating to obtain a pixel ratio according to structural parameters given by a pantograph manufacturer or the actual distance of the manually and accurately measured characteristic points;
deep learning training, namely acquiring identification characteristic points aiming at a complex background and different pantograph models in the running process of a vehicle, automatically identifying and training the characteristic points, and constructing an identification model;
and automatic parameter correction, namely automatically identifying the characteristic points according to a set period, simultaneously calculating a pixel ratio, performing mean square error correction on the calculated pixel ratio and the previous pixel ratio, and writing the mean square error correction into a system parameter table.
Furthermore, the characteristic points are identified through an identification device, and sample training is performed in advance before the identification device leaves a factory, so that the identification capability of the basic characteristic points is achieved.
Further, the identification device is installed before the identification bit, measures the actual distance value of the feature point in advance, sets the actual distance value as L0, and writes the actual distance value into the system configuration parameter table.
Furthermore, the identification device detects the characteristic point first in the initial state of power-on start, calculates the initial value of the pixel ratio as P0, and writes the initial value into the system parameter table.
Further, the initial pixel ratio value is a ratio between the value identified by the initial feature point and the actual measurement result, the feature points are point1 and point2, the pixel coordinates are (x1, y1) and (x2, y2), and the distance between the two actually measured feature points is L0;
the subsequent pixel ratio P1-Pn is calculated by the same method as the initial pixel ratio P0.
Further, after the pixel ratio initial value P0 is calculated, geometric parameters are calculated through the pixel ratio initial value, and the geometric parameters are used for identifying the state of the pantograph, giving an alarm in real time and analyzing defects.
Furthermore, the recognition model improves the recognition degree through automatic training in the actual sample training and sampling processes, and the actual recognition result is continuously substituted into the recognition model to continuously optimize and update.
Further, the automatic parameter correction adopts an iterative updating mode, the mean square error of the pixel ratio parameter of the previous 30 days is taken every time to calculate the error range, and the calculation formula is as follows:
in the formula, q is a first error value, and P' is a pixel ratio of 30 days in history.
Further, after the first error value q is calculated, a mean square error calculation is performed on the pixel ratio parameter obtained on the current day to obtain a current measurement point error value Qn, and the calculation formula is as follows:
in the formula, Qn is the error value of the current measurement point, Pn is the pixel ratio of the current measurement point, whenWhen the Pn parameter is valid, the Pn parameter is replaced by P0 in a mean value mode, and the calculation process is as follows:
the invention has the following advantages:
the invention discloses a method for calculating geometric parameters of a contact network and automatically calibrating a pixel ratio, which simplifies a calibration process of a geometric parameter acquisition module of the contact network, adopts automatic calibration without manual intervention, greatly saves the product installation and debugging period, avoids safety accidents possibly occurring in the calibration process, and saves the maintenance cost because a product user does not need to calibrate periodically.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are merely exemplary, and that other embodiments can be derived from the drawings provided by those of ordinary skill in the art without inventive effort.
The structures, ratios, sizes, and the like shown in the present specification are only used for matching with the contents disclosed in the specification, so as to be understood and read by those skilled in the art, and are not used to limit the conditions that the present invention can be implemented, so that the present invention has no technical significance, and any structural modifications, changes in the ratio relationship, or adjustments of the sizes, without affecting the effects and the achievable by the present invention, should still fall within the range that the technical contents disclosed in the present invention can cover.
Fig. 1 is a flowchart of a method for calculating geometric parameters of a catenary and automatically calibrating a pixel ratio according to an embodiment of the present invention;
Detailed Description
The present invention is described in terms of particular embodiments, other advantages and features of the invention will become apparent to those skilled in the art from the following disclosure, and it is to be understood that the described embodiments are merely exemplary of the invention and that it is not intended to limit the invention to the particular embodiments disclosed. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Examples
The embodiment discloses a method for calculating geometric parameters of a contact network and automatically calibrating a pixel ratio, which comprises the following steps:
identifying the characteristic points, selecting a plurality of fixed characteristic points, identifying the characteristic points through an identification device, and calculating to obtain a pixel ratio according to structural parameters given by a pantograph manufacturer or the actual distance of the manually and accurately measured characteristic points;
deep learning training, namely acquiring identification characteristic points aiming at a complex background and different pantograph models in the running process of a vehicle, automatically identifying and training the characteristic points, and constructing an identification model;
and automatic parameter correction, namely automatically identifying the characteristic points according to a set period, simultaneously calculating a pixel ratio, performing mean square error correction on the calculated pixel ratio and the previous pixel ratio, and writing the mean square error correction into a system parameter table.
The characteristic point identification is to perform directional identification on fixed characteristic points of the pantograph, and because the form of the pantograph and the head of the pantograph are basically kept fixed in the process of train moving, a certain number of fixed characteristic points can be selected for identification, which are generally larger than two characteristic points, and then the pixel ratio is calculated according to structural parameters given by a pantograph manufacturer or the actual distance of the manually accurately measured characteristic points.
The deep learning is a method for recognizing feature points under complex backgrounds and different pantograph models in the vehicle running process, the recognition degree is improved mainly through automatic training in the actual sample training and sampling processes, and the recognition rate is higher along with the improvement of the sample training amount, so that the recognition rate of the deep learning algorithm adopted by the product can reach more than 95%. The automatic correction parameters are that the pixel ratio parameters obtained by calculation can be automatically corrected in a certain period through continuous data acquisition and measurement in the running process of the product, and the accuracy of the calculated parameters is higher along with the improvement of the recognition rate.
The characteristic points are identified through an identification device, and sample training is performed in advance before the identification device leaves a factory to achieve the identification capability of the basic characteristic points; the identification device is installed before the identification position, measures the actual distance value of the characteristic point in advance, sets the actual distance value as L0, writes the actual distance value into the system configuration parameter table, detects the characteristic point firstly under the initial state of power-on starting, calculates the initial value of the pixel ratio as P0, and writes the initial value into the system parameter table.
Setting the initial pixel ratio value as the ratio between the initial characteristic point identification value and the actual measurement result, setting the characteristic points as point1 and point2, setting the pixel coordinates as (x1, y1) and (x2, y2), normally taking two characteristic points, if the number of the characteristic points is more than 2, respectively calculating and averaging every 2 points, and actually measuring the distance between the two characteristic points as L0;
the subsequent pixel ratio P1-Pn is calculated by the same method as the initial pixel ratio P0.
And after the pixel ratio initial value P0 is calculated, calculating geometric parameters through the pixel ratio initial value, wherein the geometric parameters are used for identifying the bow net state, alarming in real time and analyzing defects.
The recognition model improves the recognition degree through automatic training in the actual sample training and sampling processes, and the actual recognition result is continuously substituted into the recognition model to continuously optimize and update. In the actual detection process, different deviations can appear, the deviations need to be corrected, the corrected parameters are substituted into the recognition model, multiple rounds of training are carried out, and the recognition accuracy is improved.
The automatic parameter correction adopts an iterative updating mode, the mean square error of the pixel ratio parameter of the previous 30 days is taken every time to calculate the error range, and the calculation formula is as follows:
in the formula, q is a first error value, and P' is a pixel ratio of 30 days in history.
After the first error value q is calculated, performing mean square error calculation on the pixel ratio parameter obtained on the current day to obtain a current measurement point error value Qn, wherein the calculation formula is as follows:
in the formula, Qn is the error value of the current measurement point, Pn is the pixel ratio of the current measurement point, when
When the Pn parameter is valid, the Pn parameter is replaced by P0 in a mean value mode, and the calculation process is as follows:
the embodiment discloses a method for automatically calibrating a pixel ratio by calculating geometrical parameters of a contact network, which simplifies a calibration process of a geometrical parameter acquisition module of the contact network, adopts automatic calibration without manual intervention, greatly saves the product installation and debugging period, avoids safety accidents possibly occurring in the calibration process, and saves the maintenance cost because a product user does not need to calibrate periodically.
Although the invention has been described in detail above with reference to a general description and specific examples, it will be apparent to one skilled in the art that modifications or improvements may be made thereto based on the invention. Accordingly, such modifications and improvements are intended to be within the scope of the invention as claimed.