Single-phase motor drive signal generation method and system
By using the sinusoidal lookup table and digital triangle wave code values in the single-phase motor driving system to generate a driving signal close to the sinusoidal signal, the complexity and noise problems of single-phase motor driving with a back electromotive force waveform is solved, and high-precision driving signal generation is achieved.
Patent Information
- Application Number
- CN202411802506.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-04
AI Technical Summary
Single-phase motor drives with a back electromotive force waveform are complex, resulting in noise problems.
By introducing Hall components, amplifiers, hysteresis comparators and H-bridge driving circuits into the single-phase motor drive system, a drive signal close to the sinusoidal signal is generated to synchronize with the back electromotive force waveform using the sinusoidal lookup table and the digital triangular wave code value.
It effectively avoids noise caused by current fluctuations and torque fluctuations, simplifies the design of single-phase motor driving system, and improves the accuracy of the driving signal.
Smart Images

Figure CN119766005A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of single-phase motor driving, and more specifically to a method and system for generating a single-phase motor driving signal. Background Art
[0002] There are two common waveforms for brushless motor drives, square wave drive and sine wave drive. Different motors have different magnetic field shapes, and the back-EMF waveform is the same as the magnetic field shape, so the required drive methods are also different. Because the main noise when the motor is running comes from the torque pulsation of the rotor, the torque pulsation of the motor will periodically compress and stretch the rotor, generating mechanical vibration noise. The main factor that generates torque pulsation is that the drive signal is inconsistent with its back-EMF waveform, resulting in current fluctuations, which in turn causes torque fluctuations. To achieve low-noise drive, it is necessary to ensure that the torque fluctuation of the motor is smaller. By matching the drive signal of the motor with the back-EMF waveform of the motor, the torque fluctuation of the motor can be reduced, and low-noise drive can be achieved.
[0003] Common single-phase brushless motors mainly use Hall elements to detect rotor position. Hall elements include switch Hall and linear Hall. Switch Hall can only determine the N-pole magnetic field and the S-pole magnetic field, but cannot determine the magnetic field distribution between the poles; linear Hall can detect the direction and size of the magnetic field. When the permanent magnet rotor of the motor is magnetized in radial direction, because its corresponding back electromotive force waveform is a square wave, switch Hall is generally used to detect the zero-crossing position of the magnetic field, and the drive is directly driven by a square wave, which can generate a larger torque. However, due to factors such as delay, the drive waveform and the back electromotive force waveform cannot be completely synchronized during commutation, so a large current spike will be generated during commutation, which will cause the torque of the motor to fluctuate, and the torque fluctuation will generate noise. When the permanent magnet rotor of the motor is magnetized in parallel, its corresponding back electromotive force waveform is a sine wave. Therefore, using switch Hall and simple square wave drive will make the drive waveform inconsistent with the back electromotive force waveform, resulting in current fluctuation and torque fluctuation, which will cause greater noise. Therefore, linear Hall is often used to detect the position and shape of the magnetic field for parallel magnetized permanent magnet rotors. Although the linear Hall can determine the shape of the magnetic field, the output voltage range of the linear Hall is uncertain due to the different magnetic field ranges of different models. After amplification by the Hall amplifier, clipping may occur due to the limited output swing of the op amp. Therefore, the drive of a single-phase motor with a sinusoidal back EMF waveform is often more complicated. Summary of the invention
[0004] The object of the present invention is to provide a single-phase motor drive signal generation method and system to solve the complex technical problems of driving a single-phase motor with a sinusoidal back electromotive force waveform.
[0005] Based on the above purpose, the present invention provides a single-phase motor drive signal generation method on one hand, which is applied to a single-phase motor drive system, wherein the single-phase motor drive system includes a Hall element, an amplifier, a hysteresis comparator, a single-phase motor drive signal generation system and an H-bridge drive circuit, wherein the two ends of the Hall element are respectively connected to the positive input end and the negative input end of the amplifier, the output end of the amplifier is connected to one of the positive input end and the negative input end of the hysteresis comparator, the other of the positive input end and the negative input end of the hysteresis comparator is connected to a reference voltage, the output end of the hysteresis comparator is connected to the single-phase motor drive signal generation system, and the single-phase motor drive signal generation system is connected to the H-bridge drive circuit; the method is applied to the single-phase motor drive signal generation system, and includes:
[0006] In the last Hall cycle, predicting the time length of the current Hall cycle in advance according to the output signal of the hysteresis comparator;
[0007] In the last Hall cycle, the time length of each step of the current Hall cycle is determined in advance according to the time length of the current Hall cycle and the preset total number of steps;
[0008] At each moment of the current Hall cycle, a sine wave code value at that moment of the current Hall cycle is generated according to the output signal of the hysteresis comparator, the time length of each step of the current Hall cycle and a preset sine lookup table;
[0009] At each moment of the current Hall cycle, the driving signal at that moment is determined according to the sine wave code value at that moment.
[0010] Furthermore, the time length of each step of the current Hall cycle is equal to the time length of the current Hall cycle divided by four times the preset total number of steps.
[0011] Furthermore, the sine wave code value and the preset total number of steps satisfy the following relationship:
[0012] code=(2 m -1)*sin[(n / step)*π / 2]
[0013] Among them, code is the sine wave code value, n is the step number, step is the preset total number of steps, and m is the number of data bits of the sine wave code value.
[0014] Further, the sine lookup table is a correspondence between the step number and the sine wave code value; at each moment of the current Hall cycle, the sine wave code value at that moment of the current Hall cycle is generated according to the output signal of the hysteresis comparator, the time length of each step of the current Hall cycle and the preset sine lookup table, specifically including:
[0015] At each moment of the current Hall cycle, whether commutation occurs is determined based on the output signal of the hysteresis comparator;
[0016] If yes, take the moment as the initial moment, update the step number of the initial moment to 0, and look up the sine wave code value corresponding to the step number in the sine lookup table according to the updated step number as the sine wave code value of the initial moment;
[0017] At the first moment after 0.5 times the time length of each step has passed since the initial moment, the step number is updated to 1, and the corresponding sine wave code value is searched in the sine lookup table according to the updated step number as the sine wave code value at the first moment;
[0018] Starting from the first moment, after each time length of each step has passed, the step number is incremented by 1, and the corresponding sine wave code value is searched in the sine lookup table according to the updated step number, as the sine wave code value at the corresponding moment; until the step number becomes the preset total number of steps;
[0019] After the step number is updated to the preset total number of steps, the step number is reduced by 1 after each step time, and the corresponding sine wave code value is searched in the sine lookup table according to the updated step number as the sine wave code value at the corresponding moment; until the step number is reduced to 0 or a reversal occurs;
[0020] At each moment after the step number is reduced to 0, if no commutation occurs, the step number and the sine wave code value at that moment are kept at 0 until commutation occurs.
[0021] Furthermore, at each moment of the current Hall cycle, the driving signal at that moment is determined according to the sine wave code value at that moment, specifically including:
[0022] At each moment of the current Hall cycle, the sine wave code value at that moment is compared with the digital triangle wave code value of the digital triangle wave at that moment; if the sine wave code value at that moment is greater than the digital triangle wave code value at that moment, the drive signal at that moment is low level; if the sine wave code value at that moment is less than the digital triangle wave code value at that moment, the drive signal at that moment is high level; wherein the digital triangle wave is obtained by continuously counting the digital register in a cycle, and the counting range of the digital register is 0 to 2 m -1, and the count value increases by 1 every unit time, where m is the number of data bits of the sine wave code value.
[0023] On the other hand, the present invention provides a single-phase motor drive signal generation system, which is applied to the single-phase motor drive system. The single-phase motor drive system includes a Hall element, an amplifier, a hysteresis comparator and an H-bridge drive circuit. The two ends of the Hall element are respectively connected to the positive input end and the negative input end of the amplifier, the output end of the amplifier is connected to one of the positive input end and the negative input end of the hysteresis comparator, the other of the positive input end and the negative input end of the hysteresis comparator is connected to a reference voltage, the output end of the hysteresis comparator is connected to the single-phase motor drive signal generation system, and the single-phase motor drive signal generation system is connected to the H-bridge drive circuit; the single-phase motor drive signal generation system includes:
[0024] A prediction module, used to predict the time length of the current Hall cycle in advance according to the output signal of the hysteresis comparator during the previous Hall cycle;
[0025] A first determination module is used to determine the time length of each step of the current Hall cycle in advance according to the time length of the current Hall cycle and a preset total number of steps during the previous Hall cycle;
[0026] A generating module, used for generating, at each moment of the current Hall cycle, a sine wave code value at that moment of the current Hall cycle according to the output signal of the hysteresis comparator, the time length of each step of the current Hall cycle and a preset sine lookup table;
[0027] The second determination module is used to determine the driving signal at each moment of the current Hall cycle according to the sine wave code value at that moment.
[0028] Furthermore, the time length of each step of the current Hall cycle is equal to the time length of the current Hall cycle divided by four times the preset total number of steps.
[0029] Furthermore, the sine wave code value and the preset total number of steps satisfy the following relationship:
[0030] code=(2 m -1)*sin[(n / step)*π / 2]
[0031] Among them, code is the sine wave code value, n is the step number, step is the preset total number of steps, and m is the number of data bits of the sine wave code value.
[0032] Furthermore, the sine lookup table is a correspondence between the step number and the sine wave code value, and the generation module specifically includes:
[0033] A judging unit, used for judging whether commutation occurs according to an output signal of the hysteresis comparator at each moment of the current Hall cycle;
[0034] A first updating unit is used for, when the judgment result of the judging unit is yes, taking the moment as the initial moment, updating the step number of the initial moment to 0, and searching the sine wave code value corresponding to the step number in the sine lookup table according to the updated step number, as the sine wave code value of the initial moment;
[0035] A second updating unit is used to update the step number to 1 at a first moment after 0.5 times the time length of each step has passed since the initial moment, and search the corresponding sine wave code value in the sine lookup table according to the updated step number as the sine wave code value at the first moment;
[0036] A third updating unit is used to increase the step number by 1 after each time length of each step from the first moment, and search the corresponding sine wave code value in the sine lookup table according to the updated step number as the sine wave code value at the corresponding moment; until the step number becomes the preset total number of steps;
[0037] a fourth updating unit, configured to, after the step number is updated to the preset total number of steps, reduce the step number by 1 after each step time, and search the corresponding sine wave code value in the sine lookup table according to the updated step number as the sine wave code value at the corresponding moment; until the step number is reduced to 0 or a reversal occurs;
[0038] The holding unit is used to keep the step number and the sine wave code value at each moment after the step number is reduced to 0, if no commutation occurs, at that moment as 0 until commutation occurs.
[0039] Furthermore, the second determining module is specifically configured to:
[0040] At each moment of the current Hall cycle, the sine wave code value at that moment is compared with the digital triangle wave code value of the digital triangle wave at that moment; if the sine wave code value at that moment is greater than the digital triangle wave code value at that moment, the drive signal at that moment is high level; if the sine wave code value at that moment is less than the digital triangle wave code value at that moment, the drive signal at that moment is low level; wherein the digital triangle wave is obtained by continuously counting the digital register in a cycle, and the counting range of the digital register is 0 to 2 m -1, and the count value increases by 1 every unit time, where m is the number of data bits of the sine wave code value.
[0041] The single-phase motor drive signal generation method and system of the present invention divides the sine wave into preset total step number segments, and determines the sine wave code value of each segment through a sine wave lookup table, and generates a corresponding drive signal according to the sine wave code value, so that the drive signal is close to a sinusoidal signal and synchronized with the back electromotive force waveform, thereby avoiding noise caused by current fluctuations and torque fluctuations, and solving the complex problem of driving a single-phase motor with a sinusoidal back electromotive force waveform. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of the structure of a single-phase motor drive system according to an embodiment of the present invention;
[0043] Figure 2 is a flow chart of a method for generating a single-phase motor drive signal according to an embodiment of the present invention;
[0044] Figure 3 A schematic diagram showing the variation of a sine wave code value within a quarter of a Hall cycle generated by a method for generating a single-phase motor drive signal according to an embodiment of the present invention over time;
[0045] Figure 4 4 is a structural block diagram of a single-phase motor drive signal generating system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The preferred embodiments of the present invention are given below in conjunction with the accompanying drawings and described in detail.
[0047] like Figure 1As shown, the single-phase motor driving system of the embodiment of the present invention includes a Hall element 100, an amplifier 200, a hysteresis comparator 300, a single-phase motor driving signal generating system 400 and an H-bridge driving circuit 500. The two ends of the Hall element 100 are respectively connected to the positive input end and the negative input end of the amplifier 200, the output end of the amplifier 200 is connected to the negative input end of the hysteresis comparator 300, the positive input end of the hysteresis comparator 300 is connected to the reference voltage Vref, the output end of the hysteresis comparator 300 is connected to the single-phase motor driving signal generating system 400, and the single-phase motor driving signal generating system 400 is connected to the H-bridge driving circuit 500; the Hall element 100 utilizes the Hall effect The induced magnetic field signal is converted into a voltage signal; the amplifier 200 amplifies the voltage signal and outputs the amplified voltage signal; the hysteresis comparator 300 is used to output high and low levels according to the comparison result between the amplified voltage signal and the reference voltage Vref, for example, when the amplified voltage signal is greater than the reference voltage Vref, a low level is output, and when the amplified voltage signal is less than the reference voltage Vref, a high level is output; the single-phase motor drive signal generation system 400 is used to generate a drive signal according to the high and low level signals of the hysteresis comparator 300, and the drive signal is close to a sine signal, and the drive signal is input into the H-bridge drive circuit 500 to control the operation of the single-phase motor. Since the drive signal is close to a sine signal, the Hall element 100 can use a switch Hall, and its drive signal can be synchronized with the back electromotive force waveform, thereby avoiding noise caused by current fluctuations and torque fluctuations; the use of a switch Hall can also avoid the problem of limited magnetic field size and magnetic field clipping caused by the use of a linear Hall.
[0048] Optionally, the output end of the amplifier 200 can also be connected to the positive input end of the hysteresis comparator 300, and the negative input end of the hysteresis comparator 300 is connected to the reference voltage Vref. In this case, when the amplified voltage signal is greater than the reference voltage Vref, a high level will be output, and when the amplified voltage signal is less than the reference voltage Vref, a low level will be output.
[0049] like Figure 2 As shown, an embodiment of the present invention provides a single-phase motor drive signal generation method, which is applied to a single-phase motor drive signal generation system and includes the following steps S610-S640:
[0050] S610: In the last Hall cycle, predict the duration of the current Hall cycle in advance according to the output signal of the hysteresis comparator 300 .
[0051] The output signal of the hysteresis comparator 300 is a high level or low level signal. The system includes a clock counter for timing and a rising edge counter for recording the rising edge of the output signal. After each preset time, the clock counter will increase by one. When a rising edge comes, the rising edge counter will increase by 1. In each Hall cycle, there will be two rising edges, so the rising edge counter can be set to be cleared when the count becomes 2. When the rising edge is detected next time, the count value of the rising edge counter becomes 1 again, that is, the count of the rising edge counter is 1, 2, 1, 2..., and so on. The time length between the two rising edges is the time length of the previous Hall cycle. Therefore, when the count of the rising edge counter is 1, the time recorded by the clock counter can be recorded, and then when the count of the rising edge counter is 2, the time recorded by the clock counter is recorded again. The difference between these two times is the time length of the previous Hall cycle. The time length of the current Hall cycle can be considered to be the same as the time length of the previous Hall cycle. Therefore, after the time length of the previous Hall cycle is determined, it can be used as the time length of the current Hall cycle.
[0052] S620: In the last Hall cycle, the time length of each step of the current Hall cycle is determined in advance according to the time length of the current Hall cycle and the preset total number of steps.
[0053] The preset total number of steps refers to the number of steps within a quarter of the Hall cycle. The specific size can be set as needed. The larger the number of steps, the closer the final drive signal is to a sinusoidal signal and the higher the accuracy. The time length of each step of the current Hall cycle is equal to the time length of the current Hall cycle divided by four times the preset total number of steps. For example, the preset total number of steps can be 16, then the time length of each step of the current Hall cycle = the time length of the current Hall cycle / 64.
[0054] It should be understood that step S610 and step S620 will be executed in each Hall cycle, but their results will not be used until the next Hall cycle, that is, the result obtained after executing steps S610 and S620 in the current Hall cycle is the time length of each step of the next Hall cycle, and the time length of each step of the current Hall cycle is obtained through steps S610 and S620 in the previous Hall cycle.
[0055] S630: At each moment of the current Hall cycle, a sine wave code value at that moment of the current Hall cycle is generated according to the output signal of the hysteresis comparator 300, the time length of each step of the current Hall cycle and a preset sine wave lookup table.
[0056] When the preset total number of steps is determined, the corresponding sine lookup table can be determined. The sine lookup table is the correspondence between the step number n and the sine wave code value code, where the value range of n is a natural number between 0 and the preset total number of steps, that is, n = 0, 1, 2.. step, where step is the preset total number of steps. The relationship between the sine wave code value code, the step number n and the preset total number of steps step is as follows:
[0057] code=(2 m -1)*sin[(n / step)*π / 2]
[0058] Wherein, m is the number of data bits of the sine wave code value, and code can be a rounded integer value.
[0059] For example, when 8-bit data is used to represent the sine wave code value, the number of data bits is 8 and step=16, the sine lookup table is as follows:
[0060] n=0, code=8′d0;
[0061] n=1, code=8′d25;
[0062] n=2, code=8′d50;
[0063] n=3, code=8′d74;
[0064] n=4, code=8′d98;
[0065] n=5, code=8′d120;
[0066] n=6, code=8′d142;
[0067] n=7, code=8′d162;
[0068] n=8, code=8′d180;
[0069] n=9, code=8′d197;
[0070] n=10, code=8′d212;
[0071] n=11, code=8′d225;
[0072] n=12, code=8′d236;
[0073] n=13, code=8′d244;
[0074] n=14, code=8′d250;
[0075] n=15, code=8′d254;
[0076] n=16, code=8′d256.
[0077] Wherein, code=8′d0 represents an 8-bit decimal number, that is, the value after d represents the decimal value of code, but it is stored in 8-bit binary.
[0078] In some embodiments, step S630 specifically includes the following steps:
[0079] S631: At each moment of the current Hall cycle, determine whether commutation occurs according to the output signal of the hysteresis comparator 300.
[0080] When the output signal of the hysteresis comparator 300 changes, for example, from a high level to a low level or from a low level to a high level, it indicates that commutation occurs; when the output signal of the hysteresis comparator 300 does not change, it indicates that commutation does not occur. Theoretically, there are two commutations in one Hall cycle, the first of which is the starting point of the Hall cycle, that is, when switching from the previous Hall cycle to the current Hall cycle, commutation occurs, and the second is the middle moment of the Hall cycle.
[0081] S632: If yes, take the moment as the initial moment, update the step number of the initial moment to 0, and search the sine wave code value corresponding to the step number in the sine lookup table according to the updated step number as the sine wave code value of the initial moment.
[0082] After the commutation occurs, the step number at the initial moment needs to be reset to 0, and accordingly, the sine wave code value also needs to change with the step number, that is, it becomes code=8′d0.
[0083] S633: At the first moment after 0.5 times the length of each step time has passed from the initial moment, the step number is updated to 1, and the corresponding sine wave code value is searched in the sine lookup table according to the updated step number as the sine wave code value of the first moment.
[0084] Timing is performed through the internal clock counter. After 0.5 times the length of each step, the first moment is reached. The sine wave code value at the first moment will become code=8′d25 corresponding to n=1. At the moments between the initial moment and the first moment, the sine wave code value remains unchanged, which is code=8′d0.
[0085] S634: Starting from the first moment, after each step time length has passed, the step number is increased by 1, and the corresponding sine wave code value is searched in the sine lookup table according to the updated step number, as the sine wave code value at the corresponding moment; until the step number becomes the preset total number of steps.
[0086] After the first moment, every time the length of each step is passed, the step number will be incremented by 1, and the sine wave code value of the corresponding moment will also become the sine wave code value corresponding to the new step number. For example, after a time of one step is passed from the first moment, the second moment is reached, and n=2, code=8'd50 at the second moment, and then after another time of one step is passed, the third moment is reached, and n=3, code=8'd74 at the third moment, and so on, until the sixteenth moment is reached, and n=16, code=8'd256 at the sixteenth moment.
[0087] like Figure 3 The figure shows the change of the sine wave code value over time within a quarter of the Hall cycle. It can be seen from the figure that its waveform is very close to the sine wave.
[0088] S635: After the step number is updated to the preset total number of steps, the step number is reduced by 1 after each step time, and the corresponding sine wave code value is searched in the sine lookup table according to the updated step number as the sine wave code value at the corresponding moment; until the step number is reduced to 0 or a reversal occurs.
[0089] After the step number is updated to the preset total number of steps, it means that the generation of the sinusoidal wave code value of one quarter of the Hall cycle has been completed, and then the step number is reduced by 1 after each step time, and accordingly, the sinusoidal wave code value at the corresponding moment is updated to the sinusoidal wave code value corresponding to the step number; in this way, if no commutation occurs within the preset total number of step time lengths, the step number will be reduced to 0, and the sinusoidal wave code value at the corresponding moment will also become 0; if commutation occurs before the step number becomes 0, then at the moment of commutation, the step number will directly become 0, and the step number and sinusoidal wave code value will continue to be updated from the initial moment.
[0090] S636: At each moment after the step number is reduced to 0, if no commutation occurs, the step number and the sine wave code value at that moment are kept at 0 until commutation occurs.
[0091] After the step number is reduced to 0, if there is no commutation, the step number and the sine wave code value will remain unchanged until commutation occurs. After commutation occurs, the step number and the sine wave code value will be updated from the initial moment.
[0092] S640: At each moment of the current Hall cycle, the driving signal at that moment is determined according to the sine wave code value at that moment.
[0093] In some embodiments, step S640 specifically includes:
[0094] At each moment of the current Hall cycle, the sine wave code value at that moment is compared with the digital triangle wave code value of the digital triangle wave at that moment; if the sine wave code value at that moment is greater than the digital triangle wave code value at that moment, the drive signal at that moment is low level; if the sine wave code value at that moment is less than the digital triangle wave code value at that moment, the drive signal at that moment is high level.
[0095] After the method of the present invention starts running, a digital register can be used to continuously count in a loop, with the counting range from 0 to 2. m -1, that is, starting from 0, the count value increases by 1 every unit of time until it reaches 2 m -1, and then every unit time, the count value decreases by 1 until it decreases to 0, and then repeats the cycle. As long as the method is running, the digital register keeps counting in a cycle; the curve of the count value of the digital register changing with time is similar to a triangular wave, so it is called a digital triangular wave, and the digital triangular wave code value is the count value of the digital register.
[0096] The driving signal at each moment forms a pulse modulation signal for driving the single-phase motor to operate. Since the curve of the sine wave code value changing with time is close to the sine wave, the curve of the driving signal determined by the sine wave code value changing with time is also close to the sine wave. The driving signal is input into the H-bridge driving circuit 500 to drive the operation of the single-phase motor.
[0097] The single-phase motor drive signal generation method of the embodiment of the present invention divides the sine wave into preset total step number segments, and determines the sine wave code value of each segment through a sine lookup table, and generates a corresponding drive signal according to the sine wave code value, so that the drive signal is close to a sine signal and synchronized with the back electromotive force waveform, thereby avoiding noise caused by current fluctuations and torque fluctuations, and solving the complex problem of driving a single-phase motor with a sine back electromotive force waveform. The method of the present invention is very simple and has high precision, and the precision of the sine wave can be adjusted by changing the value of the preset total number of steps.
[0098] like Figure 4 As shown, the single-phase motor drive signal generating system 400 according to the embodiment of the present invention includes a prediction module 410 , a first determination module 420 , a generation module 430 and a second determination module 440 .
[0099] The prediction module 410 is used to predict the duration of the current Hall cycle in advance according to the output signal of the hysteresis comparator 300 during the previous Hall cycle.
[0100] The first determination module 420 is used to determine the time length of each step of the current Hall cycle in advance according to the time length of the current Hall cycle and a preset total number of steps during the previous Hall cycle.
[0101] The generating module 430 is used to generate the sine wave code value of the current Hall cycle at each moment according to the output signal of the hysteresis comparator 300, the time length of each step of the current Hall cycle and the preset sine wave lookup table.
[0102] Specifically, the generating module 430 may include:
[0103] A judging unit, used to judge whether commutation occurs according to the output signal of the hysteresis comparator 300 at each moment of the current Hall cycle;
[0104] A first updating unit is used for, when the judgment result of the judging unit is yes, taking the moment as the initial moment, updating the step number of the initial moment to 0, and searching the sine wave code value corresponding to the step number in the sine lookup table according to the updated step number, as the sine wave code value of the initial moment;
[0105] A second updating unit is used to update the step number to 1 at a first moment after 0.5 times the time length of each step has passed from the initial moment, and to search the corresponding sine wave code value in the sine lookup table according to the updated step number as the sine wave code value at the first moment;
[0106] A third updating unit is used to increase the step number by 1 after each time length of each step from the first moment, and to search the corresponding sine wave code value in the sine lookup table according to the updated step number as the sine wave code value at the corresponding moment; until the step number becomes the preset total number of steps;
[0107] A fourth updating unit is used for, after the step number is updated to the preset total number of steps, reducing the step number by 1 after each step time, and searching the corresponding sine wave code value in the sine lookup table according to the updated step number as the sine wave code value at the corresponding moment; until the step number is reduced to 0 or a reversal occurs;
[0108] The holding unit is used to keep the step number and the sine wave code value at each moment after the step number is reduced to 0, if no commutation occurs, at that moment as 0 until commutation occurs.
[0109] The second determination module 440 is used to determine the driving signal at each moment of the current Hall cycle according to the sine wave code value at that moment.
[0110] The second determination module 440 is specifically used to: at each moment of the current Hall cycle, compare the sinusoidal wave code value at that moment with the digital triangle wave code value of the digital triangle wave at that moment; if the sinusoidal wave code value at that moment is greater than the digital triangle wave code value at that moment, the drive signal at that moment is a high level; if the sinusoidal wave code value at that moment is less than the digital triangle wave code value at that moment, the drive signal at that moment is a low level.
[0111] The single-phase motor drive signal generating system of the present invention divides the sine wave into preset total step number segments, and determines the sine wave code value of each segment through a sine wave lookup table, and generates a corresponding drive signal according to the sine wave code value, so that the drive signal is close to a sinusoidal signal and synchronized with the back electromotive force waveform, thereby avoiding noise caused by current fluctuations and torque fluctuations, and solving the complex problem of driving a single-phase motor with a sinusoidal back electromotive force waveform.
[0112] The above is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. The above embodiment of the present invention can also be modified in various ways. That is, all simple, equivalent changes and modifications made according to the claims and the description of the present invention fall within the scope of protection of the claims of the present invention. The contents not described in detail in the present invention are all conventional technical contents.
Claims
1. A method for generating a single-phase motor drive signal, characterized in that: Applied to a single-phase motor drive system, the single-phase motor drive system comprises a Hall element, an amplifier, a hysteresis comparator, a single-phase motor drive signal generation system and an H-bridge drive circuit, the two ends of the Hall element are respectively connected to the positive input end and the negative input end of the amplifier, the output end of the amplifier is connected to one of the positive input end and the negative input end of the hysteresis comparator, the other of the positive input end and the negative input end of the hysteresis comparator is connected to a reference voltage, the output end of the hysteresis comparator is connected to the single-phase motor drive signal generation system, and the single-phase motor drive signal generation system is connected to the H-bridge drive circuit; The method is applied to the single-phase motor drive signal generation system and includes: In the last Hall cycle, predicting the time length of the current Hall cycle in advance according to the output signal of the hysteresis comparator; In the last Hall cycle, the time length of each step of the current Hall cycle is determined in advance according to the time length of the current Hall cycle and the preset total number of steps; At each moment of the current Hall cycle, a sine wave code value at that moment of the current Hall cycle is generated according to the output signal of the hysteresis comparator, the time length of each step of the current Hall cycle and a preset sine lookup table; At each moment of the current Hall cycle, the driving signal at that moment is determined according to the sine wave code value at that moment.
2. The method for generating a single-phase motor drive signal according to claim 1, characterized in that: The time length of each step of the current Hall cycle is equal to the time length of the current Hall cycle divided by four times the preset total number of steps.
3. The method for generating a single-phase motor drive signal according to claim 1, characterized in that: The sine wave code value and the preset total number of steps satisfy the following relationship: code=(2 m -1)*sin[(n / step)*π / 2] Among them, code is the sine wave code value, n is the step number, step is the preset total number of steps, and m is the number of data bits of the sine wave code value.
4. The method for generating a single-phase motor drive signal according to claim 1, characterized in that: The sine lookup table is the correspondence between the step number and the sine wave code value; at each moment of the current Hall cycle, the sine wave code value at that moment of the current Hall cycle is generated according to the output signal of the hysteresis comparator, the time length of each step of the current Hall cycle and the preset sine lookup table, specifically including: At each moment of the current Hall cycle, whether commutation occurs is determined based on the output signal of the hysteresis comparator; If yes, take the moment as the initial moment, update the step number of the initial moment to 0, and look up the sine wave code value corresponding to the step number in the sine lookup table according to the updated step number as the sine wave code value of the initial moment; At the first moment after 0.5 times the time length of each step has passed since the initial moment, the step number is updated to 1, and the corresponding sine wave code value is searched in the sine lookup table according to the updated step number as the sine wave code value at the first moment; Starting from the first moment, after each time length of each step has passed, the step number is incremented by 1, and the corresponding sine wave code value is searched in the sine lookup table according to the updated step number, as the sine wave code value at the corresponding moment; until the step number becomes the preset total number of steps; After the step number is updated to the preset total number of steps, the step number is reduced by 1 after each step time, and the corresponding sine wave code value is searched in the sine lookup table according to the updated step number as the sine wave code value at the corresponding moment; until the step number is reduced to 0 or a reversal occurs; At each moment after the step number is reduced to 0, if no commutation occurs, the step number and the sine wave code value at that moment are kept at 0 until commutation occurs.
5. The method for generating a single-phase motor drive signal according to claim 1, characterized in that: At each moment of the current Hall cycle, the driving signal at that moment is determined according to the sine wave code value at that moment, specifically including: At each moment of the current Hall cycle, the sine wave code value at that moment is compared with the digital triangle wave code value of the digital triangle wave at that moment; if the sine wave code value at that moment is greater than the digital triangle wave code value at that moment, the drive signal at that moment is low level; if the sine wave code value at that moment is less than the digital triangle wave code value at that moment, the drive signal at that moment is high level; wherein the digital triangle wave is obtained by continuously counting the digital register in a cycle, and the counting range of the digital register is 0 to 2 m -1, and the count value increases by 1 every unit time, where m is the number of data bits of the sine wave code value.
6. A single-phase motor drive signal generation system, characterized in that: Applied to a single-phase motor drive system, the single-phase motor drive system comprises a Hall element, an amplifier, a hysteresis comparator and an H-bridge drive circuit, the two ends of the Hall element are respectively connected to the positive input end and the negative input end of the amplifier, the output end of the amplifier is connected to one of the positive input end and the negative input end of the hysteresis comparator, the other of the positive input end and the negative input end of the hysteresis comparator is connected to a reference voltage, the output end of the hysteresis comparator is connected to the single-phase motor drive signal generation system, and the single-phase motor drive signal generation system is connected to the H-bridge drive circuit; The single-phase motor drive signal generating system comprises: A prediction module, used to predict the time length of the current Hall cycle in advance according to the output signal of the hysteresis comparator during the previous Hall cycle; A first determination module is used to determine the time length of each step of the current Hall cycle in advance according to the time length of the current Hall cycle and a preset total number of steps during the previous Hall cycle; A generating module, used for generating, at each moment of the current Hall cycle, a sine wave code value at that moment of the current Hall cycle according to the output signal of the hysteresis comparator, the time length of each step of the current Hall cycle and a preset sine lookup table; The second determination module is used to determine the driving signal at each moment of the current Hall cycle according to the sine wave code value at that moment.
7. The single-phase motor drive signal generating system according to claim 6, characterized in that: The time length of each step of the current Hall cycle is equal to the time length of the current Hall cycle divided by four times the preset total number of steps.
8. The single-phase motor drive signal generating system according to claim 6, characterized in that: The sine wave code value and the preset total number of steps satisfy the following relationship: code=(2 m -1)*sin[(n / step)*π / 2] Among them, code is the sine wave code value, n is the step number, step is the preset total number of steps, and m is the number of data bits of the sine wave code value.
9. The single-phase motor drive signal generating system according to claim 6, characterized in that: The sine lookup table is a correspondence between the step number and the sine wave code value, and the generation module specifically includes: A judging unit, used for judging whether commutation occurs according to an output signal of the hysteresis comparator at each moment of the current Hall cycle; A first updating unit is used for, when the judgment result of the judging unit is yes, taking the moment as the initial moment, updating the step number of the initial moment to 0, and searching the sine wave code value corresponding to the step number in the sine lookup table according to the updated step number, as the sine wave code value of the initial moment; A second updating unit is used to update the step number to 1 at a first moment after 0.5 times the time length of each step has passed since the initial moment, and search the corresponding sine wave code value in the sine lookup table according to the updated step number as the sine wave code value at the first moment; A third updating unit is used to increase the step number by 1 after each time length of each step from the first moment, and search the corresponding sine wave code value in the sine lookup table according to the updated step number as the sine wave code value at the corresponding moment; until the step number becomes the preset total number of steps; a fourth updating unit, configured to, after the step number is updated to the preset total number of steps, reduce the step number by 1 after each step time, and search the corresponding sine wave code value in the sine lookup table according to the updated step number as the sine wave code value at the corresponding moment; until the step number is reduced to 0 or a reversal occurs; The holding unit is used to keep the step number and the sine wave code value at each moment after the step number is reduced to 0, if no commutation occurs, at that moment as 0 until commutation occurs.
10. The single-phase motor drive signal generating system according to claim 6, characterized in that: The second determining module is specifically used for: At each moment of the current Hall cycle, the sine wave code value at that moment is compared with the digital triangle wave code value of the digital triangle wave at that moment; if the sine wave code value at that moment is greater than the digital triangle wave code value at that moment, the drive signal at that moment is high level; if the sine wave code value at that moment is less than the digital triangle wave code value at that moment, the drive signal at that moment is low level; wherein the digital triangle wave is obtained by continuously counting the digital register in a cycle, and the counting range of the digital register is 0 to 2 m -1, and the count value increases by 1 every unit time, where m is the number of data bits of the sine wave code value.