Method for controlling electric machine, electric machine controller and electric machine system

By generating and updating the PWM signal in a permanent magnet synchronous motor, determining the motor position based on the transformation of the motor position signal, solving the problem of difficult to achieve high efficiency, low vibration and low noise in the prior art, and achieving higher resolution and stability motor control.

CN119743060APending Publication Date: 2025-04-01INFINEON TECH AUSTRIA AG
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411313394.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-09-29
Filing Date
2024-09-20
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

In the field orientation control of permanent magnet synchronous motors, it is difficult for the prior art to achieve high efficiency, low vibration and low noise control, especially under different and unknown time-varying interference.

Method used

By generating a pulse width modulation (PWM) signal for driving the motor, the position of the motor is determined based on the transition of the motor position signal, and the motor position is updated in the transition interval for higher resolution control.

Benefits of technology

This method improves the control accuracy and stability of the motor, and can achieve smooth operation of the motor from zero speed to maximum speed under different variable interferences, reducing vibration and noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119743060A_ABST
    Figure CN119743060A_ABST
Patent Text Reader

Abstract

The invention discloses a method for controlling a motor, a motor controller and a motor system. According to some embodiments, a motor controller for controlling a motor includes a position interface configured to receive a motor position signal indicative of a position of the motor and a pulse width modulation (PWM) unit configured to generate a PWM signal for driving the motor. The angle and speed unit is configured to determine a speed and a position of the motor based on transitions of the motor position signal, where transition intervals are defined between the transitions, determine a PWM count of periods of the PWM signal during a first one of the transition intervals, and determine a pulse width modulation (PWM) count of periods of the PWM signal during a second one of the transition intervals. And updating the position of the electric machine during a second one of the transition intervals based on the PWM count to generate an updated position. The controller is configured to transmit a control signal for controlling the motor to the PWM unit based on the speed and the updated position.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates generally to motor control. Background Art

[0002] Permanent Magnet Synchronous Motors (PMSM) are used in consumer and industrial motor applications due to their higher reliability and smaller size compared to other types of motors. To achieve high efficiency and low vibration and acoustic noise, Field Oriented Control (FOC) technology is commonly used in consumer and industrial PMSM control for cordless power tools, automatic guided robots, cordless gardening tools, e-bikes, drones, robots, fans, pumps, compressors, gear motors, etc. Summary of the invention

[0003] This summary is provided to introduce some concepts in a simplified form that are further described in the detailed description below. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.

[0004] According to some embodiments, a method for controlling a motor includes generating a pulse width modulation (PWM) signal for driving the motor, determining a position of the motor based on transitions of a motor position signal, wherein a transition interval is defined between transitions, determining a PWM count of a period in the PWM signal during a first transition interval in the transition interval, updating the position of the motor during a second transition interval in the transition interval based on the PWM count to generate an updated position, and controlling the motor based on the updated position.

[0005] According to some embodiments, a system for controlling a motor includes: a device for generating a pulse width modulation (PWM) signal for driving the motor, a device for determining the position of the motor based on transitions of a motor position signal, wherein a transition interval is defined between transitions, a device for determining a PWM count of a period in the PWM signal during a first transition interval in the transition interval, a device for updating the position of the motor during a second transition interval in the transition interval based on the PWM count to generate an updated position, and a device for controlling the motor based on the updated position.

[0006] According to some embodiments, a motor controller for controlling a motor includes: a position interface configured to receive a motor position signal indicating a position of the motor; a pulse width modulation (PWM) unit configured to generate a PWM signal for driving the motor; an angle and speed unit configured to determine the speed and position of the motor based on transitions of the motor position signal, wherein a transition interval is defined between transitions, a PWM count of a period in the PWM signal is determined during a first transition interval in the transition interval, and the position of the motor is updated during a second transition interval in the transition interval based on the PWM count to generate an updated position; and a controller configured to send a control signal for controlling the motor to the PWM unit based on the speed and the updated position.

[0007] According to some embodiments, a system includes: a motor; an angle sensor that interfaces with the motor to generate pulses indicating the position of the motor; a motor controller including: a position interface that is configured to receive the pulses, a pulse width modulation (PWM) unit that is configured to generate a PWM signal for driving the motor, an angle and speed unit that is configured to determine the speed and position of the motor based on transitions in the pulses, wherein a transition interval is defined between transitions, a PWM count of a period in the PWM signal is determined during a first transition interval in the transition interval, and the position of the motor is updated during a second transition interval in the transition interval based on the PWM count to generate an updated position, and a controller that is configured to send a control signal for controlling the motor to the PWM unit based on the speed and the updated position.

[0008] In order to achieve the aforementioned and related purposes, the following description and the accompanying drawings set forth some illustrative aspects and implementations. These illustrative aspects and implementations merely indicate some of the various ways in which one or more aspects may be employed. Other aspects, advantages, and novel features of the present disclosure will become apparent from the following detailed description when considered in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1A , Figure 1B , Figure 1C and Figure 1D is a schematic diagram of an electric machine system according to some embodiments.

[0010] Figure 2 Signals used to estimate the position of a motor according to some embodiments are shown.

[0011] Figure 3A and Figure 3B A method for estimating the position of a motor implemented in an interrupt routine according to some embodiments is shown.

[0012] Figure 4Exemplary computer-readable media according to some implementations are shown. DETAILED DESCRIPTION

