CN114089350A - Distance measurement correction coefficient training method and device, distance measurement method and electrical tool - Google Patents
Distance measurement correction coefficient training method and device, distance measurement method and electrical tool Download PDFInfo
- Publication number
- CN114089350A CN114089350A CN202111385045.1A CN202111385045A CN114089350A CN 114089350 A CN114089350 A CN 114089350A CN 202111385045 A CN202111385045 A CN 202111385045A CN 114089350 A CN114089350 A CN 114089350A
- Authority
- CN
- China
- Prior art keywords
- correction coefficient
- distance
- module
- value
- charged object
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S17/00—Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
- G01S17/02—Systems using the reflection of electromagnetic waves other than radio waves
- G01S17/06—Systems determining position data of a target
- G01S17/08—Systems determining position data of a target for measuring distance only
Landscapes
- Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Radar Systems Or Details Thereof (AREA)
Abstract
The application relates to a distance measurement correction coefficient training method and device, a distance measurement method and an electrical tool. The method comprises the following steps: acquiring a correction coefficient of a distance measurement module, wherein the correction coefficient is used for correcting the relation between the induced current monitored by the distance measurement module and the electric field intensity of the position of the charged object; the distance measurement module is used for calculating the linear distance from the distance measurement module to the charged object according to the electric field intensity; acquiring an actual measurement value of the linear distance; acquiring a simulated value of the linear distance from the distance measurement module to the charged object; setting a loss function based on the actual measurement value, the simulated value and the correction coefficient; and iteratively executing the step of training the correction coefficient based on the gradient descent algorithm and the loss function until the precision of the loss function meets the preset precision requirement or the iteration number reaches the preset iteration number, and taking the trained correction coefficient as a distance measurement correction coefficient, thereby realizing more accurate measurement of the distance from the electrical tool to the charged object.
Description
Technical Field
The application relates to the field of electrician tools, in particular to a distance measurement correction coefficient training method and device, a distance measurement method and an electrician device.
Background
Electricians need assess electrician's instrument to electrified object's distance in order to guarantee the operation safety when carrying out electric power maintenance in-process, for example, when adopting the screwdriver to carry out electric power maintenance, in order to guarantee the operation personnel safety, need know the distance of screwdriver to electrified body, avoid because of the incident that the electrified body of contact leads to.
However, the modules used for distance measurement in existing electrical tools are susceptible to surrounding conductive substances, resulting in inaccurate measurements of the distance of the electrical tool to a charged object.
Disclosure of Invention
In view of the above, it is necessary to provide a distance measurement correction coefficient training method, a distance measurement correction coefficient training device, a distance measurement method, and an electrical device capable of accurately measuring a distance from an electrical tool to a charged object.
In a first aspect, the present application provides a method for training a ranging correction coefficient, where the method includes:
acquiring a correction coefficient of the distance measurement module, wherein the correction coefficient is used for correcting the relation between the induced current monitored by the distance measurement module and the electric field intensity of the position of the charged object; the distance measurement module is used for calculating the linear distance from the distance measurement module to the charged object according to the electric field intensity;
acquiring an actual measurement value of the linear distance;
acquiring a simulated value of the linear distance from the distance measuring module to the charged object;
setting a loss function based on the actual measurement value, the simulation value and the correction coefficient;
and iteratively executing the step of training the correction coefficient based on the gradient descent algorithm and the loss function until the precision of the loss function meets the preset precision requirement or the iteration frequency reaches the preset iteration frequency, and taking the trained correction coefficient as a ranging correction coefficient.
In one embodiment, the setting of the loss function based on the actual measurement value, the simulated value and the correction coefficient includes:
setting a distance translation term;
constructing a relation function between the actual measurement value and the simulation value based on the actual measurement value, the simulation value, the correction coefficient and the distance translation term;
setting a loss function based on the relationship function.
In one embodiment, the training of the correction coefficient based on the gradient descent algorithm and the loss function includes:
setting a learning rate;
calculating a gradient of the correction coefficient based on a loss function;
and updating the correction coefficient according to the learning rate and the gradient of the correction coefficient.
In one embodiment, the training of the correction coefficient based on the gradient descent algorithm and the loss function further includes:
calculating a gradient of a distance translation term based on a loss function;
updating a distance translation term according to a learning rate and a gradient of the distance translation term, and performing the step of constructing a relation function between the actual measurement value and the simulated value based on the actual measurement value, the simulated value, the correction coefficient and the distance translation term.
In a second aspect, the present application further provides a ranging method, including:
acquiring induced current of a charged object in an electric field;
calculating the electric field intensity of the position of the charged object based on the distance measurement correction coefficient obtained by the distance measurement correction coefficient training method and the induced current;
and calculating the linear distance from the ranging module to the charged object according to the electric field intensity of the position of the charged object.
In a third aspect, the present application further provides an electrical tool comprising:
a ranging module, the ranging module being configured to:
monitoring an induced current of a charged object in the electric field;
calculating the electric field intensity of the position of the charged object based on the distance measurement correction coefficient obtained by the distance measurement correction coefficient training method and the induced current;
and calculating the linear distance from the distance measuring module to the charged object according to the electric field intensity of the position of the charged object.
In one embodiment, the electrical tool further comprises:
and the control module is connected with the ranging module and used for receiving the linear distance from the ranging module to the charged object, which is sent by the ranging module.
In one embodiment, the electrical tool further comprises:
and the voltage measuring module is connected with the control module and is used for measuring the voltage value of the charged object contacted by the electrical tool.
In one embodiment, the electrical tool further comprises:
and the torque measuring module is connected with the control module and is used for measuring the torque force of the electrician tool in the working state.
In a fourth aspect, the present application further provides a ranging correction coefficient training apparatus, including:
the correction coefficient acquisition module is used for acquiring the correction coefficient of the distance measurement module, and the correction coefficient is used for correcting the relation between the induced current monitored by the distance measurement module and the electric field intensity of the position of the charged object; the distance measurement module is used for calculating the linear distance from the distance measurement module to the charged object according to the electric field intensity;
the actual value acquisition module is used for acquiring an actual measurement value of the linear distance;
the simulation value acquisition module is used for acquiring a simulation value of the linear distance from the distance measurement module to the charged object;
a loss function setting module for setting a loss function based on the actual measurement value, the simulation value, and the correction coefficient;
and the parameter determining module is used for iteratively executing the step of training the correction coefficient based on the gradient descent algorithm and the loss function until the precision of the loss function meets the preset precision requirement or the iteration frequency reaches the preset iteration frequency, and taking the trained correction coefficient as a ranging correction coefficient.
The distance measurement correction coefficient training method, the distance measurement correction coefficient training device, the distance measurement method and the electrician tool are characterized in that a correction coefficient of a distance measurement module is obtained firstly, wherein the correction coefficient is used for correcting the relation between induced current monitored by the distance measurement module and electric field intensity of a position where a charged object is located, the distance measurement module is used for calculating the linear distance from the distance measurement module to the charged object according to the electric field intensity, then an actual measurement value of the linear distance and a simulated value of the linear distance from the distance measurement module to the charged object are obtained, a loss function is set based on the actual measurement value, the simulated value and the correction coefficient, finally the step of training the correction coefficient based on a gradient descent algorithm and the loss function is executed in an iterative mode until the precision of the loss function meets a preset precision requirement or the iteration times reach preset iteration times, and the trained correction coefficient is used as the distance measurement correction coefficient. The distance measurement correction coefficient training method continuously updates the distance measurement correction coefficient based on the gradient descent method until the precision of the loss function meets the requirement, so that the distance from the electrical tool to the charged object is more accurately measured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the conventional technologies of the present application, the drawings used in the descriptions of the embodiments or the conventional technologies will be briefly introduced below, it is obvious that the drawings in the following descriptions are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart illustrating a method for training a ranging correction factor according to an embodiment;
FIG. 2 is a flow chart illustrating the steps of setting a loss function based on actual measured values, simulated values, and correction coefficients in one embodiment;
FIG. 3 is a schematic flow chart diagram illustrating the step of training the correction coefficients based on the gradient descent algorithm and the loss function in one embodiment;
FIG. 4 is a flow diagram illustrating a ranging method according to one embodiment;
FIG. 5 is a schematic view of an exemplary embodiment of an electrical tool;
FIG. 6 is a diagram illustrating an exemplary ranging correction factor training apparatus;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
To facilitate an understanding of the present application, the present application will now be described more fully with reference to the accompanying drawings. Embodiments of the present application are set forth in the accompanying drawings. This application may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
It will be understood that when an element is referred to as being "connected" to another element, it can be directly connected to the other element or be connected to the other element through intervening elements. Further, "connection" in the following embodiments is understood to mean "electrical connection", "communication connection", or the like, if there is a transfer of electrical signals or data between the connected objects.
As used herein, the singular forms "a", "an" and "the" may include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises/comprising," "includes" or "including," etc., specify the presence of stated features, integers, steps, operations, components, parts, or combinations thereof, but do not preclude the presence or addition of one or more other features, integers, steps, operations, components, parts, or combinations thereof.
In order to solve the problem mentioned in the background art that the distance from an electrical tool to a charged object is inaccurate, the present invention provides a distance measurement correction coefficient training method, as shown in fig. 1, the method comprising:
s200, obtaining a correction coefficient of the ranging module.
The correction coefficient is used for correcting the relation between the induced current monitored by the distance measurement module and the electric field intensity of the position of the charged object. In the process of calculating the electric field intensity, the calculated electric field value is inaccurate due to the fact that the electric field value is easily influenced by surrounding conductive substances, and the relation between the induced current monitored by the ranging module and the electric field intensity of the position of the charged object is corrected by the correction coefficient, so that the electric field intensity is not easily influenced by the surrounding conductive substances in the process of calculating the electric field intensity.
The distance measuring module comprises an electromagnetic field sensor and is used for calculating the linear distance from the distance measuring module to the charged object according to the electric field intensity.
The electromagnetic field sensor in the distance measuring module may obtain an analog charge value Q of any point in the electric field by using an analog charge method, and obtain an electric field strength e (t) of a point in the electric field at a certain time t by knowing the analog charge value Q (t) of the point and the induced current i (t) of the point at the time t. The induced current i (t) can be directly obtained by the electromagnetic field sensor described above.
In particular, the method comprises the following steps of,wherein, K is a correction coefficient, epsilon is a constant, epsilon is 8.854187817 multiplied by 10-12And A is the cross-sectional area of the conductor (i.e., charged body). Knowing I (t), K, ε, and Q (t), the electric field strength E (t) can be solved for.
S400, acquiring an actual measurement value of the linear distance.
The actual measurement value is the distance between the measurement module manually measured and the charged object.
S600, a simulated value of the linear distance from the distance measuring module to the charged object is obtained.
The simulation value is obtained by calculating the electric field intensity calculated by the distance measurement module based on a simulated charge method or other field intensity calculation methods. Specifically, the simulated value of the linear distance from the distance measuring module to the charged object may be obtained by dividing the voltage of the charged object by the electric field intensity at the position of the charged object.
And S800, setting a loss function based on the actual measurement value, the simulated value and the correction coefficient.
Wherein the loss function is used to measure the difference between the actual measured value and the simulated value.
And S900, iteratively executing the step of training the correction coefficient based on the gradient descent algorithm and the loss function until the precision of the loss function meets the preset precision requirement or the iteration frequency reaches the preset iteration frequency, and taking the trained correction coefficient as a ranging correction coefficient.
And presetting the precision of the loss function and the iteration times according to the actual engineering needs. And when the iteration frequency of the gradient descent algorithm reaches the preset iteration frequency or the loss function precision meets the preset precision, stopping the operation of the gradient descent algorithm, and outputting the correction coefficient at the moment as a distance measurement correction coefficient for calculating the linear distance from the distance measurement module to the charged object in the finally set distance measurement module.
The distance measurement correction coefficient training method comprises the steps of firstly obtaining a correction coefficient of a distance measurement module, wherein the correction coefficient is used for correcting the relation between induced current monitored by the distance measurement module and electric field intensity of a position where a charged object is located, the distance measurement module is used for calculating the linear distance from the distance measurement module to the charged object according to the electric field intensity, then obtaining an actual measurement value of the linear distance and a simulated value of the linear distance from the distance measurement module to the charged object, setting a loss function based on the actual measurement value, the simulated value and the correction coefficient, finally carrying out iterative training of the correction coefficient based on a gradient descent algorithm and the loss function until the precision of the loss function meets a preset precision requirement or the iterative training reaches a preset iterative time, and taking the trained correction coefficient as the distance measurement correction coefficient. The distance measurement correction coefficient training method continuously updates the distance measurement correction coefficient based on a gradient descent method until the precision of the loss function meets the requirement, so that the distance from an electrical tool to a charged object is more accurately measured.
In one embodiment, as illustrated in FIG. 2, the above step 800 comprises:
and S810, setting a distance translation term.
When the distance measurement module calculates the simulated value of the distance, the time difference exists between the electric field value used by the distance measurement module and the signal transmission, and the staff using the distance measurement module to perform measurement is in a moving state, which causes the electric field value used in the process of calculating the simulated value by the distance measurement module to be the previous electric field value, thereby causing an offset error to exist between the calculated simulated value and the actual measurement value. Therefore, the distance translation item is set, the moving state of the worker is taken as a consideration factor in the process of calculating the linear distance from the distance measurement module to the charged object, and the precision of the simulated value obtained by the distance measurement module is improved.
S820, a relation function between the actual measured value and the simulation value is constructed based on the actual measured value, the simulation value, the correction coefficient and the distance translation item.
Wherein y represents a simulation value, X represents an actual measurement value, and X0Representing the distance translation term, K representing the correction factor, y, K, X and X0The relationship function between can be expressed as y ═ K (X-X)0)。
S830, setting a loss function based on the relation function.
The loss function J constructed and set based on the above relationship function can be represented as:
wherein X can be selected from a certain K and X0In this case, X ═ X [ X ] is a column vector consisting of actual measurement values obtained n times of measurements at different distances1,x2,…,xn]TNorm represents the Euclidean norm and can be expressed as
Wherein, by setting the preset precision, when the output value of the loss function meets the preset precision, the output is last time moreNew correction factor K and distance translation term X0And taking the correction coefficient K obtained at the moment as a ranging correction coefficient in the subsequent measurement.
In one embodiment, as shown in fig. 3, the step S900 includes:
s910, a learning rate is set.
S920, a gradient of the correction coefficient is calculated based on the loss function.
S930, the correction coefficient is updated according to the learning rate and the gradient of the correction coefficient.
Wherein the updated correction coefficient is equal to the original correction coefficient minus the learning rate multiplied by the gradient value of the original correction coefficient.
In an embodiment, as shown in fig. 3, the step S930 further includes the following steps:
s940, calculating the gradient of the distance translation term based on the loss function;
s950, the distance translation term is updated according to the learning rate and the gradient of the distance translation term, and the process proceeds to step S820.
Wherein the updated distance translation term is equal to the original distance translation term minus the learning rate multiplied by the gradient value of the original distance translation term.
As shown in fig. 4, the present invention also provides a ranging method, including:
s1000, acquiring induced current of the charged object in the electric field.
S2000, calculating the electric field intensity of the position of the charged object based on the distance measurement correction coefficient and the induced current obtained by the distance measurement correction coefficient training method.
And S3000, calculating the linear distance from the distance measuring module to the charged object based on the electric field intensity of the position of the charged object.
The linear distance from the distance measuring module to the charged object is equal to the voltage of the charged object divided by the electric field intensity of the position of the charged object.
Table 1 shows the difference between the simulated value and the actual value measured by the above distance measurement method.
TABLE 1 simulated and actual distance values from ranging module to charged object
As can be seen from table 1, the distance measurement method for measuring the distance from the distance measurement module to the charged object based on the distance measurement correction coefficient obtained by the distance measurement correction coefficient training method has high measurement accuracy, and can output a simulation value with stable accuracy when the actual value is larger or smaller.
For the specific limitations of the above ranging method, see the above limitations on the training method of the ranging correction coefficient, which are not described herein again.
It should be understood that although the various steps in the flowcharts of fig. 1-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps or stages.
As shown in fig. 5, the present invention also provides an electrical tool comprising:
a ranging module 100 configured to:
monitoring an induced current of a charged object in the electric field;
calculating the electric field intensity of the position of the charged object based on the distance measurement correction coefficient obtained by the distance measurement correction coefficient training method and the induced current;
and calculating the linear distance from the ranging module to the charged object according to the electric field intensity of the position of the charged object.
Wherein, this electrician's instrument can be the screwdriver, and electrician uses this screwdriver of measurement that can be accurate to the distance of electrified object at daily in-process of patrolling and examining, has promoted the degree of safety of electrician's personnel working process by a wide margin.
The electrical tool may be a tool that is required to be used in an electrical work process, such as pliers.
Wherein, the distance measuring module comprises an electromagnetic field sensor. Specifically, an electromagnetic field sensor of the type UAV-LF-04 may be used, the sensor frequency range being 5Hz-400kHz, and the electric field measurement error being less than 5%.
In one embodiment, as shown in fig. 5, the electrical tool further comprises:
and the control module 200 is connected with the ranging module 100 and is used for receiving the linear distance from the ranging module to the charged object, which is sent by the ranging module.
The control module 200 may be an MCU (micro controller Unit), or may be an embedded control panel or other integrated control chips. Specifically, the control module 200 can adopt an STM32F103 single chip microcomputer, the STM32F103 single chip microcomputer adopts a Cortex-M3 kernel, the highest speed of a CPU reaches 72MHz, and the method has the characteristics of short interruption delay and low debugging cost.
In one embodiment, as shown in fig. 5, the electrical tool further comprises:
and a voltage measuring module 300 connected to the control module 200 for measuring a voltage value of the charged object contacted by the electrical tool.
The voltage measuring module 300 is further configured to send the voltage value to the controller.
The voltage measurement module 300 is a module capable of implementing a voltage measurement function, specifically, the voltage measurement module 300 may be an IM1253B power monitoring module, and the IM1253B power monitoring module may collect single-phase direct current parameters, including voltage, current, active power, and other parameters.
In one embodiment, as shown in fig. 5, the electrical tool further comprises:
the torque measuring module 400 is connected to the control module 200 and is used for measuring the magnitude of the torque of the electrical tool in the working state.
The torque measurement module 400 is further configured to send the torque value to the control module 200.
The torque detection module 400 can be a module capable of implementing a torque measurement function, and specifically, the torque detection module 400 can be a JNNT-S micro static torque and torque measurement module.
In one embodiment, as shown in fig. 5, the electrical tool further comprises:
and the alarm module 500 is connected with the control module 200 and is used for sending an alarm signal when the voltage value measured by the voltage measurement module exceeds a preset voltage range and/or the distance measured by the distance measurement module exceeds a preset distance range.
In one embodiment, as shown in fig. 5, the electrical tool further comprises:
and a display module 600 connected to the control module 200 for displaying the linear distance from the distance measuring module to the charged object, the voltage value and the torque value.
The display module 600 may be a liquid crystal display or an LED screen. Specifically, the display module adopts a 0.3-inch OLED display screen, and the display module 600 is used for receiving and displaying the linear distance, the voltage value and the torque value sent by the control module 600, and is also used for realizing interaction between a user and an electrical tool.
In one embodiment, as shown in fig. 5, the electrical tool further comprises:
the input module 700 is connected to the control module 200 and is configured to adjust the value displayed by the display module 600 when there is no linear distance, no voltage value, or no torque value.
As shown in fig. 6, the present application also provides a ranging correction factor training device, including:
a correction coefficient acquisition module 20, configured to acquire a correction coefficient of the distance measurement module, where the correction coefficient is used to correct a relationship between an induced current monitored by the distance measurement module and an electric field intensity at a position where a charged object is located; the distance measurement module is used for calculating a simulated value of the linear distance from the distance measurement module to the charged object according to the electric field intensity;
an actual value obtaining module 40, configured to obtain an actual measurement value of the linear distance;
a simulated value obtaining module 60, configured to obtain a simulated value of a linear distance from the distance measuring module to the charged object;
a loss function setting module 80 configured to set a loss function based on the actual measurement value, the simulated value, and the correction coefficient;
and the parameter determining module 90 is configured to iteratively perform the step of training the correction coefficient based on the gradient descent algorithm and the loss function until the precision of the loss function meets a preset precision requirement or the number of iterations reaches a preset number of iterations, and use the trained correction coefficient as a ranging correction coefficient.
In one embodiment, the loss function setting module 800 includes:
and the translation item setting unit is used for setting the distance translation item.
And the relation function construction unit is used for constructing a relation function between the actual measured value and the simulation value based on the actual measured value, the simulation value, the correction coefficient and the distance translation item.
A loss function setting unit for setting a loss function based on the relationship function.
In one embodiment, the parameter determining module 900 includes:
a learning rate setting unit for setting a learning rate.
And a correction coefficient updating unit for updating the correction coefficient according to the learning rate and the gradient of the correction coefficient.
In one embodiment, the parameter determining module 900 further includes:
a distance translation term calculation unit for calculating a gradient of the distance translation term based on the loss function.
And the distance translation item updating unit is used for updating a distance translation item according to a learning rate and the gradient of the distance translation item, and is also used for constructing a relation function between the actual measurement value and the simulation value based on the actual measurement value, the simulation value, the correction coefficient and the distance translation item.
For specific limitations of the ranging correction factor training device, reference may be made to the above limitations of the ranging correction factor training method, and details are not repeated here. All or part of each module in the ranging correction coefficient training device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and another division manner may be available in actual implementation.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of range correction coefficient training. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory having a computer program stored therein and a processor that when executing the computer program performs the steps of:
s200, obtaining a correction coefficient of the ranging module.
S400, acquiring an actual measurement value of the linear distance.
S600, a simulated value of the linear distance from the distance measuring module to the charged object is obtained.
S800, setting a loss function based on the actual measurement value, the simulation value and the correction coefficient.
And S900, iteratively executing the step of training the correction coefficient based on the gradient descent algorithm and the loss function until the precision of the loss function meets the preset precision requirement or the iteration frequency reaches the preset iteration frequency, and taking the trained correction coefficient as a ranging correction coefficient.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and S810, setting a distance translation term.
S820, a relation function between the actual measured value and the simulation value is constructed based on the actual measured value, the simulation value, the correction coefficient and the distance translation item.
S830, setting a loss function based on the relation function.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
s910, a learning rate is set.
S920, a gradient of the correction coefficient is calculated based on the loss function.
S930, the correction coefficient is updated according to the learning rate and the gradient of the correction coefficient.
In one embodiment, the processor when executing the computer program further performs the steps of:
s940, calculating the gradient of the distance translation term based on the loss function;
s950, the distance translation term is updated according to the learning rate and the gradient of the distance translation term, and the process proceeds to step S820.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
s1000, acquiring induced current of the charged object in the electric field.
S2000, calculating the electric field intensity of the position of the charged object based on the distance measurement correction coefficient and the induced current obtained by the distance measurement correction coefficient training method.
And S3000, calculating the linear distance from the distance measuring module to the charged object based on the electric field intensity of the position of the charged object.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
and S200, acquiring a correction coefficient of the ranging module.
S400, acquiring an actual measurement value of the linear distance.
S600, a simulated value of the linear distance from the distance measuring module to the charged object is obtained.
S800, setting a loss function based on the actual measurement value, the simulation value and the correction coefficient.
And S900, iteratively executing the step of training the correction coefficient based on the gradient descent algorithm and the loss function until the precision of the loss function meets the preset precision requirement or the iteration frequency reaches the preset iteration frequency, and taking the trained correction coefficient as a ranging correction coefficient.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and S810, setting a distance translation term.
S820, a relation function between the actual measured value and the simulation value is constructed based on the actual measured value, the simulation value, the correction coefficient and the distance translation item.
S830, a loss function is set based on the relation function.
In one embodiment, the computer program when executed by the processor further performs the steps of:
s910, a learning rate is set.
S920, a gradient of the correction coefficient is calculated based on the loss function.
S930, the correction coefficient is updated according to the learning rate and the gradient of the correction coefficient.
In one embodiment, the computer program when executed by the processor further performs the steps of:
s940, calculating the gradient of the distance translation term based on the loss function;
s950, the distance translation term is updated according to the learning rate and the gradient of the distance translation term, and the process proceeds to step S820.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
s1000, acquiring induced current of a charged object in the electric field.
S2000, calculating the electric field intensity of the position of the charged object based on the distance measurement correction coefficient and the induced current obtained by the distance measurement correction coefficient training method.
And S3000, calculating the linear distance from the distance measuring module to the charged object based on the electric field intensity of the position of the charged object.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
In the description herein, references to the description of "some embodiments," "other embodiments," "desired embodiments," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, a schematic description of the above terminology may not necessarily refer to the same embodiment or example.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
1. A method for training a ranging correction factor, the method comprising:
obtaining a correction coefficient of a distance measuring module, wherein the correction coefficient is used for correcting the relation between induced current monitored by the distance measuring module and the electric field intensity of the position of a charged object; the distance measurement module is used for calculating a simulated value of the linear distance from the distance measurement module to the charged object according to the electric field intensity;
acquiring an actual measurement value of the linear distance;
acquiring a simulated value of the linear distance from the distance measuring module to the charged object;
setting a loss function based on the actual measurement values, the simulated values, and the correction coefficients;
and iteratively executing the step of training the correction coefficient based on the gradient descent algorithm and the loss function until the precision of the loss function meets the preset precision requirement or the iteration frequency reaches the preset iteration frequency, and taking the trained correction coefficient as a ranging correction coefficient.
2. The method of claim 1, wherein setting a loss function based on the actual measurement values, the simulated values, and the correction coefficients comprises:
setting a distance translation term;
constructing a relation function between the actual measurement value and the simulation value based on the actual measurement value, the simulation value, the correction coefficient and the distance translation term;
setting a loss function based on the relationship function.
3. The method of claim 1 or 2, wherein the training of the correction coefficients based on the gradient descent algorithm and the loss function comprises:
setting a learning rate;
calculating a gradient of the correction coefficient based on the loss function;
and updating the correction coefficient according to the learning rate and the gradient of the correction coefficient.
4. The method of claim 2, wherein training the correction coefficients based on the gradient descent algorithm and the loss function further comprises:
calculating a gradient of the distance translation term based on the loss function;
updating the distance translation term according to the learning rate and the gradient of the distance translation term, and performing the step of constructing a relation function between the actual measurement value and the simulated value based on the actual measurement value, the simulated value, the correction coefficient and the distance translation term.
5. A method of ranging, comprising:
acquiring induced current of a charged object in an electric field;
calculating the electric field intensity of the position of the charged object based on the distance measurement correction coefficient obtained by the distance measurement correction coefficient training method according to any one of claims 1 to 4 and the induced current;
and calculating the linear distance from the distance measurement module to the charged object according to the electric field intensity of the position of the charged object.
6. An electrical tool, characterized in that the tool comprises:
a ranging module for:
monitoring an induced current of a charged object in the electric field;
calculating the electric field intensity of the position where the charged object is located based on the distance measurement correction coefficient obtained by the distance measurement correction coefficient training method according to any one of claims 1 to 4 and the induced current;
and calculating the linear distance from the distance measurement module to the charged object according to the electric field intensity of the position of the charged object.
7. The electrical tool as recited in claim 6, further comprising:
and the control module is connected with the ranging module and used for receiving the linear distance from the ranging module to the charged object, which is sent by the ranging module.
8. The electrical tool as set forth in claim 6 further comprising:
and the voltage measuring module is connected with the control module and is used for measuring the voltage value of the charged object contacted by the electrician tool.
9. The electrical tool as claimed in any one of claims 6 to 8, further comprising:
and the torque measuring module is connected with the control module and is used for measuring the torque force of the electrician tool in the working state.
10. A distance measurement correction coefficient training device, comprising:
the correction coefficient acquisition module is used for acquiring the correction coefficient of the distance measurement module, and the correction coefficient is used for correcting the relation between the induced current monitored by the distance measurement module and the electric field intensity of the position of the charged object; the distance measurement module is used for calculating a simulated value of the linear distance from the distance measurement module to the charged object according to the electric field intensity;
the actual value acquisition module is used for acquiring an actual measurement value of the linear distance;
the simulation value acquisition module is used for acquiring a simulation value of the linear distance from the distance measurement module to the charged object;
a loss function setting module for setting a loss function based on the actual measurement value, the simulation value, and the correction coefficient;
and the parameter determining module is used for iteratively executing the step of training the correction coefficient based on the gradient descent algorithm and the loss function until the precision of the loss function meets the preset precision requirement or the iteration frequency reaches the preset iteration frequency, and taking the trained correction coefficient as a ranging correction coefficient.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111385045.1A CN114089350A (en) | 2021-11-22 | 2021-11-22 | Distance measurement correction coefficient training method and device, distance measurement method and electrical tool |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111385045.1A CN114089350A (en) | 2021-11-22 | 2021-11-22 | Distance measurement correction coefficient training method and device, distance measurement method and electrical tool |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114089350A true CN114089350A (en) | 2022-02-25 |
Family
ID=80302594
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111385045.1A Pending CN114089350A (en) | 2021-11-22 | 2021-11-22 | Distance measurement correction coefficient training method and device, distance measurement method and electrical tool |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114089350A (en) |
-
2021
- 2021-11-22 CN CN202111385045.1A patent/CN114089350A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP4130769A1 (en) | Method and device for determining state of charge of battery, and battery management system | |
EP3367209B1 (en) | Method and apparatus for surface and ambient temperature estimation for portable devices | |
CN111650446B (en) | Power parameter measuring method, system, device, computer equipment and storage medium | |
WO2015033503A1 (en) | Estimation device and estimation method | |
CN110617916B (en) | Calibration method and device of air pressure sensor | |
JP2008522152A (en) | Battery state and parameter estimation system and method | |
CN111458573A (en) | Method, device and system for measuring electric parameters of conducting wire and computer equipment | |
JP2015184219A (en) | Estimation program, estimation method, and estimation device | |
US11035902B2 (en) | Advanced fuel gauge | |
CN117405075B (en) | Intelligent settlement monitoring method and system | |
CN114089350A (en) | Distance measurement correction coefficient training method and device, distance measurement method and electrical tool | |
WO2018029849A1 (en) | Estimation device, estimation program, and charging control device | |
CN109270455B (en) | Induction motor state monitoring method based on weak-sensitivity ensemble Kalman filtering | |
CN116047323A (en) | Correction method and system of battery SOC, battery and battery management system | |
EP3865838A1 (en) | Enhancing rtd measurement accuracy by means of variable excitation current | |
CN111896144B (en) | Body temperature detection method, device, equipment and computer readable storage medium | |
CN110896474B (en) | Distance compensation method, device and equipment of TOF module | |
JP2017009432A (en) | Information processing device, method for correcting measurement value, and program | |
CN111380616A (en) | Separated temperature measuring module | |
Tomczyk | Polynomial approximation of the maximum dynamic error generated by measurement systems | |
Wei et al. | Signal processing method with cold junction compensation for thermocouple | |
RU2611259C1 (en) | Automated device for determining limit modes of electrical systems | |
CN113295972B (en) | Insulation defect detection method, system, device, computer equipment and storage medium | |
JP2005287128A (en) | Power system stability supervisory system | |
US9471542B2 (en) | Parameter generating device and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |