CN111098808B - Method and system for controlling vehicle body closed part based on direct current motor ripple - Google Patents

Method and system for controlling vehicle body closed part based on direct current motor ripple Download PDF

Info

Publication number
CN111098808B
CN111098808B CN201911272976.3A CN201911272976A CN111098808B CN 111098808 B CN111098808 B CN 111098808B CN 201911272976 A CN201911272976 A CN 201911272976A CN 111098808 B CN111098808 B CN 111098808B
Authority
CN
China
Prior art keywords
current
motor
ripple
value
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911272976.3A
Other languages
Chinese (zh)
Other versions
CN111098808A (en
Inventor
刘爽
贾晟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingwei Hirain Tech Co Ltd
Original Assignee
Beijing Jingwei Hirain Tech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingwei Hirain Tech Co Ltd filed Critical Beijing Jingwei Hirain Tech Co Ltd
Priority to CN201911272976.3A priority Critical patent/CN111098808B/en
Publication of CN111098808A publication Critical patent/CN111098808A/en
Application granted granted Critical
Publication of CN111098808B publication Critical patent/CN111098808B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R16/00Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
    • B60R16/02Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R16/00Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
    • B60R16/02Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
    • B60R16/023Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements for transmission of signals between vehicle parts or subsystems
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P5/00Arrangements specially adapted for regulating or controlling the speed or torque of two or more electric motors
    • H02P5/68Arrangements specially adapted for regulating or controlling the speed or torque of two or more electric motors controlling two or more dc dynamo-electric motors
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P7/00Arrangements for regulating or controlling the speed or torque of electric DC motors
    • H02P7/0094Arrangements for regulating or controlling the speed or torque of electric DC motors wherein the position is detected using the ripple of the current caused by the commutator
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P7/00Arrangements for regulating or controlling the speed or torque of electric DC motors
    • H02P7/03Arrangements for regulating or controlling the speed or torque of electric DC motors for controlling the direction of rotation of DC motors
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P7/00Arrangements for regulating or controlling the speed or torque of electric DC motors
    • H02P7/06Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current
    • H02P7/18Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power
    • H02P7/24Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power using discharge tubes or semiconductor devices
    • H02P7/28Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power using discharge tubes or semiconductor devices using semiconductor devices
    • H02P7/285Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power using discharge tubes or semiconductor devices using semiconductor devices controlling armature supply only
    • H02P7/29Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power using discharge tubes or semiconductor devices using semiconductor devices controlling armature supply only using pulse modulation
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P2203/00Indexing scheme relating to controlling arrangements characterised by the means for detecting the position of the rotor
    • H02P2203/03Determination of the rotor position, e.g. initial rotor position, during standstill or low speed operation

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Mechanical Engineering (AREA)
  • Power-Operated Mechanisms For Wings (AREA)
  • Control Of Direct Current Motors (AREA)

Abstract

The invention discloses a method and a system for controlling a vehicle body closed part based on direct current motor ripples, wherein the method comprises the following steps: collecting current signals generated by a motor of a vehicle body closing part in a moving process; calculating the number of current ripples generated by the motor in the motion process and the period of each current ripple; obtaining the operation position and the operation speed of the motor at the current moment according to the number of the current ripples and the period of each current ripple; filtering the current signal to obtain the current direct current quantity of the motor at the current moment; carrying out closed-loop speed regulation control according to the running speed and the running position; and performing anti-pinch detection control according to the operation position and the direct current quantity of the current. According to the technical scheme, closed-loop speed regulation and anti-pinch detection control are realized only by collecting current signals generated in the actual operation of the motor and carrying out analysis and calculation, and compared with the traditional technology, the method has the advantages that the hardware investment is reduced, the control reliability is guaranteed, the production cost is favorably reduced, and the method is suitable for popularization.

Description

Method and system for controlling vehicle body closed part based on direct current motor ripple
Technical Field
The invention belongs to the technical field of automotive electronics, and relates to a closed-loop and anti-pinch control method for a closed part of an automobile body, in particular to a method and a system for controlling the closed part of the automobile body based on direct-current motor ripples.
Background
With respect to a vehicle body closing part, related regulations such as American standard FMVSS118(S5), European standard 2000/4/EC, ECE R21(2003) and national standard GB11552-2009 provide design constraints in terms of personal safety protection, namely, during the closing process of the vehicle body closing part, if an object or a human body is blocked within the range of 4mm-200mm specified by the regulations, a motor must be capable of detecting the obstacle and reversely rotating, and the function is called anti-pinch function. The automobile body closing parts comprise an automobile electric door and window, a skylight, a back door, a side sliding door and the like.
The following description will be given taking an electric door and window of an automobile as an example: there are two schemes for controlling the motion of the door and window motor, open-loop control and closed-loop control. The closed-loop control can realize that the motor runs at a set speed under different voltages and loads by controlling the duty ratio, so that the motor can be controlled to run at a lower speed, the noise is reduced, and meanwhile, the high-sensitivity detection requirement of American standard S5 can be better met.
In the conventional anti-pinch and closed-loop speed regulation scheme, an independent Hall sensor is usually arranged in a motor to obtain a pulse signal related to the movement of the motor, so that the movement speed and position of a door or window are extracted, and closed-loop control is performed according to the speed. Four doors and windows respectively need a hall sensor and corresponding control circuit, and besides the motor power supply line, extra connecting wire harnesses and connectors are needed to be connected with a BCM (body control Module), so that the cost of the whole automobile factory is not reduced.
In view of the above, the present invention is particularly proposed.
Disclosure of Invention
The invention aims to provide a novel method for controlling a vehicle body closing part based on direct current motor ripples and a system for implementing the method, so that the production cost is reduced.
In order to achieve the above object, the present invention provides a method for controlling a vehicle body closing component based on a dc motor ripple, applied to a controller, comprising the steps of:
collecting current signals generated by a motor of the vehicle body closing part in the motion process;
calculating the number of current ripples generated by the motor in the motion process and the period of each current ripple according to the current signals;
calculating to obtain the running position and the running speed of the motor at the current moment according to the calculated number of the current ripples and the period of each current ripple;
filtering the current signal to obtain the current direct current quantity of the motor at the current moment;
carrying out closed-loop speed regulation control according to the running speed and the running position;
and carrying out anti-pinch detection control according to the running position and the direct current quantity of the current.
Further, in the above method for controlling a vehicle body closing part based on a dc motor ripple, calculating the number of current ripples generated by the motor during a motion process and a period of each current ripple according to the current signal includes:
converting the current signal into a square wave signal by using a current reference line;
taking the counted number of falling edges of the square wave signal as the number of current ripples generated by the motor in the motion process;
taking the calculated time between adjacent falling edges of the square wave signals as the period of each current ripple wave;
wherein the current reference line is an adaptive reference line.
Further, in the above method for controlling a vehicle body closing part based on a dc motor ripple, converting the current signal into a square wave signal by using a current reference line, the method includes:
setting a timing interruption with a period of preset time Ts, skipping to enter the interruption once when the clock reaches the preset time Ts, executing an interruption service program to sample the current signal to obtain a sampling value, and storing the sampling value and the sampling times in a data buffer area, wherein the preset time Ts satisfies the Shannon sampling theorem;
the millisecond-level batch processing ripple extracting program reads data in the data buffer area regularly, the read data are subjected to batch processing by utilizing the self-adaptive reference line, and ripple signals are converted into square wave signals;
correspondingly, taking the calculated time between adjacent falling edges of the square wave signal as the period of each current ripple comprises the following steps:
reading the sampling times Q between adjacent falling edges of the square wave signals;
using the formula TwaveCalculating said square wave signal as Q TsThe time between adjacent falling edges.
Further, in the method for controlling the vehicle body closing part based on the direct current motor ripple, the adaptive reference line is obtained by adopting first-order lag filtering, and the calculation formula is as follows:
Ref_Value(k)=K1*Ref_Value(k-1)+K2*AD_Value(k),
ref _ Value (k) is a calculated reference Value at the current moment, Ref _ Value (k-1) is a reference Value at the previous moment, and AD _ Value (k) is a sampling Value at the current moment; k1 and K2 are weighting coefficients;
then, let Pin _ Level represent the Level of the square wave signal obtained by converting the current signal, and there are:
AD_Value(k)>Ref_Value(k),Pin_Level=1,
AD_Value(k)≤Ref_Value(k),Pin_Level=0。
further, in the method for controlling a vehicle body closing part based on a dc motor ripple, an operation position and an operation speed of the motor at the current time are calculated according to the calculated number of current ripples and a period of each current ripple, and the method includes:
calculating the operation position according to the calculated number of the current ripples;
the mode of calculating the operating speed is as follows:
when k is less than or equal to M,
ω(k)=(2πk/M)/Tsum(k)
Tsum(k)=T1+,…,+Tk
when k > M, the number of the first and second groups,
ω(k)=2π/Tsum(k)
Tsum(k)=Tk-M+1+Tk-M+2,…,+Tk=Tsum(k-1)–Tk-M+Tk
wherein k is the number of current ripples at the current moment, and M is the number of current ripples generated by one rotation of the motor; omega (k) is the running speed of the motor at the current moment, TiRepresents the ith ripple cycle; 1,. k; when k is less than or equal to M, Tsum (k) is accumulated k ripple periods; when k is>Tsum (k) is the accumulated M ripple periods.
Further, in the above method for controlling a vehicle body closing part based on a dc motor ripple, performing anti-pinch detection control according to the operation position and the dc current amount includes:
determining an anti-pinch threshold value and a reference current value corresponding to the operating position;
and calculating a current difference value between the direct current quantity and the reference current value, and controlling the motor to rotate reversely when the current difference value exceeds the anti-pinch threshold value.
Further, in the method for controlling a vehicle body closing component based on a dc motor ripple, the method further includes: resetting the operating position to a default value when the body closure member is fully closed or fully open.
On the other hand, the invention also provides a system for controlling the closed part of the vehicle body based on the direct current motor ripple, which comprises a motor, a sampling circuit, a controller and a driving circuit; the motor is connected with the input end of the controller through the sampling circuit; the output end of the controller is connected with the motor through the driving circuit; wherein the controller includes:
the sampling module is used for acquiring a current signal generated by the motor in the motion process through the sampling circuit; calculating the number of current ripples generated by the motor in the motion process and the period of each current ripple according to the current signals;
the speed calculation module is used for calculating the running speed of the motor at the current moment according to the number of the current ripples calculated by the sampling module and the period of each current ripple;
the position extraction module is used for calculating the running position of the motor at the current moment according to the number of the current ripples calculated by the sampling module;
the low-pass filtering module is used for filtering the current signal to obtain the current direct-current quantity of the motor at the current moment;
the closed-loop control module is used for acquiring the running speed and the running position, calculating and processing the running speed and the running position, and outputting a closed-loop speed regulation control signal to the driving circuit;
prevent pressing from both sides detection module for acquire the running position with the direct current flow of electric current is calculated and is handled, and the control signal extremely is prevented pressing from both sides in the output drive circuit.
Further, in the above system for controlling a vehicle body closing component based on a dc motor ripple, the sampling module includes:
the conversion submodule is used for converting the current signal into a square wave signal by using a current reference line;
the ripple counting submodule is used for taking the counted number of the falling edges of the square wave signals as the number of current ripples generated by the motor in the motion process;
the period calculation submodule is used for taking the calculated time between adjacent falling edges of the square wave signals as the period of each current ripple wave;
wherein the current reference line is an adaptive reference line.
Furthermore, in the system for controlling the vehicle body closing part based on the direct current motor ripple,
the conversion submodule converts the current signal into a square wave signal by using a current reference line, and comprises:
setting a timing interruption with a period of preset time Ts, skipping to enter the interruption once when the clock reaches the preset time Ts, executing an interruption service program to sample the current signal to obtain a sampling value, and storing the sampling value and the sampling times in a data buffer area, wherein the preset time Ts satisfies the Shannon sampling theorem;
the millisecond-level batch processing ripple extraction program reads data in the data buffer area regularly, carries out batch processing on the read data by utilizing the self-adaptive reference line and converts a ripple signal into a square wave signal;
correspondingly, the period calculation sub-module takes the calculated time between adjacent falling edges of the square wave signal as the period of each current ripple, and comprises:
reading the sampling times Q between adjacent falling edges of the square wave signals;
using formulasTwaveThe time between adjacent falling edges of the square wave signal is calculated as Q Ts.
Further, in the above system for controlling a vehicle body closing part based on a dc motor ripple, the adaptive reference line is obtained by using first-order lag filtering, and a calculation formula is:
Ref_Value(k)=K1*Ref_Value(k-1)+K2*AD_Value(k),
ref _ Value (k) is a calculated reference Value at the current moment, Ref _ Value (k-1) is a reference Value at the previous moment, and AD _ Value (k) is a sampling Value at the current moment; k1 and K2 are weighting coefficients;
then, let Pin _ Level represent the Level of the square wave signal obtained by converting the current signal, and there are:
AD_Value(k)>Ref_Value(k),Pin_Level=1,
AD_Value(k)≤Ref_Value(k),Pin_Level=0。
further, in the above system for controlling a vehicle body closing component based on a dc motor ripple, the speed calculating module calculates the operating speed, and includes:
when k is less than or equal to M,
ω(k)=(2πk/M)/Tsum(k)
Tsum(k)=T1+,…,+Tk
when k > M, the number of the first and second groups is greater than M,
ω(k)=2π/Tsum(k)
Tsum(k)=Tk-M+1+Tk-M+2,…,+Tk=Tsum(k-1)–Tk-M+Tk
wherein k is the number of current ripples at the current moment, and M is the number of current ripples generated by one rotation of the motor; omega (k) is the running speed of the motor at the current moment, TiRepresents the ith ripple period; 1,. k; when k is less than or equal to M, Tsum (k) is accumulated k ripple periods; when k is>Tsum (k) is the accumulated M ripple periods.
Further, in the aforesaid system based on direct current motor ripple control automobile body closed part, prevent pressing from both sides detection module and acquire the running position with electric current direct current volume and calculation processing, the output prevents pressing from both sides control signal extremely drive circuit includes:
determining an anti-pinch threshold value and a reference current value corresponding to the operation position;
and calculating a current difference value between the direct current quantity and the reference current value, and outputting an anti-pinch control signal to the driving circuit to control the motor to reversely rotate when the current difference value exceeds the anti-pinch threshold value.
Further, in the above-mentioned system based on direct current motor ripple control automobile body closed part, prevent pressing from both sides the detection module and still be used for: resetting the operating position to a default value when the body closure member is fully closed or fully open.
Compared with the prior art, the technical scheme of the invention has the following beneficial effects:
the method and the system for controlling the closed part of the vehicle body based on the direct current motor ripple waves only acquire the current signals generated in the actual operation of the motor to carry out analysis and calculation to realize closed-loop speed regulation and anti-pinch detection control.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a flow chart of one embodiment of a method of controlling a vehicle body closure component based on DC motor ripple according to the present invention;
FIG. 2 is a schematic diagram of a closed-loop control system according to an embodiment of the present invention, in which the method for controlling a vehicle body closing component based on a DC motor ripple is applied;
FIGS. 3(a) and 3(b) are block diagrams of batch ripple count extraction routines;
FIG. 4 shows the ripple period T after the ripple signal is converted into the square wave signalwaveAcquiring a schematic diagram;
FIG. 5 is a schematic diagram of the system of the present invention for closed loop control;
fig. 6 is a logic block diagram of an embodiment of the system for controlling the vehicle body closing part based on the dc motor ripple.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present invention.
As shown in fig. 1, a method for controlling a vehicle body closing part based on a direct current motor ripple is applied to a controller, and comprises the following steps:
and S11, acquiring current signals generated by the motor of the vehicle body closing part in the moving process.
The current signal is a signal obtained by superposing a current ripple signal and a current direct current quantity; the vehicle body closing parts can comprise an automobile electric door and window, a skylight, a back door, a side sliding door and the like. The present invention will be described below by taking an electric door and window for an automobile as an example.
And S12, calculating the number of current ripples generated by the motor in the motion process and the period of each current ripple according to the current signals.
And S13, calculating the running position and the running speed of the motor at the current moment according to the calculated number of the current ripples and the period of each current ripple.
And S14, filtering the current signal to obtain the current direct current quantity of the motor at the current moment.
And S15, performing closed-loop speed regulation control according to the running speed and the running position.
And S16, performing anti-pinch detection control according to the running position and the direct current quantity.
The method of the invention adopts ripple signals, direct current quantity and the like based on the current of the motor to carry out closed-loop and anti-pinch control, is applied to a closed-loop control system, and only carries out analysis and calculation by collecting current signals generated in the actual operation of the motor to obtain the operation speed and position information of the motor so as to realize closed-loop speed regulation and anti-pinch detection control.
Referring to fig. 2, the method of the present invention is applied to a closed-loop control system, and a single controller 20 can control the motion of multiple (N) motors, and the method is described by taking one of the control systems as an example.
And S11, acquiring current signals generated by the motor of the vehicle body closing part in the moving process.
Alternating current signals generated in the motor movement process after current ripples and direct current quantity superposition are converted into voltage signals through an acquisition unit (such as a sampling resistor), the voltage signals are amplified to obtain acquired current signals, and the acquired current signals are transmitted to a controller to be calculated and analyzed so as to facilitate subsequent processes of closed-loop speed regulation, anti-pinch control and the like.
And S12, calculating the number of current ripples generated by the motor in the motion process and the period of each current ripple according to the current signals.
In the step, after the alternating current signal acquired by the acquisition unit is converted and amplified to obtain a current signal, the number of current ripples generated by the motor in the motion process and the period of each current ripple are calculated by using the current signal. In a possible embodiment, step S12 may include steps S121, S122, and S123, which are described in detail below:
and S121, converting the current signal into a square wave signal by using the current reference line.
In practical application, because the current signal obtained through the AD conversion overlaps the dc component and the ac component, the peak-to-valley value of the current fluctuates with the dc component when the motor is started, stalled, or varies in resistance. For this purpose, in one embodiment, the current reference line may be set as an adaptive reference line, and specifically, the current reference line may be set as a reference line that varies with the magnitude of the dc current. In practical implementation, a first-order lag filtering is adopted to obtain an adaptive reference line, and the formula is as follows:
Ref_Value(k)=K1*Ref_Value(k-1)+K2*AD_Value(k)
ref _ Value (k) is a calculated reference Value at the current moment, Ref _ Value (k-1) is a reference Value at the previous moment, and AD _ Value (k) is a sampling Value at the current moment; k1 and K2 are weighting coefficients and are obtained by calibration according to the actual ripple fluctuation condition.
It will of course be appreciated that in other embodiments the current reference line may take other forms, for example, different current reference lines may be preconfigured for different operating phases of the motor.
Since the current signal collected in step S11 includes both the dc amount and the ac amount, the current signal is essentially a ripple signal. Referring to fig. 4, it is known from the characteristics of the ripple signal that peaks and valleys alternately appear. After the current reference line is established, the ripple signal can be converted into the square wave signal according to the amplitude of the ripple signal and the size of the current reference line, specifically, if the ripple amplitude is greater than the current reference line, the ripple amplitude is set to be a high Level, if the ripple amplitude is less than the current reference line, the ripple amplitude is set to be a low Level, and if Pin _ Level is set to represent the Level of the square wave signal extracted from the current signal, the current reference line has the following steps:
AD_Value(k)>Ref_Value(k),Pin_Level=1
AD_Value(k)≤Ref_Value(k),Pin_Level=0
AD _ value (k) is a current time sampling value, and Ref _ value (k) is a current time reference line. Thus, the ripple signal close to sine is converted into a square wave signal with the same period through Pin _ Level.
In addition, the current signal collected in step S11 is obtained by sampling. On one hand, the highest ripple frequency of the door and window load motor is usually less than 2kHz, and on the premise of meeting the Shannon sampling theorem, the sampling frequency in the controller is at least 4kHz, so that the sampling time interval of the controller is required to be less than 250 mus. On the other hand, the system software of the MCU (Micro Control Unit) as the controller needs to process multiple tasks such as switching logic, anti-pinch algorithm, thermal protection, closed-loop speed regulation, etc., and is limited by the MCU main frequency, and the MCU minimum task period is ms-order, and cannot realize μ s-order sampling. That is, limited by the controller's computing power and the load factor of other applications, if sampling is performed while converting a square wave signal, the actual sampling frequency will not meet the sampling frequency requirement. Therefore, in practical application, MCU interruption is needed to carry out current sampling, namely, a timing interruption is set, the clock jumps to enter the interruption once when the timing reaches the preset time Ts, an interruption service program is executed, sampling is carried out in the interruption service program, and an AD value obtained by sampling is stored in a data buffer area. And the subsequent millisecond-level batch processing ripple extraction program reads the Buffer value regularly, performs batch processing and converts the ripple signal into a square wave signal. And simultaneously, the number Q of the AD value sampling points between adjacent falling edges can be read. The foregoing sampling and square wave conversion process is described below with reference to fig. 3(a) and 3 (b).
As shown in fig. 3(a), in the process of collecting the motor current signal, after the timer is started at S311, a timer interrupt with a period of a preset time duration Ts is set, at S312, the clock jumps into one interrupt every time the preset time duration Ts is reached, an interrupt service routine is executed to sample the current signal to obtain a sampling value, and at S313, the sampling value and the sampling number are stored in a data Buffer, where, in fig. 3(a), Buffer (n) represents the sampling value U _ AD, n represents the sampling number, and the preset time duration Ts satisfies shannon sampling theorem.
In fig. 3(b), the millisecond batch ripple extraction program periodically reads the Buffer value and the n value stored in the data Buffer, performs batch processing on the read data by using the adaptive reference line, converts the ripple signal into a square wave signal, and then clears the Buffer value, and n returns to zero.
And S122, taking the counted number of the falling edges of the square wave signal as the number of current ripples generated by the motor in the movement process.
In this step, the number of falling edges of the square wave signalThe number of current ripples generated by the motor in the motion process is the number of the current ripples; calculating the time between adjacent falling edges of the square waves to obtain the ripple period Twave
And S123, taking the calculated time between adjacent falling edges of the square wave signals as the cycle of each current ripple.
As shown in FIG. 4, the time between adjacent falling edges of the square wave signal is the period T of each current ripplewave
Reading the sampling times Q between adjacent falling edges of the square wave signal, and then:
Twave=Q*Ts
in the process of converting the ripple signal into the square wave signal, the millisecond-level batch ripple extraction procedure is shown in fig. 3 (b). And (3) adopting a microsecond interrupt service program to carry out AD acquisition, and storing the acquired current signal into buffer (n). Reading the current Buffer value and the n value at S321, performing a batch processing ripple extraction program through a main task function in an inquiry mode at S322, and converting ripple signals into square wave signals to obtain position information and ripple pulse width Twave(i.e., ripple period). Wherein the period of the batch query is in milliseconds.
And S13, calculating the running position and the running speed of the motor at the current moment according to the calculated number of the current ripples and the period of each current ripple.
In one embodiment, step S13 may include:
(1) the running speed calculation formula of the motor is as follows:
ω=(2π/M)/Twave
wherein, omega is the rotating speed of the motor, M is the number of ripple signals generated by one rotation of the motor, and TwaveAs a single ripple signal period.
The motor generates ripple signals due to the change of the contact resistance between the brush and the commutator in the commutation process, and the ripple number generated by one cycle of the motor is related to the number of the commutator segments.
In order to eliminate the influence of commutator installation errors and ripple wave period calculation errors, the method of the invention further carries out error elimination calculation, improves the calculation accuracy, and ensures the accuracy and reliability of closed-loop control:
in this step, the operating speed can be calculated after adding every M ripple cycles, and the ripple cycles are subjected to sliding addition, and in addition, because when the motor is just started, the total ripple quantity generated by one rotation of the actual motor is smaller than the ripple signal quantity M generated by one rotation of the motor during stable motion after the motor is started, the mode of calculating the operating speed of the motor in this embodiment is as follows:
when k is less than or equal to M,
ω(k)=(2πk/M)/Tsum(k)
Tsum(k)=T1+,…,+Tk
when k > M, the number of the first and second groups is greater than M,
ω(k)=2π/Tsum(k)
Tsum(k)=Tk-M+1+Tk-M+2,…,+Tk=Tsum(k-1)–Tk-M+Tk
wherein k is the number of current ripples at the current moment, and M is the number of current ripples generated by one rotation of the motor; omega (k) is the running speed of the motor at the current moment, TiRepresents the ith ripple period; 1,. k; when k is less than or equal to M, Tsum (k) is accumulated k ripple periods; when k is>At M, tsum (k) is the accumulated M ripple periods. In actual calculation, the formula "Tsum (k) ═ Tsum (k-1) -T" is usedk-M+Tk", to reduce the computational effort.
(2) And when the running position is calculated, calculating the running position according to the calculated number of the current ripples.
Specifically, the number of falling edges of the square wave is calculated through the obtained square wave signals, and the running position information of the motor can be obtained.
And S14, filtering the current signal to obtain the current direct current quantity of the motor at the current moment.
The direct current quantity is extracted from the alternating current signal by first-order lag filtering, and the formula is as follows:
Filter_Value(k)=K3*Filter_Value(k-1)+K4*AD_Value(k)
wherein, Filter _ Value (K) is a current direct current quantity at the current moment obtained by calculation, Filter _ Value (K-1) is a reference Value at the previous moment, K3 and K4 are weighting coefficients, and AD _ Value (K) is a sampling Value at the current moment; wherein K3 and K4 are empirical values and can be determined according to actual conditions.
And S15, performing closed-loop speed regulation control according to the running speed and the running position.
In actual control, the speed control is performed by adopting incremental PI regulation, and a control block diagram refers to a specific embodiment shown in FIG. 5. In the closed-loop control process, the target speed V0 of the motor can be determined according to the operation position of a vehicle body closing part, closed-loop speed regulation control is carried out according to the difference value between the target speed V0 and the current operation speed V, namely the difference value of the motor operation actual speed V calculated by the motor operation target speed V0 and the ripple speed calculating module through ripple signals is input into the PI adjusting module, a duty ratio signal is obtained and used for PWM (Pulse width modulation), a MOS FET full-bridge driving circuit is adopted to form the PWM control module, the motor rotation is controlled according to the duty ratio output high and low levels of the corresponding proportion, and the closed-loop speed regulation control of the motor movement is realized.
And S16, performing anti-pinch detection control according to the running position and the direct current quantity.
Specifically, an anti-pinch threshold value and a reference current value corresponding to the operation position are firstly determined; and then, calculating a current difference value between the direct current quantity and the reference current value, and controlling the motor to rotate reversely when the current difference value exceeds the anti-pinch threshold value.
When the current is increased when the vehicle window is judged to meet an obstacle in the closing process according to the running position, the difference value between the reference current and the actual current (the current direct current quantity) is compared, namely the direct current quantity Filter _ value (k) at the current moment is obtained, the Filter _ value (k) is compared with a preset reference current value, and when the difference value exceeds a set anti-pinch threshold value, the motor is controlled to rotate reversely.
The current running position of the vehicle body closing part is relatively fixed with the set anti-pinch threshold value, so that the running position is reset to a default value when the vehicle body closing part is completely closed or completely opened according to the obtained running position information; namely, the upper dead center of the vehicle door and window is set to 0 point, the position is increased when the window is lowered, and the position is decreased when the window is raised. Considering the offset problem of ripple counting, the point is reset to be 0 point when the door and window is plugged every time, and the position is the maximum position when the door and window is plugged.
The method realizes closed-loop speed regulation and anti-pinch detection control only by collecting the actual operation parameters of the motor and analyzing and calculating, reduces the hardware investment, ensures the reliability of control, is beneficial to reducing the production cost and is suitable for popularization compared with the prior art.
On the other hand, the invention also provides a system for controlling the vehicle body closing part based on the direct current motor ripple, and the method can be implemented.
Specifically, as shown in fig. 6, the system provided by the present invention includes: a motor, a sampling circuit, a controller (i.e., "MCU" identified in fig. 6), and a driving circuit (i.e., "PWM motor driving module" identified in fig. 6); the motor driving end is connected with the input end of the controller through the sampling circuit; the output end of the controller is connected with the drive end of the motor through a drive circuit; wherein the controller includes:
the sampling module (namely an AD acquisition module marked in figure 6) is used for acquiring a current signal generated by a motor of the vehicle body closing part in the moving process through the sampling circuit; calculating the number of current ripples generated by the motor in the movement process and the period of each current ripple according to the current signals;
the speed calculation module is used for calculating the running speed of the motor at the current moment according to the number of the current ripples calculated by the sampling module and the period of each current ripple;
the position extraction module is used for calculating the running position of the motor according to the number of the current ripples calculated by the sampling module;
the low-pass filtering module is used for filtering the current signal to obtain the current direct-current quantity of the motor at the current moment;
the closed-loop control module is used for acquiring the running speed and running position information, calculating and processing the running speed and the running position information, and outputting a closed-loop speed regulation control signal to the driving circuit;
and the anti-pinch detection module is used for acquiring the running position information and the direct current quantity of the current, calculating and processing the running position information and the direct current quantity of the current, and outputting an anti-pinch control signal to the driving circuit.
The system of the present invention can realize the control of the motion of a plurality of (N) motors, as shown in fig. 2, each motor only needs to connect two driving wires with the input end of the controller 20, and the two driving wires are used as the input of the controller 20 to input the motor current to the controller 20; or as an input of the motor, the PWM modulated voltage signal output by the controller 20 is input to the motor. The controller 20 can be placed at any position in the carriage without being limited by distance, and the system block diagram is shown as 6.
Specifically, one of the paths of control is taken as an example for illustration. In a specific embodiment of the present invention, as shown in fig. 6, the collecting circuit includes a sampling resistor and an amplifier, the sampling resistor of the collecting circuit converts an alternating current signal obtained by superimposing a current ripple and a direct current generated during a motor movement process into a voltage signal, the voltage signal is amplified by the amplifier to obtain a collected current signal, and the collected current signal is transmitted to the MCU for calculation and analysis, thereby facilitating subsequent processes such as closed-loop speed regulation and anti-pinch control.
The AD acquisition module calculates the number of current ripples generated by the motor in the motion process and the period of each current ripple according to the current signals. The alternating current signal acquired by the sampling circuit is converted and amplified by the amplifier to obtain a current signal, and the current signal is used for calculating the number of current ripples generated by the motor in the motion process and the period of each current ripple in the subsequent process by using the current signal.
In a possible embodiment, the AD acquisition module may include a conversion sub-module, and the conversion sub-module is configured to convert the current signal into a square wave signal by using a current reference line.
In practical application, because the current signal obtained through the AD conversion is superimposed with the dc amount and the ac amount, the peak-to-valley value of the current fluctuates with the dc amount when the motor is started, locked or subjected to resistance change. For this purpose, in one embodiment, the current reference line may be set as an adaptive reference line, and specifically, the current reference line may be set as a reference line that varies with the magnitude of the dc current. In practical implementation, a first-order lag filtering is adopted to obtain an adaptive reference line, and the formula is as follows:
Ref_Value(k)=K1*Ref_Value(k-1)+K2*AD_Value(k)
ref _ Value (k) is a calculated reference Value at the current moment, Ref _ Value (k-1) is a reference Value at the previous moment, and AD _ Value (k) is a sampling Value at the current moment; k1 and K2 are weighting coefficients and are obtained by calibration according to the actual ripple fluctuation condition.
Referring to fig. 4, it can be seen from the characteristics of the ripple signal that peaks and valleys alternate. After the current reference line is established, the ripple signal can be converted into the square wave signal according to the amplitude of the ripple signal and the size of the current reference line, specifically, if the ripple amplitude is greater than the current reference line, the ripple amplitude is set to be a high Level, if the ripple amplitude is less than the current reference line, the ripple amplitude is set to be a low Level, and if Pin _ Level is set to represent the Level of the square wave signal extracted from the current signal, the current reference line has the following steps:
AD_Value(k)>Ref_Value(k),Pin_Level=1
AD_Value(k)≤Ref_Value(k),Pin_Level=0
AD _ value (k) is a sampling value at the current time, and Ref _ value (k) is a reference line at the current time. Thus, the ripple signal close to sine is converted into a square wave signal with the same period through Pin _ Level.
In addition, as described above, the minimum task period of the MCU is ms-order limited by the MCU master frequency, and μ s-order sampling cannot be achieved. That is, limited by the controller's computing power and the load factor of other applications, if sampling is performed while converting a square wave signal, the actual sampling frequency will not meet the sampling frequency requirement. Therefore, in practical application, MCU interruption is needed to perform current sampling, namely a timer interruption is set, the clock jumps to enter one interruption every time when the timer reaches a preset time Ts, an interruption service program is executed, sampling is performed in the interruption service program, and an AD value obtained by sampling is stored in a data buffer area. And the subsequent millisecond-level batch processing ripple extraction program reads the Buffer value regularly, performs batch processing and converts the ripple signal into a square wave signal. And meanwhile, the period calculation submodule can read the sampling times Q between adjacent falling edges of the square wave signals.
Referring to fig. 3(a), in the process of collecting the ripple signal of the dc motor, the AD collection module sets a timer interrupt with a period of a preset duration Ts, jumps to enter an interrupt once when the clock reaches the preset duration Ts every time, executes an interrupt service routine to sample the current signal to obtain a sampling value, and stores the sampling value and the sampling frequency in a data Buffer (Buffer). In fig. 3(b), the millisecond batch ripple extraction program periodically reads the Buffer value and the n value stored in the data Buffer, performs batch processing on the read data by using the adaptive reference line, converts the ripple signal into a square wave signal, and then clears the Buffer value, and n returns to zero.
The AD acquisition module can also comprise a ripple wave statistics submodule, and the ripple wave statistics submodule is used for taking the counted number of the falling edges of the square wave signals as the number of current ripples generated by the motor in the motion process. The number of the falling edges of the square wave signals is the number of current ripples generated by the motor in the motion process; calculating the time between adjacent falling edges of the square waves to obtain the ripple period Twave
The AD acquisition module can also comprise a period calculation submodule, and the period calculation submodule is used for taking the calculated time between adjacent falling edges of the square wave signals as the period of each current ripple wave.
As shown in FIG. 4, the time between adjacent falling edges of the square wave signal is the period T of each current ripplewave
Then the number of samples Q between adjacent falling edges of the square wave signal is read, then:
Twave=Q*Ts
in the process of converting the ripple signal into the square wave signal, the millisecond-level batch ripple extraction procedure is shown in fig. 3 (b). And (3) adopting a microsecond interrupt service program to carry out AD acquisition, and storing the acquired current signal into buffer (n). Reading the current Buffer value and the n value at S321, performing a batch processing ripple extraction program through a main task function in an inquiry mode at S322, and converting ripple signals into square wave signals to obtain position information and ripple pulse width Twave(i.e., ripple period). Wherein the query is batch processedThe period is in milliseconds.
And the speed calculation module is used for calculating the running speed of the motor at the current moment according to the number of the current ripples calculated by the AD acquisition module and the period of each current ripple. In one embodiment, the motor operating speed is calculated by the formula:
ω=(2π/M)/Twave
wherein, omega is the rotating speed of the motor, M is the number of ripple signals generated by one rotation of the motor, and TwaveAs a single ripple signal period.
As mentioned in the method of the present invention, the motor generates ripple signals due to the change of the contact resistance between the brush and the commutator during the commutation process, and the ripple number generated by one cycle of the motor is related to the number of the commutator segments.
In order to eliminate the influence of commutator installation errors and ripple wave period calculation errors, the invention further carries out error elimination calculation, improves the calculation accuracy and ensures the accuracy and reliability of closed-loop control.
Here, the operating speed is calculated after adding every M ripple cycles, and the ripple cycles are subjected to sliding addition, and in addition, considering that when the motor is just started, the total number of ripples generated by one rotation of the actual motor is smaller than the number M of ripple signals generated by one rotation of the motor during stable motion after the motor is started, the manner of calculating the operating speed of the motor in the embodiment is as follows:
when k is less than or equal to M,
ω(k)=(2πk/M)/Tsum(k)
Tsum(k)=T1+,…,+Tk
when k > M, the number of the first and second groups,
ω(k)=2π/Tsum(k)
Tsum(k)=Tk-M+1+Tk-M+2,…,+Tk=Tsum(k-1)–Tk-M+Tk
wherein k is the number of current ripples at the current moment, and M is the number of current ripples generated by one rotation of the motor; omega (k) is the running speed of the motor at the current moment, TiRepresents the ith ripple period; 1,. k; when k is less than or equal to M, Tsum (k) isAccumulated k ripple periods; when k is>Tsum (k) is the accumulated M ripple periods. In actual calculation, the formula "Tsum (k) ═ Tsum (k-1) -T" is usedk-M+Tk", to reduce the computational effort.
And when the position extraction module calculates the operation position, calculating the operation position according to the calculated number of the current ripples. Specifically, the number of falling edges of the square wave is calculated through the obtained square wave signals, and then the running position information of the motor can be obtained.
The low-pass filtering module carries out filtering processing on the current signal to obtain the current direct-current quantity of the motor at the current moment. In this embodiment, a first-order lag filtering is used to extract a dc current from an ac current signal, and the formula is as follows:
Filter_Value(k)=K3*Filter_Value(k-1)+K4*AD_Value(k)
wherein, Filter _ Value (K) is the calculated current direct current quantity at the current moment, Filter _ Value (K-1) is the reference Value at the previous moment, K3 and K4 are weighting coefficients, and AD _ Value (K) is the sampling Value at the current moment; k3 and K4 are empirical values and can be determined according to actual conditions.
And the closed-loop control module performs closed-loop speed regulation control according to the running speed and the running position. The closed-loop control module obtains the running speed and running position information, calculates and processes the information, and performs speed control by using incremental PI regulation when outputting a closed-loop speed regulation control signal to the driving circuit, and the control block diagram refers to a specific embodiment shown in fig. 5. The closed-loop control module inputs the difference value of the motor operation target speed V0 and the actual motor operation speed V calculated by the ripple speed calculation module through the ripple signal into the PI regulation module to obtain a duty ratio signal for PWM control, the MOS FET full-bridge driving circuit is adopted to form the PWM control module, and the high and low levels of the corresponding proportion are output according to the duty ratio D to control the motor to rotate so as to realize the closed-loop speed regulation control of the motor motion.
The anti-pinch detection module performs anti-pinch detection control according to the operation position and the direct current quantity of current. Specifically, the anti-pinch detection module firstly determines an anti-pinch threshold value and a reference current value corresponding to the operation position; and then, calculating a current difference value between the direct current quantity and the reference current value, and outputting a reverse rotation command to control the motor to reversely rotate when the current difference value exceeds the anti-pinch threshold value.
When the current is increased when the vehicle window is judged to meet an obstacle in the closing process according to the running position, the difference value between the reference current and the actual current (the current direct current quantity) is compared, namely the direct current quantity Filter _ value (k) at the current moment is obtained, the Filter _ value (k) is compared with a preset reference current value, and when the difference value exceeds a set anti-pinch threshold value, the motor is controlled to rotate reversely.
The current running position of the vehicle body closing part is relatively fixed with the set anti-pinch threshold value, so that the anti-pinch detection module acquires running position information, and resets the running position to a default value when the vehicle body closing part is completely closed or completely opened; namely, the upper dead center of the vehicle door and window is set to 0 point, the position is increased when the window is lowered, and the position is decreased when the window is raised. Considering the offset problem of ripple counting, the point is reset to be 0 point when the door and window is plugged every time, and the position is the maximum position when the door and window is plugged.
The system provided by the invention realizes closed-loop speed regulation and anti-pinch detection control only by collecting the actual operation parameters of the motor to carry out analysis and calculation, reduces the hardware investment, ensures the control reliability, is beneficial to reducing the production cost and is suitable for popularization.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. A method for controlling a vehicle body closing part based on direct current motor ripples is characterized by being applied to a controller and comprising the following steps of:
collecting current signals generated by a motor of the vehicle body closing part in the motion process;
calculating the number of current ripples generated by the motor in the motion process and the period of each current ripple according to the current signals;
calculating to obtain the running position and the running speed of the motor at the current moment according to the calculated number of the current ripples and the period of each current ripple;
filtering the current signal to obtain the current direct current quantity of the motor at the current moment;
performing closed-loop speed regulation control according to the running speed and the running position, wherein a target speed of the motor is determined according to the running position, and the closed-loop speed regulation control is performed according to a difference value between the target speed and the current running speed;
anti-pinch detection control is carried out according to the running position and the direct current quantity of the current,
determining an anti-pinch threshold value and a reference current value corresponding to the running position; calculating a current difference value between the direct current quantity and the reference current value, controlling the motor to rotate reversely when the current difference value exceeds the anti-pinch threshold value,
wherein, according to the number of the current ripple and the cycle of each current ripple calculated, the operation position and the operation speed of the motor at the current moment are calculated, including:
calculating the operation position according to the calculated number of the current ripples;
the mode of calculating the running speed is as follows:
when k is less than or equal to M,
ω(k)=(2πk/M)/Tsum(k)
Tsum(k)=T1+,…,+Tk
when k > M, the number of the first and second groups,
ω(k)=2π/Tsum(k)
Tsum(k)=Tk-M+1+Tk-M+2,…,+Tk=Tsum(k-1)–Tk-M+Tk
wherein k is the number of current ripples at the current moment, and M is the number of current ripples generated by one rotation of the motor; ω (k) is the running speed of the motor at the current moment, TiRepresents the ith ripple period; 1, k; when k is less than or equal to M, Tsum (k) is accumulated k ripple periods; when k is>Tsum (k) is the accumulated M ripple periods.
2. The method for controlling the vehicle body closing part based on the direct current motor ripple according to claim 1, wherein calculating the number of current ripples generated by the motor in the moving process and the period of each current ripple according to the current signal comprises:
converting the current signal into a square wave signal by using a current reference line;
taking the counted number of falling edges of the square wave signal as the number of current ripples generated by the motor in the motion process;
taking the calculated time between adjacent falling edges of the square wave signals as the period of each current ripple wave;
wherein the current reference line is an adaptive reference line.
3. The method for controlling a vehicle body closing part based on direct current motor ripple of claim 2, wherein converting the current signal to a square wave signal using a current reference line comprises:
setting a timing interruption with a period of preset time Ts, skipping to enter the interruption once when the clock reaches the preset time Ts, executing an interruption service program to sample the current signal to obtain a sampling value, and storing the sampling value and the sampling times in a data buffer area, wherein the preset time Ts satisfies the Shannon sampling theorem;
the millisecond-level batch processing ripple extraction program reads data in the data buffer area regularly, carries out batch processing on the read data by utilizing the self-adaptive reference line and converts a ripple signal into a square wave signal;
correspondingly, taking the calculated time between adjacent falling edges of the square wave signal as the period of each current ripple comprises the following steps:
reading the sampling times Q between adjacent falling edges of the square wave signals;
using the formula TwaveThe time between adjacent falling edges of the square wave signal is calculated as Q Ts.
4. The method for controlling the vehicle body closing part based on the direct current motor ripple according to claim 2, wherein the adaptive reference line is obtained by using first-order lag filtering, and the calculation formula is as follows:
Ref_Value(k)=K1*Ref_Value(k-1)+K2*AD_Value(k),
ref _ Value (k) is a calculated reference Value at the current moment, Ref _ Value (k-1) is a reference Value at the previous moment, and AD _ Value (k) is a sampling Value at the current moment; k1 and K2 are weighting coefficients;
then, let Pin _ Level represent the Level of the square wave signal obtained by converting the current signal, and there are:
AD_Value(k)>Ref_Value(k),Pin_Level=1,
AD_Value(k)≤Ref_Value(k),Pin_Level=0。
5. the method for controlling the vehicle body closing part based on the direct current motor ripple as claimed in any one of claims 1 to 4, further comprising:
resetting the operating position to a default value when the body closure member is fully closed or fully open.
6. A system for controlling a vehicle body closed part based on direct current motor ripples is characterized by comprising a motor, a sampling circuit, a controller and a driving circuit; the motor is connected with the input end of the controller through the sampling circuit; the output end of the controller is connected with the motor through the driving circuit; wherein the controller includes:
the sampling module is used for acquiring a current signal generated by the motor in the motion process through the sampling circuit; calculating the number of current ripples generated by the motor in the movement process and the period of each current ripple according to the current signals;
the speed calculation module is used for calculating the running speed of the motor at the current moment according to the number of the current ripples calculated by the sampling module and the period of each current ripple;
the position extraction module is used for calculating the running position of the motor at the current moment according to the number of the current ripples calculated by the sampling module;
the low-pass filtering module is used for filtering the current signal to obtain the current direct-current quantity of the motor at the current moment;
the closed-loop control module is used for acquiring the running speed and the running position, calculating and processing the running speed and the running position, and outputting a closed-loop speed regulation control signal to the driving circuit, wherein the target speed of the motor is determined according to the running position, and the closed-loop speed regulation control signal is output according to the difference value between the target speed and the current running speed;
the anti-pinch detection module is used for acquiring the running position and the direct current quantity of the current, calculating and processing the running position and the direct current quantity of the current, outputting an anti-pinch control signal to the drive circuit,
determining an anti-pinch threshold value and a reference current value corresponding to the running position; calculating a current difference value between the direct current quantity and the reference current value, controlling the motor to rotate reversely when the current difference value exceeds the anti-pinch threshold value,
the mode of calculating the running speed by the speed calculation module is as follows:
when k is less than or equal to M,
ω(k)=(2πk/M)/Tsum(k)
Tsum(k)=T1+,…,+Tk
when k > M, the number of the first and second groups,
ω(k)=2π/Tsum(k)
Tsum(k)=Tk-M+1+Tk-M+2,…,+Tk=Tsum(k-1)–Tk-M+Tk
wherein k is the number of current ripples at the current moment, and M is the number of current ripples generated by one rotation of the motor; omega (k) is the running speed of the motor at the current moment, TiRepresents the ith ripple cycle; 1,. k; when k is less than or equal to M, Tsum (k) is accumulated k ripple periods; when k is>At M, tsum (k) is the accumulated M ripple periods.
7. The system for controlling vehicle body closing components based on direct current motor ripples according to claim 6, characterized in that, the sampling module includes:
the conversion submodule is used for converting the current signal into a square wave signal by using a current reference line;
the ripple counting submodule is used for taking the counted number of the falling edges of the square wave signals as the number of current ripples generated by the motor in the motion process;
the period calculation submodule is used for taking the calculated time between adjacent falling edges of the square wave signals as the period of each current ripple wave;
wherein the current reference line is an adaptive reference line.
8. The system for controlling vehicle body closing parts based on direct current motor ripples according to claim 7, characterized in that,
the conversion submodule converts the current signal into a square wave signal by using a current reference line, and comprises:
setting a timing interruption with a period of preset time Ts, skipping to enter the interruption once when the clock reaches the preset time Ts, executing an interruption service program to sample the current signal to obtain a sampling value, and storing the sampling value and the sampling times in a data buffer area, wherein the preset time Ts satisfies the Shannon sampling theorem;
the millisecond-level batch processing ripple extraction program reads data in the data buffer area regularly, carries out batch processing on the read data by utilizing the self-adaptive reference line and converts a ripple signal into a square wave signal;
correspondingly, the period calculation sub-module takes the calculated time between adjacent falling edges of the square wave signal as the period of each current ripple, and comprises:
reading the sampling times Q between adjacent falling edges of the square wave signals;
using the formula TwaveThe time between adjacent falling edges of the square wave signal is calculated as Q Ts.
CN201911272976.3A 2019-12-12 2019-12-12 Method and system for controlling vehicle body closed part based on direct current motor ripple Active CN111098808B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911272976.3A CN111098808B (en) 2019-12-12 2019-12-12 Method and system for controlling vehicle body closed part based on direct current motor ripple

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911272976.3A CN111098808B (en) 2019-12-12 2019-12-12 Method and system for controlling vehicle body closed part based on direct current motor ripple

Publications (2)

Publication Number Publication Date
CN111098808A CN111098808A (en) 2020-05-05
CN111098808B true CN111098808B (en) 2022-06-07

Family

ID=70421734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911272976.3A Active CN111098808B (en) 2019-12-12 2019-12-12 Method and system for controlling vehicle body closed part based on direct current motor ripple

Country Status (1)

Country Link
CN (1) CN111098808B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
NL2019723B1 (en) * 2017-10-13 2019-04-23 Mci Mirror Controls Int Netherlands B V Method and device for providing information on an annular displacement of a DC electromotor
CN113281650B (en) * 2021-05-31 2023-04-14 东风汽车有限公司东风日产乘用车公司 Motor ripple signal sampling method and device
CN115538879B (en) * 2021-06-29 2024-06-18 比亚迪股份有限公司 Motor rotation speed value determining method, car window ripple clamping prevention method, car and medium
CN114301334A (en) * 2021-12-29 2022-04-08 北京经纬恒润科技股份有限公司 Motor speed regulation control method and device
CN114809854A (en) * 2022-04-20 2022-07-29 重庆长安汽车股份有限公司 Anti-pinch control method for car window and car window control system with anti-pinch function

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201202350Y (en) * 2008-05-26 2009-03-04 上海电控研究所 Automobile electric vehicle window control device
CN201517333U (en) * 2009-09-22 2010-06-30 李昌刚 Automobile window anti-nip controller based on ripple current detection
CN102635288A (en) * 2012-01-06 2012-08-15 陈雅莹 Ripple wave anti-clamping controller of car window and control method
CN107063712A (en) * 2017-04-21 2017-08-18 上海实业交通电器有限公司 A kind of car door window glass lifting device Performance Evaluation equipment and its operating method
JP2017175899A (en) * 2016-03-16 2017-09-28 アスモ株式会社 Opening/closing body drive motor and opening/closing body drive system
WO2017200914A1 (en) * 2016-05-16 2017-11-23 Schlage Lock Company Llc Door closer communication
CN108132396A (en) * 2017-12-11 2018-06-08 北京经纬恒润科技有限公司 A kind of determining method and device of movement position
CN108412363A (en) * 2018-01-31 2018-08-17 东方久乐汽车电子(上海)股份有限公司 A kind of vehicle window speed regulating method and its vehicle window alignment circuit based on current of electric ripple
CN108457552A (en) * 2017-02-20 2018-08-28 联合汽车电子有限公司 A kind of window locations detection device and detection method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4021703A (en) * 1975-06-02 1977-05-03 Westinghouse Electric Corporation Phase imbalance detection circuit
JP2004064802A (en) * 2002-07-24 2004-02-26 Renesas Technology Corp Pwm motor drive
US7668690B2 (en) * 2008-04-08 2010-02-23 Delphi Technologies, Inc. System and method for determining position or speed of a commutated DC motor with error correction
BRPI1009492A8 (en) * 2009-03-16 2016-10-11 Brose Fahrzeugteile correction of counting errors in the evaluation of current ripples in a direct current motor

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201202350Y (en) * 2008-05-26 2009-03-04 上海电控研究所 Automobile electric vehicle window control device
CN201517333U (en) * 2009-09-22 2010-06-30 李昌刚 Automobile window anti-nip controller based on ripple current detection
CN102635288A (en) * 2012-01-06 2012-08-15 陈雅莹 Ripple wave anti-clamping controller of car window and control method
JP2017175899A (en) * 2016-03-16 2017-09-28 アスモ株式会社 Opening/closing body drive motor and opening/closing body drive system
WO2017200914A1 (en) * 2016-05-16 2017-11-23 Schlage Lock Company Llc Door closer communication
CN108457552A (en) * 2017-02-20 2018-08-28 联合汽车电子有限公司 A kind of window locations detection device and detection method
CN107063712A (en) * 2017-04-21 2017-08-18 上海实业交通电器有限公司 A kind of car door window glass lifting device Performance Evaluation equipment and its operating method
CN108132396A (en) * 2017-12-11 2018-06-08 北京经纬恒润科技有限公司 A kind of determining method and device of movement position
CN108412363A (en) * 2018-01-31 2018-08-17 东方久乐汽车电子(上海)股份有限公司 A kind of vehicle window speed regulating method and its vehicle window alignment circuit based on current of electric ripple

Also Published As

Publication number Publication date
CN111098808A (en) 2020-05-05

Similar Documents

Publication Publication Date Title
CN111098808B (en) Method and system for controlling vehicle body closed part based on direct current motor ripple
US7038421B2 (en) Method and system for multiple servo motor control
CN108132396B (en) Method and device for determining motion position
US7668690B2 (en) System and method for determining position or speed of a commutated DC motor with error correction
US8513909B2 (en) Processing a motor variable of a DC motor and actuating device for a motor vehicle
CN102150355B (en) Method and device for processing a motor signal of a DC motor, having current ripples
EP2036197B1 (en) Sensorless technology, estimation of sampled back emf voltage values and/or the sampled inductance values based on the pulse width modulation periods
CN101047343A (en) Power inverter system
CN108631678B (en) Vector control dead zone compensation method and system for permanent magnet synchronous motor
US11655661B2 (en) Anti-pinch method for an apparatus for automatic movement of sliding windows in a motor vehicle, in particular a power-window apparatus, and corresponding device
CN108457552B (en) Vehicle window position detection device and detection method
CN104553911B (en) Automobile can remember the detection method of ripple of DC Moto of automatic seat
CN102957369A (en) Brushless DC (Direct Current) motor speed regulation device on basis of DSP (Digital Signal Processor)
CN109061271B (en) Motor current sampling method, motor control method and device
CN111293934A (en) Fluctuation counting filtering and peak value detecting method and system
US10608569B2 (en) Control device of AC rotating electrical machine
US8461786B2 (en) Method and device for determining the position of a mobile closing part of a vehicle
JPH10191678A (en) Digital servo control device
CN105178771A (en) Automotive Electrically-actuated Device End-of-travel Detection
CN115360940A (en) BLDC driving system and method based on MM32SPIN360C
CN115395835A (en) Brushless direct current motor commutation accurate detection method
CN1120564C (en) Dead area compensation method for PWM-type frequency-conversion power supply
US9455656B2 (en) Motor controllers
CN113411013B (en) Brushless direct current motor control system and method for back electromotive force function integral prediction
CN114432722B (en) Control method and system of rotary evaporator

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 4 / F, building 1, No.14 Jiuxianqiao Road, Chaoyang District, Beijing 100020

Applicant after: Beijing Jingwei Hirain Technologies Co.,Inc.

Address before: 100101 Beijing city Chaoyang District Anxiang Beili 11 B block 8 layer

Applicant before: Beijing Jingwei HiRain Technologies Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant