Summary of the invention
The invention provides a kind of motor position detection method and motor position detecting device and use the method for this device, for solving the technical problem that in the detection of position signalling in prior art, SPI digital signal antijamming capability is poor when motor runs up.
In order to solve above-mentioned technical problem of the present invention, the invention provides a kind of motor position detection method, for measuring the rotor-position of motor, revolving resolver the rotor coaxial that becomes rotor and motor and being fixedly connected with, resolver to revolve set coaxial with the stator of motor and be fixedly connected with, described resolver exports to revolve according to the rotor turns of motor and becomes input signal to decoding chip, decoding chip is decoded to the described change input signal that revolves, obtain SPI digital signal and ABZ pulse signal, Master control chip controls decoding chip, it is characterized in that, described motor position detection method comprises:
Step S101, Master control chip control decoding chip starter motor position probing;
What step S102, decoding chip acquisition resolver exported revolves change input signal, and becomes input signal generation SPI digital signal and ABZ pulse signal according to revolving, and the SPI digital signal of generation and ABZ pulse signal are sent to Master control chip;
The SPI digital signal that step S103, Master control chip receipt decoding chip generate and ABZ pulse signal, and obtain motor position information according to described SPI digital signal or ABZ pulse signal.
Preferably, obtain motor position information according to described SPI digital signal or ABZ pulse signal in step S103 to comprise:
Step S1031, Master control chip judge that motor is in the low rate start stage or is in the high-speed cruising stage, if motor is in the low rate start stage, then enter next step S1032; If motor is in the high-speed cruising stage, then jump to step S1033:
Step S1032, Master control chip obtain by SPI digital signal the rotor position information that motor is in the low rate start stage;
Step S1033, Master control chip obtain by ABZ pulse signal the rotor position information that motor is in the high-speed cruising stage.
Preferably, described Master control chip is in the rotor position information in high-speed cruising stage by ABZ pulse signal acquisition motor and comprises: the increment type interface of Master control chip to AB signal incremental count, and obtains motor position information according to the value M of AB signal incremental count; Wherein,
When presetting rotor and operating to positive direction, incremental count is when increasing progressively, and when Master control chip judges that the combination order of AB signal is the combination order of positive direction, then judges that incremental count increases progressively; When Master control chip judges that described combination order is reciprocal combination order, then judge that incremental count successively decreases;
When presetting rotor and operating to positive direction, incremental count is when successively decreasing, and when Master control chip judges that described combination order is the combination order of positive direction, then judges that incremental count successively decreases; When Master control chip judges that described combination order is reciprocal combination order, then judge that incremental count increases progressively,
Preferably, described motor position information comprises rotor position angle θ and angular velocity omega;
Obtain motor position information according to the value M of AB signal incremental count to be specially: determine angular position theta according to M value, then according to angular position theta determination angular velocity omega; Wherein,
Preferably, Master control chip judges that motor is in the low rate start stage or is in the high-speed cruising stage and is specially:
Master control chip detects the Z pulse in ABZ pulse signal, and judges whether in scheduled time T1, N1 Z pulse detected, if the Z pulse number detected in scheduled time T1 is less than N1, then judges that motor is in the low rate start stage; If the Z pulse number detected in scheduled time T1 is more than or equal to N1, then judge that motor is in the high-speed cruising stage.
Preferably, also comprise in described step S103:
Step S1034, Master control chip carry out abnormity diagnosis by ABZ pulse signal to motor, when judging that motor runs appearance exception, send operation exception signal, and it are out of service to control motor; When judging that motor operation does not occur abnormal, jumping to step S1033, continuing calculate and obtain motor position information.
Preferably, described Master control chip carries out abnormity diagnosis by ABZ pulse signal to motor and comprises:
Master control chip detects the Z pulse in ABZ pulse signal, and judge whether continuously N2 electrical degree cycle detection to Z pulse, if Z pulse do not detected N2 electrical degree cycle continuously, then judge that motor breaks down; Otherwise, then judge that motor normally runs.
Preferably, described Master control chip carries out abnormity diagnosis by ABZ pulse signal to motor and comprises:
Master control chip obtains the rate of change a1 of the angular velocity omega of motor, and judges whether rate of change a1 is greater than the rate of change threshold value a0 preset, if rate of change a1 is more than or equal to the rate of change threshold value a0 preset, then judges that motor breaks down; If rate of change a1 is less than the rate of change threshold value a0 preset, then judge that motor normally runs.
In order to solve the problems of the technologies described above, present invention also offers a kind of motor position detecting device, it is characterized in that, described motor position detecting device comprises detecting sensor resolver, decoding chip and Master control chip; Wherein, resolver comprises revolving and becomes rotor and revolve set, revolve the rotor coaxial that becomes rotor and motor and be fixedly connected with, revolve set coaxial with the stator of motor and be fixedly connected with, described resolver is used for revolving change input signal according to the rotation of motor induction output, and will revolve change input signal and be supplied to decoding chip; Decoding chip revolves change input signal described in obtaining, and becomes input signal generation SPI digital signal and ABZ pulse signal according to revolving, and the SPI digital signal of generation and ABZ pulse signal are sent to Master control chip; Described Master control chip is used for SPI digital signal and the ABZ pulse signal of the generation of receipt decoding chip, and obtains motor position information according to described SPI digital signal and ABZ pulse signal.
In order to solve the problems of the technologies described above, present invention also offers a kind of method using above-mentioned motor position detecting device, the method comprises, and uses above-mentioned arbitrary motor position detection method to detect motor position.
Beneficial effect of the present invention comprises:
In the embodiment of the present invention, the SPI digital signal that Master control chip receipt decoding chip generates and ABZ pulse signal, and obtain motor position information according to described SPI digital signal or ABZ pulse signal, the running status of Master control chip to motor judges, and according to different running statuses, one group that chooses SPI digital signal or ABZ pulse signal, obtain the motor rotor position information of permagnetic synchronous motor, by adopting different position detection signals in starting stage and high-speed cruising stage, solve the problem that SPI digital signal antijamming capability is poor when motor runs up, anti-interference and the reliability of signal is improve by ABZ pulse signal, thus improve accuracy and the reliability of Electric Machine Control, in addition, diagnosed by the running status of ABZ pulse signal to motor, can the operation exception of Timeliness coverage motor, thus further increase the reliability of Electric Machine Control.
Embodiment
For making those skilled in the art understand technical scheme of the present invention better, the motor position detection method and the motor position detecting device that the embodiment of the present invention are provided below in conjunction with accompanying drawing and use the method for this device to be described in detail.
The motor position detection method that the embodiment of the present invention provides is detected by the rotor-position of motor position detecting device to motor.Before introducing the motor position detection method that the embodiment of the present invention provides, first the motor position detecting device that the embodiment of the present invention provides is introduced.
The embodiment of the present invention provides a kind of motor position detecting device, refers to Fig. 1, is the block schematic illustration of the motor position detecting device that the embodiment of the present invention provides.As shown in Figure 1, described motor position detecting device comprises detecting sensor resolver 10, decoding chip 20 and Master control chip 30, the detection signal output line of resolver 10 is connected with the input signal interface of decoding chip 20, and decoding chip 20 is connected with Master control chip 30; Wherein, resolver 10 is also a kind of motor detected, resolver 10 comprises revolving and becomes rotor and revolve set, revolve the rotor coaxial that becomes rotor and motor and be fixedly connected with, become rotor rotate with the rotation of rotor to make to revolve, revolve set coaxial with the stator of motor and be fixedly connected with.When the rotor of motor rotates, the stator of motor is fixing, and centered by the stators and rotators of motor, axle is coaxial, and rotor is by bearings and motor stator generation relative motion.Therefore, when resolver 10 revolve become rotor turns time, can produce induced signal revolving set, therefore, resolver 10 can produce according to the rotation of rotor revolve change input signal, and will revolve change input signal and be supplied to decoding chip 20; Decoding chip 20 revolves change input signal described in obtaining, and become input signal generation SPI digital signal and ABZ pulse signal according to revolving, and the SPI digital signal of generation and ABZ pulse signal are sent to Master control chip 30 respectively by the output interface of SPI digital signal and the output interface of ABZ pulse signal; The SPI digital signal that described Master control chip 30 generates for receipt decoding chip 20 and ABZ pulse signal, and obtain motor position information according to described SPI digital signal and ABZ pulse signal.
Wherein, Master control chip 30 comprises SPI serial communication interface 31 and increment type interface 32, described SPI serial communication interface 31 is for sending SPI serial communication clock signal (CLOCK signal) and chip selection signal (CS signal) to decoding chip 20, the SPI digital signal that the SPI digital signal output interface that described SPI serial communication interface 31 can also be used for receipt decoding chip 20 sends, the ABZ pulse signal that described increment type interface 32 sends for the ABZ output of pulse signal interface of receipt decoding chip 20.
Referring to Fig. 2 A, is the flow chart of a kind of motor position detection method that the embodiment of the present invention provides.As shown in Figure 2 A, this motor position detection method comprises:
Step S101, Master control chip control decoding chip starter motor position probing.
Particularly, Master control chip sends SPI serial communication clock signal (CLOCK signal) and chip selection signal (CS signal) to decoding chip.Wherein, when Master control chip is to after decoding chip sends SPI serial communication clock signal and chip selection signal, decoding chip is in running order, otherwise decoding chip is in non operating state.In SPI serial communication, it is synchronous that described SPI serial communication clock signal is used in data communication, and described chip selection signal is for starting the data communication of SPI serial communication.
What step S102, decoding chip acquisition resolver exported revolves change input signal, and becomes input signal generation SPI digital signal and ABZ pulse signal according to revolving, and the SPI digital signal of generation and ABZ pulse signal are sent to Master control chip.
When rotor rotates, decoding chip applies excitation to two of resolver inside groups of coils, thus makes resolver produce two groups of signals, and namely revolve change input signal, wherein, above-mentioned two groups of signals are sinusoidal carrier signal and cosine carrier signal respectively; Resolver will revolve change input signal and send to decoding chip, and decoding chip is resolved above-mentioned two groups of signals thus obtained SPI digital signal and ABZ pulse signal, and SPI digital signal and ABZ pulse signal are sent to Master control chip.
The SPI digital signal that step S103, Master control chip receipt decoding chip generate and ABZ pulse signal, and obtain motor position information according to described SPI digital signal and ABZ pulse signal.
Wherein, SPI digital signal is received by the SPI serial communication interface of Master control chip, and ABZ pulse signal is the increment type interface by Master control chip.Wherein, SPI digital signal is the position signalling of 12bit resolution, and the decode precision of decoding chip is 2
12=4096.The resolution of ABZ pulse signal is similarly 12bit, and increment type interface is to AB signal incremental count, and the principle of incremental count is the AB number of signals collected after calculating produces Z signal.The detailed process of incremental count is: as long as any one level in AB two signals reverses (from high level to low level, or from low level to high level), increment type interface just counts once.Referring to Fig. 3 A and Fig. 3 B, is the sequential of ABZ signal and the schematic diagram of incremental count, and when rotor-position operates to positive direction, as shown in Figure 3A, AB incremental count increases progressively the sequential of ABZ pulse signal; When rotor-position operates to opposite direction, as shown in Figure 3 B, AB incremental count successively decreases the sequential of ABZ pulse signal.Below the sequential of ABZ tri-signals, it is the count value of the incremental count of correspondence.As can be seen from Fig. 3 A and Fig. 3 B, when motor steering is different time, the combination order of the level of AB signal is different, and such as, in Fig. 3 A and Fig. 3 B, when rotor operates to positive direction, the combination order of the level of AB signal is: 10,11,01,00; When rotor operates to opposite direction, the combination order of the level of AB signal is: 00,01,11,10; Wherein, 1 is high level, and 0 is low level.Therefore, Master control chip according to the combination order of the level of AB signal, can judge that this combination order is the combination order of positive direction or reciprocal combination order, and according to combining the judged result of order, judges that incremental count increases progressively or successively decreases.Wherein, also can preset rotor-position to positive direction or in the other direction in a direction running time, AB incremental count increases progressively, and so when rotor-position operates to another direction, AB incremental count successively decreases.
In the embodiment of the present invention, when presetting rotor and operating to positive direction, incremental count is when increasing progressively, and when Master control chip judges that this combination order is the combination order of positive direction, then judges that incremental count increases progressively; When Master control chip judges that this combination order is reciprocal combination order, then judge that incremental count successively decreases.When presetting rotor and operating to positive direction, incremental count is when successively decreasing, and when Master control chip judges that this combination order is the combination order of positive direction, then judges that incremental count successively decreases; When Master control chip judges that this combination order is reciprocal combination order, then judge that incremental count increases progressively.
In the embodiment of the present invention, can, when rotor-position operates to positive direction, adopt AB incremental count to increase progressively, when rotor-position operates to opposite direction, adopt AB incremental count to successively decrease.In Fig. 3 A and Fig. 3 B, T is the cycle of AB signal, T is the portion be divided in an electrical degree cycle in 1024 parts, the electrical degree cycle is corresponding to a pair magnetic pole of motor, namely relative to certain position of motor stator, it is an electrical degree cycle that a pair magnetic pole passes through this position institute interlude through this position and lower a pair magnetic pole, namely electrode often turns over the time shared by a pair magnetic pole, when the cycle of AB signal is T, namely when the cycle of AB signal is 1/1024 of electrical degree cycle, in Fig. 3 A and Fig. 3 B, set of pulses counting diagram below the sequential chart of ABZ tri-signals, for the count value with the incremental count corresponding to ABZ tri-signals, AB incremental count is from 000 to FFF (count value that FFF is corresponding is 4095), a just in time corresponding electrical degree cycle.Z signal produced once an electrical degree cycle, and wherein, Z signal is that decoding chip produces according to output signal of rotary transformer.
Referring to Fig. 2 B, is the flow chart of the motor position information that obtains according to described SPI digital signal and ABZ pulse signal that the embodiment of the present invention provides.As shown in Figure 2 B, the step S103 in Fig. 2 A specifically comprises:
Step S1031, Master control chip judge that motor is in the low rate start stage or is in the high-speed cruising stage, if motor is in the low rate start stage, then enter next step S1032; If motor is in the high-speed cruising stage, then jump to step S1033.
Wherein, Master control chip judges that motor is in the low rate start stage or is in the high-speed cruising stage and is specially:
Master control chip detects the Z pulse in ABZ pulse signal, and judge that motor is in the low rate start stage or is in the high-speed cruising stage according to Z pulse, concrete, preset low speed point, if the speed of service of motor is less than low speed point, then judge that motor is in the low rate start stage, if the speed of service of motor is higher than low speed point, then judge that motor is in the high-speed starting stage.Wherein, Master control chip can judge whether in scheduled time T1, N1 Z pulse detected, if the Z pulse number detected in scheduled time T1 is less than N1, then judges that motor is in the low rate start stage; If the Z pulse number detected in scheduled time T1 is more than or equal to N1, then judge that motor is in the high-speed cruising stage.Wherein, T1 and N1 is the scheduled volume arranged according to low speed point correspondence.Preferably, such as, the scope of low speed point can be set as 300rpm-500rpm, if T1 is set to 1 minute, N1 is in 1 minutes, the speed of service of motor is when 300rpm-500rpm, the number of the Z pulse produced, therefore, corresponding N1 value is 1200-2000, wherein, by the speed of service of motor, rotor often turns around the number of Z pulse produced, and the scheduled time, just can obtain the number of the Z pulse of the correspondence in the described scheduled time, such as, in the present embodiment, the rotor of motor often turns around generation 4 Z pulses, therefore, the speed of service of motor is when 300rpm, the number of Z pulse corresponding in 1 minutes is 1200, the speed of service of motor is when 500rpm, the number of Z pulse corresponding in 1 minutes is 2000.In addition, when low speed point is certain, T1 arranges and changes, and corresponding change also can occur N1.In example above, if T1 is set to 1 second, then corresponding N1 value is 20-34.Such as, low speed point is set as 300rpm, and T1 is set to 1 second, then corresponding N1 value is 20, if the Z pulse number detected in 1 second is less than 20, then judges that motor is in the low rate start stage; If the Z pulse number detected in 1s is more than or equal to 20, then judge that motor is in the high-speed cruising stage.Such as, the span of T1 is 0.5s ~ 5s, and further preferably, T1 is set to 1s; N1 is the value obtained according to low speed point and T1, and the span of N1 is 5 ~ 50.
Step S1032, Master control chip obtain by SPI digital signal the rotor position information that motor is in the low rate start stage.
Motor is in the low rate start stage, wherein, SPI digital signal comprises the information at motor rotor position angle, according to revolve become input signal determination motor rotor position angle be the function that decoding chip carries, decoding chip can after resolver powers on Real-Time Monitoring motor rotor position, become input signal acquisition motor rotor position angle according to revolving, and motor rotor position angle is sent to Master control chip.Wherein, decoding chip is to resolver input signal, to apply excitation to two groups, resolver inside coil, resolver is according to pumping signal induction output two groups of signals (revolve and become input signal), be respectively sinusoidal carrier signal and cosine carrier signal, namely revolve change input signal, and be supplied to decoding chip, decoding chip is by going out real time position angle to these two groups of signal resolutions.
Step S1033, Master control chip obtain by ABZ pulse signal the rotor position information that motor is in the high-speed cruising stage.
Particularly, motor is in the high-speed cruising stage, and the increment type interface of Master control chip to AB signal incremental count, and obtains motor position information according to the value M of AB signal incremental count.Concrete, because the resolution of ABZ pulse signal is similarly 12bit, therefore the maximum of M is less than 4096, when M count down to 4096, and M automatic clear, i.e. M=M-4096; When M count down to be less than 0 time, M=M+4096.Motor position information comprises rotor position angle θ and angular velocity omega; First angular position theta is determined according to M value, then according to angular position theta determination angular velocity omega, wherein,
Wherein, because the electrical degree cycle counting full 4096 correspondences is 360 degree, therefore can obtain corresponding angular position theta by the counting of M, in addition, the rate of change according to position angle can calculate angular velocity omega.
Step S1034, Master control chip carry out abnormity diagnosis by ABZ pulse signal to motor, when judging that motor runs appearance exception, send operation exception signal, and it are out of service to control motor; When judging that motor operation does not occur abnormal, jumping to step S1033, continuing calculate and obtain motor position information.
Wherein, Master control chip judges whether motor breaks down and is specially:
Master control chip detects the Z pulse in ABZ pulse signal, and judge whether continuously N2 electrical degree cycle detection to Z pulse, if Z pulse do not detected N2 electrical degree cycle continuously, then judge that motor breaks down; Otherwise, then judge that motor normally runs.Wherein, N2 reports to prevent the amount preset by mistake, and preferably, the span of N2 is 5 ~ 15, and further preferably, N2 is set to 10; And/or:
Master control chip obtain motor angular velocity omega rate of change a1 (rate of change a1 be angular velocity omega acceleration, by carrying out derivative operation to angular velocity omega, the rate of change a1 of angular velocity omega can be obtained), and judge whether rate of change a1 is greater than the rate of change threshold value a0 preset, if rate of change a1 is more than or equal to the rate of change threshold value a0 preset, then judge that motor breaks down; If rate of change a1 is less than the rate of change threshold value a0 preset, then judge that motor normally runs.Wherein, a0 demarcates according to motor actual speed step limiting value, when the rate of change of angular of motor exceedes motor actual speed step limiting value, then illustrate that motor runs to break down, by carrying out suitable setting to a0, the reliability of fault detect can be ensured, reduce the possibility of fault misdescription.Preferably, the span of above-mentioned a0 is 1500 revolutions per seconds ~ 1800 revolutions per seconds, such as, the value of a0 can be set as 1600 revolutions per seconds.
In the embodiment of the present invention, the model of Master control chip can be Infineon 1782, and in addition, Master control chip also can by the chip microcontroller of other types.
In the embodiment of the present invention, the model of decoding chip can be AU6802 or other the decoding chip that can produce SPI digital signal and ABZ pulse signal.
Be understandable that, the illustrative embodiments that above execution mode is only used to principle of the present invention is described and adopts, but the present invention is not limited thereto.For those skilled in the art, without departing from the spirit and substance in the present invention, can make various modification and improvement, these modification and improvement are also considered as protection scope of the present invention.