Patent Description:
This disclosure relates to power tools, and particularly to sensorless control of an electronically commutated brushless motor in a power tool, and more particularly to sensorless field-orientated control of a brushless motor in a power tool.

Power tools may be of different types depending on the type of output provided by the power tool. For example, a power tool may be a drill, hammer, grinder, impact wrench, circular saw, reciprocating saw, and so on. Some power tools may be powered by an alternating current (AC) power source while others may be portable and may be powered by a direct current (DC) power source such as a battery pack. Power tools may use AC or DC motors.

Some power tools have a movable switch such as a trigger or a speed dial that can be used to vary the speed of the motor or the power output by the tool. The switch can be moved from a resting position where the power output of the tool is minimum (e.g., zero), and a fully activated (e.g., pulled) position where the power output of the tool is maximum. Thus, the tool can output the maximum power only when the trigger is fully activated. Also, after the trigger is fully activated, the tool's power output cannot be increased beyond its maximum power. The present disclosure addresses these and other issues related to power tools as described below in the detail.

Use of Brushless Direct-Current (BLDC) motors in power tools has become common in recent years. A typical BLDC motor includes a stator including a series of windings that form three or more phases, and a rotor including a series of magnets that magnetically interact with the stator windings. As the phases of the windings are sequentially energized, they cause rotation of the rotor. BLDC motors generate more power and are more efficient that similarly-sized conventional brushes DC motors and universal motors. BLDC motors are electronically commutated, requiring a controller to commutate proper phases of the motor based on the angular position of the rotor. Conventionally, the motor is provided with a series of Hall sensors that detect a magnetic field of the rotor and provide signals to the controller indicative of the rotor position.

BLDC motors are typically driven using a trapezoidal control scheme - also referred to as six-step commutation control - where the motor is divided to phases of set degrees that are sequentially energized to cause rotation of the rotor. In one implementation, each phase of the motor is energized for a set angle (e.g., <NUM> degrees in a three-phase motor configuration). While trapezoidal control can be relatively efficient at high speed, it may cause torque ripple at low speeds as the commutation cycles between successive phases. Furthermore, in trapezoidal control, at least one phase of the motor is not energized at any given time, which limits the total power input provided to the motor. It would be advantageous to provide a motor control scheme that allows maximum power input to the motor with high level of efficiency at different speed ranges.

Known techniques for sensorless control of BLDC motors are available in applications such as outdoor products and power tools where the motor operates at predictable speed ranges. One such technique involves monitoring the motor induced voltage generated by the back-electromotive force (back-EMF) of the motor in the motor windings to detect a rotational position of the motor in a trapezoidal control scheme. Specifically, as the rotor rotates it induces current through a non-active phase of the motor, which can be detected by the controller to estimate a rotary location of the rotor. In this scheme, the rotor angle is detected with a <NUM>-degree resolution in relation to fixed quadrants and the commutation changes as the rotor angle transitions from one quadrant to the next. It would be advantageous to provide a sensorless control scheme that provides a high degree of resolution of the rotor angle for more efficient and accurate commutation. <CIT> discloses a method of optimizing the operation of a multiphase electric motor which includes the step of activating a series of bottom-side power switches during an off-time interval of a pulse measurement for each of a series of measurement pulse combinations for the motor. <CIT> discloses a method for detecting an initial rotor position for a dynamoelectric machine. <CIT> discloses an operation for a permanent magnet motor for position sensorless drive with a stator design that exhibits a saliency (machine asymmetric) functionally dependent on rotor position as caused by periodic magnetic saturation of stator structure. <CIT> discloses a drive control apparatus for a fuel pump.

According to an example useful to understand the invention, a power tool is provided including a housing, a brushless motor disposed within the housing that includes a stator having windings and a rotor, a power switch circuit that supplies power from a power source to the brushless motor, and a controller configured to apply a drive signal to the power switch circuit to control the supply of power to the brushless motor. In an embodiment, the controller receives at least one signal associated with a phase current of the motor, detects an angular position of the rotor based on the phase current of the motor within a variable speed range of zero to at least <NUM>,<NUM> rotations-per-minute (RPM), and controls the drive signal based on the detected angular position of the rotor to electronically commutate the motor within a torque range of zero to at least <NUM> newton-meters (N. ) and a power output of zero to at least <NUM> watts.

In an embodiment, the controller is configured to apply a vector-space pulse-width modulation (VSPWM) control to the drive signal for field-orientated control of the brushless motor.

In an embodiment, the controller is configured to compute a position difference between the detected angular position of the rotor and a target position associated with a target speed reference, generate an error-correction signal as a function of the computed position difference, and apply the VSPWM control accordingly.

In an embodiment, the power switch circuit includes low-side and high-side switches and one or more shunt components to which the signals associated with the phase currents of the motor are coupled. In an embodiment, the shunt element is provided on an output node of the power switch circuit. In an embodiment, the shunt component is provided in series with one of the low-side switches.

In an embodiment, the power switch circuit includes low-side and high-side switches and the signal associated with the phase current of the motor is coupled to one of the low-side switches to enable the controller to measure the motor phase current using an internal resistance of the low-side switch. In an embodiment, the controller is configured to determine an ON-state of the low-side switches and measure a shunt voltage of one of the low-side switches that in the ON-state to calculate the motor phase current.

In an embodiment, the power tool includes a secondary controller configured to determine at least one of a speed of the rotor or a rotational direction of the rotor and disable supply of power to the motor if the speed of the rotor exceeds a speed threshold or the rotational direction of the rotor is different from a target direction. In an embodiment, the secondary controller is configured to monitor at least one of a sequence or frequency of the phase current of the motor. In an embodiment, the secondary controller is configured to monitor at least one of a sequence or frequency of the drive signal. In an embodiment, the secondary controller is configured to monitor at least one of a sequence or frequency a back electromotive force (back-EMF) voltage of the motor.

In an embodiment, the controller comprises a Cortex-M+ processor core architecture.

In an embodiment, for a motor speed below a speed threshold, the controller is configured to apply a high-frequency injection (HFI) step of injecting a plurality of voltage pulses to the motor and detecting corresponding high-frequency current components to determine the angular position of the rotor.

In an embodiment, for the motor speed above the speed threshold, the controller is configured to apply a sliding-mode observer (SMO) step of estimating a back electromotive force (back-EMF) voltage of the motor based on the phase current of the motor and determining the angular position of the rotor based on the estimated back-EMF voltage.

According to another aspect of this disclosure, a power tool is provided including a housing, a brushless motor disposed within the housing and including a stator and a rotor, a power switch circuit that supplies power from a power source to the brushless motor, and a controller. The controller is configured to receive at least one signal associated with a phase current of the motor, detect an angular position of the rotor based on the phase current of the motor, and apply a drive signal to the power switch circuit to control a commutation of the motor based on the detected angular position of the rotor. In an embodiment, the controller is configured to detect an initial sector within which the rotor is located at start-up, apply the drive signal so as to rotate the motor to a parking angle associated with the detected initial sector, and control a commutation sequence to drive the motor beginning at the parking angle.

In an embodiment, the controller is further configured to apply a high-frequency injection (HFI) step of injecting voltage pulses to the motor and detecting corresponding high-frequency current components to determine the angular position of the rotor.

In an embodiment, the controller is further configured to control the commutation sequence of the motor in open loop and without reference to the angular position of the rotor during a transition period after the motor is parked at the parking angle and before the HFI step. In an embodiment, during the transition period, the controller applies voltage pulses to the motor, detects the corresponding high-frequency current components to estimate a rotor angle, and compares the estimated rotor angle to the parking angle to determine the angular position of the rotor.

In an embodiment, wherein the controller is configured to calculate a motor speed based on the angular position of the rotor and transition from the HFI step to a sliding-mode observer (SMO) step when the motor speed exceeds a threshold. In an embodiment, in the SMO step, the controller is configured to estimate a back electromotive force (back-EMF) voltage of the motor based on the phase current of the motor and determines the angular position of the rotor based on the estimated back-EMF voltage.

In an embodiment, the parking angle is selected from a series of parking angles disposed at <NUM>-degrees apart.

In an embodiment, the power switch circuit includes low-side and high-side switches and each of the parking angles is applied by activating only one of the high-side switches and only one of the low-side switches.

In an embodiment, the drive signal is applied so as to rotate the motor to the parking angle for approximately <NUM> to <NUM> milliseconds.

According to the invention, a power tool is provided including a housing, a brushless motor disposed within the housing and including a stator and a rotor, a power switch circuit that supplies power from a power source to the brushless motor, and a controller. The controller is configured to receive at least one signal associated with a phase current of the motor, detect an angular position of the rotor based on the phase current of the motor, and apply a drive signal to the power switch circuit to control a commutation of the motor based on the detected angular position of the rotor. When a rotor speed is below a speed threshold, the controller applies a high-frequency injection (HFI) step of injecting voltage pulses to the motor and detecting corresponding high-frequency current components to make a first estimation of the angular position of the rotor. When the rotor speed is above a speed threshold, the controller applies a sliding-mode observer (SMO) step of estimating a back electromotive force (back-EMF) voltage of the motor based on the phase current of the motor and making a second estimation of the angular position of the rotor based on the estimated back-EMF voltage. According to the invention, when the rotor speed exceeds the speed threshold, the controller commutates the motor according to the first estimation of the angular position, gradually modifies the commutation of the motor until the first estimation of the angular position substantially matches the second estimation of the angular position, and commutates the motor according to the second estimation of the angular position thereafter.

In an embodiment, the controller gradually ramps down the HFI step after the rotor speed exceeds the speed threshold.

In an embodiment, when the rotor speed exceeds the speed threshold, the controller concurrently applies the HIF and SMO steps for approximately <NUM> to <NUM> milliseconds.

In an embodiment, the controller gradually modifies the commutation of the motor until the first estimation of the angular position is within a margin of error of the second estimation of the angular position.

In an embodiment, in the SMO step, the controller calculates the back-EMF voltage of the motor as a function of the drive signal, the phase current of the motor, and a DC bus voltage input to the power switch circuit.

In an embodiment, in the SMO step, the controller calculates the back-EMF voltage of the motor as a function of motor phase voltage signals and the phase current of the motor.

According to another example useful to understand the invention, a power tool is provided including a housing, a brushless motor disposed within the housing and including a stator and a rotor, a power switch circuit that supplies power from a power source to the brushless motor, and a controller. The controller is configured to receive at least one signal associated with a phase current of the motor, detect an angular position of the rotor by based on the phase current of the motor, and apply a drive signal to the power switch circuit to control a commutation of the motor based on the detected angular position of the rotor. In an embodiment, if the supply of power to the motor is turned OFF to cause the motor to slow down and is turned back ON while the rotor speed exceeds a speed threshold, the controller electronically brakes the motor for a time interval to measure the phase current of the motor and detects the angular position of the rotor based on the measured phase current.

