Motor ripple counting method, apparatus, device, and storage medium
By performing correlation transformation on the motor ripple sampling sequence and using the two-sided straight line intersection method or parabolic fitting method to determine the upper peak position, the counting error problem caused by DC motor ripple waveform distortion is solved, and the accurate judgment of the window glass position and the reliability of the anti-pinch function are realized.
Patent Information
- Application Number
- CN202411102514.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2044-08-12
AI Technical Summary
In the existing technology, the ripple waveform distortion of the DC motor causes the ripple counter of the window motor to malfunction, resulting in incorrect judgment of the window glass position and causing false anti-pinch failure.
By employing correlation transformation of the motor ripple sampling sequence, the upper peak position is determined through the two-sided straight line intersection method or parabolic fitting method, thereby suppressing ripple distortion and noise and achieving accurate ripple counting.
It improves the accuracy of window glass position judgment, reduces false anti-pinch failures, enhances user experience, and reduces computational load.
Smart Images

Figure CN119250099B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of window control, and particularly relates to a motor ripple counting method and device, equipment and a storage medium. BACKGROUND
[0002] With the continuous progress of science and technology, electric windows are gradually popularized. For the reason of passenger safety protection, the electric window must have an anti-pinch function to prevent pinching fingers, arms, children's heads and other body parts during window closing. In the early stage, the window drive motor mostly uses a direct current brush motor with a Hall sensor. In recent years, in order to reduce costs, more and more vehicles directly use the ripple signal of the direct current motor current to count the cumulative number of motor rotations, replacing the function of the Hall sensor.
[0003] In the prior art, the waveform quality of the direct current motor ripple is not only related to the state of the motor during operation, but also related to the factors of the motor commutator. The tolerance of the window controller to the deformation of the ripple waveform during ripple counting, and the ripple counting is one of the key performance indicators for measuring the performance of the anti-pinch algorithm of the window motor controller. The zero-crossing / average value line detection and the improved algorithm based on this method are usually used for ripple counting.
[0004] However, if the ripple waveform input into the above algorithm is a distorted waveform, the zero-crossing / average value line detection algorithm will produce a false action, which will cause the window motor ripple counting to be overcounted or undercounted, and further cause the position of the window glass to be incorrectly judged, resulting in various false anti-pinch faults. SUMMARY
[0005] The present application provides a motor ripple counting method, device, equipment and storage medium to solve the problem of how to accurately count the motor ripple.
[0006] In a first aspect, the present application provides a motor ripple counting method applied to a motor controller, the method comprising:
[0007] Step 1: According to the initial single period value and the sampling period value of the ripple analog-to-digital converter, read the sequence data of M ripple periods from the starting point of the motor ripple sampling sequence as a processing sequence, wherein M is a preset integer;
[0008] Step 2: According to the local sequence corresponding to the processing sequence, perform correlation transform calculation on the processing sequence to obtain a correlation transform sequence corresponding to the processing sequence, the correlation transform sequence and the processing sequence have the same ripple period, and the local sequence is a sequence obtained from the processing sequence for correlation transform;
[0009] Step 3: determining a target algorithm according to a predicted period of the processing sequence, the target algorithm including a double-side straight line intersection method or a parabolic fitting method for calculating the upper peak position of the correlation transform sequence;
[0010] Step 4: determining a set of measuring points of the processing sequence according to the predicted period of the processing sequence, and calculating the upper peak position corresponding to the correlation transform sequence based on the set of measuring points and the target algorithm, the set of measuring points including a plurality of sampling points for calculating the upper peak position of the correlation transform sequence;
[0011] Step 5: determining the number of ripples of the processing sequence according to the upper peak position and accumulating the number of ripples;
[0012] Step 6: starting from a new starting point based on the initial single period value and the sampling period value, reading sequence data of M ripple periods from the motor ripple sampling sequence as a new processing sequence, repeating steps 2 to 6 until the motor ripple sampling sequence is processed, and the new starting point is determined based on the period division position of the processing sequence.
[0013] In combination with the first aspect, in some embodiments, the determining the number of ripples of the processing sequence according to the upper peak position and accumulating the number of ripples includes:
[0014] determining a ripple period value of the processing sequence according to the upper peak position;
[0015] performing ripple period division on the processing sequence based on the ripple period value of the processing sequence, and determining the number of ripples of the processing sequence based on the result of the ripple period division and accumulating the number of ripples.
[0016] In combination with the first aspect, in some embodiments, the determining the set of measuring points of the processing sequence according to the predicted period of the processing sequence and calculating the upper peak position corresponding to the correlation transform sequence based on the set of measuring points and the target algorithm includes:
[0017] determining a sampling point with the smallest time interval from the upper peak predicted position of the processing sequence as a center point according to the predicted period of the processing sequence;
[0018] if the target algorithm is the double-side straight line intersection method, determining two points on the left and right sides of the center point based on the processing sequence and the predicted period of the processing sequence, and taking the four determined points as the set of measuring points;
[0019] performing correlation transform on the set of measuring points based on the local sequence to obtain a correlation transform value of each point.
[0020] According to the pre-set double-side straight line intersection formula and the correlation transformation value of each point, the upper peak position of the correlation transformation sequence is calculated.
[0021] In combination with the first aspect, in some embodiments, the method further comprises:
[0022] If the target algorithm is the parabola fitting method, one point is determined on the left and right sides of the center point based on the processing sequence and the prediction period of the processing sequence, and the two determined points and the center point are taken as the measurement point set;
[0023] Based on the local sequence, correlation transformation is performed on the measurement point set to obtain the correlation transformation value of each point;
[0024] According to the pre-set parabola fitting formula and the correlation transformation value of each point, the upper peak position of the correlation transformation sequence is calculated.
[0025] In combination with the first aspect, in some embodiments, the target algorithm is determined according to the prediction period of the pre-predicted processing sequence, comprising:
[0026] If the prediction period of the processing sequence is less than a pre-set period threshold, the parabola fitting method is determined as the target algorithm;
[0027] If the prediction period of the processing sequence is greater than the period threshold, the double-side straight line intersection method is determined as the target algorithm.
[0028] In combination with the first aspect, in some embodiments, the method further comprises:
[0029] According to the ripple period value of the processing sequence, the running speed of the vehicle window glass is determined;
[0030] According to the number of ripples of the motor, the running speed of the vehicle window glass and the pre-acquired motor parameters, the anti-pinch function of the vehicle window glass is monitored and controlled.
[0031] In combination with the first aspect, in some embodiments, the method further comprises:
[0032] The motor current signal is sampled in real time;
[0033] The motor current signal is subjected to DC removal, low-pass filtering and PWM preprocessing to obtain the motor ripple sampling sequence.
[0034] The second aspect of the application provides a motor ripple counting device for a vehicle, comprising:
[0035] The reading module is configured to read, as a processing sequence, sequence data of M ripple periods from a starting point of a pre-acquired motor ripple sampling sequence according to an initial single period value and a sampling period value of the ripple analog-to-digital converter, where M is a preset integer.
[0036] The first calculation module is configured to perform correlation transform calculation on the processing sequence according to a local sequence corresponding to the processing sequence to obtain a correlation transform sequence corresponding to the processing sequence, where the correlation transform sequence has the same ripple period as the processing sequence, and the local sequence is a sequence obtained from the processing sequence and used for correlation transform.
[0037] The first determination module is configured to determine a target algorithm according to a predicted period of the processing sequence, where the target algorithm includes a double-side straight line intersection method or a parabolic fitting method, and is used for calculating an upper peak position of the correlation transform sequence.
[0038] The second calculation module is configured to determine a measurement point set of the processing sequence according to the predicted period of the processing sequence, and calculate the upper peak position corresponding to the correlation transform sequence based on the measurement point set and the target algorithm, where the measurement point set includes a plurality of sampling points and is used for calculating the upper peak position of the correlation transform sequence.
[0039] The second determination module is configured to determine a ripple number of the processing sequence according to the upper peak position.
[0040] The cycle processing module is configured to read, as a new processing sequence, sequence data of M ripple periods from a new starting point in the motor ripple sampling sequence according to the initial single period value and the sampling period value in a time sequence, repeat the foregoing steps until the motor ripple sampling sequence is processed, and the new starting point is determined based on a period division position of the processing sequence.
[0041] In some embodiments, in combination with the second aspect, the second determination module includes:
[0042] The determination unit is configured to determine a ripple period value of the processing sequence according to the upper peak position.
[0043] The period division unit is configured to perform ripple period division on the processing sequence based on the ripple period value of the processing sequence, and accumulate and count the ripple number of the processing sequence based on a result of the ripple period division.
[0044] In some embodiments, in combination with the second aspect, the second calculation module includes:
[0045] The selecting unit is configured to select, according to a prediction period of the processing sequence, a sampling point position with a minimum time interval from a peak prediction position of the processing sequence as a center point position;
[0046] The first determining unit is configured to, if the target algorithm is the double-side straight line intersection method, determine two point positions on the left and right sides of the center point position based on the processing sequence and the prediction period of the processing sequence, and determine the four point positions as a measurement point set;
[0047] The first transforming unit is configured to perform correlation transformation on the measurement point set based on the local sequence to obtain a correlation transformation value of each point position;
[0048] The first calculating unit is configured to calculate the peak position of the correlation transformation sequence according to a preset double-side straight line intersection formula and the correlation transformation value of each point position.
[0049] With reference to the second aspect, in some embodiments, the second calculating module comprises:
[0050] The second determining unit is configured to, if the target algorithm is the parabolic fitting method, determine one point position on the left and right sides of the center point position based on the processing sequence and the prediction period of the processing sequence, and determine the two point positions and the center point position as the measurement point set;
[0051] The second transforming unit is configured to perform correlation transformation on the measurement point set based on the local sequence to obtain a correlation transformation value of each point position;
[0052] The second calculating unit is configured to calculate the peak position of the correlation transformation sequence according to a preset parabolic fitting formula and the correlation transformation value of each point position.
[0053] With reference to the second aspect, in some embodiments, the first determining module comprises:
[0054] The first determining unit is configured to, if the prediction period of the processing sequence is less than a preset period threshold, determine the parabolic fitting method as the target algorithm;
[0055] The second determining unit is configured to, if the prediction period of the processing sequence is greater than the period threshold, determine the double-side straight line intersection method as the target algorithm.
[0056] With reference to the second aspect, in some embodiments, the apparatus further comprises:
[0057] The third determining module is configured to determine the running speed of the window glass according to the ripple period value of the processing sequence;
[0058] A monitoring control module is configured to monitor and control the pinch-proof function of the vehicle window glass according to the motor ripple number, the running speed of the vehicle window glass, and the pre-acquired motor parameters.
[0059] In combination with the second aspect, in some embodiments, the apparatus further comprises:
[0060] A real-time sampling module is configured to sample the motor current signal in real time.
[0061] A preprocessing module is configured to perform DC removal, low-pass filtering, and PWM preprocessing on the motor current signal to obtain the motor ripple sampling sequence.
[0062] In a third aspect, the present application provides a motor controller, comprising a processor and a memory in communication connection with the processor.
[0063] The memory stores computer execution instructions.
[0064] The processor executes the computer execution instructions stored in the memory to implement the motor ripple counting method according to any one of the first aspect.
[0065] In a fourth aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by a processor to implement the motor ripple counting method according to any one of the first aspect.
[0066] In a fifth aspect, the present application provides a computer program product, wherein the computer program product comprises a computer program, and the computer program is executed by a processor to implement the motor ripple counting method according to any one of the first aspect.
[0067] The motor ripple counting method, device, equipment and storage medium provided by the application, according to the initial single period value and the sampling period value of the ripple analog-to-digital converter, the sequence data of M ripple periods is read from the starting point of the motor ripple sampling sequence, as a processing sequence, and according to the corresponding local sequence of the processing sequence, the correlation transform calculation of the processing sequence is carried out, and then according to the predicted period of the processing sequence, the target algorithm is determined, the measurement point set of the processing sequence is determined according to the predicted period, and the upper peak position corresponding to the correlation transform sequence is calculated based on the measurement point set and the target algorithm, and the number of ripples of the processing sequence is determined according to the upper peak position to accumulate counting, and the sequence data of M ripple periods is read from the motor ripple sampling sequence as a new processing sequence in the new starting point according to the time sequence, and the above steps are repeated until the motor ripple sampling sequence is processed. Through the above method, the accurate period determination of the motor ripple sampling sequence is realized, the upper peak position is determined based on the measurement point set and the target algorithm, the calculation amount is greatly reduced, and the influence of serious distortion and noise is avoided. BRIEF DESCRIPTION OF DRAWINGS
[0068] The accompanying drawings, which are incorporated into and form a part of the specification, illustrate an embodiment consistent with the present application and, together with the description, serve to explain the principles of the application.
[0069] Figure 1 The application scenario diagram of the motor ripple counting method provided by the embodiment of the application;
[0070] Figure 2 The actual motor ripple waveform diagram is an example;
[0071] Figure 3 The flowchart of the motor ripple counting method embodiment one provided by the embodiment of the application;
[0072] Figure 4 The relationship diagram of the ripple frequency and the number of sampling points in each period;
[0073] Figure 5 The diagram of the number of sampling points in one ripple period when the ripple frequency is 200Hz;
[0074] Figure 6 The diagram of the number of sampling points in one ripple period when the ripple frequency is 400Hz;
[0075] Figure 7 The diagram of the number of sampling points in one ripple period when the ripple frequency is 1000Hz;
[0076] Figure 8 The diagram of the number of sampling points in one ripple period when the ripple frequency is 2000Hz;
[0077] Figure 9 A flowchart of a motor ripple counting method embodiment two provided by the embodiment of the present application;
[0078] Figure 10 A flowchart of a motor ripple counting method embodiment three provided by the embodiment of the present application;
[0079] Figure 11 A schematic diagram for finding the upper peak position by the double straight line intersection method;
[0080] Figure 12 A schematic diagram for finding the upper peak position by the parabolic fitting method;
[0081] Figure 13 A flowchart of a motor ripple counting method embodiment four provided by the embodiment of the present application;
[0082] Figure 14 A flowchart of a motor ripple counting method embodiment five provided by the embodiment of the present application;
[0083] Figure 15 A flowchart of a motor ripple counting method embodiment provided by the embodiment of the present application;
[0084] Figure 16 A structural schematic diagram of a motor ripple counting device embodiment one provided by the embodiment of the present application;
[0085] Figure 17 A structural schematic diagram of a motor ripple counting device embodiment two provided by the embodiment of the present application;
[0086] Figure 18 A structural schematic diagram of a motor ripple counting device embodiment three provided by the embodiment of the present application;
[0087] Figure 19 A structural schematic diagram of a motor ripple counting device embodiment four provided by the embodiment of the present application;
[0088] Figure 20 A structural schematic diagram of a motor ripple counting device embodiment five provided by the embodiment of the present application;
[0089] Figure 21 A structural schematic diagram of a motor ripple counting device embodiment six provided by the embodiment of the present application;
[0090] Figure 22 A structural schematic diagram of a motor controller provided by the embodiment of the present application.
[0091] The present application has been shown and described with reference to the preferred embodiments. Equivalent mechanisms of the application can be implemented or performed using information processing apparatus and computer program products. The present application is not limited to the embodiments described herein, but can be carried out in other ways than those specifically set forth in the specifi cations and drawings. DETAILED DESCRIPTION
[0092] The illustrative examples set forth herein will vary from one another in different ways. Some examples will be described in more detail with reference to the drawings. These drawings and associated descriptions are not intended to limit the scope of the application, but merely to illustrate specific examples and exemplary embodiments thereof. It will be readily apparent to those skilled in the art that varying examples of the present application can be practiced without some or all of the details set forth in the above description and accompanying drawings.
[0093] With the continuous progress of science and technology, electric windows are gradually popularized. For the safety of passengers, electric windows must have an anti-pinch function to prevent injuries to fingers, arms, children's heads, and other body parts during window closing. In the early stage, the window drive motor mostly uses a direct current brush motor with a Hall sensor. In recent years, in order to reduce costs, more and more vehicles directly use the ripple signal of the direct current motor current to count the cumulative number of motor rotations, replacing the function of the Hall sensor. In the prior art, the quality of the waveform of the ripple of the direct current motor is not only related to the state of the motor when it is working, but also related to the factors of the motor commutator. The tolerance of the window controller to the deformation of the ripple waveform when counting the ripple, and the ripple counting is one of the key performance indicators for measuring the performance of the anti-pinch algorithm of the window motor controller. The zero-crossing / average value line detection is usually used for ripple counting, and the improved algorithm based on this method. However, if the input ripple waveform of the above algorithm is a distorted waveform, the zero-crossing / average value line detection algorithm will produce a false action, which will cause the ripple counting of the window motor to be overcounted or undercounted, and further cause the position of the window glass to be misjudged, resulting in various false anti-pinch faults.
[0094] To solve the above problems, the motor ripple counting method, device, equipment and storage medium are provided. Specifically, the zero-crossing / average line crossing detection and the improved algorithm based on the method are usually used for ripple counting. However, if the input algorithm ripple waveform is a distorted waveform, for example, there is a large concave deformation in the motor ripple part cycle, which is close to splitting into two waveforms, or the waveform amplitude of part of the ripple cycle is significantly smaller and offset than the adjacent cycle, therefore, the "zero-crossing / average line crossing detection" algorithm may produce a false action, causing the identified ripple cycle value to fluctuate greatly, thereby leading to inaccurate counting. Considering these problems, the inventors have studied whether the motor ripple can be sampled, and the measured point set obtained by sampling can be related to the transformation, the distortion and noise of the motor ripple can be suppressed, and then the peak position of the motor ripple can be determined through the transformed measured point set, and the cycle can be determined according to the peak position, and the number of ripples can be determined based on the determined cycle value. Thus, accurate ripple counting is achieved, manufacturing costs are saved, the accuracy of determining the position of the window glass is ensured, the accuracy of the anti-pinch function of the window is improved, and the user experience is also improved.
[0095] Figure 1 The application scenario diagram of the motor ripple counting method provided by the embodiment of the present application can be applied to the processing scene of the window motor ripple, which at least includes an electric window 100 composed of a glass guide groove 101, a ripple motor 102, a lifting adjusting frame 103 and a glass 104. The ripple motor 102 is configured with a motor controller, and the ripple motor can lift and lower the window glass 104 through the driving mechanism composed of the steel wire rope, the rope sleeve and the lifting adjusting frame 103. The glass 104 moves up and down in the window guide groove 101. During the movement, the electric window 100 has an anti-pinch function, and the anti-pinch detection distance range is 4mm-200mm. To ensure the normal operation of the anti-pinch function, the position of the glass 104 is crucial, and the position of the glass 104 can be determined by counting the ripple generated by the ripple motor 102. The motor controller collects the ripple signal of the ripple motor 102 in real time, Figure 2 For an exemplary motor actual ripple waveform diagram, as Figure 2 shown, since the original ripple signal is disturbed by various factors and has distortion and noise, the motor controller samples the ripple signal, and performs relevant transformation on the measured point set obtained by sampling, so as to suppress the distortion and noise and reduce the calculation amount. The peak position is determined through the transformed measured point set, the ripple cycle is obtained according to the peak position, and the number of ripples is counted based on the ripple cycle value, so as to ensure the normal operation of the anti-pinch function of the window and avoid the occurrence of false anti-pinch faults.
[0096] It should be noted that the motor controller mentioned above can be configured in the ripple motor 102, can be a separate device, or can be a domain controller or body controller of a vehicle to which the vehicle window belongs.
[0097] The entity device mentioned above is not limited in form or type.
[0098] The technical solutions of the present application and how the technical solutions solve the above technical problems will be described in detail below with specific examples. The following specific examples can be combined with each other, and the same or similar concepts or processes can not be described again in some examples. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0099] Figure 3 The flowchart of the motor ripple counting method embodiment provided by the embodiments of the present application is shown in FIG. Figure 3 The execution subject of the method is a motor controller, and the method specifically includes:
[0100] Step 1: According to the initial single period value obtained in advance and the sampling period value of the ripple analog-to-digital converter, read the sequence data of M ripple periods from the starting point of the pre-acquired motor ripple sampling sequence as a processing sequence.
[0101] In this step, in order to accurately count the ripple of the motor ripple sampling sequence, the ripple period needs to be accurately determined. As can be known from the characteristics of the motor ripple sampling sequence, the ripple period of the motor ripple sampling sequence is variable. Therefore, the sequence data of M periods can be read as a processing sequence in time sequence from the starting point of the motor ripple sampling sequence, where M is the sum of N, L and R, N is the number of ripple periods determined by the pre-set this time ripple period, L is the number of ripple periods of the local sequence, and R is a pre-set integer for ensuring sufficient correlation transformation data. The local sequence is a sequence obtained from the processing sequence for correlation transformation.
[0102] Specifically, since the sampling rate is low in the processing of ripple counting, the single period cannot be measured by the number of sampling points, so the initial single period value is estimated and predicted in advance, where the initial single period value is time, which is the specific value of a single period. The reading of the processing sequence is performed according to the initial single period value, and the size of the period is measured by the period value. Although the reading is performed according to the initial single period value, the actual reading is still the number of sampling points, which can be read according to the sampling period value of the ripple analog-to-digital converter, where the sampling period value of the ripple analog-to-digital converter refers to the time interval between each sampling point when the ripple analog-to-digital converter performs analog-to-digital conversion.
[0103] Step 2: According to the local sequence corresponding to the processing sequence pre-acquired, the processing sequence is calculated by correlation transformation to obtain a correlation transformation sequence corresponding to the processing sequence.
[0104] In this step, the ripple waveform of the vehicle window motor is severely distorted and the noise is increased after long-term use of the vehicle and under harsh working conditions (such as low temperature, low voltage and heavy load). In order to accurately estimate the motor ripple period and accurately count the number of ripples in the presence of distortion and noise of the motor ripple, after the processing sequence is read, the processing sequence can be processed by correlation transformation to obtain a correlation transformation sequence corresponding to the processing sequence, wherein the correlation transformation sequence has the same ripple period as the processing sequence. The period value of the processing sequence can be obtained by estimating the period of the correlation transformation sequence with suppressed distortion and noise.
[0105] Specifically, according to the initial single period value and the sampling period value of the ripple analog-to-digital converter, the sequence data of L periods is read from the starting point of the processing sequence as a local sequence. The processing sequence and the local sequence are calculated by correlation transformation formula to obtain a correlation transformation sequence corresponding to the processing sequence.
[0106] The correlation transformation formula can be expressed as:
[0107]
[0108] wherein A k is the processing sequence, Bj is the local sequence, j = 0, 1, 2, 3,..., (L-1), L is the length of the local sequence, and Ck is the correlation transformation sequence.
[0109] It should be noted that the above correlation transformation is described in detail taking A as the processing sequence, B as the local sequence, and C as the correlation transformation sequence:
[0110] Each output value in the C sequence can be expressed as:
[0111] C 00 = A 00 · B 00 + A 01 · B 01 + A 02 · B 02 + A 03 · B 03 + A 04 · B 04
[0112] C 01 = A 01 · B 00 + A 02 · B 01+A 03 ·B 02 +A 04 ·B 03 +A 05 ·B 04
[0113] C 02 =A 02 ·B 00 +A 03 ·B 01 +A 04 ·B 02 +A 05 ·B 03 +A 06 ·B 04
[0114] …
[0115] C 15 =A 15 ·B 00 +A 16 ·B 01 +A 17 ·B 02 +A 18 ·B 03 +A 19 ·B 04
[0116] Thus, the relevant transform sequence C can be expressed as:
[0117] C k =A k+0 ·B 00 +A k+1 ·B 01 +A k+2 ·B 02 +A k+3 ·B 03 +A k+4 ·B 04
[0118] Step 3: determining the target algorithm according to the prediction period of the pre-predicted processing sequence.
[0119] In this step, in order to accurately determine the upper peak position of the correlation transform, the period of the processing sequence can be pre-predicted, so as to select the target algorithm according to the period, wherein the target algorithm includes the double-side straight line intersection method or the parabolic fitting method, which is used to calculate the upper peak position of the correlation transform sequence.
[0120] Specifically, a period threshold is preset, and if the prediction period of the processing sequence is less than the period threshold, the parabolic fitting method is determined as the target algorithm; if the prediction period of the processing sequence is greater than the period threshold, the double straight line intersection method is determined as the target algorithm.
[0121] Optionally, two period range, for example, period range D and period range E, can also be preset, and the period of the processing sequence is predicted, the prediction period is in the period range D, the parabolic fitting method is determined as the target algorithm, and the prediction period is in the period range E, the parabolic fitting method is determined as the target algorithm.
[0122] Exemplarily, the motor speed range changes greatly, about 300Hz-1700Hz, especially under low temperature, low pressure and heavy load, the motor speed is low (at this time the waveform distortion is serious), and a key performance index of the controller of the vehicle window is the accuracy of the ripple count, there are more than one thousand ripples (assuming about 1200) in a whole rising or falling stroke of the vehicle window glass, and thus the glass displacement corresponding to one ripple is about 0.33mm, and the anti-pinch glass distance of the vehicle window is in the range of 4mm-200mm from the top of the vehicle window slot, if the error of the control anti-pinch range is within 10% (4mm*10%=0.4mm), that is, the error of the whole stroke of more than one thousand ripple counts is required to be about one ripple.
[0123] Supposing that the sampling rate of the vehicle window simulation controller is 10ksps, the limit range of the ripple frequency is (200Hz-2000Hz), and the range of the sampling points in each ripple period is 10000 / 2000-10000 / 250=5-40. Figure 4 The relationship between the ripple frequency and the sampling points in each period is shown in the graph of Figure 4 As can be seen from the graph, with the increase of the ripple frequency, the sampling points in one ripple period gradually decrease (from 50 to 5 in the graph). Figure 5 The graph of the sampling points in one ripple period when the ripple frequency is 200Hz is Figure 6 The graph of the sampling points in one ripple period when the ripple frequency is 400Hz is Figure 7 The graph of the sampling points in one ripple period when the ripple frequency is 1000Hz is Figure 8 The graph of the sampling points in one ripple period when the ripple frequency is 2000Hz is shown in Figures 5 to 8 As can be seen from the graph, the ripple count algorithm should be able to work normally when the ripple frequency changes in the frequency range of about one octave (200Hz-2000Hz).
[0124] When the sampling rate of the analog controller is fixed, when the ripple frequency is low, there are too many sampling signals in a ripple period, and when the correlation transform is performed, the sampling rate can be reduced to reduce the operation amount, and the result of the correlation transform is basically not affected; for example Figure 5 The waveform in the above formula has a ripple frequency of 200 Hz. Since the frequencies before and after the ripple correlation transform are the same, the waveform shown after the correlation transform is a correlation waveform, but it also reflects that the sampling points of the motor ripple in a period are too dense when the correlation transform is performed. At this time, the ripple data can be extracted at equal intervals before the correlation transform is performed. A period threshold or a period range can be preset. When the processing sequence period is lower than the period threshold or is in the period range, the original data sampling rate of the correlation transform calculation input is reduced to half.
[0125] Step 4: According to the predicted period of the processing sequence, the measurement point set of the processing sequence is determined, and the peak position corresponding to the correlation transform sequence is calculated based on the measurement point set and the target algorithm.
[0126] In this step, after the target algorithm is determined through the above steps, the peak position of the correlation transform sequence can be calculated according to the target algorithm.
[0127] Specifically, first, according to the predicted period of the processing sequence, the sampling point position with the smallest time interval from the pre-acquired peak prediction position of the processing sequence is selected as the center point position. Then, if the target algorithm is the double-sided straight line intersection method, two points are determined on the left and right sides of the center point position based on the processing sequence and the predicted period of the processing sequence. The four determined points are taken as the measurement point set. The correlation transform values of each point are obtained by performing correlation transform on the measurement point set based on the local sequence. Finally, the peak position of the correlation transform sequence is calculated according to the pre-set double-sided straight line intersection formula and the correlation transform values of each point.
[0128] Alternatively, if the target algorithm is the parabolic fitting method, one point is determined on the left and right sides of the center point position based on the processing sequence and the predicted period of the processing sequence. The two determined points and the center point position are taken as the measurement point set. The correlation transform values of each point are obtained by performing correlation transform on the measurement point set based on the local sequence. The peak position of the correlation transform sequence is calculated according to the pre-set parabolic fitting formula and the correlation transform values of each point.
[0129] Step 5: According to the peak position, the number of ripples of the processing sequence is determined and accumulated.
[0130] In this step, after the upper peak position of the correlation transform sequence is determined, the period value of the correlation transform sequence can be determined based on the upper peak position of the correlation transform. Since the period value of the correlation transform sequence is the same as the period value of the processing sequence, the processing sequence can be periodically segmented based on the determined period value, and the ripple number is accumulated and counted according to the result of the periodic segmentation.
[0131] Step 6: In time sequence, starting from the new starting point, sequence data of M ripple periods in the motor ripple sampling sequence is read as a new processing sequence according to the initial single period value and the sampling period value, and steps 2 to 6 are repeated until the motor ripple sampling sequence is processed.
[0132] In this step, after the ripple number of the processing sequence is determined, in order to accurately position the vehicle window glass, the period value and the ripple number of the processing sequence are output in real time. After the processing of the processing sequence is completed, in time sequence, the aforementioned steps are continued to be repeated, sequence data of M ripple periods in the motor ripple sampling sequence is read as a new processing sequence starting from a new starting point, and the ripple number is continued to be accumulated and counted until the end of a process, where the process can be that the vehicle window glass lifting-in-slot motor is blocked, and then the ripple counting is ended.
[0133] Optionally, in each reading process of the processing sequence, the new starting point is determined based on the periodic segmentation position of the processing sequence. Specifically, the next sampling point of the current periodic segmentation position of the current processing sequence is taken as the new starting point of the next new processing sequence.
[0134] The motor ripple counting method provided in this embodiment reads sequence data of M ripple periods from the starting point of the pre-acquired motor ripple sampling sequence as a processing sequence according to the pre-acquired initial single period value and the sampling period value of the ripple analog-to-digital converter, performs correlation transform calculation on the processing sequence according to the pre-acquired local sequence corresponding to the processing sequence, determines a target algorithm according to the pre-predicted prediction period of the processing sequence, determines a measurement point set of the processing sequence according to the prediction period, calculates the upper peak position of the correlation transform sequence based on the measurement point set and the target algorithm, accumulates and counts the ripple number of the processing sequence according to the upper peak position, reads sequence data of M ripple periods from the motor ripple sampling sequence as a new processing sequence starting from a new starting point in time sequence, repeats the above steps until the motor ripple sampling sequence is processed. Through the above method, the period of the motor ripple sampling sequence is accurately determined, the upper peak position is determined based on the measurement point set and the target algorithm, the calculation amount is greatly reduced, and the influence of severe distortion and noise is avoided.
[0135] Figure 9A flowchart of a motor ripple counting method provided by Embodiment Two of the motor ripple counting method is shown in FIG. 8. Figure 9 As shown in FIG. 8, on the basis of the above embodiment, step 5 specifically includes:
[0136] S901: Determine the ripple period value of the processing sequence according to the upper peak position.
[0137] S902: Perform ripple period segmentation on the processing sequence based on the ripple period value of the processing sequence, and accumulate and count the ripple number based on the result of the ripple period segmentation.
[0138] After the upper peak position of the relevant transform sequence is determined, the period value of the relevant transform sequence is determined according to the upper peak position. Since the period value of the relevant transform sequence is the same as the period value of the processing sequence, the period value of the relevant transform sequence is determined as the period value of the processing sequence. The processing sequence is segmented based on the period value of the processing sequence, and the ripple number is accumulated and counted based on the segmentation result.
[0139] Specifically, after the upper peak position is determined, the time interval between adjacent peaks can be calculated to determine the period value.
[0140] The motor ripple counting method provided by the embodiment determines the ripple period value of the processing sequence according to the upper peak position, performs ripple period segmentation on the processing sequence based on the ripple period value of the processing sequence, and accumulates and counts the ripple number based on the result of the ripple period segmentation. The period value of the processing sequence is determined and ripple counting is performed based on the characteristic that the period of the relevant transform sequence is the same as the period of the processing sequence, thereby improving the accuracy of ripple counting.
[0141] Figure 10 A flowchart of a motor ripple counting method provided by Embodiment Three of the motor ripple counting method is shown in FIG. 9. Figure 10 As shown in FIG. 9, on the basis of the above embodiment, step 4 specifically includes:
[0142] S1001: Take a sampling point in the processing sequence with the smallest time interval from the upper peak prediction position of the processing sequence as a center point based on the predicted period of the processing sequence.
[0143] In this step, the upper peak prediction position is obtained by predicting the upper peak position of the processing sequence based on the predicted period of the processing sequence. In the processing sequence, the upper peak prediction position is not necessarily a sampling point in the sequence. In order to determine the true upper peak position of the sequence, a sampling point with the smallest time interval from the upper peak prediction position can be selected as a center point in the processing sequence for selection of the sampling point set.
[0144] S1002: If the target algorithm is the double-side straight line intersection method, two points are determined on the left and right sides of the center point based on the processing sequence and the prediction period of the processing sequence, and the four points determined are taken as the measurement point set.
[0145] S1003: Based on the local sequence, the correlation transformation of the measurement point set is performed to obtain the correlation transformation value of each point.
[0146] In this step, due to the difference of the target algorithm, the number and position of the sampling points in the measurement point set are different, so when the target algorithm is the double-side straight line intersection method, the candidate point position index relative to the center point is obtained from the pre-set double-side straight line intersection method sampling point position table according to the range of the prediction period value, two points are determined on the left and right sides of the center point, and a total of four points are taken as the measurement point set. Further, the correlation transformation value of each point in the measurement point set is calculated based on the local sequence and the correlation transformation calculation formula.
[0147] S1004: According to the pre-set double-side straight line intersection formula and the correlation transformation value of each point, the upper peak position of the correlation transformation sequence is calculated.
[0148] In this step, after the correlation transformation of the measurement point set is completed, the upper peak position of the correlation transformation sequence is calculated through the double-side straight line intersection formula based on the correlation transformation value of each point.
[0149] Specifically, two straight lines are determined by the two points on the left and right sides of the center point after correlation transformation, which are called left slope line and right slope line, and the intersection point of the left slope line and the right slope line is taken as the upper peak position of the correlation transformation sequence.
[0150] For example, the coordinates of the two points sampled on the left side are set as (x1, y1) and (x2, y2), and the coordinates of the two points sampled on the right side are set as (x3, y3) and (x4, y4). The left slope line Line1 and the right slope line Line2 can be expressed as:
[0151]
[0152] The above expression is transformed into the following expression:
[0153]
[0154] Let the slope be Then we have:
[0155]
[0156] Further, the upper peak position coordinates are calculated as:
[0157]
[0158] Figure 11 The schematic diagram for calculating the upper peak position by the double-side straight line intersection method is shown in FIG. 2. Figure 11 As shown in FIG. 3, the upper peak position of an exemplary processing sequence is calculated by the double-side straight line intersection method, wherein the upper peak predicted position is predicted according to the predicted period, the center point position and the set of measuring points are determined based on the upper peak predicted position, the correlation transform value of each point in the set of measuring points is calculated, and the upper peak position is calculated by the double-side straight line intersection method.
[0159] It should be noted that the two left and right points collected above can be continuous sampling points or equally spaced sampling points, which can be pre-set in the double-side straight line intersection method sampling point selection table.
[0160] S1005: If the target algorithm is the parabolic fitting method, one point is determined on the left and right sides of the center point position based on the processing sequence and the predicted period of the processing sequence, and the two determined points and the center point position are taken as the set of measuring points.
[0161] S1006: The correlation transform of the set of measuring points is performed based on the local sequence to obtain the correlation transform value of each point.
[0162] In this step, by determining the target algorithm, if the target algorithm is the parabolic fitting method, three points are selected to form the set of measuring points, and the correlation transform of each point is performed.
[0163] Specifically, from the pre-set parabolic fitting method sampling point selection table, the candidate point position index relative to the center point position is obtained according to the range of the predicted period, one point is determined on the left and right sides of the center point position, and the center point position together with the two points form the set of measuring points. Further, the correlation transform value of each point in the set of measuring points is calculated based on the local sequence and the correlation transform calculation formula.
[0164] S1007: The upper peak position of the correlation transform sequence is calculated according to the pre-set parabolic fitting formula and the correlation transform value of each point.
[0165] In this step, after the correlation transform of the set of measuring points is completed, the upper peak position of the correlation transform sequence is calculated by the parabolic fitting formula based on the correlation transform value of each point.
[0166] For example, the correlation transform value is calculated based on the center point and one point on the left / right side of the center point, and the coordinates of the three points are used to determine a parabola opening downward, and the vertex of the parabola is taken as the upper peak position of the correlation transform sequence.
[0167] Let a vertex coordinate (c, b) parabola equation is: (y-b) = a (x-c) 2
[0168] The three sampling points in the set of measuring points and are (x1, y1), (x2, y2), (x3, y3), and the derivation of the coefficients a, b, and c is as follows:
[0169]
[0170] Let Then we have:
[0171]
[0172] Then we have:
[0173]
[0174] Based on the above formula, the coordinates of the upper peak position can be obtained.
[0175] Figure 12 The parabola fitting method for calculating the upper peak position is shown in FIG. 4. Figure 12 When the frequency of the processing sequence is high, the number of sampling points in a ripple cycle is small, and the parabola fitting method is selected as the target algorithm for calculating the upper peak position. Figure 12 The cosine wave is used for simulation in the present application to observe the error of the method. It can be seen that the upper peak position obtained by the three-point parabola fitting method is very close to the true ripple cycle division line.
[0176] Optionally, in the process of calculating the upper peak position of the processing sequence each time, the period and the upper peak position of the current processing sequence need to be predicted. For the predicted period of the current processing sequence, the ripple period value of the last processing sequence and the ripple period conversion rate are used to predict the ripple period of the current processing sequence. For the prediction of the upper peak position, the predicted period value of the current processing sequence can be subtracted from the time difference between the cycle division position of the last processing sequence and the sampling point position of the ripple analog-to-digital converter of the current processing sequence to make the prediction.
[0177] The motor ripple counting method provided by the embodiment comprises the following steps: taking a sampling point position with the minimum time interval from a previous acquired peak position prediction position of a processing sequence as a center point position according to a prediction period of the processing sequence; if a target algorithm is a double-side straight line intersection method, then determining two point positions on the left and right sides of the center point position based on the processing sequence and the prediction period of the processing sequence, taking the four determined point positions as a measurement point set, performing correlation transformation on the measurement point set based on the local sequence to obtain a correlation transformation value of each point position, and calculating a peak position of a correlation transformation sequence according to a previously set double-side straight line intersection formula and the correlation transformation value of each point position; if the target algorithm is a parabola fitting method, then determining one point position on the left and right sides of the center point position based on the processing sequence and the prediction period of the processing sequence, taking the two determined point positions and the center point position as the measurement point set, performing correlation transformation on the measurement point set based on the local sequence to obtain the correlation transformation value of each point position, and calculating the peak position of the correlation transformation sequence according to a previously set parabola fitting formula and the correlation transformation value of each point position. Different target algorithms are determined according to different processing sequence periods, and the measurement point set is selected for correlation transformation and the peak position is determined based on different target algorithms, so that the peak position is accurately calculated, the calculation amount is reduced, and the accuracy of the processing sequence period determination and the ripple counting is ensured.
[0178] Figure 13 A flowchart of the motor ripple counting method provided by the fourth embodiment of the motor ripple counting method is shown in FIG. 4. Figure 13 As shown in FIG. 4, the method further comprises the following steps based on the above embodiment:
[0179] S1301: determining the running speed of the window glass according to the ripple period value of the processing sequence.
[0180] S1302: monitoring and controlling the anti-pinch function of the window glass of the vehicle according to the ripple number of the motor, the running speed of the window glass and the previously acquired motor parameters.
[0181] After the processing sequence period value is determined, the motor rotating speed and the mechanical parameters of the transmission system between the motor output shaft and the window glass can be determined, and the running speed of the window glass can be further determined. Then, the window glass of the vehicle is positioned according to the ripple number of the motor, the number of the motor commutator segments and the mechanical parameters of the transmission system between the motor output shaft and the window glass.
[0182] Optionally, the position and speed information of the window glass is basic information for implementing the soft start, soft stop, constant speed lifting window and anti-pinch function algorithms of the window.
[0183] The motor ripple counting method provided in the embodiment determines the running speed of the window glass according to the ripple period value of the processing sequence, and monitors and controls the anti-pinch function of the window glass of the vehicle according to the ripple quantity of the motor, the running speed of the window glass and the motor parameters obtained in advance. Through the above method, accurate monitoring of the anti-pinch function of the window glass of the vehicle is realized, and the user experience is improved and the safety of the user is ensured through real-time monitoring of the window glass and accurate ripple counting.
[0184] Figure 14 The flowchart of the motor ripple counting method provided in the embodiment is shown in FIG. 5. Figure 14 As shown in the above embodiment, the method further comprises:
[0185] S1401: Real-time sampling of the motor current signal.
[0186] S1402: DC removal, low-pass filtering and PWM preprocessing of the motor current signal to obtain a motor ripple sampling sequence.
[0187] The movement of the glass of the power window is driven by the rotational force generated by the input current of the window motor, and the window motor generates ripples during operation, so that the specific position of the window glass can be determined by analyzing the ripples. Then the motor ripple sampling sequence is obtained by sampling the motor current signal.
[0188] It should be noted that the speed of the motor is slow and unstable when it is just started, and in order to accurately estimate the ripple period and perform ripple counting, the ripple sequence generated by the stable operation of the motor needs to be sampled as the motor ripple sampling sequence.
[0189] Specifically, the preprocessing performed after sampling the motor current signal can include DC removal and PWM filtering preprocessing. The motor current signal usually contains DC component and AC component. The purpose of the DC removal operation is to eliminate the DC component and retain the AC component. A common method is to use a high-pass filter (such as a Butterworth filter) to filter out the DC signal. The motor current signal can also be filtered by the mean removal method to eliminate the ripple caused by the PWM frequency. This can be achieved by a low-pass filter, and a suitable cutoff frequency is usually selected to filter out the PWM frequency and its high-order harmonics. The specific implementation can be selected according to the performance of the actual motor, and the embodiment does not make specific limitations.
[0190] Optionally, the motor current signal can also be subjected to low-pass filtering processing to filter out noise greater than the highest ripple frequency.
[0191] For example, the current signal after the motor is started can be analyzed, and the stabilized current signal after preprocessing can be used as the motor ripple sampling sequence.
[0192] The motor ripple counting method provided by the embodiment can realize real-time sampling of motor current signals, and carries out DC removal and PWM filtering pretreatment on the motor current signals to obtain a motor ripple sampling sequence. Through the above method, a motor ripple sampling sequence with high accuracy and good stability is obtained, which provides data guarantee for subsequent period estimation and ripple counting.
[0193] Figure 15 A flowchart for implementing the motor ripple counting method provided by the embodiment of the application is shown in Figure 15
[0194] S1501: voltage, current, rotation, ambient temperature.
[0195] S1502: single period estimation of ripple.
[0196] In order to determine the real-time period of the motor ripple sampling sequence and accurately count the ripple, so as to accurately determine the position of the window glass, the motor ripple sampling sequence needs to be read and processed in real time, so it is necessary to estimate the single period of the subsequent read sequence data in advance, collect the voltage, current, rotation, and ambient temperature of the motor, and then determine the single period of the ripple, i.e. the initial single period value.
[0197] S1503: reading M period sequence data from P point.
[0198] This step is the same as the implementation mode of step 1 in the foregoing embodiments, and will not be described here again.
[0199] S1504: selecting a related transform measurement point set.
[0200] This step is the same as the implementation mode of the measurement point set selection and determination in the foregoing embodiments, and will not be described here again.
[0201] S1505: reading L period sequence data from P point as a local sequence.
[0202] In this step, the selection of the local sequence is the same as the selection mode of the local sequence in the foregoing embodiments, and will not be described here again.
[0203] S1506: correlation transform.
[0204] In this step, the correlation transform is performed on each point in the measurement point set.
[0205] S1507: side line intersection method or parabolic method selection.
[0206] In this step, the side line intersection method is the double-side straight line intersection method in the foregoing embodiments, and the parabola method is the parabola fitting method. The selection of the two methods can be determined according to the prediction period of the processing sequence currently processed, and the implementation is specifically described in the foregoing embodiments, which will not be repeated here.
[0207] S1508: Calculate the upper peak position and update P.
[0208] S1509: Save the period division point time value.
[0209] S1510: Ripple counting.
[0210] S1511: Motor speed estimation.
[0211] S1512: Positioning / speed regulation and anti-pinch.
[0212] The implementation modes of steps S1508 to S1512 are the same as those in the foregoing embodiments, which will not be repeated here.
[0213] The motor ripple counting method provided in this embodiment selects a measurement point set in the read processing sequence, performs correlation transformation, and gives the correlation transformed value. The upper peak position is calculated by different calculation methods, and the processing sequence is period-divided. Based on the division result, the ripple counting is performed. Through the above method, the ripple period determination and ripple counting of the motor ripple sampling sequence are accurately realized, the calculation amount is reduced, the hardware resources are saved, and the accurate operation of the window anti-pinch function is ensured.
[0214] Figure 16 The structure diagram of the motor ripple counting device embodiment provided in this embodiment is shown in FIG. 16. Figure 16 As shown in FIG. 16, the motor ripple counting device 1600 comprises:
[0215] The reading module 1601 is configured to read M ripple period sequence data from the starting point of the pre-acquired motor ripple sampling sequence as a processing sequence according to the pre-acquired initial single period value and the sampling period value of the ripple analog-to-digital converter, where M is a preset integer.
[0216] The first calculation module 1602 is configured to perform correlation transformation calculation on the processing sequence according to a local sequence corresponding to the processing sequence, to obtain a correlation transformation sequence corresponding to the processing sequence. The correlation transformation sequence and the processing sequence have the same ripple period. The local sequence is a sequence obtained from the processing sequence for correlation transformation.
[0217] The first determining module 1603 is configured to determine a target algorithm according to a prediction period of the pre-predicted processing sequence, the target algorithm including a double-side straight line intersection method or a parabolic fitting method, and the target algorithm is used for calculating the upper peak position of the correlation transform sequence.
[0218] The second calculating module 1604 is configured to determine a measurement point set of the processing sequence according to the prediction period of the processing sequence, and calculate the upper peak position corresponding to the correlation transform sequence based on the measurement point set and the target algorithm, the measurement point set including a plurality of sampling points, and the measurement point set is used for calculating the upper peak position of the correlation transform sequence.
[0219] The second determining module 1605 is configured to determine the number of ripples of the processing sequence according to the upper peak position.
[0220] The loop processing module 1606 is configured to read, according to the initial single-period value and the sampling period value, sequence data of M ripple periods from the motor ripple sampling sequence as a new processing sequence at a new starting point, and repeat the foregoing steps until the motor ripple sampling sequence is processed, and the new starting point is determined based on a period division position of the processing sequence.
[0221] Figure 17 A structure diagram of a motor ripple counting device embodiment two provided by the embodiment of the application is shown in FIG. 2. Figure 17 As shown in FIG. 2, the second determining module 1605 specifically includes:
[0222] The determining unit 1701 is configured to determine the ripple period value of the processing sequence according to the upper peak position.
[0223] The period division unit 1702 is configured to divide the processing sequence according to the ripple period value of the processing sequence, and determine the number of ripples of the processing sequence according to the division result.
[0224] Figure 18 A structure diagram of a motor ripple counting device embodiment three provided by the embodiment of the application is shown in FIG. 3. Figure 18 As shown in FIG. 3, the second calculating module 1604 specifically includes:
[0225] The selecting unit 1801 is configured to select, according to the prediction period of the processing sequence, a sampling point with a smallest time interval from the upper peak prediction position of the pre-acquired processing sequence as a center point.
[0226] The first determining unit 1802 is configured to determine two points on the left and right sides of the center point based on the processing sequence and the prediction period of the processing sequence if the target algorithm is the double-side straight line intersection method, and determine four points as the measurement point set.
[0227] The first transformation unit 1803 is configured to perform correlation transformation on the point set based on the local sequence to obtain a correlation transformation value of each point.
[0228] The first calculation unit 1804 is configured to calculate the upper peak position of the correlation transformation sequence according to a preset double-side straight line intersection formula and the correlation transformation value of each point.
[0229] The second determination unit 1805 is configured to, if the target algorithm is the parabola fitting method, determine one point on the left and right sides of the center point based on the processing sequence and the prediction period of the processing sequence, and take the two determined points and the center point as the point set.
[0230] The second transformation unit 1806 is configured to perform correlation transformation on the point set based on the local sequence to obtain a correlation transformation value of each point.
[0231] The second calculation unit 1807 is configured to calculate the upper peak position of the correlation transformation sequence according to a preset parabola fitting formula and the correlation transformation value of each point.
[0232] Figure 19 A structure diagram of an embodiment four of the motor ripple counting device provided by the embodiment of the present application is shown in FIG. 16. Figure 19 As shown in FIG. 16, the first determination module 1603 specifically includes:
[0233] The first determination unit 1901 is configured to determine the parabola fitting method as the target algorithm if the prediction period of the processing sequence is less than a preset period threshold.
[0234] The second determination unit 1902 is configured to determine the double-side straight line intersection method as the target algorithm if the prediction period of the processing sequence is greater than the period threshold.
[0235] Figure 20 A structure diagram of an embodiment five of the motor ripple counting device provided by the embodiment of the present application is shown in FIG. 17. Figure 20 As shown in FIG. 17, the motor ripple counting device 1600 further includes:
[0236] The third determination module 2001 is configured to determine the running speed of the window glass according to the ripple period value of the processing sequence.
[0237] The monitoring control module 2002 is configured to monitor and control the anti-pinch function of the window glass of the vehicle according to the ripple number of the motor, the running speed of the window glass, and the motor parameters acquired in advance.
[0238] Figure 21 A structure diagram of an embodiment six of the motor ripple counting device provided by the embodiment of the present application is shown in FIG. 18. Figure 21 As shown in FIG. 18, the motor ripple counting device 1600 further includes:
[0239] a real-time sampling module 2101, configured to sample the motor current signal in real time.
[0240] a preprocessing module 2102, configured to perform DC removal, low-pass filtering and PWM preprocessing on the motor current signal to obtain a motor ripple sampling sequence.
[0241] The motor ripple counting device provided by each of the above embodiments is used to perform the motor ripple counting method in any of the preceding method embodiments, and has similar implementation principles and technical effects, which will not be described here.
[0242] Figure 22 A structural schematic diagram of a motor controller provided by an embodiment of the present application is shown in FIG. 22. Figure 22 As shown in FIG. 22, the motor controller 2200 includes a processor 2202 and a memory 2201 connected to the processor in communication.
[0243] The memory 2201 stores computer execution instructions.
[0244] The processor 2202 executes the computer execution instructions stored in the memory 2201 to implement the motor ripple counting method in any of the embodiments.
[0245] The present application also provides a computer readable storage medium, which stores computer execution instructions, and the computer execution instructions are used to implement the motor ripple counting method in any of the embodiments when executed by a processor.
[0246] The computer readable storage medium described above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read-only memory, programmable read-only memory, read-only memory, magnetic storage, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0247] Optionally, the readable storage medium is coupled to the processor, so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in the device.
[0248] The embodiment of the present application further provides a computer program product, which comprises a computer program stored in a computer readable storage medium, at least one processor can read the computer program from the computer readable storage medium, and the at least one processor executes the computer program to implement the technical solutions provided by any of the method embodiments.
[0249] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.
[0250] It is to be understood that the application is not limited to the precise details of design and construction that have been described and exemplified above and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is limited only by the claims that follow.
Claims
1. A method for counting motor ripple, characterized in that, Applied to a motor controller, the method includes: Step 1: Based on the pre-acquired initial single-cycle value and the sampling cycle value of the ripple analog-to-digital converter, read the sequence data of M ripple cycles starting from the starting point of the pre-acquired motor ripple sampling sequence as the processing sequence, where M is a preset integer; Step 2: Based on the local sequence corresponding to the pre-acquired processing sequence, perform correlation transformation calculation on the processing sequence to obtain the correlation transformation sequence corresponding to the processing sequence. The correlation transformation sequence has the same ripple period as the processing sequence. The local sequence is a sequence obtained from the processing sequence for performing correlation transformation. Step 3: Based on the predicted period of the pre-predicted processing sequence, determine the target algorithm, which includes the two-sided line intersection method or the parabolic fitting method, for calculating the upper peak position of the relevant transformation sequence; Step 4: Determine the set of measurement points for the processing sequence based on the prediction period of the processing sequence, and calculate the upper peak position corresponding to the relevant transformation sequence based on the set of measurement points and the target algorithm. The set of measurement points includes multiple sampling points used to calculate the upper peak position of the relevant transformation sequence. Step 5: Based on the upper peak position, determine the number of ripples in the processing sequence and perform cumulative counting; Step 6: Following the time sequence, based on the initial single-cycle value and the sampling cycle value, starting from the new starting point, read the sequence data of M ripple cycles from the motor ripple sampling sequence as a new processing sequence. Repeat steps 2 to 6 until the motor ripple sampling sequence is processed. The new starting point is determined based on the period segmentation position of the processing sequence.
2. The method according to claim 1, characterized in that, The step of determining the number of ripples in the processing sequence based on the peak position and performing cumulative counting includes: The ripple period value of the processing sequence is determined based on the upper peak position; Based on the ripple period value of the processing sequence, the processing sequence is segmented by ripple period, and the number of ripples in the processing sequence is determined and cumulatively counted based on the result of the ripple period segmentation.
3. The method according to claim 1, characterized in that, The step of determining the set of measurement points for the processing sequence based on the prediction period of the processing sequence, and calculating the upper peak position corresponding to the relevant transformation sequence based on the set of measurement points and the target algorithm, includes: Based on the prediction period of the processing sequence, the sampling point in the processing sequence with the smallest time interval from the pre-obtained upper peak prediction position of the processing sequence is taken as the center point. If the target algorithm is the two-sided line intersection method, then based on the processing sequence and the prediction period of the processing sequence, two points are determined on each side of the center point, and the four determined points are used as the measurement point set. Based on the local sequence, a correlation transformation is performed on the set of measurement points to obtain the correlation transformation value for each point; The upper peak position of the relevant transformation sequence is calculated based on the pre-set formula for the intersection of two straight lines and the relevant transformation value of each point.
4. The method according to claim 3, characterized in that, The method further includes: If the target algorithm is the parabolic fitting method, then based on the processing sequence and the prediction period of the processing sequence, one point is determined on each side of the center point, and the two determined points and the center point are used as the set of measurement points. Based on the local sequence, a correlation transformation is performed on the set of measurement points to obtain the correlation transformation value for each point; The upper peak position of the relevant transformation sequence is calculated based on the pre-set parabolic fitting formula and the relevant transformation value of each point.
5. The method according to claim 1, characterized in that, The step of determining the target algorithm based on the prediction period of the pre-predicted processing sequence includes: If the prediction period of the processed sequence is less than a preset period threshold, then the parabolic fitting method is determined as the target algorithm. If the prediction period of the processed sequence is greater than the period threshold, then the two-sided line intersection method is determined as the target algorithm.
6. The method according to claim 2, characterized in that, The method further includes: The running speed of the vehicle window glass is determined based on the ripple period value of the processing sequence. The anti-pinch function of the vehicle's window glass is monitored and controlled based on the number of ripples in the motor, the running speed of the window glass, and the pre-acquired motor parameters.
7. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Real-time sampling of motor current signal; The motor current signal is preprocessed by DC removal, low-pass filtering, and pulse width modulation (PWM) to obtain the motor ripple sampling sequence.
8. A motor ripple counting device, characterized in that, include: The reading module is used to read M ripple cycle sequence data starting from the starting point of the pre-acquired motor ripple sampling sequence based on the pre-acquired initial single cycle value and the sampling cycle value of the ripple analog-to-digital converter, as a processing sequence, where M is a preset integer; The first calculation module is used to perform correlation transformation calculation on the processing sequence according to the local sequence corresponding to the pre-acquired processing sequence to obtain the correlation transformation sequence corresponding to the processing sequence. The correlation transformation sequence has the same ripple period as the processing sequence. The local sequence is a sequence obtained from the processing sequence for performing correlation transformation. The first determining module is used to determine the target algorithm based on the prediction period of the pre-predicted processing sequence. The target algorithm includes the two-sided line intersection method or the parabolic fitting method, which is used to calculate the upper peak position of the relevant transformation sequence. The second calculation module is used to determine the set of measurement points of the processing sequence according to the prediction period of the processing sequence, and to calculate the upper peak position corresponding to the relevant transformation sequence based on the set of measurement points and the target algorithm. The set of measurement points includes multiple sampling points for calculating the upper peak position of the relevant transformation sequence. The second determining module is used to determine the number of ripples in the processing sequence based on the upper peak position and perform cumulative counting. The loop processing module is used to read M ripple cycle sequence data from the motor ripple sampling sequence according to the initial single cycle value and the sampling cycle value, starting from a new starting point, and repeatedly execute the steps executed by the first calculation module, the first determination module, the second calculation module, the second determination module, and the loop processing module until the motor ripple sampling sequence is processed. The new starting point is determined based on the period segmentation position of the processing sequence.
9. A motor controller, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the motor ripple counting method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the motor ripple counting method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and system for judging position of automobile power window
CN106499289A
DC motor ripple detector, method, and program
JP2011109880A