CN108061511B - A kind of calculation method and device of position - Google Patents

A kind of calculation method and device of position Download PDF

Info

Publication number
CN108061511B
CN108061511B CN201711306613.8A CN201711306613A CN108061511B CN 108061511 B CN108061511 B CN 108061511B CN 201711306613 A CN201711306613 A CN 201711306613A CN 108061511 B CN108061511 B CN 108061511B
Authority
CN
China
Prior art keywords
value
motor
data
group
forward setting
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
CN201711306613.8A
Other languages
Chinese (zh)
Other versions
CN108061511A (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 CN201711306613.8A priority Critical patent/CN108061511B/en
Publication of CN108061511A publication Critical patent/CN108061511A/en
Application granted granted Critical
Publication of CN108061511B publication Critical patent/CN108061511B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B7/00Measuring arrangements characterised by the use of electric or magnetic techniques
    • G01B7/02Measuring arrangements characterised by the use of electric or magnetic techniques for measuring length, width or thickness

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Control Of Position Or Direction (AREA)

Abstract

The present invention provides a kind of calculation method of position and devices, in the present invention when determining component forward setting distance value, the data used are the current value and tachometer value of motor, since the current value and tachometer value are able to reflect the motion state of motor, and then can correctly determine the running position of motor, to obtain accurate component forward setting distance value.The present invention compared with the prior art in the mode of component forward setting distance value is determined using the voltage value on the pcb board for the motion state that cannot really reflect motor, determination component forward setting distance value that can be more accurate.And then the present invention can cut the movement position of stopping time component according to component forward setting distance value and relay after component forward setting distance value has been determined, obtain component it is final stop accurately position.

Description

A kind of calculation method and device of position
Technical field
The present invention relates to body of a motor car control fields, more specifically, being related to the calculation method and device of a kind of position.
Background technique
Current passenger car most of on the market has used electronic skylight and door and window, to improve the comfortable of vehicle operating Property, the electronic opening and closing of the components such as its close mechanism realization door and window are driven by direct current generator.It is closed for such motor System, relevant laws and regulations propose design constraint, i.e., the mistake being closed by motor operation closing feature in terms of protecting personal safety Cheng Zhong, (4mm-200mm) is if the body for encountering object or person hinders and anti-grip force is greater than 100N in the range of rules and regulations When, motor allows for detecting and inverting operation, is also referred to as pinch resistant functionality.Therefore need to be accurately judged to the portions such as door and window The position of part movement.
Such as by taking door and window as an example, in motor proper motion, using the available executing agency's movement position of motor ripple, but It is irregular that relay cuts the ripple after stopping, and can not correctly reflect mechanism kinematic position, so cannot accurately determine door and window preshoot away from From.
Relay is cut stop after, the voltage value and electricity where calculating door/window controller on printing board PCB plate can be passed through Flow valuve, and then from preset voltage value, the corresponding relationship of current value and door and window forward setting distance, obtain the voltage value being calculated and The corresponding door and window forward setting distance of current value, and then can determine the final position of door and window.
Since the voltage value being calculated is the voltage value where door/window controller on pcb board, pcb board end uses long conducting wire It is connected to motor, the voltage value on pcb board can not really reflect the voltage value of motor, so that the door and window preshoot determined Distance inaccuracy causes the position of the door and window finally determined also can inaccuracy.
Summary of the invention
In view of this, the present invention provides the calculation method and device of a kind of position, to solve in the prior art using closure The problem for the closing feature forward setting distance inaccuracy that voltage value and current value where Parts Controller on pcb board determine.
In order to solve the above technical problems, present invention employs following technical solutions:
A kind of calculation method of position, comprising:
Calculate the current value and tachometer value when motor runs well;
It is corresponding with component forward setting distance from electric current, motor speed when detecting motor order from effectively becoming invalid In relationship, component forward setting distance value corresponding with the current value, the tachometer value is obtained.
Preferably, the generating process of the corresponding relationship of the electric current, motor speed and component forward setting distance includes:
Determine at least one motor current value and at least one motor speed value;
At least one described motor current value and at least one described motor speed value are formed into a numerical value group;
At least one set of data are chosen from the numerical value group;It wherein, include a motor in data described in every group of selection Current value and a motor speed value;
One group of data is chosen as target data from least one set of data;
The present current value of control motor is the motor current value in the target data and controls working as the motor Preceding tachometer value is the motor speed value in the target data;
Determine the corresponding initial part forward setting distance value of the target data;
The motor movement is controlled so that closing feature moves pre-determined distance;
Stopped according to the ideal after the actual stop position of closing feature and the mobile pre-determined distance of the closing feature Stop bit is set, and is modified to the initial part forward setting distance value, and component forward setting distance corresponding with the target data is obtained;
It returns and chooses the step for one group of data is as target data from least one set of data, until obtaining from institute State the corresponding component forward setting distance of every group of data chosen at least one set of data;
According to the every group of data and its corresponding component forward setting distance chosen from the numerical value group, using linear difference Algorithm determines the corresponding component forward setting distance of every group of data in the numerical value group in addition to every group of data of selection;
According to every group of data in the numerical value group and the corresponding component forward setting distance of every group of data, generate the electric current, The corresponding relationship of motor speed and component forward setting distance.
Preferably, current value when motor runs well is calculated, comprising:
Obtain voltage signal;Wherein, the voltage signal is motor current signal after sampling resistor and amplifier Signal;
Average value filtering is carried out to the voltage signal, obtains d. c. voltage signal;
According to the voltage value in the d. c. voltage signal, the current value is obtained.
Preferably, tachometer value when motor runs well is calculated, comprising:
According to the voltage signal, the current signal of the motor is determined;
Determine that motor rotates a circle the required time in the current signal;
According to the time, the tachometer value is calculated.
Preferably, determine that motor rotates a circle the required time in the current signal, comprising:
The current signal is subjected to signal conversion, obtains square-wave signal;
Motor is obtained to rotate a circle the quantitative value of corresponding square wave;
The time needed for determining the square wave for generating the quantitative value.
A kind of computing device of position, comprising:
Computing module, for calculating current value and tachometer value when motor runs well;
Module is obtained, for when detecting motor order from effectively becoming invalid, before electric current, motor speed and component It rushes in the corresponding relationship of distance, obtains component forward setting distance value corresponding with the current value, the tachometer value.
Preferably, further includes:
First determining module, for determining at least one motor current value and at least one motor speed value;
Data combination module, for forming at least one described motor current value and at least one described motor speed value One numerical value group;
First chooses module, for choosing at least one set of data from the numerical value group;Wherein, number described in every group of selection It include a motor current value and a motor speed value in;
Second chooses module, for choosing one group of data as target data from least one set of data;
First control module, for control motor present current value be the target data in motor current value and The current rotating speed value of the motor is controlled as the motor speed value in the target data;
Second determining module, for determining the corresponding initial part forward setting distance value of the target data;
Second control module, for controlling the motor movement so that closing feature moves pre-determined distance;
Correction module, for according to the actual stop position of closing feature and the closing feature it is mobile it is described it is default away from Ideal stop position from after is modified the initial part forward setting distance value, obtains corresponding with the target data Component forward setting distance;
Judgment module obtains the corresponding component of every group of data chosen from least one set of data for judging whether Forward setting distance;
Described second chooses module, is also used to judge not obtain from least one set of data when the judgment module When the corresponding component forward setting distance of every group of data chosen, one group of data is chosen as number of targets from least one set of data According to;
Third determining module, for according to every group of data being chosen from the numerical value group and its corresponding component preshoot away from From determining the corresponding portion of every group of data in the numerical value group in addition to every group of data of selection using the algorithm of linear difference Part forward setting distance;
Generation module is used for according to every group of data in the numerical value group and the corresponding component forward setting distance of every group of data, Generate the corresponding relationship of the electric current, motor speed and component forward setting distance.
Preferably, the computing module includes:
Acquisition submodule, for obtaining voltage signal;Wherein, the voltage signal is motor current signal through over-sampling electricity Signal after resistance and amplifier;
Submodule is filtered, for carrying out average value filtering to the voltage signal, obtains d. c. voltage signal;
First computational submodule, for obtaining the current value according to the voltage value in the d. c. voltage signal.
Preferably, the computing module includes:
First determines submodule, for determining the current signal of the motor according to the voltage signal;
Second determines submodule, and for determining, motor rotates a circle the required time in the current signal;
Second computational submodule, for the tachometer value to be calculated according to the time.
Preferably, described second determine that submodule includes:
Converting unit obtains square-wave signal for the current signal to be carried out signal conversion;
Acquiring unit rotates a circle the quantitative value of corresponding square wave for obtaining motor;
Determination unit, for the time needed for determining the square wave for generating the quantitative value.
Compared to the prior art, the invention has the following advantages:
The present invention provides a kind of calculation method of position and device, in the present invention when determining component forward setting distance value, The data used are the current value and tachometer value of motor, since the current value and tachometer value are able to reflect the motion state of motor, And then can correctly determine the running position of motor, to obtain accurate component forward setting distance value.The present invention is compared to existing Have and determines component forward setting distance value in technology using the voltage value on the pcb board for the motion state that cannot really reflect motor Mode, determination component forward setting distance value that can be more accurate.And then the present invention can determined component forward setting distance value with Afterwards, the movement position that stopping time component is cut according to component forward setting distance value and relay, obtains that component is final to be stopped accurately Position.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of structural schematic diagram of door and window kinetic model provided in an embodiment of the present invention;
Fig. 2 is that a kind of relay provided in an embodiment of the present invention is cut and stops rear door and window preshoot characteristic research curve graph;
Fig. 3 is a kind of method flow diagram of the calculation method of position provided in an embodiment of the present invention;
Fig. 4 is the method flow diagram of the calculation method of another position provided in an embodiment of the present invention;
Fig. 5 is the waveform diagram that ripple signal provided in an embodiment of the present invention is converted into square-wave signal;
Fig. 6 is the method flow diagram of the calculation method of another position provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of the computing device of position provided in an embodiment of the present invention;
Fig. 8 is the structural schematic diagram of the computing device of another position provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention provides a kind of calculation methods of position, wherein position is the movement position of closing feature, is closed Closing component can be the vehicle bodies closing feature such as automobile door and window, skylight, side sliding door, back door.Now it is introduced by taking door and window as an example.Tool Body is as follows:
In the present invention when determining component forward setting distance value, the data that use are the current value and tachometer value of motor, can The reason of component forward setting distance value determined using the current value of motor and tachometer value, is as follows:
The corresponding kinetics equation of door and window kinetic model when motor stabilizing is run referring to Fig.1 is as follows:
Wherein, Tm is motor driving moment, and Kr is driving moment and driving force proportionality coefficient, and G is glass gravity, and Fr is glass Resistance of the glass by sealing strip, m are glass mechanism quality, and V is glass translational velocity, and I is motor bus current, and Ke, Ra are electricity Machine characterisitic parameter, U are motor both end voltage, and Ki is transmission ratio.Fm is the ratio of Tm and transmission ratio Ki, and M is motor.
There is the establishment of following four conclusion in dV (t)=0 when stable operation:
1, load is directly proportional to motor bus current when motor stabilizing is run, and load is constant, and motor bus current I is constant; Wherein, it loads as door and window.
2, load is smaller, then motor bus current is smaller, and motor bus current when glass rises is greater than electricity when decline Machine bus current;
3, glass translational velocity V is constant when motor both end voltage, load are constant;
4, load is constant, and motor both end voltage is higher, and glass translational velocity V is bigger.
According to conclusions can sum up motor both end voltage it is constant when, load it is smaller, motor bus current is smaller, glass Glass translational velocity V is bigger.
After relay is cut and stopped, that is, stop after being motor power supply, it is assumed that door glass moves upwards, and cuts stop relay at this time Stop powering to motor, then door glass is braked under frictional resistance and gravity, is had at this time: U (t)=0.
If comprehensive Proportional coefficient K v are as follows:
It can then be released according to above-mentioned formula:
Laplace transformation is carried out to above formula to obtain:
Wherein, s is Laplce's complex variable.
Carrying out inverse Laplace transformation again can be obtained speed V (t) expression formula:
Wherein, V0 is that relay cuts stopping time glass translational velocity, enables V (t)=0, door and window can be obtained from relay and cut the stopping time It is carved into time T required for preshoot stops, it may be assumed that
V (t) is integrated, and brings T into and door and window forward setting distance can be obtained:
According to above formula it is found that initial glass translational velocity V0 is bigger, resistance Fr and glass gravity G of the glass by sealing strip Smaller, relay cuts that stop rear door and window forward setting distance bigger, and motor bus current is directly proportional to running resistance, therefore, relay It cuts and stops that front glass translational velocity V0 is bigger, and motor bus current is smaller, door and window forward setting distance is bigger.Actual condition Fr, G, Kv etc. Parameter is difficult to be accurately obtained, and then can be obtained according to motor bus current I and initial glass translational velocity V0 by calibration mode To forward setting distance.
It should be noted that above-mentioned derivation process assumes that door and window moves upwards, frictional resistance and glass gravity are and glass The direction of motion is on the contrary, sum of the two is as glass motion resistance, and current of electric is larger at this time.If glass moves downward, glass weight Power is identical as the door and window direction of motion, and the difference of frictional resistance and glass gravity is as glass motion resistance, and current of electric is smaller at this time. Therefore no matter rise or decline, current of electric can reflect glass by resistive state.
For under motor type and glass lifting mechanism same case, Kv value is identical, and difference is mainly between different car doors Frictional resistance is different with glass gravity, and reflection is different to motor bus current value on motor, therefore calibrates the position of a car door After setting compensation table, other car doors are equally applicable to, the difference of resistance can table look-up to obtain not by different motor bus current values With position compensation value, wherein position compensation value is component forward setting distance.
In addition, can be used motor bus current I and relay is cut stopping time glass translational velocity V0 and determined to verify The conclusion of forward setting distance is correct, and cuts stopping time glass to further look at component forward setting distance and motor bus current I, relay The relationship of glass translational velocity V0 is studied using the car door of real vehicles by experiment.
Due to differing fixed coefficient, i.e. transmission ratio Ki between motor movement speed and glass translational velocity, therefore can use Motor movement speed indicates glass translational velocity.
It adjusts different motor both end voltages and obtains different motor operation speed, pass through raising and lowering gravity direction Difference obtains different motor bus currents, records under different motor operation speed and different motor bus currents, relay is cut Door and window forward setting distance after stopping.Wherein, motor operation speed is motor speed.It should be noted that in Fig. 2 abscissa represent after Electric appliance cuts stopping time glass translational velocity, and ordinate indicates preshoot displacement, i.e. door and window forward setting distance.Since relay cuts stopping time glass Translational velocity is consistent with the variation of motor movement speed, it may thus be appreciated that:
1, in the constant situation of motor bus current, door and window forward setting distance is directly proportional to motor operation speed, motor operation speed It is bigger to spend bigger forward setting distance;
2, under the same motor speed of service, it is bigger to load smaller door and window forward setting distance.
Above-mentioned experiment further demonstrates the relationship of door and window forward setting distance and motor bus current, motor operation speed.Cause This can determine door and window forward setting distance according to motor operation speed and motor bus current.
On the basis of the above embodiments, another embodiment of the present invention provides a kind of calculation method of position, reference Fig. 3, calculation method may include:
Current value and tachometer value when S11, calculating motor normal operation;
Optionally, on the basis of the present embodiment, calculating current value when motor runs well may include:
1, voltage signal is obtained;
Wherein, voltage signal is signal of the motor current signal after sampling resistor and amplifier.
Specifically, the current signal on motor supply lines is converted into voltage letter by 10 milliohm sampling resistors on hardware Number, and amplified by operational amplifier, pass through this voltage signal of Chip Microcomputer A/D port processing.
2, average value filtering is carried out to voltage signal, obtains d. c. voltage signal;
Specifically, filtering is to filter out the ripple signal in voltage signal.
3, according to the voltage value in d. c. voltage signal, current value is obtained.
This voltage signal is able to reflect running current size on motor.Specifically, according to formula U=RI, it is known that, voltage with Resistance is proportional, i.e., by voltage divided by load value, as current value, wherein loads as door and window.
Optionally, further, referring to Fig. 4, calculating tachometer value when motor runs well may include:
S21, according to voltage signal, determine the current signal of motor;
Specifically, there are proportional relations between voltage signal and current signal, and then electricity can be determined according to voltage signal Flow signal.
S22, determine that motor rotates a circle the required time in current signal;
Specifically, step S22 may include:
1, current signal is subjected to signal conversion, obtains square-wave signal;
Specifically, current signal is that DC quantity is superimposed ripple of ac, as shown in figure 5, intermediate dotted line is DC quantity, class Being similar to sinusoidal shape is ripple of ac.Ripple is integrated into square wave by software scenario, the demodulation in specially Fig. 5 Square wave afterwards.
It should be noted that being divided into two kinds of working conditions in Fig. 5, one kind is motor normal operating condition, is had simultaneously at this time There are DC quantity and ripple of ac.Another state is that relay is cut and stops state, at this time only DC quantity.
2, motor is obtained to rotate a circle the quantitative value of corresponding square wave;
Specifically, the common property that rotates a circle raw 8 ripple periods, that is, corresponding to 8 square waves for 4 pole motors.
It should be noted that the motor of different magnetic poles, corresponding ripple amount of cycles is different.
3, the time needed for determining the square wave of generation quantity value.
Specifically, the square wave of generation quantity value, can determine the number of square wave, such as two with rising edge or failing edge Being between a rising edge is a square wave between a square wave or two failing edges.So, it will be able to find and be somebody's turn to do The corresponding square wave of quantitative value, then go to check the time for the square wave for generating the quantity.
S23, according to the time, tachometer value is calculated.
Specifically, motor rotation speed, i.e. tachometer value, may be expressed as:
According to above-mentioned formula, motor speed value can be calculated.
S12, when detecting motor order from effectively becoming invalid, from electric current, motor speed and component forward setting distance In corresponding relationship, component forward setting distance value corresponding with current value, tachometer value is obtained.
Specifically, the corresponding relationship of electric current, motor speed and component forward setting distance has pre-generated, wherein can be Exist in table form.In the presence of in table form, by way of tabling look-up, so that it may know and current value, revolving speed It is worth corresponding component forward setting distance value.
In the present embodiment, when determining component forward setting distance value, the data that use are the current value and tachometer value of motor, by It is able to reflect the motion state of motor in the current value and tachometer value, and then can correctly determine the running position of motor, from And obtain accurate component forward setting distance value.The present invention is middle compared with the prior art to use the movement shape that cannot really reflect motor Voltage value on the pcb board of state determines the mode of component forward setting distance value, determination component forward setting distance that can be more accurate Value.And then the present invention can cut according to component forward setting distance value and relay and stop after component forward setting distance value has been determined When component movement position, obtain component it is final stop accurately position.
Optionally, on the basis of the embodiment of the calculation method of any of the above-described position, referring to Fig. 6, electric current, motor speed Generating process with the corresponding relationship of component forward setting distance includes:
S31, at least one motor current value and at least one motor speed value are determined;
Specifically, motor current value and motor speed value are that technical staff is determined.Determining process includes:
1, at least one motor current value is determined;
Technical staff determines the smallest motor current value, as I=0 first, wherein I is the electric current on motor supply lines, Motor does not rotate at this time.Then electric current when technical staff determines maximum motor current value, as motor rotation blockage, it is specific to claim For motor rotation blockage electric current Imax.Wherein, stall refers to motor normal power supply, but does not rotate, and electric current is very big at this time.
Due to glass rise when electric current be greater than glass decline when electric current, at this time can also glass decline when and rising When determine an electric current, respectively I3 and I4 respectively.At this time can be there are four current value, but four current value negligible amounts, Further, it is also possible to which the algorithm by linear difference determines multiple electric currents again, electric current I2 and I5 are such as determined again, then are determined altogether at this time Six current values, ascending is respectively IIndex=[I1, I2, I3, I4, I5, I6].
It should be noted that six current values have only been determined in the present embodiment, but in actual use, it can be according to tool Body scene needs, and determines more current values.
2, at least one motor speed value is determined;
Specifically, it is first determined the smallest motor speed value is v1=0.Then, it is determined that maximum motor speed value, is v6.Wherein, when motor speed value maximum, glass translational velocity is maximum.
Hereafter, it can determine that multiple groups motor speed value can also e.g. determine four groups again by the algorithm of linear difference Value, respectively v2-v5.
Then motor speed value is according to ascending sequence, available VIndex=[v1, v2, v3, v4, v5, v6].
S32, at least one motor current value and at least one motor speed value are formed into a numerical value group;
Assuming that the quantity of motor current value is n, the quantity of motor speed value is n, then composition includes n*n member altogether The numerical value group of element.
In above-described embodiment, it is determined that six motor current values and six motor speed values, from six motor current values A motor current value is selected, motor speed value is selected from six motor speed values and forms a data, it altogether can be with Obtain include 36 data numerical value group.
S33, at least one set of data are chosen from numerical value group;It wherein, include a current of electric in every group of data of selection Value and a motor speed value;
Specifically, choose data foundation can be select glass ascent stage a fixed current value it is corresponding Multiple data, wherein the motor speed value in each data is different.
Further, it is also possible to select the corresponding multiple data of a fixed current value of glass decline stage, wherein every Motor speed value in a data is different.
S34, one group of data is chosen from least one set of data as target data;
Specifically, one group of data can be randomly selected out as target data.
S35, the present current value for controlling motor are that the motor current value and control motor in target data work as forward Speed value is the motor speed value in target data;
Specifically, the target of the present embodiment is the corresponding relationship of determining electric current, motor speed and component forward setting distance, so Should obtain corresponding component forward setting distance under different electric currents, revolving speed.
And then this step in, it should control motor present current value be target data in motor current value and control The current rotating speed value of motor is the motor speed value in target data.
S36, the corresponding initial part forward setting distance value of target data is determined;
Specifically, initial part forward setting distance value can be what technical staff set at random, it is also possible in control motor Present current value be choose motor current value and control motor current rotating speed value be choose motor speed value after, into Row block system relay, when from block system relay, it is initial part forward setting distance value that glass, which starts travel distance,.
It should be noted that after block system relay, start the travel distance for calculating glass, in actual use, due to When block system relay, cannot explicitly know very much glass at this time where distance, so in the forward setting distance of actual measurement glass When, it can control glass walking to predeterminated position, at this time block system relay, and then according to the stop position of glass, with glass Stop position subtracts predeterminated position, and glass forward setting distance, i.e., the initial part forward setting distance value in the present embodiment can be obtained.
S37, control motor movement are so that closing feature moves pre-determined distance;
S38, the ideal stop position after pre-determined distance is moved according to the actual stop position and closing feature of closing feature It sets, initial part forward setting distance value is modified, obtain component forward setting distance corresponding with target data;
After initial part forward setting distance value has been determined, can using allow glass motion to predeterminated position, i.e., it is mobile preset away from From mode constantly initial part forward setting distance value is modified so that finally obtained component forward setting distance meet repeatedly examination The test result tested.
Specifically, can be modified to introduce down to initial part forward setting distance value so that glass moves downward as an example Process.Assuming that initial part forward setting distance value is 1cm.
Control motor first makes glass motion to upper soft stop position, wherein upper soft stop position is preset one ratio It is closer to the position on glass top.
After glass motion to upper soft stop position, control glass moves down pre-determined distance, such as 5cm, at this point, cutting relay Device after waiting glass to stop, determines the position that glass finally stops, and such as glass, this moves 8cm altogether, then should increase at this time Initial part forward setting distance value such as sets 3cm for initial part forward setting distance value.
Hereafter, continue to control glass and move downward 5cm, after glass motion 5cm, cut and stop relay, if glass has altogether at this time Moved downward 7cm, then should reduce the initial part forward setting distance value of new settings at this time, such as by new initial part preshoot away from It is set as 2.5cm from value.
Using above method, constantly initial part forward setting distance value is modified, is set if glass forward setting distance is greater than Fixed revised initial part forward setting distance value, then increase revised initial part forward setting distance value;If glass preshoot away from From the revised initial part forward setting distance value for being less than setting, then reduce revised initial part forward setting distance value.Constantly It repeats, until obtaining final component forward setting distance.
S39, judge whether to obtain the corresponding component forward setting distance of every group of data chosen from least one set of data;If sentencing It is disconnected to go out to obtain the corresponding component forward setting distance of every group of data chosen from least one set of data, execute step S310;If judgement It does not obtain the corresponding component forward setting distance of every group of data chosen from least one set of data out, returns to step S34.
Specifically, due to it needs to be determined that the corresponding component forward setting distance of every group of data chosen from least one set of data, So a deterministic process should be set at this time, followed to determine when to return to step S34 and when execute Next step after ring.
The every group of data and its corresponding component forward setting distance that S310, basis are chosen from numerical value group, using linear difference Algorithm, determine the corresponding component forward setting distance of every group of data in numerical value group in addition to every group of data of selection;
Specifically, by being to have chosen partial data from numerical value group in this present embodiment, to determine every group of data of selection Corresponding component forward setting distance, the corresponding component forward setting distance of remainder data in numerical value group, it should be selected according to from numerical value group The corresponding component forward setting distance of partial data and the algorithm of linear difference has been taken to determine.
For example, such as it has been determined that the corresponding component forward setting distance of data that electric current is 5A, tachometer value is 200r is 10cm, The corresponding component forward setting distance of the data that electric current is 7A, tachometer value is 200r is 12cm, then can be according to the calculation of linear difference Method determines that the corresponding component forward setting distance of data that electric current is 6A, tachometer value is 200r is 11cm.
S311, according to every group of data in numerical value group and the corresponding component forward setting distance of every group of data, generate electric current, motor The corresponding relationship of revolving speed and component forward setting distance.
Specifically, the corresponding relationship of electric current, motor speed and component forward setting distance can be and be opened up in table form Show.When the quantity of motor current value is six, and the quantity of motor speed value is six, electric current, motor speed and component preshoot The corresponding relationship of distance can be with are as follows:
Ndata corresponding relationship is as follows: IIndex respective column, as I1 corresponds to N11-N61;VIndex corresponds to row, as V1 is corresponding N11-N16。
It should be noted that
It 1) is the state of stopping operating for I1 and I6 column motor, therefore component forward setting distance is set as 0.
2) for the component forward setting distance of I2 column, it can be obtained, can also be led to by I1 and I3 column offset linear interpolation Specific experiment is crossed to obtain.
3) for the component forward setting distance of I5 column, it can be obtained, can also be led to by I4 and I6 column offset linear interpolation Specific experiment is crossed to obtain.
In the present embodiment, the component under different motor current values and motor speed value can be obtained by way of calibration Forward setting distance, and then generate the corresponding relationship of electric current, motor speed and component forward setting distance.Facilitate and subsequent looks into down at any time Table determines component forward setting distance value.
Optionally, on the basis of the computing device embodiment of above-mentioned position, another embodiment of the present invention provides one The computing device of kind position, referring to Fig. 7, the computing device of position may include:
Computing module 101, for calculating current value and tachometer value when motor runs well;
Module 102 is obtained, for when detecting motor order from effectively becoming invalid, from electric current, motor speed and portion In the corresponding relationship of part forward setting distance, component forward setting distance value corresponding with current value, tachometer value is obtained.
Further, computing module includes:
First determines submodule, for determining the current signal of motor according to voltage signal;
Second determines submodule, and for determining, motor rotates a circle the required time in current signal;
Second computational submodule, for tachometer value to be calculated according to the time.
Further, second determine that submodule includes:
Converting unit obtains square-wave signal for current signal to be carried out signal conversion;
Acquiring unit rotates a circle the quantitative value of corresponding square wave for obtaining motor;
Determination unit, time needed for the square wave for determining generation quantity value.
Further, computing module further include:
Acquisition submodule, for obtaining voltage signal;Wherein, voltage signal be motor current signal by sampling resistor and Signal after amplifier;
Submodule is filtered, for carrying out average value filtering to voltage signal, obtains d. c. voltage signal;
First computational submodule, for obtaining current value according to the voltage value in d. c. voltage signal.
In the present embodiment, when determining component forward setting distance value, the data that use are the current value and tachometer value of motor, by It is able to reflect the motion state of motor in the current value and tachometer value, and then can correctly determine the running position of motor, from And obtain accurate component forward setting distance value.The present invention is middle compared with the prior art to use the movement shape that cannot really reflect motor Voltage value on the pcb board of state determines the mode of component forward setting distance value, determination component forward setting distance that can be more accurate Value.And then the present invention can cut according to component forward setting distance value and relay and stop after component forward setting distance value has been determined When component movement position, obtain component it is final stop accurately position.
It should be noted that the course of work of modules, submodule and unit in the present embodiment, please refers to above-mentioned reality The respective description in example is applied, details are not described herein.
Optionally, on the basis of the embodiment of any of the above-described computing device, referring to Fig. 8, further includes:
First determining module 201, for determining at least one motor current value and at least one motor speed value;
Data combination module 202, at least one motor current value and at least one motor speed value to be formed one Numerical value group;
First chooses module 203, for choosing at least one set of data from numerical value group;Wherein, in every group of data of selection Including a motor current value and a motor speed value;
Second chooses module 204, for choosing one group of data from least one set of data as target data;
First control module 205, for control motor present current value be target data in motor current value and The current rotating speed value of motor is controlled as the motor speed value in target data;
Second determining module 206, for determining the corresponding initial part forward setting distance value of target data;
Second control module 207, for controlling motor movement so that closing feature moves pre-determined distance;
Correction module 208, after according to the mobile pre-determined distance of the actual stop position and closing feature of closing feature Ideal stop position, initial part forward setting distance value is modified, component forward setting distance corresponding with target data is obtained;
Judgment module 209 obtains the corresponding component of every group of data chosen from least one set of data for judging whether Forward setting distance;
Second choose module 204, be also used to when judgment module judge not obtain choosing from least one set of data it is every When the group corresponding component forward setting distance of data, one group of data is chosen from least one set of data as target data;
Third determining module 210, for according to every group of data being chosen from numerical value group and its corresponding component preshoot away from From using the algorithm of linear difference, before determining the corresponding component of every group of data in numerical value group in addition to every group of data of selection Rush distance;
Generation module 211, for according to every group of data in numerical value group and the corresponding component forward setting distance of every group of data, life At electric current, the corresponding relationship of motor speed and component forward setting distance.
In the present embodiment, the component under different motor current values and motor speed value can be obtained by way of calibration Forward setting distance, and then generate the corresponding relationship of electric current, motor speed and component forward setting distance.Facilitate and subsequent looks into down at any time Table determines component forward setting distance value.
It should be noted that the course of work of the modules in the present embodiment, please refers to corresponding in above-described embodiment Illustrate, details are not described herein.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (8)