In an embodiment, the power tool includes an ON/OFF switch that selectively cuts off supply of power to the motor based on a user action, and the controller is configured to sense a state of the ON/OFF switch.

In an embodiment, the controller applies a sliding-mode observer (SMO) step to estimate a back electromotive force (back-EMF) voltage of the motor based on the phase current of the motor and detects the angular position of the rotor based on the estimated back-EMF voltage.

In an embodiment, in the SMO step, the controller calculates the back-EMF voltage of the motor as a function of motor phase voltage signals and the phase current of the motor. In an embodiment, after the controller electronically brakes the motor for the time interval to measure the phase current of the motor, the controller calculates the back-EMF voltage of the motor as a function of the phase current of the motor only.

In an embodiment, the speed threshold corresponds to a threshold below which the controller does not apply the SMO step to detect the angular position of the rotor.

In an embodiment, after the controller electronically brakes the motor for the time interval to measure the phase current of the motor, the controller waits for the measured phase current of the motor to fall below a current threshold before it detects the angular position of the rotor based on the measured phase current.

In an embodiment, the speed threshold is in the range of <NUM>,<NUM> to <NUM>,<NUM> rotations-per-minute (RPM).

In an embodiment, if the supply of power to the motor is turned back ON while the rotor speed is smaller than the speed threshold, the controller electronically brakes the motor or allows the motor to coast until the motor speed reaches zero before it begins motor commutation.

According to an embodiment, a power tool is provided including a housing, a brushless motor disposed within the housing and including a stator and a rotor, a power switch circuit that supplies power from a power source to the brushless motor, a trigger switch actuatable by a user configured to selectively cut off supply of power to the brushless motor, and a controller. The controller is configured to receive at least one signal associated with a phase current of the motor, detect an angular position of the rotor by based on the phase current of the motor, and apply a drive signal to the power switch circuit to control a commutation of the motor based on the detected angular position of the rotor. In an embodiment, if the trigger switch is released and reengaged while the rotor speed exceeds a speed threshold, the controller electronically brakes the motor for a time interval to measure the phase current of the motor and detects the angular position of the rotor based on the measured phase current.

In an embodiment, the controller is configured to apply a sliding-mode observer (SMO) step to estimate a back electromotive force (back-EMF) voltage of the motor based on the phase current of the motor and detect the angular position of the rotor based on the estimated back-EMF voltage.

In an embodiment, after the controller electronically brakes the motor for the time interval to measure the phase current of the motor, the controller calculates the back-EMF voltage of the motor as a function of the phase current of the motor only.

The embodiments relating to the two examples useful to understand the invention also do not form part of the scope of protection.

Additional features and advantages of various embodiments will be set forth, in part, in the description that follows, and will, in part, be apparent from the description, or may be learned by the practice of various embodiments. The objectives and other advantages of various embodiments will be realized and attained by means of the elements and combinations particularly pointed out in the description herein.

The drawings described herein are for illustration purposes only and are not intended to limit the scope of this disclosure in any way.

Throughout this specification and figures like reference numbers identify like elements.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are intended to provide an explanation of various embodiments of the present teachings.

Referring to <FIG>, a side cross-sectional view of a power tool <NUM> is provided. In an embodiment, power tool <NUM> includes a housing <NUM>, a motor <NUM> housed therein, a module casing <NUM>, and a planar circuit board <NUM>. The housing <NUM> includes a motor case <NUM> that supports the motor <NUM> and a handle portion <NUM>.

In an embodiment, a gear case <NUM> is secured to an end of the motor case <NUM> opposite the handle portion <NUM>. The gear case <NUM> includes at least one gearset <NUM>, an output shaft <NUM>, and a threaded opening <NUM> to which an accessory tool is secured, either directly or via a nut (not shown). The gearset <NUM> is positioned within the gear case <NUM> and is drivably coupled to the motor <NUM>. The output shaft <NUM> is drivably connected to the gearset <NUM> within the gear case <NUM> and extends perpendicular to the longitudinal axis of the housing <NUM>. A power switch (not shown) is positioned on a side of the motor case <NUM> and allows for the user to turn the power tool <NUM> ON and OFF.

In an embodiment, handle portion <NUM> extends axially from the motor case <NUM> toward a second end of the housing <NUM> and includes two clamp shells or housing covers that mate with the module casing <NUM> around the planar circuit board <NUM>. An alternative-current (AC) power cord <NUM> is attached to the handle portion <NUM> at the second end of the housing <NUM> to supply AC electric power to the power tool <NUM>, though it should be understood that power tool <NUM> may include a battery receptacle at the end of the handle portion <NUM> for removeably receiving a battery pack to supply direct-current (DC) power to the power tool <NUM>.

In an embodiment, planar circuit board <NUM> includes a control circuit board <NUM> and a power circuit board <NUM> arranged along the axis of the power tool <NUM> substantially in parallel. Control circuit board <NUM> accommodates a controller (not shown) and associated circuitry for controlling the speed and other operation of the motor <NUM>. Power circuit board <NUM> accommodates a series of power switches (not shown), which may be configured as, for example, a multi-phase inverter switch circuit, that are controlled by the controller and regulate the supply of power from the power cord <NUM> to the motor <NUM>. Power circuit board <NUM> further includes one or more capacitors <NUM> as well as a rectifier circuit <NUM> that generate a DC voltage on a DC bus line supplied to the power switches.

Additionally, an auxiliary capacitor <NUM> may be housed at the end of the handle portion <NUM> that can be switchably connected to the DC bus line when the AC voltage includes large voltage ripples, as described in detail in <CIT>.

While the present description is provided with reference to a grinder, it is readily understood that the broader aspects of the present disclosure are applicable to other types of power tools, including but not limited to sander, drill, impact driver, tapper, fastener driver, and saw. For example, the power tool <NUM> may include a chuck that is configured to receive a drill bit or a screw bit, thereby allowing the power tool <NUM> to be used as a power drill or a power screwdriver. For more detail of an exemplary power tool described above, reference is made to <CIT>.

In an embodiment, motor <NUM> is a brushless direct-current (BLDC) motor including a rotor including rotor shaft <NUM> on which a rotor lamination stack <NUM> accommodating a series of permanent magnets (not shown) is mounted. The motor <NUM> further includes a stator including a stator lamination stack <NUM> on which a series of stator windings <NUM> are wound. The rotor lamination stack <NUM> is received within the stator lamination stack <NUM> and magnetically interacts with the stator windings <NUM> to cause rotation of the rotor shaft <NUM> around a longitudinal axis of the tool <NUM>. In an embodiment, as described in detail in this disclosure, motor <NUM> is a sensorless BLDC motor, meaning it includes no rotor sense magnet or rotor positional sensor to help the controller control the commutation of the motor <NUM>.

Referring to <FIG>, a partial cross-sectional view of a conventional motor with rotor positional sensors is depicted. As shown here, motor <NUM> is provided with a radial wall or end cap <NUM> with an opening <NUM> that receives the rotor shaft <NUM> therethrough. The end cap <NUM> forms a bearing pocket <NUM> via a cylindrical wall <NUM> around the rotor shaft <NUM> opposite the rotor lamination stack <NUM>. Bearing pocket <NUM> securely receives and support a rotor bearing <NUM> therein to structurally support the rotor with respect to the stator. Additionally, bearing pocket <NUM> houses a sense magnet ring <NUM> that is also mounted on the rotor shaft <NUM>. A radial slot <NUM> formed in the bearing pocket <NUM> allows for insertion of a positional sensor board <NUM> in close proximity to the sense magnet ring <NUM>. Rotor positional sensor board <NUM> supports a series of Hall sensors <NUM>, which sense the position of the sense magnet ring <NUM> and provide the angular position of the rotor to the controller.

<FIG> depicts a partial cross-sectional view of a sensorless BLDC motor according to embodiments of this disclosure. In an embodiment, motor <NUM> is similar to the motor of <FIG> but does not include a rotor sense magnet mounted on the rotor shaft <NUM> or a rotor positional sensor board secured in close proximity to the rotor to sense the rotor position. Bearing pocket <NUM> in this embodiment includes a recess facing the motor <NUM> that is large enough to receive and support the rotor bearing <NUM>. The bearing pocket <NUM> need not have the length to receive a sense magnet and a positional sensor board and is therefore at most <NUM>% smaller in width than bearing pocket <NUM> of <FIG>. This decrease contributes to an overall reduction of <NUM>-<NUM> millimeters from the length of the motor. It also reduces manufacturing costs and eases the assembly process.

Referring to <FIG>, a circuit block diagram of power tool <NUM> including a motor <NUM> and a motor control circuit <NUM> is depicted, according to an embodiment. In an embodiment, motor control circuit <NUM> includes a power unit <NUM> and a control unit <NUM>. Components of power unit <NUM> and control unit <NUM> may be respectively mounted on power circuit board <NUM> and control circuit board <NUM> of <FIG>. In <FIG>, power tool <NUM> receives AC power from an AC power source such as AC mains, or DC power from a DC power source such as a removeable battery pack.

As the name implies, BLDC motors are designed to work with DC power. Thus, if power tool <NUM> is configured to receive power from an AC power source, an embodiment, power unit <NUM> is provided with a rectifier circuit <NUM> between the power supply and the power switch circuit <NUM>. In an embodiment, power from the AC power terminals ACH and ACL is passed through the rectifier circuit <NUM> to convert or remove the negative half-cycles of the AC power. In an embodiment, rectifier circuit <NUM> may include a full-wave bridge diode rectifier <NUM> to convert the negative half-cycles of the AC power to positive half-cycles and output a DC waveform on DC bus line <NUM> provided to power switch circuit <NUM>. Alternatively, in an embodiment, rectifier circuit <NUM> may include a half-wave rectifier to eliminate the half-cycles of the AC power. In an embodiment, rectifier circuit <NUM> may further include a bus capacitor <NUM>. In an embodiment, bus capacitor <NUM> may have a relatively small value to reduce voltage high-frequency transients provided on the DC bus line <NUM>, without significantly smoothing the voltage waveform. In an embodiment, active rectification may be employed for active power factor correction.

In an embodiment, power unit <NUM> may include a power switch circuit <NUM> coupled between the power source B+/B- terminals and motor windings to drive BLDC motor <NUM>. In an embodiment, power switch circuit <NUM> may be a three-phase bridge driver circuit including six controllable semiconductor power devices, e.g. Field-Effect Transistors (FETs), Bipolar Junction Transistors (BJTs), Insulated-Gate Bipolar Transistors (IGBTs), etc..

