CN115086551A - Corresponding relation, motor displacement obtaining method and system and motor driving chip - Google Patents

Corresponding relation, motor displacement obtaining method and system and motor driving chip Download PDF

Info

Publication number
CN115086551A
CN115086551A CN202210611776.1A CN202210611776A CN115086551A CN 115086551 A CN115086551 A CN 115086551A CN 202210611776 A CN202210611776 A CN 202210611776A CN 115086551 A CN115086551 A CN 115086551A
Authority
CN
China
Prior art keywords
fitted
points
point
displacement
motor
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
Application number
CN202210611776.1A
Other languages
Chinese (zh)
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.)
Shanghai Awinic Technology Co Ltd
Original Assignee
Shanghai Awinic 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 Shanghai Awinic Technology Co Ltd filed Critical Shanghai Awinic Technology Co Ltd
Priority to CN202210611776.1A priority Critical patent/CN115086551A/en
Publication of CN115086551A publication Critical patent/CN115086551A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)

Abstract

The application discloses a corresponding relation, a motor displacement obtaining method and system, a motor driving chip and a shooting module. The corresponding relation obtaining method comprises the following steps: s110, acquiring a plurality of points to be fitted and turning degree parameters of each point to be fitted, wherein two coordinate parameters of the points to be fitted comprise an output signal of a Hall sensor and motor displacement corresponding to the output signal; s120, identifying the maximum n-1 turning degree parameters, and determining points to be fitted corresponding to the maximum n-1 turning degree parameters as segmentation reference points; s130, dividing all the points to be fitted into n sections according to the segmented reference points; s140, respectively fitting the n sections of points to be fitted to obtain n corresponding relations. The method and the device can improve the accuracy and the real-time performance of the motor displacement acquisition process.

Description

Corresponding relation, motor displacement obtaining method and system and motor driving chip
Technical Field
The application relates to the technical field of data processing, in particular to a corresponding relation, a motor displacement obtaining method and system, a motor driving chip and a shooting module.
Background
The shooting function is an important function of intelligent terminals such as mobile phones, the subjective influence of the performance of the shooting function on users is great, and the quality of the shooting quality also influences the market sale condition of corresponding products.
In the shooting process, a shot picture can be blurred to a certain degree due to slight shake of hand muscles or slight vibration caused by an external environment, in order to reduce the blur caused by the shake to a certain degree, some schemes can introduce an OIS (optical image stabilizer) technology, the key of an OIS anti-shake algorithm is a closed-loop control circuit, the precision of the control circuit depends on the feedback of a Hall sensor, and accurate acquisition of the displacement of a corresponding motor according to a signal output by the Hall sensor is an important guarantee of the anti-shake function. When the traditional scheme acquires the corresponding relation between the output signal of the Hall sensor and the displacement of the motor, the problem of low real-time performance often exists.
Disclosure of Invention
In view of this, the present application provides a correspondence relationship, a motor displacement obtaining method and system, a motor driving chip, and a shooting module, so as to solve the problem that the real-time performance is often low when the correspondence relationship between the output signal of the hall sensor and the motor displacement is obtained in the conventional scheme.
The application provides a corresponding relation obtaining method, which comprises the following steps:
s110, acquiring a plurality of points to be fitted and turning degree parameters of each point to be fitted, wherein two coordinate parameters of the points to be fitted comprise an output signal of a Hall sensor and motor displacement corresponding to the output signal;
s120, identifying the maximum n-1 turning degree parameters, and determining points to be fitted corresponding to the maximum n-1 turning degree parameters as segmentation reference points;
s130, dividing all the points to be fitted into n sections according to the segmented reference points;
s140, respectively fitting the n sections of points to be fitted to obtain n corresponding relations.
Optionally, the acquiring a plurality of points to be fitted and turning degree parameters of each of the points to be fitted includes: identifying a first point corresponding to the maximum value of the motor displacement and a second point corresponding to the minimum value of the motor displacement in each point to be fitted; determining a starting point according to the first point, and determining an end point according to the second point; and respectively calculating each turning degree parameter according to the starting point, the end point and each point to be fitted between the starting point and the end point.
Optionally, the motor displacement maximum value is greater than 0, and the motor displacement minimum value is less than 0; determining a starting point according to the first point, and determining an ending point according to the second point includes: determining a first margin and a second margin, the first margin being a first proportion of the motor displacement maximum value and the second margin being a second proportion of the motor displacement minimum value; determining a first reference displacement according to a difference between the motor displacement maximum value and the first margin value, and determining a second reference displacement according to a difference between the motor displacement minimum value and the second margin value; and determining a first point to be fitted, at which the motor displacement is smaller than or equal to the first reference displacement, as the starting point, and determining a first point to be fitted, at which the motor displacement is greater than or equal to the second reference displacement, as the ending point.
Optionally, the turning degree parameter includes a second order differential of the corresponding point to be fitted among all the points to be fitted.
Optionally, the identifying the maximum n-1 turning degree parameters, and determining the points to be fitted corresponding to the maximum n-1 turning degree parameters as the segment reference points includes: and sequencing the turning degree parameters in a descending order according to the sizes, and determining points to be fitted corresponding to the n-1 turning degree parameters arranged in front as the segmentation reference points.
Optionally, after identifying the maximum n-1 turning degree parameters and determining the points to be fitted corresponding to the maximum n-1 turning degree parameters as the segment reference points, the method further includes: s150, selecting at least one group of fitting points with the distance smaller than a set distance from the segmented reference point and the head and tail points to be fitted to obtain at least one group of target points; s160, merging the target points of each group into a segmentation reference point, and identifying m segmentation reference points which are reduced in the merging process; s170, selecting the largest m turning degree parameters from the turning degree parameters except the largest n-1 turning degree parameters as segmentation parameters, determining points to be fitted corresponding to the segmentation parameters as new segmentation reference points so as to enable the number of the segmentation reference points to be n-1, and returning to execute the step S130.
Optionally, before the acquiring a plurality of points to be fitted and turning degree parameters of each of the points to be fitted, the method further includes: and respectively measuring the corresponding motor displacement when the Hall sensor outputs each output signal, and determining each point to be fitted according to each output signal and the corresponding motor displacement.
The application also provides a motor displacement obtaining method, which comprises the following steps:
acquiring at least one section of corresponding relation between the output signal of the Hall sensor and the displacement of the motor by adopting any corresponding relation acquisition method;
acquiring a real-time signal output by the Hall sensor, and identifying the corresponding relation of the real-time signal to obtain a target corresponding relation;
and determining the current motor displacement according to the corresponding displacement of the real-time signal in the target corresponding relation.
The present application further provides a system for acquiring a correspondence relationship, including:
the device comprises a first acquisition module, a second acquisition module and a control module, wherein the first acquisition module is used for acquiring a plurality of points to be fitted and turning degree parameters of each point to be fitted, and two coordinate parameters of the points to be fitted comprise an output signal of a Hall sensor and motor displacement corresponding to the output signal;
the identification module is used for identifying the maximum n-1 turning degree parameters and determining the points to be fitted corresponding to the maximum n-1 turning degree parameters as the segmentation reference points;
the dividing module is used for dividing all the points to be fitted into n sections according to the segmented reference points;
and the fitting module is used for respectively fitting n sections of the points to be fitted to obtain n corresponding relations.
The present application further provides a motor displacement acquisition system, including:
the second acquisition module is used for acquiring at least one section of corresponding relation between the output signal of the Hall sensor and the displacement of the motor by adopting any one corresponding relation acquisition system;
the third acquisition module is used for acquiring the real-time signals output by the Hall sensor, identifying the corresponding relation of the real-time signals and acquiring the target corresponding relation;
and the determining module is used for determining the current motor displacement according to the corresponding displacement of the real-time signal in the target corresponding relation.
The application also provides a motor driving chip, which comprises a processor and a storage medium; the storage medium having program code stored thereon; the processor is configured to call the program code stored in the storage medium to execute any one of the correspondence obtaining methods or any one of the motor displacement obtaining methods.
The application also provides a shooting module, which comprises the Hall sensor, the motor and any one of the motor driving chips.
The corresponding relation, the motor displacement obtaining method and system, the motor driving chip and the shooting module set, which are provided by the application, identify the maximum n-1 turning degree parameters by obtaining a plurality of points to be fitted and the turning degree parameters of the points to be fitted, respectively determine the points to be fitted corresponding to the maximum n-1 turning degree parameters as the segmented reference points, so that the n-1 segmented reference points are determined according to the overall characteristics of all the points to be fitted, have higher accuracy, divide all the points to be fitted into n segments according to the n-1 segmented reference points so as to shorten the length of each segment of the points to be fitted, reduce the influence of related noise, prevent the problems of interference in the fitting process such as over-fitting and the like, respectively fit the n segments of the points to be fitted to obtain n corresponding relations, and the n corresponding relations can more accurately represent the data trend between the output signals of the Hall sensor and the displacement of the motor, the precision is higher; the process of calculating the motor displacement corresponding to the output signal of the Hall sensor according to the n corresponding relations is simpler and more efficient, and the accuracy and the real-time performance of the motor displacement obtaining process can be improved.
The starting point is selected within the first point, the ending point is selected within the second point, gaps are formed between the determined starting point and the determined ending point and the extreme position of the displacement of the motor respectively, and in the process of controlling the motor according to the corresponding relation obtained subsequently, the motor can be prevented from colliding with the wall at the positions of the two ends, and the effect in the control process of the related motor is improved.
In addition, the target points with the mutual distances smaller than the set distance are combined into a segmented reference point, so that the over-fitting phenomenon in the subsequent fitting process can be avoided, and the effectiveness of the subsequent fitting process is improved; the method can also identify m segment reference points reduced in the merging process, and continuously select the largest m segment degree parameters as segment parameters from the segment degree parameters except the segment degree parameters corresponding to the previously selected n-1 segment reference points to determine the segment reference points corresponding to the segment parameters, so that the number of the segment reference points is still n-1, thus the new n-1 segment reference points and the head and tail two points to be fitted can still divide all the points to be fitted into n linear intervals together, the stability of the dividing process among the n linear intervals can be ensured, and the stability of the linear fitting among the subsequent segments can be ensured.
Therefore, the method and the device can improve the stability, accuracy and real-time performance of the corresponding relation in the process of obtaining the corresponding relation from multiple aspects, thereby improving the accuracy and real-time performance of the motor displacement obtaining process and improving the driving performance of the motor.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a corresponding relationship obtaining method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a fitting point according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a corresponding relationship obtaining method according to another embodiment of the present application;
FIG. 4 is a diagram illustrating simulation corresponding to points to be fitted in an embodiment of the present application;
FIG. 5 is a schematic diagram of a simulation corresponding to an interval to be fitted in an embodiment of the present application;
FIGS. 6a and 6b are schematic diagrams of the fitting results of an embodiment of the present application;
FIGS. 7a and 7b are schematic diagrams of the fitting results of an embodiment of the present application;
FIG. 8 is a schematic flow chart illustrating a motor displacement obtaining method according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a correspondence relation obtaining system according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a motor displacement acquisition system according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a motor driving chip according to an embodiment of the present application.
Detailed Description
The inventor researches an OIS anti-shake scheme, and finds that when the corresponding relation between the output signal of the Hall sensor and the displacement of the motor is determined, some schemes adopt a least square method to fit a curve into a known objective function form, for example, a DAC (analog signal corresponding to the output signal of the Hall sensor) is set to drive the motor to move by stepping 1 within the range of 0-4095, and the displacement of the Hall ADC (digital signal representing the output signal of the Hall sensor) and the motor is recorded, so that a one-to-one mapping relation between the Hall ADC and the displacement of the motor is obtained, the mapping table is directly searched through the mapping table in a closed loop, the mapping table needs to be written into a flash, the storage space needed by the schemes is large, and data is easy to be over-fitted. In the scheme, a section of fluctuating curve is fitted into a section of smooth curve through a neural network, and particularly, a relation curve of the Hall ADC and the motor displacement is fitted through the neural network. The inventor also finds that data fitted by using a least square method cannot sufficiently feed back real data in some feedback with higher precision requirements, and a neural network is easy to over-fit and needs more fitting parameters, so that the neural network is not suitable for some systems with higher requirements on memory occupation and calculation performance.
Aiming at the problems, the method determines n-1 segmentation reference points according to the overall characteristics of all points to be fitted, divides all the points to be fitted into n sections according to the n-1 segmentation reference points so as to shorten the length of each section of the points to be fitted, can reduce the influence of related noise, prevents the problems of interference in the fitting process such as overfitting and the like, then respectively fits the n sections of the points to be fitted to obtain n corresponding relations, the n corresponding relations can more accurately represent the data trend between the output signals of the Hall sensors and the motor displacement, the method has higher precision, the process of calculating the motor displacement corresponding to the output signals of the Hall sensors according to the n corresponding relations is simpler and more efficient, the accuracy and the real-time performance of the motor displacement obtaining process can be improved, and the corresponding calculation precision and the system performance are improved.
The technical solutions in the embodiments of the present application are clearly and completely described below with reference to the accompanying drawings, 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. The following embodiments and their technical features may be combined with each other without conflict.
In a first aspect of the present application, a method for obtaining a correspondence relationship is provided, and as shown in fig. 1, the method for obtaining a correspondence relationship includes S110 to S140.
S110, a plurality of points to be fitted and turning degree parameters of each point to be fitted are obtained, and two coordinate parameters of the points to be fitted comprise an output signal of the Hall sensor and motor displacement corresponding to the output signal.
The points to be fitted have a corresponding relationship with the output signals of the hall sensor, for example, one point to be fitted corresponds to one output signal. Specifically, the point to be fitted is a two-dimensional coordinate point and comprises two coordinate parameters, one coordinate parameter represents an output signal of the hall sensor, and the other coordinate parameter represents motor displacement corresponding to the output signal.
The turning degree parameters comprise parameters for representing the turning degree (or the turning degree) of the corresponding point to be fitted relative to the front point and the rear point to be fitted; and according to the turning degree parameter of each point to be fitted, at least one linear interval corresponding to each point to be fitted can be accurately identified.
S120, identifying the maximum n-1 turning degree parameters, and determining points to be fitted corresponding to the maximum n-1 turning degree parameters as segmentation reference points; n can be set according to the acquisition precision requirement of the corresponding relation, the precision requirement can be in direct proportion to the value of n, and in the acquisition process of some corresponding relations, n can be 8 or 16 equivalent values, so that the calculation amount in the acquisition precision of the corresponding relations is reduced on the basis of ensuring the acquisition precision of the corresponding relations, and the acquisition efficiency is improved.
S130, dividing all the points to be fitted into n sections according to the segmented reference points.
In the step S130, n +1 points to be fitted are determined by adding the head and the tail of the n-1 segmented reference points to the two points to be fitted, the n +1 points to be fitted divide all the points to be fitted into n segments, and the points to be fitted included in each segment are in an approximately linear relationship. Referring to fig. 2, the step S130 is described by taking 3 segmentation reference points as an example, the first segmentation reference point 1312, the second segmentation reference point 1313, the third segmentation reference point 1314, the fourth point to be fitted 1311 located at the starting position, and the fifth point to be fitted 1315 located at the ending position, 5 points to be fitted in total divide all the points to be fitted into 4 segments, i.e., a first segment between the fourth point to be fitted 1311 and the first segment reference point 1312, a second segment between the first segment reference point 1312 and the second segment reference point 1313, a third segment between the second segment reference point 1313 and the third segment reference point 1314, a fifth segment between the third segment reference point 1314 and the fifth point to be fitted 1315, as can be seen from fig. 2, among the divided segments, the relation between the corresponding fitting points is closer to the linear relation, and the fitting of each segment respectively has higher fitting precision.
S140, respectively fitting the n sections of points to be fitted to obtain n corresponding relations.
In the step S140, each linear interval may be respectively fitted by using a fitting method such as linear fitting, for example, a fitting parameter is obtained by using a principle that a gradient of a relevant linear algebraic sum function at a minimum value is 0, and a corresponding linear interval is fitted by using the fitting parameter, so as to obtain each corresponding relationship. The method has the advantages that n sections of points to be fitted which are approximate to a linear relation are respectively fitted, fitting efficiency and fitting precision are high, n corresponding relations with high precision can be obtained, and according to the n corresponding relations, when the output signals of the Hall sensor are obtained, the motor displacement corresponding to the output signals can be quickly and accurately obtained, so that the real-time performance of the motor displacement obtaining process can be improved.
The corresponding relation obtaining method identifies the maximum n-1 turning degree parameters by obtaining a plurality of points to be fitted and the turning degree parameters of each point to be fitted, determines the points to be fitted corresponding to the maximum n-1 turning degree parameters as the segmentation reference points respectively, ensures that the n-1 segmentation reference points are determined according to the overall characteristics of all the points to be fitted, has higher accuracy, dividing all points to be fitted into n sections according to n-1 segmented reference points to shorten the length of each section of points to be fitted, reducing the influence of related noise and preventing the problems of interference in the fitting process such as overfitting and the like, respectively fitting the n sections of points to be fitted into n sections to obtain n corresponding relations, the n corresponding relations can more accurately represent the data trend between the output signals of the Hall sensors and the displacement of the motor, and have higher precision; the process of calculating the motor displacement corresponding to the output signal of the Hall sensor according to the n corresponding relations is simpler and more efficient, and the accuracy and the real-time performance of the motor displacement obtaining process can be improved.
In one embodiment, corresponding to the step S110, the acquiring a plurality of points to be fitted and turning degree parameters of each of the points to be fitted includes:
identifying a first point corresponding to the maximum value of the motor displacement and a second point corresponding to the minimum value of the motor displacement in each point to be fitted, wherein the first point and the second point are two end points of all the fitted points;
determining a starting point according to the first point, and determining an end point according to the second point;
and respectively calculating each turning degree parameter according to the starting point, the end point and each point to be fitted between the starting point and the end point.
In this embodiment, the starting point is determined according to the first point, the ending point is determined according to the second point, and each turning degree parameter is calculated according to the starting point, the ending point and each point to be fitted between the starting point and the ending point, so that the validity of the obtained turning degree parameter can be ensured.
Alternatively, the first point and the second point are two end points of all the fitting points, and for the first point and the second point, if the side where the point to be fitted is located is the inner side, and the side where the point to be fitted is not located is the outer side, this embodiment may be within the first point, and a starting point is selected from the points to be fitted which are close to the first point, for example, the first point inward of the first point is determined as the starting point and the like, selecting a termination point from the points to be fitted within and close to the second point, e.g. determining the second point inward of the second point as the termination point, etc., the starting point and the end point thus determined each have a clearance from the extreme positions of the displacement of the motor (such as the foremost position and/or the rearmost position etc.), in the process of controlling the motor according to the subsequent obtained corresponding relation, the motor can be prevented from colliding the wall at the positions of the two ends, and the effect in the control process of the related motor is improved.
In one example, the motor displacement maximum value is greater than 0 and the motor displacement minimum value is less than 0; determining a starting point according to the first point, and determining an ending point according to the second point includes:
determining a first margin and a second margin, the first margin being a first proportion of the motor displacement maximum value and the second margin being a second proportion of the motor displacement minimum value;
determining a first reference displacement according to a difference between the motor displacement maximum value and the first margin value, and determining a second reference displacement according to a difference between the motor displacement minimum value and the second margin value;
and determining a first point to be fitted, at which the motor displacement is smaller than or equal to the first reference displacement, as the starting point, and determining a first point to be fitted, at which the motor displacement is greater than or equal to the second reference displacement, as the ending point.
Alternatively, the first ratio and the second ratio may be set according to factors such as the stroke characteristics of the motor, for example, when the maximum value of the motor displacement is greater than 0, the minimum value of the motor displacement is less than 0, and the motor displacement is centered at 0, the first ratio and the second ratio may be respectively set to 30%.
In the embodiment, a first reference displacement is determined according to the difference between the maximum value of the motor displacement and a first margin value, a second reference displacement is determined according to the difference between the minimum value of the motor displacement and a second margin value, a first point to be fitted, at which the motor displacement is smaller than or equal to the first reference displacement, is determined as a starting point, and a first point to be fitted, at which the motor displacement is larger than or equal to the second reference displacement, is determined as an end point, so that the first margin value is left between the starting point and the corresponding motor displacement limit position, and the second margin value is left between the end point and the corresponding motor displacement limit position.
The inventor finds that, for all points to be fitted, the first order differential of each point to be fitted can represent the stepping of the corresponding point to be fitted, and the second order differential can represent the speed of stepping change of the corresponding point to be fitted, namely the degree of turning; based on this finding, in one embodiment, the turning degree parameter includes a second order differential of the corresponding point to be fitted among all the points to be fitted, so as to more accurately characterize the turning degree of the point to be fitted.
In one embodiment, corresponding to the step S120, the identifying the maximum n-1 turning degree parameters, and determining the points to be fitted corresponding to the maximum n-1 turning degree parameters as the segment reference points includes: and sequencing the turning degree parameters in a descending order according to the sizes, and determining points to be fitted corresponding to the n-1 turning degree parameters arranged in front as the segmentation reference points. In the embodiment, the turning degree parameters are sorted in a descending order according to the sizes, so that the largest n-1 turning degree parameters can be accurately and quickly identified, and the accuracy of the obtained segmentation reference points is ensured.
In an embodiment, after the identifying the maximum n-1 turning degree parameters and determining the points to be fitted corresponding to the maximum n-1 turning degree parameters as the segment reference points, the method for obtaining the correspondence further includes:
s150, selecting at least one group of fitting points with the distance smaller than the set distance from the segmented reference point and the head and tail points to be fitted to obtain at least one group of target points;
s160, merging the target points of each group into a segmentation reference point, and identifying m segmentation reference points which are reduced in the merging process;
s170, selecting m maximum turning degree parameters from the turning degree parameters except for the maximum n-1 turning degree parameters as segmentation parameters, determining points to be fitted corresponding to the segmentation parameters as new segmentation reference points so that the number of the segmentation reference points is n-1, and returning to execute the step S130 to divide all the points to be fitted into n segments according to the new n-1 segmentation reference points.
Optionally, in step S160, if a group of target points includes a first point to be fitted or a last point to be fitted, combining the groups of target points into a segmentation reference point may include: the segmentation reference points in each group of target points including the first point to be fitted or the last point to be fitted are removed to reserve the first point to be fitted or the last point to be fitted, so that the first point to be fitted, the last point to be fitted and the new n-1 segmentation reference points in the subsequent step S130 can stably and orderly divide all the points to be fitted into n segments.
Optionally, each point to be fitted has a corresponding index number, and each index number may be continuously and sequentially incremented. The selecting at least one group of fitting points of which the distance is smaller than the set distance from the segmentation reference point and the head and tail points to be fitted may include: acquiring the index number of each segmented reference point, sequencing n +1 index numbers including the index numbers of the head and the tail to-be-fitted points in an ascending manner, and determining a group of points with any adjacent index distance smaller than L as target points. Where L is used to characterize the set distance.
The set distance can be set according to the length and other characteristics of all points to be fitted, if the distance between two points is smaller than the set distance, the points to be fitted between the two points are fitted, and overfitting is easy to occur, so that the target points of which the distances between the groups are smaller than the set distance are combined into one point (such as the first point to be fitted, the last point to be fitted or a segmented reference point), the overfitting phenomenon in the subsequent fitting process can be avoided, and the effectiveness of the subsequent fitting process is improved. Optionally, merging the sets of target points into one segmented reference point comprises: selecting a parameter which is one parameter before or after the parameter as a segmentation reference point corresponding to the group of target points, removing the segmentation reference point from the corresponding group of target points for the target point comprising a first point to be fitted or a last point to be fitted so as to reserve the first point to be fitted or the last point to be fitted, eliminating the segmentation reference point of which the distance between the first point to be fitted and the last point to be fitted or other segmentation reference points is less than a set distance, and efficiently and orderly determining a new segmentation reference point.
The embodiment can also identify m segment reference points reduced in the merging process, and select the largest m segment degree parameters as segment parameters from the segment degree parameters except the segment degree parameters corresponding to the previously selected n-1 segment reference points to determine a new segment reference point, so that the number of the segment reference points between the head and the tail to-be-fitted points is still n-1, thus the new n-1 segment reference points and the head and the tail to-be-fitted points can still divide all the to-be-fitted points into n linear intervals together, the stability of the dividing process between the n linear intervals can be ensured, and the stability of the subsequent linear fitting between the segments can be ensured.
In one embodiment, before the obtaining a plurality of points to be fitted and turning degree parameters of each of the points to be fitted, the method for obtaining a correspondence further includes: and respectively measuring corresponding motor displacement when the Hall sensor outputs each output signal, and determining each point to be fitted according to each output signal and the corresponding motor displacement so as to improve the accuracy of the obtained point to be fitted. Optionally, in this embodiment, when the output signals of the hall sensor are read, the motor displacement may be measured by using a high-precision measuring instrument such as a laser range finder, so as to obtain the motor displacement corresponding to each output signal, thereby determining the corresponding point to be fitted.
In an example, the correspondence relationship obtaining method may also refer to fig. 3, and includes step S201 to step S208.
S201, loading a point to be fitted; the simulation diagram corresponding to the points to be fitted can be referred to fig. 4.
S202, obtaining a to-be-fitted interval; the step may specifically include: identifying a first point corresponding to the maximum value of the motor displacement and a second point corresponding to the minimum value of the motor displacement, selecting a starting point within the first point, selecting an ending point within the second point, and determining a to-be-fitted interval by taking the starting point and the ending point as end points; the interval to be fitted may also be referred to as a linear interval, and a simulation graph corresponding to the linear interval may be shown in fig. 5.
S203, calculating the second order differential of each point to be fitted to obtain the turning degree parameter of each point to be fitted.
S204, sorting the turning degree parameters in a descending order according to the sizes, and taking index numbers corresponding to the first n-1 turning degree parameters; here, the index number corresponds to the number of the point to be fitted (i.e. the segmentation reference point) corresponding to the turning degree parameter.
S205, sorting the n +1 index numbers including the index numbers corresponding to the head and the tail to-be-fitted points in an ascending order according to the sizes.
S206, judging whether any adjacent index distance is smaller than L, if so, executing step S207, and if not, executing step S208.
S207, updating i to i +1, combining two adjacent segmentation reference points with the index distance smaller than L into one segmentation reference point, updating the n-1+ i index to the segmentation reference point, and returning to execute the step S205; where i has an initial value of 0.
And S208, sequentially carrying out linear fitting on the points to be fitted between the two adjacent indexes to obtain n corresponding relations.
Specifically, in the present example, the correspondence relationship between the points to be fitted shown in fig. 5 is obtained by respectively using n-8 and n-16, in both correspondence relationship obtaining processes, the value of L is 80, the fitting result corresponding to n-8 may be shown in fig. 6a and 6b, the fitting result corresponding to n-16 may be shown in fig. 7a and 7b, and fig. 6a to 7a may show that the corresponding fitting process has high fitting accuracy.
Optionally, in step S208, the determining process of the corresponding relationship may include: determining an input value (e.g. output signal of a hall sensor): x ═ X1, X2, X3, …]', determine output value (e.g., motor displacement): y ═ Y1, Y2, Y3, …]' if the gradient of the parameter to be solved is k and the intercept is b, then the gradient W is [ b, k ]]', then predict value Y after fitting pred X W; error of fit, i.e. Loss function Loss ═ Y pred -Y) 2 When the gradient W is 0, the loss function takes the minimum value, and thus: w ═ X T X) -1 X T And Y, obtaining the slope k and the intercept b, and respectively determining the corresponding relations according to the slope k and the intercept b.
In the above corresponding relation obtaining method, n-1 segmented reference points are determined according to the overall characteristics of all points to be fitted, and have higher accuracy, all points to be fitted are divided into n segments according to the n-1 segmented reference points, so as to shorten the length of each segment of points to be fitted, reduce the influence of relevant noise, prevent the problem of interference in the fitting process such as overfitting, and the like, and then the n segments of points to be fitted are respectively fitted to obtain n corresponding relations, which can more accurately represent the data trend between the output signals of the hall sensors and the motor displacement, have higher accuracy, the process of calculating the motor displacement corresponding to the output signals of the hall sensors according to the n corresponding relations is simpler and more efficient, and the accuracy and the real-time performance of the motor displacement obtaining process can be improved; selecting a starting point within the first point and selecting an end point within the second point, so that gaps are respectively reserved between the determined starting point and the determined end point and the extreme position of the displacement of the motor, the motor can be prevented from colliding the wall at the positions of the two ends, and the effect of the related motor in the control process is improved; the target points with the mutual distances smaller than the set distance are combined into one segmentation reference point, so that overfitting phenomena in the subsequent fitting process can be avoided, the effectiveness of the subsequent fitting process is improved, m reduced segmentation reference points in the combining process can be identified to update the segmentation reference points, the number of the segmentation reference points is kept to be n-1, the stability of the division process among n segments of linear regions can be ensured, and the stability of the linear fitting in the subsequent segments of linear regions can be ensured.
In a second aspect, the present application provides a motor displacement obtaining method, applied to a motor driving chip, and referring to fig. 8, the motor displacement obtaining method includes:
s310, acquiring at least one section of corresponding relation between the output signal of the Hall sensor and the displacement of the motor by adopting the corresponding relation acquiring method in any embodiment;
s320, acquiring a real-time signal output by the Hall sensor, and identifying the corresponding relation of the real-time signal to obtain a target corresponding relation;
s330, determining the current motor displacement according to the displacement corresponding to the real-time signal in the target corresponding relation.
According to the motor displacement acquisition method, the corresponding relation between the output signal of the Hall sensor and the motor displacement is acquired by adopting the corresponding relation acquisition method in any embodiment, so that when the real-time signal output by the Hall sensor is acquired, the corresponding relation where the real-time signal is located is identified, the target corresponding relation is acquired, the current motor displacement is determined according to the corresponding displacement of the real-time signal in the target corresponding relation, the real-time performance and the stability of the motor displacement acquisition process can be improved, and the real-time performance and the stability of corresponding motor driving according to the motor displacement are improved.
The present application provides a correspondence obtaining system in a third aspect, which may be disposed on a motor driving chip, as shown in fig. 9, and the correspondence obtaining system includes a first obtaining module 410, a recognition module 420, a dividing module 430, and a fitting module 440.
A first obtaining module 410, configured to obtain a plurality of points to be fitted and turning degree parameters of each of the points to be fitted, where two coordinate parameters of the points to be fitted include an output signal of a hall sensor and a motor displacement corresponding to the output signal;
the identification module 420 is configured to identify the largest n-1 turning degree parameters, and determine points to be fitted corresponding to the largest n-1 turning degree parameters as segment reference points;
a dividing module 430, configured to divide all the points to be fitted into n segments according to the segmented reference points;
and a fitting module 440, configured to fit the n segments of points to be fitted respectively to obtain n corresponding relationships.
For the specific definition of the correspondence obtaining system, refer to the definition of the correspondence obtaining method in the foregoing, and are not described herein again. All or part of each unit in the correspondence obtaining system can be realized by software, hardware and a combination thereof. The units can be embedded in a hardware form or independent of an operation module in the computer device, and can also be stored in a memory in the computer device in a software form, so that the operation module can call and execute operations corresponding to the units.
The present application provides a motor displacement obtaining system in a fourth aspect, which may be disposed in a motor driving chip, as shown in fig. 10, the corresponding relationship obtaining system includes a second obtaining module 510, a third obtaining module 520, and a determining module 530.
A second obtaining module 510, configured to obtain at least one section of correspondence between an output signal of the hall sensor and a displacement of the motor by using the correspondence obtaining system according to any one of the embodiments described above;
a third obtaining module 520, configured to obtain a real-time signal output by the hall sensor, identify a corresponding relationship where the real-time signal is located, and obtain a target corresponding relationship;
a determining module 530, configured to determine a current motor displacement according to a corresponding displacement of the real-time signal in the target correspondence.
For specific definition of the motor displacement acquiring system, reference may be made to the above definition of the motor displacement acquiring method, and details are not repeated here. The units in the motor displacement acquiring system can be wholly or partially realized by software, hardware and a combination thereof. The units can be embedded in a hardware form or independent of an operation module in the computer device, and can also be stored in a memory in the computer device in a software form, so that the operation module can call and execute operations corresponding to the units.
The present application provides, in a fifth aspect, a motor driving chip, shown with reference to fig. 11, including a processor 610 and a storage medium 620; the storage medium 620 has program code stored thereon; the processor 610 is configured to call the program code stored in the storage medium 620 to execute the correspondence relationship obtaining method according to any one of the above embodiments or the motor displacement obtaining method according to any one of the above embodiments.
The motor driving chip can execute the corresponding relation obtaining method or the motor displacement obtaining method according to any one of the above embodiments, and can drive the motor more accurately according to the obtained motor displacement, thereby having higher driving efficiency and better driving effect.
The application provides a shoot module in the sixth aspect, including hall sensor, motor and above-mentioned arbitrary embodiment motor drive chip, can acquire the motor displacement according to the signal that hall sensor gathered, and then real-time drive motor, the drive process has higher accuracy and real-time, and the drive effect obtains promoting, and the shooting effect that the shooting module corresponds promotes thereupon.
Although the application has been shown and described with respect to one or more implementations, equivalent alterations and modifications will occur to others skilled in the art based upon a reading and understanding of this specification and the annexed drawings. This application is intended to embrace all such modifications and variations and is limited only by the scope of the appended claims. In particular regard to the various functions performed by the above described components, the terms used to describe such components are intended to correspond, unless otherwise indicated, to any component which performs the specified function of the described component (e.g., that is functionally equivalent), even though not structurally equivalent to the disclosed structure which performs the function in the herein illustrated exemplary implementations of the specification.
That is, the above description is only an embodiment of the present application, and not intended to limit the scope of the present application, and all equivalent structures or equivalent flow transformations made by using the contents of the specification and the drawings, such as mutual combination of technical features between various embodiments, or direct or indirect application to other related technical fields, are included in the scope of the present application.
In addition, the terms "first" and "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features such as "first" and "second" may explicitly or implicitly include one or more features. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
The previous description is provided to enable any person skilled in the art to make and use the present application. In the foregoing description, various details have been set forth for the purpose of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known processes have not been described in detail so as not to obscure the description of the present application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.

