The content of the invention
Patent of the present invention is in order to improve the integrated level of motor roll angle inspection module, reduction module cost, to provide one kind
The corner and rotational speed devices of brush direct current motor are detected by application motor attributive character itself in the case where ensureing precision, is removed
The blank of brush direct current motor corner method of estimation has also been filled up outside this.
The improved key technology of the present invention is current signal processing and software antidote, to ensure that signal transacting is imitated
Fruit, improve corner and Rotating speed measring precision.The present invention particular content be:
Motor rotation angle detecting apparatus, including current sensor 3, pre-amplifying module 4, self-adaptive band-pass filter module 5, just
String wave impulse modular converter 6, voltage transformation module 8.Wherein, current sensor 3, pre-amplifying module 4, self-adaptive band-pass filter
Module 5, sinusoidal wave pulse modular converter 6 are sequentially connected.
The feeder ear of voltage transformation module 8 takes an end, self-adaptive band-pass filter module 5 with pre-amplifying module 4 respectively
Take an end to be connected.
The current sensor 3 is used to detect the current signal passed through in motor rotation process.
The pre-amplifying module 4 is responsible for the current signal that current sensor 3 detects being amplified, and obtains alternating current
Signal.
The self-adaptive band-pass filter module 5 is responsible for carry out certainly by the ac signal that pre-amplifying module 4 exports
Bandpass filtering is adapted to, obtains sinusoidal wave current signal.
The sinusoidal wave current that the sinusoidal wave pulse modular converter 6 is responsible for exporting self-adaptive band-pass filter module 5 is believed
Number it is converted into pulse wave signal.
The voltage transformation module 8 is responsible for providing ± 5V electricity to pre-amplifying module 4 and self-adaptive band-pass filter module 5
Pressure.
Furtherly, provided with an industrial computer.The signal output part of current sensor 3, self-adaptive band-pass filter module 5
Signal input part, the signal output part of sinusoidal wave pulse modular converter 6 are connected with industrial computer respectively.
Parameter setting is carried out to self-adaptive band-pass filter module 5 by industrial computer.
The signal of change that signal, the sinusoidal wave pulse modular converter 6 fed back by industrial computer combination current sensor 3 feeds back
Obtain the corner numerical value of motor.
Furtherly, the current sensor 3 is single resistive current sensor, and carries out difference by AD8206 and put
Greatly, the signal after differential amplification is current signal.Current sensor is mounted in the centre of H bridges, is rotated for detecting motor
During the electric current that passes through.
Furtherly, the pre-amplifying module (4) is amplified for two-stage, wherein, the multiplication factor of first order amplification is 201
Times.The multiplication factor of second level amplification is 3 times of
Furtherly, the pre-amplifying module (4) includes electric capacity C1, C2, C3, C4, resistance R1, R2, R3, R4, R5,
R6, R7, R8 and chip TLC2272.
Wherein, the work(that the first order is amplified is realized by electric capacity C1, C3, C4, resistance R1, R3, R4, R5 and chip TLC2272
Can, by electric capacity C2, C4, the amplifier inside resistance R2, R6, R7, R8 and chip TLC2272 realizes the function of second level amplification.
Furtherly, chip TLC2272 pin 1 is connected with resistance R1 one end, resistance R3 one end, electric capacity C2 one end.Core
Piece TLC2272 pin 2 is connected with the resistance R1 other end, resistance R4 one end.Chip TLC2272 pin 3 and electric capacity
C1 one end, resistance R5 one end is connected.The resistance R4 other end is connected with electric capacity C3 one end.Resistance R3's is another
End, the electric capacity C3 other end, resistance R5 other end common ground.Chip TLC2272 pin 5 and resistance R6 one end, electricity
The other end for holding C2 is connected.Chip TLC2272 pin 6 is connected with resistance R2 one end, resistance R7 one end.Chip
TLC2272 pin 7 is connected with the resistance R2 other end, resistance R8 one end.The resistance R7 other end and the one of electric capacity C4
End is connected.The electric capacity C4 other end, the resistance R6 other end, resistance R8 other end common ground.
Signal output part, the sinusoidal wave pulse modular converter 6 of electric capacity C1 another termination current sensor 3.Chip
TLC2272 pin 4 is connected with the negative pressure output end of voltage transformation module 8.Chip TLC2272 pin 8 and voltage conversion mould
The positive output end of block 8 is connected.Chip TLC2272 pin 7 is connected with self-adaptive band-pass filter module 5.
Furtherly, the self-adaptive band-pass filter module 5 is for the AC signal after amplification to be carried out into adaptive band
Pass filter, filter out preferable sinusoidal waveform.Self-adaptive band-pass filter module 5 includes 1 piece of switch-capacitor filtering chip.
Furtherly, the switch-capacitor filtering chip in self-adaptive band-pass filter module 5 is filtering chip LTC1068-
200.In self-adaptive band-pass filter module 5 containing resistance R9, R10, R11, R12, R15, R16, R17, R19, R20, R21, R22,
R23, electric capacity C7, C8.Filtering chip LTC1068-200 pin 1 and resistance R9 one end, resistance R16 one end, resistance R11
One end link together.The other end of filtering chip LTC1068-200 pin 1 and resistance R12 links together.Filter core
One end of piece LTC1068-200 pin 1 and resistance R16 other end resistance R10 links together.Filtering chip LTC1068-
200 pin 4 is connected with filtering chip LTC1068-200 pin 5.Filtering chip LTC1068-200 pin 6 and filtering core
Piece LTC1068-200 pin 8, electric capacity C7 one end are connected.Filtering chip LTC1068-200 pin 7 is with resistance R19's
One end common ground.Filtering chip LTC1068-200 pin 9 and electric capacity C7 other end common ground.Filtering chip
LTC1068-200 pin 10 is connected with filtering chip LTC1068-200 pin 11, resistance R21 one end.Filtering chip
LTC1068-200 pin 12 is connected with resistance R22 one end.Filtering chip LTC1068-200 pin 13 and resistance R23
One end be connected.Filtering chip LTC1068-200 pin 14 and the resistance R21 other end, the resistance R22 other end, electricity
The resistance R23 other end, the resistance R9 other end links together.Filtering chip LTC1068-200 pin 15 and filtering chip
LTC1068-200 pin 16 is connected.Filtering chip LTC1068-200 pin 19, pin 20, pin 22, electric capacity C8
One end common ground.Filtering chip LTC1068-200 pin 23 is connected with the electric capacity C8 other end, resistance R19 one end.
Filtering chip LTC1068-200 pin 24 is connected with the resistance R19 other end, resistance R20 one end.Filtering chip
LTC1068-200 pin 25 is connected with the resistance R20 other end.Filtering chip LTC1068-200 pin 26 and resistance
R17 one end, resistance R9 one end is connected.Filtering chip LTC1068-200 pin 27 is connected with resistance R15 one end
Connect.Filtering chip LTC1068-200 pin 28 and the resistance R10 other end, the resistance R15 other end, resistance R17 it is another
The common connection in end.
Filtering chip LTC1068-200 pin 21 is connected with ECU.
The resistance R11 other end is connected with pre-amplifying module (4).
The electric capacity C7 other end is connected with voltage transformation module 8.
Furtherly, sinusoidal wave pulse modular converter 6 is by resistance R13, R14, R18, diode D1 and control chip U4
Composition, for sine wave to be converted into the impulse wave consistent with its cycle.
Control chip U4 model ICL7660.Control chip U4 pin 1 is connected with resistance R13 one end.Control core
One end with resistance R14, resistance R18 one end are connected piece U4 pin 2 respectively.Control chip U4 pin 3 and diode D1
Negative pole is connected.The resistance R18 other end, control chip U4 pin 4 are grounded.Control chip U4 pin 8 respectively with resistance R13
The other end, the resistance R14 other end is connected.
Control chip U4 pin 1 is connected with ECU.Diode D1 positive poles are connected with self-adaptive band-pass filter module 5.Resistance
The R13 other end is connected with voltage transformation module 8.
The voltage transformation module 8 is to be used to 5V voltage conversions be -5V voltages, to pre-amplifying module and adaptive band
Pass filtering module offer ± 5V voltage, ensures that the two modules are working properly.Voltage transformation module 8 include power supply chip U2,
Electric capacity C5, C6.Power supply chip U4 model LM393.Pin of the power supply chip U2 pin 2 through electric capacity C5 Yu power supply chip U2
4 are connected.Power supply chip U2 pin 3 is grounded.Power supply chip U2 pin 5 is grounded through electric capacity C6.Power supply chip U2 pin 5 with
Electric capacity C6 tie point is negative pressure delivery outlet, and is -5V.Power supply chip U2 pin 8 is malleation delivery outlet, and connects+5V electricity
Source.
Using the detection method of motor rotation angle detecting apparatus of the present invention, carry out as follows:
Step 1:Sinusoidal wave pulse modular converter 6, self-adaptive band-pass filter module 5 are connected with ECU to be measured respectively.Will
Current sensor 3, self-adaptive band-pass filter module 5, sinusoidal wave pulse modular converter 6 are connected with industrial computer respectively.In industry control
Installation direct current generator mathematical modeling 1, counting correction & counter modules 2, corner turn count module 7 in machine.Wherein, direct current
Machine mathematical modeling 1 belongs to software, estimates preferable motor speed for ECU, exports the pwm signal of relation proportional to rotating speed,
To ensure that self-adaptive band-pass filter module 5 being capable of normal work.
The counter & counts rectification module 2 and belongs to software, including counter module and counting rectification module.Count and rectify
The effect of positive module is by by pre-amplifying module 4, self-adaptive band-pass filter module 5 and sinusoidal wave pulse modular converter 6
Distorted pulse waveform afterwards is corrected, and is counted after correction by counter module pulse signals.
The corner speed estimate module 7 belongs to software, and the corner of motor is detected by algorithm, is counted by timing acquisition
The numerical value of device, and numerical value is multiplied by corner value corresponding to each pulse, then it can obtain the increasing of motor corner in this period
Amount, so as to estimate motor corner.
Step 2:Start ECU, the parameter of electric machine, motor input voltage, PWM parameters, electricity are inputted to direct current generator mathematical modeling 1
Flow sensor 3 detects obtained signal.
Step 3:The result of calculation of direct current generator mathematical modeling 1 is transmitted to counting correction & counter modules 2 and adaptive respectively
Bandpass filtering modules block 5.
Step 4:Corner speed estimate module 7, which combines, counts correction & counter modules 2 and sinusoidal wave pulse modular converter 6
The data of feedback obtain final result.
The technical solution adopted in the present invention is:Electric current of the motor in operation process is gathered by current sensor, will
The electric current of collection carries out the isolation of direct current signal and the amplification of AC signal by pre-amplifying module, is amplified by two-stage
The current fluctuation that fluctuation amplitude is 80mV is amplified to 5V, clutter and interference then will be carried by self-adaptive band-pass filter module
Signal filtering, and the purpose of adaptive tracing is when motor does not operate under a constant rotational speed, can also pass through filtering
Obtain the ideal sine wave of mechanical periodicity necessary to carrying out roll angle inspection.Preferable sine wave passes through sinusoidal wave pulse modulus of conversion
Block can be converted to sine wave the impulse wave consistent with its cycle, the pulse number of controller timing detection collection, and by arteries and veins
The increment that number corner value quadrature corresponding with each pulse can be obtained by motor corner in this period is rushed, motor is turned
Angle increment is overlapped i.e. detectable motor corner value.
The present invention includes software detecting method and hardware unit:Software detecting method is direct current generator mathematical modeling 1, counted
Device & counts rectification module 2, corner speed estimate module 7, as shown in Figure 2.Hardware unit includes:Current sensor 3, preceding storing
Big module 4, self-adaptive band-pass filter module 5, sinusoidal wave pulse modular converter 6, voltage transformation module 8, overall detecting system
Block diagram, as shown in Figure 1.
Software detecting method part:
The direct current generator mathematical modeling 1 belongs to the software section of detection means, estimates that preferable motor turns for ECU
Speed, the pwm signal of relation proportional to rotating speed is exported, to ensure that self-adaptive band-pass filter module 5 being capable of normal work.
The counter & counts the software section that rectification module 2 falls within detection means, and 2 include two modules, and one is
Counter module, one is to count rectification module.The effect for counting rectification module is by by pre-amplifying module, adaptive band
Distorted pulse waveform after pass filtering module and sinusoidal wave pulse modular converter is corrected, and passes through counter module after correction
Pulse signals are counted.
The corner speed estimate module 7 is the software section for belonging to detection means, and the part is to detect electricity by algorithm
The corner of machine, corner value corresponding to each pulse is multiplied by by the numerical value of timing acquisition counter, and by numerical value, then can be obtained
The increment of motor corner in this period, so as to estimate motor corner.
The current sensor 3 is single resistive current sensor, and carries out differential amplification by AD8206, and difference is put
Signal after big is current signal.Current sensor is mounted in the centre of H bridges, passes through for detecting in motor rotation process
Electric current.The pre-amplifying module 4 is divided into two-stage amplification again, and wherein first order amplifying circuit is by electric capacity C1, C3, C4, resistance
R1, R3, R4, R5 and the one of amplification bypass of chip TLC2272 compositions, multiplication factor is 201 times.Second level amplification electricity
With road is designed the first order as, and total magnification is 3 times, by electric capacity C2, C4, in resistance R2, R6, R7, R8 and chip TLC2272
The amplifier composition in portion.
The self-adaptive band-pass filter module 5 is for the AC signal after amplification to be carried out into self-adaptive band-pass filter, mistake
Filter out preferable sinusoidal waveform.Filtering chip used is LTC1068-200 switch-capacitor filtering chips.
The sinusoidal wave pulse change-over circuit of sinusoidal wave pulse modular converter 6 by R13, R14, R18, diode D1 and
LM393 is formed, for sine wave to be converted into the impulse wave consistent with its cycle.
The voltage transformation module 8 is to be used to 5V voltage conversions be -5V voltages, to pre-amplifying module and adaptive band
Pass filtering module offer ± 5V voltage, ensures that the two modules are working properly.It is made up of ICL7660 and electric capacity C5.
The present invention the course of work be:As shown in figure 1, roll angle inspection module is first using the parameter of electric machine and motor input electricity
Pressure, and the current signal that current sensor 3 gathers calculate the rotating speed of motor substantially by DC motor model 1, and should
Rotating speed is used to count correction and counter module 2 and self-adaptive band-pass filter module 5.Armature supply passes through current sensor 3
Except current signal transfer to DC motor model 1, to be also transmitted to pre-amplifying module 4 and carry out putting for AC signal after collection
Big and direct current signal isolation.Amplified AC signal is subsequently inputted into adaptive bandpass filter 5 and carried out adaptively
Filtering, the waveform filtered out are that tracing motor rotation speed changes and the sine wave of respective change.Voltage transformation module by power supply+
5V voltage conversions are ± 5V voltages to pre-amplifying module and adaptive-filtering module for power supply.By defeated after adaptive-filtering module
Go out satisfactory waveform, sine wave is converted into by impulse waveform by sinusoidal wave pulse modular converter 6 again afterwards, this impulse wave
Shape is last link of hardware components processing.Impulse waveform is inputted to correction and counter module 2 is counted, and the module is soft
Part filtration module, it is therefore an objective to be modified be likely to occur in the impulse wave obtained after hardware circuits which process overlapping and lose
Lose.Data after technology correction and counter module 2 carry out corner speed estimate by corner Rotating speed measring module 7, most
Output corner and rotating speed afterwards.Beneficial technique effect:
Proprietary algorithms flow of the present invention is simple, easily realizes.It is simple in construction, use that electronic unit is common and cost is relatively low.
And it is to be directed to the roll angle inspection transposition that cost is cheap, is used using extensive brushed DC motor, once industrialization is realized, must
Good practical value and extensive market prospects will be had.
Embodiment
The present invention will be further described below in conjunction with the accompanying drawings:
As shown in figure 1, the specific work process of the present invention is:Roll angle inspection module is first inputted using the parameter of electric machine and motor
Voltage, and the current signal that current sensor 3 gathers calculate the rotating speed of motor substantially by DC motor model 1, and will
The rotating speed is used to count correction and counter module 2 and self-adaptive band-pass filter module 5.Armature supply passes through current sensor
Except current signal transfer to DC motor model 1, to be also transmitted to pre-amplifying module 4 and carry out AC signal after 3 collections
Amplification and the isolation of direct current signal.Amplified AC signal be subsequently inputted into adaptive bandpass filter 5 carry out it is adaptive
It should filter, the waveform filtered out is that tracing motor rotation speed changes and the sine wave of respective change.Export satisfactory waveform
Sine wave is converted into by impulse waveform by sinusoidal wave pulse modular converter 6 again afterwards, this impulse waveform is hardware components processing
Last link.Impulse waveform is inputted to correction and counter module 2 is counted, and the module is software filtering module, it is therefore an objective to
It is modified the overlapping and loss being likely to occur in the impulse wave obtained after hardware circuits which process.Correct and count by technology
Data after number device module 2 carry out corner speed estimate, last output corner and rotating speed by corner Rotating speed measring module 7.
Fig. 2 is the software program portion of roll angle inspection, mainly includes software filtering module (on the left of Fig. 2,2.1) and corner
Speed estimate module (on the right side of Fig. 2,2.2).
2.1 be the software filtering module in roll angle inspection software program on the left of Fig. 2.Motor is in itself and operating condition will not be located
In perfect condition, electric current can be caused due to the reason such as outer signals interference, magnetic field of permanent magnet skewness, rotor eccentricity by turning
There is the loss of pulse signal and overlapping after angle detection hardware circuit, so also needing to carry out software to signal after hardware handles
Correction.When carrying out motor roll angle inspection and Rotating speed measring completed by single-chip microcomputer input capture count pulse number, it is soft
Part filtering is exactly to carry out appropriate increase and decrease to the value of counter register in the input capture stage.Software rectification module flow is main
Include following three aspects:
(1) if having produced pulse signal before terminating in the T1 times, the pulse signal is ignored.
(2) if without pulse signal before terminating after T1 terminates with T2, then counter is automatic adds one.
(3) if can detect pulse signal after T1 terminates and before T2 terminates, rolling counters forward is effective.
Wherein T1 is with T2 duration with rotating speed about, it is necessary to estimate rotary speed data to T1 and T2 according to traditional motor model
It is configured.
Software filtering module can be completed after above-mentioned software flow processing counter.T1=t1*2/3 in flow charts.T2
For timer duration.
2.2 be the corner speed estimate module in roll angle inspection software program on the right side of Fig. 2.Corner Rotating speed measring all passes through
Timer t_3 timing is set to read the value of monolithic counter register to realize detection.By fixed during corner Rotating speed measring
When device interrupt enter after read the value of counter, the value of counter is converted into the corner after rotating angle increment with previous moment record
Actual rotational angle value is obtained after value superposition, tachometer value is obtained after rotating angle increment and timer duration are done into business, afterwards by counter
Value is reset, and is then log out interrupt latency Interruption next time.
With reference to shown in Fig. 2, corner or rotating speed calculation process are represented by:The counter register of first determines counting pulse number
The value COUNT of device.First calculate rotating speed and timer duration t1 be set, further according to whether there is pulse, if produce interrupt and
Whether timer counter is less than the value COUNT that T1=t1*2/3 carrys out up-down counter register.Flow chart comes in recycling 2.2
Calculate corner or tachometer value.Timer duration t_3 is set first, when producing capture interruption, into corner or Rotating speed measring
Pattern, the value COUNT of the counter register obtained in flow chart in 2.1 is corrected, then time corner value can represent
It is actual rotational angle value for theta=theta_q+COUNT*del_theta wherein theta, theta_q is the corner of previous moment
Value, del_theta is rotating angle increment value.Tachometer value is can be obtained by after rotating angle increment and timer duration are done into business.
Fig. 3 be the roll angle inspection part hardware circuit diagram, mainly including voltage transformation module, pre-amplifying module, from
Adapt to bandpass filtering modules block, sinusoidal wave pulse modular converter.
3 be voltage transformation module in Fig. 3, effect be provide to pre-amplifying module and self-adaptive band-pass filter module+
5V and -5V operating voltage, it is made up of tantalum electric capacity C5, C6 and chip IC L7660, and+5V electricity is inputted by 5V dc sources 9
Pressure is operated, and wherein electric capacity C5 effect is " charge pump ", passes through mos pipe upper half cycles of chip internal and lower half cycle
It is switched on and off completing the charging and discharging of electric capacity, it is in parallel that C5 is connected with C6 by chip internal circuits, passes through C5 work
With VOUT can export -5V voltages, and C6 effect is to filter the high frequency spurs in output voltage, in order to ensure higher turn
Change efficiency, two electric capacity all use 10uF capacitance.
4 be pre-amplifying module in Fig. 3, and effect is to be mingled with direct current and the electric current exchanged by what current sensor 3 gathered
Signal is filtered, and the AC signal after filtering is amplified, and the circuit is divided into two-stage amplification, wherein first order amplification electricity
Routing capacitance C1, C3, C4, resistance R1, R3, R4, R5 and chip TLC2272 one of amplification bypass composition.Electric current is believed
TLC2272 IN+ ports, the height being made up of C1 and R5 number are entered by the single order high-pass filter being made up of electric capacity C1 and R5
The cut-off frequency of bandpass filter is 8Hz, i.e., may only be higher than 8Hz AC signal by frequency.By single order high-pass filter
Current signal carry out first time amplification, amplification be by R1, R3, R4, C3 and TLC2272 inside amplifier complete.
The purpose of wherein C3 be for isolated DC signal, only make AC signal by and carry out feedback amplification.Multiplication factor is:
That is first order amplification 201.Second level Design of Amplification Circuit is as the first order, and total magnification is 3 times, by electric capacity
Amplifier composition inside C2, C4, resistance R2, R6, R7, R8 and chip TLC2272.VDD+ accesses+5V in circuit, VDD- connect
Enter -5V, the operating voltage by accessing positive and negative two-phase can ensure that signal normally amplifies in forward and reverse.Put by two-stage
Greatly, the signal that amplitude is 80mV can be enlarged into 5V or so, is easy to handle and counts.
5 be self-adaptive band-pass filter module in Fig. 3, and effect is that the adaptive ideal frequency related to rotating speed that filter out is believed
Number.Self-adaptive band-pass filter module is also required to want+5V and -5V power supply, and it is not in positive or negative sense to ensure bandpass filtering
Block, between+5V, -5V and ground access electric capacity C7 and C8 be in order to filter the high frequency spurs of power supply signal, ensure power supply
Stability.Filter circuit is built by three filtering channels in application adaptive-filtering chip LTC1068-200.In order to realize
Adaptive-filtering, it is necessary to change LTC1068 time constant, by ECU be input to CLK pin dutycycle be 50% pulse
Signal controls, and the frequency of the pulse signal is necessary for 200 times of ideal sinusoidal wave frequency rate.By designing bandpass filtering electricity
Road, the filter circuit with a width of 100Hz, signal good filtration effect can be obtained.
6 in Fig. 3 be sinusoidal wave pulse modular converter, and effect is that the sinusoidal signal for adaptive filtering is converted into pulse
Signal, in order to follow-up software filtering and counting.Sinusoidal wave pulse change-over circuit by R13, R14, R18, diode D1 and
LM393 is formed, and wherein R14 and R18 are connected with VCC with INA- and GND with INA- respectively, for controlling sinusoidal wave pulse to change
The comparison threshold value of module, value are respectively 2K and 3K, that is, it is 3V to set threshold value, and the signal more than 3V is united by comparator LM393
One output 5V.Diode D1 effect is by the reverse cut-off of the sinusoidal signal after self-adaptive band-pass filter, only to the letter of forward direction
Number it is compared.Resistance R13 effect is that the output to sinusoidal wave pulse modular converter pulls up, when not having signal
Ensure that comparator output causes controller error to count not by external interference.