In an embodiment, control unit <NUM> may include a controller <NUM>, a gate driver <NUM>, and a power supply regulator <NUM>. In an embodiment, controller <NUM> is a programmable device arranged to control a switching operation of the power devices in power switching circuit <NUM>. In an embodiment, controller <NUM> calculates the rotational position of the rotor using a variety of methods. One such method is by measuring the inductive current of the motor <NUM> to calculate the motor back-EMF (Electro-Motive Force) voltage of the motor and use the motor back-EMF in combination with other factors to calculate the rotor position, as discussed later in detail. Controller <NUM> may also receive a variable-speed signal from variable-speed actuator or a speed-dial. Based on the calculated rotor position and the variable-speed signal, controller <NUM> controls commutation sequence of the motor <NUM>. In an embodiment, controller <NUM> outputs drive signals Da, Db, and Dc to the gate driver <NUM>. In an embodiment, drive signals Da, Db and Dc are generated by controller <NUM> using a Space-Vector Modulation technique as discussed later in detail. Gate driver generates output drive voltage signals UH, VH, WH, UL, VL, and WL at voltage levels suitable to drive the gates of the semiconductor switches within the power switch circuit <NUM>. Gate driver <NUM> includes internal circuitry to generate the six voltage signals from the <NUM> drive signals Da, Db, and Dc. By control a PWM switching operation of the power switch circuit <NUM> via the drive signals, controller <NUM> controls the direction and speed by which the motor windings are sequentially energized, thus electronically controlling the motor <NUM> commutation.

In an embodiment, power supply regulator <NUM> may include one or more voltage regulators to step down the power supply to a voltage level compatible for operating controller <NUM> and/or the gate driver <NUM>. In an embodiment, power supply regulator <NUM> may include a buck converter and/or a linear regulator to reduce the power voltage of the power supply to, for example, 15V for powering the gate driver <NUM>, and down to, for example, <NUM>. 2V for powering controller <NUM>.

In an embodiment, a power switch (not shown) may be provided between the power supply regulator <NUM> and the gate driver <NUM>. The power switch may be a current-carrying ON/OFF switch coupled to the ON/OFF trigger or the variable-speed actuator to allow the user to begin operating the motor <NUM>, as discussed above. The power switch in this embodiment disables supply of power to the motor <NUM> by cutting power to the gate drivers <NUM>. It is noted, however, that the power switch may be provided between the rectifier circuit <NUM> and the power switch circuit <NUM> or other suitable location. It is further noted that in an embodiment, power tool <NUM> may be provided without an ON/OFF switch, and controller <NUM> may be configured to activate the power devices in power switch circuit <NUM> when the ON/OFF trigger (or variable-speed actuator) is actuated by the user.

In an embodiment, controller <NUM> controls commutation of the motor <NUM> using a vector control technique referred to as field-oriented control (FOC). FOC is a variable-frequency drive control algorithm that provides several advantages over conventional trapezoidal control or voltage-over-frequency (V/Hz) control schemes often used in power tools having brushless DC motors.

Trapezoidal <NUM>-step commutation control is simple to implement and execute and is therefore a popular option. However, this control scheme can generate high torque ripple, particularly at low speed, which can lead to high vibration and motor noise.

Voltage-over-frequency (V/Hz) control, also known as sinusoidal control, may also be implemented in power tool motor control systems. V/Hz control is a scalar control scheme where a ratio of voltage and frequency is held constant as motor speed (i.e., Hz) changes. This scheme overcomes the torque-ripple issues seen in trapezoidal control by supplying smoothly-varying sinusoidal currents to the motor phases. However, in high speed operations, where the frequency of motor rotation increases, it becomes more challenging to maintain the desired voltage and current using this scheme.

Specifically, V/Hz control scheme is typically performed in open loop with respect to current. V/Hz control effectively provides a given three-phase sinusoidal voltage pattern base on rotor position, where the voltage amplitude is controlled based on motor speed so as to maintain a constant V/Hz ratio. V/Hz control is typically performed in open loop with respect to current. V/Hz control effectively provides a given three-phase sinusoidal voltage pattern base on rotor position, where the voltage amplitude is controlled based on motor speed so as to maintain a constant V/Hz ratio. A Proportional Integral (PI) controller may be provided to reduce motor speed when the current exceeds a current limit, but current and torque is otherwise not well controlled.

FOC is different from sinusoidal control in that a current loop is provided using measured motor currents and without reference to the motor's rotation. FOC thus offers more precise torque and speed control over the complete range of motor operation. Particularly, FOC offers better efficiency for high speed operations as well as operating involving dynamic load changes than V/Hz control.

In FOC, the three phase currents of the stator are measured and converted to two orthogonal components that can be combined in a vector. The first component, known as direct current (Id), is the magnetic flux of the motor induced in the stator windings <NUM> due to rotation of the rotor within the stator. This component runs parallel to the pole axis of the rotor and does not apply a rotational force on the rotor. The second component, known as quadrature current (Iq), is the torque. This component runs perpendicular to the pole axis of the rotor and applies force generating rotational torque. These two components can be controlled independently. The Id current is typically desired to be <NUM> to minimize the unwanted direct torque component contributing to current losses for a given motor operating point. The Iq current is driven with the desired torque, which may be set, for example, according to the user's amount of trigger pull. The two orthogonal components are in the rotating reference frame such that current can be controlled irrespective of motor speed. In this way, Id and Iq currents are equivalent to effective DC quantities per a conventional DC motor. By controlling these two currents, the motor torque and speed can be directly controlled.

<FIG> depicts an exemplary power switch circuit <NUM> having a three-phase inverter bridge circuit, according to an embodiment. This circuit corresponds to a three-phase motor including, for example, <NUM> sets of windings pairs, with each pair wound on two opposite stator teeth. It should be understood that the inverter bridge circuit may include more phases corresponding to the number of phases of the motor. As shown herein, the three-phase inverter bridge circuit includes three high-side FETs and three low-side FETs. The gates of the high-side FETs driven via drive signals UH, VH, and WH, and the gates of the low-side FETs are driven via drive signals UL, VL, and WL. In an embodiment, the drains of the high-side FETs are coupled to the sources of the low-side FETs to output power signals PU, PV, and PW for driving the BLDC motor <NUM>.

In an embodiment, controller <NUM> constructs a sinusoidal voltage waveform for each phase of the motor by controlling a Space-Vector Pulse-Width Modulated (SVPWM) of the high-side and low-side FETs in accordance with the desired Id and Iq currents, as discussed later in detail. The SVPWM technique is a modulation scheme used to determine duty cycles of the PWM signals for high-side and low-side FETs in order to apply a vector voltage as a combination of three phase voltage signals to the motor. The PWM duty cycles of the FETs are varied within each phase in a way to construct phase voltages that are substantially sinusoidal in waveform and that, when applied to the motor sequentially, cause rotation of the motor in the desired direction and speed.

Using a feedback loop of the phase currents of the motor, controller <NUM> calculates the rotor position for use in SVPWM commutation control, as described in detail in this disclosure. In this manner, motor <NUM> may be controlled and commutated without a need for position sensors, such as Hall sensors, thus reducing motor size and manufacturing cost.

To measure the phase currents of the stator, a series of shunt resistors may be provided along the current paths of the motor phases. In an embodiment, as shown in <FIG>, shunt resistors RU and RV are disposed between the PU, PV output signals and the motor windings. Alternatively, as shown in <FIG>, shunt resistors RU and RV are disposed in series with the corresponding low-side FETs, between the low-side FETs S1b and S2b and the ground terminal of the power supply. By measuring the voltage across these resistors, controller <NUM> calculates the current passing through corresponding phases of the motor. In <FIG> and <FIG>, the motor phase currents are represented by signals IU and IV for simplicity, though it should be understood that the controller <NUM> measures the voltage across each shunt resistor RU and RV to calculate the phase current. Thus, in <FIG>, controller <NUM> receives voltage signals on both nodes of RU and RV to calculate the currents IU and IV. In <FIG>, controller needs to receive only one node of RU and RV, since the other node of RU and RV is commonly coupled to the negative terminal of the power supply.

In these embodiments, controller <NUM> needs only measure two of the phase currents IU and IV and calculate the third phase current IW using Kirchhoff's current law, IU + IV + IW = <NUM>. It should be understood that controller <NUM> may alternatively receive other combinations of two signal currents (i.e., IU and IW, or IV and IW). Alternatively, controller <NUM> may receive all three current signals and rely on Kirchhoff's current law as means of redundant current measurement to ensure against circuit component failure.

In power tool applications, particularly cordless tools where size is limited, addition of the two or three shunt resistors described above to the power tool circuit presents challenges. In an embodiment, instead of the three additional shunt resistors, the resistive characteristics of the FETs are taken advantage of to measure the motor current.

In an embodiment, no dedicated shunt resistors are provided, and the low-side FETs themselves are used for current measurement. The FETs have a predominantly resistive conduction mode when in the ON-state, which can be of the order of a few milliohms or less. Thus, in an embodiment, the resistive conduction of the low-side FETs is leveraged in place of shunt resistors, allowing controller <NUM> to calculate the current on each motor phase. By way of example, in <FIG>, instead of measuring current using shunt resistors RU and RV and via signals IU and IV, controller <NUM> measures current passing through low-side FETs S1b, S2b, and S3b via signals PU, PV and PW, as described below.

<FIG> depicts an exemplary flow diagram of a process <NUM> executed by controller <NUM> to measure motor current using the low-side FET resistive conduction characteristics. In an embodiment, beginning with step <NUM>, controller <NUM> receives the shunt voltage (i.e. voltage across the source and drain) of each low-side FET via shunt signals IU, IV, and IW at step <NUM>. At any given time, controller <NUM> determines which of the low-side FETs is in the ON-state (i.e., the gate of which of the low-side FETs is being driven high by controller <NUM>) at step <NUM>, and reads the shunt voltage of the ON-state low-side FET via the shunt signal (IU, IV, or IW) outputted from the ON-state low-side FET to calculate the current across that ON-state low-side FET at step <NUM>. The current across the ON-state low-side FET is determined by Ohms law, where resistance of the low-side FET is a known value. The measured current is the motor phase current corresponding to the ON-state low-side FET.

In an embodiment, for the low-side FET (or FETs) that are in the OFF-state, controller <NUM> ignores the FET voltage. Additional voltage clamping hardware (not shown) may be provided to clamp the FET voltage when the low-side FET is in the OFF-state, in order to protect controller <NUM> from getting damaged by high voltage. The process ends at <NUM>.