1. a kind of calculation method of position characterized by comprising
Calculate the current value and tachometer value when motor runs well;
When detecting motor order from effectively becoming invalid, from electric current, the corresponding relationship of motor speed and component forward setting distance In, obtain component forward setting distance value corresponding with the current value, the tachometer value;
The generating process of the corresponding relationship of the electric current, motor speed and component forward setting distance includes:
Determine at least one motor current value and at least one motor speed value;
At least one described motor current value and at least one described motor speed value are formed into a numerical value group;
At least one set of data are chosen from the numerical value group;It wherein, include a current of electric in data described in every group of selection Value and a motor speed value;
One group of data is chosen as target data from least one set of data;
The present current value of control motor is that motor current value in the target data and the control motor work as forward Speed value is the motor speed value in the target data;
Determine the corresponding initial part forward setting distance value of the target data;
The motor movement is controlled so that closing feature moves pre-determined distance;
According to the ideal stop position after the actual stop position of closing feature and the mobile pre-determined distance of the closing feature It sets, the initial part forward setting distance value is modified, obtain component forward setting distance corresponding with the target data;
Return and choose the step for one group of data is as target data from least one set of data, until obtain from it is described to The corresponding component forward setting distance of every group of data chosen in few one group of data;
According to the every group of data and its corresponding component forward setting distance chosen from the numerical value group, using the calculation of linear difference Method determines the corresponding component forward setting distance of every group of data in the numerical value group in addition to every group of data of selection;
According to every group of data in the numerical value group and the corresponding component forward setting distance of every group of data, the electric current, motor are generated The corresponding relationship of revolving speed and component forward setting distance.
2. calculation method according to claim 1, which is characterized in that calculate current value when motor runs well, comprising:
Obtain voltage signal;Wherein, the voltage signal is letter of the motor current signal after sampling resistor and amplifier Number;
Average value filtering is carried out to the voltage signal, obtains d. c. voltage signal;
According to the voltage value in the d. c. voltage signal, the current value is obtained.
3. calculation method according to claim 2, which is characterized in that calculate tachometer value when motor runs well, comprising:
According to the voltage signal, the current signal of the motor is determined;
Determine that motor rotates a circle the required time in the current signal;
According to the time, the tachometer value is calculated.
4. calculation method according to claim 3, which is characterized in that determine in the current signal that motor rotates a circle institute The time needed, comprising:
The current signal is subjected to signal conversion, obtains square-wave signal;
Motor is obtained to rotate a circle the quantitative value of corresponding square wave;
The time needed for determining the square wave for generating the quantitative value.
5. a kind of computing device of position characterized by comprising
Computing module, for calculating current value and tachometer value when motor runs well;
Obtain module, for when detecting motor order from effectively becoming invalid, from electric current, motor speed and component preshoot away from From corresponding relationship in, obtain corresponding with the current value, tachometer value component forward setting distance value;
First determining module, for determining at least one motor current value and at least one motor speed value;
Data combination module, at least one described motor current value and at least one described motor speed value to be formed one Numerical value group;
First chooses module, for choosing at least one set of data from the numerical value group;Wherein, in data described in every group of selection Including a motor current value and a motor speed value;
Second chooses module, for choosing one group of data as target data from least one set of data;
First control module, the present current value for controlling motor are motor current value and control in the target data The current rotating speed value of the motor is the motor speed value in the target data;
Second determining module, for determining the corresponding initial part forward setting distance value of the target data;
Second control module, for controlling the motor movement so that closing feature moves pre-determined distance;
Correction module, after according to the actual stop position of closing feature and the mobile pre-determined distance of the closing feature Ideal stop position, the initial part forward setting distance value is modified, component corresponding with the target data is obtained Forward setting distance;
Judgment module obtains the corresponding component preshoot of every group of data chosen from least one set of data for judging whether Distance;
Described second chooses module, is also used to judge not obtain to choose from least one set of data when the judgment module Every group of data corresponding component forward setting distance when, choose one group of data as target data from least one set of data;
Third determining module, the every group of data chosen from the numerical value group for basis and its corresponding component forward setting distance, Using the algorithm of linear difference, before determining the corresponding component of every group of data in the numerical value group in addition to every group of data of selection Rush distance;
Generation module, for generating according to every group of data in the numerical value group and the corresponding component forward setting distance of every group of data The corresponding relationship of the electric current, motor speed and component forward setting distance.
6. computing device according to claim 5, which is characterized in that the computing module includes:
Acquisition submodule, for obtaining voltage signal;Wherein, the voltage signal be motor current signal by sampling resistor and Signal after amplifier;
Submodule is filtered, for carrying out average value filtering to the voltage signal, obtains d. c. voltage signal;
First computational submodule, for obtaining the current value according to the voltage value in the d. c. voltage signal.
7. computing device according to claim 6, which is characterized in that the computing module includes:
First determines submodule, for determining the current signal of the motor according to the voltage signal;
Second determines submodule, and for determining, motor rotates a circle the required time in the current signal;
Second computational submodule, for the tachometer value to be calculated according to the time.
8. computing device according to claim 7, which is characterized in that described second determines that submodule includes:
Converting unit obtains square-wave signal for the current signal to be carried out signal conversion;
Acquiring unit rotates a circle the quantitative value of corresponding square wave for obtaining motor;
Determination unit, for the time needed for determining the square wave for generating the quantitative value.
CN201711306613.8A 2017-12-11 2017-12-11 A kind of calculation method and device of position Active CN108061511B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711306613.8A CN108061511B (en) 2017-12-11 2017-12-11 A kind of calculation method and device of position

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711306613.8A CN108061511B (en) 2017-12-11 2017-12-11 A kind of calculation method and device of position