Claims (12)

1. A method for obtaining a correspondence relationship is characterized by comprising the following steps:
s110, acquiring a plurality of points to be fitted and turning degree parameters of each point to be fitted, wherein two coordinate parameters of the points to be fitted comprise an output signal of a Hall sensor and motor displacement corresponding to the output signal;
s120, identifying the maximum n-1 turning degree parameters, and determining points to be fitted corresponding to the maximum n-1 turning degree parameters as segmentation reference points;
s130, dividing all the points to be fitted into n sections according to the segmented reference points;
s140, respectively fitting the n sections of points to be fitted to obtain n corresponding relations.
2. The method according to claim 1, wherein the obtaining a plurality of points to be fitted and turning degree parameters of each of the points to be fitted comprises:
identifying a first point corresponding to the maximum value of the motor displacement and a second point corresponding to the minimum value of the motor displacement in each point to be fitted;
determining a starting point according to the first point, and determining an end point according to the second point;
and respectively calculating each turning degree parameter according to the starting point, the end point and each point to be fitted between the starting point and the end point.
3. The correspondence obtaining method according to claim 2, wherein the maximum motor displacement value is greater than 0, and the minimum motor displacement value is less than 0; determining a starting point according to the first point, and determining an ending point according to the second point includes:
determining a first margin and a second margin, the first margin being a first proportion of the motor displacement maximum value and the second margin being a second proportion of the motor displacement minimum value;
determining a first reference displacement according to a difference between the motor displacement maximum value and the first margin value, and determining a second reference displacement according to a difference between the motor displacement minimum value and the second margin value;
and determining a first point to be fitted, at which the motor displacement is smaller than or equal to the first reference displacement, as the starting point, and determining a first point to be fitted, at which the motor displacement is greater than or equal to the second reference displacement, as the ending point.
4. The method according to claim 1, wherein the turning degree parameter includes a second order differential of the corresponding point to be fitted among all the points to be fitted.
5. The method for obtaining correspondence according to claim 1, wherein the identifying of the largest n-1 turning degree parameters, and the determining of the points to be fitted corresponding to the largest n-1 turning degree parameters as the segment reference points includes:
and sequencing the turning degree parameters in a descending order according to the sizes, and determining points to be fitted corresponding to the n-1 turning degree parameters arranged in front as the segmentation reference points.
6. The method according to claim 1, wherein after identifying the maximum n-1 turning degree parameters and determining points to be fitted corresponding to the maximum n-1 turning degree parameters as segment reference points, the method further comprises:
s150, selecting at least one group of fitting points with the distance smaller than the set distance from the segmented reference point and the head and tail points to be fitted to obtain at least one group of target points;
s160, merging the target points of each group into a segmentation reference point, and identifying m segmentation reference points which are reduced in the merging process;
s170, selecting the largest m turning degree parameters from the turning degree parameters except the largest n-1 turning degree parameters as segmentation parameters, determining points to be fitted corresponding to the segmentation parameters as new segmentation reference points so as to enable the number of the segmentation reference points to be n-1, and returning to execute the step S130.
7. The method according to claim 1, wherein before the obtaining a plurality of points to be fitted and turning degree parameters of each of the points to be fitted, the method further comprises:
and respectively measuring the corresponding motor displacement when the Hall sensor outputs each output signal, and determining each point to be fitted according to each output signal and the corresponding motor displacement.
8. A motor displacement acquisition method, comprising:
acquiring at least one section of corresponding relation between an output signal of the Hall sensor and the displacement of the motor by adopting the corresponding relation acquiring method of any one of claims 1 to 7;
acquiring a real-time signal output by the Hall sensor, and identifying the corresponding relation of the real-time signal to obtain a target corresponding relation;
and determining the current motor displacement according to the corresponding displacement of the real-time signal in the target corresponding relation.
9. A correspondence relation acquisition system characterized by comprising:
the device comprises a first acquisition module, a second acquisition module and a control module, wherein the first acquisition module is used for acquiring a plurality of points to be fitted and turning degree parameters of each point to be fitted, and two coordinate parameters of the points to be fitted comprise an output signal of a Hall sensor and motor displacement corresponding to the output signal;
the identification module is used for identifying the maximum n-1 turning degree parameters and determining points to be fitted corresponding to the maximum n-1 turning degree parameters as segmentation reference points;
the dividing module is used for dividing all the points to be fitted into n sections according to the segmented reference points;
and the fitting module is used for respectively fitting n sections of the points to be fitted to obtain n corresponding relations.
10. A motor displacement acquisition system, comprising:
a second obtaining module, configured to obtain at least one section of correspondence between the output signal of the hall sensor and the displacement of the motor by using the correspondence obtaining system according to claim 9;
the third acquisition module is used for acquiring the real-time signals output by the Hall sensor, identifying the corresponding relation of the real-time signals and acquiring the target corresponding relation;
and the determining module is used for determining the current motor displacement according to the corresponding displacement of the real-time signal in the target corresponding relation.
11. A motor driving chip is characterized by comprising a processor and a storage medium; the storage medium having program code stored thereon; the processor is configured to call the program code stored in the storage medium to execute the correspondence obtaining method according to any one of claims 1 to 7 or the motor displacement obtaining method according to claim 8.
12. A camera module comprising a hall sensor, a motor, and the motor driver chip of claim 11.
CN202210611776.1A 2022-05-19 2022-05-19 Corresponding relation, motor displacement obtaining method and system and motor driving chip Pending CN115086551A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210611776.1A CN115086551A (en) 2022-05-19 2022-05-19 Corresponding relation, motor displacement obtaining method and system and motor driving chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210611776.1A CN115086551A (en) 2022-05-19 2022-05-19 Corresponding relation, motor displacement obtaining method and system and motor driving chip