[0013] The claimed subject matter is now described with reference to the accompanying drawings, wherein the same reference numerals are used to refer to the same elements throughout the text. In the following description, for the purpose of illustration, a large number of specific details are set forth in order to provide a thorough understanding of the claimed subject matter. However, it is apparent that the claimed subject matter can be practiced without these specific details. In other cases, well-known structures and devices are shown in block diagram form to facilitate description of the claimed subject matter.

[0014] It should be understood that the following description of the embodiments should not be understood as limiting. The scope of the present disclosure is not intended to be limited by the embodiments or drawings described below, which are considered to be illustrative only. The drawings are considered to be schematic representations, and the elements shown in the drawings are not necessarily shown to scale. On the contrary, the various elements are represented so that their functions and general purposes become apparent to those skilled in the art.

[0015] All numerical values ​​in the detailed description and claims herein are indicated values ​​modified by "about" or "approximately", and take into account experimental errors and variations that would be expected by a person of ordinary skill in the art.

[0016] Field oriented control (FOC) is a variable speed control method for three-phase alternating current (AC) motors that improves power efficiency by utilizing fast control response over the entire motor speed range. Various implementations of structures, components, and techniques for providing three-phase AC motor control are discussed herein. Structures, components, and techniques are discussed with reference to example three-phase permanent magnet synchronous motor (PMSM) devices and control systems. However, the present application is not intended to be limiting, but rather to facilitate discussion and illustration. The discussed techniques and devices may be applied to other motor designs, control structures, and the like (e.g., single-phase and three-phase variable frequency drives, digital phase converters, three-phase and single-phase motors, direct torque control drives, induction motors, regenerative drives, brushless DC motors, and the like), and still be within the scope of the present disclosure.

[0017] Figure 1A , Figure 1B , Figure 1C and Figure 1D is a schematic diagram of a motor system 10 according to some embodiments. In some embodiments, the motor system 10 includes a motor controller 100 that uses an angle sensor 101 and an angle and speed unit 102 to estimate the rotor position. and rotor speed To support FOC technology for controlling the motor 104. The motor controller 100 can be implemented by a microcontroller unit. The rotor speed indicates the motor speed. In some embodiments, the angle sensor 101 includes a magnetic sensor 101S, which detects a Z pulse from a magnet 104M mounted to the shaft of the motor 104, and also detects an A pulse and a B pulse from the magnet of the rotor, the Z pulse signaling the mechanical rotation of the shaft. The rotor magnets are arranged in pole pairs, and the number of pulses per revolution depends on the number of pole pairs. For example, the motor 104 may include 15 pole pairs, and the angle sensor 101 provides 4096 encoder pulses per revolution. The mechanical Z pulse and the electrical A pulse and B pulse are received at the position interface 105. Each falling or rising edge of the A signal and the B signal is called a tick (e.g., a transition), resulting in a tick count of 16384 ticks per revolution. Therefore, each tick represents a fixed angular position change ΔP in the rotor position equal to the tick count divided by 360° or 2π radians T The beat timer 106 determines the time interval T between beats based on the following equation: TICK , which indicates the rotor speed:

[0018]

[0019] According to some embodiments, the motor controller 100 estimates the change in rotor position during the tick interval to increase the estimated rotor position The actual rotor position is updated at every tick.