Publications (2)

Publication Number Publication Date
CN108061511A CN108061511A (en) 2018-05-22
CN108061511B true CN108061511B (en) 2019-08-30

Family

ID=62135440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711306613.8A Active CN108061511B (en) 2017-12-11 2017-12-11 A kind of calculation method and device of position

Country Status (1)

Country Link
CN (1) CN108061511B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101220724A (en) * 2008-01-30 2008-07-16 张建华 Anti-clip control method for electric window of vehicle
EP2109211A1 (en) * 2008-04-08 2009-10-14 Delphi Technologies, Inc. System and method for determining position or speed of a commutaded DC motor with error correction
CN101953063A (en) * 2007-11-22 2011-01-19 欧陆汽车有限责任公司 Method and device for determining the position of a mobile closing part of a vehicle
CN102635288A (en) * 2012-01-06 2012-08-15 陈雅莹 Ripple wave anti-clamping controller of car window and control method
CN102680894A (en) * 2012-05-23 2012-09-19 哈尔滨工业大学 Performance testing system and performance testing method for portable motor
CN105909115A (en) * 2016-06-30 2016-08-31 北京经纬恒润科技有限公司 Position compensation method and position compensation system
CN105927090A (en) * 2016-06-30 2016-09-07 北京经纬恒润科技有限公司 Position detecting method and device for door/window glass, door/window control system and automobile
CN106788008A (en) * 2016-12-20 2017-05-31 北京经纬恒润科技有限公司 The control method and device of a kind of vehicle body closed-system direct current generator

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2669284B2 (en) * 1992-12-02 1997-10-27 オムロン株式会社 Apparatus and method for detecting position of moving object driven by DC motor
JPH0821149A (en) * 1994-07-08 1996-01-23 Tokai Rika Co Ltd Position sensor for motor type opening-closing window
CN106712605B (en) * 2017-01-25 2019-03-29 北京经纬恒润科技有限公司 A kind of anti-clip control method and device
CN108132396B (en) * 2017-12-11 2020-11-03 北京经纬恒润科技有限公司 Method and device for determining motion position

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101953063A (en) * 2007-11-22 2011-01-19 欧陆汽车有限责任公司 Method and device for determining the position of a mobile closing part of a vehicle
CN101220724A (en) * 2008-01-30 2008-07-16 张建华 Anti-clip control method for electric window of vehicle
EP2109211A1 (en) * 2008-04-08 2009-10-14 Delphi Technologies, Inc. System and method for determining position or speed of a commutaded DC motor with error correction
CN102635288A (en) * 2012-01-06 2012-08-15 陈雅莹 Ripple wave anti-clamping controller of car window and control method
CN102680894A (en) * 2012-05-23 2012-09-19 哈尔滨工业大学 Performance testing system and performance testing method for portable motor
CN105909115A (en) * 2016-06-30 2016-08-31 北京经纬恒润科技有限公司 Position compensation method and position compensation system
CN105927090A (en) * 2016-06-30 2016-09-07 北京经纬恒润科技有限公司 Position detecting method and device for door/window glass, door/window control system and automobile
CN106788008A (en) * 2016-12-20 2017-05-31 北京经纬恒润科技有限公司 The control method and device of a kind of vehicle body closed-system direct current generator

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于电流纹波纯硬件波形转化的车窗防夹设计;许师中;《厦门理工学院学报》;20140228;第22卷(第1期);第11-16页

