CN113758513A - Method for detecting precision of magnetic encoder in equipment and electronic equipment - Google Patents

Method for detecting precision of magnetic encoder in equipment and electronic equipment Download PDF

Info

Publication number
CN113758513A
CN113758513A CN202010501618.1A CN202010501618A CN113758513A CN 113758513 A CN113758513 A CN 113758513A CN 202010501618 A CN202010501618 A CN 202010501618A CN 113758513 A CN113758513 A CN 113758513A
Authority
CN
China
Prior art keywords
magnetic encoder
data
equipment
preset
precision
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.)
Granted
Application number
CN202010501618.1A
Other languages
Chinese (zh)
Other versions
CN113758513B (en
Inventor
齐斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN202010501618.1A priority Critical patent/CN113758513B/en
Priority to PCT/CN2021/094360 priority patent/WO2021244278A1/en
Publication of CN113758513A publication Critical patent/CN113758513A/en
Application granted granted Critical
Publication of CN113758513B publication Critical patent/CN113758513B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D18/00Testing or calibrating apparatus or arrangements provided for in groups G01D1/00 - G01D15/00
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • G01D5/244Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains
    • G01D5/245Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains using a variable number of pulses in a train
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • G01D5/244Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains
    • G01D5/245Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains using a variable number of pulses in a train
    • G01D5/2451Incremental encoders
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • G01D5/244Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains
    • G01D5/249Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains using pulse code
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • G01D5/244Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains
    • G01D5/249Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains using pulse code
    • G01D5/2497Absolute encoders

Abstract

The embodiment of the application provides a method for detecting the precision of a magnetic encoder in equipment and electronic equipment, and relates to the technical field of equipment detection. The rotating part of the first equipment rotates to a specified degree, the difference value of the output parameter of the first magnetic encoder is obtained to obtain first data, the first data is compared with second data measured in advance, whether the precision of the first magnetic encoder is up to standard is determined, under the condition that the device does not depend on external professional testing devices such as a photoelectric encoder, precision detection of the magnetic encoder in the equipment can be achieved, precision detection of the magnetic encoder in the equipment which is installed and used can be achieved, the installed equipment does not need to be disassembled to return to a factory for detection, the detection cost of the magnetic encoder in the equipment is greatly saved, and the precision detection efficiency is high.

Description

Method for detecting precision of magnetic encoder in equipment and electronic equipment
Technical Field
The present disclosure relates to the field of device detection technologies, and in particular, to a method for detecting the accuracy of a magnetic encoder in a device and an electronic device.
Background
A magnetic encoder is a position sensor widely used in the industry. Compared with a photoelectric encoder, the magnetic encoder has the advantages of small volume, low cost, simplicity and convenience in installation and the like. Generally, a magnetic encoder includes a magnet and a magnetic encoder body, and the magnetic encoder is mainly classified into a shaft-mounted type and a side-mounted type according to a mounting manner. In the shaft-mounted type, the magnet adopts a circular magnetic column, the magnet is coaxial with the magnetic encoder main body, and the magnet is arranged right above or right below the magnetic encoder; in the side-mounted type, the magnet is a hollow magnetic ring, and the magnetic ring is arranged at a certain position on one side of the magnetic encoder body. When the magnetic encoder is used for measuring, the magnetic encoder main body and the magnet move relatively, and the magnetic encoder main body determines the change of the position according to the magnetic field, so that the position information is output.
In equipment such as a dome camera (hereinafter referred to as a dome camera) or an unmanned aerial vehicle, the equipment is limited by small volume and limited internal space, and a magnetic encoder becomes an ideal position sensor. The magnetic encoder is arranged in the equipment, so that the positioning precision of the equipment can be improved, the fault detection means of the equipment can be enriched, and the magnetic encoder has a wide application prospect.
In the related art, when equipment is shipped, external professional testing devices such as a photoelectric encoder are used for detecting the precision of a magnetic encoder in the equipment, so that the precision of the magnetic encoder is ensured. However, in the actual use process of the apparatus, the accuracy of the magnetic encoder may change due to factors such as the structure of the magnetic encoder is loose, the relative position deviation between the magnetic encoder and the magnet, the magnetizing direction change of the magnet, the magnetizing uniformity change, or the magnetic field strength change. However, in the use process after the equipment is out of field, how to detect the precision of the magnetic encoder in the equipment without an external professional testing device becomes a problem to be solved urgently.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method for detecting accuracy of a magnetic encoder in a device and an electronic device, so as to detect accuracy of the magnetic encoder in the device. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for detecting accuracy of a magnetic encoder in a device, where the method includes:
rotating a rotating part of first equipment by a specified degree along the measuring direction of a first magnetic encoder, and acquiring a difference value of output parameters of the first magnetic encoder before and after the specified degree is rotated to obtain first data, wherein the first magnetic encoder is used for measuring the angular displacement of the rotating part of the first equipment;
comparing the first data with preset second data to obtain an error, wherein the second data is obtained according to a parameter difference value of a second magnetic encoder, the parameter difference value is a difference value of output parameters of the second magnetic encoder before and after a rotating part of second equipment rotates for the specified degree along a measuring direction of the second magnetic encoder, the second magnetic encoder is used for measuring the angular displacement of the rotating part of the second equipment, the model of the second equipment is the same as that of the first equipment, and the measuring precision of the second magnetic encoder meets the requirement of a preset precision standard;
and if the error is within a preset error range, judging that the precision of the first magnetic encoder reaches the standard.
In a possible embodiment, before the comparing the first data with the preset second data, the method further includes:
acquiring current environmental parameters of the first device, wherein the environmental parameters comprise at least one of voltage and temperature;
and acquiring preset second data corresponding to the current environmental parameters.
In one possible embodiment, the method further comprises:
measuring by using a photoelectric encoder to obtain second equipment with the measurement precision of a second magnetic encoder meeting the requirement of a preset precision standard, wherein the precision of the photoelectric encoder is 2 times or more of the precision of the required first magnetic encoder;
and under various preset environmental parameters, respectively rotating the rotating part of the second device by the specified degrees along the measuring direction of the second magnetic encoder, and acquiring the difference value of the output parameters of the second magnetic encoder before and after the specified degrees is rotated to obtain second data corresponding to each preset environmental parameter.
In a possible embodiment, the error includes a plurality of values, and the determining that the accuracy of the first magnetic encoder is up to the standard if the error is within a predetermined error range includes:
and if all numerical values of the errors are within the preset error range, judging that the precision of the first magnetic encoder reaches the standard.
In a possible embodiment, the rotating member of the first apparatus by a specified degree along the measuring direction of the first magnetic encoder, and obtaining the difference between the output parameters of the first magnetic encoder before and after the specified degree is rotated to obtain the first data includes:
when the precision of a first magnetic encoder in first equipment is detected, acquiring output parameters of the first magnetic encoder of a rotating component of the first equipment at a current angle to obtain first output parameters;
rotating a rotating part of the first device from a current angle along the measuring direction of the first magnetic encoder, and reading output parameters of the first magnetic encoder every time the rotating part rotates for the specified degree to obtain a plurality of second output parameters;
and calculating the difference value of the output parameters of the first magnetic encoder when the rotating part of the first equipment rotates for the specified degrees according to the first output parameters and the second output parameters to obtain first data.
In one possible embodiment, the calculating a difference between the output parameters of the first magnetic encoder every time the rotating member of the first apparatus rotates by the predetermined number of degrees according to the first output parameter and the respective second output parameters to obtain first data includes:
calculating a difference value of the output parameters of the first magnetic encoder every time a rotating part of the first device rotates by the specified degree according to the first output parameter and each second output parameter, and taking the difference value as each output parameter difference value;
calculating the absolute deviation of the difference value of each output parameter;
counting the number of the absolute deviations included in each preset deviation gear interval according to the numerical value of each absolute deviation;
and obtaining the distribution probability of the absolute deviation under each preset deviation gear interval as the first data according to the total number of the absolute deviations and the number of the absolute deviations included in each preset deviation gear interval.
In one possible embodiment, the method further comprises:
acquiring output parameters of a second magnetic encoder of a rotating component of the second equipment at the current angle to obtain third output parameters;
rotating a rotating part of the second device from a current angle along the measuring direction of the second magnetic encoder, and reading the output parameters of the second magnetic encoder every time the rotating part rotates for the specified degree to obtain a plurality of fourth output parameters;
calculating a difference value of the output parameters of the second magnetic encoder every time the rotating part of the second device rotates by the specified degree according to the third output parameter and the fourth output parameters, and taking the difference value as a difference value of the first output parameters;
calculating absolute deviation of each first output parameter difference value to obtain each second absolute deviation;
dividing the value range of the second absolute deviation into M preset deviation gear intervals according to the second absolute deviations, wherein each preset deviation gear interval at least comprises one second absolute deviation;
counting the number of the second absolute deviations included in each preset deviation gear interval according to the numerical value of each searched second absolute deviation;
and obtaining the distribution probability of the second absolute deviation under each preset deviation gear interval as the second data according to the total number of the second absolute deviations and the number of the second absolute deviations included in each preset deviation gear interval.
In a possible embodiment, the comparing the first data with a preset second data to obtain an error includes:
aiming at any preset deviation gear interval, comparing whether the distribution probability of the first data and the second data under the preset deviation gear interval is the same or not to obtain an error, wherein the error represents whether the preset deviation gear interval with the first data distribution probability and the second data distribution probability which are different exists or not;
if the error is within a preset error range, the accuracy of the first magnetic encoder is judged to reach the standard, and the method comprises the following steps:
and if the error indicates that a preset deviation gear interval with a first data distribution probability different from a second data distribution probability does not exist, judging that the precision of the first magnetic encoder reaches the standard.
In a possible embodiment, the comparing the first data with a preset second data to obtain an error includes:
respectively calculating the difference value of the distribution probability of the first data and the second data under each preset deviation gear interval to obtain the corresponding difference value of each preset deviation gear interval;
and according to the weight corresponding to each preset deviation gear interval, carrying out weighted average on the difference corresponding to each preset deviation gear interval to obtain an error.
In one possible embodiment, the current angle is an initial angle of a rotating component of the first device, the rotating component of the first device is rotated in a measuring direction of the first magnetic encoder from the current angle, and the output parameter of the first magnetic encoder is read every specified number of degrees to obtain a plurality of second output parameters, including:
and rotating the rotating part of the first device at a constant speed from the initial angle along the measuring direction of the first magnetic encoder, and reading the output parameters of the first magnetic encoder every time the rotating part rotates for the specified degree until the rotating part of the first device rotates to the maximum rotation angle, so as to obtain a plurality of second output parameters.
In one possible embodiment, the method further comprises:
and triggering the detection of the precision of a first magnetic encoder in the first equipment in the power-on stage of the first equipment.
In a possible implementation, after the comparing the first data with the preset second data to obtain an error, the method further includes:
and if the error is not within the preset error range, disabling the first magnetic encoder in the first device.
In a second aspect, embodiments of the present application provide an electronic device, including a processor, a memory, a rotating component, and a first magnetic encoder;
the first magnetic encoder is used for measuring the rotary displacement of the rotary component in the rotary direction;
the memory is used for storing a computer program;
the processor is configured to implement the method for detecting the accuracy of the magnetic encoder in any one of the above-mentioned apparatuses when executing the program stored in the memory.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program, when executed by a processor, implements the method for detecting accuracy of a magnetic encoder in any one of the above-mentioned apparatuses.
According to the magnetic encoder precision detection method and the electronic equipment in the equipment, the rotating part of the first equipment rotates by a specified degree, the difference value of the output parameter of the first magnetic encoder is obtained to obtain the first data, the first data is compared with the preset second data, and whether the precision of the first magnetic encoder is up to the standard is determined. Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application 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 is obvious that the drawings in the following description 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 first schematic diagram of a method for detecting the accuracy of a magnetic encoder in an apparatus according to an embodiment of the present disclosure;
FIG. 2a is a diagram illustrating pre-measurement of second data according to an embodiment of the present application;
FIG. 2b is another schematic diagram of pre-measuring second data according to an embodiment of the present application;
FIG. 3a is a second schematic diagram of a method for detecting the accuracy of a magnetic encoder in an apparatus according to an embodiment of the present disclosure;
FIG. 3b is a third schematic diagram of a method for detecting the accuracy of a magnetic encoder in the apparatus according to the embodiment of the present application;
FIG. 4 is a fourth schematic diagram illustrating a method for detecting the accuracy of a magnetic encoder in an apparatus according to an embodiment of the present disclosure;
FIG. 5 is a fifth exemplary diagram illustrating a method for detecting the accuracy of a magnetic encoder in an apparatus according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of an apparatus for detecting the accuracy of a magnetic encoder in an apparatus according to an embodiment of the present application;
fig. 7 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
First, the professional data in the present application will be explained.
Ball machine: the camera is a spherical camera, and is security monitoring equipment integrating multiple functions of an integrated camera, a tripod head, a decoder, a protective cover and the like.
Magnetic encoding: known as a magnetic encoder, is a position sensor that uses hall effect or magnetoresistive technology.
Position closed loop: the method refers to closed-loop control of position control according to position information fed back by an encoder.
Precision: indicating how close an observed value is to a true value, and for magnetic encoders, accuracy refers to the minimum unit of measurement that the encoder can guarantee, usually expressed in number of bits or degrees.
Online detection: refers to a detection function that can be performed by itself without the aid of external tools or devices.
In order to realize online detection of a magnetic encoder in a device, an embodiment of the present application provides a method for detecting accuracy of a magnetic encoder in a device, and with reference to fig. 1, the method includes:
and S11, rotating the rotating part of the first device by a specified degree along the measuring direction of the first magnetic encoder, and acquiring the difference value of the output parameters of the first magnetic encoder before and after the specified degree is rotated to obtain first data, wherein the first magnetic encoder is used for measuring the angular displacement of the rotating part of the first device.
The magnetic encoder precision detection method in the equipment is suitable for online detection of the equipment, and therefore the magnetic encoder precision detection method can be achieved through the first equipment, and specifically the first equipment can be a ball machine or an unmanned aerial vehicle and the like. The first device includes at least one magnetic encoder therein, which may be any magnetic encoder in the first device for measuring angular displacement of a rotating component.
The trigger condition for detecting the accuracy of the first magnetic encoder in the first device may be: the user outputs a detection instruction for the first magnetic encoder, or the first device is automatically triggered in the process of powering on/starting, or the first device is automatically triggered in the process of restoring factory settings, and the like. In a possible implementation manner, the method for detecting the accuracy of the magnetic encoder in the device provided by the embodiment of the present application further includes: in a power-up stage of the first device, detecting the accuracy of a first magnetic encoder in the first device is triggered.
The rotating part of the first device can rotate in the measuring direction of the first magnetic encoder, which is actually used to measure the angular displacement of the rotating part. For example, when the first device is a ball machine, the rotating member may be a lens of the ball machine or the like; when first equipment is unmanned aerial vehicle, rotary part can be for the cloud platform of unmanned aerial vehicle carried on etc.
The specified degree can be set according to the actual situation in a customized way, and for example, the specified degree can be set to be 0.5 degree, 1 degree, 5 degrees or 10 degrees, etc. In general, the rotating part in the first device is driven by the motor to rotate, and although the angular displacement of the rotating part cannot be measured by the motor, the rotating part of the first device can be rotated by a specified degree by controlling the angle of each rotation by the motor. Specifically, an output parameter before a rotating part of the first device rotates by a specified degree along a measuring direction of the first magnetic encoder can be obtained, so that an output parameter is obtained; the method comprises the steps of obtaining an output parameter of a rotating component of first equipment after the rotating component rotates for a specified degree along the measuring direction of a first magnetic encoder, obtaining another output parameter, and calculating the difference value of the two output parameters to obtain first data.
And S12, comparing the first data with preset second data to obtain an error, wherein the second data is obtained according to a parameter difference value of a second magnetic encoder, the parameter difference value is a difference value of output parameters of the second magnetic encoder before and after a rotating part of the second device rotates for a specified degree along a measuring direction of the second magnetic encoder, the second magnetic encoder is used for measuring the angular displacement of the rotating part of the second device, the model of the second device is the same as that of the first device, and the measuring precision of the second magnetic encoder meets the requirement of a preset precision standard.
The second device is the same as the first device in model, that is, the second device is the same as the model of the component applied in the first device, and the rotation directions of the rotating component measured by the first magnetic encoder and the second magnetic encoder should be the same, and optionally, the first magnetic encoder and the second magnetic encoder are also the same in model. The measurement precision of the second magnetic encoder meets the preset precision standard requirement, namely the second magnetic encoder is an encoder with the precision reaching the standard. The measurement accuracy of the second magnetic encoder meets the preset accuracy standard requirement, and the preset accuracy standard requirement is set according to the actual accuracy requirement, for example, when the measurement accuracy of the magnetic encoder is required to be accurate to 0.1 degree, the preset accuracy standard requirement can be that the measurement accuracy reaches 0.1 degree. The second device with the second magnetic encoder measuring precision meeting the preset precision standard requirement can be obtained by detecting in advance with an external professional testing device such as a photoelectric encoder. Optionally, the precision of the external professional testing device is two times or more of the precision corresponding to the preset precision standard requirement. For example, if the precision required by the preset precision standard is 0.5 degrees, the precision of the external professional testing device may be 0.25 degrees, 0.2 degrees, 0.1 degrees, and the like.
The second data should be acquired in the same manner as the first data, except that the second data is acquired from a second magnetic encoder that is accurate and the first data is acquired from a first magnetic encoder to be tested.
Alternatively, the step of pre-measuring the second data may be as shown in fig. 2 a: acquiring a high-precision external professional testing device for detecting the precision of the magnetic encoder, and detecting by using the external professional testing device to obtain second equipment with the second magnetic encoder reaching the standard in precision; specifically, the rotating part of the second device may be rotated along the measurement direction of the second magnetic encoder, and a difference between output parameters of the second magnetic encoder before and after the rotating part of the second device is rotated by a specified degree along the measurement direction of the second magnetic encoder is obtained, so as to obtain the second data. The second data may be pre-stored in the first device, for example, the second data may be solidified into the first device when the first device is shipped. When comparing with the first data, the second data can be directly read.
S13, if the error between the first data and the second data is within the predetermined error range, the accuracy of the first magnetic encoder is determined to be up to standard.
The preset error range can be set in a user-defined mode according to actual conditions, and the smaller the error represented by the preset error range is, the higher the precision requirement on the first magnetic encoder is. When the error between the first data and the second data is within the preset error range, the accuracy of the first magnetic encoder is up to the standard, and the first device may perform a corresponding preset operation according to the output parameter of the first magnetic encoder.
The error between the first data and the second data may include one or more values, and optionally, when the error between the first data and the second data includes a plurality of values, if the error between the first data and the second data is within a predetermined error range, the determining that the accuracy of the first magnetic encoder is up to the standard includes: and if the numerical values of the errors of the first data and the second data are within the preset error range, judging that the precision of the first magnetic encoder reaches the standard.
In this application embodiment, the degree of rotation is appointed with the rotary part of first equipment, obtain the difference of first magnetic encoder output parameter and obtain first data, compare first data and predetermined second data, thereby confirm whether the precision of first magnetic encoder is up to standard, under the condition that does not rely on outside professional testing arrangement such as photoelectric encoder, can realize carrying out the precision detection to the magnetic encoder in the equipment, can realize the precision detection to the magnetic encoder in the equipment of installing and using, need not dismantle the equipment of having installed and return factory and detect, the detection cost of magnetic encoder in the equipment has been practiced thrift greatly, the precision detection efficiency is high.
In a possible embodiment, referring to fig. 3a, before comparing the first data with the second data measured in advance, the method further comprises:
and S15, acquiring the current environmental parameters of the first device, wherein the environmental parameters comprise at least one of voltage and temperature.
The environmental parameter includes at least one of voltage, temperature, and humidity. When the first magnetic encoder in the first device is precisely detected, the current environmental parameters of the first device are obtained, which may include a current operating voltage of the first device, a current operating temperature of the first device, a current operating humidity of the first device, and the like. In order to further improve the detection accuracy, optionally, the current environmental parameter of the first device is specifically a current environmental parameter of a first magnetic encoder in the first device, and may include at least one of a current operating voltage of the first magnetic encoder and a current operating temperature of the first magnetic encoder. In practice, voltage and temperature have a greater effect on the output parameters of the magnetic encoder than humidity, and in one embodiment, the environmental parameters include voltage and temperature.
And S16, acquiring preset second data corresponding to the current environmental parameters.
The second data can be measured under various environmental parameters in advance, the corresponding relation between the second data and the environmental parameters for collecting the second data is recorded, and the second data corresponding to the current environmental parameters is selected according to the current environmental parameters of the first equipment and is used for comparing with the first data. In one embodiment, in order to reduce the difficulty in acquiring the second data, a plurality of environmental parameter intervals may be divided, each environmental parameter interval includes an environmental parameter within a certain numerical range, and one environmental parameter interval corresponds to one second data. The second data corresponding to the environmental parameter interval may be second data measured under an environmental parameter in the environmental parameter interval. And determining an environment parameter interval to which the current environment parameter belongs, and taking second data corresponding to the environment parameter interval to which the current environment parameter belongs as pre-measured second data corresponding to the current environment parameter.
In one possible embodiment, referring to fig. 2b, the step of measuring the second data in advance under the plurality of environmental parameters comprises:
and step A, measuring by using a photoelectric encoder to obtain second equipment with the measurement precision of a second magnetic encoder meeting the requirement of a preset precision standard, wherein the precision of the photoelectric encoder is 2 times or more of the precision of the required first magnetic encoder.
And acquiring a high-precision external professional testing device for detecting the precision of the magnetic encoder, such as a photoelectric encoder, and detecting by using the external professional testing device to obtain second equipment with the second magnetic encoder reaching the standard in precision. The precision of the photoelectric encoder is 2 times or more of that of the first magnetic encoder, the required precision of the first magnetic encoder is the precision required by the first magnetic encoder, and when the first magnetic encoder reaches the precision, the parameter output by the first magnetic encoder is judged to be available. For example, when the required accuracy of the first magnetic encoder is 0.5 degrees, the accuracy of the photoelectric encoder may be 0.25 degrees, 0.2 degrees, 0.1 degrees, or the like.
And step B, respectively rotating the rotating part of the second device by the specified degrees along the measuring direction of the second magnetic encoder under various preset environment parameters, and acquiring the difference value of the output parameters of the second magnetic encoder before and after the specified degrees of rotation to obtain second data corresponding to each preset environment parameter.
The preset environment parameters can be set in a user-defined mode according to actual requirements. Optionally, a plurality of environmental parameter intervals may be divided, each environmental parameter interval includes an environmental parameter within a certain numerical range, and a median value of each environmental parameter interval is selected as each preset environmental parameter.
In the embodiment of the application, the influence of environmental factors on the accuracy of the magnetic encoder is fully considered, and the accuracy of the magnetic encoder is detected by using the second data corresponding to the current environmental parameters of the first device, so that the detection accuracy of the magnetic encoder can be improved.
In one possible embodiment, referring to fig. 3b, the step S11 of rotating the rotating component of the first device by a specified number of degrees along the measuring direction of the first magnetic encoder, and obtaining the difference between the output parameters of the first magnetic encoder before and after the specified number of degrees of rotation to obtain the first data includes:
s111, when the precision of the first magnetic encoder in the first device is detected, the output parameters of the first magnetic encoder of the rotating component of the first device at the current angle are obtained, and the first output parameters are obtained.
The current angle is the angle that rotating part corresponds when the test begins, and the concrete position of current angle is not restricted in this application embodiment, and the current angle can be any angle position of rotating part. Generally, the triggering condition for the precision detection of the first magnetic encoder is that the device is powered on, and the current angle is the initial angle of the rotating part of the first device. And acquiring the output parameter of the first magnetic encoder of the first device when the rotating part of the first device is at the current angle, wherein the output parameter is taken as the first output parameter.
And S112, rotating the rotating part of the first device from the current angle along the measuring direction of the first magnetic encoder, and reading the output parameters of the first magnetic encoder every specified degree of rotation to obtain a plurality of second output parameters.
And (3) starting to rotate the current angle of the rotating part of the first device along the measuring direction of the first magnetic encoder, and optionally, rotating the rotating part of the first device at a constant speed, so that the stability of the rotating process is increased. During rotation of the rotating member of the first device, the output parameters of the first magnetic encoder are read every selected specified number of degrees, resulting in a plurality of second output parameters.
In a possible embodiment, the current angle is an initial angle of a rotating component of the first device, the rotating component of the first device is rotated at a constant speed from the current angle along a measuring direction of the first magnetic encoder, and the output parameters of the first magnetic encoder are read every specified number of degrees of rotation to obtain a plurality of second output parameters, including:
and rotating the rotating part of the first device at a constant speed from an initial angle along the measuring direction of the first magnetic encoder, reading the output parameters of the first magnetic encoder every time when the rotating part rotates by a specified degree until the rotating part rotates to the maximum rotating angle of the rotating part of the first device, and obtaining a plurality of second output parameters.
The maximum rotation angle of the rotating component is related to the structure of the rotating component itself, for example, in the case that the rotating component is a lens or a pan/tilt head of a ball machine, the rotating component can rotate 360 degrees in the horizontal direction, can rotate 90 degrees in the vertical direction, and can rotate one circle, that is, 360 degrees, if the measuring direction of the first magnetic encoder is the horizontal direction; if the measuring direction of the first magnetic encoder is vertical, the first magnetic encoder can rotate to +/-90 degrees. In the embodiment of the application, the rotation angle covers the maximum angle of the rotating part of the first device, and the range of the output parameter of the first magnetic encoder covered by the first data can be increased, so that the breadth of the first data is increased, and the authenticity of the precision detection of the first magnetic encoder is increased.
In order to further increase the accuracy of the precision detection, optionally, the output parameter of the first magnetic encoder may be read multiple times every specified degree of rotation, and the current second output parameter may be calculated using the output parameters read multiple times. For example, the output parameters read multiple times are averaged to be the current second output parameter, or other averaging methods are used to calculate the current second output parameter.
And S113, calculating the difference value of the output parameters of the first magnetic encoder when the first device rotates for a specified degree according to the first output parameters and the second output parameters to obtain first data.
And after the rotation is finished, obtaining a sequence of the first output parameter and the plurality of second output parameters according to the obtained time sequence. And calculating the difference value between the first second read and the first output parameter, and calculating the difference value between two adjacent second output parameters to obtain first data. The pre-measured second data should be acquired in the same manner as the first data, except that the second data is acquired from the second magnetic encoder with the accuracy up to standard, and the first data is acquired from the first magnetic encoder to be tested.
In the embodiment of the application, the difference value between a plurality of adjacent output parameters is calculated to obtain the first data, so that the breadth of the first data is increased, and the authenticity of the precision detection of the first magnetic encoder can be increased.
In a possible implementation manner, referring to fig. 4, in step S113, calculating a difference between output parameters of the first magnetic encoder every specified degree of rotation of the first device according to the first output parameter and the respective second output parameters to obtain first data, where the method includes:
s1131, according to the first output parameter and each of the second output parameters, calculating a difference between output parameters of the first magnetic encoder every time the first device rotates by a specified degree, as a difference between the output parameters.
S1132, calculating an absolute deviation of the difference between the output parameters.
And S1133, counting the number of the absolute deviations included in each preset deviation gear interval according to the numerical value of each absolute deviation.
S1134, obtaining a distribution probability of the absolute deviation in each preset deviation gear interval according to the total number of the absolute deviations and the number of the absolute deviations included in each preset deviation gear interval, and using the distribution probability as the first data.
The difference between each output parameter difference and the mean difference can be calculated as the absolute deviation of each output parameter difference.
As mentioned above, the second data should be acquired in the same way as the first data, with the difference that the second data is acquired from the second magnetic encoder with the accuracy up to standard, and the first data is acquired from the first magnetic encoder to be tested. The preset deviation step section may be obtained using each absolute deviation of the second magnetic encoder of the second device (hereinafter referred to as a second absolute deviation). The preset deviation gear interval may be a numerical interval with continuous numerical values, the numerical interval of each preset deviation gear interval should be continuous, and the total number interval range of each preset deviation gear interval should be able to cover all the second absolute deviations and also cover all possible absolute deviations. For the authenticity of the precision detection of the first magnetic encoder, the number of the preset deviation gear intervals is not easy to be too small, and the range of the numerical value interval of each preset deviation gear interval is not easy to be too large.
For example, a total of 720 second absolute deviations, including a1 through a720, are obtained using the second magnetic encoder, where the smallest second absolute deviation is Amin and the largest second absolute deviation is Amax. Assuming that M (M is an integer greater than 2) preset deviation gear intervals need to be divided, the possible value with the largest absolute deviation is Bmax, and the possible value with the smallest absolute deviation is Bmin, Bmin to Amin can be divided into one preset deviation gear interval, Amax to Bmax can be divided into one preset deviation gear interval, and Amin to Amax can be divided into M-2 preset deviation gear intervals on average, so as to obtain each preset deviation gear interval.
In one possible embodiment, the method for pre-acquiring the second data includes:
the method comprises the steps of firstly, obtaining output parameters of a second magnetic encoder of a rotating component of second equipment at a current angle, and obtaining third output parameters.
And step two, rotating a rotating part of the second device from the current angle along the measuring direction of the second magnetic encoder, and reading the output parameters of the second magnetic encoder every specified degree of rotation to obtain a plurality of fourth output parameters.
And step three, calculating the difference value of the output parameters of the second magnetic encoder when the rotating part of the second equipment rotates for a specified degree according to the third output parameters and the fourth output parameters, and taking the difference value as the difference value of the first output parameters.
And step four, calculating the absolute deviation of the difference value of each first output parameter to obtain each second absolute deviation.
And step five, dividing the value range of the second absolute deviation into M preset deviation gear intervals according to the second absolute deviations, wherein each preset deviation gear interval at least comprises one second absolute deviation.
And step six, counting the number of the second absolute deviations included in each preset deviation gear interval according to the numerical value of each searched second absolute deviation.
And step seven, obtaining the distribution probability of the second absolute deviation under each preset deviation gear interval as second data according to the total number of the second absolute deviations and the number of the second absolute deviations included in each preset deviation gear interval.
As described in the above embodiment, the second data under various environmental parameters may be collected to obtain the corresponding relationship between the environmental parameters and the second data.
In a possible implementation manner, the step S12 of comparing the first data with the preset second data to obtain an error includes:
aiming at any preset deviation gear interval, comparing whether the distribution probability of the first data and the second data under the preset deviation gear interval is the same or not to obtain an error, wherein the error represents whether the preset deviation gear interval with the first data distribution probability and the second data distribution probability which are different exists or not;
if the error is within the preset error range, the step S13 of determining that the accuracy of the first magnetic encoder is up to standard includes:
and if the error indicates that the preset deviation gear interval with the first data distribution probability different from the second data distribution probability does not exist, judging that the precision of the first magnetic encoder reaches the standard.
In a possible implementation manner, the step S12 of comparing the first data with the preset second data to obtain an error includes:
and S121, respectively calculating the difference value of the distribution probability of the first data and the second data in each preset deviation gear interval to obtain the corresponding difference value of each preset deviation gear interval.
And S122, carrying out weighted average on the difference values corresponding to the preset deviation gear intervals according to the weights corresponding to the preset deviation gear intervals to obtain errors.
And comparing the probability distribution represented by the first data with the probability distribution represented by the second data, and calculating the difference of the distribution probabilities of the first data and the second data in each preset deviation gear interval to obtain the difference corresponding to each preset deviation gear interval. And according to the weight corresponding to each preset deviation gear interval, carrying out weighted average on the difference corresponding to each preset deviation gear interval to obtain the error of the two. If the error is within the preset error range, judging that the precision of the first magnetic encoder reaches the standard; otherwise, the accuracy of the first magnetic encoder is not up to the standard. The weights corresponding to the preset deviation gear intervals may be the same or different, and may be set in a user-defined manner according to actual conditions, for example, the larger the distribution probability of the corresponding preset deviation gear interval in the second data is, the larger the corresponding weight may also be set.
In the embodiment of the application, the absolute deviation of each output parameter difference is utilized, the distribution probability of each absolute deviation in a preset deviation gear interval is counted to serve as the first data, the influence of accidental factors on the precision detection of the first magnetic encoder can be reduced, and the reliability of the precision detection of the first magnetic encoder is improved.
In a possible embodiment, referring to fig. 5, after comparing the first data with the preset second data to obtain an error, the method further includes:
s14, if the error between the first data and the second data is not within the predetermined error range, disabling the first magnetic encoder of the first device.
When the error between the first data and the second data is not within the preset error range, it is indicated that the accuracy detection of the first magnetic encoder does not reach the standard, and at this time, if the output result of the first magnetic encoder is continuously used for operation, the equipment may be damaged, so that the first magnetic encoder in the first equipment is forbidden, and the influence on the overall operation condition of the first equipment due to the inaccurate output parameter of the first magnetic encoder is reduced.
Optionally, when the error between the first data and the second data is not within the preset error range, one or more of the following operations may be further performed:
1) and displaying the failure information of magnetic encoding precision detection in an OSD (On-Screen Display) menu.
2) And related data detected by the first magnetic encoder is automatically stored in a memory of the equipment, and is not lost when power is down.
3) And checking and exporting related data detected by the accuracy of the first magnetic encoder through an external tool by utilizing a reserved abnormal inquiry interface of the equipment, so as to further investigate the reason of the abnormality.
The following description will be made specifically by taking the accuracy detection of the magnetic encoder in the horizontal direction of the ball machine as an example:
1. screening out a standard ball machine with the magnetic encoder precision meeting the product requirement in the horizontal direction by using an external professional testing device in advance;
2. the horizontal movement range of the lens of the standard ball machine is 360 degrees, the lens of the standard ball machine is operated at a low speed and a constant speed along the horizontal direction, the specified degree is set to be 0.5 degree, namely the reading angle interval is 0.5 degree, and the output parameters of the magnetic encoder at each position in the movement range are read one by one;
3. and calculating the absolute deviation of the output parameters of the adjacent angle positions, dividing the absolute deviation into a plurality of gears, counting the distribution probability of the absolute deviation under each gear, taking the data as second data, and then solidifying the second data into the ball machines of the same type.
4. When the ball machines of the same type are powered on, entering a magnetic encoder precision detection mode;
5. executing the processes of the steps 2 and 3 aiming at the ball machine under the current test to obtain first data of the magnetic encoder;
6. comparing the first data and the second data of the ball machine under the current test, if the first data and the second data are matched, the magnetic encoder of the ball machine under the current test passes the test, otherwise, the test fails;
7. if the test fails, after the self-check of the dome camera is finished, OSD displays the test failure information of the magnetic encoder and maintains for a period of time, meanwhile, the function of the magnetic encoder is closed, and first data and other detection information are stored in an internal memory of the dome camera;
8. and after the magnetic encoder precision detection process is finished, the magnetic encoder precision detection mode is exited, and the ball machine executes other preset operations.
In the embodiment of the application, the ball machine with the magnetic encoder having the standard precision is used for measuring the second data in advance, the second data are stored in the ball machine with the same model, in the subsequent process, the ball machine to be tested performs self-detection to obtain the first data, and the precision detection of the magnetic encoder of the ball machine to be tested is completed through the second data and the first data. The starting detection of the magnetic encoder of the ball machine with the same model can be realized only by extracting the second data of the ball machine once in an offline manner in advance, so that the reliability of the ball machine product is improved. When the accuracy of the magnetic encoder of the ball machine to be tested is detected subsequently, the accuracy of the magnetic encoder can be detected without depending on external professional testing devices such as a photoelectric encoder, the mounted ball machine does not need to be dismounted and returned to a factory for detection, the detection cost of the magnetic encoder in the equipment is greatly saved, and the accuracy detection efficiency is high.
The embodiment of the present application further provides an apparatus for detecting accuracy of a magnetic encoder in a device, referring to fig. 6, the apparatus includes:
a first data obtaining module 101, configured to rotate a rotating component of a first device by a specified degree along a measuring direction of a first magnetic encoder, and obtain a difference between output parameters of the first magnetic encoder before and after the rotating component rotates by the specified degree, so as to obtain first data, where the first magnetic encoder is configured to measure an angular displacement of the rotating component of the first device;
a data error obtaining module 102, configured to compare the first data with preset second data to obtain an error, where the second data is obtained according to a parameter difference of a second magnetic encoder, where the parameter difference is a difference between output parameters of the second magnetic encoder before and after a rotating component of a second device rotates by the specified degree along a measuring direction of the second magnetic encoder, the second magnetic encoder is configured to measure an angular displacement of the rotating component of the second device, the second device is the same as the first device in model, and a measurement accuracy of the second magnetic encoder meets a preset accuracy standard requirement;
and the accuracy standard-reaching judging module 103 is configured to judge that the accuracy of the first magnetic encoder is up to standard if the error is within a preset error range.
In a possible embodiment, the above apparatus further comprises:
a second data obtaining module, configured to obtain a current environmental parameter of the first device, where the environmental parameter includes at least one of voltage and temperature; and acquiring preset second data corresponding to the current environmental parameters.
In a possible embodiment, the above apparatus further comprises:
the second equipment acquisition module is used for obtaining second equipment with the second magnetic encoder measurement precision meeting the preset precision standard requirement by utilizing the measurement of the photoelectric encoder, wherein the precision of the photoelectric encoder is 2 times or more than that of the required first magnetic encoder;
and the parameter difference value acquisition module is used for respectively rotating the rotating part of the second equipment by the specified degrees along the measuring direction of the second magnetic encoder under various preset environment parameters, acquiring the difference value of the output parameters of the second magnetic encoder before and after the specified degrees, and acquiring second data corresponding to each preset environment parameter.
In a possible implementation manner, the error includes a plurality of values, and the accuracy compliance determining module is specifically configured to: and if all the numerical values of the errors are within the preset error range, judging that the precision of the first magnetic encoder reaches the standard.
In a possible implementation manner, the first data obtaining module 101 includes:
the first output parameter acquisition submodule is used for acquiring the output parameters of a first magnetic encoder of a rotating part of first equipment at a current angle when the precision of the first magnetic encoder in the first equipment is detected, so as to obtain first output parameters;
a second output parameter obtaining submodule configured to rotate a rotating member of the first device from a current angle in a measurement direction of the first magnetic encoder, and read an output parameter of the first magnetic encoder every time the rotating member rotates by the specified degree, so as to obtain a plurality of second output parameters;
and the output parameter difference value calculating submodule is used for calculating the difference value of the output parameters of the first magnetic encoder when the rotating part of the first equipment rotates for the specified degrees according to the first output parameters and the second output parameters to obtain first data.
In a possible implementation manner, the output parameter difference calculation submodule is specifically configured to: calculating a difference in output parameters of the first magnetic encoder for each rotation of the rotary member of the first apparatus by the predetermined number of degrees, based on the first output parameter and each of the second output parameters, as each output parameter difference; calculating the absolute deviation of the difference value of each output parameter; counting the number of the absolute deviations included in each preset deviation gear interval according to the numerical value of each absolute deviation; and obtaining the distribution probability of the absolute deviation in each preset deviation gear interval as the first data according to the total number of the absolute deviations and the number of the absolute deviations included in each preset deviation gear interval.
In a possible implementation manner, the data error obtaining module is specifically configured to: respectively calculating the difference value of the distribution probability of the first data and the second data under each preset deviation gear interval to obtain the corresponding difference value of each preset deviation gear interval; and according to the weight corresponding to each preset deviation gear interval, carrying out weighted average on the difference corresponding to each preset deviation gear interval to obtain an error.
In a possible implementation manner, the data error obtaining module is specifically configured to: comparing whether the distribution probability of the first data and the distribution probability of the second data in any preset deviation gear interval are the same or not to obtain an error, wherein the error represents whether the preset deviation gear interval with the first data distribution probability and the second data distribution probability different exists or not;
above-mentioned precision judgement module up to standard specifically is used for: and if the error indicates that a preset deviation gear interval with a first data distribution probability different from a second data distribution probability does not exist, judging that the accuracy of the first magnetic encoder reaches the standard.
In a possible embodiment, the current angle is an initial angle of a rotating component of the first device, and the second output parameter obtaining submodule is specifically configured to: and rotating the rotating part of the first device at a constant speed from the initial angle along the measuring direction of the first magnetic encoder, and reading the output parameters of the first magnetic encoder every time the rotating part rotates for the specified degrees until the rotating part of the first device rotates to the maximum rotation angle, so as to obtain a plurality of second output parameters.
In a possible embodiment, the above apparatus further comprises: and the precision detection triggering module is used for triggering the operation of the first data acquisition module in the power-on stage of the first equipment.
In a possible embodiment, the above apparatus further comprises: and a magnetic encoder disabling module configured to disable the first magnetic encoder of the first device if an error between the first data and the second data is not within the predetermined error range.
An electronic device is also provided in the embodiments of the present application, see fig. 7, including a processor 201, a memory 202, a rotating component 203, and a first magnetic encoder 204;
the first magnetic encoder 204 is configured to measure a rotational displacement (also referred to as an angular position) of the rotating member 203 in a rotational direction;
the memory 202 is used for storing computer programs;
the processor 201 is configured to implement the method for detecting the accuracy of the magnetic encoder in any of the above-mentioned apparatuses when executing the program stored in the memory 202.
Optionally, each component in the electronic device may perform data interaction through a communication bus.
Specifically, the electronic device may be a dome camera or an unmanned aerial vehicle. When electronic equipment is ball machine or unmanned aerial vehicle, can also include other functional component of ball machine or unmanned aerial vehicle among the prior art among the electronic equipment, all be in the protection scope of this application.
The communication bus mentioned in the electronic device may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a RAM (Random Access Memory) or an NVM (Non-Volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method for detecting the accuracy of a magnetic encoder in any one of the above devices is implemented.
In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method for detecting the accuracy of a magnetic encoder in any one of the above-mentioned embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It should be noted that, in this document, the technical features in the various alternatives can be combined to form the scheme as long as the technical features are not contradictory, and the scheme is within the scope of the disclosure of the present application. Relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the electronic device, and the storage medium, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (10)

1. A method for detecting accuracy of a magnetic encoder in a device, the method comprising:
rotating a rotating part of first equipment by a specified degree along the measuring direction of a first magnetic encoder, and acquiring a difference value of output parameters of the first magnetic encoder before and after the specified degree is rotated to obtain first data, wherein the first magnetic encoder is used for measuring the angular displacement of the rotating part of the first equipment;
comparing the first data with preset second data to obtain an error, wherein the second data is obtained according to a parameter difference value of a second magnetic encoder, the parameter difference value is a difference value of output parameters of the second magnetic encoder before and after a rotating part of second equipment rotates for the specified degree along a measuring direction of the second magnetic encoder, the second magnetic encoder is used for measuring the angular displacement of the rotating part of the second equipment, the model of the second equipment is the same as that of the first equipment, and the measuring precision of the second magnetic encoder meets the requirement of a preset precision standard;
and if the error is within a preset error range, judging that the precision of the first magnetic encoder reaches the standard.
2. The method of claim 1, wherein prior to said comparing said first data with preset second data, said method further comprises:
acquiring current environmental parameters of the first device, wherein the environmental parameters comprise at least one of voltage and temperature;
and acquiring preset second data corresponding to the current environmental parameters.
3. The method of claim 2, further comprising:
measuring by using a photoelectric encoder to obtain second equipment with the measurement precision of a second magnetic encoder meeting the requirement of a preset precision standard, wherein the precision of the photoelectric encoder is 2 times or more of the precision of the required first magnetic encoder;
and under various preset environmental parameters, respectively rotating the rotating part of the second device by the specified degrees along the measuring direction of the second magnetic encoder, and acquiring the difference value of the output parameters of the second magnetic encoder before and after the specified degrees is rotated to obtain second data corresponding to each preset environmental parameter.
4. The method of claim 1, wherein the error comprises a plurality of values, and wherein determining that the accuracy of the first magnetic encoder is within a predetermined error range comprises:
and if all numerical values of the errors are within the preset error range, judging that the precision of the first magnetic encoder reaches the standard.
5. The method of claim 1, wherein rotating a rotating component of the first device a specified number of degrees in a measurement direction of the first magnetic encoder, and obtaining a difference in an output parameter of the first magnetic encoder between before and after the specified number of degrees of rotation, resulting in the first data, comprises:
when the precision of a first magnetic encoder in first equipment is detected, acquiring output parameters of the first magnetic encoder of a rotating component of the first equipment at a current angle to obtain first output parameters;
rotating a rotating part of the first device from a current angle along the measuring direction of the first magnetic encoder, and reading output parameters of the first magnetic encoder every time the rotating part rotates for the specified degree to obtain a plurality of second output parameters;
and calculating the difference value of the output parameters of the first magnetic encoder when the rotating part of the first equipment rotates for the specified degrees according to the first output parameters and the second output parameters to obtain first data.
6. The method of claim 5, wherein calculating a difference in the first magnetic encoder output parameter for each of the specified degrees of rotation of the rotating component of the first device based on the first output parameter and each of the second output parameters to obtain first data comprises:
calculating a difference value of the output parameters of the first magnetic encoder every time a rotating part of the first device rotates by the specified degree according to the first output parameter and each second output parameter, and taking the difference value as each output parameter difference value;
calculating the absolute deviation of the difference value of each output parameter;
counting the number of the absolute deviations included in each preset deviation gear interval according to the numerical value of each absolute deviation;
and obtaining the distribution probability of the absolute deviation under each preset deviation gear interval as the first data according to the total number of the absolute deviations and the number of the absolute deviations included in each preset deviation gear interval.
7. The method of claim 5, wherein the current angle is an initial angle of a rotating component of the first device, and wherein rotating the rotating component of the first device from the current angle in a measurement direction of the first magnetic encoder reads the output parameters of the first magnetic encoder every specified number of degrees to obtain a plurality of second output parameters comprises:
and rotating the rotating part of the first device at a constant speed from the initial angle along the measuring direction of the first magnetic encoder, and reading the output parameters of the first magnetic encoder every time the rotating part rotates for the specified degree until the rotating part of the first device rotates to the maximum rotation angle, so as to obtain a plurality of second output parameters.
8. The method of claim 5, further comprising:
and triggering the detection of the precision of a first magnetic encoder in the first equipment in the power-on stage of the first equipment.
9. The method of claim 1, wherein after comparing the first data with a predetermined second data to obtain an error, the method further comprises:
and if the error is not within the preset error range, disabling the first magnetic encoder in the first device.
10. An electronic device comprising a processor, a memory, a rotating component, and a first magnetic encoder;
the first magnetic encoder is used for measuring the rotary displacement of the rotary component in the rotary direction;
the memory is used for storing a computer program;
the processor is configured to implement the method for detecting the accuracy of the magnetic encoder in the apparatus according to any one of claims 1 to 9 when executing the program stored in the memory.
CN202010501618.1A 2020-06-04 2020-06-04 Method for detecting precision of magnetic encoder in equipment and electronic equipment Active CN113758513B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010501618.1A CN113758513B (en) 2020-06-04 2020-06-04 Method for detecting precision of magnetic encoder in equipment and electronic equipment
PCT/CN2021/094360 WO2021244278A1 (en) 2020-06-04 2021-05-18 Accuracy detection method for magnetic encoder in device, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010501618.1A CN113758513B (en) 2020-06-04 2020-06-04 Method for detecting precision of magnetic encoder in equipment and electronic equipment

Publications (2)

Publication Number Publication Date
CN113758513A true CN113758513A (en) 2021-12-07
CN113758513B CN113758513B (en) 2022-11-04

Family

ID=78783761

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010501618.1A Active CN113758513B (en) 2020-06-04 2020-06-04 Method for detecting precision of magnetic encoder in equipment and electronic equipment

Country Status (2)

Country Link
CN (1) CN113758513B (en)
WO (1) WO2021244278A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114563033A (en) * 2022-03-01 2022-05-31 杭州保威电子科技有限公司 Motor encoder installation precision detection method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105651324A (en) * 2014-12-02 2016-06-08 日本电产三协株式会社 Correction table generating apparatus, encoder and correction table generating method
DE102016101965A1 (en) * 2016-02-04 2017-08-10 Fraba B.V. Method for calibrating a rotary encoder and rotary encoder for determining a corrected angular position
JP2017161391A (en) * 2016-03-10 2017-09-14 日本電産サンキョー株式会社 Rotary encoder and method for correcting angle of rotary encoder
CN109000702A (en) * 2018-05-16 2018-12-14 苏州汇川技术有限公司 Encoder corrects system and method
CN109579880A (en) * 2018-12-26 2019-04-05 上海英威腾工业技术有限公司 Magnetic coder with adaptive equalization function
CN109791058A (en) * 2016-08-23 2019-05-21 弗瑞柏私人有限公司 Calibrate the method and rotary encoder of rotary encoder
CN109870177A (en) * 2019-02-15 2019-06-11 广州极飞科技有限公司 Magnetic coder and its calibration method and calibrating installation, motor and unmanned vehicle
CN110940371A (en) * 2019-12-13 2020-03-31 浙江禾川科技股份有限公司 Calibration method, device and equipment of rotary magnetoelectric encoder

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4277887B2 (en) * 2006-08-22 2009-06-10 パナソニック株式会社 Encoder signal correction circuit
JP5671255B2 (en) * 2009-06-30 2015-02-18 Ntn株式会社 Rotation angle detection device for motor for driving automobile and bearing with rotation angle detection device
JP6425881B2 (en) * 2013-11-21 2018-11-21 Ntn株式会社 Abnormal condition detection device for automobile tire
CN106679710B (en) * 2017-02-08 2020-03-10 亿航智能设备(广州)有限公司 Magnetic encoder calibration method and system
CN109708681A (en) * 2019-02-19 2019-05-03 深圳市盛泰奇科技有限公司 Encoder calibration method and device
CN210165982U (en) * 2019-08-27 2020-03-20 浙江伺御智能科技有限公司 Correcting device for magnetic encoder

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105651324A (en) * 2014-12-02 2016-06-08 日本电产三协株式会社 Correction table generating apparatus, encoder and correction table generating method
DE102016101965A1 (en) * 2016-02-04 2017-08-10 Fraba B.V. Method for calibrating a rotary encoder and rotary encoder for determining a corrected angular position
JP2017161391A (en) * 2016-03-10 2017-09-14 日本電産サンキョー株式会社 Rotary encoder and method for correcting angle of rotary encoder
CN107179095A (en) * 2016-03-10 2017-09-19 日本电产三协株式会社 The angle correction method of rotary encoder and rotary encoder
CN109791058A (en) * 2016-08-23 2019-05-21 弗瑞柏私人有限公司 Calibrate the method and rotary encoder of rotary encoder
CN109000702A (en) * 2018-05-16 2018-12-14 苏州汇川技术有限公司 Encoder corrects system and method
CN109579880A (en) * 2018-12-26 2019-04-05 上海英威腾工业技术有限公司 Magnetic coder with adaptive equalization function
CN109870177A (en) * 2019-02-15 2019-06-11 广州极飞科技有限公司 Magnetic coder and its calibration method and calibrating installation, motor and unmanned vehicle
CN110940371A (en) * 2019-12-13 2020-03-31 浙江禾川科技股份有限公司 Calibration method, device and equipment of rotary magnetoelectric encoder

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114563033A (en) * 2022-03-01 2022-05-31 杭州保威电子科技有限公司 Motor encoder installation precision detection method
CN114563033B (en) * 2022-03-01 2023-09-05 杭州保威电子科技有限公司 Motor encoder installation accuracy detection method

Also Published As

Publication number Publication date
WO2021244278A1 (en) 2021-12-09
CN113758513B (en) 2022-11-04

Similar Documents

Publication Publication Date Title
US9013179B2 (en) Angle detecting device
CN111197954B (en) Absolute position measuring method and device of machine, storage medium and machine
CN107614214A (en) Trouble-shooter and method for diagnosing faults
CN113758513B (en) Method for detecting precision of magnetic encoder in equipment and electronic equipment
KR20180067546A (en) Steering angle sensor with functional safety
CN109211268A (en) A kind of gauge pointer calibration method, device and computer readable storage medium
US8870057B2 (en) System and method for equipment monitoring component configuration
JP2015517668A (en) Method for evaluating the rotational speed of a tool mounted on a rotating spindle of a machine tool and such a machine tool
JP2016217950A (en) Encoder, controller, motor control system, robot control system, robot, data transmission method and rotation number comparison method
US10571886B2 (en) Machine tool control device having function of diagnosing malfunction in sensor for detecting one-rotation signal
CN105209856A (en) Dynamically calibrating magnetic sensors
US20130241734A1 (en) System and method for detecting improper wiring or configuration in a monitoring system
CN109073422B (en) Method for determining an angle error between a rotation angle value and a reference value
CN113672996B (en) Data processing method, device and equipment applied to blockchain
US11156650B2 (en) State detecting system and state detecting method
CN102261890A (en) Rotation angle measuring equipment
CN115808195A (en) Remote maintenance method, device, equipment and medium for sensing monitoring equipment
CN113608953A (en) Test data generation method and device, electronic equipment and readable storage medium
CN111256728B (en) Optical fiber strapdown system checking method, device, equipment and storage medium
JP2021009134A (en) Encoder and encoder operating method
CN110514168B (en) Blade installation angle measuring method and device, storage medium and electronic equipment
EP4258070A1 (en) Abnormality diagnosis system and abnormality diagnosis method
CN113848079A (en) Fault detection method and device of CT rotation angle information system and computer equipment
CN115031760A (en) Method and system for determining speed precision and stability of rotary table
KR20160139751A (en) Rate of turn indicator system and method using a compass

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
GR01 Patent grant
GR01 Patent grant