Referring back to <FIG>, in an embodiment, in addition to controller <NUM>, a secondary controller <NUM> is provided to determine motor speed and rotation direction. Secondary controller <NUM> protects the power tool from damage and the power tool user from potential harm in the event of hardware or software failure of controller <NUM>. Such failure may lead to incorrect rotation of the motor or the motor spinning at undesireably high speed, both of which can be potentially harmful to the user.

Secondary controller <NUM> may be of the same size and processing power as controller <NUM>, or alternatively may be a relatively small and low power processor. For example, secondary controller <NUM> may be an <NUM>-bit micro-controller (such as a PIC10F200 Microchip®) that is smaller and less expensive than controller <NUM>. Unlike controller <NUM>, secondary controller <NUM>, secondary controller <NUM> does not control motor commutation or other power tool control functions. Rather, secondary controller <NUM> is merely programmed to determine the speed and rotational direction of the motor <NUM> and to shut down power to the motor <NUM> in the event it detects an overspeed condition or incorrect rotation of the motor <NUM>. In an embodiment, secondary controller <NUM> shuts down power to the motor <NUM> by activating a disable signal that disables the gate driver <NUM>, as shown in <FIG>. Alternatively, secondary controller <NUM> may deactivate a semiconductor switch (not shown) disposed on the current path from the power supply to the power switch circuit <NUM>, from the power supply to the power supply regulator <NUM>, from the power supply regulator <NUM> to the gate driver <NUM>, or any other suitable location. Secondary controller <NUM> ensures, that in the event of electrical or software failure by controller <NUM>, the motor <NUM> does not continue operating at high speed or incorrect direction.

In <FIG>, secondary controller <NUM> receives feedback current signals IU, IV, IW from the power switch circuit <NUM> and monitors the sequence of current signals to determine direction of rotation of the motor, and the frequency of the current signals to determine the speed of the motor. Secondary controller <NUM> shuts down power to the motor <NUM> if it detects either an overspeed condition or an incorrect direction of rotation based on the current signals. In an embodiment, secondary controller <NUM> makes this determination using only two of the three current signals IU and IV.

<FIG> depict an exemplary circuit block diagram of power tool <NUM> that similar in many aspects to <FIG> above, except that secondary controller <NUM> does not detect motor speed or direction of rotation based on phase currents. Rather, in this embodiment, secondary controller <NUM> receives at least two (in this example, three) of the drive control signals (i.e., gate driver <NUM> output signals) and determines motor speed and rotation direction based on the frequency and sequence of said signals. In an embodiment, secondary controller <NUM> monitors the voltage waveform on the gate driver <NUM> output signals, determines motor speed based on the frequency of voltage change on the gate driver <NUM> output signals, and determines direction of rotation based on the sequence of voltage changes on the gate driver <NUM> output signals. It is noted that at least two drive signals are needed to determine the direction of rotation of the motor, though motor speed alone can be calculated based on a single drive signal. In an embodiment, the gate driver <NUM> output signals may be all low-side or all high-side drive signals.

In an embodiment, additional voltage divider and low-pass filter circuitry (not shown) is provided to filter out unwanted frequency above the Nyquist Frequency and bring the voltage of the gate driver <NUM> output signals to a level suitable for processing by secondary controller <NUM>. Nyquist Frequency as known by those skilled in the art is defined as <NUM> / (<NUM> * digitization interval). Digitization interval is the time interval between Analog-to-Digital Converter (ADC) conversion samples utilized by secondary controller <NUM>. This arrangement makes it easier for secondary controller <NUM> to sample the frequency of voltage change on the gate driver <NUM> output signals.

In a further embodiment, secondary controller <NUM> utilizes three low-side gate driver <NUM> output signals and performs a signal substation computation to further attenuate unwanted frequencies better enhance the fundamental frequency that is to be monitored for speed and reverse rotation detection. In an embodiment, secondary controller <NUM> subtracts UL from VL, and VL from WL, and compares the two resulting signals for speed and reverse rotation detection. In an embodiment, any two independent subtractions of U, V, and W, will suffice for this implementation. A detailed description of this scheme is provided in <CIT>.

In an embodiment, instead of the gate driver <NUM> output signals, secondary controller <NUM> performs computations described above on the drive signals Da, Db, Dc (or at least two of said drive signals) outputted by controller <NUM> to detect speed and rotation of the rotor.

<FIG> depicts another exemplary circuit block diagram of power tool <NUM> that is similar in many aspects to <FIG> above, except that the secondary controller <NUM> detects direction of rotation and speed of the motor based on the back-EMF (Electro-Motive Force) voltage of the motor instead of the motor phase currents. In an embodiment, to detect the motor back-EMF voltage, an attenuator <NUM> is electrically coupled to the U, V, and W terminals of the motor <NUM>. Attenuator <NUM> is a voltage divider that, in an exemplary embodiment, includes two resistors, and simply divides the voltage by a constant in order to reduce the motor back-EMF voltage to a voltage that is within the operating voltage range of the motor (e.g., typically 3V or 5V). A Low-Pass Filter (LPF) <NUM> is coupled to the output of the attenuator <NUM> to remove impulse noise and, in an embodiment, convert the PWM pulse drain to an analog voltage by averaging the high and low periods of the back-EMF voltage signal. The secondary controller <NUM> receives three voltage output (or two voltage outputs in an embodiment) from the LPF <NUM> corresponding to the phases of the motor <NUM>.

In an embodiment, secondary controller <NUM> is programmed to determine which of the three voltage signals is in open phase (i.e., not being actively driven) based on the shape of the three voltage signals. A phase signal that is in pulse-width modulation is being actively driven by controller <NUM>, whereas a phase signal that is sloped is the open-phase signal carrying the motor back-EMF. Secondary controller <NUM> in this manner monitors the motor back-EMF and, based on the frequency of the back-EMF zero-crossings, and the sequence of the open phases, it determines the speed and direction of rotation of the motor <NUM>. Secondary controller <NUM> may also monitor the zero-crossing on only one of the three signals to determine the speed of the motor, and on two of the signals to determine its direction of rotation.

In an embodiment, instead of detecting the zero-crossings of the voltage waveforms, the secondary controller may detect other characteristics of the voltage signals as they transition from high to low or low to high. In this manner, secondary controller <NUM> protects the power tool <NUM> from system failure without commutating the motor <NUM> or even receiving the motor commutation signals.

In an embodiment, controller <NUM> controls motor commutation by FOC and calculates the angular position of the rotor by analyzing feedback phase current signals from the motor. Depending on the speed of the motor, controller <NUM> utilizes different algorithms to accomplish this, as described herein in detail.

<FIG> depicts a partial block system diagram of the power tool <NUM> showing controller <NUM> software component blocks for FOC execution, according to an embodiment.

In an embodiment, controller <NUM> is configured (by software) to receive two stator phase current signals Ia and Ib (corresponding to lu and Iv signals from the power switch circuit <NUM>). Controller <NUM> calculates the third current using Kirchoff's current relation, Ia + Ib + Ic = <NUM>, where la, Ib, and Ic are the three phase currents.

In an embodiment, controller <NUM> includes a Clarke transformation unit <NUM> that coverts the three phase currents, which are sinusoidal, into a <NUM>-axis coordinate system. Clarke transformation unit <NUM> produces two signals Iα and Iβ, which are two sinusoidal waveforms that are <NUM> degrees apart.

Components of the <NUM>-axis coordinate system of the stator currents are time varying and difficult to process using traditional PI processes. Thus, in an embodiment, controller <NUM> includes a Park transformation unit <NUM> that converts the two-axis system from a fixed reference to a rotating reference frame that is synchronous with the rotor flux. Park transformation unit <NUM> uses a rotor position signal θ (discussed below) to covert Iα and Iβ to DC waveforms Id and Iq, where Id and Iq are the in-phase and quadrature components of the stator currents. As described above, the Id current is aligned with the rotor flux, whereas the Iq current is orthogonal to the rotor flux and is therefore responsible for torque generation.

In a BLDC control system including position (Hall) sensors, rotor position signal θ may be derived from the position sensors. Alternatively, controller <NUM> includes a position estimator <NUM> that calculates (estimates) the rotor position signal θ using the motor current signals Iα and Iβ. This disclosure described various methods used to estimate rotor position in conjunction with FOC. As will be described later in detail, these methods vary depending on whether the motor is at start-up, low-speed operation, or high-speed operation.

In an embodiment, controller <NUM> also includes a speed estimator <NUM> that calculates motor speed ω based on frequency of rotor position change in the rotor positional signal θ.

In an embodiment, controller <NUM> includes a PI (Proportional-Integral) loop controller <NUM> that compares the corresponding axis vectors with reference currents Id* and Iq* and determines Id error correction signals to generate DC drive voltage signals Vd* and Vq* accordingly. The Id* reference controls the rotor magnetization flux. The Iq* reference controls the torque output of the motor. In many circumstances, since Iq generates motor torque and Id does not, the Id* reference is set to <NUM> and Iq* is set to a target value. The obtained DC drive voltage signal Vq* corresponds to the amount of voltage correction that is needed to generate enough torque to drive the motor at a desired (target) speed.

In an embodiment, the Iq* may be a fixed value, for example in the range of <NUM> to 20A, configured according to the motor specifications to provide sufficient current to drive the motor. Alternatively, Iq* may be a variable value calculated to obtain a target speed that is set based on, for example, the distance of power tool trigger-pull by the user, speed setting on power tool speed dial, etc. In an embodiment, a frequency generator <NUM> is provided to generate a target speed reference signal ω* as a function of the target speed of the motor. In an embodiment, Iq* is calculated as a PI function of the calculates motor speed ω and the target speed reference signal ω*.

Since the DC drive voltage signals Vd* and Vq* are on a rotating reference, in an embodiment, controller <NUM> includes an inverse Park transformation unit <NUM> that converts the DC drive voltage signals Vd* and Vq* signals back to stationary reference frame drive voltage Vα* and Vβ*. Controller <NUM> also includes an inverse Clarke transformation unit <NUM> that converts the stationary reference frame drive voltage signals Vα* and Vβ* from a <NUM>-axis coordinate system back to <NUM>-axis coordinate system comprising three motor phase voltage signals Va, Vb, and Vc.