Also Published As

Publication number Publication date
CN108061511A (en) 2018-05-22

Similar Documents

Publication Publication Date Title
US7622881B2 (en) Method and apparatus for estimating system inertia where number of motor rotations are restricted
CN106899254B (en) A kind of closing feature Antipinch detection method and device
CN106788008B (en) A kind of control method and device of vehicle body closed system direct current generator
CN101532361A (en) Anti-clamping device and anti-clamping method thereof
EP1744445A3 (en) AC motor driving apparatus and method of controlling the same
EP3910412A1 (en) Drive circuit for driving an electro-optical device
CN103359064B (en) Wiper device
CN103786605A (en) Automobile seat position determination and adjustment
CN102317878A (en) Method and device for pulse width modulated activation of an electrical drive motor of an adjustment arrangement
CN107834912A (en) A kind of electronic Passenger door device and control method
CN108061511B (en) A kind of calculation method and device of position
CN210629386U (en) Motor control device
Kumar et al. Design and hardware development of power window control mechanism using microcontroller
CN108131073A (en) A kind of anti-pinching car window self-learning method based on current sample
Mahmud et al. Modeling and performance analysis of an adaptive PID speed controller for the BLDC motor
CN109162573B (en) Control method for same stopping force of cabinet door when meeting resistance and storage cabinet
Kumar et al. Modelling and simulation of object detection in automotive power window
DE102006007610A1 (en) Drive device for an adjusting device for adjusting a vehicle part and method for operating a drive device
CN204476070U (en) A kind of Anti-pinch of Electric Window in Vehicles experimental data acquisition system
JP2016098601A (en) Operation auxiliary control device
CN206091704U (en) Car intelligence prevents pressing from both sides pass window ware based on motor electric current ripple
CN110685533A (en) Vehicle window lifting control device
CN111638705B (en) Testing device and method for vehicle window control system and storage medium
CN207366193U (en) Glass regulator durability test apparatus
CN211058565U (en) Vehicle window lifting control device

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
GR01 Patent grant
GR01 Patent grant
CP03 "change of name, title or address"
CP03 "change of name, title or address"

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

Patentee after: Beijing Jingwei Hengrun Technology Co., Ltd

Address before: 8 / F, block B, No. 11, Anxiang Beili, Chaoyang District, Beijing 100101

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