Electric motor ripple processing method and apparatus, and device and storage medium

By performing correlation transformation on the motor ripple sampling sequence to suppress distortion and noise, accurate estimation of the motor ripple period is achieved, solving the problem of inaccurate motor ripple period estimation and ensuring the normal operation of the vehicle's anti-pinch function and user experience.

WO2026037058A1PCT designated stage Publication Date: 2026-02-19ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/109448
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-12
Filing Date
2025-07-18
Publication Date
2026-02-19

AI Technical Summary

Technical Problem

In the existing technology, the motor ripple period estimation is inaccurate, resulting in large jitter in the ripple period reading, which in turn leads to false clamping failure.

Method used

By performing correlation transformation on the motor ripple sampling sequence to suppress distortion and noise, the ripple period is accurately estimated using the period segmentation points of the correlation transformation sequence, and the anti-pinch function of the vehicle window is monitored and controlled in combination with motor parameters.

Benefits of technology

Accurate estimation of motor ripple cycle was achieved, ensuring the normal operation of the vehicle's anti-pinch function and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025109448_19022026_PF_FP_ABST
    Figure CN2025109448_19022026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are an electric motor ripple processing method and apparatus, and a device and a storage medium. The method comprises: on the basis of an initial number of sampling points per cycle, performing reading starting from a starting point position of an electric motor ripple sampling sequence; performing transformation detection processing on a processing sequence to obtain N cycle segmentation point positions in a relevant transformed sequence; then, updating the initial number of sampling points per cycle; in chronological order, on the basis of a new initial number of sampling points per cycle, reading, starting from a first starting point position, a new processing sequence from the electric motor ripple sampling sequence, and repeating the abovementioned operations until the processing of the electric motor ripple sampling sequence is completed; and finally, by means of all the cycle segmentation points, performing cycle segmentation on the electric motor ripple sampling sequence. Thus, an electric motor ripple cycle is accurately estimated, such that the normal operation of an anti-pinch function of a vehicle is ensured, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Motor ripple processing method, device, equipment and storage medium

[0001] The present application claims priority to the Chinese patent application No. 202411102514.8, filed on August 12, 2024, and entitled "Motor ripple counting method, device, equipment and storage medium", the content of which is incorporated herein by reference in its entirety. The present application claims priority to the Chinese patent application No. 202411102513.3, filed on August 12, 2024, and entitled "Motor ripple processing method, device, equipment and storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] Embodiments of the present application relate to, but are not limited to, the motor control technical field, and more specifically, to a motor ripple processing method, device, equipment and storage medium. BACKGROUND

[0003] With the continuous progress of science and technology, electric windows have gradually become popular. Due to the safety protection of passengers, electric windows 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 used 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.

[0004] In an optional way, the waveform quality of the direct current motor ripple is not only related to the state of the motor when working, but also related to the factors of the motor commutator. The tolerance of the window controller to the ripple waveform deformation when estimating the ripple period 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 period estimation.

[0005] However, if the input ripple waveform to the above algorithm is a severely distorted waveform, the zero-crossing / average value line detection algorithm will produce a false action, which will cause the period value of each ripple to fluctuate greatly, resulting in inaccurate ripple period, and further leading to false counting of the ripple and causing various false anti-pinch faults. SUMMARY

[0006] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0007] The purpose of the present application is to provide a motor ripple processing method, device, equipment and storage medium to solve the problem of inaccurate estimation of the motor ripple period.

[0008] In a first aspect, the present application provides a motor ripple processing method applied to a motor controller, the method comprising:

[0009] Step a: reading M cycles of sequence data from a starting point of a pre-acquired motor ripple sampling sequence as a processing sequence according to a pre-acquired initial single-cycle sampling point number, wherein M is a preset integer;

[0010] Step b: performing transform detection processing on the processing sequence to obtain N cycle division points in a relevant transform sequence, the relevant transform sequence and the processing sequence having the same ripple cycle, wherein N is a pre-set number of ripple cycles for this division processing;

[0011] Step c: updating the initial single-cycle sampling point number to obtain a new initial single-cycle sampling point number;

[0012] Step d: reading M cycles of sequence data from a first starting point in the motor ripple sampling sequence as a new processing sequence according to the new initial single-cycle sampling point number in time sequence, repeating steps b to d until the motor ripple sampling sequence is processed to obtain N cycle division points in a relevant transform sequence corresponding to each processing sequence, the first starting point being determined based on an ending point of the last ripple cycle data of the processing sequence;

[0013] Step e: performing cycle division on the motor ripple sampling sequence through all cycle division points.

[0014] In combination with the first aspect, in some embodiments, performing transform detection processing on the processing sequence to obtain N cycle division points in a relevant transform sequence comprises:

[0015] performing relevant transform calculation on the processing sequence to obtain the relevant transform sequence;

[0016] performing peak position detection on the relevant transform sequence to obtain N cycle division points in the relevant transform sequence.

[0017] In combination with the first aspect, in some embodiments, the method further comprises:

[0018] reading L cycles of sequence data from a starting point of the processing sequence as a local sequence according to the initial single-cycle sampling point number;

[0019] Correspondingly, performing relevant transform calculation on the processing sequence to obtain the relevant transform sequence comprises:

[0020] performing relevant transform calculation on the processing sequence and the local sequence through a pre-set relevant transform formula to obtain the relevant transform sequence.

[0021] In combination with the first aspect, in some embodiments, the initial single-cycle sampling point number is updated to obtain a new initial single-cycle sampling point number, including:

[0022] The sampling point number of the Nth ripple cycle in the last correlation transform sequence is determined as the new initial single-cycle sampling point number.

[0023] In combination with the first aspect, in some embodiments, the method further includes:

[0024] According to the pre-acquired single-cycle sampling point prediction value, sequence data of M cycles starting from the starting point of the motor ripple sampling sequence is read as an initial processing sequence.

[0025] According to the single-cycle sampling point prediction value, sequence data of L cycles starting from the starting point of the initial processing sequence is read as an initial local sequence.

[0026] According to the initial processing sequence and the initial local sequence, correlation transform calculation is performed through a correlation transform formula to obtain an initial correlation transform sequence.

[0027] The initial correlation transform sequence is subjected to peak position detection to obtain N cycle division points in the initial correlation transform sequence.

[0028] The sampling point numbers of the N cycles of the initial correlation transform sequence are averaged to obtain the initial single-cycle sampling point number.

[0029] In combination with the first aspect, in some embodiments, the method further includes:

[0030] Obtaining motor parameters, including motor current, motor rotation direction, ambient temperature, motor voltage, and ambient temperature.

[0031] According to the motor parameter information, a single-cycle sampling point prediction value is obtained through a table lookup method.

[0032] In combination with the first aspect, in some embodiments, the method further includes:

[0033] Real-time sampling of motor current signals.

[0034] The motor current signal is subjected to DC removal and pulse width modulation (PWM) filtering preprocessing to obtain a motor ripple sampling sequence.

[0035] In combination with the first aspect, in some embodiments, the motor ripple sampling sequence is subjected to cycle division through all cycle division points, including:

[0036] The motor ripple sampling sequence is subjected to cycle division through all cycle division points to obtain a cycle division point sequence.

[0037] Correspondingly, the method further comprises:

[0038] According to the cycle division point sequence, the ripples of the motor ripple sampling sequence are counted.

[0039] In combination with the first aspect, in some embodiments, the motor ripple sampling sequence is divided by all cycle division points to obtain the cycle division point sequence, comprising:

[0040] Step 1: According to the initial single-cycle sampling point number and the sampling period value of the ripple analog-to-digital converter obtained in advance, starting from the starting point of the motor ripple sampling sequence obtained in advance, read the sequence data of M ripple cycles as a processing sequence, wherein M is a preset integer;

[0041] Step 2: According to the local sequence corresponding to the processing sequence obtained in advance, the processing sequence is calculated by correlation transformation to obtain a correlation transformation sequence corresponding to the processing sequence, the correlation transformation sequence and the processing sequence have the same ripple period, and the local sequence is a sequence obtained from the processing sequence for correlation transformation;

[0042] Step 3: According to the predicted period of the processing sequence, determine the target algorithm, the target algorithm includes a double-sided straight line intersection method or a parabolic fitting method, which is used to calculate the upper peak position of the correlation transformation sequence;

[0043] Step 4: According to the predicted period of the processing sequence, determine the measurement point set of the processing sequence, and based on the measurement point set and the target algorithm, calculate the upper peak position corresponding to the correlation transformation sequence, the measurement point set includes a plurality of sampling points, which are used to calculate the upper peak position of the correlation transformation sequence;

[0044] Step 5: According to the upper peak position, determine the ripple period value of the processing sequence, and based on the ripple period value of the processing sequence, divide the motor ripple sampling sequence by all cycle division points to determine the cycle division point sequence;

[0045] Step 6: According to the initial single-cycle value and the sampling period value, starting from the second starting point, read the sequence data of M ripple cycles from the motor ripple sampling sequence as a new processing sequence in time sequence, and repeat steps 2 to 6 until the motor ripple sampling sequence is processed, and the second starting point is determined based on the cycle division position of the processing sequence.

[0046] In combination with the first aspect, in some embodiments, according to the predicted period of the processing sequence, determine the measurement point set of the processing sequence, and based on the measurement point set and the target algorithm, calculate the upper peak position corresponding to the correlation transformation sequence, comprising:

[0047] According to the prediction period of the processing sequence, a sampling point position with the minimum time interval from the upper peak prediction position of the pre-acquired processing sequence is determined as a center point position;

[0048] If the target algorithm is the double-side straight line intersection method, two point positions are determined 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 the four determined point positions are taken as a measurement point set;

[0049] Based on the local sequence, a correlation transformation is performed on the measurement point set to obtain a correlation transformation value of each point position;

[0050] According to the pre-set double-side straight line intersection formula and the correlation transformation value of each point position, an upper peak position of the correlation transformation sequence is calculated.

[0051] In combination with the first aspect, in some embodiments, the method further comprises:

[0052] If the target algorithm is the parabolic fitting method, one point position is determined 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 the two determined point positions and the center point position are taken as a measurement point set;

[0053] Based on the local sequence, a correlation transformation is performed on the measurement point set to obtain a correlation transformation value of each point position;

[0054] According to the pre-set parabolic fitting formula and the correlation transformation value of each point position, an upper peak position of the correlation transformation sequence is calculated.

[0055] In combination with the first aspect, in some embodiments, the target algorithm is determined according to the pre-predicted prediction period of the processing sequence, comprising:

[0056] If the prediction period of the processing sequence is less than a pre-set period threshold, the parabolic fitting method is determined as the target algorithm;

[0057] 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.

[0058] In combination with the first aspect, in some embodiments, the method further comprises:

[0059] According to the ripple period value of the processing sequence, the running speed of the vehicle window glass is determined;

[0060] According to the ripple number 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.

[0061] In combination with the first aspect, in some embodiments, the method further comprises:

[0062] The motor current signal is sampled in real time;

[0063] The motor current signal is DC-removed, low-pass filtered and PWM pre-processed to obtain a motor ripple sampling sequence.

[0064] In a second aspect, the application provides a motor ripple processing device, comprising:

[0065] A first reading module is configured to read sequence data of M cycles from a starting point of a pre-acquired motor ripple sampling sequence as a processing sequence according to an initial single-cycle sampling point number pre-acquired, wherein M is a preset integer;

[0066] A transform detection module is configured to perform transform detection processing on the processing sequence to obtain N cycle division points in a relevant transform sequence, wherein the relevant transform sequence and the processing sequence have the same ripple cycle, and N is a preset number of ripple cycles in the current division processing;

[0067] An updating module is configured to update the initial single-cycle sampling point number to obtain a new initial single-cycle sampling point number;

[0068] A loop module is configured to read sequence data of M cycles from a first starting point in the motor ripple sampling sequence as a new processing sequence according to the new initial single-cycle sampling point number in a time sequence, and the above operation is performed until the motor ripple sampling sequence is completely processed to obtain N cycle division points in a relevant transform sequence corresponding to each processing sequence, and the first starting point is determined based on an ending point of the last ripple cycle data of the processing sequence;

[0069] A division module is configured to divide the motor ripple sampling sequence by all cycle division points.

[0070] In combination with the second aspect, in some embodiments, the transform detection module comprises:

