TW202410626A - Method for increasing resolution by n bits performed by processing circuit of motor driving system and motor driving system - Google Patents

Method for increasing resolution by n bits performed by processing circuit of motor driving system and motor driving system Download PDF

Info

Publication number
TW202410626A
TW202410626A TW111130699A TW111130699A TW202410626A TW 202410626 A TW202410626 A TW 202410626A TW 111130699 A TW111130699 A TW 111130699A TW 111130699 A TW111130699 A TW 111130699A TW 202410626 A TW202410626 A TW 202410626A
Authority
TW
Taiwan
Prior art keywords
value
command
generate
pulse width
width modulation
Prior art date
Application number
TW111130699A
Other languages
Chinese (zh)
Other versions
TWI832376B (en
Inventor
蔡銘富
Original Assignee
晶豪科技股份有限公司
Filing date
Publication date
Application filed by 晶豪科技股份有限公司 filed Critical 晶豪科技股份有限公司
Priority to TW111130699A priority Critical patent/TWI832376B/en
Priority claimed from TW111130699A external-priority patent/TWI832376B/en
Application granted granted Critical
Publication of TWI832376B publication Critical patent/TWI832376B/en
Publication of TW202410626A publication Critical patent/TW202410626A/en

Links

Images

Abstract

A method for increasing a resolution by N bits performed by a processing circuit of a motor driving system includes: performing a conversion upon an analog command, to generate a command count value; performing a first N-bit right-shifting operation upon the command count value, to generate an initial output value; performing a logical operation upon the command count value, to generate a low bit value; generating an overflow value according to the low bit value; and determining a final output value according to the initial output value and the overflow value; wherein each of a plurality of pulse width modulation (PWM) signals is output from the processing circuit to a driving circuit according to the final output value, and a driving voltage is generated by the driving circuit according to the plurality of PWM signals, for driving a brushless direct current (DC) motor.

Description

用以藉由馬達驅動系統之處理電路來將解析度提高N位元的方法以及馬達驅動系統Method for increasing resolution by N bits by processing circuit of motor drive system and motor drive system

本發明係有關於無刷直流馬達(brushless direct current (DC) motor),且尤指一種用以藉由一馬達驅動系統之一處理電路來將一解析度提高N位元的方法以及相關馬達驅動系統,其中該解析度可以是脈衝寬度調變(pulse width modulation, PWM)解析度或轉速解析度,以及N為正整數。The present invention relates to brushless direct current (DC) motors, and in particular to a method for improving a resolution by N bits through a processing circuit of a motor drive system and related motor drives. system, where the resolution can be pulse width modulation (PWM) resolution or speed resolution, and N is a positive integer.

對於無刷直流馬達來說,無刷直流馬達的一處理電路(例如一微控制單元(micro control unit, MCU))可以將複數個脈衝寬度調變訊號輸出至耦接於無刷直流馬達的一驅動電路,以產生一驅動電壓來驅動無刷直流馬達,其中該驅動電壓與無刷直流馬達的轉速成正比。當利用脈衝寬度調變訊號來驅動無刷直流馬達時,倘若脈衝寬度調變訊號的解析度不足的話,則電壓解析度也會不足,其會造成無刷直流馬達運轉不順暢,並且無刷直流馬達會不穩定。For a brushless DC motor, a processing circuit (such as a micro control unit (MCU)) of the brushless DC motor can output a plurality of pulse width modulation signals to a circuit coupled to the brushless DC motor. The driving circuit is used to generate a driving voltage to drive the brushless DC motor, wherein the driving voltage is proportional to the rotation speed of the brushless DC motor. When a pulse width modulation signal is used to drive a brushless DC motor, if the resolution of the pulse width modulation signal is insufficient, the voltage resolution will also be insufficient, which will cause the brushless DC motor to operate not smoothly and the brushless DC motor will not operate smoothly. The motor will become unstable.

在用以提高脈衝寬度調變解析度的現有方法中,可以藉由增加處理電路的操作頻率來改善脈衝寬度調變解析度,然而,此方法會增加處理電路的功耗以及製造成本,此外,在處理電路的轉速解析度不足的情況下,因應處理電路接收到一低轉速命令,無刷直流馬達可能無法運轉在該低轉速命令所要求的一低轉速,以及因應處理電路接收到一高轉速命令,無刷直流馬達的轉速漣波(ripple)可能會很大,其影響了無刷直流馬達的輸出效率。因此,極需一種在不增加無刷直流馬達之處理電路的操作頻率的情況下提高一解析度的方法,其中該解析度可以是脈衝寬度調變解析度或轉速解析度。In the existing method for improving the PWM resolution, the PWM resolution can be improved by increasing the operating frequency of the processing circuit. However, this method will increase the power consumption and manufacturing cost of the processing circuit. In addition, when the speed resolution of the processing circuit is insufficient, in response to the processing circuit receiving a low speed command, the brushless DC motor may not be able to operate at a low speed required by the low speed command, and in response to the processing circuit receiving a high speed command, the speed ripple of the brushless DC motor may be large, which affects the output efficiency of the brushless DC motor. Therefore, a method for improving a resolution without increasing the operating frequency of the processing circuit of the brushless DC motor is highly needed, wherein the resolution can be the PWM resolution or the speed resolution.

因此,本發明的目的之一在於提供一種用以藉由一馬達驅動系統之一處理電路來將一解析度提高N位元的方法以及相關馬達驅動系統,以解決上述問題,其中該解析度可以是脈衝寬度調變解析度或轉速解析度,以及N為正整數。Therefore, one of the objects of the present invention is to provide a method for increasing a resolution by N bits by a processing circuit of a motor drive system and a related motor drive system to solve the above-mentioned problem, wherein the resolution can be a pulse width modulation resolution or a rotational speed resolution, and N is a positive integer.

根據本發明之一實施例,提供了一種用以藉由一馬達驅動系統之一處理電路來將一解析度提高N位元的方法,其中N為正整數。該方法可包含有:對一類比命令進行一轉換,以產生一命令計數值;對命令計數值進行一第一N位元右移操作,以產生一初始輸出值;對命令計數值進行一邏輯操作,以產生一低位元值;根據低位元值來產生一溢位值;以及根據初始輸出值與溢位值來決定一最終輸出值;其中馬達驅動系統包含有處理電路、一驅動電路以及一無刷直流馬達,複數個脈衝寬度調變訊號的每一個脈衝寬度調變訊號係根據最終輸出值來自處理電路輸出至驅動電路,以及一驅動電壓根據複數個脈衝寬度調變訊號來藉由驅動電路而產生,以供驅動無刷直流馬達。According to an embodiment of the present invention, a method is provided for improving a resolution by N bits through a processing circuit of a motor drive system, where N is a positive integer. The method may include: performing a conversion on an analog command to generate a command count value; performing a first N-bit right shift operation on the command count value to generate an initial output value; performing a logic operation on the command count value. Operation to generate a low bit value; generate an overflow value based on the low bit value; and determine a final output value based on the initial output value and the overflow value; wherein the motor drive system includes a processing circuit, a drive circuit and a In the brushless DC motor, each pulse width modulation signal of the plurality of pulse width modulation signals is output from the processing circuit to the driving circuit according to the final output value, and a driving voltage is passed through the driving circuit according to the plurality of pulse width modulation signals. Produced to drive brushless DC motors.

根據本發明之一實施例,提供了一種馬達驅動系統。該馬達驅動系統可包含有一無刷直流馬達、一驅動電路以及用以將一解析度提高N位元的一處理電路。驅動電路可耦接於無刷直流馬達,並且可用以根據複數個脈衝寬度調變訊號來產生一驅動電壓,其中驅動電壓用以驅動無刷直流馬達。處理電路可耦接於驅動電路,並且可用以執行以下操作來將一解析度提高N位元:對一類比命令進行一轉換,以產生一命令計數值;對命令計數值進行一N位元右移操作,以產生一初始輸出值;對命令計數值進行一邏輯操作,以產生一低位元值;根據低位元值來產生一溢位值;根據初始輸出值與溢位值來決定一最終輸出值;以及根據最終輸出值來將複數個脈衝寬度調變訊號的每一個脈衝寬度調變訊號輸出至驅動電路;其中N為正整數;其中解析度與類比命令分別為一脈衝寬度調變解析度與一脈衝寬度調變命令,並且脈衝寬度調變命令用以控制驅動電壓的一電壓值;或解析度與類比命令分別為一轉速解析度與一轉速命令,並且轉速命令用以控制無刷直流馬達的轉速。According to an embodiment of the present invention, a motor drive system is provided. The motor drive system may include a brushless DC motor, a drive circuit, and a processing circuit for increasing a resolution by N bits. The drive circuit may be coupled to the brushless DC motor and may be used to generate a drive voltage according to a plurality of pulse width modulation signals, wherein the drive voltage is used to drive the brushless DC motor. The processing circuit can be coupled to the driving circuit and can be used to perform the following operations to increase a resolution by N bits: perform a conversion on an analog command to generate a command count value; perform an N-bit right shift operation on the command count value to generate an initial output value; perform a logical operation on the command count value to generate a low-bit value; generate an overflow value according to the low-bit value; determine a final output value according to the initial output value and the overflow value; and The final output value is used to output each pulse width modulation signal of the plurality of pulse width modulation signals to the driving circuit; wherein N is a positive integer; wherein the resolution and the analog command are respectively a pulse width modulation resolution and a pulse width modulation command, and the pulse width modulation command is used to control a voltage value of the driving voltage; or the resolution and the analog command are respectively a speed resolution and a speed command, and the speed command is used to control the speed of the brushless DC motor.

本發明的好處之一在於,藉由本發明的方法可以將脈衝寬度調變解析度提高X位元(例如X為一正整數),而無需增加處理電路的操作頻率,其可以減少處理電路的功耗以及製造成本,並且使得無刷直流馬達運轉順暢。此外,藉由本發明的方法可以將轉速解析度提高Y位元(例如Y為一正整數),由於藉由本發明的方法可以達到轉速解析度不足所無法達成的轉速,因此可以改善無刷直流馬達的轉速漣波。此外,由於用以提高脈衝寬度調變解析度或轉速解析度的位元數可以根據設計需求來決定,因此本發明之方法的設計彈性相當大。One of the advantages of the present invention is that the method of the present invention can improve the pulse width modulation resolution by X bits (for example, X is a positive integer) without increasing the operating frequency of the processing circuit, which can reduce the power consumption and manufacturing cost of the processing circuit and make the brushless DC motor run smoothly. In addition, the method of the present invention can improve the speed resolution by Y bits (for example, Y is a positive integer). Since the method of the present invention can achieve a speed that cannot be achieved with insufficient speed resolution, the speed ripple of the brushless DC motor can be improved. In addition, since the number of bits used to improve the pulse width modulation resolution or the speed resolution can be determined according to the design requirements, the design flexibility of the method of the present invention is quite large.

第1圖為依據本發明一實施例之一馬達驅動系統10的示意圖。如第1圖所示,馬達驅動系統10可包含有一輸入電壓產生電路50、一處理電路100(例如一微控制單元(micro control unit, MCU))、一驅動電路110以及一無刷直流馬達(brushless direct current (DC) motor)120,其中無刷直流馬達120可包含有一轉子(rotor;未顯示)以及一定子122,該轉子可以是一永久磁鐵,以及定子(stator)122可以是三相定子繞組。定子122可具有星型連接結構(Y-connection structure)或三角連接結構(delta-connection structure),並且可包含有一定子繞組a、一定子繞組b以及一定子繞組c,在本實施例中,定子122具有星型連接結構,但是本發明不以此為限。Figure 1 is a schematic diagram of a motor driving system 10 according to an embodiment of the present invention. As shown in FIG. 1 , the motor driving system 10 may include an input voltage generating circuit 50 , a processing circuit 100 (such as a micro control unit (MCU)), a driving circuit 110 and a brushless DC motor ( brushless direct current (DC) motor) 120, wherein the brushless DC motor 120 may include a rotor (not shown) and a stator 122. The rotor may be a permanent magnet, and the stator 122 may be a three-phase stator. winding. The stator 122 may have a star connection structure (Y-connection structure) or a delta-connection structure (delta-connection structure), and may include a stator winding a, a stator winding b, and a stator winding c. In this embodiment, The stator 122 has a star connection structure, but the present invention is not limited to this.

輸入電壓產生電路50可耦接於處理電路100與驅動電路110,以及可用以產生一輸入電壓V_IN,並且將輸入電壓V_IN輸出至處理電路100與驅動電路110,舉例來說,輸入電壓產生電路50可包含有一交流(alternating current, AC)電源52以及一橋接電路54,其中橋接電路54可用以自交流電源52接收一交流電壓V_AC,並且處理交流電壓V_AC以產生輸出電壓V_IN,但是本發明不限於此。處理電路100可耦接於驅動電路110,並且可用以將一系列的脈衝寬度調變(pulse width modulation, PWM)訊號PWM_1~PWM_N (N ≥ 1)輸出至驅動電路110。驅動電路110可耦接於無刷直流馬達120的定子122(尤其是,定子繞組a、定子繞組b以及定子繞組c),並且可用以根據脈衝寬度調變訊號PWM_1~PWM_N來產生一驅動電壓V_DRV以供驅動無刷直流馬達120,其中驅動電壓V_DRV與無刷直流馬達120的轉速成正比。舉例來說,驅動電路110可包含有一閘極驅動器電路112以及一功率電晶體電路114,其中閘極驅動器電路112可耦接於處理電路100,以及功率電晶體電路114可耦接於橋接電路54、閘極驅動器電路112以及無刷直流馬達120的定子122(尤其是,定子繞組a、定子繞組b以及定子繞組c),並且可用以接收輸入電壓V_IN。The input voltage generating circuit 50 can be coupled to the processing circuit 100 and the driving circuit 110, and can be used to generate an input voltage V_IN, and output the input voltage V_IN to the processing circuit 100 and the driving circuit 110. For example, the input voltage generating circuit 50 It may include an alternating current (AC) power supply 52 and a bridge circuit 54. The bridge circuit 54 may be used to receive an AC voltage V_AC from the AC power supply 52 and process the AC voltage V_AC to generate the output voltage V_IN. However, the invention is not limited thereto. this. The processing circuit 100 can be coupled to the driving circuit 110 and can be used to output a series of pulse width modulation (pulse width modulation, PWM) signals PWM_1 ~ PWM_N (N ≥ 1) to the driving circuit 110 . The driving circuit 110 can be coupled to the stator 122 of the brushless DC motor 120 (especially, the stator winding a, the stator winding b and the stator winding c), and can be used to generate a driving voltage V_DRV according to the pulse width modulation signals PWM_1~PWM_N. To drive the brushless DC motor 120 , the driving voltage V_DRV is proportional to the rotation speed of the brushless DC motor 120 . For example, the driving circuit 110 may include a gate driver circuit 112 and a power transistor circuit 114 , wherein the gate driver circuit 112 may be coupled to the processing circuit 100 , and the power transistor circuit 114 may be coupled to the bridge circuit 54 , the gate driver circuit 112 and the stator 122 of the brushless DC motor 120 (especially, the stator winding a, the stator winding b and the stator winding c), and may be used to receive the input voltage V_IN.

馬達驅動系統10可另包含有一分流電阻(shunt resistor)R 1,其中分流電阻R 1的一端可耦接至功率電晶體電路114,以及分流電阻R 1的另一端可耦接至一參考電壓(例如一接地電壓GND)。處理電路100可耦接於分流電阻R 1的兩端,並且可用以透過分流電阻R 1來自無刷直流馬達120接收複數個回授電流。 The motor driving system 10 may further include a shunt resistor R 1 , wherein one end of the shunt resistor R 1 may be coupled to the power transistor circuit 114 , and the other end of the shunt resistor R 1 may be coupled to a reference voltage ( For example, a ground voltage GND). The processing circuit 100 can be coupled to both ends of the shunt resistor R 1 and can be used to receive a plurality of feedback currents from the brushless DC motor 120 through the shunt resistor R 1 .

假設處理電路100是一整數系統,處理電路100的操作頻率為32百萬赫茲(megahertz, MHz),以及脈衝寬度調變訊號PWM_1~PWM_N的操作頻率為100千赫茲(kilohertz, kHz),其中處理電路100接收一類比命令(例如一脈衝寬度調變命令),該脈衝寬度調變命令為16位元的有符號數(亦即該脈衝寬度調變命令的最大值為32767 (2 15-1))以供控制驅動電壓V_DRV的電壓值,以及處理電路100的一脈衝寬度調變計數值為320(亦即32 MHz / 100 kHz)。處理電路100可執行演算法來進行一種用以在不增加處理電路100之操作頻率的情況下將脈衝寬度調變解析度提高X位元的方法,其中X可以是一正整數(亦即X ≥ 1),並且該演算法可以表示如下: 其中PWM OUT是脈衝寬度調變訊號PWM_1~PWM_N的每一個脈衝寬度調變訊號的一輸出(亦即一脈衝寬度調變輸出值),PWM COMMAND是脈衝寬度調變命令,PWM COUNT是脈衝寬度調變計數值,以及“>> X”代表一X位元右移操作。 Assume that the processing circuit 100 is an integer system, the operating frequency of the processing circuit 100 is 32 megahertz (MHz), and the operating frequency of the pulse width modulation signals PWM_1 ~ PWM_N is 100 kilohertz (kHz), where the processing The circuit 100 receives an analog command (for example, a pulse width modulation command). The pulse width modulation command is a 16-bit signed number (that is, the maximum value of the pulse width modulation command is 32767 (2 15 -1) ) for controlling the voltage value of the driving voltage V_DRV, and a pulse width modulation count value of the processing circuit 100 is 320 (that is, 32 MHz/100 kHz). The processing circuit 100 may execute an algorithm to perform a method for increasing the pulse width modulation resolution by X bits without increasing the operating frequency of the processing circuit 100 , where X may be a positive integer (i.e., X ≥ 1), and the algorithm can be expressed as follows: Among them, PWM OUT is an output of each pulse width modulation signal of the pulse width modulation signals PWM_1~PWM_N (that is, a pulse width modulation output value), PWM COMMAND is the pulse width modulation command, and PWM COUNT is the pulse width modulation command. variable count value, and ">>X" represents an X bit right shift operation.

為了更好的理解,在本實施例中,假設透過演算法來將脈衝寬度調變解析度提高15位元(亦即X = 15),脈衝寬度調變訊號PWM_1~PWM_N的數量為9個(亦即N=9),以及對於脈衝寬度調變訊號PWM_1~PWM_9的每一個脈衝寬度調變訊號來說,脈衝寬度調變命令為24444。 表一   PWM_1 PWM_2 PWM_3 PWM_4 PWM_5 PWM_6 PWM_7 PWM_8 PWM_9 LBV 23296 23296 23296 23296 23296 23296 23296 23296 23296 RLBV 23296 13825 4354 27650 18179 8708 32004 22533 13062 PWM OUT 238 239 239 238 239 239 238 239 239 For better understanding, in this embodiment, it is assumed that the pulse width modulation resolution is increased by 15 bits through the algorithm (that is, X = 15), and the number of pulse width modulation signals PWM_1~PWM_N is 9 ( That is, N=9), and for each pulse width modulation signal of the pulse width modulation signals PWM_1~PWM_9, the pulse width modulation command is 24444. Table I PWM_1 PWM_2 PWM_3 PWM_4 PWM_5 PWM_6 PWM_7 PWM_8 PWM_9 LBV 23296 23296 23296 23296 23296 23296 23296 23296 23296 RLBV 23296 13825 4354 27650 18179 8708 32004 22533 13062 PWM OUT 238 239 239 238 239 239 238 239 239

表一繪示了涉及藉由處理電路100執行演算法所進行之用以將脈衝寬度調變解析度提高15位元之方法的相關數值的一範例。舉例來說,對於脈衝寬度調變訊號PWM_1來說,脈衝寬度調變命令(亦即24444)與脈衝寬度調變計數值(亦即320)進行相乘以產生一命令計數值CCV(亦即CCV = PWM COMMAND* PWM COUNT= 24444 * 320 = 7822080),並且對命令計數值CCV進行一15位元右移操作以產生一初始輸出值IOV(亦即IOV = (PWM COMMAND* PWM COUNT) >> 15 = 7822080 >> 15 = 238),接著,對命令計數值CCV與2 15-1進行一及(AND)操作以產生一低位元值LBV(亦即LBV = 7822080 & (2 15-1) = 23296),並且累加(accumulate)低位元值LBV來產生一累加後低位元值ALBV,對於脈衝寬度調變訊號PWM_1來說,由於脈衝寬度調變訊號PWM_1是一系列脈衝寬度調變訊號PWM_1~ PWM_9終的第一個脈衝寬度調變訊號,因此累加後低位元值ALBV等於低位元值LBV(亦即ALBV = 23296),最後,對累加後低位元值ALBV進行一15位元右移操作來產生一溢位值(overflow value)OV(亦即OV = 23296 >> 15 = 0),其中溢位值OV可以是0或1。 Table 1 illustrates an example of relevant values related to a method for improving the pulse width modulation resolution by 15 bits by executing an algorithm on the processing circuit 100 . For example, for the pulse width modulation signal PWM_1, the pulse width modulation command (ie 24444) and the pulse width modulation count value (ie 320) are multiplied to generate a command count value CCV (ie CCV = PWM COMMAND * PWM COUNT = 24444 * 320 = 7822080), and perform a 15-bit right shift operation on the command count value CCV to generate an initial output value IOV (that is, IOV = (PWM COMMAND * PWM COUNT ) >> 15 = 7822080 >> 15 = 238), then perform an AND operation on the command count value CCV and 2 15 -1 to generate a low bit value LBV (that is, LBV = 7822080 & (2 15 -1) = 23296 ), and accumulate (accumulate) the low bit value LBV to generate an accumulated low bit value ALBV. For the pulse width modulation signal PWM_1, the pulse width modulation signal PWM_1 is a series of pulse width modulation signals PWM_1~PWM_9. The first pulse width modulation signal of Overflow value (overflow value) OV (that is, OV = 23296 >> 15 = 0), where the overflow value OV can be 0 or 1.

因應溢位值OV為1,增加1至初始輸出值IOV以產生脈衝寬度調變輸出值(亦即倘若OV = 1的話,則 PWM OUT= IOV + 1),並且對累加後低位元值ALBV與2 15-1進行一及(AND)操作以產生一剩餘低位元值RLBV(亦即ALBV & (2 15-1) = RLBV),其中剩餘低位元值RLBV被累加至下一個脈衝寬度調變訊號。因應溢位值OV為0,脈衝寬度調變輸出值係等於初始輸出值IOV(亦即倘若OV = 0的話,則 PWM OUT= IOV),並且累加後低位元值ALBV係作為剩餘低位元值RLBV來被累加至下一個脈衝寬度調變訊號。對於脈衝寬度調變訊號PWM_1來說,因應溢位值OV為0,脈衝寬度調變輸出值係等於初始輸出值IOV(亦即PWM OUT= IOV = 238),並且累加後低位元值ALBV(=23296)係作為剩餘低位元值RLBV來被累加至脈衝寬度調變訊號PWM_2。 According to the overflow value OV is 1, add 1 to the initial output value IOV to generate the pulse width modulation output value (that is, if OV = 1, then PWM OUT = IOV + 1), and the accumulated low-bit value ALBV and 2 15 -1 performs an AND operation to generate a remaining low bit value RLBV (that is, ALBV & (2 15 -1) = RLBV), in which the remaining low bit value RLBV is accumulated to the next pulse width modulation signal . Since the overflow value OV is 0, the pulse width modulation output value is equal to the initial output value IOV (that is, if OV = 0, then PWM OUT = IOV), and the accumulated low-bit value ALBV is used as the remaining low-bit value RLBV to be accumulated to the next pulse width modulation signal. For the pulse width modulation signal PWM_1, since the overflow value OV is 0, the pulse width modulation output value is equal to the initial output value IOV (that is, PWM OUT = IOV = 238), and the accumulated low bit value ALBV (= 23296) is accumulated into the pulse width modulation signal PWM_2 as the remaining low bit value RLBV.

對於脈衝寬度調變訊號PWM_2來說,脈衝寬度調變訊號PWM_2的命令計數值CCV、初始輸出值IOV與低位元值LBV與脈衝寬度調變訊號PWM_1的命令計數值CCV、初始輸出值IOV與低位元值LBV相同,亦即,脈衝寬度調變訊號PWM_2的命令計數值CCV、初始輸出值IOV與低位元值LBV分別等於7822080、238與23296,為簡潔起見,類似內容在此不再重複詳細描述。應注意的是,脈衝寬度調變訊號PWM_1的剩餘低位元值RLBV(=23296)被累加至脈衝寬度調變訊號PWM_2的低位元值LBV(=23296),以產生脈衝寬度調變訊號PWM_2的累加後低位元值ALBV(亦即ALBV = 23296 + 23296 = 46592)。接著,對累加後低位元值ALBV進行一15位元右移操作以產生溢位值OV(亦即OV = 46592 >> 15 = 1),因應溢位值OV為1,增加1至初始輸出值IOV以產生脈衝寬度調變輸出值(亦即PWM OUT= 238 + 1 = 239),並且對累加後低位元值ALBV與2 15-1進行一及(AND)操作以產生剩餘低位元值RLBV(亦即RLBV = 46592 & (2 15-1) = 13825),其中剩餘低位元值RLBV被累加至脈衝寬度調變訊號PWM_3。 For the pulse width modulation signal PWM_2, the command count value CCV, the initial output value IOV and the low-bit value LBV of the pulse width modulation signal PWM_2 are the same as the command count value CCV, the initial output value IOV and the low-bit value LBV of the pulse width modulation signal PWM_1, that is, the command count value CCV, the initial output value IOV and the low-bit value LBV of the pulse width modulation signal PWM_2 are equal to 7822080, 238 and 23296 respectively. For the sake of brevity, similar contents will not be repeated here in detail. It should be noted that the remaining low-bit value RLBV (=23296) of the pulse width modulation signal PWM_1 is accumulated to the low-bit value LBV (=23296) of the pulse width modulation signal PWM_2 to generate the accumulated low-bit value ALBV of the pulse width modulation signal PWM_2 (ie, ALBV = 23296 + 23296 = 46592). Next, a 15-bit right shift operation is performed on the accumulated low-bit value ALBV to generate an overflow value OV (i.e., OV = 46592 >> 15 = 1). Since the overflow value OV is 1, 1 is added to the initial output value IOV to generate a pulse width modulation output value (i.e., PWM OUT = 238 + 1 = 239), and an AND operation is performed on the accumulated low-bit value ALBV and 2 15 -1 to generate a residual low-bit value RLBV (i.e., RLBV = 46592 & (2 15 -1) = 13825), wherein the residual low-bit value RLBV is accumulated to the pulse width modulation signal PWM_3.

對於脈衝寬度調變訊號PWM_3來說,脈衝寬度調變訊號PWM_3的命令計數值CCV、初始輸出值IOV與低位元值LBV與脈衝寬度調變訊號PWM_1的命令計數值CCV、初始輸出值IOV與低位元值LBV相同,亦即,脈衝寬度調變訊號PWM_3的命令計數值CCV、初始輸出值IOV與低位元值LBV分別等於7822080、238與23296,為簡潔起見,類似內容在此不再重複詳細描述。應注意的是,脈衝寬度調變訊號PWM_2的剩餘低位元值RLBV(=13825)被累加至脈衝寬度調變訊號PWM_3的低位元值LBV(=23296),以產生脈衝寬度調變訊號PWM_3的累加後低位元值ALBV(亦即ALBV = 23296 + 13825 = 37121)。接著,對累加後低位元值ALBV進行一15位元右移操作以產生溢位值OV(亦即OV = 37121 >> 15 = 1),因應溢位值OV為1,增加1至初始輸出值IOV以產生脈衝寬度調變輸出值(亦即PWM OUT= 238 + 1 = 239),並且對累加後低位元值ALBV與2 15-1進行一及(AND)操作以產生剩餘低位元值RLBV(亦即RLBV = 37121 & (2 15-1) = 4354),其中剩餘低位元值RLBV被累加至脈衝寬度調變訊號PWM_4。為簡潔起見,對於脈衝寬度調變訊號PWM_4~PWM_9的類似內容在此不再重複詳細描述。 For the pulse width modulation signal PWM_3, the command count value CCV, the initial output value IOV and the low-bit value LBV of the pulse width modulation signal PWM_3 are the same as the command count value CCV, the initial output value IOV and the low-bit value LBV of the pulse width modulation signal PWM_1, that is, the command count value CCV, the initial output value IOV and the low-bit value LBV of the pulse width modulation signal PWM_3 are equal to 7822080, 238 and 23296 respectively. For the sake of brevity, similar contents will not be repeated in detail here. It should be noted that the remaining low-bit value RLBV (=13825) of the pulse width modulation signal PWM_2 is accumulated to the low-bit value LBV (=23296) of the pulse width modulation signal PWM_3 to generate the accumulated low-bit value ALBV of the pulse width modulation signal PWM_3 (ie, ALBV = 23296 + 13825 = 37121). Next, a 15-bit right shift operation is performed on the accumulated low-bit value ALBV to generate an overflow value OV (i.e., OV = 37121 >> 15 = 1). Since the overflow value OV is 1, 1 is added to the initial output value IOV to generate a pulse width modulation output value (i.e., PWM OUT = 238 + 1 = 239), and an AND operation is performed on the accumulated low-bit value ALBV and 2 15 -1 to generate a residual low-bit value RLBV (i.e., RLBV = 37121 & (2 15 -1) = 4354), wherein the residual low-bit value RLBV is accumulated to the pulse width modulation signal PWM_4. For the sake of brevity, similar contents of the pulse width modulation signals PWM_4~PWM_9 will not be repeated in detail.

在本實施例中,當脈衝寬度調變命令為24444時,理想的脈衝寬度調變輸出值為(24444/32767) * 320 = 238.718,對於本發明的方法來說,脈衝寬度調變訊號PWM_1~PWM_9的一平均脈衝寬度調變輸出值為238.67(238 + 239 + 239 + 238 + 239 + 239 + 238 + 239 + 239 / 9 = 238.67)。考量處理電路100執行一現有演算法的一案例,該現有演算法可以表示如下: 其中脈衝寬度調變訊號PWM_1~PWM_9的脈衝寬度調變輸出值皆等於238,以及脈衝寬度調變訊號PWM_1~PWM_9的一平均脈衝寬度調變輸出值為238(238 + 238 + 238 + 238 + 238 + 238 + 238 + 238 + 238 / 9 = 238),其犧牲了0.718的精度(238.718 – 238 = 0.718)。 In this embodiment, when the PWM command is 24444, the ideal PWM output value is (24444/32767) * 320 = 238.718. For the method of the present invention, an average PWM output value of the PWM signals PWM_1 to PWM_9 is 238.67 (238 + 239 + 239 + 238 + 239 + 239 + 238 + 239 + 239 / 9 = 238.67). Considering a case where the processing circuit 100 executes a conventional algorithm, the conventional algorithm can be expressed as follows: The pulse width modulation output values of the pulse width modulation signals PWM_1 to PWM_9 are all equal to 238, and an average pulse width modulation output value of the pulse width modulation signals PWM_1 to PWM_9 is 238 (238 + 238 + 238 + 238 + 238 + 238 + 238 + 238 / 9 = 238), which sacrifices the accuracy of 0.718 (238.718 – 238 = 0.718).

與此案例相比,本發明之方法的平均脈衝寬度調變輸出值只犧牲了0.051的精度(238.718 – 238.67 = 0.051),其遠小於現有演算法所犧牲的精度,此外,本發明之方法可根據設計需求來決定用以提高脈衝寬度調變解析度的位元數,因此,本發明之方法的設計彈性相當大。Compared with this case, the average PWM output value of the method of the present invention only sacrifices 0.051 accuracy (238.718 – 238.67 = 0.051), which is much smaller than the accuracy sacrificed by the existing algorithm. In addition, the method of the present invention can determine the number of bits used to improve the PWM resolution according to design requirements. Therefore, the design flexibility of the method of the present invention is quite large.

除了將脈衝寬度調變訊號PWM_1~PWM_N輸出至驅動電路110以供產生用以驅動無刷直流馬達120的驅動電壓V_DRV之外,處理電路100可另用以根據透過分流電阻R 1自無刷直流馬達120接收的複數個回授電流來輸出脈衝寬度調變訊號PWM_1~PWM_N,以控制無刷直流馬達120的角度(亦即轉速)。在處理電路100所進行之無刷直流馬達的角度計算中,可藉由利用該複數個回授電流來查表以取得無刷直流馬達120的角度,因此,處理電路100的轉速解析度可能會被角度的最低有效位元(least significant bit, LSB)所限制。 In addition to outputting the pulse width modulation signals PWM_1-PWM_N to the driving circuit 110 for generating the driving voltage V_DRV for driving the brushless DC motor 120, the processing circuit 100 can also be used to output the pulse width modulation signals PWM_1-PWM_N according to a plurality of feedback currents received from the brushless DC motor 120 through the shunt resistor R1 to control the angle (i.e., the rotation speed) of the brushless DC motor 120. In the angle calculation of the brushless DC motor performed by the processing circuit 100, the angle of the brushless DC motor 120 can be obtained by using the plurality of feedback currents to look up a table, so the rotation speed resolution of the processing circuit 100 may be limited by the least significant bit (LSB) of the angle.

假設角度的最低有效位元是16位元的無符號數,一類比命令(例如用以控制無刷直流馬達120的轉速的一轉速命令RC)亦是16位元的無符號數(亦即轉速命令RC的數量(=65536)對應於360度),處理電路100的取樣頻率為50 kHz(亦即處理電路100的取樣週期為0.00002秒),以及無刷直流馬達120的極數(pole)為5。對於轉速命令RC來說,在處理電路100中,一單位角度大約等於0.0055度(360度 / 65535 = 0.0055度),以及一轉速解析度大約等於274.66 度/秒(0.0055 / 0.00002 = 274.66 度/秒),其中該轉速解析度可以轉換成9.155每分鐘轉速(revolutions per minute, RPM)((274.66 / 360 / 5) * 60 = 9.155 RPM),亦即,當轉速命令RC為1或轉速命令RC的改變量為1(例如從1至2)時,無刷直流馬達120可以運轉在9.155 RPM。然而,在處理電路100中的轉速解析度為9.155 RPM的情況下,倘若藉由處理電路100將無刷直流馬達120的轉速控制在100 RPM的話,則無刷直流馬達120的轉速漣波(ripple)會很大,其可能會影響無刷直流馬達120的輸出效率,因此,除了脈衝寬度調變解析度之外,處理電路100可執行另一演算法以進行用來將處理電路100中的轉速解析度提高Y位元的方法,其中Y可以是一正整數(亦即Y ≥ 1),並且Y可以與上述X不同。此外,本發明之方法可根據設計需求來決定用以提高轉速解析度的位元數,因此,本發明之方法的設計彈性相當大。Assume that the least significant bit of the angle is a 16-bit unsigned number, an analog command (e.g., a speed command RC for controlling the speed of the brushless DC motor 120) is also a 16-bit unsigned number (i.e., the number of speed commands RC (=65536) corresponds to 360 degrees), the sampling frequency of the processing circuit 100 is 50 kHz (i.e., the sampling period of the processing circuit 100 is 0.00002 seconds), and the pole number (pole) of the brushless DC motor 120 is 5. For the speed command RC, in the processing circuit 100, a unit angle is approximately equal to 0.0055 degrees (360 degrees / 65535 = 0.0055 degrees), and a speed resolution is approximately equal to 274.66 degrees/second (0.0055 / 0.00002 = 274.66 degrees/second), wherein the speed resolution can be converted into 9.155 revolutions per minute (RPM) ((274.66 / 360 / 5) * 60 = 9.155 RPM), that is, when the speed command RC is 1 or the change in the speed command RC is 1 (for example, from 1 to 2), the brushless DC motor 120 can operate at 9.155 RPM. However, when the speed resolution of the processing circuit 100 is 9.155 RPM, if the speed of the brushless DC motor 120 is controlled at 100 RPM by the processing circuit 100, the speed ripple of the brushless DC motor 120 will be very large, which may affect the output efficiency of the brushless DC motor 120. Therefore, in addition to the pulse width modulation resolution, the processing circuit 100 can execute another algorithm to perform a method for increasing the speed resolution of the processing circuit 100 by Y bits, where Y can be a positive integer (i.e., Y ≥ 1), and Y can be different from the above X. In addition, the method of the present invention can determine the number of bits used to increase the speed resolution according to the design requirements, so the design flexibility of the method of the present invention is quite large.

請參照第2圖,第2圖為依據本發明一實施例之一處理電路200的示意圖,其中第1圖所示之處理電路100可以藉由第2圖所示之處理電路200來實現。如第2圖所示,處理電路200可包含有複數個電路,諸如一提高解析度後轉速命令模組210、一控制迴圈212、一提高解析度後回授計算模組214、一高解析度電壓轉換模組220、一高解析度角度轉換模組230以及一脈衝寬度調變產生電路240,提高解析度後轉速命令模組210可用以接收轉速命令RC,並且對轉速命令RC進行一Y位元左移操作,以產生一放大後轉速命令ARC。Please refer to Figure 2. Figure 2 is a schematic diagram of a processing circuit 200 according to an embodiment of the present invention. The processing circuit 100 shown in Figure 1 can be implemented by the processing circuit 200 shown in Figure 2. As shown in Figure 2, the processing circuit 200 may include a plurality of circuits, such as an improved resolution speed command module 210, a control loop 212, an enhanced resolution feedback calculation module 214, a high resolution There is a degree voltage conversion module 220, a high-resolution angle conversion module 230 and a pulse width modulation generation circuit 240. After the resolution is improved, the speed command module 210 can be used to receive the speed command RC and perform a Y on the speed command RC. A bit left shift operation is performed to generate an amplified rotational speed command ARC.

假設轉速命令RC是16位元的無符號數,並且Y係等於3,在對轉速命令RC進行3位元左移操作之後,可以產生放大後轉速命令ARC,並且放大後轉速命令ARC的數量(65536 << 3 = 524288)對應於360度,其中在轉速命令RC所對應的轉速解析度為9.155 RPM的情況下,放大後轉速命令ARC所對應的轉速解析度為1.144 RPM(9.155 / 8 = 1.144),亦即,當放大後轉速命令ARC為1時,無刷直流馬達120可運轉在1.144 RPM。Assuming that the speed command RC is a 16-bit unsigned number and Y is equal to 3, after the speed command RC is shifted left by 3 bits, the amplified speed command ARC can be generated, and the number of the amplified speed command ARC (65536 << 3 = 524288) corresponds to 360 degrees, wherein when the speed resolution corresponding to the speed command RC is 9.155 RPM, the speed resolution corresponding to the amplified speed command ARC is 1.144 RPM (9.155 / 8 = 1.144), that is, when the amplified speed command ARC is 1, the brushless DC motor 120 can operate at 1.144 RPM.

控制迴圈212可用以根據一回授訊號FS(例如複數個回授電流)來計算需輸出至無刷直流馬達120多少電壓(例如驅動電壓V_DRV的電壓值),以取得脈衝寬度調變命令(為簡潔起見,在第2圖中標記為“PWM_C”)。高解析度電壓轉換模組220可用以自控制迴圈212接收脈衝寬度調變命令,並且執行上述演算法來進行用以將脈衝寬度調變解析度提高X位元的方法,為簡潔起見,類似內容在此不再重複詳細描述。The control loop 212 can be used to calculate how much voltage (such as the voltage value of the driving voltage V_DRV) needs to be output to the brushless DC motor 120 according to a feedback signal FS (such as a plurality of feedback currents) to obtain the pulse width modulation command ( Labeled "PWM_C" in Figure 2 for brevity). The high-resolution voltage conversion module 220 can receive the pulse width modulation command from the control loop 212 and execute the above algorithm to perform the method of improving the pulse width modulation resolution by X bits. For simplicity, Similar content will not be described in detail here.

提高解析度後回授計算模組214可用以根據複數個回授電流與放大後轉速命令ARC來計算無刷直流馬達120的角度以及回授轉速,以產生一回授計算結果FCR。高解析度角度轉換模組230可用以根據回授計算結果FCR來執行該另一演算法,以進行用以將處理電路200中的轉速解析度提高Y位元的方法,其中Y可以是一正整數(例如Y = 3),並且該另一演算法可以表示如下: 其中COMMAND ANGLE是高解析度角度轉換模組230的一輸出,REAL VELOCITY是放大後轉速命令ARC,以及“>> Y”代表一Y位元右移操作。 表二   n=0 n=1 n=2 n=3 n=4 n=5 n=6 n=7 LBV 1 1 1 1 1 1 1 1 RLBV 1 2 3 4 5 6 7 0 COMMAND ANGLE 0 0 0 0 0 0 0 1 The improved resolution feedback calculation module 214 can be used to calculate the angle and feedback speed of the brushless DC motor 120 based on a plurality of feedback currents and amplified speed commands ARC to generate a feedback calculation result FCR. The high-resolution angle conversion module 230 can be used to execute another algorithm according to the feedback calculation result FCR to perform a method for improving the speed resolution in the processing circuit 200 by Y bits, where Y can be a positive integers (e.g. Y = 3), and this alternative algorithm can be expressed as follows: Among them, COMMAND ANGLE is an output of the high-resolution angle conversion module 230, REAL VELOCITY is the amplified rotational speed command ARC, and ">>Y" represents a Y-bit right shift operation. Table II n=0 n=1 n=2 n=3 n=4 n=5 n=6 n=7 LBV 1 1 1 1 1 1 1 1 RLBV 1 2 3 4 5 6 7 0 COMMAND ANGLE 0 0 0 0 0 0 0 1

表二繪示了涉及藉由處理電路200執行演算法所進行之用以將轉速解析度提高3位元之方法的相關數值的一範例。為了更好的理解,假設處理電路200所進行的取樣次數為8,並且對於每一次取樣來說,放大後轉速命令ARC為1。對於第1次取樣(在表二中標記為“n=0”)來說,對放大後轉速命令ARC進行一3位元右移操作來產生一初始輸出值IOV(亦即IOV = REAL VELOCITY>> 3 = 1 >> 3 = 0)),並且對放大後轉速命令ARC與2 3-1進行一及(AND)操作來產生一低位元值LBV(亦即LBV = 1 & (2 3-1) = 1),接著,累加低位元值LBV來產生一累加後低位元值ALBV,對於第1次取樣(n = 0)來說,累加後低位元值ALBV係等於低位元值LBV(亦即ALBV = LBV = 1),最後,對累加後低位元值ALBV進行一3位元右移操作來產生一溢位值OV(亦即OV = 1 >> 3 = 0),其中溢位值OV可以是0或1。 Table 2 illustrates an example of relevant values related to the method of improving the rotational speed resolution by 3 bits by executing the algorithm of the processing circuit 200 . For better understanding, it is assumed that the number of samplings performed by the processing circuit 200 is 8, and for each sampling, the amplified rotational speed command ARC is 1. For the first sampling (marked as "n=0" in Table 2), a 3-bit right shift operation is performed on the amplified speed command ARC to generate an initial output value IOV (that is, IOV = REAL VELOCITY > > 3 = 1 >> 3 = 0)), and perform an AND operation on the amplified speed command ARC and 2 3 -1 to generate a low-bit value LBV (that is, LBV = 1 & (2 3 -1 ) = 1), then, accumulate the low bit value LBV to generate an accumulated low bit value ALBV. For the first sampling (n = 0), the accumulated low bit value ALBV is equal to the low bit value LBV (that is, ALBV = LBV = 1), finally, perform a 3-bit right shift operation on the accumulated low-bit value ALBV to generate an overflow value OV (that is, OV = 1 >> 3 = 0), where the overflow value OV can be is 0 or 1.