In an embodiment, controller <NUM> includes a Space-Vector Pulse-Width Modulation (SVPWM) unit <NUM>, which receives the three phase voltage signals Va, Vb, and Vc and generates drive signals Da, Db and Dc for controlling the switching operation of the power switch circuit <NUM> accordingly. SVPWM unit <NUM> controls the duty cycles of the drive signals Da, Db and Dc in such a way that the power switch circuit <NUM> switches output a substantially sinusoidal phase voltage waveform on each phase Pu, Pv, and Pw of the motor. These sinusoidal phase voltage waveforms are <NUM> degrees apart and correspond to the three motor phase voltage signals Va, Vb, and Vc. Details of SVPWM is beyond the scope of this disclosure and can be ascertained by persons skilled in the art.

<FIG> depicts a speed-time diagram depicting procedures implemented by controller <NUM> to determine the rotor position (i.e., position estimator <NUM> in <FIG>) from start-up to full speed. In this example, the motor full speed is <NUM>,<NUM> rpm, though it should be understood that this value is by way of example only. <FIG> depicts a flow diagram for a process <NUM> corresponding to <FIG>.

Conventional sensorless FOC implementations may be found in applications such as washing machines and other home appliances that operate at substantially constant speed and constant torque. In such implementations, after an initial detection of the rotor position, FOC execution may be handle with relative ease without significant changes to the rotor speed or torque output. In power tool applications, however, the rotor speed is subject to rapid change, either based on a change in target speed as determined by depression of a trigger switch or based on a change in torque as the power tool engages a work piece. Embodiments of the invention as described herein provide a technique for reliable detection of the rotor and FOC execution using the detected rotor position in a variable-speed and/or variable-torque environment suitable for a power tool. In an embodiment, this technique may be used to operate a power tool within a variable speed range of zero to at least <NUM>,<NUM> rotations-per-minute (RPM), preferably to at least <NUM>,<NUM> RPM, more preferably to at least <NUM>,<NUM> RPM; within a torque range of zero to at least <NUM> newton-meters (N. ), more preferably to at least <NUM> N. m, and more preferably to at least <NUM> N. ; and a power output of zero to at least <NUM> watts, more preferably to at least <NUM> watts, and more preferably to at least <NUM> watts.

Referring to <FIG> and <FIG>, at motor start-up, i.e., after the power tool is initially powered up, controller <NUM> executes a process herein referred to as Initial Position Detection (IPD) to estimate the rotor position at step A. IPD allows controller <NUM> to detect the initial angular position of the rotor with approximately a <NUM>-degree accuracy. In other words, controller <NUM> identifies the motor sector within which the rotor angle is located. In an embodiment, this step is completed within approximately <NUM>-<NUM>, in this example <NUM>.

After the rotor sector position is estimated in IPD, in an embodiment, controller <NUM> proceeds to park the at discrete positions at step B. The reasons for and details of this step are described later in detail. In an embodiment, the parking process entails forcing the motor to rotor to the end of the detected sector, i.e., at discrete positions that are <NUM> degrees apart. In an embodiment, this step is performed for approximately <NUM>-<NUM>, in this example approximately <NUM>.

After parking, controller <NUM> issues an open-loop frequency command for motor start-up at step C. In this step, while the parking force is still being applied to the motor, controller <NUM> begins to generate and apply High-Frequency Injection (HFI) voltage signals to the motor. This allows controller <NUM> to detect the rotor position more accurately via an HFI position estimator described later in detail. Also, this step allows controller <NUM> to remove the parking current and begin commutating the motor using the detected rotor position to kick-start the motor. In an embodiment, this step is performed in approximately <NUM>-<NUM>, in this example approximately <NUM>.

Controller <NUM> fully transitions to closed-loop control using HFI for a low-speed motor operation at step D. As discussed later in detail, HFI entails applying high frequency voltage pulses to the drive voltage signals and reading the corresponding current to detect the rotor position. Controller <NUM> continues this process until a speed threshold (herein referred to as the HFI speed threshold) is reached. HFI speed threshold corresponds to the motor speed below which the motor does not generate sufficiently dependable back-EMF phase voltage that can be detected and reliably used by controller <NUM> to calculate the motor position. Also, in some systems, HFI speed threshold may additionally correspond to the motor speed above which it is difficult to inject and process high-frequency voltages associated with HFI for calculation of motor position. In this example, the HFI speed threshold is <NUM> rpm, though it should be understood that the HFI speed threshold can vary depending on the motor and power tool size and power requirements. In an embodiment, the HFI speed threshold is in the range of <NUM>,<NUM> to <NUM>,<NUM> rpm, preferably in the range of <NUM>,<NUM> to <NUM>,<NUM> rpm, more preferably in the range of <NUM>,<NUM> to <NUM>,<NUM> rpm.

Although low-speed operation of steps C and D is described in this disclosure using HFI by way of example, it should be understood that other suitable sensorless start-up and low speed motor control methods may be employed in place of HFI. In one example, motor may be operated using an open-loop kickstart control scheme until the HFI speed threshold is reached. This scheme entails using a preset commutation sequence beginning at the IPD / Parking position and ramping up the motor speed using the preset commutation sequence at open loop, without reference to the rotor position. Alternatively, a sector detection scheme as disclosed in <CIT>, which is incorporated by reference in its entirety, may be employed in place of HFI. In this scheme, controller <NUM> pauses motor drive control to inject voltage pulses in the present and subsequent sectors. Based on the corresponding current waveforms, controller <NUM> detects when to commutate the subsequent sector.

At high speed, i.e., at speeds greater than the HFI speed threshold, controller <NUM> transitions from HFI to a process referred to as Sliding Mode Observer (SMO) at step E. In an embodiment, the transition step may be completed in a few milliseconds. Once the transition period is complete, controller <NUM> performs closed-loop motor control using SMO at step F at motor speeds above the HFI speed threshold up to the maximum motor speed. In an embodiment, SMO is process for estimating the motor back-EMF using the phase currents. HFI speed threshold described above is typically set to a speed value below which SMO is unable to accurately detect the motor back-EMF using the phase currents, and therefore the HFI process is relied upon instead.

Although step F is described in this disclosure using SMO by way of example, it should be understood that other suitable rotor tracking methods may be employed in place of SMO. Examples of such methods include, but are not limited to, phase-locked loop (PLL) control for tracking the rotor position based on motor currents and applied motor voltages.

Each of the steps A-F is described in detail herein.

The process of Initial Position Detection (IPD) (Step A) is described herein with reference to <FIG>.

<FIG> depicts an exemplary excitation sequence table including high-side and low-side drive signals corresponding to rotor angles V1-V6 within a full rotation of the rotor, according to an embodiment. <FIG> depicts a diagram representing a full <NUM>-degree orientation of the rotor angles from V1 through V6, according to an embodiment. In this embodiment, V1 through V6 correspond to <NUM>-degree intervals of the rotor orientation beginning at <NUM> degrees.

IPD allows controller <NUM> to detect the initial angular position of the rotor with approximately a <NUM>-degree accuracy. In other words, controller <NUM> identifies the motor sector within which the rotor angle is located. In IPD, controller <NUM> sequentially injects a series of voltage pulses in accordance with the drive signals of <FIG> at rotor angles V1 through V6. Each voltage pulse has the same voltage and duration. In this embodiment, for each voltage pulse, two high-side FETs and a low-side FET, or one high-side FET and two low-side FETs, are simultaneously activated. For example, voltage V1 (corresponding to <NUM>-degree rotor angle) is applied by activating UH, VL and WL signals of the power switch circuit <NUM>, voltage V2 (corresponding to <NUM> degrees rotor angle) is applied by activating UH, VH and WL signals of the power switch circuit <NUM>, etc..

In an embodiment, after each voltage pulse, controller <NUM> measures the corresponding motor current using the shunts as previously described. <FIG> depicts an exemplary diagram showing the measured current for each pulse. The voltage pulse closest to the actual the position of the rotor generates the highest inductive current. Thus, controller <NUM> identifies the rotor angle to be in close proximity to the angle associated with the highest-current voltage pulse. In this example, IV4 exhibits the largest current amplitude. Thus, it is determined that the actual rotor position is in the proximity of rotor angle V4. In an embodiment, where <NUM> voltage pulses are applied, controller <NUM> identifies the rotor position as V4 ± <NUM> degrees.

The IPD process described here is usually reliable for estimating the sector in which the rotor is located. It has been found, however, that in some instances, the detected current may be too close to distinctly identify the correct rotor position. For example, in <FIG>, where the rotor position is close to V4 (<NUM> degrees), the two largest current pulses are associated with V1 (<NUM> degrees) and V4 (<NUM> degrees).

In an embodiment, to solve this problem, controller <NUM> ensures that the largest current pulse is greater in amplitude than the second-largest current pulse by at least a threshold. For example, in <FIG>, if IV4 = 20A, IV1 = 17A, and the threshold = 1A, controller <NUM> determines that the difference between the two current pulses exceeds the threshold and selects angle V4 as the correct proximate area of rotor position.

However, if threshold is not satisfied, controller <NUM> may determine the correct angle by examining the neighboring current pulses of the two peak current pulses. The current pulse whose neighboring pulses are on average larger is the correct sector. For example, in <FIG>, controller <NUM> can determine whether the neighboring rotor angles of V4 (i.e., V3 and V5) have larger average current pulses than the neighboring rotor angles of V1 (i.e., V2 and V6). Since in this example (IV3 + IV5) > (IV2 + IV6), controller <NUM> determines rotor angle V4 to be the correct proximate area of rotor position, even if the IV1 and IV4 pulses were closer in magnitude.

<FIG> depicts an alternative excitation sequence table including high-side and low-side drive signals corresponding to rotor angles V1-V6 within a full rotation of the rotation of the rotor, according to an embodiment. In this embodiment, rotor angles V1-V-<NUM> respectively correspond to a different range of angles from <FIG>, in this example <NUM> to <NUM> degrees at <NUM>-degree intervals, according to an embodiment. This arrangement allows for only one high-side FET and one low-side FET to be simultaneously activated for each voltage pulse. For example, voltage pulse V1 (corresponding to <NUM> degrees rotor angle) is applied by activating UH, and WL signals of the power switch circuit <NUM>, voltage pulse V2 (corresponding to <NUM> degrees rotor angle) is applied by activating VH and WL signals of the power switch circuit <NUM>, etc..

The parking process (stop B) is described herein with reference to <FIG> and <FIG>, according to an embodiment.

In an embodiment, the IPD process described above allows the controller <NUM> to robustly identify the location of the rotor with a <NUM>-degree resolution, i.e., within one of six sectors defining the full range of the angular orientation of the rotor. In an embodiment, to enable the controller <NUM> to begin motor start-up at a more precise rotor angle than the <NUM>-degree resolution provided by IDP, controller <NUM> is configured to park the rotor at <NUM>-degree intervals. In an embodiment, the rotor parking location is set to <NUM> degrees after respective angles V1 though V6. In an embodiment, for IPD execution according to <FIG>, the parking angles are determined according to <FIG> and Table <NUM> below:.