[0071] A relevant transform unit is configured to perform relevant transform calculation on the processing sequence to obtain a relevant transform sequence;

[0072] A detection unit is configured to perform peak position detection on the relevant transform sequence to obtain N cycle division points in the relevant transform sequence.

[0073] In combination with the second aspect, in some embodiments, the device further comprises:

[0074] A second reading module is configured to read sequence data of L cycles from a starting point of the processing sequence as a local sequence according to the initial single-cycle sampling point number;

[0075] Correspondingly, the relevant transform unit is configured to:

[0076] According to the processing sequence and the local sequence, a correlation transform calculation is performed through a preset correlation transform formula to obtain a correlation transform sequence.

[0077] In combination with the second aspect, in some embodiments, the updating module comprises:

[0078] The determining unit is configured to determine the number of sampling points of the Nth ripple period in the correlation transform sequence obtained through the last processing as the new initial single-period sampling point number.

[0079] In combination with the second aspect, in some embodiments, the apparatus further comprises:

[0080] The third reading module is configured to read, as an initial processing sequence, sequence data of M periods starting from a starting point of the motor ripple sampling sequence according to the single-period sampling point number prediction value obtained in advance.

[0081] The fourth reading module is configured to read, as an initial local sequence, sequence data of L periods starting from a starting point of the initial processing sequence according to the single-period sampling point number prediction value.

[0082] The first calculation module is configured to perform a correlation transform calculation through a correlation transform formula according to the initial processing sequence and the initial local sequence to obtain an initial correlation transform sequence.

[0083] The detecting module is configured to perform an up-peak position detection on the initial correlation transform sequence to obtain N-period division points in the initial correlation transform sequence.

[0084] The second calculation module is configured to perform an average calculation on the number of sampling points of the N periods of the initial correlation transform sequence to obtain an initial single-period sampling point number.

[0085] In combination with the second aspect, in some embodiments, the apparatus further comprises:

[0086] The obtaining module is configured to obtain motor parameters, the motor parameters comprising a motor current, a motor rotation direction, an ambient temperature, a motor voltage, and an ambient temperature.

[0087] The table lookup module is configured to obtain the single-period sampling point number prediction value through a table lookup method according to the motor parameter information.

[0088] In combination with the second aspect, in some embodiments, the apparatus further comprises:

[0089] The sampling module is configured to sample a motor current signal in real time.

[0090] The preprocessing module is configured to perform a direct current removal and PWM filtering preprocessing on the motor current signal to obtain a motor ripple sampling sequence.

[0091] In combination with the second aspect, in some embodiments, the dividing module is configured to:

[0092] The motor ripple sampling sequence is period-divided by all the period division points to obtain a period division point sequence;

[0093] Correspondingly, the device further comprises:

[0094] The counting module is configured to count the ripples of the motor ripple sampling sequence according to the period division point sequence.

[0095] In combination with the second aspect, in some embodiments, the device further comprises:

[0096] The fifth reading module is configured to read, as a processing sequence, sequence data of M ripple periods from a starting point of the pre-acquired motor ripple sampling sequence according to the pre-acquired initial single-period sampling point number and the sampling period value of the ripple analog-to-digital converter, where M is a preset integer;

[0097] The third calculation module 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 having the same ripple period, and the local sequence being a sequence acquired from the processing sequence for correlation transformation;

[0098] The first determination module is configured to determine 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, and the target algorithm being used to calculate an upper peak position of the correlation transformation sequence;

[0099] The second determination 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 transformation sequence based on the measurement point set and the target algorithm, the measurement point set including a plurality of sampling point positions and being used to calculate the upper peak position of the correlation transformation sequence;

[0100] The third determination module is configured to determine a ripple period value of the processing sequence according to the upper peak position, and perform ripple period division on the motor ripple sampling sequence by all the period division points based on the ripple period value of the processing sequence to determine a period division point sequence;

[0101] The loop processing module is configured to read, as a new processing sequence, sequence data of M ripple periods from the motor ripple sampling sequence starting from a second starting point according to the initial single-period value and the sampling period value in a time sequence, and repeat steps 2 to 6 until the motor ripple sampling sequence is processed, the second starting point being determined based on a period division position of the processing sequence.

[0102] In combination with the second aspect, in some embodiments, the second determination module comprises:

[0103] 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 previously acquired processing sequence as a center point position;

[0104] 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;

[0105] 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;

[0106] The first calculating unit is configured to calculate a peak position of the correlation transformation sequence according to a double-side straight line intersection formula and the correlation transformation value of each point position;

[0107] 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;

[0108] 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;

[0109] The second calculating unit is configured to calculate a peak position of the correlation transformation sequence according to a parabolic fitting formula and the correlation transformation value of each point position.

[0110] With reference to the second aspect, in some embodiments, the first determining module is configured to:

[0111] 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;

[0112] 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.

[0113] With reference to the second aspect, in some embodiments, the apparatus further includes:

[0114] The fifth determining module is configured to determine a running speed of the vehicle window glass according to the ripple period value of the processing sequence;

[0115] The monitoring control module is configured to monitor and control the anti-pinch function of the vehicle window glass of the vehicle according to the ripple number of the motor, the running speed of the vehicle window glass, and the previously acquired motor parameters.

[0116] In combination with the second aspect, in some embodiments, the apparatus further includes:

[0117] a real-time sampling module configured to sample the motor current signal in real time;

[0118] a preprocessing module configured to perform DC removal, low-pass filtering, and pulse width modulation (PWM) preprocessing on the motor current signal to obtain a motor ripple sampling sequence.

[0119] In a third aspect, the present application provides a motor controller, including a processor and a memory in communication with the processor;

[0120] The memory stores computer-executable instructions;

[0121] The processor executes the computer-executable instructions stored in the memory to implement the motor ripple processing method of any one of the first aspect.

[0122] In a fourth aspect, the present application provides a computer-readable storage medium, the computer-readable storage medium storing computer-executable instructions, the computer-executable instructions being executed by a processor to implement the motor ripple processing method of any one of the first aspect.

[0123] In a fifth aspect, the present application provides a computer program product, the computer program product including a computer program, the computer program being executed by a processor to implement the motor ripple processing method of any one of the first aspect.

[0124] In a sixth aspect, the present application provides a computer program, the computer program being executed on a computer to implement the method described in the first aspect.

[0125] The motor ripple processing method, apparatus, device, and storage medium provided by the present application read M-cycle sequence data from a starting point of a pre-acquired motor ripple sampling sequence as a processing sequence according to a pre-acquired initial single-cycle sampling point number, perform transform detection processing on the processing sequence to obtain N-cycle division points in a correlation transform sequence, update the initial single-cycle sampling point number to obtain a new initial single-cycle sampling point number, read M-cycle sequence data from a first starting point according to the new initial single-cycle sampling point number in the motor ripple sampling sequence as a new processing sequence in time sequence, repeat the foregoing operations until the motor ripple sampling sequence is processed to obtain N-cycle division points in a correlation transform sequence corresponding to each processing sequence, and divide the motor ripple sampling sequence by all cycle division points. The above method thus realizes accurate estimation of motor ripple cycles, further ensures normal operation of a vehicle anti-pinch function, and thus improves user experience.

[0126] Other aspects can become apparent from the following drawings and detailed description. BRIEF DESCRIPTION OF DRAWINGS

[0127] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.

[0128] FIG. 1 is a diagram of an application scenario of a motor ripple processing method according to an embodiment of the present application;

[0129] FIG. 2 is a diagram of an exemplary actual motor ripple waveform;

[0130] FIG. 3 is a flow diagram of an embodiment of a motor ripple processing method according to the present application;

[0131] FIG. 4 is a diagram of a motor ripple correlation transformation principle;

[0132] FIG. 5 is a diagram of a combination of a local sequence waveform and a waveform after correlation transformation of a starting segment of an actual motor ripple;

[0133] FIG. 6 is a diagram of a transformed sequence and an upper peak point of a starting segment of an actual motor ripple;

[0134] FIG. 7 is a diagram of a period division of an actual motor ripple;

[0135] FIG. 8 is a flow diagram of an embodiment of a motor ripple processing method according to the present application;

[0136] FIG. 9 is a diagram of an exemplary initial single period sampling point number calculation flow;

[0137] FIG. 10 is a flow diagram of an embodiment of a motor ripple processing method according to the present application;

[0138] FIG. 11 is a flow diagram of an embodiment of a motor ripple processing method according to the present application;

[0139] FIG. 12 is a flow diagram of a specific example of a motor ripple processing method according to the present application;

[0140] FIG. 13(a) is a diagram of a correlation transformation of a local sequence being a fundamental wave and an input signal sequence being a fundamental wave and a second harmonic;

[0141] FIG. 13(b) is a diagram of a correlation transformation of a local sequence being a fundamental wave and an input signal sequence being a fundamental wave and a third harmonic;

[0142] FIG. 13(c) is a diagram of a correlation transformation of a local sequence being a fundamental wave and an input signal sequence being a second harmonic and a third harmonic;

[0143] FIG. 14(a) is a diagram of a correlation transformation of a local sequence being a second harmonic and an input signal sequence being a fundamental wave and a second harmonic;

[0144] Fig. 14(b) is a schematic diagram of correlation transform when the local sequence is the second harmonic and the input signal sequence is the fundamental and the third harmonic;

[0145] Fig. 14(c) is a schematic diagram of correlation transform when the local sequence is the second harmonic and the input signal sequence is the second harmonic and the third harmonic;

[0146] Fig. 15(a) is a schematic diagram of correlation transform when the local sequence is the third harmonic and the input signal sequence is the fundamental and the second harmonic;

[0147] Fig. 15(b) is a schematic diagram of correlation transform when the local sequence is the third harmonic and the input signal sequence is the fundamental and the third harmonic;

[0148] Fig. 15(c) is a schematic diagram of correlation transform when the local sequence is the third harmonic and the input signal sequence is the second harmonic and the third harmonic;

[0149] Fig. 16 is a schematic diagram of correlation transform when the local sequence is the sum of the fundamental, the second harmonic and the third harmonic;

[0150] Fig. 17 is a schematic diagram of the mutual orthogonal characteristics of the fundamental and each harmonic of correlation transform;

[0151] Fig. 18 is a flowchart of a first embodiment of the motor ripple counting method provided by the present application;

[0152] Fig. 19 is a graph of the relationship between the ripple frequency and the number of sampling points per cycle;

[0153] Fig. 20 is a graph of the number of sampling points per cycle when the ripple frequency is 200 Hz;

[0154] Fig. 21 is a graph of the number of sampling points per cycle when the ripple frequency is 400 Hz;

[0155] Fig. 22 is a graph of the number of sampling points per cycle when the ripple frequency is 1000 Hz;

[0156] Fig. 23 is a graph of the number of sampling points per cycle when the ripple frequency is 2000 Hz;

[0157] Fig. 24 is a flowchart of a second embodiment of the motor ripple counting method provided by the present application;

[0158] Fig. 25 is a flowchart of a third embodiment of the motor ripple counting method provided by the present application;

[0159] Fig. 26 is a schematic diagram of the intersection of two straight lines to find the position of the upper peak;

[0160] Fig. 27 is a schematic diagram of parabolic fitting to find the position of the upper peak;

[0161] Fig. 28 is a flow chart of an embodiment four of the motor ripple counting method provided by the present application;

[0162] Fig. 29 is a flow chart of an embodiment five of the motor ripple counting method provided by the present application;

[0163] Fig. 30 is a flow chart of a specific implementation of the motor ripple counting method provided by the present application;

[0164] Fig. 31 is a structural schematic diagram of an embodiment one of the motor ripple processing device provided by the present application;

[0165] Fig. 32 is a structural schematic diagram of an embodiment two of the motor ripple processing device provided by the present application;

[0166] Fig. 33 is a structural schematic diagram of an embodiment three of the motor ripple processing device provided by the present application;

[0167] Fig. 34 is a structural schematic diagram of an embodiment four of the motor ripple processing device provided by the present application;

[0168] Fig. 35 is a structural schematic diagram of an embodiment five of the motor ripple processing device provided by the present application;

[0169] Fig. 36 is a structural schematic diagram of an embodiment six of the motor ripple processing device provided by the present application;