因應溢位值OV是1,增加1至初始輸出值IOV以產生高解析度角度轉換模組230的輸出(亦即倘若OV = 1的話,則COMMAND ANGLE= IOV + 1),並且對累加後低位元值ALBV與2 3-1進行一及(AND)操作來產生一剩餘低位元值RLBV(亦即ALBV & (2 3-1) = RLBV),其中剩餘低位元值RLBV被累加至下一次的取樣。因應溢位值OV是0,高解析度角度轉換模組230的輸出係等於初始輸出值IOV(亦即倘若OV = 0的話,則COMMAND ANGLE= IOV),並且累加後低位元值ALBV係作為剩餘低位元值RLBV而被累加至下一次的取樣。對於第1次取樣(n = 0)來說,因應溢位值OV是0,高解析度角度轉換模組230的輸出係等於初始輸出值IOV(亦即COMMAND ANGLE= IOV = 0),並且累加後低位元值ALBV(ALBV = 1)係作為剩餘低位元值RLBV而被累加至第2次取樣(在表二中標記為“n=1”)。 According to the overflow value OV is 1, add 1 to the initial output value IOV to generate the output of the high-resolution angle conversion module 230 (that is, if OV = 1, then COMMAND ANGLE = IOV + 1), and the accumulated low bit The element value ALBV and 2 3 -1 perform an AND operation to generate a remaining low-bit value RLBV (that is, ALBV & (2 3 -1) = RLBV), in which the remaining low-bit value RLBV is accumulated to the next Sampling. Since the overflow value OV is 0, the output of the high-resolution angle conversion module 230 is equal to the initial output value IOV (that is, if OV = 0, then COMMAND ANGLE = IOV), and the accumulated low-bit value ALBV is used as the remainder. The low bit value RLBV is accumulated to the next sample. For the first sampling (n = 0), since the overflow value OV is 0, the output of the high-resolution angle conversion module 230 is equal to the initial output value IOV (that is, COMMAND ANGLE = IOV = 0), and is accumulated The last low-bit value ALBV (ALBV = 1) is accumulated to the second sample (marked as “n=1” in Table 2) as the remaining low-bit value RLBV.