In an embodiment, controller <NUM> executes parking in the desired location by applying the appropriate drive signals the power switches of the power switch circuit <NUM> for a period that ensures completion of movement of the rotor. This period may be, for example, approximately <NUM>-<NUM>, in this example approximately <NUM>.

In an embodiment, controller <NUM> generates SVPWM drive signals based on the rotor parking angle and drive the power switch circuit <NUM> accordingly. In an embodiment, controller <NUM> may toggle between drive signals associated with neighboring angles Vn and Vn+<NUM> of a target angle in order to park the rotor at the target angle. For example, in order to park the rotor at <NUM> degrees, controller <NUM> toggles between drive signals associated with <NUM>-degrees (V1 in <FIG>) and <NUM>-degrees (V2 in <FIG>) in successive cycles, thus driving VH and VL at a <NUM>% duty cycle.

In an alternative embodiment, parking is executed using a combination of tables of <FIG> and <FIG>. In an embodiment, where IDP is executed using the table of <FIG>, the parking voltage may be applied using the table of <FIG> , (e.g., in order to park the rotor at <NUM> degrees, controller <NUM> activates UH and WL signals of the power switch circuit <NUM>). Similarly, where IDP is executed using the table of <FIG>, the parking voltage may be applied using the table of <FIG> (e.g., in order to park the rotor at <NUM> degrees, controller <NUM> activates UH, VH and WL signals of the power switch circuit <NUM>).

Open-loop frequency command start-up (step C) and low-speed control using HFI (step D) are described herein in detail, according to an embodiment.

In an embodiment, HFI is a process by which controller <NUM> calculates the rotor position at low speed. HFI entails adding high-frequency voltage pulses to the drive voltage signals, and later extracting and measuring currents that correspond to the high-frequency voltage pulses from the motor current to detect the rotor position. Due to the high frequency and low magnitude, these voltage pulses do not carry sufficient current to drive the motor. However, their magnetic interaction with the rotor flux affects the current in a way that is sufficiently measurable by controller <NUM> to calculate the rotor position.

Referring to <FIG>, a partial block system diagram of the power tool <NUM> in relation to high-frequency injection for low-speed control is depicted. This figure is similar to <FIG> and includes many of the same features, but controller <NUM> is additionally provided with an HFI unit <NUM> and a frequency generator <NUM>. Additionally, in this embodiment, the position estimator <NUM> of <FIG> is an HFI-based position estimator <NUM>. These features are described here in detail.

In an embodiment, frequency generator <NUM> generates a sawtooth function ωi - also referred to as a frequency command - that sets the voltage frequency of the high-frequency voltage pulses. The frequency set by the frequency generator <NUM> may be pre-set according to motor size, type, power requirements, or other factors.

In an embodiment, the HFI unit <NUM> receives the frequency command, sets the magnitude of the high-frequency voltage pulses, and multiples the magnitude by the frequency command to generate high-frequency voltage waveforms Vαi* and Vβi* as follows: <MAT> <MAT> where Vi is the amplitude of the injected voltage, ωi = 2πfi, and fi is the injection frequency. In an embodiment, the injection frequency is between <NUM> to <NUM>, preferably between <NUM> to <NUM>, for example around <NUM>. In an embodiment, the Vi amplitude is approximately 20V for a 120V power supply (i.e., <NUM>/<NUM> of the DC bus <NUM> voltage), with a peak current of <NUM>.

In an embodiment, the high-frequency voltage waveforms Vαi* and Vβi* generated by HFI unit <NUM> are substantially sinusoidal. The high-frequency voltage waveforms Voi* and Vβi* are added to the stationary reference frame drive voltage signals Vα* and Vβ* generated by the inverse Park Transformation unit <NUM>. The sums of the waveforms Vαi* + Vα* and Vβi* + Vβ* is provided to the inverse Clarke Transformation unit <NUM>, which converts these <NUM>-axis voltage signals to three phase voltage signals Va, Vb, and Vc, as previously discussed. The phase voltage signals PU, PV, PW provided to the motor from the power switch circuit <NUM> accordingly include high-frequency voltage components associate with Vαi* and Vβi*, as well as drive voltage components.

In an embodiment, HFI-based position estimator <NUM> extracts the high-frequency current components that are associated with HFI from the motor phase current signals. In an embodiment, HFI-based position estimator <NUM> receives current signals Iα and Iβ from the Clarke transformation unit <NUM>. As previously discussed, current signals Iα and Iβ are sinusoidal waveforms that are <NUM> degrees apart resulting from execution of Clarke transformation on the three phase-current signals la, Ib, and Ic to obtain <NUM>-axis coordinate system. HFI-based position estimator <NUM> retrieves high-frequency current components associated with the high-frequency voltages injected by HFI unit <NUM> from the current signals Iα and Iβ. HFI-based position estimator <NUM> uses the retrieved high-frequency current components to calculate the rotor position and output the rotor position signal θ. As previously discussed, rotor position signal θ is used by Park transform unit <NUM> to convert the Iα and Iβ to Id and Iq current components on a rotational reference frame, and by the Inverse Park transform unit <NUM> to convert the DC drive voltage signals Vd* and Vq* signals back to stationary reference frame drive voltage signals Vo* and Vβ*. Rotor position signal θ is also used by speed estimator <NUM> to calculate motor speed ω.

In an embodiment, it is desired to maintain a certain ratio of high-frequency voltage and drive voltage. If the drive current Iq is set too high by the PI loop unit <NUM>, it does not leave enough bandwidth for injection of high frequency voltage pulses, preventing controller <NUM> from deciphering the rotor position using HFI. Thus, in an embodiment, Iq* is set to a fixed value, for example, in the range of <NUM> to 30A (in this example 20A) depending on motor characteristics. Alternatively, as previously discussed, Iq* may be calculated as a PI function of the calculated speed ω and reference target speed ω* so long as sufficient ratio of high-frequency voltage to drive voltage is maintained.

Referring to <FIG>, a block system diagram detailing the HFI-based position estimator <NUM> is depicted, according to an embodiment. In an embodiment, HFI-based position estimator <NUM> receives current signals current signals Iα and Iβ (represented here as Iαβ) and uses a band-pass filter (BPF) <NUM> to filter out currents outside a set frequency bandwidth. In an embodiment, the BPF <NUM> has a center frequency corresponding to the HFI <NUM> injection frequency (e.g., <NUM>). This allows the HFI-based position estimator <NUM> to obtain high-frequency currents Iαβi associated with HFI.

In an embodiment, high-frequency currents Iαβi are then demodulated and filtered in demodulation unit <NUM> to separate the rotor-induced currents from the HFI currents. Specifically, the high-frequency currents Iαβi are demodulated using Fourier Transform unit <NUM> to obtain demodulated current signal Iαβi_het, where <MAT> <MAT> and where Ii1. Cos(2θ) and Ii1. Sin(2θ) components are associated with rotor-induced currents, and Ii0. t) and Ii0. t) are associated with HFI currents.

In an embodiment, since the rotor-induced currents include the rotor angle information θ, the demodulated current signal Iαβi_het is then passed through a low-pass filter (LPS) <NUM> to extract the rotor-induced currents represented as Iαβi_dem. A tan-inverse function unit <NUM> applies a tan-inverse of (Iβi_dem / Iαi_dem) to calculate angle 2θHFI from the rotor-induced currents Iαβi_dem.

In an embodiment, angle 2θHFI has a range of <NUM>-<NUM> degrees for <NUM>-<NUM> degrees of rotor rotation. For example, if the rotor is at <NUM> degrees, 2θHFI = <NUM>, and if rotor is at <NUM> degrees, 2θHFI = <NUM>. Thus, angle 2θHFI is divided by <NUM> at compensation unit <NUM>. This is the reason why HFI has only a <NUM>-degree rotor visibility. The angle is also compensated for at compensation unit <NUM>, where Qcomp is for example <NUM> degrees corresponding to phase shift due mainly to the LPF <NUM>. The resulting output is HFI-estimated rotor angle θHFI.

It is noted that, in an embodiment, the division of 2θHFI by <NUM> is not a simple division; rather, this calculation involves monitoring the sample by sample difference of 2θHFI over time and calculating an integral of the sample differences to construct the rotor angle θ. This is because, as mentioned above, HFI has a rotor visibility of half the rotor position at any given point and ascertaining the exact rotor position that is not offset by <NUM> degrees requires sampling the rotor movement as well as present detected position.

The HFI process described above can be used by controller <NUM> to accurately detect the rotor position at low speed (i.e., step D in process <NUM>). However, when transitioning from the parking step (step B) to HFI at start-up, since the 2θHFI division process requires rotor rotation in order to accurately ascertain the correct rotor location, controller <NUM> performs open-loop frequency command to start-up the motor at step C, described here.

<FIG> depicts a current waveform diagram showing the three phase currents Iv, lu, Iw as controller <NUM> transitions through steps A-F. In an embodiment, in transitioning from the parking step (step B) to open-loop frequency command start-up (step C), controller <NUM> begins to generate and apply HFI voltage to the motor while the parking force is still being applied. HFI-based position estimator <NUM> at this point begins to measure the motor current to calculate rotor angle θHFI, though as discussed above, this rotor angle θHFI has a range of <NUM>-<NUM> degrees and thus may be offset by <NUM> degrees.

To determine the correct rotor angle θ at start-up, controller <NUM> compares the HFI-estimated rotor angle θHFI with the parking angle θPARK.

<FIG> depicts a flow diagram of a process <NUM> executed by controller <NUM> to determine the correct rotor angle θ at start-up, according to an embodiment. In an embodiment, controller <NUM> compares the HFI-estimated rotor angle θHFI with the parking angle θPARK at step <NUM>. Controller sets the start-up rotor angle θ to θHFI if the estimated rotor angle θHFI is within a predetermined angle range of the parking angle θPARK (e.g., within <NUM> degrees of θPARK) at step <NUM>. If the estimated rotor angle θHFI is outside the predetermined angle range of the parking angle θPARK, controller <NUM> sets the start-up rotor angle θ to θHFI + <NUM> if θHFI < <NUM> degrees, and to θHFI - <NUM> if θHFI >= <NUM> degrees at step <NUM>. This ensures that the start-up rotor angle θ is accurately calculated by HFI and is not off by <NUM> degrees.

