Motor ripple counting method, device and equipment and storage medium
Through relevant transformation and fitting methods, the motor ripple is processed, and the problem of malfunction of DC motor ripple counting under distorted waveform is solved, and the accurate judgment of the position of the car window glass and the improvement of anti-pinch function is achieved.
Patent Information
- Application Number
- CN202411102514.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-08-12
AI Technical Summary
In the prior art, the DC motor ripple counting method is prone to malfunction when facing distorted waveforms, resulting in incorrect judgment of the position of the vehicle window glass and causing incorrect anti-clip faults.
The motor ripple sampling sequence is processed by the relevant transformation method, the upper peak position is determined and the ripple period is calculated, and the number of ripples is accumulated by the bilateral straight line intersection method or the parabolic fitting method to reduce the calculation amount and suppress distortion and noise.
It realizes accurate counting of motor ripple, improves the accuracy of determining the position of the window glass, reduces the occurrence of mis-proof clamping failures, and improves the accuracy and user experience of the window anti-clamping function.
Smart Images

Figure CN119250099A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle window control technology, and in particular to a motor ripple counting method, device, equipment and storage medium. Background Art
[0002] With the continuous advancement of technology, electric windows have become increasingly popular. For the sake of passenger safety, electric windows must have an anti-pinch function to prevent fingers, arms, children's heads and other body parts from being pinched during the window closing process. Early window drive motors mostly used DC brushed motors with Hall sensors. In recent years, in order to reduce costs, more and more vehicles directly use the ripple signal of the DC 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 DC motor ripple is not only related to the working state of the motor, but also to the factors of the motor commutator. The window controller has a tolerance to the ripple waveform deformation when counting the ripple, and the ripple count is one of the key performance indicators to measure the performance of the ripple anti-pinch algorithm of the window motor controller. For ripple counting, it is usually zero crossing / mean line detection, and an improved algorithm based on this method.
[0004] However, if the ripple waveform input into the above algorithm is a distorted waveform, the zero-crossing / mean-line-crossing detection algorithm will malfunction, causing the window motor ripple count to be over- or under-counted, thereby causing an incorrect judgment of the position of the window glass, leading to various false anti-pinch faults. Summary of the invention
[0005] The present application provides a motor ripple counting method, device, equipment and storage medium to solve the problem of how to accurately count motor ripple.
[0006] In a first aspect, the present application provides a motor ripple counting method, which is applied to a motor controller, and the method comprises:
[0007] Step 1: According to the pre-acquired initial single cycle value and the sampling cycle value of the ripple analog-to-digital converter, starting from the starting point of the pre-acquired motor ripple sampling sequence, read the sequence data of M ripple cycles as a processing sequence, where M is a preset integer;
[0008] Step 2: According to the pre-acquired local sequence corresponding to the processing sequence, the processing sequence is subjected to correlation transformation calculation 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, and the local sequence is a sequence obtained from the processing sequence for performing correlation transformation;
[0009] Step 3: determining a target algorithm according to the predicted period of the processing sequence predicted in advance, wherein the target algorithm includes a bilateral straight line intersection method or a parabola fitting method, which is used to calculate the upper peak position of the related transformation sequence;
[0010] Step 4: according to the prediction period of the processing sequence, determine the measurement point set of the processing sequence, and calculate the upper peak position corresponding to the relevant transformation sequence based on the measurement point set and the target algorithm, wherein the measurement point set includes a plurality of sampling points for calculating the upper peak position of the relevant transformation sequence;
[0011] Step 5: According to the upper peak position, determine the number of ripples in the processing sequence and perform cumulative counting;
[0012] Step 6: In chronological order, according to the initial single cycle value and the sampling cycle value, starting from a 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, 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, determining the number of ripples in the processing sequence for cumulative counting according to the upper peak position includes:
[0014] Determining a ripple period value of the processing sequence according to the upper peak position;
[0015] Based on the ripple cycle value of the processing sequence, the processing sequence is divided into ripple cycles, and the number of ripples in the processing sequence is determined and accumulated based on the result of the ripple cycle division.
[0016] In combination with the first aspect, in some embodiments, determining a set of measuring points of the processing sequence according to a prediction period of the processing sequence, and calculating an upper peak position corresponding to the related transformation sequence based on the set of measuring points and the target algorithm includes:
[0017] According to the prediction period of the processing sequence, the sampling point in the processing sequence with the shortest time interval with the previously acquired upper peak prediction position of the processing sequence is taken as the center point;
[0018] If the target algorithm is the two-sided 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 determined four points are used as a measurement point set;
[0019] Based on the local sequence, the measurement point set is subjected to correlation transformation to obtain a correlation transformation value of each point;
[0020] The upper peak position of the correlation transformation sequence is calculated based on the preset double-sided straight line intersection formula and the correlation transformation value of each point.
[0021] In combination with the first aspect, in some embodiments, the method further includes:
[0022] If the target algorithm is the parabola fitting method, 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 measurement point set;
[0023] Based on the local sequence, the measurement point set is subjected to correlation transformation to obtain a correlation transformation value of each point;
[0024] The upper peak position of the correlation transformation sequence is calculated based on a preset parabola fitting formula and the correlation transformation value of each point.
[0025] In combination with the first aspect, in some embodiments, determining the target algorithm according to the predicted period of the processing sequence predicted in advance includes:
[0026] If the predicted period of the processing sequence is less than a preset period threshold, the parabola fitting method is determined as the target algorithm;
[0027] If the predicted period of the processing sequence is greater than the period threshold, the two-sided straight line intersection method is determined as the target algorithm.
[0028] In combination with the first aspect, in some embodiments, the method further includes:
[0029] Determining the running speed of the vehicle window glass according to the ripple period value of the processing sequence;
[0030] The anti-pinch function of the vehicle's window glass is monitored and controlled according to the ripple amount of the motor, the running speed of the vehicle window glass and the pre-acquired motor parameters.
[0031] In combination with the first aspect, in some embodiments, the method further includes:
[0032] Real-time sampling of motor current signal;
[0033] The motor current signal is subjected to DC removal, low-pass filtering and PWM preprocessing to obtain the motor ripple sampling sequence.
[0034] In a second aspect, the present application provides a vehicle motor ripple counting device, comprising:
[0035] A reading module is used to read sequence data of M ripple cycles starting from the starting point of the pre-acquired motor ripple sampling sequence according to the pre-acquired initial single cycle value and the sampling cycle value of the ripple analog-to-digital converter as a processing sequence, wherein M is a preset integer;
[0036] A first calculation module is used to perform a correlation transformation calculation on the processing sequence according to a pre-acquired local sequence corresponding to the processing sequence, so as 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, and the local sequence is a sequence obtained from the processing sequence for performing a correlation transformation;
[0037] A first determination module is used to determine a target algorithm according to a predicted period of the processing sequence predicted in advance, wherein the target algorithm includes a double-sided straight line intersection method or a parabola fitting method, and is used to calculate the upper peak position of the related transformation sequence;
[0038] A second calculation module is used 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 relevant transformation sequence based on the measurement point set and the target algorithm, wherein the measurement point set includes a plurality of sampling points for calculating the upper peak position of the relevant transformation sequence;
[0039] A second determination module is used to determine the number of ripples in the processing sequence according to the upper peak position and perform cumulative counting;
[0040] A loop processing module is used to read sequence data of M ripple cycles from the motor ripple sampling sequence starting from a new starting point in chronological order according to the initial single cycle value and the sampling cycle value, as a new processing sequence, and repeat the above steps until the motor ripple sampling sequence is processed, and the new starting point is determined based on the cycle division position of the processing sequence.
[0041] In conjunction with the second aspect, in some embodiments, the second determining module includes:
[0042] a determination unit, configured to determine a ripple period value of the processing sequence according to the upper peak position;
[0043] The cycle division unit is used to divide the ripple cycle of the processing sequence based on the ripple cycle value of the processing sequence, and determine the ripple quantity of the processing sequence for cumulative counting based on the result of the ripple cycle division.
[0044] In conjunction with the second aspect, in some embodiments, the second computing module includes:
[0045] A selection unit, configured to select, according to the prediction period of the processing sequence, a sampling point in the processing sequence with the shortest time interval with the previously acquired upper peak prediction position of the processing sequence as a center point;
[0046] A first determining unit is used for determining two points on the left and right sides of the center point respectively based on the processing sequence and the prediction period of the processing sequence if the target algorithm is the two-sided straight line intersection method, and using the determined four points as a measurement point set;
[0047] A first transformation unit is used to perform a correlation transformation on the measurement point set based on the local sequence to obtain a correlation transformation value of each point;
[0048] The first calculation unit is used to calculate the upper peak position of the correlation transformation sequence according to a preset double-sided straight line intersection formula and the correlation transformation value of each point.
[0049] In conjunction with the second aspect, in some embodiments, the second computing module includes:
[0050] A second determining unit is configured to determine, if the target algorithm is the parabola fitting method, one point on each side of the left and right sides of the center point based on the processing sequence and the prediction period of the processing sequence, and use the two determined points and the center point as the measurement point set;
[0051] A second transformation unit is used to perform a correlation transformation on the measurement point set based on the local sequence to obtain a correlation transformation value of each point;
[0052] The second calculation unit is used 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.
[0053] In conjunction with the second aspect, in some embodiments, the first determining module includes:
[0054] a first determining unit, configured to determine the parabola fitting method as the target algorithm if the predicted period of the processing sequence is less than a preset period threshold;
[0055] The second determining unit is used to determine the two-sided straight line intersection method as the target algorithm if the predicted period of the processing sequence is greater than the period threshold.
[0056] In conjunction with the second aspect, in some embodiments, the apparatus further includes:
[0057] A third determination module, used to determine the running speed of the vehicle window glass according to the ripple period value of the processing sequence;
[0058] The monitoring and control module is used to monitor and control the anti-pinch function of the vehicle's window glass according to the ripple amount of the motor, the running speed of the window glass and the pre-acquired motor parameters.
[0059] In conjunction with the second aspect, in some embodiments, the apparatus further includes:
[0060] Real-time sampling module, used for real-time sampling of motor current signals;
[0061] The preprocessing module is used 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 communicatively connected to the processor;
[0063] The memory stores computer-executable instructions;
[0064] The processor executes the computer-executable instructions stored in the memory to implement the motor ripple counting method described in any one of the first aspects.
[0065] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the motor ripple counting method described in any one of the first aspects.
[0066] In a fifth aspect, the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the motor ripple counting method described in any one of the first aspects.
[0067] The motor ripple counting method, device, equipment and storage medium provided by the present application, according to 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 from the starting point of the pre-acquired motor ripple sampling sequence as the processing sequence, and perform relevant transformation calculations on the processing sequence according to the local sequence corresponding to the pre-acquired processing sequence, and then determine the target algorithm according to the predicted cycle of the pre-predicted processing sequence, determine the measurement point set of the processing sequence according to the predicted cycle, and calculate the upper peak position corresponding to the related transformation sequence based on the measurement point set and the target algorithm, and determine the number of ripples in the processing sequence according to the upper peak position for cumulative counting, and read the sequence data of M ripple cycles from the motor ripple sampling sequence at the new starting point in chronological order as a new processing sequence, repeat the above steps until the motor ripple sampling sequence is processed. Through the above method, the accurate cycle determination of the motor ripple sampling sequence is realized, and the upper peak position is determined based on the measurement point set and the target algorithm, and the amount of calculation is greatly reduced, and the influence of serious distortion and noise is avoided. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0069] Figure 1 An application scenario diagram of the motor ripple counting method provided in an embodiment of the present application;
[0070] Figure 2 is an exemplary actual ripple waveform diagram of a motor;
[0071] Figure 3 A schematic diagram of a flow chart of a first embodiment of a motor ripple counting method provided in an embodiment of the present application;
[0072] Figure 4 It is the relationship between the ripple frequency and the number of sampling points per cycle;
[0073] Figure 5 This is a graph of the number of sampling points in one ripple cycle when the ripple frequency is 200Hz;
[0074] Figure 6 This is a graph of the number of sampling points in one ripple cycle when the ripple frequency is 400Hz;
[0075] Figure 7 This is a graph of the number of sampling points in one ripple cycle when the ripple frequency is 1000Hz;
[0076] Figure 8 This is a graph of the number of sampling points in one ripple cycle when the ripple frequency is 2000Hz;
[0077] Fig. 9 A schematic diagram of a flow chart of a second embodiment of a motor ripple counting method provided in an embodiment of the present application;
[0078] Fig.10 A schematic diagram of a flow chart of a third embodiment of a motor ripple counting method provided in an embodiment of the present application;
[0079] Fig.11 The schematic diagram of obtaining the upper peak position by the method of intersection of two-sided straight lines;
[0080] Fig.12 Schematic diagram of obtaining the upper peak position using the parabola fitting method;
[0081] Fig.13 A flowchart of a fourth embodiment of a motor ripple counting method provided in an embodiment of the present application;
[0082] Fig.14 A flowchart of a fifth embodiment of a motor ripple counting method provided in an embodiment of the present application;
[0083] Fig.15 A schematic diagram of a specific implementation flow of the motor ripple counting method provided in an embodiment of the present application;
[0084] Fig.16 A schematic diagram of the structure of a first embodiment of a motor ripple counting device provided in an embodiment of the present application;
[0085] Fig.17 A schematic diagram of the structure of a second embodiment of a motor ripple counting device provided in an embodiment of the present application;
[0086] Fig.18 A schematic diagram of the structure of a third embodiment of a motor ripple counting device provided in an embodiment of the present application;
[0087] Fig.19 A schematic diagram of the structure of a fourth embodiment of a motor ripple counting device provided in an embodiment of the present application;
[0088] Fig. 20 A schematic diagram of the structure of a fifth embodiment of a motor ripple counting device provided in an embodiment of the present application;
[0089] Fig.21 A schematic diagram of the structure of a sixth embodiment of a motor ripple counting device provided in an embodiment of the present application;
[0090] Fig. 22 A schematic diagram of the structure of a motor controller provided in an embodiment of the present application.
[0091] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0092] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0093] With the continuous advancement of science and technology, electric windows have become increasingly popular. For the sake of passenger safety protection, electric windows must have an anti-pinch function to prevent fingers, arms, children's heads and other body parts from being pinched during the window closing process. Early window drive motors mostly used DC brushed motors with Hall sensors. In recent years, in order to reduce costs, more and more vehicles directly use the ripple signal of the DC motor current to count the cumulative number of motor rotations, replacing the function of the Hall sensor. In the prior art, the waveform quality of the DC motor ripple is not only related to the state of the motor when it is working, but also to the factors of the motor commutator. The window controller has a tolerance for ripple waveform deformation when counting ripples, and ripple counting is one of the key performance indicators for measuring the performance of the ripple anti-pinch algorithm of the window motor controller. For ripple counting, it is usually zero-crossing / mean-line detection, and an improved algorithm based on this method. However, if the ripple waveform input into the above algorithm is a distorted waveform, the zero-crossing / mean-line-crossing detection algorithm will malfunction, causing the window motor ripple count to be over- or under-counted, thereby causing an incorrect judgment of the position of the window glass, leading to various false anti-pinch faults.
[0094] In response to the above problems, the present application provides a motor ripple counting method, device, equipment and storage medium. Specifically, zero-crossing / mean-line-crossing detection and an improved algorithm based on this method are usually used to count ripples. However, if the ripple waveform input to the algorithm is a distorted waveform, for example, the motor ripple has a large concave deformation in part of the cycle, close to splitting into two waveforms, or the waveform amplitude of part of the ripple cycle is significantly smaller and offset from the amplitude of the adjacent cycle, the "zero-crossing / mean-line-crossing detection" algorithm may cause malfunction, resulting in large jitter in the identified ripple period value, resulting in inaccurate counting. In view of these problems, the inventor studied whether it is possible to suppress the distortion and noise of the motor ripple by sampling the motor ripple and performing a correlation transformation on the sampled measurement point set, and then determine the upper peak position of the motor ripple through the transformed measurement point set, and determine the period based on the upper peak position, and determine the number of ripples based on the determined period value. This achieves accurate ripple counting, saves manufacturing costs, ensures the accuracy of determining the position of the window glass, improves the accuracy of the window anti-pinch function, and enhances the user experience.
[0095] Figure 1 This is an application scenario diagram of the motor ripple counting method provided in the embodiment of the present application. The method can be applied to the window motor ripple processing scenario, which includes at least one electric window 100, and the electric window 100 is composed of a glass guide groove 101, a ripple motor 102, a lifting and adjusting frame 103, and a glass 104. Among them, the ripple motor 102 is configured with a motor controller, and the ripple motor can lift and lower the window glass 104 through a driving mechanism composed of a wire rope, a rope loop, and a lifting and 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 its anti-pinch detection distance range is 4mm-200mm. In order 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 ripples generated by the ripple motor 102. The motor controller collects the ripple signal of the ripple motor 102 in real time, Figure 2 is an exemplary actual motor ripple waveform diagram, such as Figure 2 As shown, since the original ripple signal is distorted and noisy due to interference from various factors, the motor controller samples the ripple signal and performs correlation transformation on the sampled measurement point set, thereby suppressing distortion and noise and reducing the amount of calculation. The upper peak position is determined through the transformed measurement point set, the ripple period is obtained according to the upper peak position, and the number of ripples is counted based on the ripple period value, thereby ensuring the normal operation of the window anti-pinch function and avoiding the occurrence of false anti-pinch failures.
[0096] It should be noted that the above-mentioned motor controller can be configured in the ripple motor 102, or can be an independent device, or can be a domain controller or a body controller of the vehicle to which the window belongs.
[0097] This application does not specifically limit the form and type of the physical devices mentioned above.
[0098] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0099] Figure 3 The flowchart of the motor ripple counting method embodiment 1 provided in the present application is as follows: Figure 3 As shown, the execution subject of the method is a motor controller, and the method specifically includes:
[0100] 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 a processing sequence.
[0101] In this step, in order to accurately count the ripples of the motor ripple sampling sequence, it is necessary to accurately determine the ripple period. From the characteristics of the motor ripple sampling sequence, it can be seen that the ripple period of the motor ripple sampling sequence is variable. Then, starting from the starting point of the motor ripple sampling sequence, the sequence data of M periods can be read in chronological order and processed as a processing sequence, wherein M is the sum of N, L and R, N is the number of ripple periods determined by the preset ripple period, L is the number of ripple periods of the local sequence, and R is a preset integer used to ensure that the relevant transformation data is sufficient. The local sequence is a sequence obtained from the processing sequence for performing relevant transformations.
[0102] Specifically, since the sampling rate is low in the processing of ripple counting, the single cycle cannot be measured by the number of sampling points, so the initial single cycle value is estimated and predicted in advance, wherein the initial single cycle value is time, which is the specific value of a single cycle, and the processing sequence is read according to the initial single cycle value, and the cycle size is measured using the cycle value. Although the reading is based on the initial single cycle value during the reading process, it is actually the reading of the number of sampling points, which can be read according to the sampling cycle value of the ripple analog-to-digital converter, wherein the sampling cycle value of the ripple analog-to-digital converter is the time interval between each sampling point when the fingerprint wave analog-to-digital converter performs analog-to-digital conversion.
[0103] Step 2: According to the local sequence corresponding to the pre-acquired processing sequence, a relevant transformation calculation is performed on the processing sequence to obtain a relevant transformation sequence corresponding to the processing sequence.
[0104] In this step, after long-term use of the vehicle and under harsh working conditions (such as low temperature, low voltage and heavy load), the ripple waveform of the window motor will be seriously distorted and the noise will increase. In order to accurately estimate the motor ripple period and accurately count the number of ripples when the motor ripple is distorted and noisy, after reading the processing sequence, the processing sequence can be processed by related transformation to obtain the related transformation sequence corresponding to the processing sequence, wherein the related 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 related transformation sequence that suppresses distortion and noise.
[0105] Specifically, according to the initial single-cycle value and the sampling cycle value of the ripple analog-to-digital converter, starting from the starting point of the processing sequence, L cycles of sequence data are read as the local sequence, and the processing sequence and the local sequence are calculated through the relevant transformation formula to obtain the relevant transformation sequence corresponding to the processing sequence.
[0106] The relevant transformation formula can be expressed as:
[0107]
[0108] Among them, 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 related transformation sequence.
[0109] It should be noted that, taking A as the processing sequence, B as the local sequence, and C as the related transformation sequence as an example, the specific calculation of the above related transformation is described as follows:
[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 transformation 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: Determine the target algorithm based on the predicted period of the processing sequence predicted in advance.
[0119] In this step, in order to accurately determine the upper peak position of the relevant transformation, the period of the processing sequence can be predicted in advance, so as to select the target algorithm according to the period, wherein the target algorithm includes the bilateral straight line intersection method or the parabola fitting method, which is used to calculate the upper peak position of the relevant transformation sequence.
[0120] Specifically, a cycle threshold is set in advance. If the predicted cycle of the processing sequence is less than the cycle threshold, the parabola fitting method is determined as the target algorithm; if the predicted cycle of the processing sequence is greater than the cycle threshold, the bilateral straight line intersection method is determined as the target algorithm.
[0121] Optionally, two ripple period ranges may be pre-set, such as period range D and period range E, and period prediction may be performed on the processing sequence. If the predicted period is within period range D, the parabola fitting method may be determined as the target algorithm; if the predicted period is within period range E, the parabola fitting method may be determined as the target algorithm.
[0122] For example, the motor speed range varies greatly, approximately 300Hz to 1700Hz, especially under low temperature, low pressure and heavy load, the motor speed is low (at this time the ripple waveform is severely distorted). A key performance indicator of the window controller is the accuracy of the ripple count. The entire window glass has more than one thousand ripples (assuming it is about 1200) for an upward or downward stroke of about 400mm, so the glass displacement corresponding to one ripple is about 0.33mm. The ripple anti-pinch glass is 4mm-200mm away from the top of the window groove. If the error of the anti-pinch range is controlled within 10% (4mm*10%=0.4mm), the error of the more than one thousand ripple counts in the entire stroke is required to be around 1 ripple.
[0123] Assume that the sampling rate of the window simulation controller is 10ksps, the limit range of the ripple frequency is (200Hz-2000Hz), and the number of sampling points in each ripple cycle ranges from 10000 / 2000 to 10000 / 250=5 to 40. Figure 4 This is the relationship between the ripple frequency and the number of sampling points per cycle, such as Figure 4 As shown in the figure, it can be seen that as the ripple frequency increases, the number of sampling points in one ripple cycle gradually decreases (from 50 to 5 in the figure). Figure 5 This is a graph of the number of sampling points in one ripple cycle when the ripple frequency is 200Hz. Figure 6 This is a graph of the number of sampling points in one ripple cycle when the ripple frequency is 400Hz. Figure 7 This is a graph of the number of sampling points in one ripple cycle when the ripple frequency is 1000Hz. Figure 8 This is a graph of the number of sampling points in one ripple cycle when the ripple frequency is 2000Hz, such as Figures 5 to 8 As shown, the ripple counting algorithm should be able to work properly when the ripple frequency changes within a frequency range of about one octave (200Hz-2000Hz).
[0124] When the sampling rate of the analog controller is fixed and the ripple frequency is low, there are too many sampling signals in one ripple cycle. When performing correlation transformation, the sampling can be reduced to reduce the amount of calculation, which basically does not affect the result of the correlation transformation; Figure 5 The ripple frequency in the waveform is 200Hz. Since the frequencies before and after the ripple correlation transformation are the same, although the waveform shows the correlation waveform after the correlation transformation, it also reflects that the sampling points of the motor ripple in one cycle are too dense when doing the correlation transformation. At this time, the ripple data can be extracted at equal intervals before doing the correlation transformation. A cycle threshold or cycle range can be preset. When the processing sequence cycle is lower than the cycle threshold or is within the cycle range, the sampling rate of the original data input for the correlation transformation calculation is reduced to half.
[0125] Step 4: According to the prediction period of the processing sequence, determine the measurement point set of the processing sequence, and calculate the upper peak position corresponding to the relevant transformation sequence 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 upper peak position of the relevant transformation sequence can be calculated according to the target algorithm.
[0127] Specifically, first, based on the prediction period of the processing sequence, the sampling point in the processing sequence with the smallest time interval with the upper peak prediction position of the processing sequence obtained in advance is taken as the central point. 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 central point based on the processing sequence and the prediction period of the processing sequence, and the determined four points are used as the measurement point set. Based on the local sequence, the measurement point set is correlated and transformed to obtain the correlation transformation value of each point. Finally, according to the preset double-sided straight line intersection formula and the correlation transformation value of each point, the upper peak position of the correlation transformation sequence is calculated.
[0128] Optionally, if the target algorithm is the parabola fitting method, then based on the processing sequence and the prediction period of the processing sequence, a point is determined on each side of the center point, and the two determined points and the center point are used as a measuring point set. Based on the local sequence, a correlation transformation is performed on the measuring point set to obtain the correlation transformation value of each point, and the upper peak position of the correlation transformation sequence is calculated according to a pre-set parabola fitting formula and the correlation transformation value of each point.
[0129] Step 5: According to the upper peak position, determine the number of ripples in the processing sequence and perform cumulative counting.
[0130] In this step, after determining the upper peak position of the correlation transformation sequence, the period value of the correlation transformation sequence can be determined based on the upper peak position of the correlation transformation. Since the period value of the correlation transformation sequence is the same as the period value of the processing sequence, the processing sequence can be periodically divided based on the determined period value, and the number of ripples can be cumulatively counted according to the result of the period division.
[0131] Step 6: In chronological order, according to 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, and repeat steps 2 to 6 until the motor ripple sampling sequence is processed.
[0132] In this step, after the number of ripples in the processing sequence is determined, in order to accurately position the vehicle window glass, the period value and the number of ripples in the processing sequence are output in real time. After completing the processing of the processing sequence, the above steps are repeated in chronological order. At a new starting point, sequence data of M ripple cycles are read from the motor ripple sampling sequence as a new processing sequence, and the number of ripples is continued to be accumulated and counted until the end of a process, wherein the process may be that the motor for lifting the window glass into the slot is blocked, and the ripple counting is ended.
[0133] Optionally, during each reading of a processing sequence, a new starting point is determined based on the period division position of the processing sequence. Specifically, the next sampling point of the current period division position of the current processing sequence is used as the new starting point of the next new processing sequence.
[0134] The motor ripple counting method provided in this embodiment reads the sequence data of M ripple cycles from the starting point of the motor ripple sampling sequence obtained in advance according to the pre-acquired initial single cycle value and the sampling cycle value of the ripple analog-to-digital converter as the processing sequence, and performs relevant transformation calculation on the processing sequence according to the local sequence corresponding to the pre-acquired processing sequence, and then determines the target algorithm according to the predicted cycle of the pre-predicted processing sequence, determines the measurement point set of the processing sequence according to the predicted cycle, and calculates the upper peak position corresponding to the related transformation sequence based on the measurement point set and the target algorithm, and determines the number of ripples in the processing sequence according to the upper peak position for cumulative counting, and reads the sequence data of M ripple cycles from the motor ripple sampling sequence at the new starting point in chronological order as a new processing sequence, and repeats the above steps until the motor ripple sampling sequence is processed. Through the above method, the accurate cycle determination of the motor ripple sampling sequence is realized, and the upper peak position is determined based on the measurement point set and the target algorithm, and the amount of calculation is greatly reduced, and the influence of serious distortion and noise is avoided.
[0135] Fig. 9The flowchart of the motor ripple counting method embodiment 2 provided in the present application is as follows: Fig. 9 As shown, based on 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: Based on the ripple cycle value of the processing sequence, the processing sequence is divided into ripple cycles, and the number of ripples in the processing sequence is determined and accumulated based on the result of the ripple cycle division.
[0138] After determining the upper peak position of the relevant transformation sequence, the period value of the relevant transformation sequence is determined according to the upper peak position. Since the period value of the relevant transformation sequence is the same as the period value of the processing sequence, the period value of the relevant transformation sequence is determined as the period value of the processing sequence. The ripple period of the processing sequence is divided based on the period value of the processing sequence, and the number of ripples is determined based on the result of the division for cumulative counting.
[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 in this embodiment determines the ripple period value of the processing sequence according to the upper peak position, divides the processing sequence into ripple periods based on the ripple period value of the processing sequence, and determines the number of ripples in the processing sequence for cumulative counting based on the result of the ripple period division. By virtue of the characteristic that the relevant transformation sequence and the processing sequence have the same period, the period value of the processing sequence is determined and the ripple is counted, thereby improving the accuracy of the ripple counting.
[0141] Fig.10 The flowchart of the motor ripple counting method embodiment 3 provided in the present application is as follows: Fig.10 As shown, based on the above embodiment, step 4 specifically includes:
[0142] S1001: According to the prediction period of the processing sequence, a sampling point in the processing sequence with the shortest time interval with the upper peak prediction position of the processing sequence acquired in advance is taken as the center point.
[0143] In this step, the upper peak position of the processing sequence is predicted based on the prediction period of the processing sequence to obtain the upper peak prediction position. 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 with the upper peak prediction position can be selected in the processing sequence as the center point for selecting the measurement point set.
[0144] S1002: If the target algorithm is the bilateral straight line intersection method, two points are determined on both sides of the center point based on the processing sequence and the prediction period of the processing sequence, and the determined four points are used as the measurement point set.
[0145] S1003: Based on the local sequence, a correlation transformation is performed on the measurement point set to obtain a correlation transformation value of each point.
[0146] In this step, due to the different target algorithms, the number and positions of sampling points in the measuring point set are different. When the target algorithm is the bilateral straight line intersection method, the candidate point position index relative to the center point is obtained from the pre-set bilateral straight line intersection method sampling point selection table according to the range of the predicted period value, and two points are determined on both sides of the center point, a total of four points as the measuring point set, and the relevant transformation value of each point in the measuring point set is further calculated based on the local sequence and the relevant transformation calculation formula.
[0147] S1004: Calculate the upper peak position of the correlation transformation sequence according to the preset double-sided straight line intersection formula and the correlation transformation value of each point.
[0148] In this step, after the correlation transformation is completed for the measurement point set, the upper peak position of the correlation transformation sequence is calculated based on the correlation transformation value of each point through the double-sided straight line intersection formula.
[0149] Specifically, two points after the correlation transformation on both sides of the center point are used to determine a straight line, called a left slope line and a right slope line, and the intersection of the left slope line and the right slope line is obtained as the upper peak position of the correlation transformation sequence.
[0150] For example, the coordinates of the two points sampled on the left are set to (x1, y1) and (x2, y2), and the coordinates of the two points sampled on the right are set to (x3, y3) and (x4, y4), then the left slope line Line1 and the right slope line Line2 can be expressed as:
[0151]
[0152] Transform the above expression into the following expression:
[0153]
[0154] Let slope Then we have:
[0155]
[0156] Then the upper peak position coordinates are calculated as:
[0157]
[0158] Fig.11 This is a schematic diagram of obtaining the upper peak position using the double-sided straight line intersection method, such as Fig.11 As shown, the above-mentioned two-sided straight line intersection method is used to calculate the upper peak point position of an exemplary processing sequence, wherein the upper peak predicted position is predicted according to the prediction period, and the central point and the measuring point set are determined based on the upper peak predicted position, and the relevant transformation value of each point in the measuring point set is obtained, and then the upper peak position is obtained by the two-sided straight line intersection method.
[0159] It should be noted that the two points on the left and right collected above may be continuous sampling points or equally spaced sampling points, which can be preset in the sampling point selection table of the double-sided straight line intersection method.
[0160] S1005: If the target algorithm is the parabola fitting method, based on the processing sequence and the prediction period of the processing sequence, one point is determined on both sides of the center point, and the two determined points and the center point are used as a measurement point set.
[0161] S1006: Based on the local sequence, a correlation transformation is performed on the measurement point set to obtain a correlation transformation value for each point.
[0162] In this step, by determining the target algorithm, if the target algorithm is the parabola fitting method, three points are selected to form a measurement point set, and relevant transformations are performed on each point.
[0163] Specifically, from the pre-set parabola fitting method sampling point selection table, according to the range of the prediction period, the candidate point position index relative to the center point is obtained by looking up the table, and a point is determined on the left and right sides of the center point. Together with the center point, a total of three points constitute a measurement point set, and further calculate the relevant transformation value of each point in the measurement point set based on the local sequence and the relevant transformation calculation formula.
[0164] S1007: 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.
[0165] 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 based on the correlation transformation value of each point through the parabola fitting formula.
[0166] Exemplarily, the relevant transformation values are calculated using the center point I and one point on the left / right side of the center point I, a total of three points, and the coordinates of the three points are used to determine a downward-opening parabola, and the vertex of the parabola is used as the upper peak position of the relevant transformation sequence;
[0167] Suppose a vertex coordinate is (c, b) and the equation of the parabola is: (yb) = a(xc) 2
[0168] The coordinates of the three sampling points in the measurement point set are (x1, y1), (x2, y2), and (x3, y3). The process of deriving coefficients a, b, and c is as follows:
[0169]
[0170] make 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] Fig.12 This is a schematic diagram of obtaining the upper peak position using the parabola fitting method, such as Fig.12 As shown, when the frequency of the processing sequence is high, the number of sampling points in one ripple cycle is small, and it is more accurate to select the parabola fitting method as the target algorithm to calculate the upper peak position. Fig.12 In the simulation, cosine wave is used to observe the error of this method. It can be seen that the upper peak position obtained by the three-point parabola fitting method is very close to the actual ripple period dividing line.
[0176] Optionally, each time the upper peak position of a processing sequence is calculated, the period and 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 and ripple period change rate of the previous processing sequence are used to predict the ripple period of the current processing sequence. For the prediction of the upper peak position, the prediction can be made based on the predicted period value of the current processing sequence minus the time difference between the period division position of the previous processing sequence and the sampling point of the ripple analog-to-digital converter of the current processing sequence.
[0177] The motor ripple counting method provided in the present embodiment, according to the prediction period of the processing sequence, takes the sampling point position in the processing sequence with the smallest time interval with the upper peak prediction position of the processing sequence obtained in advance as the central point position; if the target algorithm is the double-sided straight line intersection method, then based on the processing sequence and the prediction period of the processing sequence, two points are determined on the left and right sides of the central point position respectively, and the determined four points are used as a measuring point set, and the measuring point set is correlated and transformed based on the local sequence to obtain the correlation transformation value of each point position, and the upper peak position of the correlation transformation sequence is calculated according to the preset double-sided straight line intersection formula and the correlation transformation value of each point position; if the target algorithm is the parabola fitting method, then based on the processing sequence and the prediction period of the processing sequence, one point is determined on the left and right sides of the central point position respectively, and the determined two points and the central point position are used as the measuring point set, and the measuring point set is correlated and transformed based on the local sequence to obtain the correlation transformation value of each point position, and the upper peak position of the correlation transformation sequence is calculated according to the preset parabola fitting formula and the correlation transformation value of each point position. By processing different sequence cycles, different target algorithms are determined, and based on different target algorithms, a set of measuring points is selected for relevant transformation and the upper peak position is determined. While accurately calculating the upper peak position, the amount of calculation is reduced, ensuring the accuracy of processing sequence cycle determination and ripple counting.
[0178] Fig.13 The flowchart of the fourth embodiment of the motor ripple counting method provided in the present application is as follows: Fig.13 As shown, based on the above embodiment, the method further includes:
[0179] S1301: Determine the running speed of the vehicle window glass according to the ripple period value of the processing sequence.
[0180] S1302: Monitor and control the vehicle's window glass anti-pinch function according to the motor's ripple quantity, the window glass's running speed, and pre-acquired motor parameters.
[0181] After determining the processing sequence cycle value, the motor speed and the mechanical parameters of the transmission system from the motor output shaft to the window glass can be determined, and the running speed of the window glass can be further determined. Then, according to the number of motor ripples and the number of motor commutator segments, as well as the mechanical parameter speed of the transmission system from the motor output shaft to the window glass, the vehicle window glass can be positioned.
[0182] Optionally, the position and speed information of the vehicle window glass is the basic information for realizing the algorithms of soft start, soft stop, constant speed window lifting and anti-pinch functions of the vehicle window.
[0183] The motor ripple counting method provided in this embodiment determines the running speed of the vehicle window glass according to the ripple period value of the processing sequence, and monitors and controls the vehicle window glass anti-pinch function according to the number of motor ripples, the running speed of the vehicle window glass and the pre-acquired motor parameters. Through the above method, accurate monitoring of the vehicle window anti-pinch function is achieved, and the vehicle window glass is monitored in real time through accurate ripple counting, which improves the user experience and ensures user safety.
[0184] Fig.14 The flowchart of the motor ripple counting method embodiment 5 provided in the present application is as follows: Fig.14 As shown, based on the above embodiment, the method further includes:
[0185] S1401: real-time sampling of motor current signal.
[0186] S1402: performing DC removal, low-pass filtering, and PWM preprocessing on the motor current signal to obtain a motor ripple sampling sequence.
[0187] The movement of the electric window glass is driven by the rotational force generated by the input current of the window motor, and the window motor generates ripples during operation, so the specific position of the window glass can be determined by analyzing the ripples. The motor ripple sampling sequence is obtained by sampling the motor current signal.
[0188] It should be noted that the motor speed is slow and unstable when it is just started. In order to accurately estimate the ripple period and perform ripple counting, it is necessary to sample the ripple sequence generated by the stable operation of the motor as the motor ripple sampling sequence.
[0189] Specifically, the preprocessing performed after sampling the motor current signal may include DC removal and PWM filtering preprocessing. The motor current signal usually contains a DC component and an 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 cut-off frequency is usually selected to filter out the PWM frequency and its higher harmonics. The specific implementation method can be selected according to the performance of the actual motor, and this embodiment is not specifically limited.
[0190] Optionally, the motor current signal may be subjected to low-pass filtering to filter out noise greater than the highest ripple frequency.
[0191] Exemplarily, the current signal after the motor is started can be analyzed and collected, and the stabilized current signal can be pre-processed as a motor ripple sampling sequence.
[0192] The motor ripple counting method provided in this embodiment samples the motor current signal in real time, and performs DC removal and PWM filtering preprocessing on the motor current signal 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 cycle estimation and ripple counting.
[0193] Fig.15 A flowchart of a motor ripple counting method for a specific implementation provided in an embodiment of the present application is shown in FIG. Fig.15 As shown,
[0194] S1501: voltage, current, direction, ambient temperature.
[0195] S1502: Ripple single cycle estimation.
[0196] In order to determine the real-time period of the motor ripple sampling sequence and accurately count the ripples, thereby accurately determining the window glass position, the motor ripple sampling sequence needs to be read and processed in real time. Therefore, it is necessary to estimate the ripple single cycle of the subsequent read sequence data in advance, collect the motor's voltage, current, direction, and ambient temperature, and then determine the ripple single cycle, that is, the initial single cycle value.
[0197] S1503: Read M periodic sequence data from point P.
[0198] This step is implemented in the same way as step 1 in the above embodiment and will not be described again here.
[0199] S1504: Select a set of related transformation measurement points.
[0200] This step is the same as the implementation method of selecting and determining the measurement point set in the above-mentioned embodiments, and will not be described in detail here.
[0201] S1505: Read L periodic sequence data from point P as a local sequence.
[0202] The implementation of selecting the local sequence in this step is the same as the method of selecting the local sequence in the above-mentioned embodiments, and will not be repeated here.
[0203] S1506: Related transformation.
[0204] In this step, the correlation transformation is performed on each point in the measurement point set.
[0205] S1507: Select the side line intersection method or parabola method.
[0206] In this step, the side line intersection method is the bilateral straight line intersection method in the aforementioned 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 being processed. The specific implementation has been described in detail in the aforementioned embodiments and will not be repeated here.
[0207] S1508: Calculate the upper peak position and update P.
[0208] S1509: Save the time value of the period division point.
[0209] S1510: Ripple counting.
[0210] S1511: Motor speed estimation.
[0211] S1512: Positioning / speed regulation and anti-pinch.
[0212] The implementation method of step S1508 to step S1512 is the same as that in the aforementioned embodiments, and will not be repeated here.
[0213] The motor ripple counting method provided in this embodiment selects a set of measuring points in the read processing sequence, thereby performing relevant transformation, and giving the value after relevant transformation, calculating the upper peak position through different calculation methods, and performing period segmentation on the processing sequence, and performing ripple counting based on the segmentation result. The above method not only accurately realizes the ripple period determination and ripple counting of the motor ripple sampling sequence, but also reduces the amount of calculation, saves hardware resources, and also ensures the accurate operation of the window anti-pinch function.
[0214] Fig.16 This is a structural diagram of a first embodiment of a motor ripple counting device provided in an embodiment of the present application, as shown in FIG. Fig.16 As shown, the motor ripple counting device 1600 includes:
[0215] The reading module 1601 is used to read sequence data of M ripple cycles starting from the starting point of the pre-acquired motor ripple sampling sequence according to 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.
[0216] The first calculation module 1602 is used to perform correlation transformation calculation on the processing sequence according to the local sequence corresponding to the processing sequence obtained in advance, and obtain the correlation transformation sequence corresponding to the processing sequence. The correlation transformation sequence has the same ripple period as the processing sequence, and the local sequence is a sequence obtained from the processing sequence for performing correlation transformation.
[0217] The first determination module 1603 is used to determine the target algorithm according to the prediction period of the pre-predicted processing sequence. The target algorithm includes a double-sided straight line intersection method or a parabola fitting method, which is used to calculate the upper peak position of the related transformation sequence.
[0218] The second calculation module 1604 is used to determine the 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 relevant transformation sequence based on the measurement point set and the target algorithm. The measurement point set includes multiple sampling points for calculating the upper peak position of the relevant transformation sequence.
[0219] The second determining module 1605 is used to determine the number of ripples in the processing sequence according to the upper peak position and perform cumulative counting.
[0220] The loop processing module 1606 is used to read the sequence data of M ripple cycles from the motor ripple sampling sequence as a new processing sequence in chronological order according to the initial single cycle value and the sampling cycle value, and repeat the above steps until the motor ripple sampling sequence is processed. The new starting point is determined based on the period division position of the processing sequence.
[0221] Fig.17 The schematic diagram of the structure of the second embodiment of the motor ripple counting device provided in the present application is as follows: Fig.17 As shown, the second determination module 1605 specifically includes:
[0222] The determination unit 1701 is used to determine the ripple period value of the processing sequence according to the upper peak position.
[0223] The cycle division unit 1702 is used to divide the ripple cycle of the processing sequence based on the ripple cycle value of the processing sequence, and determine the number of ripples in the processing sequence for cumulative counting based on the result of the ripple cycle division.
[0224] Fig.18 The schematic diagram of the structure of the third embodiment of the motor ripple counting device provided in the present application is as follows: Fig.18 As shown, the second calculation module 1604 specifically includes:
[0225] The selection unit 1801 is used to select, according to the prediction period of the processing sequence, a sampling point in the processing sequence with the smallest time interval with the upper peak prediction position of the processing sequence obtained in advance as the center point.
[0226] The first determining unit 1802 is used 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 bilateral straight line intersection method, and use the determined four points as the measurement point set.
[0227] The first transformation unit 1803 is used to perform a correlation transformation on the measurement point set based on the local sequence to obtain a correlation transformation value of each point.
[0228] The first calculation unit 1804 is used to calculate the upper peak position of the correlation transformation sequence according to a preset double-sided straight line intersection formula and the correlation transformation value of each point.
[0229] The second determining unit 1805 is used to determine a point on each side of the center point based on the processing sequence and the prediction period of the processing sequence if the target algorithm is the parabola fitting method, and use the two determined points and the center point as a measurement point set.
[0230] The second transformation unit 1806 is used to perform a correlation transformation on the measurement point set based on the local sequence to obtain a correlation transformation value for each point.
[0231] The second calculation unit 1807 is used 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] Fig.19 The schematic diagram of the structure of the fourth embodiment of the motor ripple counting device provided in the present application is as follows: Fig.19 As shown, the first determination module 1603 specifically includes:
[0233] The first determining 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 determining unit 1902 is configured to determine the two-sided straight line intersection method as the target algorithm if the predicted period of the processing sequence is greater than a period threshold.
[0235] Fig. 20 The schematic diagram of the structure of the motor ripple counting device embodiment 5 provided in the present application is as follows: Fig. 20 As shown, the motor ripple counting device 1600 further includes:
[0236] The third determination module 2001 is used to determine the running speed of the vehicle window glass according to the ripple period value of the processing sequence.
[0237] The monitoring and control module 2002 is used to monitor and control the vehicle window glass anti-pinch function according to the ripple amount of the motor, the running speed of the window glass and the pre-acquired motor parameters.
[0238] Fig.21 The schematic diagram of the structure of the sixth embodiment of the motor ripple counting device provided in the present application is as follows: Fig.21 As shown, the motor ripple counting device 1600 further includes:
[0239] The real-time sampling module 2101 is used to sample the motor current signal in real time.
[0240] The preprocessing module 2102 is used 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 in each of the above embodiments is used to execute the motor ripple counting method in any of the above method embodiments. Its implementation principle and technical effect are similar and will not be repeated here.
[0242] Fig. 22 A schematic diagram of the structure of the motor controller provided in the embodiment of the present application is shown in FIG. Fig. 22 As shown, the motor controller 2200 includes: a processor 2202, and a memory 2201 communicatively connected to the processor;
[0243] The memory 2201 stores computer-executable instructions.
[0244] The processor 2202 executes the computer-executable instructions stored in the memory 2201 to implement the motor ripple counting method in any one of the embodiments.
[0245] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the motor ripple counting method in any one of the embodiments.
[0246] The computer-readable storage medium mentioned 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 memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0247] Optionally, a readable storage medium is coupled to a 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 a component 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 in the device as discrete components.
[0248] An embodiment of the present application also provides a computer program product, which includes a computer program. The computer program is stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, the technical solution provided by any of the above method embodiments can be implemented.
[0249] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0250] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A motor ripple counting method, characterized in that: Applied to a motor controller, the method comprises: Step 1: According to 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 a processing sequence, where M is a preset integer; Step 2: According to the pre-acquired local sequence corresponding to the processing sequence, the processing sequence is subjected to correlation transformation calculation 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, and the local sequence is a sequence obtained from the processing sequence for performing correlation transformation; Step 3: determining a target algorithm according to the predicted period of the processing sequence predicted in advance, wherein the target algorithm includes a bilateral straight line intersection method or a parabola fitting method, which is used to calculate the upper peak position of the related transformation sequence; Step 4: according to the prediction period of the processing sequence, determine the measurement point set of the processing sequence, and calculate the upper peak position corresponding to the relevant transformation sequence based on the measurement point set and the target algorithm, wherein the measurement point set includes a plurality of sampling points for calculating the upper peak position of the relevant transformation sequence; Step 5: According to the upper peak position, determine the number of ripples in the processing sequence and perform cumulative counting; Step 6: In chronological order, according to the initial single cycle value and the sampling cycle value, starting from a 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, and the new starting point is determined based on the period division 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 according to the upper peak position and performing cumulative counting includes: Determining a ripple period value of the processing sequence according to the upper peak position; Based on the ripple cycle value of the processing sequence, the processing sequence is divided into ripple cycles, and the number of ripples in the processing sequence is determined and accumulated based on the result of the ripple cycle division.
3. The method according to claim 1, characterized in that The step of determining a set of measuring points of the processing sequence according to the prediction period of the processing sequence, and calculating the upper peak position corresponding to the related transformation sequence based on the set of measuring points and the target algorithm includes: According to the prediction period of the processing sequence, the sampling point in the processing sequence with the shortest time interval with the upper peak prediction position of the processing sequence acquired in advance is taken as the center point; If the target algorithm is the two-sided 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 determined four points are used as a measurement point set; Based on the local sequence, the measurement point set is subjected to correlation transformation to obtain a correlation transformation value of each point; The upper peak position of the correlation transformation sequence is calculated based on the preset double-sided straight line intersection formula and the correlation transformation value of each point.
4. The method according to claim 3, characterized in that The method further comprises: If the target algorithm is the parabola fitting method, 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 measurement point set; Based on the local sequence, the measurement point set is subjected to correlation transformation to obtain a correlation transformation value of each point; The upper peak position of the correlation transformation sequence is calculated based on a preset parabola fitting formula and the correlation transformation value of each point.
5. The method according to claim 1, characterized in that: The step of determining a target algorithm according to a predicted period of the processing sequence predicted in advance comprises: If the predicted period of the processing sequence is less than a preset period threshold, the parabola fitting method is determined as the target algorithm; If the predicted period of the processing sequence is greater than the period threshold, the two-sided straight line intersection method is determined as the target algorithm.
6. The method according to claim 2, characterized in that The method further comprises: Determining the running speed of the vehicle window glass according to the ripple period value of the processing sequence; The anti-pinch function of the vehicle's window glass is monitored and controlled according to the ripple amount of the motor, the running speed of the vehicle 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 comprises: Real-time sampling of motor current signal; The motor current signal is subjected to DC removal, low-pass filtering and pulse width modulation (PWM) preprocessing to obtain the motor ripple sampling sequence.
8. A motor ripple counting device, characterized in that: include: A reading module is used to read sequence data of M ripple cycles starting from the starting point of the pre-acquired motor ripple sampling sequence according to the pre-acquired initial single cycle value and the sampling cycle value of the ripple analog-to-digital converter as a processing sequence, wherein M is a preset integer; A first calculation module is used to perform a correlation transformation calculation on the processing sequence according to a pre-acquired local sequence corresponding to the processing sequence, so as 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, and the local sequence is a sequence obtained from the processing sequence for performing a correlation transformation; A first determination module is used to determine a target algorithm according to a predicted period of the processing sequence predicted in advance, wherein the target algorithm includes a double-sided straight line intersection method or a parabola fitting method, and is used to calculate the upper peak position of the related transformation sequence; A second calculation module, used for calculating the upper peak position corresponding to the relevant transformation sequence according to the processing sequence and the target algorithm; A second determination module is used to determine the number of ripples in the processing sequence according to the upper peak position and perform cumulative counting; A loop processing module is used to read sequence data of M ripple cycles from the motor ripple sampling sequence starting from a new starting point in chronological order according to the initial single cycle value and the sampling cycle value, as a new processing sequence, and repeat the above steps until the motor ripple sampling sequence is processed, and the new starting point is determined based on the cycle division 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-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the motor ripple counting method according to 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 are used to implement the motor ripple counting method according to any one of claims 1 to 7 when executed by a processor.
Citation Information
Patent Citations
Method and system for judging position of automobile power window
CN106499289A
Light load ripple generation method, device and equipment
CN107276190A
Method and device for judging position of vehicle window, vehicle, equipment and medium
CN111706199A
Ripple counting method and device, storage medium and equipment
CN114991612A
Ripple counting filtering and method and system for detecting peak values
DE102019132913A1
Cited By
Current ripple counting method, waveform region identification method and vehicle
CN121581093A
Vehicle window motor ripple count determination method and vehicle
CN121596107A
Electric motor ripple processing method and apparatus, and device and storage medium
WO2026037058A1