[0170] Fig. 37 is a structural schematic diagram of an embodiment seven of the motor ripple processing device provided by the present application;

[0171] Fig. 38 is a structural schematic diagram of an embodiment eight of the motor ripple processing device provided by the present application;

[0172] Fig. 39 is a structural schematic diagram of the motor controller provided by the present application.

[0173] The above-mentioned drawings have shown the explicit embodiments of the present application, which will be described in more details hereinafter. These drawings and written descriptions are not intended to limit the scope of the concept of the present application by any means, but to illustrate the concept of the present application to the skilled in the art by referring to the specific embodiments.

[0174] The drawings are used to provide further understanding of the technical solutions of the present application, and constitute a part of the specification, and are used to explain the technical solutions of the present application together with the embodiments of the present application, and do not constitute a limitation on the technical solutions of the present application. DETAILED DESCRIPTION

[0175] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0176] The exemplary embodiments will be described in detail below with reference to the accompanying drawings. The following description relates to the drawings, wherein 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 apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.

[0177] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, necessary security measures are taken, do not violate public order and good customs, and provide corresponding operation portal for user to choose authorization or refusal.

[0178] And the present application involves big data analysis of user information (including but not limited to personal biological characteristics, identity data, consumption data, asset data, electronic terminal operation data, etc.), and uses artificial intelligence technology for automatic decision-making, and provides a corresponding operation portal for the user to choose to agree or refuse the automatic decision-making result based on the automatic decision-making result to make a decision that has a significant impact on personal rights and interests; if the user chooses to refuse, the expert decision-making process is entered.

[0179] With the continuous progress of science and technology, electric windows gradually popularize, for the reason of passenger safety protection, electric windows have anti-pinch function, prevent pinching fingers, arms, children's heads and other body parts during window closing. Early window drive motor uses direct current brush motor with Hall sensor. In recent years, in order to reduce the cost, more and more vehicles directly use the ripple signal of direct current motor current to count the cumulative number of motor rotation, instead of the function of Hall sensor. The waveform quality of direct current motor ripple is not only related to the state of the motor when 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 estimating the ripple period is one of the key performance indicators to measure the performance of the anti-pinch algorithm of the window motor controller. For the estimation of the ripple period, the zero-crossing / average value line detection and the improved algorithm based on this method are usually used. The basic principle is to calculate the average value of all sampling points in the current ripple and the previous and next several ripple periods as the current current average value, and if the waveform crosses the average value line with a positive slope (or negative slope), it is the starting point / ending point of the ripple period. However, if the input waveform of the above algorithm is a seriously distorted waveform, the zero-crossing / average value line detection algorithm will produce a false action, which will cause the period value of each ripple to fluctuate greatly, resulting in inaccurate ripple period, and further causing various false anti-pinch faults.

[0180] In view of the above problems, the application provides a motor ripple processing method, device, equipment and storage medium. Specifically, the zero-crossing / average value line detection and the improved algorithm based on this method are usually used for estimation of the ripple period, but if the input waveform of the algorithm is a distorted waveform, for example, the motor ripple part period has a concave deformation, is close to splitting into two waveforms, or the amplitude of part of the ripple period and the amplitude of the adjacent period are small and offset, therefore, the "zero-crossing / average value line detection" algorithm may produce a false action, causing the identified ripple period value to fluctuate greatly, thereby causing inaccurate period estimation. Considering these problems, the inventors have studied whether the distortion and noise of the motor ripple can be suppressed by performing a correlation transformation on the motor ripple, and the influence of the transformed period, and then performing period estimation on the transformed waveform, so as to realize accurate period estimation, save manufacturing cost, and improve user experience.

[0181] Fig. 1 is a diagram of an application scenario of a motor ripple processing method provided by an embodiment of the present application. The method can be applied to a power window motor ripple processing scenario. The scenario includes at least one power window 100. The power window 100 is composed of a glass guide slot 101, a ripple motor 102, a lifting adjusting frame 103, and a glass 104. The ripple motor 102 is configured with a motor controller. The ripple motor can lift and lower the window glass 104 through a drive mechanism composed of a steel wire, a rope sleeve, and the lifting adjusting frame 103. The glass 104 moves up and down in the glass guide slot 101. During the movement, the power window 100 has an anti-pinch function. 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. The position of the glass 104 can be determined by counting the ripple generated by the ripple motor 102. To count the ripple, an accurate ripple period is required. The motor controller collects ripple signals of the ripple motor 102 in real time. Fig. 2 is an exemplary actual motor ripple waveform diagram. As shown in Fig. 2, the original ripple signal is distorted and noisy due to interference from various factors. The motor controller can suppress the distortion and noise by performing correlation transformation on the ripple signal. The correlation-transformed ripple signal has the same period division point position as the original ripple signal. Then, the motor controller performs period division on the original ripple signal according to the period division point position of the correlation-transformed ripple signal, to obtain an accurate period of the original ripple signal, thereby ensuring the normal operation of the anti-pinch function and avoiding the occurrence of false anti-pinch faults.

[0182] Optionally, as shown in Fig. 2, the original ripple signal is distorted and noisy due to interference from various factors. The motor controller can suppress the distortion and noise by sampling the ripple signal and performing correlation transformation on the obtained sample point set, thereby reducing the calculation amount. The peak position is determined through the transformed sample point set. The ripple period is obtained according to the peak position. The ripple quantity is counted based on the ripple period value, thereby ensuring the normal operation of the power window anti-pinch function and avoiding the occurrence of false anti-pinch faults.

[0183] It should be noted that the above-mentioned motor controller can be configured in the ripple motor 102, can be a separate device, or can be a domain controller or a body controller of a vehicle to which the power window belongs.

[0184] The present application does not specifically limit the form and type of the above-mentioned entity device.

[0185] The technical solutions of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other. The same or similar concepts or processes can not be described in detail in some embodiments. The embodiments of the present application will be described below with reference to the drawings.

[0186] FIG. 3 is a flow diagram of an embodiment of a motor ripple processing method according to the present application. As shown in FIG. 3, the method is executed by a motor controller, and includes the following steps:

[0187] Step a: According to the initial single-cycle sampling point number obtained in advance, read M-cycle sequence data from the starting point of the motor ripple sampling sequence obtained in advance as a processing sequence.

[0188] In this step, in order to accurately determine the ripple period of the motor ripple sampling sequence, according to the characteristics of the motor ripple sampling sequence, the ripple period of the motor ripple sampling sequence is variable. Therefore, M-cycle sequence data can be read from the starting point of the motor ripple sampling sequence in time sequence as a processing sequence for processing, where M is the sum of N, L and R, N is the number of ripple periods of the current segmentation processing set in advance, L is the number of ripple periods of the local sequence, and R is a preset integer for ensuring sufficient correlation transform data. The local sequence is a sequence obtained from the processing sequence for correlation transform.

[0189] Specifically, M-cycle sequence data is read according to the initial single-cycle sampling point number, thereby obtaining a processing sequence.

[0190] For example, taking the initial single-cycle sampling point number K' as an example, M-cycle sequence data is read from the starting point of the motor ripple sampling sequence as a processing sequence. Therefore, the processing sequence contains MxK' sampling points.

[0191] For example, taking K' = 4 and M = 8, 32-point data is read from the starting point of the motor ripple sampling sequence as a processing sequence.

[0192] Step b: Perform transform detection processing on the processing sequence to obtain N-cycle division points in the correlation transform sequence.

[0193] 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 severely distorted, and the noise will also increase. In order to accurately estimate the motor ripple period even in the presence of distortion and noise of the motor ripple, after the processing sequence is read, the read processing sequence can be processed by correlation transform, thereby obtaining a correlation transform sequence corresponding to the processing sequence. The correlation transform sequence has the same ripple period as the processing sequence. Then, by detecting the peak position of the correlation transform sequence, N-cycle division points in the correlation transform sequence are obtained.

[0194] Specifically, according to the initial single-cycle sampling point number, a sequence data of L cycles is read from the starting point of the processing sequence as a local sequence, and then the processing sequence and the local sequence are input into a correlation transform formula for correlation transform calculation, so as to obtain a correlation transform sequence corresponding to the processing sequence. After obtaining the correlation transform sequence corresponding to the processing sequence, in order to accurately determine the N-cycle division point positions in the processing sequence. According to the above correlation transform processing, the processing sequence and the correlation transform sequence have the same ripple cycle, then the peak position detection is performed on the correlation transform sequence, and then the N-cycle division point positions in the correlation transform sequence are determined according to the detected peak position.

[0195] For example, FIG. 4 is a schematic diagram of motor ripple correlation transform principle. A sequence of L cycles in length is intercepted from the starting point of the processing sequence as a local sequence, and then the processing sequence and the local sequence are calculated through a preset correlation transform formula to obtain a correlation transform sequence corresponding to the processing sequence. As shown in FIG. 4, A is the processing sequence, B is the local sequence, and C is the correlation transform sequence. According to the principle in FIG. 4, each output value in the C sequence can be represented as: C 00 = A 00 ·B 00 + A 01 ·B 01 + A 02 ·B 02 + A 03 ·B 03 + A 04 ·B 04 C 01 = A 01 ·B 00 + A 02 ·B 01 + A 03 ·B 02 + A 04 ·B 03 + A 05 ·B 04 C 02 = A 02 ·B 00 + A 03 ·B 01 + A 04 ·B 02 + A 05 ·B 03 + A 06 ·B 04 …… C 15 = A 15 ·B 00 + A 16 ·B 01 + A 17 ·B 02 + A18 • B 03 + A 19 • B 04

[0196] Thus, the correlation transform sequence C can be expressed as: 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

[0197] The correlation transform formula can be obtained as:

[0198] wherein A k is the processing sequence, B j is the local sequence, j = 0, 1, 2, 3,..., (L-1), L is the length of the local sequence, and C k is the correlation transform sequence.

[0199] It should be noted that the local sequence can be adaptively adjusted, and according to the number of sampling points of the processing sequence, the corresponding local sequence is also different.

[0200] The selection of the local sequence is related to the period of the processing sequence, that is, the local sequence is the sequence of the starting segment of the processing sequence, and the length is an integer multiple of the period of the processing sequence.

[0201] For example, FIG. 5 is a schematic diagram of the waveform combination of the local sequence of the starting segment of the actual motor ripple and the waveform after the correlation transform, as shown in FIG. 5, the processing sequence in FIG. 5 is obtained by reading the actual motor ripple, and the starting segment is selected as the local sequence. After the above correlation transform processing, the correlation transform sequence corresponding to the processing sequence is obtained. As can be seen from FIG. 5, the correlation transform sequence is similar to a cosine sequence with a phase of 0. It can be found that the correlation transform sequence has the same ripple period as the processing sequence.

[0202] The correlation transform processing of the embodiment can suppress distortion and noise in the motor ripple sampling sequence, so that the period prediction of the seriously damaged motor ripple is still accurate. The principle of suppressing distortion and noise in the motor ripple sequence by the correlation transform processing is described below.

[0203] Principle (1): integral characteristic.

[0204] The integral sum and difference formula of trigonometric functions is as follows:

[0205] Let x = ω1t + θ1, y = ω2t + θ2, s(t) is the product of x and y, i.e.

[0206] If ω2 = n·ω1, n is a positive integer, x is the fundamental wave, y is the n-th harmonic of x, that is f1 and f2 are the frequencies of x and y respectively, T1 is the period of the fundamental wave; Let c(t) represent the definite integral of s(t) in the fundamental wave period [0, T1], and let c1(t) and c2(t) represent the frequency term and the difference frequency term after the integration of s(t), i.e.

[0207] That is,

[0208] Integral characteristic of the product of two cosine functions (1): when n ≠ 1, ω2 ≠ ω1, at this time:

[0209] Similarly, c2(t) = 0, and it is independent of the values of θ1 and θ2

[0210] Integral characteristic of the product of two cosine functions (2): when n = 1, ω2 = ω1, at this time: c1(t) = 0, c2(t) ≠ 0,

[0211] In particular, if ω2 = ω1 and θ1 = θ2, at this time

