Motor coil count method
Patent Information
- Application Number
- CN202211443481.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2042-11-18
AI Technical Summary
[0004]本发明的目的在于提供一种电机圈数统计方法,以解决现有技术中电机圈数统计精度不高的问题
[0019]与现有技术相比,本发明提供的电机圈数统计方法包括:在实验条件下获取具有对应关系的目标曲线和电机圈数;建立映射逻辑;在应用条件下获取目标曲线;以及,基于所述映射逻辑,获取应用条件下的所述电机圈数。或者,上述过程中也可以增加第二预设参数参与训练和计算。如此配置,通过关注于整个时间段内的相关参数的曲线变化情况,并进行分析和计算,而不是用传统电机纹波计数值等偏重于描述的统计特征,从而提高了电机圈统计结果的准确性。
Smart Images

Figure CN115800644B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motor control technology, and in particular to a method for counting the number of motor revolutions. Background Technology
[0002] Ripple motor control technology is one approach for window positioning, and counting the ripples in the motor is a key function of window positioning. Under normal operation, existing algorithms can determine the window's travel distance by counting the ripples. After the driver releases the push-button switch, the window continues to move for a period due to inertia, generating the aforementioned current and voltage on the sensor. During this process, the ripple counting becomes ineffective. This inertial motion is the main reason for inaccurate window position estimation under the "free stop" function; because between each "free stop" trigger, the window position estimation error accumulates due to inertial motion.
[0003] Therefore, how to improve the accuracy of motor revolution counting through effective algorithms is a technical challenge for ripple motor control technology. Summary of the Invention
[0004] The purpose of this invention is to provide a method for counting motor revolutions, so as to solve the problem of low accuracy in counting motor revolutions in the prior art.
[0005] To address the aforementioned technical problems, this invention provides a method for counting motor revolutions. The method includes: acquiring a target curve and a ripple count with a corresponding relationship under experimental conditions; the target curve being a time-dependent curve of a first preset parameter within a preset time period; and the motor revolution count being the total number of revolutions completed by the ripple-type motor within the preset time period; establishing a mapping logic, which includes a mapping relationship between the target curve and the motor revolution count; acquiring the target curve under application conditions; and acquiring the motor revolution count under application conditions based on the mapping logic; wherein the target curve is involved in the calculation.
[0006] Alternatively, the motor revolutions counting method includes: obtaining the target curve, the second preset parameter, and the motor revolutions under experimental conditions; establishing the mapping logic, which further includes the mapping relationship between the second preset parameter and the ripple count; obtaining the target curve and the second preset parameter under application conditions; and obtaining the motor revolutions under application conditions based on the mapping logic; wherein the target curve and the second preset parameter are involved in the calculation.
[0007] Optionally, the ripple motor is used to drive the raising and lowering of the vehicle window, and the preset time period is the time period from when the power supply to the ripple motor is cut off to when the ripple motor completely stops moving.
[0008] Optionally, the first preset parameter is the current and voltage of the corrugated motor; and / or, the second preset parameter is the last valid measurement value of the rotational speed of the corrugated motor that is not zero.
[0009] Optionally, the step of establishing the mapping logic includes establishing the mapping logic based on the random forest algorithm or the XGboost algorithm.
[0010] Optionally, the step of establishing the mapping logic includes: obtaining the feature parameters of the target curve under experimental conditions, and establishing a mapping relationship between the feature parameters of the target curve and the number of motor revolutions.
[0011] Based on the mapping logic, the step of obtaining the number of motor revolutions under the application conditions includes: obtaining the feature parameters of the target curve under the application conditions, wherein the feature parameters of the target curve are used to calculate and obtain the number of motor revolutions under the application conditions.
[0012] Optionally, the feature parameters include at least one of the final value, mean, and variance of the target curve.
[0013] Optionally, the feature parameters include the curve features of the target curve, the curve features include the horizontal and vertical coordinates corresponding to the extreme points, and / or the position and deviation degree corresponding to the inflection points, and the target curve is the first curve and the second curve.
[0014] Optionally, the inflection point is the point with the greatest deviation within a preset curve segment.
[0015] Optionally, the inflection point is determined based on the following steps: determining the preset curve segment of the i-th layer, wherein when i = 1, the preset curve segment is divided based on the extreme point of the target curve, and when i > 1, the curve segment of the (i-1)-th layer is divided using the inflection point determined by the preset curve segment of the (i-1)-th layer to obtain the preset curve segment of the i-th layer.
[0016] Determining the inflection point corresponding to the preset curve segment of the i-th layer includes: connecting the start and end points of the preset curve segment to obtain a reference line segment, and selecting the point on the preset curve segment that is farthest from the reference line segment as the inflection point of the current preset curve segment.
[0017] Where i is an integer from 1 to n, and n is the maximum number of layers to divide the preset curve segment.
[0018] Optionally, the method for counting motor revolutions includes setting multiple preset sampling time points within the preset time period; the method for obtaining the target curve includes recording the first preset parameter at the preset sampling time points and fitting the target curve based on the recording results.
[0019] Compared with existing technologies, the motor revolution counting method provided by this invention includes: obtaining a target curve and motor revolution count with a corresponding relationship under experimental conditions; establishing mapping logic; obtaining the target curve under application conditions; and obtaining the motor revolution count under application conditions based on the mapping logic. Alternatively, a second preset parameter can be added to the above process for training and calculation. This configuration improves the accuracy of motor revolution counting results by focusing on the curve changes of relevant parameters over the entire time period and performing analysis and calculation, rather than using traditional motor ripple counts and other descriptive statistical features. Attached Figure Description
[0020] Those skilled in the art will understand that the accompanying drawings are provided to better understand the invention and do not constitute any limitation on the scope of the invention. Wherein:
[0021] Figure 1 This is a flowchart illustrating a method for counting motor revolutions according to an embodiment of the present invention;
[0022] Figure 2 This is a schematic diagram of the curve of the first preset parameter according to an embodiment of the present invention;
[0023] Figure 3 This is a schematic diagram of feature extraction of the falling segment in the current curve of a motor according to an embodiment of the present invention;
[0024] Figure 4 This is a schematic diagram of a method for obtaining inflection points according to an embodiment of the present invention;
[0025] Figure 5a This is a confusion matrix representing the prediction effect according to an embodiment of the present invention;
[0026] Figure 5b This is another confusion matrix representing the prediction effect of an embodiment of the present invention. Detailed Implementation
[0027] To make the objectives, advantages, and features of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the drawings are all in a very simplified form and are not drawn to scale, and are only used to facilitate and clarify the explanation of the embodiments of this invention. Furthermore, the structures shown in the drawings are often part of the actual structures. In particular, different figures may emphasize different aspects and may sometimes use different scales.
[0028] As used in this invention, the singular forms “a,” “an,” and “the” include plural objects; the term “or” is generally used to mean “and / or”; the term “a number” is generally used to mean “at least one”; and the term “at least two” is generally used to mean “two or more”. Furthermore, the terms “first,” “second,” and “third” are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as “first,” “second,” or “third” may explicitly or implicitly include one or at least two of that feature. “One end” and “the other end,” as well as “proximal end” and “distal end,” generally refer to two corresponding parts, including not only endpoints. The terms “installed,” “connected,” and “joined” should be interpreted broadly, for example, as a fixed connection, a detachable connection, or an integral part; a mechanical connection or an electrical connection; a direct connection or an indirect connection through an intermediate medium; or a connection within two elements or an interaction between two elements. Furthermore, as used in this invention, the phrase "one element is disposed on another element" generally only indicates that there is a connection, coupling, cooperation, or transmission relationship between the two elements, and the connection, coupling, cooperation, or transmission between the two elements can be direct or indirect through an intermediate element. It should not be construed as indicating or implying a spatial positional relationship between the two elements, i.e., one element can be located arbitrarily inside, outside, above, below, or to one side of the other element, unless otherwise explicitly stated. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0029] The core idea of this invention is to provide a method for counting motor revolutions, so as to solve the problem of low accuracy in counting motor revolutions in the prior art.
[0030] The following description refers to the accompanying drawings.
[0031] This embodiment provides a method for counting motor revolutions. This method is used to count the total number of revolutions of a ripple motor within a preset time period, thereby providing necessary feedback and correction information, such as position correction information, to related control algorithms. In this embodiment, the ripple motor is used to drive the raising and lowering of a vehicle window, and the preset time period is the period from when the power to the ripple motor is cut off until the ripple motor completely stops moving. Obviously, this method can also be used in other scenarios to count the number of motor revolutions of the ripple motor within a specific time period.
[0032] Since the number of motor revolutions and the ripple count correspond in normal control logic, this method can also be considered a generalized ripple count statistics method. For example, if the input parameter of a control module under normal conditions is the ripple count, and the input parameter within a preset time period is the number of motor revolutions output by this method, then for ease of reference, both input parameters can be collectively referred to as the ripple count. Furthermore, the specific counting method for the motor revolutions can be selected as needed; for example, the motor revolution count can be incremented by 1 for every 60° of motor rotation.
[0033] Please refer to Figure 1 The method for counting motor revolutions includes:
[0034] S10: Under experimental conditions, obtain a target curve and the number of motor revolutions that correspond to each other. The target curve is a curve of a first preset parameter with respect to time within the preset time period, and the number of motor revolutions is the total number of revolutions completed by the ripple motor within the preset time period. In step S10, since it is an experimental condition, the number of motor revolutions can be counted using a Hall coil. However, in actual application conditions, there is no Hall coil on the car window, so the number of motor revolutions can only be predicted by other means (such as the solution provided by this invention), and it is hoped that the predicted result is as close as possible to the actual situation.
[0035] S20, Establish mapping logic, the mapping logic including the mapping relationship between the target curve and the number of motor revolutions.
[0036] S30, Obtain the target curve under the application conditions.
[0037] And, S40, based on the mapping logic, obtain the number of motor revolutions under the application conditions; wherein, the target curve participates in the calculation.
[0038] In existing technologies, schemes based on signal energy have prediction accuracies of approximately 40% when the prediction error is less than or equal to one Hall square wave signal (if six Hall sensors are used to detect the number of motor rotations, then six Hall square wave signals equal one rotation; other structures can be understood in the same way). The recall rate is approximately 60% when the error is less than or equal to two Hall square wave signals. This indicates that there is still considerable room for improvement in prediction accuracy. In this embodiment, since logical calculations are performed based on a complete curve, more details can be obtained by extracting the curve's features and the relevant parameters of the feature points.
[0039] Therefore, this embodiment can improve prediction accuracy. The prediction accuracy of this embodiment can reach approximately 90% or more. For a detailed analysis of the prediction accuracy of this embodiment, please refer to the following content.
[0040] The design idea of the above embodiments is to obtain continuous information with sequential relationships based on curves. Based on the above design idea, it is obvious that other single-point parameters can also be selected as information supplements according to the actual scenario, so as to obtain different prediction effects.
[0041] That is, the ripple count method includes:
[0042] S10, under experimental conditions, obtain the target curve, the second preset parameter, and the number of motor revolutions that have a corresponding relationship.
[0043] S20, establish the mapping logic, which further includes the mapping relationship between the second preset parameter and the number of motor revolutions.
[0044] S30, Under the application conditions, obtain the target curve and the second preset parameter.
[0045] And, S40, based on the mapping logic, obtain the number of motor revolutions under the application conditions; wherein, the target curve and the second preset parameter are involved in the calculation.
[0046] It is understood that in different embodiments, the same parameter may belong to either the first preset parameter or the second preset parameter. For example, in one embodiment, the first preset parameter is current, and the second preset parameter is voltage and speed. That is, the current is analyzed as a whole in the form of a curve, while the voltage and speed are measured at one or more single points. In another embodiment, the first preset parameter is current and voltage, and the second preset parameter is speed. That is, the current and voltage are analyzed as a whole in the form of a curve, while the speed is measured at one or more single points. In yet another embodiment, the first preset parameter is current, voltage, and speed, without setting the second preset parameter. The alternative parameters for the first and second preset parameters are not limited to current, voltage, and speed; other motor characteristic parameters, such as power consumption and torque, can also be selected.
[0047] From an engineering implementation perspective, in a preferred embodiment, the first preset parameter is the current and voltage of the corrugated motor; and the second preset parameter is the last valid measurement value of the rotational speed of the corrugated motor that is not zero. The measurement time point of the "last valid measurement value that is not zero" can exist before the preset time period. When the measurement accuracy is sufficient, the rotational speed of the corrugated motor can also be set to the first preset parameter.
[0048] In other embodiments, the following scheme can also be used: the first preset parameter is the current and voltage of the corrugated motor; or, the second preset parameter is the last valid measurement value of the rotational speed of the corrugated motor that is not zero.
[0049] Step S20, establishing the mapping logic, can be done by: establishing the mapping logic based on machine learning, neural network learning, or lookup table interpolation methods. In a preferred embodiment, training and prediction are performed based on the Random Forest algorithm, or the mapping logic can be established based on algorithms such as XGBoost. The specific implementation process of the Random Forest algorithm and the XGBoost algorithm can be understood by referring to common knowledge in the field, and will not be described in detail here.
[0050] The motor revolution counting method further includes setting multiple preset sampling time points within the preset time period. The preset sampling time points can be set based on the start time of the preset time period, thus maintaining a corresponding relationship during different data collection processes. The preset sampling time points can be selected based on the common characteristics of the curves collected under experimental conditions; for example, they can be set more compactly during periods of significant curve change and more sparsely during periods of relatively small curve change.
[0051] The method for obtaining the target curve includes: recording the first preset parameter at the preset sampling time point; using the recording result as the target curve, or fitting the target curve based on the recording result. Whether to use fitting depends on different situations and the computing power of the controller. Fitting should be interpreted broadly, and interpolation algorithms should also be considered as an optional fitting method.
[0052] Figure 2 This is a curve collected in one example. Figure 2 In the diagram, L1 represents the current curve, and L2 represents the voltage curve. The current first rises and then falls, with the extreme point being P. max The current curve L1 is affected by the extreme point P. max Divided into I up and I down Two curved segments.
[0053] Furthermore, the step of establishing the mapping logic includes: obtaining the feature parameters of the target curve under experimental conditions, and establishing a mapping relationship between the feature parameters of the target curve and the number of motor revolutions.
[0054] Based on the mapping logic, the step of obtaining the ripple count under application conditions includes: obtaining the characteristic parameters of the target curve under application conditions, wherein the characteristic parameters of the target curve are used to calculate and obtain the motor revolution count under application conditions.
[0055] The feature parameters include two categories. One category consists of directly extractable statistically relevant information, such as the final value, mean, and variance of the target curve. The final value refers to the initial and / or final values of the target curve. The other category comprises geometric information of feature points determined based on the geometric characteristics of the target curve. That is, the feature parameters include the curve features of the target curve, including the horizontal and vertical coordinates corresponding to extreme points, and / or the position and degree of deviation corresponding to inflection points. The inflection point is the point with the greatest deviation within a preset curve segment.
[0056] like Figure 3 As shown, Figure 3 In the diagram, points P1, P2, and P3 are all inflection points.
[0057] In one embodiment, the inflection point is determined based on the following steps: determining the preset curve segment of the i-th layer, wherein when i = 1, the preset curve segment is divided based on the extreme points of the target curve; when i > 1, the curve segment of the (i-1)-th layer is divided using the inflection points determined by the preset curve segment of the (i-1)-th layer to obtain the preset curve segment of the i-th layer. Here, the concept of "layer" is only used to distinguish the temporal order in which the inflection points are obtained, and does not imply that the inflection points have a geometrically overlapping relationship.
[0058] Determining the inflection point corresponding to the preset curve segment of the i-th layer includes: connecting the start and end points of the preset curve segment to obtain a reference line segment, and selecting the point on the preset curve segment that is farthest from the reference line segment as the inflection point of the current preset curve segment.
[0059] Where i is an integer from 1 to n, n is the maximum number of layers to divide the preset curve segment, and the target curve is the first curve and the second curve.
[0060] by Figure 3 Take P1, P2, and P3 as examples.
[0061] First, based on Figure 2 The extreme point Pmax in the curve divides the complete current curve L1 into I... up and I down Two preset curve segments.
[0062] Then, in I down Find the inflection point corresponding to the preset curve segment of the first layer, i.e. Figure 3 P1 in the middle. P1 is arranged as follows: Figure 4 The process shown is determined. First, connect the two endpoints of the preset curve segment C1, that is... Figure 4Given points C and D in the equation, we iterate through each point on C1. Taking point A as an example, we draw a perpendicular line from point A to line segment CD, intersecting CD at point B. The length of AB is the distance between point A and line segment CD. Through iteration, we find that point E has the longest distance to line segment CD (i.e., the length of line segment EF), thus determining point E as the inflection point. When C1 and I... down Correspondingly, point E is I. down P1 in the equation. Additionally, the length of line segment EF represents the degree of deviation corresponding to point E.
[0063] Then, P1 will I down The preset curve segments are divided into two second-level segments. Each preset curve segment continues to search for inflection points according to the above process, resulting in P2 and P3 respectively. That is, P2 and P3 are inflection points of the second level.
[0064] The above process can continue to obtain more inflection points.
[0065] Finally, the position and deviation of the aforementioned inflection point are used as part of the feature parameters for subsequent training or calculation.
[0066] In one embodiment, the random forest algorithm model is trained using a dataset with more than 200 samples and tested using a dataset with 73 samples, resulting in the following... Figure 5a The confusion matrix is shown below. The training results were tested using a test set with 9 samples under another operating condition, resulting in the following... Figure 5b The confusion matrix shown. Figure 5a and Figure 5b In the diagram, the row number represents the actual value, the column number represents the output of the example, and the number in the middle represents the number of samples that meet this condition. For example, Figure 5a In the diagram, the cell with row number 6 and column number 4 has a value of 1, indicating that there is one sample with a true value of 6 and a predicted value of 4. Figure 5a and 5b It can be seen that the vast majority of samples lie on the diagonal of the confusion matrix, meaning that the true and predicted values of most samples are equal. Neither dataset contained samples with a prediction error greater than two Hall effect square wave signals, indicating a recall of 100%. Samples with a prediction error greater than one Hall effect square wave signal were found in... Figure 5a There are 6 (92% recall rate) on it. Figure 5b There was 1 result (recall rate 89%). The accuracy was significantly improved compared to existing energy-based methods.
[0067] In summary, this embodiment provides a method for counting motor revolutions, specifically including: obtaining a target curve and motor revolutions with a corresponding relationship under experimental conditions; establishing mapping logic; obtaining the target curve under application conditions; and obtaining the motor revolutions under application conditions based on the mapping logic. Alternatively, a second preset parameter can be added to the above process for training and calculation. This configuration, by focusing on the curve changes of relevant parameters over the entire time period and performing analysis and calculation, rather than using traditional motor ripple counts and other descriptive statistical features, improves the accuracy of the motor revolution counting results.
[0068] The above description is only a description of preferred embodiments of the present invention and is not intended to limit the scope of the present invention in any way. Any changes or modifications made by those skilled in the art based on the above disclosure shall fall within the protection scope of the present invention.
Claims
1. A method for counting the number of revolutions of a motor, characterized in that, The method for counting motor revolutions includes: Under experimental conditions, a target curve, a second preset parameter, and the number of motor revolutions with corresponding relationships are obtained. The target curve is the curve of the first preset parameter with respect to time within a preset time period. The number of motor revolutions is the total number of revolutions that the ripple motor has made within the preset time period. The first preset parameter is the current and voltage of the ripple motor. The second preset parameter is the last valid measurement value of the rotational speed of the ripple motor that is not zero. Establish mapping logic, which includes the mapping relationship between the second preset parameter and the number of motor revolutions; Under the application conditions, the target curve and the second preset parameter are obtained; and, Based on the mapping logic, the number of motor revolutions under the application conditions is obtained; wherein, the target curve and the second preset parameter are involved in the calculation; The ripple motor is used to drive the raising and lowering of the vehicle window, and the preset time period is the period from when the power supply to the ripple motor is cut off to when the ripple motor completely stops moving.
2. The method for counting motor revolutions according to claim 1, characterized in that, The steps to establish the mapping logic include establishing the mapping logic based on the random forest algorithm or the XGboost algorithm.
3. The method for counting motor revolutions according to claim 1, characterized in that, Based on the mapping logic, the step of obtaining the number of motor revolutions under the application conditions includes: obtaining the feature parameters of the target curve under the application conditions, wherein the feature parameters of the target curve are used to calculate and obtain the number of motor revolutions under the application conditions.
4. The method for counting motor revolutions according to claim 3, characterized in that, The characteristic parameters include at least one of the final value, mean, and variance of the target curve.
5. The method for counting motor revolutions according to claim 3, characterized in that, The feature parameters include the curve features of the target curve, which include the horizontal and vertical coordinates corresponding to the extreme points, and / or the position and degree of deviation corresponding to the inflection points.
6. The method for counting motor revolutions according to claim 5, characterized in that, The inflection point is the point with the greatest deviation within the preset curve segment.
7. The method for counting motor revolutions according to claim 5, characterized in that, The inflection point is determined based on the following steps: Determine the preset curve segment of the i-th layer, wherein when i=1, the preset curve segment is divided based on the extreme point of the target curve, and when i>1, the curve segment of the (i-1)-th layer is divided using the inflection point determined by the preset curve segment of the (i-1)-th layer to obtain the preset curve segment of the i-th layer. Determining the inflection point corresponding to the preset curve segment of the i-th layer includes: connecting the start point and the end point of the preset curve segment to obtain a reference line segment, and selecting the point on the preset curve segment that is farthest from the reference line segment as the inflection point of the current preset curve segment; Where i is an integer from 1 to n, and n is the maximum number of layers to divide the preset curve segment.
8. The method for counting motor revolutions according to claim 1, characterized in that, The method for counting motor revolutions includes setting multiple preset sampling time points within the preset time period; The method for obtaining the target curve includes: recording the first preset parameter at the preset sampling time point, and fitting the target curve based on the recording results.
Citation Information
Patent Citations
Ripple counting method and device, storage medium and equipment
CN114991612A