An electronic motor control system provides selectable linear and pulse-width modulated (PWM) operation without generating cross-over distortion. The system includes an output stage that has a pair of push-pull drivers each coupled to a terminal of the motor. The electronic motor control system also includes a pulse-width modulated (PWM) driver for providing pulse-width modulated drive signals to an input of the output stage when the pulse-width modulated mode is selected and a linear amplifier stage that provides a linear analog signal to the input of the output stage in linear mode, so that both drivers are operated to supply the current to the motor. In pulse-width modulated mode, a driver is selected for PWM operation, while the other driver is operated to supply a fixed voltage. A feedback control loop senses motor current and provides outputs to the pulse-width modulator and the linear amplifier stage.

BACKGROUND

1. Field of Disclosure

The field of representative embodiments of this disclosure relates to motor drivers and other power output electronics that selectably operate in pulse-width modulated (PWM) and linear modes. and in particular to motor drivers in which cross-over distortion is eliminated while maintaining a continuous feedback loop when the operating mode is changed.

Motor controllers, audio amplifiers, and other power output drivers such as those for driving haptic feedback devices, may be provided with high efficiency using a class-D type output, or low distortion, noise and offset using a linear amplifier. In particular, for motor controllers, a pulse-width modulated (PWM) output stage has been used in combination with linear output motor control to provide high-efficiency for large excursions and low distortion and offset error by transitioning to a linear control once the motor-driven position is close to the commanded position or for functions such as maintaining image focus (auto-focus) or image stabilization. Such operation enhances accuracy by providing a less noisy environment when the system is in a linear operation mode, while providing high power efficiency for large excursions when the system is in the PWM operating mode.

However, when operating a fully-differential switch/amplifier, such as an H-bridge arrangement, while both PWM control and linear control may be implemented, the linear control is operated with class-B biasing, in order to match a closed-loop feedback transfer function of the PWM control in which one device on each side of the H-bridge is always off. Class-B biasing, by definition, introduces cross-over distortion that may be reduced, but not eliminated.

Therefore, it would be advantageous to operate a motor controller such that may operate selectively in PWM or linear mode without cross-over distortion.

SUMMARY

Improved motor driver operation is accomplished in electronic motor control systems, integrated circuits including the motor control systems and their methods of operation.

The electronic motor control system includes an output stage for supplying the current to the motor, which has a first push-pull driver coupled to a first output for coupling to a first terminal of the motor and a second push-pull driver coupled to a second output for coupling to a second terminal of the motor. A mode selection control circuit selects between a pulse-width modulated mode and a linear mode of the electronic motor controller. The electronic motor control system also includes a pulse-width modulator output stage for providing pulse-width modulated control signals to an input of the output stage when the mode selection control circuit selects the pulse-width modulated mode. In pulse-width modulated mode, a driver is selected according to a direction of the current supplied to the motor and is pulse-width modulated while the other driver is operated to supply a fixed voltage when the mode selection control circuit selects the pulse-width modulated mode. A linear amplifier stage provides a linear analog signal to the input of the output stage in linear mode, so that both drivers are operated to supply the current to the motor. A feedback control loop senses the current supplied to the motor and provides a first output to the pulse-width modulator and a second output to the linear amplifier stage.

In some embodiments, a first transfer function from an input to the selected one of the first push-pull driver or the second push-pull driver in the pulse-width modulated mode is made substantially equivalent to a second transfer function from the input to the combination of the first push-pull driver and the second push-pull driver in the linear mode, so that an output of a loop filter of the feedback control loop settles to approximately a same value after the mode selection control changes between the linear mode and the pulse-width modulated mode as a previous value of the output of the loop filter prior to the change.

The summary above is provided for brief explanation and does not restrict the scope of the claims. The description below sets forth example embodiments according to this disclosure. Further embodiments and implementations will be apparent to those having ordinary skill in the art. Persons having ordinary skill in the art will recognize that various equivalent techniques may be applied in lieu of, or in conjunction with, the embodiments discussed below, and all such equivalents are encompassed by the present disclosure.

DESCRIPTION OF ILLUSTRATIVE EMBODIMENT

The present disclosure encompasses circuits and integrated circuits that include improved motor control systems and their method of operation. The electronic motor control systems include an output stage that supplies current to a motor, and which has a first push-pull driver coupled to a first output for coupling to a first terminal of the motor and a second push-pull driver coupled to a second output for coupling to a second terminal of the motor. A mode selection control circuit selects between a pulse-width modulated mode and a linear mode of the electronic motor controller. In pulse-width modulated mode, a driver is selected according to a direction of the current supplied to the motor and is pulse-width modulated to provide a single-ended class B driver, while the other driver is operated to supply a fixed voltage when the mode selection control circuit selects the pulse-width modulated mode. In linear mode, both drivers are operated to supply the current to the motor as a differential class AB amplifier. The resulting operation avoids cross-over distortion, as in the linear mode of operation, the output stage conducts current on either side of zero current output. While the following description is provided with reference to block diagrams, it is understood that the description included therein are applicable to a process that may be implemented, in part, by a digital signal processor executing a computer program product according to an embodiment of the disclosure as described in further detail below.