對於第2次取樣(n=1)來說,第2次取樣的初始輸出值IOV以及低位元值LBV與第1次取樣的初始輸出值IOV以及低位元值LBV相同,亦即,第2次取樣的初始輸出值IOV以及低位元值LBV分別為0以及1,為簡潔起見,類似內容在此不再重複詳細描述。應注意的是,第1次取樣的剩餘低位元值RLBV(亦即RLBV = 1)被累加至第2次取樣的低位元值LBV(亦即LBV = 1)以產生第2次取樣的累加後低位元值ALBV(亦即ALBV = 1 + 1 = 2),接著,對累加後低位元值ALBV進行一3位元右移操作以產生溢位值OV(亦即OV = 2 >> 3 = 0),因應溢位值OV是0,高解析度角度轉換模組230的輸出係等於初始輸出值IOV(亦即COMMAND ANGLE= IOV = 0),並且累加後低位元值ALBV作為剩餘低位元值RLBV來被累加至第3次取樣(在表二中標記為“n=2”),為簡潔起見,對於第3次取樣至第7次取樣(在表二中標記為“n=6”)的類似內容在此不再重複詳細描述。 For the second sampling (n=1), the initial output value IOV and low-bit value LBV of the second sampling are the same as the initial output value IOV and low-bit value LBV of the first sampling, that is, the second sampling The sampled initial output value IOV and the low-bit value LBV are 0 and 1 respectively. For the sake of simplicity, similar content will not be described in detail here. It should be noted that the remaining low-bit value RLBV of the first sampling (that is, RLBV = 1) is accumulated to the low-bit value LBV of the second sampling (that is, LBV = 1) to produce the accumulated value of the second sampling. The low-bit value ALBV (that is, ALBV = 1 + 1 = 2), and then a 3-bit right shift operation is performed on the accumulated low-bit value ALBV to generate the overflow value OV (that is, OV = 2 >> 3 = 0 ), corresponding to the overflow value OV being 0, the output of the high-resolution angle conversion module 230 is equal to the initial output value IOV (that is, COMMAND ANGLE = IOV = 0), and the accumulated low-bit value ALBV is used as the remaining low-bit value RLBV to be accumulated to the 3rd sampling (marked as “n=2” in Table 2). For the sake of simplicity, for the 3rd to 7th sampling (marked as “n=6” in Table 2) Similar content will not be described in detail here.