Alternatively, If the estimated rotor angle θHFI is outside the predetermined angle range of the parking angle θPARK, controller <NUM> simply sets the start-up rotor angle θ to θPARK. While the parking angle θPARK is not as accurate as the HFI angle θHFI, it is sufficiently accurate for execution of open-loop frequency command for motor start-up.

In an embodiment, controller <NUM> simultaneously applies HFI and parking voltages to the motor for a relatively short period (e.g., <NUM>-<NUM>) to execute the above-described process <NUM>. Thereafter, controller <NUM> removes the parking current and begin commutating the motor using in open-loop to kick-start the motor. This transition can be seen approximately half-way through step C in <FIG>. Controller <NUM> commutates the motor using fixed commutation commands beginning with the start-up rotor angle θ calculated as described above. This process continues until the rotor speed reaches approximately <NUM>-<NUM> rpm (e.g., <NUM> rpm), at which point the motor has sufficient speed for the compensation unit <NUM> to accurately calculate the rotor angle θ. Controller <NUM> then transitions to closed-loop HFI control for low-speed motor operation (step D).

<FIG> depicts a zoomed-in view of <FIG> showing the three phase currents Iv, lu, Iw as controller <NUM> executes closed-loop HFI for low-speed motor operation (step D). This zoomed-in view covers approximately a full <NUM>-degree motor rotation cycle. As shown here, HFI pulses are injected with low amplitude and high-frequency to the drive voltage signals, creating voltage ripples along the drive voltage sinusoidal waveform.

In an embodiment, controller <NUM> continues the low-speed control using HFI (step D) until the HFI speed threshold is reaches. HFI speed threshold corresponds to the motor speed below which the motor does not generate sufficiently dependable back-EMF phase voltage that can be detected and reliably used by SMO process. Also, in some systems, HFI speed threshold may additionally correspond to the motor speed above which it is difficult to inject and process high-frequency voltages associated with HFI for calculation of motor position. The HFI speed threshold may vary depending on the motor and power tool size and power requirements. In an embodiment, the HFI speed threshold is in the range of <NUM>,<NUM> to <NUM>,<NUM> rpm, preferably in the range of <NUM>,<NUM> to <NUM>,<NUM> rpm, more preferably in the range of <NUM>,<NUM> to <NUM>,<NUM> rpm.

Once the rotor speed exceeds the HFI speed threshold, controller <NUM> begins a transition process (step E) from HFI to SMO for measuring the rotor angle. Since HFI and SMO use different processes to measure rotor position, their rotor angle measurements at times do not match. A sudden transition from HIF to SMO therefore can cause a jolt in the rotor rotation, which should preferably be avoided.

<FIG> depicts a flow diagram of a process <NUM> executed by controller <NUM> for transition from HFI to SMO (step E), according to an embodiment. In an embodiment, controller begins this process at <NUM> and proceeds to start the SMO-based position estimator, which is discussed below in detail, at step <NUM>. The SMO-based position estimator begins to conduct the calculations needed to measure rotor speed θSMO. Controller <NUM> is concurrently measuring rotor speed θHFI using the HFI process. At step <NUM>, controller <NUM> calculates an error value θerror as the difference between θHFI and θSMO to determine if the two measurements match (or are at least sufficiently close to one another). If the measurements match, controller <NUM> jumps to step <NUM>, where it stops using the HFI-based position estimator <NUM> and returns to process <NUM> shown in <FIG> at step <NUM>, where controller <NUM> execute high-speed control using SMO (Step F) described below. If the two measurements don't match, at step <NUM>, controller <NUM> gradually ramps up or down the motor commutation sequence until the two measured angles θHFI and θSMO match or are at least within a small margin of error. Concurrently, controller <NUM> gradually ramps down the high-frequency injection process until is it fully stopped. Controller <NUM> proceeds from step <NUM> to step <NUM>. In an embodiment, process <NUM> (i.e., step E) takes approximately <NUM>-<NUM> (in this example <NUM>).

Once the transition from HFI to SMO (step E) is complete, controller <NUM> executes SMO alone for rotor angle measurement (step F).

Referring to <FIG>, a partial block system diagram of the power tool <NUM> is depicted. This figure is similar to <FIG> and includes many of the same features, where the position estimator is SMO-based position estimator <NUM>. SMO is a process for estimating the motor back-EMF using the motor phase currents and calculating the rotor angle based on the motor back-EMF. SMO-based position estimator <NUM> receives the current signals Iα and Iβ from the Clarke transformation unit <NUM>. As previously discussed, current signals Iα and Iβ are sinusoidal waveforms that are <NUM> degrees apart resulting from execution of Clarke transformation on the three phase-current signals la, Ib, and Ic to obtain <NUM>-axis coordinate system. SMO-based position estimator <NUM> also receives drive signals Da, Db, and Dc from the output of SVPWM unit <NUM>, as well as the bus voltage signal <NUM> and motor speed signal ω from speed estimator <NUM>, to calculate the motor voltage being applied to the motor. By comparing the applied voltage and the measured motor current, SMO-based position estimator <NUM> is able to retrieve the motor back-EMF voltage and use it to calculate the rotor angle θ.

In an embodiment, Id* is set to <NUM> and Iq* is calculated as a PI function of the calculates motor speed ω and the target speed reference signal ω* generated by frequency generator <NUM>, as previously discussed.

Referring to <FIG>, a block system diagram detailing the SMO-based position estimator <NUM> is depicted, according to an embodiment. In an embodiment, SMO-based position estimator <NUM> receives current signals Iα and Iβ (represented here as Iαβ), motor speed signal ω, DC bus voltage Vdc, and drive signals Da, Db, and Dc. SMO-based position estimator <NUM> includes an αβ phase voltage calculator <NUM> that multiplies the bus voltage Vdd by the drive signals Da, Db, and Dc and obtain sinusoidal voltage signals representing the motor drive voltage. αβ phase voltage calculator <NUM> also conducts a Clarke transformation on the sinusoidal voltage signals to generate <NUM>-axis sinusoidal voltage waveforms Vα and Vβ (here represented as Vαβ). SMO-based position estimator <NUM> further includes a Sliding-Mode (SM) current observer <NUM> that combines the voltage signals Vα and Vβ with the motor speed signal ω, as well as two feedback signals Eαβ and Zαβ, to generate Îαβ. Eαβ represents the calculated motor back-EMF, Zαβ represents the flux linkage, and Îαβ is the estimated (i. e, predicted) phase current that should be passing through the motor based on these inputs. SMO-based position estimator <NUM> includes a bang-bang / saturation unit <NUM> that calculates the flux linkage Zαβ in such a way so as to the minimize the error (difference) between Îαβ and Iαβ. In other words, bang-bang / saturation unit <NUM> repeatedly modifies the flux linkage Zαβ in the feedback loop to SM current observer <NUM> until the Îαβ is equal to Iαβ. The resulting flux linkage Zαβ measurement is provided to adaptive low-pass filters (LPF) <NUM>, which receive the motor speed ω and calculate the motor back-EMF as a function of flux voltage (which depends on motor speed) as follows: <MAT>.

A tan-inverse unit <NUM> calculates angle θdel as a tan-inverse function of the calculated back-EMF voltages Eαflt and Eβflt. This angle is compensated for by a compensation angle (in this example <NUM> degrees) corresponding to phase shift due mainly to the LPF <NUM> to obtain SMO-estimated rotor angle θ.

<FIG> and <FIG> depict a partial block system diagram of the power tool <NUM> using an alternative SMO execution technique, and block system diagram detailing the alternative SMO-based position estimator <NUM> respectively, according to an embodiment. As shown in these figures, in this embodiment, SMO-based position estimator <NUM> does not calculate the motor phase voltages based on DC bus voltage Vdc and drive signals Da, Db, and Dc. Rather, SMO-based position estimator <NUM> receives the motor phase voltage signals PU, PV, and PW directly from the motor <NUM>. SMO-based position estimator <NUM> includes an αβ phase voltage calculator <NUM> that receives the phase voltage signals PU, PV, and PW and constructs <NUM>-axis sinusoidal motor voltage waveforms Vα and Vβ (here represented as Vαβ) accordingly. The rest of the SMO process is similar to <FIG> and <FIG> described above.

In an embodiment, the SMO equation described above is represented as follows: <MAT> where uα-β corresponds to the motor phase voltages, iα-β represents the measured motor phase current, Rs is the per-phase stator resistance, Ld is the direct axis stator per-phase inductance, Lq is the quadrature axis stator per-phase inductance, and eα-β = ∓Eext (sin θe / cos θe) and corresponds to the extended back-EMF of the motor. The SMO-based Position Estimator <NUM> estimates eα-β for a given iα-β and uα-β and calculates the position of the rotor as a function of tan-<NUM> (eα/eβ).

In an embodiment, controller <NUM> executes SMO for high-speed operations up to the maximum tool speed. In an embodiment, controller <NUM> may implement hysteresis threshold value above or below the HFI threshold for transitioning back to HFI when the motor speed falls.

In an embodiment, controller <NUM> used for FOC execution and rotor position detection is a <NUM>-bit processor employing ARM Cortex-M0+ processor core. A Cortex-M0+ processor core includes a two-stage pipeline architecture and is therefore cheaper and consumes less power than other ARM Cortex-M processors. Based on conventional wisdom, Cortex-M0+ processors are considered too slow to handle the processing power requires for FOC execution and rotor position detection, particularly in high-speed and/or high-torque motor control applications where the rotor angle can change very quickly in an unexpected manner. However, in an embodiment, by removing the Hardware Abstraction Layer (HAL) of the processor core, which provides a programming interface that allows the processor to interact with hardware resources, and customizing the related registers accordingly, Cortex-M0+ processors can be used to implement the techniques described above for power tool applications. Efficient rotor detection schemes described above have proven to be capable of execution by Cortex-M0+ processors. In particular, parking and open-loop frequency command start-up (steps B and C) prior to HFI, as well as the transition step from HFI to SMO (step E), provide for more accurate and efficient detection of rotor position without requiring significant processing power conventionally required. It should be noted, however, that more powerful processors, e.g. Cortex-M1, Cortex-M2, etc. may be alternatively utilized.

In a power tool, the tool is turned ON and OFF via a power switch. Power switch may be a current-carrying ON/OFF switch actuatable by a user, or a contact switch coupled to a trigger switch, a speed dial, or an actuator. Power switch may be coupled to a contact switch disposed on the current path of the power supply to cut off supply of power to the motor. Alternatively, power switch may be coupled electronically to a semiconductor switch disposed on the current path of the power supply. Power switch may also be coupled to a micro-electronic switch that sends a signal to the controller <NUM> to cut off supply of power to the motor.