[0020] The goal of the motor controller 100 is to achieve smooth operation of the motor 104 from zero speed to maximum speed, even under different and unknown time-varying disturbances. Taking the PMSM motor as an example, the continuous-time voltage equation of the PMSM in the dq coordinate system (where the d-axis is aligned with the magnetic axis of the motor's permanent magnet, and the q-axis is perpendicular to the d-axis) is:

[0021]

[0022]

[0023] in:

[0024] V d and V q are the d-axis and q-axis voltages (in volts),

[0025] I d and I q are the d-axis and q-axis currents (amperes),

[0026] R is the stator winding resistance (ohms),

[0027] Ld and L q are the d-axis and q-axis stator winding inductances (henry),

[0028] ω is the electrical speed corresponding to the frequency of the stator current and the rotor speed (rad / s), and

[0029] Ψ is the permanent magnet flux linkage (Weber).

[0030] To implement FOC control, the motor controller 100 uses the Park transformation to convert between the DQ rotor fixed reference frame defined by the torque generating component Q and the flux generating component D and the α-β fixed reference frame, and uses the Clark transformation to convert between the three-phase reference frame defined by the V, U and W components and the α-β fixed reference frame. The α-β fixed reference frame signal is a sinusoidal signal in steady state, and the DQ rotor fixed reference frame signal is almost constant in steady state. The Park transformation, the inverse Park transformation, the Cartesian transformation to the pole transformation and the Clark transformation are known in the motor control technology and are not described in more detail herein.

[0031] In the three-phase reference frame, the U, V, and W components are 120° apart and stationary. In the α-β stationary reference frame, the components are electrically orthogonal and stationary. In the DQ rotor fixed reference frame, the components are electrically orthogonal and rotating. For ease of description, it is assumed that the motor 104 rotates in the positive direction (i.e., counterclockwise), so the angle and angular velocity are positive. For the motor 104 rotating in the negative direction (i.e., clockwise), the signs of the angle and angular velocity can be changed. The coordinate system can refer to the stator and / or rotor of the motor 104. For example, the DQ rotor fixed reference frame is fixed to the rotor and the components of the DQ coordinate system rotate together. The direct axis of the DQ rotor fixed reference frame is oriented in the direction from the south pole (S) of the rotor permanent magnet to the north pole (N). The quadrature axis of the DQ rotor fixed reference frame is perpendicular to the rotor flux (e.g., perpendicular to the rotor).

[0032] The three-phase sinusoidal current I of the motor stator winding U ,I V and I W The stator generates three non-rotating pulsating magnetic fields in the U, V and W directions at 120° intervals, thereby generating a rotating magnetic field (stator flux space vector). U ,I V and I W The vector addition of the current space vector gives the current space vector. For a motor rotating at speed ω, the magnitude of the current space vector can be scaled up or down without changing its direction.

[0033] In the stationary α-β reference frame, the rotating stator flux space vector represents the rotating stator flux. The three-phase 120° separated stator phase voltage V U 、VV and V W The vector addition of defines a rotating voltage space vector. The rotating rotor permanent magnets generate a rotating rotor flux space vector. The magnitude and direction of the above rotating space vector can be expressed in terms of radial coordinates and polar angles in a polar coordinate system. Techniques for transforming between reference frames are known in the art.

[0034] Reference Figure 1B According to some embodiments, an embodiment of a motor controller 100 is provided. A reference speed SP representing a desired rotational speed of the motor 104 REF The rotor speed is received as an input and provided to the adder 103 which also receives the feedback from the angle and speed unit 102 to generate an error signal for input to the speed controller 108. Rotor speed is also provided to an optional feedforward unit 109. In some embodiments, the speed controller 108 is a proportional integral (PI) controller that operates to drive its input error signal to zero. The outputs of the speed controller 108 and the feedforward unit 109 are provided to an adder 110. The adder 110 provides the input signal to a low pass filter (LPF) 112. The output of the LPF 112 is provided to an optional limiter 113. The limiter 113 generates a demand torque generating voltage parameter V q LPF 112 provides filtering for low speed operation. In some embodiments, limiter 113 is based on I q current or motor phase current information to limit V q value.

[0035] The reference generator 114 provides a reference flux generating current parameter (I d ) as an input to the adder 116. The adder 116 also receives the feedback flux generating current parameter (I d ), and provides the error signal input to I d Controller 118. In some embodiments, I d The controller 118 is a proportional-integral (PI) controller that operates to drive its error input signal to zero. The limiter 113 outputs the required torque generating voltage parameter V q , I d The controller 118 outputs the required flux generation voltage parameter V d In some embodiments, the magnetic flux generating component I d In some embodiments, a negative reference value is used to control the magnetic flux generating component I d , to achieve flux weakening control to extend the operating speed range of the motor 104. In some embodiments, a positive reference value is used to control the flux generating component I d, to achieve flux enhancement control.

[0036] The motor controller 100 includes a Park transform unit 120, a Cartesian to polar transform unit 122, and a Clarke transform unit 124 to convert between reference frames. The Park transform unit 120 uses the rotor speed from the angle and speed unit 102 to The α-β stationary reference system is transformed into the DQ rotor fixed reference system. The Cartesian to polar coordinate transformation unit 122 transforms the DQ rotor fixed coordinate system into the DQ rotor fixed coordinate system composed of Θ and |V ref The output θ of the Cartesian to polar coordinate conversion unit 122 is added to the rotor position from the angle and speed unit 102 in the adder 123. The Clarke transformation unit 124 transforms the three-phase reference system into the α-β stationary reference system.

[0037] The Cartesian to polar conversion unit 122 provides the polar reference signal to the space vector modulator 126. The space vector modulator 126 controls the pulse width modulation (PWM) unit 128 to generate a PWM output signal, for example: Figure 1A INHA, INLA, INHB, INLB, INHC and INLC in the embodiment of the present invention are used to drive the inverter 130 through the gate driver 131. The output signal of the inverter 130 drives the phase of the motor 104. In some embodiments, the inverter 130 includes a three-phase two-level voltage inverter, which includes high-side switches HS_U, HS_V, HS_W and low-side switches LS_U, LS_V, LS_W (see Figure 1A ).

[0038] The current sensing unit 132 senses the phase current of the motor 104. In some embodiments, Figure 1A As shown, the current sensing unit 132 includes three shunt resistors associated with the three branches of the inverter 130 to sense the current of each phase of the motor 104, such as Figure 1A In some embodiments, two shunt resistors are used to sense the current of two phases of the motor 104. U +I V +I W =0 to calculate the current from the third phase of the motor 104. In some embodiments, a single shunt resistor is inserted into the DC link of the inverter 130 to sense the DC link current, and three-phase current reconstruction is used to obtain current information for each phase of the motor 104. In some embodiments, sensors such as motor phase online shunt resistors, Hall sensors, current converters (e.g., LEM current sensors), or other motor phase current sensors can be used to obtain current information for each phase of the motor 104.

[0039] The analog-to-digital converter (ADC) 134 receives the sense voltage from the current sensing unit 132 to generate a digital input for the current calculation unit 136. The current calculation unit 136 generates the phase current measurement parameter I U ,I V and I W The phase current measurement parameters are provided to the Clarke transformation unit 124 to generate the α-β stationary reference frame feedback current parameter I α , I β The stationary reference frame feedback current parameter is provided to the Parker transformation unit 120 to generate the feedback torque generating current parameter I q and feedback flux generation current parameter I d .

[0040] The angle and speed unit 102 estimates the rotor position using data from the angle sensor 101 and rotor speed One Z encoder pulse is received for each mechanical rotation. The mechanical angle is incremented at each tick generated from the A and B pulses. The electrical angle can be calculated based on the number of A and B pulses per revolution and the number of motor pole pairs. In some embodiments, the motor controller 100 includes a PWM counter 138 that counts the number of PWM pulses between ticks (e.g., transitions), where the PWM count is inversely proportional to the rotor speed.

[0041] Some of the disclosed techniques may be readily implemented in software using an object or object-oriented software development environment that provides portable source code that can be used on a variety of computer or workstation platforms. Alternatively, the disclosed techniques and / or arrangements may be implemented in part or in whole in hardware using standard logic circuits or VLSI designs. In some embodiments, the motor 104, inverter 130, current sensing unit 132, and ADC 134 are hardware implemented, and Figure 1B The remaining units in are implemented in software. However, other combinations of hardware, firmware or software are contemplated.

[0042] In addition, the disclosed processes can be readily implemented in software that can be stored on a computer-readable storage medium (such as a memory storage device) and executed on a programmed general-purpose computer, a special-purpose computer, a microprocessor, etc. that cooperates with a controller and a memory. In these cases, the arrangements and processes of the described implementations can be implemented as an applet, such as an embedded personal computer, or CGI scripts, resources resident on a server or computer workstation, routines embedded in a dedicated communication arrangement or arrangement components, etc. The arrangement may also be implemented by physically incorporating the arrangement and / or process into a software and / or hardware system (such as the hardware and software systems of a test / modeling device).

[0043] Figure 2 1 shows signals for estimating the position of the motor 104 according to some embodiments. Output signals A, B, and Z from the angle sensor 101 are shown. A beat waveform is generated from the A pulse and the B pulse, wherein a beat pulse is generated for each falling edge or rising edge of the A pulse or the B pulse. In some embodiments, the PWM signal has a fixed frequency, such as 20kHz (period = 50 microseconds). In some embodiments, the motor controller 100 implements a PWM interrupt for each PWM cycle, a beat interrupt for each beat, a speed interrupt at a fixed interval (such as every 1 millisecond), and an interrupt for I after a predetermined number of PWM cycles. d Control loop of controller 118 .

[0044] The angle and speed unit 102 uses information from the angle sensor 101, the PWM counter 138 and the tick timer 106 to estimate the rotor position. and rotor speed The tick timer 106 determines the tick interval between ticks, and the PWM counter 138 counts the number of PWM cycles between ticks. Figure 2 , the angle and speed unit 102 changes the angular position per beat by ΔP T Divide by the PWM count to determine the angular position change per PWM cycle, ΔP PWM In some embodiments, the angle and speed unit 102 may use a filtering technique such as a simple average (e.g., PWM counts over two ticks), an exponentially weighted moving average (EWMA), or some other filtering technique to generate ΔP based on the PWM counts. PWM measure.

[0045] In some embodiments, the motor controller 100 implements a PWM interrupt for each PWM cycle and a beat interrupt for each beat. When a beat interrupt occurs, the motor controller 100 sets a beat flag indicating that new position information is available. During the processing of the PWM interrupt, the actual rotor angle is updated only if the beat flag is set. Otherwise, the ΔP PWMThe rotor angle is estimated by measuring the amount of time that the motor 104 is in the state of being measured. For example, at 202, a tick interrupt is triggered and a tick flag is set. At the next PWM interrupt, the angular position is updated in response to the tick flag being set. Note the step change at 202, indicating that the estimated angular position is significantly less than the actual angular position. This scenario indicates that the motor 104 is accelerating between ticks. At 204, after the next tick interrupt, the PWM interrupt results in a less significant adjustment to the angular position, indicating that the rotor speed is relatively constant.

[0046] Figure 3A and Figure 3B Methods 300, 350 for estimating the position of a motor implemented in an interrupt service routine according to some embodiments are shown. For example, Figure 3A The method 300 shows a beat interrupt service routine, and Figure 3B The method 350 shows a PWM interrupt service routine. Figure 3A At 302, a tick interrupt is received, for example, when an edge occurs in the A signal or the B signal. At 304, a tick interval is determined. For example, the tick interval may be determined using the number of clock cycles recorded by the tick timer 106 normalized based on the clock frequency. At 306, the tick interval TI count is compared with the maximum TI threshold TI. MAX A comparison is made. In some embodiments, the minimum TI threshold corresponds to a rotor speed of 0.0215 RPM. If TI is less than or equal to the threshold at 306, the beat interval is filtered at 308. An averaging technique (such as simple averaging or EWMA) may be used to filter the beat interval. At 310, the beat timer 106 is adjusted based on the beat interval determined at 304. A beat interrupt is set at 312, and the beat interrupt service routine terminates.

[0047] If the tick interval is greater than the threshold at 306, the angle and speed unit 102 adjusts the rotor speed to is reset to 0, and the tick interval is reset to a value corresponding to the minimum speed of 0.5 RPM. At 314, the filtered tick interval is updated based on the minimum speed, the rotor speed is reset to 0, ΔP PWM is reset to 0, and the PWM count is reset to 0 (which is Figure 3B At 310, the tick timer 106 is adjusted based on the tick interval determined at 304. A tick interrupt is set at 312, and the tick interrupt service routine terminates.

[0048] Reference Figure 3B , receiving the PWM interrupt at 352. At 354, the angle and speed unit 102, for example, Figure 3ADuring the beat interrupt service routine of , it is determined whether the beat interrupt flag has been set. If the beat interrupt flag is set at 354, the angle and speed unit 102 uses the Figure 3A The rotor speed is calculated from the filtered beat signal of 310 and the angular position change metric ΔP per PWM period is calculated at 358 based on the PWM count from 366 from the previous iteration of method 350 PWM At 359, the rotor angular position is updated based on the beat. The angle and speed unit 102 resets the beat interrupt flag at 360. The motor controller 100 executes the speed loop at 362 (e.g., Figure 1B The speed controller 108) and the I at 364 d Circuit (for example, Figure 1B I d Controller 118). At 364, the PWM interrupt service routine terminates after any required processing.

[0049] If the tick interrupt flag is not set at 354, the angle and speed unit 102 increments the PWM count at 366. In some embodiments, the PWM count is averaged over two tick intervals. At 368, the PWM count is compared to the maximum PWM threshold PWM. MAX In some embodiments, the maximum PWM threshold corresponds to a rotor speed of 0.75 RPM. If the PWM count at 368 is greater than the threshold, the angle and speed unit 102 sets the rotor speed at 370. The PWM count is reset to 0 and the beat interval is reset to a value corresponding to the minimum speed of 0.5 RPM, and at 362, the motor controller 100 processes the speed loop. If the PWM count is less than or equal to the threshold at 368, the angle and speed unit 102 executes the speed loop at 362 (e.g., Figure 1B In the speed loop, the angle and speed unit 102 uses the PWM count and ΔP PWM Parameters to update the motor angular position.

[0050] By using ΔP PWM By measuring the angular position between update cycles, the angle and velocity unit 102 increases the resolution of the position signal, thereby improving the control of the motor 104 .

[0051] According to some embodiments, the FOC technique employed by the motor controller 100 may be adjusted according to the rotor speed. Figure 1B The control scheme can be used for low rotor speeds. Figure 1C According to some embodiments, embodiments of a motor controller 100 suitable for medium speed operation are provided. Figure 1BIn contrast, the feedforward unit 109 is omitted, and the LPF 112 and the limiter 113 are replaced by the adder 140 and I q Controller 142 is used instead. q The controller 142 may be a proportional-integral (PI) controller that is operative to drive its input signal, which represents an error signal, to zero. In some embodiments, due to speed processing variations at low rotor speeds and current sensing noise at low currents, I q The controller 142 may be susceptible to interference, causing Figure 1B The motor controller 100 is more suitable for low speed operation.

[0052] Reference Figure 1D According to some embodiments, embodiments of a motor controller 100 suitable for high speed operation are provided. Figure 1C Compared with the above, the speed controller 108 and the feedforward unit 109 are omitted, and V q The signal is set by the user and fed directly to the optional limiter 113. In some embodiments, the limiter 113 is based on I q and rotor speed To limit V q .

[0053] In some embodiments, the motor controller 100 can be configured to operate in a controlled manner according to different requirements of the motor operation (such as rotor speed). Figure 1B , Figure 1C or Figure 1D Dynamically switch between control schemes.

[0054] Figure 4An exemplary embodiment of a computer-readable medium 402 according to some embodiments 400 is shown. One or more embodiments relate to a computer-readable medium including processor-executable instructions configured to implement one or more of the techniques presented herein. Embodiment 400 includes a non-transitory computer-readable medium 402 (e.g., a CD-R, DVD-R, flash drive, disk of a hard drive, etc.) having computer-readable data 404 encoded thereon. The computer-readable data 404 in turn includes a set of processor-executable computer instructions 406, which are configured to facilitate operations according to one or more principles set forth herein when executed by a computing device 408 including a reader 410 for reading the processor-executable computer instructions 406 and a processor 412 for executing the processor-executable computer instructions 406. In some embodiments, the processor-executable computer instructions 406 are configured to facilitate execution of a method 414 when executed, such as at least some of the aforementioned methods. In some implementations, the processor executable computer instructions 406, when executed, are configured to facilitate implementation of a system, such as at least some of one or more of the aforementioned systems. One of ordinary skill in the art may design many such computer readable media that are configured to operate according to the techniques presented herein.

[0055] The term "computer-readable medium" may include communication media. Communication media typically embodies computer-readable instructions or other data in a "modulated data signal" such as a carrier wafer or other transport mechanism, and includes any information delivery media. The term "modulated data signal" may include a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal.

[0056] According to some embodiments, a method for controlling a motor includes generating a pulse width modulation (PWM) signal for driving the motor, determining a position of the motor based on transitions of a motor position signal, wherein a transition interval is defined between transitions, determining a PWM count of a period in the PWM signal during a first transition interval in the transition interval, updating the position of the motor during a second transition interval in the transition interval based on the PWM count to generate an updated position, and controlling the motor based on the updated position.

[0057] According to some implementations, the method includes determining a position change metric per PWM period based on the PWM count and the known position change between transitions, and updating the position of the motor during one or more of the transition intervals based on the position change metric per PWM period.

[0058] According to some embodiments, the method includes averaging the position change metric per PWM cycle for a plurality of transitions to generate an average position change metric per PWM cycle, wherein the position of the motor is updated during one or more transition intervals based on the average position change metric per PWM cycle.

[0059] According to some embodiments, the motor position signal includes a first encoder pulse and a second encoder pulse, and the transition includes at least one of a rising edge or a falling edge of the first encoder pulse or a rising edge or a falling edge of the second encoder pulse.

[0060] According to some embodiments, the method includes executing a transition interrupt service routine in response to detecting a first transition in the motor position signal, and executing a PWM interrupt service routine in response to a PWM cycle in the PWM signal, wherein executing the transition interrupt service routine includes determining a position change metric per PWM cycle based on the PWM count and a known position change between transitions, and setting a transition interrupt flag, and executing the PWM interrupt service routine includes updating the position of the motor based on the first transition and clearing the transition interrupt flag in response to the transition interrupt flag being set, and updating the motor position based on the position change metric per PWM cycle in response to the transition interrupt flag not being set.

[0061] According to some embodiments, the method includes determining the motor speed based on a time interval between at least some of the transitions of the motor position signal, wherein executing the transition interrupt service routine includes resetting the time interval to a value corresponding to the minimum motor speed in response to the time interval being greater than a threshold.

[0062] According to some embodiments, the method includes determining the motor speed based on a time interval between at least some of the transitions of the motor position signal, wherein executing the PWM interrupt service routine includes resetting the time interval to a value corresponding to a minimum motor speed in response to the PWM count being greater than a threshold.

[0063] According to some embodiments, the method includes determining the motor speed based on time intervals between at least some of the transitions of the motor position signal, and setting the motor speed to zero in response to the PWM count being greater than a threshold.

[0064] According to some embodiments, a motor controller for controlling a motor includes: a position interface configured to receive a motor position signal indicating a position of the motor; a pulse width modulation (PWM) unit configured to generate a PWM signal for driving the motor; an angle and speed unit configured to determine the speed and position of the motor based on transitions of the motor position signal, wherein a transition interval is defined between transitions, a PWM count of a period in the PWM signal is determined during a first transition interval in the transition interval, and the position of the motor is updated during a second transition interval in the transition interval based on the PWM count to generate an updated position; and a controller configured to send a control signal for controlling the motor to the PWM unit based on the speed and the updated position.

[0065] According to some embodiments, the angle and velocity unit is configured to determine a position change metric per PWM period based on the PWM count and known position changes between transitions, and to update the position of the motor during one or more of the transition intervals based on the position change metric per PWM period.

[0066] According to some embodiments, the angle and velocity unit is configured to average the position change metric per PWM cycle for multiple transitions to generate an average position change metric per PWM cycle, and update the position of the motor during one or more transition intervals based on the average position change metric per PWM cycle.

[0067] According to some embodiments, the motor position signal includes a first encoder pulse and a second encoder pulse, and the transition includes at least one of a rising edge or a falling edge of the first encoder pulse or a rising edge or a falling edge of the second encoder pulse.

[0068] According to some embodiments, a motor controller includes: a processing unit configured to execute a transition interrupt service routine in response to detecting a first transition in a motor position signal, and to execute a PWM interrupt service routine in response to a PWM cycle in a PWM signal, wherein the processing unit is configured to execute the transition interrupt service routine to determine a position change metric per PWM cycle based on a PWM count and a known position change between transitions, and to set a transition interrupt flag, and the processing unit is configured to execute the PWM interrupt service routine to update the position of the motor based on the first transition and clear the transition interrupt flag in response to the transition interrupt flag being set, and to update the motor position based on the position change metric per PWM cycle in response to the transition interrupt flag not being set.

[0069] According to some embodiments, the angle and speed unit is configured to determine the motor speed based on a time interval between at least some transitions of the motor position signal, and the processing unit is configured to execute a transition interrupt service routine to reset the time interval to a value corresponding to the minimum motor speed in response to the time interval being greater than a threshold.

[0070] According to some embodiments, the angle and speed unit is configured to determine the motor speed based on a time interval between at least some transitions of the motor position signal, and the processing unit is configured to execute a PWM interrupt service routine to reset the time interval to a value corresponding to the minimum motor speed in response to the PWM count being greater than a threshold.

[0071] According to some embodiments, a system includes: a motor; an angle sensor that interfaces with the motor to generate pulses indicating the position of the motor; a motor controller including: a position interface that is configured to receive the pulses, a pulse width modulation (PWM) unit that is configured to generate a PWM signal for driving the motor, an angle and speed unit that is configured to determine the speed and position of the motor based on transitions in the pulses, wherein a transition interval is defined between transitions, a PWM count of a period in the PWM signal is determined during a first transition interval in the transition interval, and the position of the motor is updated during a second transition interval in the transition interval based on the PWM count to generate an updated position, and a controller that is configured to send a control signal for controlling the motor to the PWM unit based on the speed and the updated position.

[0072] According to some embodiments, the angle and velocity unit is configured to determine a position change metric per PWM period based on the PWM count and known position changes between transitions, and to update the position of the motor during one or more of the transition intervals based on the position change metric per PWM period.

[0073] According to some embodiments, a system includes: a processing unit configured to execute a transition interrupt service routine in response to detecting a first transition in a pulse, and to execute a PWM interrupt service routine in response to a PWM cycle in a PWM signal, wherein the processing unit is configured to execute the transition interrupt service routine to determine a position change metric per PWM cycle based on the PWM count and a known position change between transitions, and to set a transition interrupt flag, and the processing unit is configured to execute the PWM interrupt service routine to update a position of the motor based on the first transition and clear the transition interrupt flag in response to the transition interrupt flag being set, and to update the motor position based on the position change metric per PWM cycle in response to the transition interrupt flag not being set.

[0074] According to some embodiments, the angle and speed unit is configured to determine the motor speed based on transitions in the pulses, and the processing unit is configured to execute a transition interrupt service routine to determine a time interval between at least some of the transitions in the pulses, and to reset the motor speed to a minimum speed setting in response to the time interval being greater than a threshold.

[0075] According to some embodiments, the angle and speed unit is configured to determine the motor speed based on the transitions in the pulses, and the processing unit is configured to execute a PWM interrupt service routine to reset the motor speed to a minimum speed setting in response to the PWM count being greater than a threshold.

[0076] Various operations of the embodiments are provided herein. In an embodiment, one or more of the operations described may constitute computer-readable instructions stored on one or more computer-readable media, and if executed by a computing device, these computer-readable instructions will cause the computing device to perform the described operations. The order of describing some or all of the operations in the operation should not be interpreted as implying that these operations must rely on the order. Those skilled in the art who benefit from this specification will understand the alternative ordering. In addition, it should be understood that in some embodiments, not all operations are necessary.

[0077] Any aspect or design described herein as an "example" or the like is not necessarily to be construed as being superior to other aspects or designs. Rather, the use of the word "example" is intended to present one possible aspect and / or implementation that may be related to the techniques presented herein. Such an example is not necessary for or intended to be limiting of such techniques. Various implementations of such techniques may include such examples alone or in combination with other features, and / or the examples shown may be altered and / or omitted.

[0078] As used in this application, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless otherwise specified or clear from the context, "X adopts A or B" is intended to mean any natural inclusive arrangement. That is, if X adopts A, X adopts B, or X adopts both A and B, "X adopts A or B" is satisfied in any of the aforementioned cases. In addition, unless otherwise specified or clearly directed to a singular form from the context, the articles "one" and "an" used in this application and the appended claims can generally be interpreted as referring to "one or more". In addition, unless otherwise specified, "first", "second", etc. are not intended to imply time aspects, spatial aspects, ordering, etc. On the contrary, such terms are only used as identifiers, names, etc. of features, elements, items, etc. For example, the first element and the second element generally correspond to element A and element B or two different or two identical elements or identical elements.

[0079] In addition, although the present disclosure has been shown and described with respect to one or more implementations, those skilled in the art will think of equivalent changes and modifications based on the reading and understanding of this specification and the drawings. The present disclosure includes all such modifications and changes and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the components (e.g., elements, resources, etc.) described above, unless otherwise indicated, the terms used to describe such components are intended to correspond to any component that performs the specified functions of the described components (e.g., functionally equivalent), even if the disclosed structure is not structurally equivalent to the functions in the example implementations shown herein that perform the present disclosure. In addition, although specific features of the present disclosure may be disclosed only for one implementation in several implementations, such features may be combined with one or more other features of other implementations as may be desired and advantageous for any given or specific application. In addition, with respect to the terms "includes", "having", "has", "with" or variations thereof used in the detailed description and claims, such terms are intended to be inclusive in a manner similar to the term "comprising".

[0080] Although the subject matter has been described with reference to illustrative embodiments, this description is not intended to be interpreted in a limiting sense. For those skilled in the art, various modifications and combinations of the illustrative embodiments and other embodiments of the present disclosure will be apparent after reference to this description. Therefore, the appended claims are intended to cover any such modification or embodiment.

Claims

1. A method for controlling a motor, comprising: generating a pulse width modulation (PWM) signal for driving the motor; determining a position of the motor based on transitions of a motor position signal, wherein transition intervals are defined between the transitions; determining a PWM count of a period of the PWM signal during a first one of the transition intervals; updating a position of the motor during a second one of the transition intervals based on the PWM count to generate an updated position; as well as The motor is controlled based on the updated position.

2. The method according to claim 1, comprising: determining a position change metric per PWM cycle based on the PWM count and the known position change between the transitions, and The position of the motor is updated during one or more of the transition intervals based on the position change per PWM period metric.

3. The method according to claim 2, comprising: The position change metric per PWM period is averaged for a plurality of transitions to generate an average position change metric per PWM period, wherein: The position of the motor is updated during the one or more transition intervals based on the average position change metric per PWM period.

4. The method according to claim 1, wherein: The motor position signal includes a first encoder pulse and a second encoder pulse; and The transition includes at least one of a rising edge or a falling edge of the first encoder pulse, or a rising edge or a falling edge of the second encoder pulse.

5. The method according to claim 1, comprising: executing a transition interrupt service routine in response to detecting a first transition in the motor position signal; as well as A PWM interrupt service routine is executed in response to a PWM cycle of the PWM signal, wherein: Executing the transition interrupt service routine includes: determining a position change metric per PWM cycle based on the PWM count and the known position change between the transitions, and Set the transition interrupt flag; and Executing the PWM interrupt service routine includes: In response to the transition interrupt flag being set, updating the position of the motor based on the first transition and clearing the transition interrupt flag, and In response to the transition interrupt flag not being set, updating the motor position based on the position change per PWM cycle metric.

6. The method according to claim 5, comprising: Determining the motor speed based on time intervals between at least some transitions of the motor position signal, wherein executing the transition interrupt service routine comprises: In response to the time interval being greater than the threshold, the time interval is reset to a value corresponding to the minimum motor speed.

7. The method according to claim 5, comprising: determining a motor speed based on time intervals between at least some transitions of the motor position signal, wherein executing the PWM interrupt service routine comprises: In response to the PWM count being greater than a threshold, the time interval is reset to a value corresponding to a minimum motor speed.

8. The method according to claim 1, comprising: determining a motor speed based on time intervals between at least some transitions of the motor position signal; as well as In response to the PWM count being greater than a threshold, the determined motor speed is reset to zero.

9. A motor controller for controlling a motor, comprising: a position interface configured to receive a motor position signal indicative of a position of the motor; a pulse width modulation (PWM) unit configured to generate a PWM signal for driving the motor; Angle and velocity unit, which is configured to: determining a speed and a position of the motor based on transitions of the motor position signal, wherein transition intervals are defined between the transitions; determining a PWM count of a period of the PWM signal during a first one of the transition intervals; and updating the position of the motor during a second one of the transition intervals based on the PWM count to generate an updated position; and A controller is configured to send a control signal for controlling the motor to the PWM unit based on the speed and the updated position.

10. The motor controller according to claim 9, wherein: The angle and velocity unit is configured to: determining a position change metric per PWM cycle based on the PWM count and the known position change between the transitions; and The position of the motor is updated during one or more of the transition intervals based on the position change per PWM period metric.

11. The motor controller according to claim 10, wherein: The angle and velocity unit is configured to: averaging the position change metric per PWM cycle for a plurality of transitions to generate an average position change metric per PWM cycle, and The position of the motor is updated during the one or more transition intervals based on the average position change metric per PWM period.

12. The motor controller according to claim 9, wherein: The motor position signal includes a first encoder pulse and a second encoder pulse; and The transition includes at least one of a rising edge or a falling edge of the first encoder pulse, or a rising edge or a falling edge of the second encoder pulse.

13. The motor controller according to claim 9, comprising: a processing unit configured to execute a transition interrupt service routine in response to detecting a first transition of the motor position signal and to execute a PWM interrupt service routine in response to a PWM cycle of the PWM signal, wherein: The processing unit is configured to execute the transition interrupt service routine to: determining a position change metric per PWM cycle based on the PWM count and the known position change between the transitions, and Set the transition interrupt flag; and The processing unit is configured to execute the PWM interrupt service routine to: In response to the transition interrupt flag being set, updating the position of the motor based on the first transition and clearing the transition interrupt flag, and In response to the transition interrupt flag not being set, updating the motor position based on the position change per PWM cycle metric.

14. The motor controller according to claim 13, wherein: The angle and speed unit is configured to determine the motor speed based on time intervals between at least some transitions of the motor position signal; and The processing unit is configured to execute the transition interrupt service routine to: In response to the time interval being greater than the threshold, the time interval is reset to a value corresponding to the minimum motor speed.

15. The motor controller according to claim 13, wherein: The angle and speed unit is configured to determine the motor speed based on time intervals between at least some transitions of the motor position signal; and The processing unit is configured to execute the PWM interrupt service routine to: In response to the PWM count being greater than a threshold, the time interval is reset to a value corresponding to a minimum motor speed.

16. A motor system, comprising: Motor; an angle sensor interfaced with the motor to generate pulses indicative of the position of the motor; Motor controller, including: a position interface configured to receive the pulse; a pulse width modulation (PWM) unit configured to generate a PWM signal for driving the motor; Angle and velocity unit, which is configured to: determining a speed and a position of the motor based on transitions of the pulses, wherein transition intervals are defined between the transitions; determining a PWM count of a period of the PWM signal during a first one of the transition intervals; and updating the position of the motor during a second one of the transition intervals based on the PWM count to generate an updated position; and A controller is configured to send a control signal for controlling the motor to the PWM unit based on the speed and the updated position.

17. The motor system according to claim 16, wherein: The angle and velocity unit is configured to: determining a position change metric per PWM cycle based on the PWM count and the known position change between the transitions; and The position of the motor is updated during one or more of the transition intervals based on the position change per PWM period metric.

18. The motor system of claim 16, comprising: a processing unit configured to execute a transition interrupt service routine in response to detecting a first transition of the pulse and to execute a PWM interrupt service routine in response to a PWM cycle of the PWM signal, wherein: The processing unit is configured to execute the transition interrupt service routine to: determining a position change metric per PWM cycle based on the PWM count and the known position change between the transitions, and Set the transition interrupt flag; and The processing unit is configured to execute the PWM interrupt service routine to: In response to the transition interrupt flag being set, updating the position of the motor based on the first transition and clearing the transition interrupt flag, and In response to the transition interrupt flag not being set, updating the motor position based on the position change per PWM cycle metric.

19. The electric machine system of claim 18, wherein: The angle and speed unit is configured to determine the motor speed based on time intervals between at least some transitions of the pulses; and The processing unit is configured to execute the transition interrupt service routine to: determining time intervals between at least some transitions of the pulses; and In response to the time interval being greater than a threshold, the motor speed is reset to a minimum speed setting.

20. The electric machine system of claim 18, wherein: The angle and speed unit is configured to determine the motor speed based on time intervals between at least some transitions of the pulses; and The processing unit is configured to execute the PWM interrupt service routine to: In response to the PWM count being greater than a threshold, the determined motor speed is reset to a minimum speed setting.

Citation Information

Cited By

  • High-speed permanent magnet synchronous motor sensorless control method for beat scheduling

    CN120512051A

  • A method for position sensorless control of a high-speed permanent magnet synchronous motor with split-second scheduling

    CN120512051B