對於第8次取樣(在表二中標記為“n=7”)來說,第8次取樣的初始輸出值IOV以及低位元值LBV與第1次取樣的初始輸出值IOV以及低位元值LBV相同,亦即,第8次取樣的初始輸出值IOV以及低位元值LBV分別為0以及1,為簡潔起見,類似內容在此不再重複詳細描述。應注意的是,第7次取樣(n=6)的剩餘低位元值RLBV(亦即RLBV = 7)被累加至第8次取樣的低位元值LBV(亦即LBV = 1),以產生第8次取樣的累加後低位元值ALBV(亦即ALBV = 1 + 7 = 8),接著,對累加後低位元值ALBV進行一3位元右移操作來產生溢位值OV(亦即OV = 8 >> 3 = 1),因應溢位值OV是1,增加1至初始輸出值IOV以產生高解析度角度轉換模組230的輸出(亦即COMMAND ANGLE= 0 + 1 = 1)。 For the 8th sampling (marked as "n=7" in Table 2), the initial output value IOV and the low-bit value LBV of the 8th sampling are the same as the initial output value IOV and the low-bit value LBV of the 1st sampling, that is, the initial output value IOV and the low-bit value LBV of the 8th sampling are 0 and 1, respectively. For the sake of brevity, similar content will not be repeated in detail here. It should be noted that the residual low-bit value RLBV of the 7th sample (n=6) (i.e., RLBV = 7) is accumulated to the low-bit value LBV of the 8th sample (i.e., LBV = 1) to generate the accumulated low-bit value ALBV of the 8th sample (i.e., ALBV = 1 + 7 = 8). Then, a 3-bit right shift operation is performed on the accumulated low-bit value ALBV to generate the overflow value OV (i.e., OV = 8 >> 3 = 1). Since the overflow value OV is 1, 1 is added to the initial output value IOV to generate the output of the high-resolution angle conversion module 230 (i.e., COMMAND ANGLE = 0 + 1 = 1).

