Method for controlling an electric motor
11682988 · 2023-06-20
Assignee
Inventors
Cpc classification
International classification
Abstract
A method is described for controlling an electric motor having a rotor. The method is carried out after a shutdown of the motor has been initiated. The method includes starting a timer in a motor controller, performing regenerative braking to recapture kinetic energy from the rotor as electrical energy, and using the recaptured electrical energy from the regenerative braking to power the motor controller. If the timer in the motor controller exceeds a predetermined timer value, a flag is set in memory in the motor controller to indicate that the motor has stopped.
Claims
1. A method for controlling an electric motor, the method being carried out after start up of the motor has been initiated, the method comprising: performing a check for whether a flag has been set in memory in a motor controller, the flag being an indication that the motor has stopped; and if the flag has been set, allowing the motor controller to commence a motor start up routine upon determining that the flag has been set, or if the flag has not been set, delaying the motor controller from commencing a motor start up routine for a predetermined delay period; wherein if no flag has been set, the method further comprises enabling a braking routine during the predetermined delay period.
2. The method for controlling an electric motor of claim 1, wherein, if the flag has been set, the method further comprises clearing the flag.
3. The method for controlling an electric motor of claim 1, wherein the braking routine comprises freewheel braking.
4. The method for controlling an electric motor of claim 1, wherein the predetermined delay period corresponds to a minimum time period required for the rotor to come to a complete stop after the motor has been switched off.
5. The method for controlling an electric motor of claim 1, wherein the predetermined delay period is between 0.5 and 5 seconds.
6. The method for controlling an electric motor of claim 5, wherein the predetermined delay period is between 1 and 2 seconds.
7. The method for controlling an electric motor of claim 1, wherein the method is used to start a motor having been shutdown by a method comprising: starting a timer in a motor controller; performing regenerative braking to recapture kinetic energy from the rotor as electrical energy; using the recaptured electrical energy from the regenerative braking to power the motor controller; and if the timer in the motor controller exceeds a predetermined timer value, setting a flag in memory in the motor controller to indicate that the motor has stopped.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) In order that the present invention may be more readily understood, embodiments of the invention will now be described, by way of example, with reference to the following accompanying drawings, in which:
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
DETAILED DESCRIPTION OF THE INVENTION
(10) Due to cogging torque, the motor enters an oscillation (jitter) phase just before stopping. There is no signal from the rotor position sensor during this oscillation, so the software is unable to tell if the motor is oscillating or not. However, after the rotor position sensor signal is lost, the jitter phase will typically last for a defined period, referred to herein as the settling period. The settling period will be different for each motor and will depend on a number of factors, for example the rotor magnet strength, size of air gap etc. For example, a motor may have a settling period of around 0.6 seconds.
(11) To avoid the need to incorporate a delay period onto the start up procedure, it is desirable to check while the motor is powering down if the motor has been stationary for at least the settling period. However, this may not always be possible if the power to the motor and the motor controller has been switched off, as is typically the case. Accordingly, a method will now be described which incorporates a regenerative braking stage during the motor shutdown procedure which charges a capacitor. The power in the capacitor can then be used to power a timer in the motor controller that runs to ensure the settling period has completed.
(12)
(13) A motor shutdown procedure is started. This may be, for example, in response to a user turning off it off, or automatic shutdown following a fault detection.
(14) A timer is started. This timer is used to determine the length of time that has passed from the point at which the motor was switched off. A timer threshold can be set for the motor. This threshold can be set such that if the threshold is reached, it can be determined that a time period of at least the settling period will have passed since the motor shutdown commenced.
(15) A regenerative braking stage is commenced. This stage has two major purposes: firstly that it has a braking effect on the motor and therefore acts to slow the motor down more quickly once it has been turned off; and secondly, it recaptures kinetic energy from the motor and stores it in a capacitor as electrical energy which can be used to continue running the timer during this period after shutdown.
(16) A check is done to see if a capacitor threshold has been reached. It will be understood that attempting to drive too much power into a capacitor could damage the capacitor or other electrical components of the motor. The threshold could, for example, be a measurement of voltage across the capacitor. If the threshold has not yet been reached, then the procedure returns to step 1.3 regenerative braking continues. However, once the threshold has been reached then the procedure proceeds on to step 1.5.
(17) The motor is still spinning, but no more energy is needed to charge the capacitor. However, the motor still needs to be stopped, and so a freewheel braking stage is commenced. Freewheel braking is known, and so will not be described in great detail here.
(18) A check to see if the timer threshold described above has been reached. If the timer threshold has not been reached then the freewheeling braking of step 1.5 is continued. If the threshold is reached, then it proceeds to step 1.7.
(19) A “motor stopped” flag is set. This flag is a non-volatile flag and can be stored, for example, in EEPROM (electrically erasable programmable read-only memory).
(20) The motor has stopped.
(21) A further step may be included in the method above which checks the speed of the motor. If the rotor is spinning slowly prior to the regenerative braking step being carried out, then it may be desirable to know that. In this instance a reduced timer threshold may be adopted as it will be known that the rotor will take a shorter period of time to stop compared to if it was starting from a high initial speed. This will reduce the chances of the controller running out of power before a flag can be set due to lower levels of energy recapture at low starting rotor speeds.
(22) The non-volatile “motor stopped” flag allows a check to be made when the motor is next started up as to whether or not a delay is required prior to the normal motor start up routine being carried out.
(23) The motor is started. This could be, for example, in response to a user turning it on.
(24) A check to see if the “motor stopped” flag has been set is carried out. If the flag as been set, then there is certainly that the motor has completely stopped and it is safe to restart the motor immediately. The routine therefore proceeds to step 2.3. If no “motor stopped” flag has been set then there is no certainty that the motor has come to a complete stop, and there is a chance that the motor is still in a jitter phase. Therefore the routine proceeds instead to step 2.4.
(25) After identifying that the “motor stopped” flag has been set in step 2.2, the flag can be cleared, and the process proceeds directly to step 2.6 in which the typical start up routine for the motor is carried out.
(26) After identifying that no “motor stopped” flag has been set in step 2.2, the motor enables freewheel braking. If the motor is still moving, then freewheel braking will encourage it to come to a stop faster.
(27) Once freewheel braking has been enabled, a delay of a predetermined period of time, which in this case is 1.25 seconds, is carried out before the process finally proceeds to step 2.6.
(28) The typical motor start up routine is commenced.
(29) The example predetermined delay period of 1.25 seconds described above is calculated such that it corresponds to a minimum time period required for the rotor to come to a complete stop after the motor has been switched off. It will be appreciated that this value will vary from motor to motor. In most cases for motors contained in handheld appliances, for example, this predetermined delay period is expected to be between 0.5 and 5 seconds.
(30)
(31) The motor 2 is a permanent magnet brushless motor, and comprises at least one phase winding. The control system 3 comprises a rectifier 5, a DC link filter 6, an inverter 7, a gate driver module 8, a microcontroller 9 and a regenerative braking module 10.
(32)
(33) The DC link filter 6 comprises a link capacitor C1 and a link inductor L1. The link capacitor C1 acts to smooth the relatively high-frequency ripple that arises from inverter switching. As described below in more detail, the link capacitor C1 is not required to smooth the rectified DC voltage at the fundamental frequency. Consequently, a link capacitor of relatively low capacitance may be used. The link inductor L1 acts to smooth any residual current ripple that arises from inverter switching. Again, since the link inductor L1 is intended to reduce ripple at the switching frequency of the inverter 10, an inductor of relatively low inductance may be used.
(34) The inverter 7 comprises a full bridge of four power switches S1-S4 that couple the DC link voltage to the phase winding 14. Each power switch S1-S4 is an IGBT, which is capable of operating at the voltage level typically of most mains power supplies. Other types of power switch, such as BJTs or MOSFETs, might alternatively be used depending on the rating of the power switch and the voltage of the AC supply 4. Each of the switches S1-S4 includes a flyback diode, which protects the switch against voltage spikes that arise during inverter switching.
(35) The gate driver module 8 drives the opening and closing of the switches S1-S4 of the inverter 7 in response to control signals received from the microcontroller 9.
(36) The microcontroller 9 comprises a processor 11, a memory device 12, and a plurality of peripherals 13 (e.g. ADC, comparators, timers etc.). The memory device 12 stores software instructions for execution by the processor 11. The memory device 12 can also comprise an EEPROM memory area where flags, such as the “motor stopped” flag described in the methods of
(37) With regard to the control schemes for the motor 2, the start up, acceleration and steady speed modes may be typical of those for a brushless permanent magnet motor, and in any case fall outside the scope of the present invention, so will not be described in any great detail here.
(38) The regenerative braking module 10 is shown as separate to the microcontroller 9 for the purpose of
(39) Regenerative braking is carried out after the power to the motor has been turned off.
(40) The waveform of
(41) In Stage B, switch S4 is enabled (turned ON), and because the rotor is still spinning, a phase current is generated in the phase winding which acts as an inductor.
(42)
(43) Once Stage B has ended, the switch S4 is disabled (switched OFF), and the magnetic energy stored in the induced magnetic field is converted into electrical energy which acts to charge the DC link capacitor C1.
(44) The cross-hatched area under the phase current waveform in
(45) Stage C lasts for a predetermined period of time, T_C. The length of T_C is a compromise. It needs to be long enough to allow the phase current to return to zero, but also short enough that, at even the highest rotor speed, it does not cross the next rising edge in the resync signal. This is particularly important in sensorless systems in which no Hall sensor is used to determine rotor position. If T_C is too long in a sensorless system, then there is a chance that the next rising edge of the resync signal could be missed, and the control scheme would fail. In one specific embodiment of a motor having a top speed of 120 krpm, and where T_B=¼ T_RESYNC, the period T_C is set at 150 μs (1.5×10.sup.−4 seconds). The shortest possible resync period, T_RESYNC_MIN, is when the motor is spinning at its top speed. In the specific embodiment previously described, T_RESYNC_MIN is 250 μs when the motor is spinning at the top speed of 120 krpm, and therefore T_B+T_C would be 212.5 μs at top speed, which is less than T_RESYNC_MIN. Therefore the software would still be able to detect the next rising edge in the resync signal even at the highest rotor speed. It will be appreciated that the length of T_C will depend on a number of factors, including the top speed of the motor, and also the desired length of T_B. However, preferably the length of T_C is between (½×T_RESYNC_MIN) and (¾×T_RESYNC_MIN).
(46) As the rotor slows, the length of T_B will obviously change as T_RESYNC changes. To simplify the scheme, and to keep the memory and power requirements of the system down, the method above proposes to have a fixed length of T_C. However, in an alternative embodiment, it may be desirable to also change the value of T_C as the rotor slows to account for the longer T_RESYNC period. For example, values of T_C for different T_RESYNC values may be kept in a lookup table and employed.
(47)
(48) The motor enters regenerative braking mode, for example as Step 1.3 of the flow diagram of
(49) The resysnc period is measured. This is carried out by measuring a timer between two resync rise events in the resync signal.
(50) From the previously determined resync period, calculate T_B. In the examples explored above this would be a quarter of the resync period just measured. Switch S4 is enabled, and the phase current starts to rise as shown in the waveform of
(51) A check is made to ensure that the DC Link voltage isn't over a set threshold. As discussed earlier, the DC link capacitor C1 can be damaged if it is over-charged. The threshold therefore acts to protect the capacitor and other electrical components. If the DC link voltage is over the threshold, then the process proceeds directly to step 8.8. If the DC link voltage is under the threshold, then the process proceeds to step 8.5.
(52) Once it is established that the DC link voltage is under the threshold value, a check is then made to see if the regen timer started in step 8.3 has overflowed the T_B period which was calculated in step 8.3. If the timer has not yet overflowed the T_B period, then the process repeats step 8.5 until the timer does overflow. When this happens, the process proceeds to step 8.6.
(53) This step corresponds to Stage C. The switch S4 is disabled, and the energy stored within the magnetic field is converted to electrical energy which is then stored in the DC link capacitor. Once the switch S4 has been turned OFF, there is then a delay for a predetermined period of time (i.e. T_C). This delay may be measured by the regen timer. After the predetermined period of time (T_C) has passed, Stage C has completed, and the process moves to step 8.7.
(54) This stage represents a repeat of Stage A. The system waits for the detection of the next rising edge event in the resync signal. Once this has been detected, an updated resync period can be calculated, and then the process cycles back to step 8.3. The rotor slows over time, and so it is important that the resync period is updated regularly to ensure that the length of T_B is appropriate for the length of the current resync period, T_RESYNC.
(55) Freewheel braking mode is enabled and takes over from regenerative braking.
(56) Freewheel braking is known, and so will not be explained in great detail herein. However, to summarise, freewheel braking comprises enabling both S2 and S4 (S2 and S4 are switched ON). In this way, current induced in the phase winding freewheels around the bottom half of the inverter, and in response, an electromotive force is generated which acts to oppose the rotation of the rotor, thus slowing it down. The switches S2 and S4 remain switched ON during the whole freewheel braking period.
(57) The methods for carrying out the regenerative braking described above involve the turning ON of switch S4 during stage B, and then turning it off during stage C. However, an alternative would be to use switch S2 instead of S4. In this alternative, the direction of the flow of current through the phase winding would be reversed. In this alternative, in Stage C the current would flow through the diodes in switches S4 and S1 instead of S2 and S3 as shown in
(58) It will be appreciated that the schemes for motor shutdown, motor start up, and regenerative braking described herein may be applicable for any motor. However, they can be particularly advantageous when used in the control scheme for motors in consumer products, where any delay to the start-up of a product when switching it on could be perceived to a consumer as an inconvenience, or an indication that the product could be faulty.
(59) Whilst particular embodiments have thus far been described, it will be understood that various modifications may be made without departing from the scope of the invention as defined by the claims.
(60) For example, in the embodiments described above, regenerative braking charges the DC link capacitor C1. However, in alternative embodiments, a separate capacitor or charge holding device may be used to store the energy recaptured during regenerative braking. However, by using the DC link capacitor, no additional components are required which acts to keep the cost of the motor system down.
(61) The embodiments described above show the motor being powered by an AC power supply. However, one or more of the above motor shutdown, motor start up, and regenerative braking schemes may also be used in the control of a battery powered electric motor. In this instance, a battery powered motor would not have a DC link capacitor to charge, however, a separate capacitor, or other charge holding device may be used instead. Alternatively, the energy recaptured by the regenerative braking scheme may be stored back in the main battery pack used to power the motor during its operation.