Referring now toFIG.1, a block diagram of an example mobile device10is shown, in accordance with an embodiment of the disclosure. Example mobile device10may be a wireless mobile telephone, tablet, notebook computer, or a similar device. Alternatively, mobile device may be a digital camera or other system that incorporates a position-controlled image sensor. Operation of mobile device10is controlled by a central processing unit (CPU)17, which may be a microcontroller, microprocessor or other processor core, such as a processor core in a dedicated system-on-chip (SOC) implementation. CPU17is coupled to a memory15that stores program instructions forming a computer-program product, program data and other data such as media, including digital photographs. Memory15may include both non-volatile and dynamic storage elements. A network interface19provides for connection of mobile device10to a wireless network via an antenna ANT, but is not required for implementation of embodiments according to the disclosure, for example in a camera providing only a wired interface. A separate image processor13is also coupled to memory15, and memory may comprise separate storage for program instructions forming another computer-program product, and data that may not be accessed directly by CPU17. Image processor13provides an interface for receiving data from an image sensor12of a camera11within mobile device10and also provides an interface to a motor controller20that controls a motor21that positions a movable lens16A, or multiple lenses, of camera11, responsive to commands from image processor13that cause movement of a mount14via a mechanical linkage18coupled to motor21. The commands are generally motor current commands to control the speed of the motor as computed by CPU17or image processor13, which may provide zoom, auto-focus and image stabilization functions as described in further detail below. Another fixed lens16B receives an image from movable lens16A to produce an image of the subject of a photograph or other image processing subject on image sensor12.

Referring now toFIG.2A, a simplified block diagram illustrating an example of an output stage20A of motor controller20within mobile device10ofFIG.1configured in a linear operating mode is shown, in accordance with an embodiment of the disclosure. An H-bridge circuit formed by transistors P1, P2, N1and N2are controlled by outputs of a differential amplifier A1to provide operating current to motor21. Bias circuits23A,23B set the quiescent operating current in respective sides of the H-bridge, i.e., quiescent current flowing from a positive power supply rail VDDthrough transistor P1and through transistor N1to a negative power supply rail VSS, which may be ground, and quiescent current flowing from positive power supply rail VDDthrough transistor P1and through transistor N2to negative power supply rail VSS. The bias of transistors P1, P2, N1and N2is set for class AB operation, so that when a loop filter output voltage VLprovided to the input of an amplifier/pre-driver A1that the input signals to the H-bridge through bias circuits23A,23B, has zero amplitude, a current is maintained flowing through each half of the H-bridge, avoiding cross-over distortion in the output signal provided to motor21.

Referring now toFIG.2B, a simplified block diagram illustrating an example of an output stage20B of motor controller20within mobile device10ofFIG.1configured in a pulse-width modulated (PWM) mode is shown, in accordance with an embodiment of the disclosure. A pair of switches S1, S2select a left side or right side of the H-bridge circuit for PWM control by an output of a quantizer22that quantizes loop filter output voltage VLto provide operating current to motor21. The other, unselected, side of the H-bridge has gate terminals of both transistors tied to power supply rail VDD, so that the N-channel transistor (transistor N1or transistor N2) is turned on and the P-channel transistor (transistor P1or transistor P2) is turned off, thus the unselected side of the H-bridge will provide a fixed voltage close to the voltage of power supply rail VSS. Selection of the modulated vs. fixed voltage side of the H-bridge circuit is controlled by a Motor Direction control signal, so that output stage20B is operated in a single-ended mode, in which only one side of the H-bridge is modulated rather than using both sides of the H-bridge to differentially drive motor21in PWM mode. The disclosed architecture allows the H-bridge output driver formed by transistors P1, P2, N1and N2to be shared for both PWM mode and linear mode, rather than using separate linear mode drivers, which provides reduction of switching noise and allows the control loop to have the same response for the PWM mode as in the linear mode illustrated inFIG.2A. In linear mode, the disclosed architecture ofFIG.2AandFIG.2Balso provides the ability to operate in linear mode across the full range of output voltage, i.e., to voltages near power supply rails VDDand VSSon opposite sides of the H-bridge if required, rather than at some lower signal amplitude.