[0212] ω2 = ω1 and let θ2 uniformly increase from θ1 to (2π + θ1), at this time the process experienced by c(t) is the autocorrelation of the whole period of the cosine function; The output of the autocorrelation of the whole period of the cosine function is always c1(t) = 0 in this process, so is a cosine curve with θ = (θ1-θ2) as a parameter, c2(t) = T1·cosθ experiences a complete cosine process of θ = [0, 2π]; It is worth noting that the complete cosine process of θ = [0, 2π] experienced by c2(t) is independent of the initial phase θ1, and this characteristic is an important characteristic of the ripple correlation transform.

[0213] Therefore, through the above derivation process, it can be known that after the product of two continuous functions is integrated in a certain time range, the correlation transform process is performed in the discrete time case.

[0214] ​From the integral characteristic (1) of the product of the two cosine functions, it is known that if an input signal sequence is a harmonic of a cosine signal, a local sequence is the cosine signal, and a length of the local signal corresponds to a number of sampling points of one period or integral multiple periods of the cosine signal, then an output of the correlation transform of the time domain waveform is always zero, which is irrelevant to a starting phase of the cosine signal and a starting phase of the harmonic of the cosine signal.

[0215] From the integral characteristic (2) of the product of the two cosine functions, it is known that if an input signal sequence is a cosine signal, a local sequence is also the cosine signal, and starting phases of the two sequences are the same, and a length of the local signal corresponds to a number of sampling points of one period of the cosine signal, then an output sequence of the correlation transform of the time domain waveform is a complete cosine waveform of θ∈[0, 2π], which is irrelevant to a starting phase of the cosine signal.

[0216] Optionally, in the local sequence selection process of the processing sequence, a length L of the local sequence can not be an integral multiple of an initial period, then the correlation transform has a segmental additivity, it is assumed that a sampling rate of an analog converter of the motor is S sampling points per second, then L can be decomposed, L=M+m, wherein M is an integral multiple of S, and m is a remainder of L divided by S, then the correlation transform formula can be adjusted as follows:

[0217] It should be noted that a harmonic characteristic of the motor ripple is different from a ripple generated by a nonlinearity of a semiconductor device, mainly because of the following factors: an ideal contact between a commutator segment and a carbon brush, uneven wear of the segment and the filler between the segments, a radial high-low fluctuation caused by the uneven wear, and a carbon brush radial jumping caused by a deformation of a segment edge, a non-uniform contact caused by the wear and tear of the carbon brush and the segment, a contact gap caused by carbon powder and metal particles between the contact surfaces of the carbon brush and the segment, poor concentricity of an armature or bearing eccentricity, and electric sparks between the carbon brush and the segment. These defects will cause a micro-jump or insufficient pressure of a part of the contact surfaces between the carbon brush and the segment when the motor rotates, and reflect on the ripple waveform as distortion / defects / M waves of various waveforms. The distortion and harmonic components of the ripples generated by the segments are different, the ripple characteristics of different motor individuals are different, and the ripple characteristics change with the motor current (load) and the rotation speed. Therefore, the initial phases between the harmonics of the ripples and the initial phases between the harmonics and the fundamental wave have no dependent relationship.

[0218] As known from the above description, A k and B j are sequences of the fundamental wave or the harmonic, if the frequencies of the two sequences are different, at this time,

[0219] Therefore, only when the length of the local sequence is longer (usually greater than 4 ripple periods at the lowest speed of the motor), the correlation energy in each integral period cancels out, and the non-integral period correlation energy less than 1 period is averaged; the characteristics that the energy at the upper peak point position of the fundamental wave and each harmonic after the autocorrelation transformation is in phase and superimposed still hold; in general, the upper peak of the correlation-transformed sequence still has a high signal-to-noise ratio, and the ripple period can still be correctly estimated.

[0220] It should be noted that, as shown in FIGS. 3 and 5, the input actual ripple sequence is of poor quality, the depth of the M wave is more than 50%, the waveform quantization step is obvious due to the limitation of the ADC resolution, the upper / lower double peaks of the waveform are unstable, and the DC component of the waveform fluctuates; but the transformed sequence after the correlation transformation is very stable and reliable in terms of waveform and period, especially the upper peak waveform and the peak-to-peak interval are very stable, so the ripple period based on the correlation transformation can be very stable and reliable.

[0221] It should be noted that the specific implementation of the detection of the upper peak position of the correlation-transformed sequence can be any implementable manner, such as a peak detection algorithm, a wavelet transformation, a Hilbert transformation, an adaptive threshold method, or a detection model based on a machine learning model. The present embodiment will not be described in detail.

[0222] For example, FIG. 6 is a schematic diagram of the transformed sequence of the initial section of the actual motor ripple and the upper peak point position. As shown in FIG. 6, the upper peak point position of the sequence is obtained by detecting the upper peak position of the correlation-transformed sequence in FIG. 6.

[0223] Step c: updating the initial single-period sampling point number to obtain a new initial single-period sampling point number.

[0224] In this step, after obtaining the N period division points in the correlation-transformed sequence, the initial single-period sampling point number is updated to obtain a new initial single-period sampling point number, so that subsequent processing can be performed according to the new initial single-period sampling point number, because the periods of the motor ripple sampling sequences are different.

[0225] Specifically, the sampling point number of the Nth ripple period in the correlation-transformed sequence obtained by the last processing is determined as the new initial single-period sampling point number.

[0226] For example, if the sampling point position of the Nth ripple period in the correlation-transformed sequence obtained by the last processing is 5, the new initial single-period sampling point number in the next processing is determined as 5.

[0227] Step d: According to the new initial single-cycle sampling point number, read M-cycle sequence data in the motor ripple sampling sequence from the first starting point as a new processing sequence, and repeat steps b to d in time sequence until the motor ripple sampling sequence is completed, and the N-cycle division points in the corresponding correlation transform sequence of each processing sequence are obtained.

[0228] In this step, after completing the ripple cycle division processing of the processing sequence in the previous step, in order to complete the cycle division of the motor ripple sampling sequence, according to the new initial single-cycle sampling point number in the previous step, read M-cycle sequence data in the motor ripple sampling sequence from the first starting point as a new processing sequence, and repeat the specific operations of the previous steps b to d, and further obtain the N-cycle division points in the corresponding correlation transform sequence of the new processing sequence, until the motor ripple sampling sequence is completed, and the N-cycle division points in the corresponding correlation transform sequence of each processing sequence are obtained. The first starting point of each processing is determined based on the end point of the last ripple cycle data of the processing sequence of the previous processing.

[0229] Specifically, in the previous step, it is known that M-cycle sequence data is read in the motor ripple sampling sequence in each processing, M=N+L+R, where R is a preset integer, which is to ensure that the correlation transform data in this processing is sufficient, so only N-cycle division points are determined in the processing sequence. The sequence data of almost (L+R) cycles in the processing sequence is not divided into cycles, so in the subsequent processing, the almost (L+R) data read more is returned to the unprocessed motor ripple sampling sequence, and the subsequent processing is continued. As can be seen, the new starting point of reading M-cycle sequence data in the next processing is the next point of the sequence with N-cycle division points. Let Ntotal be the total sampling points of the sequence with N-cycle division points, and the new starting point is Ntotal+1.

[0230] It should be noted that because the ripple cycle is variable, the value of Ntotal after each processing is variable.

[0231] Step e: Cycle division of the motor ripple sampling sequence through all cycle division points.

[0232] In this step, after completing the processing of the entire motor ripple sampling sequence, a plurality of N-cycle division points in the correlation transform sequence are obtained. As known from the previous step, the cycle of the correlation transform sequence is the same as that of the processing sequence, so the motor ripple sampling sequence is cycle-divided through all cycle division points, thereby realizing the cycle estimation of the motor ripple sampling sequence.

[0233] Optionally, after the motor ripple sampling sequence is period-divided by all the period division points, a period division point sequence can be obtained. Then, the accurate counting of the motor ripple sampling sequence ripple can be realized according to the obtained period division point sequence.

[0234] In a possible implementation manner, after the target motor ripple sequence is obtained, the number of ripple periods of the motor ripple sequence to be processed can also be obtained according to the target motor ripple sequence.

[0235] After the target motor ripple sequence of the motor ripple sequence to be processed is obtained, the number of ripples of the motor ripple sequence to be processed can also be obtained by counting the ripples according to the motor ripple sequence to be processed for which the period estimation is completed.

[0236] Optionally, after the number of ripples of the motor ripple sampling sequence is obtained, the position of the vehicle window glass can be accurately determined according to the number of ripples, so as to ensure the normal operation of the vehicle window anti-pinch function, avoid misjudgment, and improve the user experience.

[0237] For example, FIG. 7 is a schematic diagram of period division of an actual motor ripple, as shown in FIG. 7, the processing sequence is period-divided according to the period division points of the relevant transform sequence, so as to obtain a period division point sequence.

[0238] It should be noted that, for convenience of viewing, FIG. 7 is only a schematic diagram of period division of the starting section of the actual motor ripple, and is not a schematic diagram of period division of the entire actual motor ripple.

[0239] The motor ripple processing method provided in this embodiment reads, from the starting point of the motor ripple sampling sequence obtained in advance, sequence data of M periods as a processing sequence according to the initial single-period sampling point number obtained in advance, and performs relevant transform calculation on the processing sequence to obtain a relevant transform sequence corresponding to the processing sequence. Then, peak position detection is performed on the relevant transform sequence to obtain N period division points in the relevant transform sequence. Then, the initial single-period sampling point number is updated to obtain a new initial single-period sampling point number. According to the new initial single-period sampling point number, sequence data of M periods in the motor ripple sampling sequence is read from the first starting point as a new processing sequence in time sequence. The foregoing operation is repeated until the motor ripple sampling sequence is processed to obtain N period division points in the relevant transform sequence corresponding to each processing sequence. The motor ripple sampling sequence is period-divided by all the period division points. Through the foregoing method, the accurate estimation of the motor ripple period is realized, and the normal operation of the vehicle anti-pinch function is ensured, thereby improving the user experience.

[0240] FIG. 8 is a flowchart of a second embodiment of the motor ripple processing method according to the present application. As shown in FIG. 8, the method further comprises the following steps based on the above embodiment:

[0241] S801: Starting from the starting point of the motor ripple sampling sequence, read M cycles of sequence data as an initial processing sequence according to the single-cycle sampling point prediction value obtained in advance.

[0242] S802: Starting from the starting point of the initial processing sequence, read L cycles of sequence data as an initial local sequence according to the single-cycle sampling point prediction value.

[0243] S803: Perform correlation transformation calculation on the initial processing sequence and the initial local sequence according to the correlation transformation formula to obtain an initial correlation transformation sequence.

[0244] S804: Detect the peak position of the initial correlation transformation sequence to obtain N cycle division points in the initial correlation transformation sequence.

[0245] In order to obtain an accurate initial single-cycle sampling point, the initial single-cycle sampling point can be calculated according to the single-cycle sampling point prediction value obtained by querying the motor parameters.

[0246] Specifically, for the calculation of the initial single-cycle sampling point, the single-cycle sampling point prediction value is used as a parameter basis. Starting from the starting point of the motor ripple sampling sequence, read M cycles of sequence data as an initial processing sequence, and starting from the starting point of the initial processing sequence, read L cycles of sequence data as an initial local sequence. Then, perform correlation transformation calculation on the initial processing sequence to obtain an initial correlation transformation sequence, and obtain N cycle division points in the initial correlation transformation sequence.

[0247] The specific implementation process is the same as that of steps a to c in the foregoing embodiment, and will not be repeated here.

[0248] S805: Average the N cycle sampling points of the initial correlation transformation sequence to obtain the initial single-cycle sampling point.

[0249] After obtaining the N cycle division points in the initial correlation transformation sequence, average the N cycle sampling points of the initial correlation transformation sequence to determine the average sampling point of each cycle in the initial correlation transformation sequence as the initial single-cycle sampling point, thereby improving the accuracy.

[0250] For example, FIG. 9 is an example diagram of an initial single-cycle sampling point number calculation process. In combination with FIG. 8 and FIG. 9, the ripple sampling sequence in FIG. 9 is the aforementioned motor ripple sampling sequence, and the starting point of the sequence is P. The single-cycle sampling point number estimate K, i.e., the single-cycle sampling point number prediction value, is obtained according to motor current, rotation direction, voltage, and environmental temperature. The value is used as a parameter basis to read MxK sampling points starting from the point P of the ripple sampling sequence as an initial processing sequence. In the initial processing sequence, LxK sampling points starting from the point P are read as an initial local sequence. Then, the initial correlation transform sequence is obtained by performing correlation transform calculation and peak detection on the initial processing sequence. The initial single-cycle sampling point number is obtained by averaging the sampling point numbers of N cycles in the initial correlation transform sequence.