When the power switch is turned OFF, the motor is allowed to coast down gradually to a halt by cutting off supply of power to the motor. Alternatively, a brake is applied to the motor to bring it rapidly to a halt. A brake may be either mechanical, e.g., brake pads applied to the motor shaft, or electronic, e.g. activating the high-side or the low-side power switches simultaneously to short the phases of the motor, thus using the motor's own voltage to bring it to a halt. Reference is made to <CIT> for examples of electronic braking methods executed by the motor controller to brake a BLDC motor in a power tool.

In most power tools, when the power switch is turned back ON during braking or coasting of the motor, the motor controller completes the motor braking or allows the motor to finish coasting and come to a complete halt before it is restarted again. While this method is simple to execute, it is not desirable in many power tool applications where the tool user may turn the power switch ON and OFF frequently and in succession, for example, by depressing and repressing the power tool trigger switch. Doing so introduces unnecessary and undesirable delays in the power tool usage and is frustrating to the user. What is desirable is to provide a control mechanism whereby, when the power switch is turned ON during motor coasting or braking, the motor controller detects the present position and speed of the rotor and resumes motor commutation at the detected position and speed. This process is referred to as "spinning restart.

In a power tool having a BLDC motor and position sensors for detecting the rotor position, the motor controller is able to detect the position of a spinning rotor based on the position sensors and begin commutating the motor at the detected position and at the present motor speed for spinning restart. In sensorless control, particularly sensorless FOC control where motor current is measured to detect rotor position and speed, this process faces complications.

<FIG> and <FIG> depict a process <NUM> for spinning restart of a motor <NUM> controlled by the SFOC process, according to an embodiment.

Referring to <FIG>, in an embodiment, process <NUM> starts at 'run' step <NUM>. In this step, controller <NUM> controls motor commutation using SFOC as disclosed with reference to steps A-F described above.

In an embodiment, controller <NUM> determines whether the power switch has been turned OFF in step <NUM>. In an embodiment, controller <NUM> continues to 'run' the motor at step <NUM> as long the power switch has not been turned OFF.

In an embodiment, if the power switch has been turned OFF, controller <NUM> determines whether the motor output speed is greater than zero in step <NUM>. As previously discussed, the rotor speed may be determined via speed estimator <NUM> using outputs of the HFI-based position estimator <NUM> in HFI (step D) or the SMO-based position estimator <NUM> in SMO (step F). In IPD (step A) or parking (step B), the rotor speed is zero. If controller <NUM> determines that the rotor speed is zero, it stops process <NUM> at step <NUM>.

In an embodiment, if controller <NUM> determines that the rotor speed is greater than zero, it proceeds to determine whether the rotor speed is greater than the HFI speed threshold in step <NUM>. Since HFI requires injection of high-frequency voltages to the drive voltage to estimate the rotor position, its execution during spinning restart encounters many challenges. Also, in an embodiment, spinning restart is significantly important when the rotor is operating at low speed. Thus, in an embodiment, if controller <NUM> determines that the rotor speed is at or below the HFI speed threshold, it does not even monitor the status of the power switch for spinning restart. Rather, controller <NUM> proceeds to brake the motor or allow it to coast down until the rotor comes to a complete stop at step <NUM>. Thereafter, controller stops the process <NUM> at step <NUM>. A user may turn the power switch ON to restart the motor after the rotor has come to a complete stop.

In an embodiment, if controller <NUM> determines that the rotor speed is above the HFI speed threshold, it brakes the motor or allows the motor to coast at step <NUM>, while intermittently checking the status of the power switch at step <NUM>. As long as the power switch remains OFF, controller continues to brake the motor or allow it to coast in step <NUM>. If the power switch has been turned ON during braking or coasting, controller <NUM> goes into 'spinning restart' mode to step <NUM>.

Referring to <FIG>, in an embodiment, beginning at step <NUM>, controller <NUM> electronically brakes the motor for a predetermined period at step <NUM>. The electronic brake is applied by simultaneously activating the three low-side FETs, allowing controller <NUM> to obtain current measurements Ia and Ib via the shunts RU and RV at step <NUM>. Without this electronic braking period (i.e., while motor is coasting), the high-side and low-side power switches of power switch circuit <NUM> are left open, current measurements Ia and Ib are zero, and controller <NUM> is unable to rely on SMO for rotor position estimation. This electronic braking period allows controller <NUM> to obtain the needed current measurements from the motor. In an embodiment, the predetermined time interval should be sufficiently long for controller <NUM> to measure motor currents. In an example, the predetermined time interval is between <NUM>-<NUM>, preferably approximately <NUM>-<NUM>.

As previously described, in addition to current measurement signals Iα and Iβ (i.e., Ia and Ib after Clarke transformation), SMO-based position estimator <NUM> relies on phase voltage signals (i.e., drive signals Da, Db, and Dc in <FIG> and uα-β in the SMO estimation equation) to calculate the rotor position. In an embodiment, since the motor is not being actively driven, controller <NUM> sets the input phase voltage signals provided to the SMO-based position estimator <NUM> to zero at step <NUM>. SMO-based position estimator <NUM> thus calculates the motor back-EMF in direct proportion to current signals Iα and Iβ to estimate the rotor position (i.e. rotor angle θ) while electronic braking is applied, at step <NUM>. Speed estimator <NUM> calculates the rotor speed ω using the estimated rotor angle θ in step <NUM>.

In an embodiment, controller <NUM> once again compares the calculated rotor speed ω to the HFI speed threshold in step <NUM>. If the calculated rotor speed ω is at or lower than the HFI speed threshold, controller <NUM> applies a brake to the motor or allows it to coast down until the rotor comes to a complete stop at step <NUM>. Thereafter, controller <NUM> proceeds back to step <NUM> to stops the process <NUM>. However, if the calculated rotor speed ω is greater than the HFI speed threshold, controller <NUM> executes SMO in steps <NUM>-<NUM> for spinning restart of the motor.

In an embodiment, to execute SMO, controller <NUM> initially waits for the Iq current (from Park transformation) to fall below a maximum Iq value at step <NUM>. This is done because, in braking at high motor speed, the motor current components Id and Iq values rise rapidly, and the motor preferably should not be restarted as long as high currents circulate through the motor windings. Doing so would cause the motor current to flow back into the DC bus. In an embodiment, controller <NUM> waits until the Iq current component falls below the maximum Iq value (Iq_max) by a threshold value (Iq_threshold). In an example, Iq_max is approximately <NUM> A and Iq threshold is approximately <NUM> A.

In an embodiment, after Iq current falls to Iq_max - Iq_threshold, controller <NUM> initializes PI loop controller <NUM> error gains Id* and Iq* for SMO execution in step <NUM>. In an embodiment, Iq* is set to iq_max and Id* is set to the measured Id current.

In an embodiment, PI loop is executed on Id and Iq to obtain Vd* and Vq* drive voltage signals at step <NUM>. Inverse Park unit <NUM>, inverse Clarke unit <NUM>, and SVPWM unit <NUM> calculates drive signals Da, Db, and Dc according to the error gains signals Id* and Iq* for driving the motor at step <NUM>. This process allows controller <NUM> to start motor commutation at the detected rotor angle θ and rotor speed ω.

It is noted that, in an embodiment, steps <NUM>-<NUM> above are executed while electronic braking is being applied to the motor beginning at step <NUM>.

In an embodiment, since Id current does not generate torque to the motor, it is desirable to gradually ramp down the Id current from its detected value to zero. It was found that setting the Id* to <NUM> from the offset would cause the motor back-EMF to spike, often causing flow of current from the motor back to the DC bus. To avoid this, in an embodiment, in steps <NUM> and <NUM>, controller <NUM> initially sets Id* to the measured Id and incrementally decreases Id* (in this example at <NUM> intervals) until Id* has reached zero. Controller <NUM> continues to execute steps <NUM> and <NUM> in the meantime. Once Id* has reached zero, controller <NUM> returns to the 'run' step <NUM>, wherein controller <NUM> executed SMO normally as previously described to control motor commutation.

Referring to <FIG>, time graph <NUM> depicts a rotor angle waveform <NUM>, which represents the actual angular position of the rotor measured in simulation using Hall sensors or similar electro-mechanical sensors; SMO-estimated rotor angle waveform <NUM>, which represents the rotor angle θ calculated by the SMO-based position estimator <NUM>; and motor current waveform <NUM>, which represents one of the motor phase angle current signals la. This graph includes a motor drive period <NUM>, in which the motor is being driven using FOC commutation technique of this disclosure during drive period <NUM>; a motor coasting period <NUM>, during which the motor is allowed to coast (i.e., upon power tool switch being turned off) by deactivating the power switch circuit <NUM>; a braking period <NUM>, in which electronic braking is applied to the motor by activating the three low-side switches in unison. In an embodiment, braking period <NUM> corresponds to step <NUM> of process <NUM> described above. As seen here, SMO is unable to detect the rotor angle during the coasting period <NUM>. However, once electronic brake is applied, SMO is able to accurately detect the motor back-EMF and thus estimates the rotor angle during the braking period <NUM>.

According to an alternative embodiment, if spinning restart takes place while the rotor is coasting, controller <NUM> may measure the motor back-EMF directly using the motor phase signals PU, PV and PW. In a coasting motor, since all the switches of the power switch circuit <NUM> are OFF, the phase signals PU, PV and PW only carry the motor back-EMF. In an embodiment, controller <NUM> may detect the rotor position and speed based on the motor back-EMF on signals PU, PV and PW.

Claim 1:
A power tool comprising:
a housing;
a brushless motor disposed within the housing, the motor comprising a stator having a plurality of windings and a rotor;
a power switch circuit that supplies power from a power source to the brushless motor; and
a controller configured to receive at least one signal associated with a phase current of the motor, detect an angular position of the rotor based on the phase current of the motor, and apply a drive signal to the power switch circuit to control a commutation of the motor based on the detected angular position of the rotor, characterized by
when a rotor speed is below a speed threshold, the controller is configured to apply a high-frequency injection (HFI) step of injecting a plurality of voltage pulses to the motor and detecting corresponding high-frequency current components to make a first estimation of the angular position of the rotor and, when the rotor speed is above a speed threshold, the controller is configured to apply a sliding-mode observer (SMO) step of estimating a back electromotive force (back-EMF) voltage of the motor based on the phase current of the motor and making a second estimation of the angular position of the rotor based on the estimated back-EMF voltage,
wherein, when the rotor speed exceeds the speed threshold, the controller is configured to commutate the motor according to the first estimation of the angular position, gradually modify the commutation of the motor until the first estimation of the angular position substantially matches the second estimation of the angular position, and commutate the motor according to the second estimation of the angular position thereafter.