Referring now toFIG.3, a simplified schematic diagram of an example motor control circuit30within motor controller20ofFIG.1is shown, in accordance with an embodiment of the disclosure. Each half of the H-bridge formed by transistors P1, P2, N1and N2includes a current sense resistor RS1, RS2that provide inputs to a current monitor circuit36, via fully-differential amplifiers A3and A5, respectively. In PWM mode, the motor current is sensed on the “sink” side, i.e., through the sense resistor RS1or RS2that is connected to the transistor N1or N2that is turned on to sink current through motor21that is provided by the other side of the H-bridge, since the current will be in only one direction. In linear mode, the voltages across both sense resistors RS1, RS2is measured and effectively subtracted by current monitor circuit36, which causes cancelation of measured class-AB bias current conducted by both sides of the H-bridge, while the motor current remains in the measurement, since only one of transistors N1or N2is conducting the motor current. Current monitor circuit36combines the outputs of fully-differential amplifiers A3and A5to provide a measure of the current delivered to motor21, and a combiner35generates feedback signals from a differential output of current monitor circuit36, which are provided as an input to a proportional integral-derivative (PID) control block31. PID control block31corrects for the phase difference between the motor current through the inductive load of motor21and generates an output that provides an input to a quantizer32, which generates PWM output signals that provide input to a pair of PWM drivers33A,33B. The outputs of PWM drivers33A,33B are provided as inputs to respective to selector blocks38A,38B. Selector blocks38A,38B, include the functionality of switches S1, S2described with reference toFIG.2Babove, as well as selection between providing the output of one of PWM drivers33A,33B to the side of the H-bridge that is being modulated when a control signal MODE is asserted, or providing the outputs of both of a pair of linear driver amplifiers A2, A4to their corresponding side of the H-bridge when mode control signal MODE is de-asserted. Linear driver amplifiers A2, A4also receive the output of PID control block31, so that a common feedback loop is shared between linear and PWM mode drive. Linear driver amplifiers A2, A4have a gain that compensates for the difference between the single-ended PWM signal generated by only one half of the H-bridge vs. the differential signaling during operation of the H-bridge in linear mode, e.g., an attenuation of ½. Selector blocks38A,38B, also include the bias resistors or active bias circuits that bias transistors P1, P2, N1and N2to provide Class AB bias when linear mode is selected, i.e., all of transistors P1, P2, N1and N2conduct a bias current in addition to signal current.

Input to example motor control circuit30within motor controller20ofFIG.1, is provided from CPU17or image processor13ofFIG.1, or both, and consists of digital input value Motor Current Set. Digital input value Motor Current Set is provided to a motor current DAC34that is coupled through cross-point switch S1, which interchanges the output signals of DAC34to provide negative values corresponding to a reverse motor direction when control signal Motor Direction is asserted. Control signal Motor Direction is controlled by a control circuit37that receives commands from a digital command input DIN coupled to one or both of CPU17and image processor13ofFIG.1to select linear or PWM operating mode, initiate a motor current control command and set the motor direction.

Referring now toFIG.4, an example signal waveform diagram illustrating operation of motor control circuit30ofFIG.3is shown, in accordance with an embodiment of the disclosure. At time t1, a lens position command is received, represented by signal CMD, which illustrates the time period during which the command is valid. Output terminal OUTM is set to power supply rail VSSe.g., by turning transistor N2on and transistor P2off, in accordance with control signal Motor Direction. Output terminal OUTP is pulse-width modulated by operating transistors N1and P1according to the output of quantizer32, in accordance with the state of control signal MODE. At time t2, control signal MODE is de-asserted, for example, when the position of motor21nears the commanded position and a command is received to change the operating mode to linear. After time t2, motor controller20operates in linear mode and output terminals OUTM and OUTP are both driven as the commanded position is reached and until the end of the control of position occurs at time t3. At time t4, another positioning command is received with an opposite state of control signal Motor Direction. Output terminal OUTM is pulse-width modulated by operating transistors N2and P2according to the output of quantizer32, which causes output terminal OUTP to be set to power supply rail VSS, e.g., by turning transistor P1off and transistor N1on. After time t5, motor controller20operates in linear mode and output terminals OUTM and OUTP are both driven as the commanded position is reached.

Referring now toFIG.5, an example flowchart illustrating operation of mobile device10ofFIG.1is shown, in accordance with an embodiment of the disclosure. While the difference in position Δpos between a desired position and the actual position of lens16A is greater than a threshold distance d (decision51), the motor proceeds to move the lens. Initially, single-sided PWM mode is selected with a fixed driver polarity voltage provided at one side of the H-bridge while the motor is driven toward the commanded position (step52). Once the difference in position Δpos has reached threshold distance d, a mode change command is received causing selection of the linear mode and the motor is driven to the commanded position (step53). If motor controller20receives a position increment command (decision54), e.g., from an auto-focus module of the program executed by image processor13that has determined that camera11requires a focus adjustment or from an image stabilization module that has determined that the image is moving and requires a consequent focal length adjustment in addition to any image processing to compensate for movement, motor controller20moves lens16A by the increment (step55). Until the camera lens control ends (decision56), steps54-55are repeated to maintain image focus.