當高解析度角度轉換模組230的輸出等於0時,無刷直流馬達120會運轉在0 RPM,而當高解析度角度轉換模組230的輸出等於1時,無刷直流馬達120會運轉在9.155 RPM,在8次的取樣中,無刷直流馬達120的平均轉速為1.144 RPM((0 + 0 + 0 + 0 + 0 + 0 + 0 + 9.155) / 8 = 1.144),如此一來,雖然無刷直流馬達120的真實轉速仍然為9.155 RPM,但在8次取樣的過程中,可以藉由本發明之方法來達到轉速解析度不足所無法達成的轉速(例如1.144 RPM),因此,可以改善無刷直流馬達120的轉速漣波。 表三   n=0 n=1 n=2 n=3 n=4 n=5 n=6 n=7 LBV 2 2 2 2 2 2 2 2 RLBV 2 4 6 0 2 4 6 0 COMMAND ANGLE 0 0 0 1 0 0 0 1 When the output of the high-resolution angle conversion module 230 is equal to 0, the brushless DC motor 120 will operate at 0 RPM, and when the output of the high-resolution angle conversion module 230 is equal to 1, the brushless DC motor 120 will operate at 9.155 RPM. In 8 samplings, the average speed of the brushless DC motor 120 is 1.144 RPM ((0 + 0 + 0 + 0 + 0 + 0 + 0 + 9.155) / 8 = 1.144). In this way, although the actual speed of the brushless DC motor 120 is still 9.155 RPM, the method of the present invention can be used to achieve a speed that cannot be achieved due to insufficient speed resolution (for example, 1.144 RPM) during the 8 samplings. Therefore, the speed ripple of the brushless DC motor 120 can be improved. Table 3 n=0 n=1 n=2 n=3 n=4 n=5 n=6 n=7 LBV 2 2 2 2 2 2 2 2 R 2 4 6 0 2 4 6 0 COMMAND ANGLE 0 0 0 1 0 0 0 1