[0251] The motor ripple processing method provided in this embodiment reads L-cycle sequence data starting from the starting point of the processing sequence as an initial local sequence according to the single-cycle sampling point number prediction value obtained in advance. The initial correlation transform sequence is obtained by performing correlation transform calculation on the processing sequence and the initial local sequence according to a correlation transform formula. The N-cycle division points in the initial correlation transform sequence are obtained by performing peak position detection on the initial correlation transform sequence. The initial single-cycle sampling point number is obtained by averaging the sampling point numbers of N cycles in the initial correlation transform sequence. The initial single-cycle sampling point number is calculated by the above method, thereby ensuring the accuracy of subsequent cycle estimation of the motor ripple sampling sequence.

[0252] FIG. 10 is a flowchart of an embodiment three of the motor ripple processing method provided in this application. As shown in FIG. 10, on the basis of the above embodiments, the method further includes:

[0253] S1001: Obtain motor parameters.

[0254] S1002: Obtain a single-cycle sampling point number prediction value by table lookup according to the motor parameters.

[0255] In order to accurately estimate the cycle of the motor ripple sampling sequence, the initial single-cycle sampling point number is determined before the initial processing of the motor ripple sampling sequence, thereby ensuring the accuracy of the correlation transform. In order to obtain an accurate initial single-cycle sampling point number, the performance of the motor is determined.

[0256] Specifically, the motor parameters are obtained, wherein the motor parameters include motor current, motor rotation direction, environmental temperature, motor voltage, and environmental temperature. The corresponding single-cycle sampling point number prediction value is obtained in the pre-calibrated mapping table according to the obtained motor parameters, and the initial single-cycle sampling point number is calculated according to the single-cycle sampling point number prediction value.

[0257] It should be noted that the motor performance is different, the change rate of the ripple period is different, therefore, the mapping table can be calibrated according to the obtained parameters of different motor performances, and then the single-period sampling point prediction value can be obtained by table lookup according to the motor parameters during work.

[0258] The motor ripple processing method provided in the embodiment obtains motor parameters, and obtains a single-period sampling point prediction value by table lookup according to the motor parameter information, so that the single-period sampling point prediction value is obtained by the method, and the calculation of the initial single-period sampling point is realized.

[0259] FIG. 11 is a flowchart of the motor ripple processing method provided in the embodiment of the application, as shown in FIG. 11, on the basis of the above-mentioned various embodiments, the method further comprises:

[0260] S1101: Real-time sampling of motor current signals.

[0261] S1102: DC removal and PWM filtering preprocessing of the motor current signals to obtain motor ripple sampling sequences.

[0262] In this step, the glass movement of the power window is driven by the rotational force generated by the input current of the window motor, and the window motor generates a ripple during the working process, so that the specific position of the window glass can be determined by analyzing the ripple. Then the motor ripple sampling sequence is obtained by sampling the motor current signal.

[0263] It should be noted that the motor is started slowly and is unstable at the beginning, and in order to accurately estimate the ripple period, the ripple sequence generated by the stable working of the motor is sampled as the initial motor ripple sampling sequence.

[0264] Specifically, the preprocessing 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 DC removal operation is to eliminate the DC component and retain the AC component. The 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 is not limited in detail.

[0265] 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.

[0266] The motor ripple processing method provided in the embodiment samples motor current signals in real time, and performs DC removal and PWM filtering preprocessing on the motor current signals to obtain a motor ripple sampling sequence. Through the method, a motor ripple sampling sequence with high accuracy and good stability is obtained, thereby improving data security for subsequent period estimation.

[0267] FIG. 12 is a flowchart of a specific example of the motor ripple processing method provided in the embodiment. As shown in FIG. 12, the method includes the following steps.