As mentioned above, portions of the disclosed processes may be carried out by the execution of a collection of program instructions forming a computer program product stored on a non-volatile memory, but that also exist outside of the non-volatile memory in tangible forms of storage forming a computer-readable storage medium. The computer-readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. Specific examples of the computer-readable storage medium includes the following: a hard disk, semiconductor volatile and non-volatile memory devices, a portable compact disc read-only memory (CD-ROM) or a digital versatile disk (DVD), a memory stick, a floppy disk or other suitable storage device not specifically enumerated. A computer-readable storage medium, as used herein, is not to be construed as being transitory signals, such as transmission line or radio waves or electrical signals transmitted through a wire. It is understood that blocks of the block diagrams described above may be implemented by computer-readable program instructions. These computer readable program instructions may also be stored in other storage forms as mentioned above and may be downloaded into a non-volatile memory for execution therefrom. However, the collection of instructions stored on media other than system non-volatile memory described above also form a computer program product that is an article of manufacture including instructions which implement aspects of the functions/actions specified in the block diagram block or blocks.

In summary, this disclosure shows and describes systems and integrated circuits implementing an electronic motor control system, and their methods of operation. The system includes an output stage for supplying the current to the motor. The output stage may have a first push-pull driver coupled to a first output for coupling to a first terminal of the motor and a second push-pull driver coupled to a second output for coupling to a second terminal of the motor. The system may include a mode selection control circuit for selecting between a pulse-width modulated mode and a linear mode of the electronic motor controller, and a pulse-width modulated (PWM) driver stage for providing pulse-width modulated drive signals to an input of the output stage when the mode selection control circuit selects the pulse-width modulated mode. The mode selection control circuit may select one of the first push-pull driver or the second push-pull driver in conformity with a direction of the current supplied to the motor, and the selected one of the first push-pull driver or the second push-pull driver may be pulse-width modulated while another one of the first push-pull driver or the second push-pull driver may be operated to supply a fixed voltage when the mode selection control circuit selects the pulse-width modulated mode. The system may include a linear amplifier stage for providing a linear analog signal to the input of the output stage when the mode selection control circuit selects the linear mode, so that both the first push-pull driver and the second push-pull driver may be operated to supply the current to the motor when the mode selection control circuit selects the linear mode. The system may also include a feedback control loop for sensing the current supplied to the motor and providing a first output to the pulse-width modulator and a second output to the linear amplifier stage.

In some example embodiments, the system may include an input for receiving a motor current control value, and a first transfer function from the input to the selected one of the first push-pull driver or the second push-pull driver when the mode selection control circuit selects the pulse-width modulated mode may be substantially equivalent to a second transfer function from the input to the combination of the first push-pull driver and the second push-pull driver when the mode selection control circuit selects the linear mode, so that an output of a loop filter of the feedback control loop settles to approximately a same value after the mode selection control changes between the linear mode and the pulse-width modulated mode as a previous value of the output of the loop filter prior to the change. In some example embodiments, the input may be a digital input for receiving a digital current control value, and the electronic motor control system may further include a digital-to-analog converter (DAC) for receiving the digital current control value and generating an analog output provided to the feedback control loop. In some example embodiments, the system may include a pulse-width modulator for providing an input to the pulse-width modulator output stage, a loop filter of the feedback control loop, a quantizer of the pulse-width modulator having an input coupled to a first output of the loop filter, so that an input of the linear amplifier stage is coupled to a second output of the loop filter, and a current sense block coupled to at least one of the output stage or the motor and having an output coupled to the feedback control loop. In some example embodiments, the system may include a position sensor that detects a position controlled by the motor and a processing subsystem for receiving an output of the position sensor and generating an output provided to an input of the feedback control loop. In some example embodiments, the position sensor may be an image sensor mechanically coupled to the motor, and the processing subsystem may include an image processor. In some example embodiments, the image processor may detect instability in an image provided by the image processor and controls the output provided to the input of the feedback control loop to stabilize the image. In some example embodiments, the image processor may detect a measure of a focus of an image provided by the image processor and control the output provided to the input of the feedback control loop to maintain a focus of the image. In some example embodiments, when the mode selection control selects the linear mode, the first push-pull driver and the second push-pull driver may be operated as class-AB linear drivers. In some example embodiments, when the mode selection control selects the linear mode, the first push-pull driver and the second push-pull driver may provide a signal swing that extends substantially over a range of voltage from a negative power supply rail supplied to the output stage to a positive power supply rail supplied to the output stage.

While the disclosure has shown and described particular embodiments of the techniques disclosed herein, it will be understood by those skilled in the art that the foregoing and other changes in form, and details may be made therein without departing from the spirit and scope of the disclosure. For example, the techniques shown above may be applied to a control system for supplying signals to a haptic device or an audio transducer.