表三繪示了涉及藉由處理電路200執行演算法所進行之用以將轉速解析度提高3位元之方法的相關數值的另一範例。為了更好的理解,假設處理電路200所進行的取樣次數為8,並且對於每一次取樣來說,放大後轉速命令ARC為2(其對應於2.288 RPM)。對於第1次取樣(在表三中標記為“n=0”)來說,對放大後轉速命令ARC進行一3位元右移操作來產生初始輸出值IOV(亦即IOV = REAL VELOCITY>> 3 = 2 >> 3 = 0)),並且對放大後轉速命令ARC與2 3-1進行一及(AND)操作來產生低位元值LBV(亦即LBV = 2 & (2 3-1) = 2),接著,累加低位元值LBV來產生累加後低位元值ALBV,對於第1次取樣(n = 0)來說,累加後低位元值ALBV係等於低位元值LBV(亦即ALBV = LBV = 2),最後,對累加後低位元值ALBV進行一3位元右移操作來產生溢位值OV(亦即OV = 2 >> 3 = 0)。因應溢位值OV是0,高解析度角度轉換模組230的輸出係等於初始輸出值IOV(亦即COMMAND ANGLE= IOV = 0),並且累加後低位元值ALBV(亦即ALBV = 2)作為剩餘低位元值RLBV而被累加至第2次取樣(在表三中標記為“n=1”)。 Table 3 shows another example of the relevant values involved in the method for increasing the speed resolution by 3 bits by the algorithm executed by the processing circuit 200. For better understanding, it is assumed that the number of samples performed by the processing circuit 200 is 8, and for each sample, the amplified speed command ARC is 2 (which corresponds to 2.288 RPM). For the first sampling (marked as "n=0" in Table 3), a 3-bit right shift operation is performed on the amplified rotation speed command ARC to generate an initial output value IOV (i.e., IOV = REAL VELOCITY >> 3 = 2 >> 3 = 0), and an AND operation is performed on the amplified rotation speed command ARC and 2 3 -1 to generate a low-bit value LBV (i.e., LBV = 2 & (2 3 -1) = 2). Then, the low-bit value LBV is accumulated to generate an accumulated low-bit value ALBV. For the first sampling (n = 0), the accumulated low-bit value ALBV is equal to the low-bit value LBV (i.e., ALBV = LBV = 2). Finally, a 3-bit right shift operation is performed on the accumulated low-bit value ALBV to generate an overflow value OV (i.e., OV = 2 >> 3 = 0). In response to the overflow value OV being 0, the output of the high-resolution angle conversion module 230 is equal to the initial output value IOV (i.e., COMMAND ANGLE = IOV = 0), and the accumulated low-bit value ALBV (i.e., ALBV = 2) is accumulated to the second sampling (marked as "n=1" in Table 3) as the residual low-bit value RLBV.

對於第2次取樣(n=1)來說,第2次取樣的初始輸出值IOV以及低位元值LBV與第1次取樣的初始輸出值IOV以及低位元值LBV相同,亦即,第2次取樣的初始輸出值IOV以及低位元值LBV分別為0以及2,為簡潔起見,類似內容在此不再重複詳細描述。應注意的是,第1次取樣的剩餘低位元值RLBV(亦即RLBV = 2)被累加至第2次取樣的低位元值LBV(亦即LBV = 2),以產生第2次取樣的累加後低位元值ALBV(亦即ALBV = 2 + 2 = 4),接著,對累加後低位元值ALBV進行一3位元右移操作來產生溢位值OV(亦即OV = 4 >> 3 = 0),因應溢位值OV是0,高解析度角度轉換模組230的輸出係等於初始輸出值IOV(亦即COMMAND ANGLE= IOV = 0),並且累加後低位元值ALBV(亦即ALBV = 4)作為剩餘低位元值RLBV而被累加至第3次取樣(在表三中標記為“n=2”),為簡潔起見,對於第3次取樣的類似內容在此不再重複詳細描述。 For the second sampling (n=1), the initial output value IOV and low-bit value LBV of the second sampling are the same as the initial output value IOV and low-bit value LBV of the first sampling, that is, the second sampling The sampled initial output value IOV and the low-bit value LBV are 0 and 2 respectively. For the sake of simplicity, similar content will not be described in detail here. It should be noted that the remaining low-bit value RLBV of the first sample (that is, RLBV = 2) is accumulated to the low-bit value LBV of the second sample (that is, LBV = 2) to generate the accumulation of the second sample. Then, a 3-bit right shift operation is performed on the accumulated low-bit value ALBV to generate the overflow value OV (that is, OV = 4 >> 3 = 0), corresponding to the overflow value OV being 0, the output of the high-resolution angle conversion module 230 is equal to the initial output value IOV (that is, COMMAND ANGLE = IOV = 0), and the accumulated low bit value ALBV (that is, ALBV = 4) As the remaining low bit value RLBV, it is accumulated to the third sampling (marked as "n=2" in Table 3). For the sake of brevity, the similar content of the third sampling will not be described in detail here. .

對於第4次取樣(在表三中標記為“n=3”)來說,第4次取樣的初始輸出值IOV以及低位元值LBV與第1次取樣的初始輸出值IOV以及低位元值LBV相同,亦即,第4次取樣的初始輸出值IOV以及低位元值LBV分別為0以及2,為簡潔起見,類似內容在此不再重複詳細描述。應注意的是,第3次取樣(n=2)的剩餘低位元值RLBV(亦即RLBV = 6)被累加至第4次取樣的位元值LBV(亦即LBV = 2),以產生第4次取樣的累加後低位元值ALBV(亦即ALBV = 2 + 6 = 8),接著,對累加後低位元值ALBV進行一3位元右移操作來產生溢位值OV(亦即OV = 8 >> 3 = 1),因應溢位值OV是1,增加1至初始輸出值IOV來產生高解析度角度轉換模組230的輸出(亦即COMMAND ANGLE= 0 + 1 = 1),並且對累加後低位元值ALBV與2 3-1進行一及(AND)操作來產生剩餘低位元值RLBV(亦即RLBV = 8 & (2 3-1) = 0),其中剩餘低位元值RLBV被累加至下一次的取樣。 For the 4th sampling (marked as "n=3" in Table 3), the initial output value IOV and the low-bit value LBV of the 4th sampling are the same as the initial output value IOV and the low-bit value LBV of the 1st sampling, that is, the initial output value IOV and the low-bit value LBV of the 4th sampling are 0 and 2 respectively. For the sake of brevity, similar content will not be repeated in detail here. It should be noted that the residual low-bit value RLBV of the third sampling (n=2) (i.e., RLBV = 6) is accumulated to the bit value LBV of the fourth sampling (i.e., LBV = 2) to generate the accumulated low-bit value ALBV of the fourth sampling (i.e., ALBV = 2 + 6 = 8). Then, a 3-bit right shift operation is performed on the accumulated low-bit value ALBV to generate the overflow value OV (i.e., OV = 8 >> 3 = 1). Since the overflow value OV is 1, 1 is added to the initial output value IOV to generate the output of the high-resolution angle conversion module 230 (i.e., COMMAND ANGLE = 0 + 1 = 1), and an AND operation is performed on the accumulated low-bit value ALBV and 2 3 -1 to generate the residual low-bit value RLBV (i.e., RLBV = 8 & (2 3 -1) = 0), where the remaining low-bit value RLBV is accumulated to the next sampling.

類似地,對於第5次取樣(在表三中標記為“n=4”)至第8次取樣(在表三中標記為“n=7”)來說,高解析度角度轉換模組230的輸出分別為0、0、0以及1。當高解析度角度轉換模組230的輸出為0時,無刷直流馬達120會運轉在0 RPM,而當高解析度角度轉換模組230的輸出為1時,無刷直流馬達120會運轉在9.155 RPM,在8次的取樣中,無刷直流馬達120的平均轉速為2.288 RPM((0 + 0 + 0 + 9.155 + 0 + 0 + 0 + 9.155) / 8 = 2.288),如此一來,雖然無刷直流馬達120的真實轉速仍然為9.155 RPM,但在8次取樣的過程中,可以藉由本發明之方法來達到轉速解析度不足所無法達成的轉速(例如2.288 RPM),因此,可以改善無刷直流馬達120的轉速漣波。Similarly, for the 5th sample (labeled as “n=4” in Table 3) to the 8th sample (labeled as “n=7” in Table 3), the outputs of the high-resolution angle conversion module 230 are 0, 0, 0, and 1, respectively. When the output of the high-resolution angle conversion module 230 is 0, the brushless DC motor 120 will operate at 0 RPM, and when the output of the high-resolution angle conversion module 230 is 1, the brushless DC motor 120 will operate at 9.155 RPM. In 8 samplings, the average speed of the brushless DC motor 120 is 2.288 RPM ((0 + 0 + 0 + 9.155 + 0 + 0 + 0 + 9.155) / 8 = 2.288). In this way, although the actual speed of the brushless DC motor 120 is still 9.155 RPM, the method of the present invention can be used to achieve a speed (for example, 2.288 RPM) that cannot be achieved due to insufficient speed resolution during the 8 samplings. Therefore, the speed ripple of the brushless DC motor 120 can be improved.

脈衝寬度調變產生電路240可用以分別自高解析度電壓轉換模組220以及高解析度角度轉換模組230接收一高解析度電壓轉換結果HVR以及一高解析度角度轉換結果HAR,以產生脈衝寬度調變訊號PWM_1~PWM_N,並且將脈衝寬度調變訊號PWM_1~PWM_N輸出至驅動電路110,為簡潔起見,對於本實施例的類似內容在此不再重複詳細描述。The pulse width modulation generating circuit 240 can be used to receive a high-resolution voltage conversion result HVR and a high-resolution angle conversion result HAR from the high-resolution voltage conversion module 220 and the high-resolution angle conversion module 230 respectively to generate pulse width modulation signals PWM_1~PWM_N, and output the pulse width modulation signals PWM_1~PWM_N to the driving circuit 110. For the sake of brevity, similar contents of this embodiment will not be repeated in detail.

第3圖為依據本發明一實施例之用以將脈衝寬度調變解析度提高X位元的方法流程圖,其中X為一正整數。假若可以得到相同的結果,則步驟不一定要完全遵照第3圖所示的流程來依序執行,舉例來說,第3圖所示之方法可以由第1圖所示之處理電路100或第2圖所示之處理電路200(尤其是,高解析度電壓轉換模組220)來加以實現。FIG. 3 is a flow chart of a method for improving pulse width modulation resolution by X bits according to an embodiment of the present invention, where X is a positive integer. If the same result can be obtained, the steps do not have to be executed in sequence according to the process shown in Figure 3. For example, the method shown in Figure 3 can be performed by the processing circuit 100 shown in Figure 1 or the processing circuit 100 shown in Figure 1. This is achieved by using the processing circuit 200 (especially the high-resolution voltage conversion module 220) shown in FIG. 2 .

在步驟S300中,自控制迴圈212接收一脈衝寬度調變命令。In step S300, the control loop 212 receives a PWM command.