[0268] S1201: According to the initial single-period sampling point number K', (M×K') sampling points are read from the starting point P of the ripple sampling sequence as a processing sequence, and (L×K') sampling points are read from the starting point of the processing sequence as a local sequence.

[0269] S1202: The processing sequence and the local sequence are subjected to correlation transformation and peak detection to obtain N period division points.

[0270] The implementation manners of steps S1201 and S1202 are the same as those of steps a to c in the foregoing embodiment, and will not be described herein.

[0271] S1203: The initial single-period sampling point number K' is updated by the Nth period sampling point number to obtain a new initial single-period sampling point number K'.

[0272] The specific implementation manner of this step is the same as that of step d in the foregoing embodiment, and will not be described herein.

[0273] S1204: The starting point P is updated according to the sum of the N divided ripple period sampling point numbers to obtain a first starting point P.

[0274] After one processing is completed, a new processing sequence is read in the ripple sampling sequence that has not been subjected to period division, and the reading is performed from a new starting point. Since the processing sequence read in the last processing includes (R×K') sampling points, the correlation transformation data is sufficient, but the period of this part of data is not determined. The sampling point number of the N periods is set as Ntotal, the starting point P of the ripple sampling sequence is set as P, and P=1, and the new starting point is P+Ntotal.

[0275] S1205: According to the new initial single-period sampling point number K', (M×K') sampling points are read from the first starting point P in the ripple sampling sequence as a new processing sequence, and (L×K') sampling points are read from the starting point of the new processing sequence as a new local sequence. Steps S1202 to S1204 are repeated until the period division of the ripple sampling sequence is completed to obtain a period division point sequence.

[0276] This step is the same as the implementation of step e in the foregoing embodiments, and thus is not described again.

[0277] Optionally, for the period division processing of the tail sequence of the ripple sampling sequence, the method further comprises:

[0278] S1206: According to the new initial single-period sampling point number K', determine whether the sampling point number of the tail sequence is greater than ((P+N+L+R) x K') sampling points.

[0279] S1207: If it is determined that the sampling point number of the tail sequence is greater than ((P+N+L+R) x K') sampling points, perform period division processing on the tail sequence according to the foregoing steps to obtain N period division points.

[0280] S1208: If it is determined that the sampling point number of the tail sequence is less than ((P+N+L+R) x K') sampling points, set N to N / 2, and then determine whether the sampling point number of the tail sequence is greater than ((P+N / 2+L+R) x K') sampling points.

[0281] S1209: If it is determined that the sampling point number of the tail sequence is greater than ((P+N / 2+L+R) x K') sampling points, perform period division processing on the tail sequence according to the foregoing steps to obtain N / 2 period division points.

[0282] S1210: If it is determined that the sampling point number of the tail sequence is less than ((P+N / 2+L+R) x K') sampling points, perform period division on the tail sequence using the Nth period sampling point number processed last time.

[0283] For the tail sequence of the ripple sampling sequence, i.e. the processing sequence of the last time, in the processing of the tail sequence, the number of sampling points of the tail sequence cannot be guaranteed to satisfy (MxK') sampling points, where M=P+N+L+R, P is the starting point of the tail sequence, and K' is the number of sampling points of the Nth period of the last time. If the number of sampling points of the tail sequence is greater than ((P+N+L+R) x K') sampling points, the processing is performed according to the processing mode of the foregoing steps, so as to obtain N period division points. If the number of sampling points of the tail sequence is less than ((P+N+L+R) x K') sampling points, the length of the tail sequence is not enough, N can be modified to N / 2, and similarly, it is first determined whether the number of sampling points of the tail sequence is greater than ((P+N / 2+L+R) x K') sampling points. If the number of sampling points of the tail sequence is greater than ((P+N / 2+L+R) x K') sampling points, the processing is performed according to the processing mode of the foregoing steps, so as to obtain N / 2 period division points. If the number of sampling points of the tail sequence is less than ((P+N / 2+L+R) x K') sampling points, the length of the tail sequence is not enough, in order to guarantee the efficiency of data processing, the number of sampling points of the Nth period of the last time is directly used for period division of the tail sequence.

[0284] The motor ripple processing method provided in the embodiment, by performing relevant transformation and peak detection processing on the ripple sampling sequence in a section-by-section manner, the period division point position is obtained. After the processing is completed, the ripple sampling sequence is divided in the later stage according to all the period division point positions. Through the above scheme, the distortion of the ripple sampling sequence and the influence of noise on the period are avoided, and the period of the ripple sampling sequence is more accurately determined.

[0285] Based on the two characteristics of the relevant transformation in the foregoing embodiment, the following is a simulation verification description of the two characteristics. In simulation, the sampling rate is 100 ksps, the fundamental signal frequency is 1 kHz, the initial phase of the sine is π / 4, the second harmonic is 2 kHz, and the initial phase of the sine is π / 6. The third harmonic is 3 kHz, and the initial phase of the sine is π / 3. The length of the generated fundamental signal is 5 periods. In simulation, the input signal sequence and the local sequence can be the fundamental signal / second harmonic / third harmonic / (fundamental signal+second harmonic+third harmonic). In order to facilitate display, the local sequence is offset by-3.0, and the relevant transformation output is offset by-6.0. The following observes the simulation results of the relevant transformation.

[0286] Fig. 13(a) is a correlation transform schematic diagram of the local sequence being fundamental, the input signal sequence being fundamental and second harmonic, Fig. 13(b) is a correlation transform schematic diagram of the local sequence being fundamental, the input signal sequence being fundamental and third harmonic, Fig. 13(c) is a correlation transform schematic diagram of the local sequence being fundamental, the input signal sequence being second harmonic and third harmonic, as shown in Fig. 13(a), Fig. 13(b) and Fig. 13(c), the correlation transform output of the local sequence and high-order harmonic is always zero and is irrelevant to the initial phase, and the correlation transform of the fundamental itself (same phase) is a cosine waveform with an initial phase of 0.

[0287] Fig. 14(a) is a correlation transform schematic diagram of the local sequence being second harmonic, the input signal sequence being fundamental and second harmonic, Fig. 14(b) is a correlation transform schematic diagram of the local sequence being second harmonic, the input signal sequence being fundamental and third harmonic, Fig. 14(c) is a correlation transform schematic diagram of the local sequence being second harmonic, the input signal sequence being second harmonic and third harmonic, as shown in Fig. 14(a), Fig. 14(b) and Fig. 14(c), the correlation transform output of the local sequence and the input signal sequence fundamental is always 0, the output of the second harmonic itself is a cosine sequence with an initial phase of 0, and the output of the third harmonic of the input signal sequence is also 0.

[0288] Fig. 15(a) is a correlation transform schematic diagram of the local sequence being third harmonic, the input signal sequence being fundamental and second harmonic, Fig. 15(b) is a correlation transform schematic diagram of the local sequence being third harmonic, the input signal sequence being fundamental and third harmonic, Fig. 15(c) is a correlation transform schematic diagram of the local sequence being third harmonic, the input signal sequence being second harmonic and third harmonic, as shown in Fig. 15(a), Fig. 15(b) and Fig. 15(c), the correlation transform output of the local sequence third harmonic and the input signal sequence fundamental is always 0, the correlation transform output of the local sequence third harmonic and the input signal sequence second harmonic is also always 0, and the output of the third harmonic itself is a cosine sequence with an initial phase of 0.

[0289] Figure 16 is a schematic diagram of the correlation transform of the local sequence being the sum of the fundamental wave, the second harmonic and the third harmonic. As shown in Figure 16, the local sequence of the correlation transform is the sum of the fundamental wave, the second harmonic and the third harmonic, and the input signal sequence is the fundamental wave, the second harmonic, the third harmonic and the sum of the fundamental wave, the second harmonic and the third harmonic. Since the local sequence includes the fundamental wave, the second harmonic and the third harmonic, the correlation transform of the fundamental wave in the local sequence and the input fundamental wave signal sequence produces the fundamental wave output, the correlation transform of the second harmonic in the local sequence and the input second harmonic signal produces the second harmonic output, and the correlation transform of the third harmonic in the local sequence and the input third harmonic signal produces the third harmonic output. The correlation transform of each harmonic in the local sequence (the sum of the fundamental wave, the second harmonic and the third harmonic) and the corresponding harmonic signal in the input signal sequence (the sum of the fundamental wave, the second harmonic and the third harmonic) produces the sum of the fundamental wave output, the second harmonic output and the third harmonic output. It should be noted that the sum of the fundamental wave output, the second harmonic output and the third harmonic output is different from the waveform of the input sum of the fundamental wave, the second harmonic and the third harmonic and the local sequence sum of the fundamental wave, the second harmonic and the third harmonic, because the fundamental wave output, the second harmonic output and the third harmonic output are zero-phase cosine sequences, and the peak value of the waveform after addition is completely in phase and superimposed.

[0290] Figure 17 is a schematic diagram of the mutual orthogonal characteristics of the correlation transform of the fundamental wave and each harmonic. As shown in Figure 17, the diagram includes the output sequence of the correlation transform of the fundamental wave, the second harmonic and the third harmonic, and the waveform of the sum of the three. The output sequence of the correlation transform of the local sequence sum of the fundamental wave, the second harmonic and the third harmonic in Figure 16 is compared, and the comparison result shows that the two are completely coincident, which is completely consistent with the theoretical analysis result of the two characteristics in the foregoing embodiment.

[0291] In a possible implementation manner, since the sequence of multiple cycle lengths is continuously connected by one cycle, the two correlation transform characteristics are true for the sequence of one fundamental wave cycle length and also true for the sequence of multiple cycle lengths.

[0292] Optionally, the specific implementation manner of each of the foregoing embodiments is described in detail for the case that the sampling rate of the ripple current is relatively high with respect to the ripple period (for example, the sampling rate is 100 ksps, and the maximum ripple frequency is 2 kHz), but the foregoing correlation transform method is also applicable to the case of low sampling rate, and in this case, the ripple period is no longer represented by an integer multiple of the sampling interval, but by a real number multiple with a decimal point.

[0293] Optionally, in order to solve the above problems, the application further provides a motor ripple processing method of a motor ripple counting method. 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 is a distorted waveform, for example, the motor ripple has a concave deformation in a part of the period, is close to splitting into two waveforms, or the waveform amplitude of a part of the ripple period is smaller than and deviates from the amplitude of the adjacent period, the zero-crossing / average line crossing detection algorithm may have a false action, causing the identified ripple period value to have a large jitter, thereby leading to inaccurate counting. In view of these problems, the inventors have studied whether the motor ripple can be sampled, and the measured point set obtained by sampling can be correlated and transformed to suppress the distortion and noise of the motor ripple, and then the upper peak position of the motor ripple is determined through the transformed measured point set, the period is determined according to the upper peak position, and the number of ripples is determined based on the determined period value. Thus, accurate ripple counting is achieved, the manufacturing cost is 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.

[0294] FIG. 18 is a flowchart of an embodiment of a motor ripple counting method provided by the application. As shown in FIG. 18, the execution subject of the method is a motor controller, and the method specifically includes the following steps.

[0295] 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 pre-acquired motor ripple sampling sequence as a processing sequence.

[0296] In this step, in order to accurately count the ripples of the motor ripple sampling sequence, the ripple period is accurately determined. According to 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 from the starting point of the motor ripple sampling sequence in time sequence as a processing sequence for processing, where M is the sum of N, L and R, N is the number of ripple periods determined in this ripple period, L is the number of ripple periods of the local sequence, and R is a preset integer for ensuring sufficient correlation transformation data. The local sequence is a sequence obtained from the processing sequence for correlation transformation.

[0297] Specifically, since the sampling rate is low in the processing of the ripple count, the single period cannot be measured by the number of sampling points, and the initial single period value is estimated and predicted in advance, wherein the initial single period value is time, and the specific value of a single period, and 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 in the reading process, the actual reading is still the reading of the number of sampling points, and the reading can be performed according to the sampling period value of the ripple analog-to-digital converter, wherein 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 is performing analog-to-digital conversion.

[0298] Step 2: According to the local sequence corresponding to the processing sequence obtained in advance, the processing sequence is calculated by correlation transformation to obtain a correlation transformation sequence corresponding to the processing sequence.

[0299] In this step, the ripple waveform of the vehicle window motor will be severely distorted, and the noise will also increase after long-term use of the vehicle and under harsh working conditions (such as low temperature, low voltage and heavy load). However, in order to accurately estimate the motor ripple period and accurately count the number of ripples even 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 that suppresses distortion and noise.

[0300] 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, and the processing sequence and the local sequence are calculated by correlation transformation formula to obtain a correlation transformation sequence corresponding to the processing sequence.

[0301] Step 3: Determine the target algorithm according to the predicted period of the processing sequence.

[0302] In this step, in order to accurately determine the position of the upper peak of the correlation transformation, the period of the processing sequence can be predicted in advance, so that the target algorithm is selected according to the period, wherein the target algorithm includes a double-sided straight line intersection method or a parabolic fitting method for calculating the position of the upper peak of the correlation transformation sequence.

[0303] Specifically, a period threshold is preset, and if the predicted period of the processing sequence is less than the period threshold, the parabolic fitting method is determined as the target algorithm; if the predicted period of the processing sequence is greater than the period threshold, the double-sided straight line intersection method is determined as the target algorithm.

[0304] Optionally, two ripple period ranges, for example, period range D and period range E, can also be preset, and the processing sequence is predicted in period, if the predicted period is in period range D, the parabolic fitting method is determined as the target algorithm, and if the predicted period is in period range E, the parabolic fitting method is determined as the target algorithm.

[0305] For example, the motor speed range varies greatly, approximately 300Hz-1700Hz, and especially under low temperature, low pressure and heavy load, the motor speed is low (at this time the ripple waveform is severely distorted), and a key performance indicator of the controller of the vehicle window is the accuracy of the ripple count. There are more than a thousand ripples (assuming about 1200) in an entire vehicle window glass rise or fall stroke of about 400mm, so the glass displacement corresponding to one ripple is about 0.33mm. The anti-pinch glass distance of the vehicle window is in the range of 4mm-200mm from the top of the vehicle window slot, and if the error of the control anti-pinch range is within 10% (4mm*10% = 0.4mm), that is, the error of the entire stroke of more than a thousand ripple counts is required to be about one ripple.

[0306] The sampling rate of the vehicle window simulation controller is 10ksps, and the limit range of the ripple frequency is (200Hz-2000Hz), and the number of sampling points per ripple period ranges from 10000 / 2000 to 10000 / 250 = 5-40. Fig. 19 is a graph of the relationship between the ripple frequency and the number of sampling points per period, as shown in Fig. 20, it can be seen from the graph that as the ripple frequency increases, the number of sampling points per period gradually decreases (from 50 to 5 in the graph). Fig. 20 is a graph of the number of sampling points per period when the ripple frequency is 200Hz, Fig. 21 is a graph of the number of sampling points per period when the ripple frequency is 400Hz, Fig. 22 is a graph of the number of sampling points per period when the ripple frequency is 1000Hz, and Fig. 23 is a graph of the number of sampling points per period when the ripple frequency is 2000Hz. As shown in Figs. 20-23, the ripple count algorithm should be able to work normally when the ripple frequency varies within a frequency range of about an octave (200Hz-2000Hz).

[0307] 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 the operation amount can be reduced by downsampling when performing correlation transformation, without affecting the result of correlation transformation; as shown in the waveform of the 200 Hz ripple frequency in FIG. 20, since the frequency before and after the ripple correlation transformation is the same, the waveform shown is the correlation waveform after correlation transformation, but also reflects that the sampling points of the motor ripple in a period are too dense when performing correlation transformation. At this time, the ripple data can be extracted at equal intervals before performing correlation transformation, and a period threshold or period range can be preset. When the processing sequence period is lower than the period threshold or is in the period range, the sampling rate of the original data input for correlation transformation calculation is reduced to half.

[0308] Step 4: According to the predicted period of the processing sequence, a set of measurement points of the processing sequence is determined, and based on the set of measurement points and the target algorithm, the upper peak position corresponding to the correlation transformation sequence is calculated.

[0309] In this step, after the target algorithm is determined through the above steps, the upper peak position of the correlation transformation sequence can be calculated according to the target algorithm.

[0310] Specifically, first, according to the predicted period of the processing sequence, the sampling point position with the smallest time interval from the pre-acquired upper 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, and the four determined points are taken as the set of measurement points. Then, based on the local sequence, correlation transformation is performed on the set of measurement points to obtain the correlation transformation value of each point. According to the pre-set 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.

[0311] 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, and the two determined points and the center point position are taken as the set of measurement points. Then, based on the local sequence, correlation transformation is performed on the set of measurement points to obtain the correlation transformation value of each point. According to the pre-set parabolic fitting formula and the correlation transformation value of each point, the upper peak position of the correlation transformation sequence is calculated.

[0312] Step 5: According to the upper peak position, the number of ripples of the processing sequence is determined for cumulative counting. Specifically, according to the upper peak position, the ripple period value of the processing sequence is determined, and based on the ripple period value of the processing sequence, the motor ripple sampling sequence is divided into ripple periods by all period division points to determine a sequence of period division points, and the number of ripples is counted cumulatively based on the sequence of period division points.

[0313] 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.

[0314] Step 6: In time sequence, starting from the second 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.

[0315] 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, the aforementioned steps are continued to be repeated in time sequence, and 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 the occurrence of a locked rotor of the vehicle window glass lifting-in-slot motor, and the ripple counting is ended.

[0316] 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 second starting point of the next new processing sequence.

[0317] 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 second starting point in time sequence, and 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.

[0318] FIG. 24 is a flow diagram of an embodiment two of the motor ripple counting method provided by the present application. As shown in FIG. 24, on the basis of the above embodiment, step 5 specifically comprises:

[0319] S2401: determining the ripple period value of the processing sequence according to the upper peak position.

[0320] S2402: performing ripple period segmentation on the processing sequence based on the ripple period value of the processing sequence, and accumulating and counting the ripple number of the processing sequence based on the segmentation result.

[0321] 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. The segmentation result is a period segmentation point sequence. In other words, it can be understood that the processing sequence is segmented based on the ripple period value of the processing sequence to determine the period segmentation point sequence, and the ripple number of the processing sequence is accumulated and counted according to the period segmentation point sequence.

[0322] Specifically, after the upper peak position is determined, the time interval between adjacent peaks can be calculated to determine the period value.

[0323] The motor ripple counting method provided by the present embodiment determines the ripple period value of the processing sequence according to the upper peak position, segments the processing sequence based on the ripple period value of the processing sequence, and accumulates and counts the ripple number of the processing sequence based on the segmentation result. The period value of the processing sequence is determined and counted 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 the ripple counting.

[0324] FIG. 25 is a flow diagram of an embodiment three of the motor ripple counting method provided by the present application. As shown in FIG. 25, on the basis of the above embodiment, step 4 specifically comprises:

[0325] S2501: taking 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 according to the predicted period of the processing sequence.

[0326] In this step, the upper peak position of the processing sequence is predicted based on the predicted period of the processing sequence, to obtain an upper peak predicted position. In the processing sequence, the upper peak predicted position is not necessarily a sampling point in the sequence. Therefore, in order to determine the true upper peak position of the sequence, a sampling point with the smallest time interval from the upper peak predicted position can be selected as a center point in the processing sequence, which is used for selecting a set of measurement points.

[0327] S2502: If the target algorithm is the bilateral straight line intersection method, based on the processing sequence and the predicted period of the processing sequence, two points are determined on the left and right sides of the center point, and the four determined points are used as a set of measurement points.

[0328] S2503: Based on the local sequence, the set of measurement points is subjected to correlation transformation to obtain a correlation transformation value of each point.

[0329] In this step, the number and position of the sampling points in the set of measurement points are different due to the difference in the target algorithm. 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 position table according to the range of the predicted period value. Two points are determined on the left and right sides of the center point, and a total of four points are used as a set of measurement points. Further, the correlation transformation value of each point in the set of measurement points is calculated based on the local sequence and the correlation transformation calculation formula.

[0330] S2504: According to the pre-set bilateral straight line intersection formula and the correlation transformation value of each point, the upper peak position of the correlation transformation sequence is calculated.

[0331] In this step, after the correlation transformation of the set of measurement points is completed, the upper peak position of the correlation transformation sequence is calculated through the bilateral straight line intersection formula based on the correlation transformation value of each point.

[0332] Specifically, two points on the left and right sides of the center point are determined to be a left slope line and a right slope line, respectively. 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.

[0333] 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:

[0334] The above expression is transformed into the following expression:

[0335] Let the slope be Then:

[0336] Further calculation of the upper peak position coordinates is expressed as:

[0337] FIG. 26 is a schematic diagram of a double-side straight line intersection method for calculating the upper peak position. As shown in FIG. 26, the double-side straight line intersection method is used to calculate the upper peak position of an exemplary processing sequence. The upper peak predicted position is predicted according to the predicted period. The center point and the set of measuring points are determined based on the upper peak predicted position. The correlation transformation values of each point in the set of measuring points are calculated. The double-side straight line intersection method is used to calculate the upper peak position.

[0338] It should be noted that the two left and right points collected above can be continuous sampling points or equally spaced sampling points. The specific sampling points can be pre-set in the double-side straight line intersection method sampling point selection table.

[0339] S2505: If the target algorithm is the parabolic fitting method, one point is determined on the left and right sides of the center point based on the processing sequence and the predicted period of the processing sequence. The two determined points and the center point are used as the set of measuring points.

[0340] S2506: The correlation transformation of the set of measuring points is performed based on the local sequence to obtain the correlation transformation value of each point.

[0341] 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 transformation of each point is performed.

[0342] Specifically, from the pre-set parabolic fitting method sampling point selection table, the candidate point position index relative to the center point is obtained according to the range of the predicted period. One point is determined on the left and right sides of the center point. Together with the center point, the three points form the set of measuring points. The correlation transformation value of each point in the set of measuring points is calculated based on the local sequence and the correlation transformation calculation formula.

[0343] S2507: The upper peak position of the correlation transformation sequence is calculated according to the pre-set parabolic fitting formula and the correlation transformation value of each point.

[0344] In this step, after the correlation transformation of the set of measuring points is completed, the upper peak position of the correlation transformation sequence is calculated based on the correlation transformation value of each point by the parabolic fitting formula.

[0345] For example, the correlation transformation value is calculated based on the center point and one point on the left / right side of the center point. The coordinates of the three points are used to determine a parabola opening downward. The vertex of the parabola is used as the upper peak position of the correlation transformation sequence.

[0346] Let a vertex coordinate be (c, b), the parabola equation is: (y-b) = a(x-c) 2

[0347] The three sampling points in the measuring point set and are (x1, y1), (x2, y2), (x3, y3), then the process of deriving the coefficients a, b, c is as follows:

[0348] Let Then:

[0349] Then:

[0350] Based on the above formula, the coordinates of the upper peak position can be obtained.

[0351] Figure 27 is a schematic diagram of the parabola fitting method for calculating the upper peak position. As shown in Figure 27, when the frequency of the processing sequence is high, the number of sampling points in a ripple period is small, and the parabola fitting method is selected as the target algorithm for calculating the upper peak position. In Figure 27, a cosine wave is used for simulation to observe the error of this method. It can be seen that the upper peak position calculated by the three-point parabola fitting method is very close to the true ripple period division line.

[0352] Optionally, in each process of calculating the upper peak position of the processing sequence, the period and the upper peak position of the current processing sequence are predicted. For the predicted period of the current processing sequence, the ripple period value of the last processing sequence and the ripple period change 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 last processing sequence period division position and the sampling point position of the ripple analog-to-digital converter to make the prediction.

[0353] The motor ripple counting method provided in 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 two point positions are determined on the left and right sides of the center point position based on the processing sequence and the prediction period of the processing sequence, four point positions determined are taken as a measurement point set, the measurement point set is subjected to correlation transformation based on the local sequence, a correlation transformation value of each point position is obtained, and a peak position of the correlation transformation sequence is calculated 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 one point position is determined on the left and right sides of the center point position based on the processing sequence and the prediction period of the processing sequence, two point positions determined and the center point position are taken as the measurement point set, the measurement point set is subjected to correlation transformation based on the local sequence, a correlation transformation value of each point position is obtained, and a peak position of the correlation transformation sequence is calculated 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, the measurement point set is selected for correlation transformation and the peak position is determined based on different target algorithms, 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.

[0354] Fig. 28 is a flowchart of the motor ripple counting method provided in the fourth embodiment of the application. As shown in Fig. 28, on the basis of the above-mentioned embodiments, the method further comprises the following steps:

[0355] S2801: determining the running speed of the window glass according to the ripple period value of the processing sequence.

[0356] S2802: 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.

[0357] 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 position of the window glass is determined 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.

[0358] Optionally, the position and speed information of the window glass is basic information for realizing the soft start, soft stop, constant speed lifting window and anti-pinch function algorithms of the window.

[0359] 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.

[0360] FIG. 29 is a flowchart of an embodiment of the motor ripple counting method provided in the application. As shown in FIG. 29, on the basis of the above-mentioned embodiment, the method further comprises:

[0361] S2901: Real-time sampling of the motor current signal.

[0362] S2902: DC removal, low-pass filtering and PWM preprocessing of the motor current signal to obtain a motor ripple sampling sequence.

[0363] 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 through analysis of the ripples. Then the motor ripple sampling sequence is obtained by sampling the motor current signal.

[0364] 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 is sampled as the motor ripple sampling sequence.

[0365] 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 higher harmonics. The specific implementation can be selected according to the performance of the actual motor, and the present embodiment does not make specific limitations.

[0366] Optionally, the motor current signal can also be subjected to low-pass filtering processing to filter out noise greater than the highest ripple frequency.

[0367] 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.

[0368] The motor ripple counting method provided in the embodiment, real-time sampling of the motor current signal, and DC removal and PWM filtering preprocessing of the motor current signal are performed 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.

[0369] FIG. 30 is a flowchart of a specific implementation of the motor ripple counting method provided in the embodiment of the application, as shown in FIG. 30,

[0370] S3001: voltage, current, rotation, ambient temperature.

[0371] S3002: single period estimation of ripple.

[0372] In order to be able to determine the real-time period of the motor ripple sampling sequence and accurately count the ripple, thereby accurately determining the position of the window glass, the motor ripple sampling sequence is read and processed in real time, so the single period of the subsequent read sequence data is estimated in advance, the voltage, current, rotation, and ambient temperature of the motor are collected, and then the single period of the ripple, i.e., the initial single period value, is determined.

[0373] S3003: reading M period sequence data from P point.

[0374] This step is the same as the implementation method of step 1 in the foregoing embodiments, and will not be described here again.

[0375] S3004: selecting a related transformation measurement point set.

[0376] This step is the same as the implementation method of the measurement point set selection and determination in the foregoing embodiments, and will not be described here again.

[0377] S3005: reading L period sequence data from P point as a local sequence.

[0378] In this step, the selection of the local sequence is the same as the selection method of the local sequence in the foregoing embodiments, and will not be described here again.

[0379] S3006: correlation transformation.

[0380] In this step, the correlation transformation is performed on each point in the measurement point set.

[0381] S3007: selection by side line intersection method or parabolic method.

[0382] In this step, the side line intersection method is the double side line intersection method in the foregoing embodiments, and the parabolic method is the parabolic fitting method. The selection of the two methods can be determined according to the predicted period of the processing sequence currently processed, and the specific implementation is described in detail in the foregoing embodiments, which will not be described here again.

[0383] S3008: Calculate the upper peak position, update P.

[0384] S3009: Save the period division point position time value.

[0385] S3010: Ripple count.

[0386] S3011: Motor speed estimation.

[0387] S3012: Positioning / speed regulation and anti-pinch.

[0388] The implementation of steps S3008 to S3012 is the same as that in the foregoing embodiments, and will not be described here again.

[0389] The motor ripple counting method provided in this embodiment selects a set of measurement points 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 divided into periods. Based on the division result, the ripple count is performed. Through the above method, not only the ripple period determination and ripple count of the motor ripple sampling sequence are accurately realized, but also the calculation amount is reduced, the hardware resources are saved, and the accurate operation of the window anti-pinch function is guaranteed.

[0390] FIG. 31 is a structural schematic diagram of an embodiment of a motor ripple processing device provided in the application. As shown in FIG. 31, the motor ripple processing device 3100 specifically comprises:

[0391] The first reading module 3101 is configured to read M-period sequence data from the starting point of the pre-acquired motor ripple sampling sequence as a processing sequence according to a pre-acquired initial single-period sampling point number, where M is a preset integer.

[0392] The transformation detection module 3102 is configured to perform transformation detection processing on the processing sequence to obtain N period division points in the correlation transformation sequence.

[0393] The update module 3103 is configured to update the initial single-period sampling point number to obtain a new initial single-period sampling point number.

[0394] The cycle module 3104 is configured to read M-period sequence data from the first starting point in the motor ripple sampling sequence as a new processing sequence according to the new initial single-period sampling point number in time sequence, repeat the above operation until the motor ripple sampling sequence is processed to obtain N period division points in the correlation transformation sequence corresponding to each processing sequence, and the first starting point is determined based on the end point of the last ripple period data of the processing sequence.

[0395] The segmentation module 3105 is used to perform periodic segmentation on the motor ripple sampling sequence through all periodic segmentation points.

[0396] In one possible implementation, the transformation detection module 3102 includes:

[0397] The correlation transformation unit allows the user to perform correlation transformation calculations on the processed sequence to obtain the correlation transformation sequence.

[0398] The detection unit is used to detect the upper peak position of the relevant transformation sequence and obtain N period segmentation points in the relevant transformation sequence.

[0399] Optionally, the motor ripple processing device 3100 also includes:

[0400] The second reading module 3106 is used to read L cycles of sequence data from the starting point of the processed sequence based on the initial single-cycle sampling point number, and use it as a local sequence.

[0401] Correspondingly, the relevant transformation unit is specifically used for:

[0402] Based on the processed sequence and the local sequence, correlation transformation is calculated using a pre-defined correlation transformation formula to obtain the correlation transformation sequence.

[0403] In one possible implementation, update module 3103 includes:

[0404] The determination unit is used to determine the number of sampling points in the Nth ripple period of the correlation transformation sequence obtained in the previous processing as the new initial single-period sampling point number.

[0405] In another possible implementation, the segmentation module 3105 is specifically used for:

[0406] By dividing the motor ripple sampling sequence into periods using all periodic segmentation points, a periodic segmentation point sequence is obtained.

[0407] Correspondingly, the motor ripple processing device 3100 also includes:

[0408] The counting module 3107 is used to count the ripple of the motor ripple sampling sequence according to the periodic segmentation point sequence.

[0409] Figure 32 is a schematic diagram of the structure of a second embodiment of the motor ripple processing device provided in this application. As shown in Figure 32, the motor ripple processing device 3100 further includes:

[0410] The third reading module 3201 reads M cycles of sequence data from the starting point of the motor ripple sampling sequence based on the pre-acquired predicted value of the number of single-cycle sampling points, as the initial processing sequence.

[0411] The fourth reading module 3202 is configured to read sequence data of L cycles starting from the starting point of the initial processing sequence as an initial local sequence according to the single-cycle sampling point number prediction value.

[0412] The first calculation module 3203 is configured to perform correlation transformation calculation on the initial processing sequence and the initial local sequence by using a correlation transformation formula to obtain an initial correlation transformation sequence.

[0413] The detection module 3204 is configured to perform peak position detection on the initial correlation transformation sequence to obtain N cycle division point positions in the initial correlation transformation sequence.

[0414] The second calculation module 3205 is configured to perform average calculation on the sampling point numbers of N cycles of the initial correlation transformation sequence to obtain an initial single-cycle sampling point number.

[0415] FIG. 33 is a structural schematic diagram of a third embodiment of the motor ripple processing apparatus provided by the embodiment of the application. As shown in FIG. 33, the motor ripple processing apparatus 3100 further includes:

[0416] The acquisition module 3301 is configured to acquire motor parameters, and the motor parameters include motor current, motor rotation direction, ambient temperature, motor voltage, and ambient temperature.

[0417] The table lookup module 3302 is configured to obtain a single-cycle sampling point number prediction value by using a table lookup method according to the motor parameter information.

[0418] Optionally, the motor ripple processing apparatus 2700 further includes:

[0419] The sampling module 3303 is configured to sample the motor current signal in real time.

[0420] The preprocessing module 3304 is configured to perform DC removal and PWM filtering preprocessing on the motor current signal to obtain a motor ripple sampling sequence.

[0421] FIG. 34 is a structural schematic diagram of a fourth embodiment of the motor ripple processing apparatus provided by the embodiment of the application. As shown in FIG. 34, the motor ripple processing apparatus 3100 further includes:

[0422] The fifth reading module 3401 is configured to read sequence data of M ripple cycles starting from a starting point of the pre-acquired motor ripple sampling sequence as a processing sequence according to the pre-acquired initial single-cycle sampling point number and a sampling cycle value of the ripple analog-to-digital converter, where M is a preset integer.

[0423] The third calculation module 3402 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, and the local sequence is a sequence obtained from the processing sequence and used for correlation transformation;

[0424] The first determination module 3403 is configured to determine a target algorithm according to a prediction period of the 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 an upper peak position of the correlation transformation sequence;

[0425] The second determination module 3404 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 transformation 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 transformation sequence;

[0426] The third determination module 3405 is configured to determine a ripple period value of the processing sequence according to the upper peak position, and perform ripple period segmentation on the motor ripple sampling sequence based on the ripple period value of the processing sequence and all period segmentation points, to determine a period segmentation point sequence.

[0427] The cycle processing module 3406 is configured to read sequence data of M ripple periods from the motor ripple sampling sequence as a new processing sequence, starting from a second starting point, according to an initial single period value and a sampling period value in a time sequence, and repeat steps 2 to 6 until the motor ripple sampling sequence is processed, and the second starting point is determined based on a period segmentation position of the processing sequence.

[0428] FIG. 35 is a structural schematic diagram of a motor ripple processing device according to an embodiment of the present application, as shown in FIG. 35, the second determination module 3404 includes:

[0429] The selection unit 3501 is configured to take a sampling point in the processing sequence as a center point, the sampling point having a smallest time interval with a previously obtained upper peak prediction position of the processing sequence according to a prediction period of the processing sequence.

[0430] The first determination unit 3502 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 take the four determined points as a measurement point set.

[0431] The first transformation unit 3503 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.

[0432] The first calculation unit 3504 is configured to calculate the upper peak position of the correlation transform sequence according to the preset double-side straight line intersection formula and the correlation transform value of each point.

[0433] The second determination unit 3505 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 a set of measuring points.

[0434] The second transformation unit 3506 is configured to perform correlation transformation on the set of measuring points based on the local sequence to obtain the correlation transform value of each point.

[0435] The second calculation unit 3507 is configured to calculate the upper peak position of the correlation transform sequence according to the preset parabola fitting formula and the correlation transform value of each point.

[0436] FIG. 36 is a structural schematic diagram of the motor ripple processing apparatus embodiment six provided by the embodiment of the application. As shown in FIG. 35, the first determination module 3403 is configured to:

[0437] The first determination unit 3701 is configured to, if the prediction period of the processing sequence is less than a preset period threshold, determine the parabola fitting method as the target algorithm.

[0438] The second determination unit 3702 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.

[0439] FIG. 37 is a structural schematic diagram of the motor ripple processing apparatus embodiment seven provided by the embodiment of the application. As shown in FIG. 37, the motor ripple processing apparatus 3100 further includes:

[0440] The fifth determination module 3701 is configured to determine the running speed of the window glass according to the ripple period value of the processing sequence.

[0441] The monitoring control module 3702 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 pre-acquired motor parameters.

[0442] FIG. 38 is a structural schematic diagram of the motor ripple processing apparatus embodiment eight provided by the embodiment of the application. As shown in FIG. 38, the motor ripple counting apparatus 3100 further includes:

[0443] The real-time sampling module 3801 is configured to sample the motor current signal in real time.

[0444] The preprocessing module 3802 is configured to perform DC removal, low-pass filtering and PWM preprocessing on the motor current signal to obtain a motor ripple sampling sequence.

[0445] The motor ripple processing apparatus provided by each of the above embodiments is used to execute the motor ripple processing method in any of the above method embodiments, and has similar implementation principles and technical effects, which will not be described here again.

[0446] FIG. 39 is a structural schematic diagram of a motor controller provided by an embodiment of the present application. As shown in FIG. 39, the motor controller 3900 includes a processor 3902 and a memory 3901 in communication connection with the processor.

[0447] The memory 3901 stores computer execution instructions.

[0448] The processor 3902 executes the computer execution instructions stored in the memory 3901 to implement the motor ripple processing method in any of the embodiments.

[0449] The present application also provides a computer readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed by a processor, the motor ripple processing method in any of the embodiments is implemented.

[0450] The above computer readable storage medium 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 or special purpose computer.

[0451] 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.

[0452] The present application also provides a computer program product, which includes 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 when the at least one processor executes the computer program, the technical solution provided by any of the above method embodiments can be implemented.

[0453] The present application also provides a computer program, which, when running on a computer, enables the computer to execute the method steps in the above method embodiments. The specific implementation manners and technical effects are similar, which will not be described here again.

[0454] 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.

[0455] It is to be understood that the application is not limited to the precise details of design or construction that have been described above and illustrated in the accompanying drawings. The scope of the application is indicated by the appended claims.

[0456] The above is a specific description of the preferred embodiments of the present application, but the present application is not limited to the embodiments, and those skilled in the art can make various equivalent modifications or replacements without departing from the spirit of the present application, and these equivalent modifications or replacements are all included in the scope defined by the claims of the present application.

Claims

1. A motor ripple processing method applied to a motor controller, the method comprising: Step a: reading M cycles of sequence data from a starting point of a pre-acquired motor ripple sampling sequence as a processing sequence according to a pre-acquired initial single-cycle sampling point number, wherein M is a preset integer; Step b: performing transform detection processing on the processing sequence to obtain N cycle division points in a relevant transform sequence, wherein the relevant transform sequence has the same ripple cycle as the processing sequence, and N is a preset number of ripple cycles for the current division processing; Step c: updating the initial single-cycle sampling point number to obtain a new initial single-cycle sampling point number; Step d: reading M cycles of sequence data from a first starting point in the motor ripple sampling sequence as a new processing sequence according to the new initial single-cycle sampling point number in time sequence, wherein the first starting point is determined based on an ending point of the last ripple cycle data of the processing sequence, and repeating steps b to d until the motor ripple sampling sequence is processed to obtain N cycle division points in a relevant transform sequence corresponding to each processing sequence; Step e: performing cycle division on the motor ripple sampling sequence through all cycle division points.

2. The method of claim 1, wherein, The transform detection processing on the processing sequence to obtain N cycle division points in a relevant transform sequence comprises: performing relevant transform calculation on the processing sequence to obtain the relevant transform sequence; and performing peak position detection on the relevant transform sequence to obtain N cycle division points in the relevant transform sequence. 3.The method of claim 2, further comprising: reading L cycles of sequence data from a starting point of the processing sequence as a local sequence according to the initial single-cycle sampling point number; and correspondingly, the relevant transform calculation on the processing sequence to obtain the relevant transform sequence comprises: performing relevant transform calculation on the processing sequence and the local sequence through a pre-set relevant transform formula to obtain the relevant transform sequence.

4. The method of claim 1, wherein, The updating of the initial single-cycle sampling point number to obtain a new initial single-cycle sampling point number comprises: determining a sampling point number of the Nth ripple cycle in the relevant transform sequence obtained from the last processing as the new initial single-cycle sampling point number. 5.The method of claim 4, further comprising: reading M cycles of sequence data from a starting point of the motor ripple sampling sequence as an initial processing sequence according to a pre-acquired single-cycle sampling point number prediction value; reading L cycles of sequence data from a starting point of the initial processing sequence as an initial local sequence according to the single-cycle sampling point number prediction value; performing relevant transform calculation on the initial processing sequence and the initial local sequence through the relevant transform formula to obtain an initial relevant transform sequence; performing peak position detection on the initial relevant transform sequence to obtain N cycle division points in the initial relevant transform sequence; and performing cycle division on the motor ripple sampling sequence through all cycle division points. Average the number of sampling points of N periods of the initial correlation transform sequence to obtain the initial single-period sampling point number.

6. The method of claim 5, further comprising: obtaining motor parameters, the motor parameters including motor current, motor rotation direction, ambient temperature, motor voltage, ambient temperature; According to the motor parameters, the single-period sampling point number prediction value is obtained by table lookup method.

7. The method of any one of claims 1 to 6, further comprising: real-time sampling of the motor current signal; DC removal and pulse width modulation (PWM) filtering preprocessing of the motor current signal to obtain the motor ripple sampling sequence.

8. The method according to any one of claims 1 to 5, wherein, The period division of the motor ripple sampling sequence through all period division points includes: Period division of the motor ripple sampling sequence through all period division points to obtain a period division point sequence; Accordingly, the method further comprises: According to the period division point sequence, the ripple of the motor ripple sampling sequence is counted.

9. The method of claim 8, wherein, The period division of the motor ripple sampling sequence through all period division points to obtain a period division point sequence includes: Step 1: According to the initial single-period sampling point number and the sampling period value of the ripple analog-to-digital converter obtained in advance, read the sequence data of M ripple periods from the starting point of the motor ripple sampling sequence obtained in advance as a processing sequence, wherein M is a preset integer; Step 2: According to the local sequence corresponding to the processing sequence obtained in advance, 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; Step 3: According to the predicted period of the processing sequence predicted in advance, determine a target algorithm, the target algorithm includes a double-sided straight line intersection method or a parabolic fitting method, and is used for calculating the upper peak position of the correlation transform sequence; Step 4: According to the predicted period of the processing sequence, determine a measurement point set of the processing sequence, and based on the measurement point set and the target algorithm, calculate the upper peak position corresponding to the correlation transform sequence, the measurement point set includes a plurality of sampling points for calculating the upper peak position of the correlation transform sequence; Step 5: According to the upper peak position, determine the ripple period value of the processing sequence, and based on the ripple period value of the processing sequence, perform ripple period division of the motor ripple sampling sequence through all period division points to determine the period division point sequence; Step 6: According to the initial single-period value and the sampling period value, read the sequence data of M ripple periods from the motor ripple sampling sequence starting at a second starting point as a new processing sequence in time sequence, repeat steps 2 to 6 until the motor ripple sampling sequence is processed, and the second starting point is determined based on the period division position of the processing sequence.

10. The method of claim 9, wherein, 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.

11. The method according to claim 10, further comprising: 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.

12. The method of claim 9, wherein, 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.

13. The method according to claim 9, further comprising: 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.

14. The method according to claim 9, further comprising: 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.

15. A motor ripple processing device, comprising: The first reading module is configured to read M cycles of sequence data from the starting point of the pre-acquired motor ripple sampling sequence, based on the pre-acquired initial single-cycle sampling point number, as a processing sequence, where M is a preset integer; The transformation detection module is configured to perform transformation detection processing on the processing sequence to obtain N periodic segmentation points in the relevant transformation sequence. The relevant transformation sequence and the processing sequence have the same ripple period, where N is a preset number of ripple periods for this segmentation process. an updating module configured to update the initial single-cycle sampling point number to obtain a new initial single-cycle sampling point number; a loop module configured to read, according to the new initial single-cycle sampling point number, sequence data of M cycles from a first starting point in the motor ripple sampling sequence in time sequence as a new processing sequence, until the motor ripple sampling sequence is processed to obtain N cycle division points in a correlation transform sequence corresponding to each processing sequence, the first starting point being determined based on an end point of the last ripple cycle data in the processing sequence; a division module configured to divide the motor ripple sampling sequence by all the cycle division points.

16. An electric machine controller comprising: a processor, and a memory in communication connection with the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the motor ripple processing method according to any one of claims 1 to 14.

17. A computer readable storage medium, the computer readable storage medium storing computer execution instructions, the computer execution instructions being configured to implement the motor ripple processing method according to any one of claims 1 to 14 when executed by a processor.

18. A computer program, the computer program being configured to execute the motor ripple processing method according to any one of claims 1 to 14 when running on a computer.

Citation Information

Patent Citations

  • Method and device for judging position of vehicle window, vehicle, equipment and medium

    CN111706199A

  • Filtering algorithm for ripple detection of vehicle window controller

    CN114263411A

  • Periodic waveform statistical parameter measurement method and device

    CN115963312A

  • Car window anti-pinch calibration method, device, equipment and medium

    CN116701837A

  • Motor ripple processing method and device, equipment and storage medium

    CN118944501A