Publications (1)

Publication Number Publication Date
CN115086551A true CN115086551A (en) 2022-09-20

Family

ID=83248709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210611776.1A Pending CN115086551A (en) 2022-05-19 2022-05-19 Corresponding relation, motor displacement obtaining method and system and motor driving chip

Country Status (1)

Country Link
CN (1) CN115086551A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826070A (en) * 2010-04-27 2010-09-08 上海第二工业大学 Key point-based data sequence linear fitting method
JP2012005253A (en) * 2010-06-17 2012-01-05 Asmo Co Ltd Motor
US20150062129A1 (en) * 2013-09-03 2015-03-05 Adobe Systems Incorporated Fitting a Parametric Curve using Maximum Curvature
CN107968531A (en) * 2016-10-20 2018-04-27 北京新长征天高智机科技有限公司 The automatic positioning equipment and method of Hall sensor in three-phase brushless dc motor
CN107978230A (en) * 2016-10-25 2018-05-01 昆山国显光电有限公司 The bending of flexible display screen shows compensation method and system
CN110300252A (en) * 2018-03-22 2019-10-01 爱佩仪(东莞)光电科技有限公司 Camera lens Slant Rectify method and device
CN111308639A (en) * 2013-12-04 2020-06-19 Lg伊诺特有限公司 Lens driving motor, camera module and portable terminal
CN113596324A (en) * 2021-07-13 2021-11-02 上海艾为电子技术股份有限公司 Motor control method and system of shooting module and electronic equipment
CN114244052A (en) * 2020-09-09 2022-03-25 西门子医疗有限公司 DC motor, examination table and method for operating a DC motor
CN114494031A (en) * 2021-12-10 2022-05-13 新拓三维技术(深圳)有限公司 Camera positioning compensation correction device and method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826070A (en) * 2010-04-27 2010-09-08 上海第二工业大学 Key point-based data sequence linear fitting method
JP2012005253A (en) * 2010-06-17 2012-01-05 Asmo Co Ltd Motor
US20150062129A1 (en) * 2013-09-03 2015-03-05 Adobe Systems Incorporated Fitting a Parametric Curve using Maximum Curvature
CN111308639A (en) * 2013-12-04 2020-06-19 Lg伊诺特有限公司 Lens driving motor, camera module and portable terminal
CN107968531A (en) * 2016-10-20 2018-04-27 北京新长征天高智机科技有限公司 The automatic positioning equipment and method of Hall sensor in three-phase brushless dc motor
CN107978230A (en) * 2016-10-25 2018-05-01 昆山国显光电有限公司 The bending of flexible display screen shows compensation method and system
CN110300252A (en) * 2018-03-22 2019-10-01 爱佩仪(东莞)光电科技有限公司 Camera lens Slant Rectify method and device
CN114244052A (en) * 2020-09-09 2022-03-25 西门子医疗有限公司 DC motor, examination table and method for operating a DC motor
CN113596324A (en) * 2021-07-13 2021-11-02 上海艾为电子技术股份有限公司 Motor control method and system of shooting module and electronic equipment
CN114494031A (en) * 2021-12-10 2022-05-13 新拓三维技术(深圳)有限公司 Camera positioning compensation correction device and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘小勇: ""星载超大幅宽红外成像扫描机变焦控制技术研究"", 中国博士学位论文全文数据库 *