在步驟S302中,將該脈衝寬度調變命令與一脈衝寬度調變計數值相乘來產生一命令計數值CCV,其中該脈衝寬度調變計數值是藉由將處理電路200的一操作頻率除以脈衝寬度調變訊號的一操作頻率來產生。In step S302, the PWM command is multiplied by a PWM count value to generate a command count value CCV, wherein the PWM count value is generated by dividing an operating frequency of the processing circuit 200 by an operating frequency of the PWM signal.

在步驟S304中,對命令計數值CCV進行一X位元右移操作來產生一初始輸出值IOV。In step S304, an X-bit right shift operation is performed on the command count value CCV to generate an initial output value IOV.

在步驟S306中,對命令計數值CCV與2 X-1進行一及(AND)操作來產生一低位元值LBV。 In step S306, an AND operation is performed on the command count value CCV and 2 x -1 to generate a low bit value LBV.

在步驟S308中,累加低位元值LBV來產生一累加後低位元值ALBV。In step S308, the low bit value LBV is accumulated to generate an accumulated low bit value ALBV.

在步驟S310中,對累加後低位元值ALBV進行一X位元右移操作來產生一溢位值OV。In step S310, an X-bit right shift operation is performed on the accumulated low-bit value ALBV to generate an overflow value OV.

在步驟S312中,因應溢位值OV是1,增加1至初始輸出值IOV來產生脈衝寬度調變輸出值,以及因應溢位值OV是0,脈衝寬度調變輸出值係等於初始輸出值IOV。In step S312, in response to the overflow value OV being 1, 1 is added to the initial output value IOV to generate a PWM output value, and in response to the overflow value OV being 0, the PWM output value is equal to the initial output value IOV.

由於熟習技藝者可透過上述對於第1圖所示之處理電路100或第2圖所示之處理電路200的說明書內容而輕易瞭解第3圖所示各步驟的操作,為了簡潔起見,於本實施例中類似的內容在此不重複贅述。Since a skilled person can easily understand the operation of each step shown in FIG. 3 through the above description of the processing circuit 100 shown in FIG. 1 or the processing circuit 200 shown in FIG. 2, for the sake of brevity, similar contents in this embodiment will not be repeated here.

第4圖為依據本發明一實施例之用以將轉速解析度提高Y位元的方法流程圖,其中Y為一正整數。假若可以得到相同的結果,則步驟不一定要完全遵照第4圖所示的流程來依序執行,舉例來說,第4圖所示之方法可以由第1圖所示之處理電路100或第2圖所示之處理電路200(尤其是,高解析度角度轉換模組230)來加以實現。Figure 4 is a flowchart of a method for improving the speed resolution by Y bits according to an embodiment of the present invention, where Y is a positive integer. If the same result can be obtained, the steps do not have to be executed in sequence according to the process shown in Figure 4. For example, the method shown in Figure 4 can be performed by the processing circuit 100 shown in Figure 1 or the processing circuit 100 shown in Figure 1. This is implemented by the processing circuit 200 shown in Figure 2 (especially, the high-resolution angle conversion module 230).

在步驟S400中,藉由處理電路200來接收一轉速命令RC,並且對轉速命令RC進行一Y位元左移操作來產生一放大後轉速命令ARC。In step S400, a rotation speed command RC is received by the processing circuit 200, and a Y-bit left shift operation is performed on the rotation speed command RC to generate an amplified rotation speed command ARC.

在步驟S402中,對放大後轉速命令ARC進行一Y位元右移操作來產生一初始輸出值IOV。In step S402, a Y-bit right shift operation is performed on the amplified rotational speed command ARC to generate an initial output value IOV.

在步驟S404中,對放大後轉速命令ARC與2 Y- 1進行一及(AND)操作來產生一低位元值LBV。 In step S404, an AND operation is performed on the amplified rotation speed command ARC and 2 Y - 1 to generate a low bit value LBV.

在步驟S406中,累加低位元值LBV來產生一累加後低位元值ALBV。In step S406, the low-bit value LBV is accumulated to generate an accumulated low-bit value ALBV.

在步驟S408中,對累加後低位元值ALBV進行一Y位元右移操作來產一溢位值OV。In step S408, a Y-bit right shift operation is performed on the accumulated low-bit value ALBV to generate an overflow value OV.

在步驟S410中,因應溢位值OV是1,增加1至初始輸出值IOV來產生高解析度角度轉換模組230的一輸出,以及因應溢位值OV是0,高解析度角度轉換模組230的該輸出係等於初始輸出值IOV。In step S410, in response to the overflow value OV being 1, 1 is added to the initial output value IOV to generate an output of the high-resolution angle conversion module 230, and in response to the overflow value OV being 0, the high-resolution angle conversion module This output of 230 is equal to the initial output value IOV.

由於熟習技藝者可透過上述對於第1圖所示之處理電路100或第2圖所示之處理電路200的說明書內容而輕易瞭解第4圖所示各步驟的操作,為了簡潔起見,於本實施例中類似的內容在此不重複贅述。Since those skilled in the art can easily understand the operations of each step shown in Figure 4 through the above description of the processing circuit 100 shown in Figure 1 or the processing circuit 200 shown in Figure 2, for the sake of simplicity, here Similar content in the embodiment will not be repeated here.

總結來說,藉由本發明的方法可以將脈衝寬度調變解析度提高X位元(例如X為一正整數),而無需增加處理電路的操作頻率,其可以減少處理電路的功耗以及製造成本,並且使得無刷直流馬達運轉順暢。此外,藉由本發明的方法可以將轉速解析度提高Y位元(例如Y為一正整數),由於藉由本發明的方法可以達到轉速解析度不足所無法達成的轉速,因此可以改善無刷直流馬達的轉速漣波。此外,由於用以提高脈衝寬度調變解析度或轉速解析度的位元數可以根據設計需求來決定,因此本發明之方法的設計彈性相當大。 以上所述僅為本發明之較佳實施例,凡依本發明申請專利範圍所做之均等變化與修飾,皆應屬本發明之涵蓋範圍。 In summary, the method of the present invention can improve the pulse width modulation resolution by X bits (for example, X is a positive integer) without increasing the operating frequency of the processing circuit, which can reduce the power consumption and manufacturing cost of the processing circuit and make the brushless DC motor run smoothly. In addition, the method of the present invention can improve the speed resolution by Y bits (for example, Y is a positive integer). Since the method of the present invention can achieve a speed that cannot be achieved with insufficient speed resolution, the speed ripple of the brushless DC motor can be improved. In addition, since the number of bits used to improve the pulse width modulation resolution or the speed resolution can be determined according to the design requirements, the design flexibility of the method of the present invention is quite large. The above is only the preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention shall fall within the scope of the present invention.

10:馬達驅動系統 50:輸入電壓產生電路 52:交流電源 54:橋接電路 100, 200:處理電路 110:驅動電路 112:閘極驅動器電路 114:功率電晶體電路 120:無刷直流馬達 122:定子 PWM_1~PWM_N:脈衝寬度調變訊號 V_AC:交流電壓 V_IN:輸入電壓 V_DRV:驅動電壓 R 1:分流電阻 GND:接地電壓 a, b, c:定子繞組 210:提高解析度後轉速命令模組 212:控制迴圈 214:提高解析度後回授計算模組 220:高解析度電壓轉換模組 230:高解析度角度轉換模組 240:脈衝寬度調變產生電路 RC:轉速命令 ARC:放大後轉速命令 FS:回授訊號 PWM_C:脈衝寬度調變命令 FCR:回授計算結果 HVR:高解析度電壓轉換結果 HAR: 高解析度角度轉換結果 S300~S312, S400~S410:步驟 10: Motor drive system 50: Input voltage generation circuit 52: AC power supply 54: Bridge circuit 100, 200: Processing circuit 110: Drive circuit 112: Gate driver circuit 114: Power transistor circuit 120: Brushless DC motor 122: Stator PWM_1~PWM_N: Pulse width modulation signal V_AC: AC voltage V_IN: Input voltage V_DRV: Drive voltage R 1 : Shunt resistor GND: Ground voltage a, b, c: Stator winding 210: Speed command module 212 after improving resolution: Control loop 214: Improved resolution feedback calculation module 220: High-resolution voltage conversion module 230: High-resolution angle conversion module 240: Pulse width modulation generation circuit RC: Speed command ARC: Amplified speed command FS: Feedback signal PWM_C: Pulse width modulation command FCR: Feedback calculation result HVR: High-resolution voltage conversion result HAR: High-resolution angle conversion result S300~S312, S400~S410: Steps

第1圖為依據本發明一實施例之一馬達驅動系統的示意圖。 第2圖為依據本發明一實施例之一處理電路的示意圖。 第3圖為依據本發明一實施例之用以將脈衝寬度調變解析度提高X位元的方法流程圖。 第4圖為依據本發明一實施例之用以將轉速解析度提高Y位元的方法流程圖。 Figure 1 is a schematic diagram of a motor driving system according to an embodiment of the present invention. Figure 2 is a schematic diagram of a processing circuit according to an embodiment of the present invention. FIG. 3 is a flow chart of a method for improving pulse width modulation resolution by X bits according to an embodiment of the present invention. FIG. 4 is a flowchart of a method for improving rotational speed resolution by Y bits according to an embodiment of the present invention.

S300~S312:步驟 S300~S312: steps

Claims (14)

一種用以藉由一馬達驅動系統之一處理電路來將一解析度提高N位元的方法,其中N為一正整數,以及該方法包含有: 對一類比命令進行一轉換,以產生一命令計數值; 對該命令計數值進行一第一N位元右移操作,以產生一初始輸出值; 對該命令計數值進行一邏輯操作,以產生一低位元值; 根據該低位元值來產生一溢位值;以及 根據該初始輸出值與該溢位值來決定一最終輸出值; 其中該馬達驅動系統包含有該處理電路、一驅動電路以及一無刷直流馬達,複數個脈衝寬度調變訊號的每一個脈衝寬度調變訊號係根據該最終輸出值來自該處理電路輸出至該驅動電路,以及一驅動電壓根據該複數個脈衝寬度調變訊號來藉由該驅動電路而產生,以供驅動該無刷直流馬達。 A method for improving a resolution by N bits through a processing circuit of a motor drive system, where N is a positive integer, and the method includes: perform a conversion on an analog command to generate a command count value; Perform a first N-bit right shift operation on the command count value to generate an initial output value; Perform a logical operation on the command count value to generate a low-bit value; Generate an overflow value based on the low bit value; and Determine a final output value based on the initial output value and the overflow value; The motor driving system includes the processing circuit, a driving circuit and a brushless DC motor, and each pulse width modulation signal of the plurality of pulse width modulation signals is output from the processing circuit to the driver according to the final output value. circuit, and a driving voltage is generated by the driving circuit according to the plurality of pulse width modulation signals for driving the brushless DC motor. 如申請專利範圍第1項所述之方法,其中該解析度係一脈衝寬度調變解析度,以及該類比命令是一脈衝寬度調變命令,以供控制該驅動電壓的一電壓值。As described in the method described in item 1 of the patent application, the resolution is a pulse width modulation resolution, and the analog command is a pulse width modulation command for controlling a voltage value of the driving voltage. 如申請專利範圍第2項所述之方法,其中對該類比命令進行該轉換,以產生該命令計數值的步驟包含有: 將該脈衝寬度調變命令與一脈衝寬度調變計數值進行相乘,以產生該命令計數值,其中該脈衝寬度調變計數值係藉由將該處理電路的一操作頻率除以該複數個脈衝寬度調變訊號的一操作頻率來產生。 As described in the method of item 2 of the patent application scope, the step of converting the analog command to generate the command count value includes: Multiplying the pulse width modulation command with a pulse width modulation count value to generate the command count value, wherein the pulse width modulation count value is generated by dividing an operating frequency of the processing circuit by an operating frequency of the plurality of pulse width modulation signals. 如申請專利範圍第2項所述之方法,其中對該命令計數值進行該邏輯操作,以產生該低位元值的步驟包含有: 對該命令計數值與2 N-1進行一及(AND)操作,以產生該低位元值。 For the method described in item 2 of the patent application, the step of performing the logical operation on the command count value to generate the low-bit value includes: performing an AND (AND) on the command count value and 2 N -1 Operate to produce the low-bit value. 如申請專利範圍第2項所述之方法,其中根據該低位元值來產生該溢位值的步驟包含有: 累加該低位元值以產生一累加後低位元值;以及 對該累加後低位元值進行一第二N位元右移操作,以產生該溢位值。 As described in item 2 of the patent application scope, the step of generating the overflow value according to the low-bit value includes: Accumulating the low-bit value to generate an accumulated low-bit value; and Performing a second N-bit right shift operation on the accumulated low-bit value to generate the overflow value. 如申請專利範圍第2項所述之方法,其中根據該初始輸出值與該溢位值來決定該最終輸出值的步驟包含有: 因應該溢位值為1,增加1至該初始輸出值以產生該最終輸出值。 As described in item 2 of the patent application scope, the step of determining the final output value based on the initial output value and the overflow value includes: In response to the overflow value being 1, adding 1 to the initial output value to generate the final output value. 如申請專利範圍第2項所述之方法,其中根據該初始輸出值與該溢位值來決定該最終輸出值的步驟包含有: 因應該溢位值為0,該最終輸出值等於該初始輸出值。 For the method described in item 2 of the patent application, the steps of determining the final output value based on the initial output value and the overflow value include: Since the overflow value is 0, the final output value is equal to the initial output value. 如申請專利範圍第1項所述之方法,其中該解析度係一轉速解析度,以及該類比命令係一轉速命令,以供控制該無刷直流馬達的轉速。The method as described in claim 1, wherein the resolution is a speed resolution, and the analog command is a speed command for controlling the speed of the brushless DC motor. 如申請專利範圍第8項所述之方法,其中對該類比命令進行該轉換,以產生該命令計數值的步驟包含有: 對該轉速命令進行一N位元左移操作,以產生一放大後轉速命令來作為該命令計數值。 As described in item 8 of the patent application scope, the step of converting the analog command to generate the command count value includes: Performing an N-bit left shift operation on the speed command to generate an amplified speed command as the command count value. 如申請專利範圍第8項所述之方法,其中對該命令計數值進行該邏輯操作,以產生該低位元值的步驟包含有: 對該命令計數值與2 N-1進行一及(AND)操作,以產生該低位元值。 For the method described in item 8 of the patent application, the step of performing the logical operation on the command count value to generate the low-bit value includes: performing an AND (AND) on the command count value and 2 N -1 Operate to produce the low-bit value. 如申請專利範圍第8項所述之方法,其中根據該低位元值來產生該溢位值的步驟包含有: 累加該低位元值以產生一累加後低位元值;以及 對該累加後低位元值進行一第二N位元右移操作,以產生該溢位值。 As described in item 8 of the patent application scope, the step of generating the overflow value according to the low-bit value includes: Accumulating the low-bit value to generate an accumulated low-bit value; and Performing a second N-bit right shift operation on the accumulated low-bit value to generate the overflow value. 如申請專利範圍第8項所述之方法,其中根據該初始輸出值與該溢位值來決定該最終輸出值的步驟包含有: 因應該溢位值為1,增加1至該初始輸出值以產生該最終輸出值。 For the method described in Item 8 of the patent application, the steps of determining the final output value based on the initial output value and the overflow value include: Since the overflow value is 1, 1 is added to the initial output value to generate the final output value. 如申請專利範圍第8項所述之方法,其中根據該初始輸出值與該溢位值來決定該最終輸出值的步驟包含有: 因應該溢位值為0,該最終輸出值等於該初始輸出值。 As described in item 8 of the patent application scope, the step of determining the final output value based on the initial output value and the overflow value includes: In response to the overflow value being 0, the final output value is equal to the initial output value. 一種馬達驅動系統,包含有: 一無刷直流馬達; 一驅動電路,耦接於該無刷直流馬達,並且用以根據複數個脈衝寬度調變訊號來產生一驅動電壓,其中該驅動電壓用以驅動該無刷直流馬達;以及 一處理電路,耦接於該驅動電路,並且用以執行以下操作來將一解析度提高N位元: 對一類比命令進行一轉換,以產生一命令計數值; 對該命令計數值進行一N位元右移操作,以產生一初始輸出值; 對該命令計數值進行一邏輯操作,以產生一低位元值; 根據該低位元值來產生一溢位值; 根據該初始輸出值與該溢位值來決定一最終輸出值;以及 根據該最終輸出值來將該複數個脈衝寬度調變訊號的每一個脈衝寬度調變訊號輸出至該驅動電路; 其中N為一正整數; 其中該解析度與該類比命令分別為一脈衝寬度調變解析度與一脈衝寬度調變命令,並且該脈衝寬度調變命令用以控制該驅動電壓的一電壓值;或該解析度與該類比命令分別為一轉速解析度與一轉速命令,並且該轉速命令用以控制該無刷直流馬達的轉速。 A motor drive system including: a brushless DC motor; A driving circuit coupled to the brushless DC motor and used to generate a driving voltage according to a plurality of pulse width modulation signals, wherein the driving voltage is used to drive the brushless DC motor; and A processing circuit is coupled to the driving circuit and used to perform the following operations to increase a resolution by N bits: perform a conversion on an analog command to generate a command count value; Perform an N-bit right shift operation on the command count value to generate an initial output value; Perform a logical operation on the command count value to generate a low-bit value; Generate an overflow value based on the low-bit value; Determine a final output value based on the initial output value and the overflow value; and Output each pulse width modulation signal of the plurality of pulse width modulation signals to the driving circuit according to the final output value; Where N is a positive integer; wherein the resolution and the analog command are respectively a pulse width modulation resolution and a pulse width modulation command, and the pulse width modulation command is used to control a voltage value of the driving voltage; or the resolution and the analog The commands are respectively a rotational speed resolution and a rotational speed command, and the rotational speed command is used to control the rotational speed of the brushless DC motor.
TW111130699A 2022-08-16 2022-08-16 Method for increasing resolution by n bits performed by processing circuit of motor driving system and motor driving system TWI832376B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW111130699A TWI832376B (en) 2022-08-16 2022-08-16 Method for increasing resolution by n bits performed by processing circuit of motor driving system and motor driving system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111130699A TWI832376B (en) 2022-08-16 2022-08-16 Method for increasing resolution by n bits performed by processing circuit of motor driving system and motor driving system

Publications (2)

Publication Number Publication Date
TWI832376B TWI832376B (en) 2024-02-11
TW202410626A true TW202410626A (en) 2024-03-01

Family

ID=90824674

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111130699A TWI832376B (en) 2022-08-16 2022-08-16 Method for increasing resolution by n bits performed by processing circuit of motor driving system and motor driving system

Country Status (1)

Country Link
TW (1) TWI832376B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3700305B2 (en) * 1996-04-19 2005-09-28 松下電器産業株式会社 Brushless motor driving device and motor rotor position detecting device
US7376182B2 (en) * 2004-08-23 2008-05-20 Microchip Technology Incorporated Digital processor with pulse width modulation module having dynamically adjustable phase offset capability, high speed operation and simultaneous update of multiple pulse width modulation duty cycle registers
JP2015023746A (en) * 2013-07-23 2015-02-02 ルネサスエレクトロニクス株式会社 Motor driving control device and operation method therefor
US10439525B2 (en) * 2017-06-05 2019-10-08 Canon Kabushiki Kaisha Motor drive device and method for driving motor

Similar Documents

Publication Publication Date Title
JP4294602B2 (en) Rotor magnetic pole position detecting device for multiphase motor, motor driving device including the same, and motor driving method
JP4345015B2 (en) Inverter control system
JP4723883B2 (en) Motor control device
JP6603959B2 (en) Multiphase brushless DC motor and driving method thereof
CN101485077A (en) Electric motor, method for correcting sensor output for the same, and control circuit
JP5790390B2 (en) AC motor control device and control method
Mukherjee et al. Development of microcontroller based speed control scheme of BLDC motor using proteus VSM software
US9030146B2 (en) Driving apparatus and motor
US10505478B2 (en) Motor module, motor step operation control system, and motor control device
TWI832376B (en) Method for increasing resolution by n bits performed by processing circuit of motor driving system and motor driving system
TW202410626A (en) Method for increasing resolution by n bits performed by processing circuit of motor driving system and motor driving system
US7402969B2 (en) Method for producing voltage waveforms in a PWM motor controller of a PM DC brushless motor
JP4896681B2 (en) Motor control device and fan motor
US11770080B1 (en) Method for increasing resolution by N bits performed by processing circuit of motor driving system and associated motor driving system
CN117914186A (en) Method for improving resolution by processing circuit and motor driving system
JP5428796B2 (en) Motor drive control device
JP2001045789A (en) Motor-control device
JP2000324879A (en) Motor controller
JP2005328644A (en) Motor driver, motor controller and motor drive method
JP4779233B2 (en) Brushless motor drive control device
JP3309828B2 (en) Motor drive control device
Babu et al. FPGA based speed controller for 8/6 switched reluctance motor using hysteresis controller
JP5262521B2 (en) Inverter control device
JP7352967B2 (en) drive device
JP7244203B2 (en) Motor control circuits, motor drive systems, electronic devices