Similar Documents

Publication Publication Date Title
CN104601899A (en) Image processing apparatus and image processing method
CN106056111A (en) IMAGE PROCESSING APPARATUS and IMAGE PROCESSING METHOD
CN113436238A (en) Point cloud registration accuracy evaluation method and device and electronic equipment
CN108470364A (en) A kind of curve-fitting method and device
CN111757008B (en) Focusing method, device and computer readable storage medium
CN111191778B (en) Deep learning network processing method, device and compiler
KR101321780B1 (en) Image processing apparatus and image processing method
CN113808121A (en) Yarn sub-pixel level diameter measurement method and system
CN115086551A (en) Corresponding relation, motor displacement obtaining method and system and motor driving chip
CN117036445B (en) Depth estimation method, device, computer equipment and medium based on random distribution
CN117315049B (en) Three-dimensional overall measurement scale calibration method, system and device
CN112927340A (en) Three-dimensional reconstruction acceleration method, system and equipment independent of mechanical placement
CN111462089B (en) Virtual scene precision testing method based on optical dynamic capturing system and related equipment
CN116311135A (en) Data dimension reduction method, data dimension reduction system and controller for semantic information
CN112464794A (en) Image-based fluctuation trend identification method and device, computer equipment and medium
US9734550B1 (en) Methods and apparatus for efficiently determining run lengths and identifying patterns
KR20200119164A (en) Information processing apparatus and operation method of neural network processing device therein
CN113962876A (en) Correction method and correction device for pixel distortion and terminal
CN112738492B (en) Image frame display method and device, electronic equipment and storage medium
CN105635596A (en) System for controlling exposure of camera and method thereof
CN113838075B (en) Monocular ranging method, monocular ranging device and computer readable storage medium
CN112632337A (en) Element management method applied to firework filter and firework filter
CN109919228B (en) Target rapid detection method and device
TWI258146B (en) Curve lookup table method reducing memory space and data storage method
CN111353991A (en) Target detection method and device, electronic equipment and storage medium

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