AC power tool voltage detection method and AC power tool
By rectifying and linearly fitting the voltage sinusoidal signal of the AC power tool, the problem of inaccurate zero crossing point detection in the prior art is solved, and more accurate phase detection and motor control are achieved, avoiding drive failure and incorrect phase commutation.
Patent Information
- Application Number
- CN202010896849.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-31
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2040-08-31
AI Technical Summary
In the existing AC power tool control circuit, there is a time difference between the detected zero crossing point and the actual zero crossing point, resulting in inaccurate phase detection of the voltage sinusoidal signal, which in turn leads to the control module driving failure and incorrect phase commutation problems.
By rectifying the voltage sinusoidal signal of the AC power tool, collecting periodic waveform signals and performing linear fitting, a linear function of voltage value and time is obtained, and the slope is calculated to determine the phase, ensuring that accurate starting phase and any moment in the period are obtained. Phase.
This method can accurately obtain the starting phase of the voltage sinusoidal signal and the phase at any time during the period, avoid detection offsets, improve the control accuracy of the motor, and avoid driving failure and incorrect phase commutation problems.
Smart Images

Figure CN112117948B_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to the technical field of electric tools, in particular to a voltage detection method and an AC electric tool. [Background technology]
[0002] AC power tools are connected to an AC power supply and powered by an AC power supply. In AC motor control technology, it is usually necessary to obtain the zero-crossing point of the AC voltage sinusoidal signal as the starting point of the periodic voltage sinusoidal signal, and use this starting point as a reference to obtain the phase corresponding to any time in the cycle, and the sine value corresponding to the phase. The control module of the AC power tool uses the phase and the sine value of the phase as important parameters for accurately controlling the brushless motor. However, in existing conventional AC power tool control circuits, due to circuit characteristics, there may be a time difference between the zero-crossing point detected by the control module and the actual zero-crossing point. Using the zero-crossing point with a time difference as the starting phase, the phase of the obtained voltage sinusoidal signal will deviate at any time in the cycle, which will lead to problems such as control module drive failure and incorrect phase switching.
[0003] In view of this, it is indeed necessary to provide an AC power tool voltage detection method and an AC power tool to overcome the defects of the prior art. [Summary of the invention]
[0004] In view of the deficiencies in the prior art, the purpose of the present invention is to provide an AC power tool voltage detection method, which can avoid the problem of inaccurate zero-crossing point detection of the voltage sinusoidal signal, obtain a more precise relative starting phase, and accurately control the operation of the motor.
[0005] The technical solution adopted by the present invention to solve the problems of the prior art is: the AC power tool voltage detection method includes the following steps: rectifying the voltage sinusoidal signal input into the voltage input terminal of the AC power tool to obtain a periodic waveform signal; collecting the voltage value u corresponding to the sampling time t of the periodic waveform signal within a preset sampling time period; performing linear fitting on the collected voltage value u to obtain a linear function of the dependent variable voltage value u relative to the independent variable time, and obtaining the slope k of the linear function, wherein the slope k corresponds to the phase φ of the voltage sinusoidal signal; at the moment when the slope k is equal to the preset value, obtaining the phase φ of the voltage sinusoidal signal corresponding to the moment; taking the phase φ corresponding to the moment as the starting phase φ0, obtaining the phase φ of the voltage sinusoidal signal at any moment within the period T.
[0006] Preferably, the preset value is set to 0, and when the slope k=0, the starting phase φ0=90° corresponding to the voltage sinusoidal signal at that moment is obtained.
[0007] Preferably, after detecting the rising edge of the zero-crossing signal of the voltage sinusoidal signal, a preset delay time Td is used to start collecting the voltage value u corresponding to the sampling time t.
[0008] Preferably, when it is detected that the voltage value u corresponding to the next sampling moment t of the periodic waveform signal is greater than the voltage value u corresponding to the previous sampling moment t, and the voltage value u is greater than a preset voltage threshold Vthr, the voltage value u corresponding to the sampling moment t is started to be collected.
[0009] Preferably, after detecting the rising edge of the zero-crossing signal of the voltage sinusoidal signal, a preset time Td is delayed, and when it is detected that the voltage value u corresponding to the next sampling moment t of the periodic waveform signal is greater than the voltage value u corresponding to the previous sampling moment t, and the voltage value u is greater than a preset voltage threshold Vthr, the voltage value u corresponding to the sampling moment t is started to be collected.
[0010] Preferably, the AC power tool voltage detection method further comprises the following steps: calculating the sine value Sinφ0 corresponding to the starting phase φ0, and the sine value Sinφ corresponding to the phase φ at any time within the period T.
[0011] Preferably, the linear fitting is performed using the least squares method, and the formula for the slope k is:
[0012]
[0013] Where: E(t*u) is the mathematical expectation of the product of the sampling time t and the voltage value u, Et*Eu is the mathematical expectation of the sampling time t and the mathematical expectation of the voltage value u, E(t 2 ) is the mathematical expectation of the square of the sampling time t, (Et) 2 is the square of the mathematical expectation of the sampling time t.
[0014] Preferably, the periodic waveform signal is collected within the preset time period, and the sampling times t0, t1, t2, ..., t i The corresponding voltage values are u0, u1, u2, ..., u i , i is the number of sampling points; sampling time interval Δt i =t i+1 -t i , each of the sampling time intervals Δt i equal.
[0015] Preferably, the linear fitting is performed using the least squares method, and the formula for the slope k is:
[0016] ,
[0017] Wherein n is a positive integer greater than 1.
[0018] As a preference, the positive integer n=2 m , m is a positive integer.
[0019] In order to solve the problems existing in the prior art, the present invention also provides an AC power tool, which includes an AC power supply, a drive module, a motor and a control module that controls the motor through the drive module; the AC power supply includes a rectifier circuit that rectifies the voltage sinusoidal signal input by the AC power supply into a periodic waveform signal; the control module collects the voltage value corresponding to each sampling moment of the periodic waveform signal within a preset sampling time period, and performs linear fitting on the voltage value to obtain the slope of the voltage sinusoidal signal; the slope corresponds to the phase φ of the voltage sinusoidal signal, and when the control module detects that the slope is equal to the preset value stored in the control module, the phase φ corresponding to the slope is used as the starting phase φ0, and the phase φ of the voltage sinusoidal signal at any time within the period is calculated.
[0020] Preferably, the control module calculates the starting phase φ0 and the sine value corresponding to the phase φ at any time within the cycle; the control module controls the motor through the driving module according to the starting phase φ0, the phase φ at any time within the cycle and the sine value.
[0021] Compared with the prior art, the present invention has the following beneficial effects: the slope of the periodic waveform signal is obtained by a linear fitting method. Since the slope corresponds to the phase φ of the voltage sinusoidal signal one by one, when the slope is equal to a preset value, the phase φ corresponding to the slope at that moment is obtained, and the phase φ is used as the starting phase φ0. The phase φ at any moment within the period T can be calculated. This method can accurately obtain the starting phase φ0 and the phase φ at any moment within the period T, avoiding the situation where the phase at any moment within the period is obtained with error when the detected zero crossing point is offset and the zero crossing point is used as the starting phase; the control module of the AC power tool uses the detected starting phase φ0 and the phase φ at any moment within the period as parameters, and can drive the motor to operate more accurately, avoiding problems such as commutation errors and drive failures.
Brief Description of the Drawings
[0022] The specific embodiments of the present invention are further described in detail below with reference to the accompanying drawings:
[0023] Figure 1 It is a curve chart showing the drift when the control module detects the voltage sinusoidal signal passing through zero point;
[0024] Figure 2is a graph of linearization of a periodic waveform signal in a first embodiment of the present invention;
[0025] Figure 3 It is an algorithm flow chart of the first embodiment of the present invention;
[0026] Figure 4 It is a flow chart of an algorithm for saving computational overhead in the first embodiment of the present invention;
[0027] Figure 5 is a circuit diagram of an AC power tool in a first embodiment of the present invention;
[0028] Figure 6 It is an algorithm flow chart of the second embodiment of the present invention. [Specific implementation method]
[0029] The present invention is further described in detail below in conjunction with the accompanying drawings and implementation modes.
[0030] See also Figure 1 Due to the circuit characteristics, there is a time difference between the actual zero-crossing point of the voltage sinusoidal signal and the detected zero-crossing point. If the detected zero-crossing point is used as the starting phase, the phase of the voltage sinusoidal signal at any time within the cycle cannot be accurately obtained.
[0031] The first implementation method:
[0032] like Figure 3 The figure shows an AC power tool voltage detection method involved in the first embodiment of the present invention, comprising the following steps: rectifying the voltage sinusoidal signal input to the voltage input terminal of the AC power tool to obtain a periodic waveform signal; S100 collecting the voltage value u corresponding to the sampling time t of the periodic waveform signal within a preset sampling time period; S200 performing linear fitting on the collected voltage value u to obtain a linear function of the dependent variable voltage value u relative to the independent variable time, Figure 2 A curve diagram showing the linearization of the periodic waveform signal is shown. In this embodiment, the linear fitting method adopts the least squares method. According to the formula Calculate the slope k of the linear function, where E(t*u) is the mathematical expectation of the product of the sampling time t and the voltage value u, Et*Eu is the product of the mathematical expectation of the sampling time t and the mathematical expectation of the voltage value u, and E(t 2 ) is the mathematical expectation of the square of the sampling time t, (Et) 2is the square of the mathematical expectation of the sampling time t, the slope k corresponds to the phase of the periodic waveform signal, the periodic waveform signal is obtained by rectifying the voltage sinusoidal signal, so the slope k also corresponds to the phase φ of the voltage sinusoidal signal; S300 when the slope k is equal to the preset value, the phase φ of the voltage sinusoidal signal at the time is obtained, in this embodiment, the preset value is set to 0, and in other embodiments, the preset value can be any value; S400 when the slope k = 0, it corresponds to the moment when the phase of the periodic waveform signal is 90°, that is, the moment when the phase φ of the voltage sinusoidal signal is 90°, the voltage sinusoidal signal is a periodic signal, and the phase φ = 90° is taken as the starting phase φ0, according to the formula φ = ωt + φ0, the phase φ of the voltage sinusoidal signal at any time within the period T is obtained, ω is the angular velocity of the voltage sinusoidal signal, and the calculation relationship between the angular velocity ω and the period T is This arrangement can avoid the detected zero-crossing point from being offset, which causes the phase φ at any time within the period T to be obtained with an error when the zero-crossing point is used as the starting phase.
[0033] In order to reduce the computational cost, Figure 4 As shown in the present embodiment, the following steps may also be included: S10, before collecting the voltage value u, first detect the rising edge of the zero-crossing signal of the voltage sinusoidal signal, the rising edge of the zero-crossing signal is the moment when the detected voltage sinusoidal signal jumps from a low level to a high level; S20, after detecting the rising edge of the zero-crossing signal of the voltage sinusoidal signal, start the delay timer to delay for a preset time Td; S101, when the preset delay time Td is reached, collect the voltage value u of the periodic waveform signal corresponding to the sampling time t; S102, when it is detected that the voltage value u corresponding to the next sampling time t of the periodic waveform signal is greater than the voltage value u corresponding to the previous sampling time t, and the voltage value u is greater than the preset voltage threshold Vthr, that is, Figure 4 As shown in ui>ui-1, u1~ui>Vthr, i is the number of sampling points, and the voltage value u corresponding to the sampling time t is collected to calculate the slope k; S201 is based on the formula Calculate the slope k of the linear function; S301, S401 when k = 0, obtain the moment when the phase of the periodic waveform signal is 90°, that is, the moment when the starting phase φ0 of the voltage sinusoidal signal is 90°; S302 when k>0, continue to collect the voltage value u corresponding to the sampling time t, calculate the slope k, until the slope k=0; S303 when k<0, end the calculation program and re-detect the rising edge of the zero-crossing signal. When the 90° phase of the voltage sinusoidal signal is used as the starting phase φ0, the preset time Td is delayed after the rising edge of the zero-crossing signal, and the collection calculation is performed when the voltage value u is greater than the voltage threshold Vthr, which can avoid a large number of invalid calculations and reduce software calculation overhead.
[0034] This embodiment may also include the following steps: calculating the sine value Sinφ0 corresponding to the starting phase φ0, and the sine value Sinφ corresponding to the phase φ at any time within the period T, Sinφ=Sin(ωt+φ0). The calculation program executed in the AC power tool voltage detection method may be stored in a non-volatile readable memory, and the calculation program may be called and executed by a processor, and the processor may be a control module including a logic operation unit.
[0035] The first embodiment of the present invention also provides an AC power tool using the AC power tool voltage detection method. Figure 5 The AC power tool shown in the figure includes an AC power supply 1, a drive module 4, a motor 6, and a control module 5 that controls the motor 6 through the drive module 4; the AC power supply 1 includes an EMC module 2 for filtering electromagnetic interference and a rectifier circuit 3, and the rectifier circuit 3 rectifies the voltage sine signal input by the AC power supply 1 into a periodic waveform signal; the control module 5 is electrically connected to the rectifier circuit 3 and collects the voltage value corresponding to each sampling moment of the periodic waveform signal within a preset sampling time period, and performs linear fitting on the voltage value; obtains the slope of the periodic waveform signal, and the slope corresponds to the phase of the periodic waveform signal. The sine signal is obtained by rectifying the voltage sinusoidal signal, so the slope also corresponds to the phase φ of the voltage sinusoidal signal; when the control module 5 detects that the slope is equal to the preset value stored in the control module 5, the phase φ corresponding to the slope is used as the starting phase φ0, and the phase φ of the voltage sinusoidal signal at any time within the cycle is calculated; the control module 5 calculates the starting phase φ0 and the sine value corresponding to the phase φ at any time within the cycle, and the control module 5 controls the motor 6 through the drive module 4 according to the starting phase φ0, the phase φ at any time within the cycle and the sine value.
[0036] Furthermore, the control module 5 is electrically connected to the output end of the EMC module 2 through a resistor R, and detects the rising edge of the zero-crossing signal of the voltage sinusoidal signal, the rising edge of the zero-crossing signal being the moment when the detected voltage sinusoidal signal jumps from a low level to a high level; the control module 5 includes a logic operation unit 51, and the logic operation unit 51 can execute the calculation program in the AC power tool voltage detection method. The control module 5 uses the detected starting phase φ0 and the phase φ at any time in the cycle as parameters, and can drive the motor 6 to operate more accurately, avoiding the problems of drive failure, wrong commutation, etc. caused by the inaccurate detection of the zero-crossing point by the control module 5.
[0037] Second implementation method:
[0038] like Figure 6 The figure shows the AC power tool voltage detection method involved in the second embodiment of the present invention, which is different from the first embodiment in that it also includes the following steps: S103 collects the periodic waveform signal in the preset time period, the sampling times t0, t1, t2, ..., t i The corresponding voltage values are u0, u1, u2, ..., u i , i is the number of sampling points; sampling time interval Δt i =t i+1 -t i , each of the sampling time intervals Δt i Equally, the voltage value u is discrete as a collection sample.
[0039] The linear fitting is performed using the least square method, and the formula of the slope k is:
[0040]
[0041] Where n is a positive integer greater than 1, where i = 0, 1, 2, ... n-1, is the number of n sampling points, the accumulation of the product of ti and ui, is the product of the sum of ti and ui for n sampling points. is the number of n sampling points, the accumulation of the square of ti, is the number of sampling points n, the accumulated square of ti. In order to further reduce the software calculation overhead, the positive integer n = 2 m , m is a positive integer. When k=0, the moment when the phase of the periodic waveform signal is 90° is obtained, that is, the moment when the phase φ of the voltage sinusoidal signal is 90°. Taking the phase φ=90° as the starting phase φ0, according to the formula φ=ωt+φ0, the phase φ of the voltage sinusoidal signal at any moment within the period T is obtained.
[0042] The present invention is not limited to the above specific implementations. A person skilled in the art can easily understand that there are many alternatives to the AC power tool voltage detection method and AC power tool of the present invention without departing from the principle and scope of the present invention. The protection scope of the present invention shall be subject to the content of the claims.
Claims
1. A method for detecting voltage of an AC power tool, Features The following steps are involved: Rectifying a voltage sinusoidal signal inputted from a voltage input terminal of an AC electric tool to obtain a periodic waveform signal; Collecting a voltage value u corresponding to a sampling time t of the periodic waveform signal within a preset sampling time period; performing linear fitting on the collected voltage value u to obtain a linear function of the dependent variable voltage value u relative to the independent variable time, and obtaining a slope k of the linear function, wherein the slope k corresponds to a phase φ of the voltage sinusoidal signal; At the moment when the slope k is equal to the preset value, the phase φ of the voltage sinusoidal signal corresponding to the moment is obtained; The phase φ corresponding to this moment is taken as the starting phase φ 0 , obtaining the phase φ of the voltage sinusoidal signal at any time within a period T; Wherein, the linear fitting is performed using the least squares method, and the formula of the slope k is: k=(E(t*u)-Et*Eu) / (E(t^2)-(Et)2) Where: E(t*u) is the mathematical expectation of the product of the sampling time t and the voltage value u, Et*Eu is the product of the mathematical expectation of the sampling time t and the mathematical expectation of the voltage value u, E(t^2) is the mathematical expectation of the square of the sampling time t, (Et)2 is the square of the mathematical expectation of the sampling time t.
2. The AC power tool voltage detection method according to claim 1, Features: The preset value is set to 0, and when the slope k=0, the starting phase φ of the voltage sinusoidal signal corresponding to the moment is obtained. 0 =90°.
3. The AC power tool voltage detection method according to claim 2, Features: After the rising edge of the zero-crossing signal of the voltage sinusoidal signal is detected, the voltage value u corresponding to the sampling time t is collected after a delay of a preset time Td.
4. The AC power tool voltage detection method according to claim 2, Features: When it is detected that the voltage value u corresponding to the next sampling time t of the periodic waveform signal is greater than the voltage value u corresponding to the previous sampling time t, and the voltage value u is greater than the preset voltage threshold Vthr, the voltage value u corresponding to the sampling time t is started to be collected.
5. The AC power tool voltage detection method according to claim 2, Features: After detecting the rising edge of the zero-crossing signal of the voltage sinusoidal signal, delay for a preset time Td. When it is detected that the voltage value u corresponding to the next sampling time t of the periodic waveform signal is greater than the voltage value u corresponding to the previous sampling time t, and the voltage value u is greater than the preset voltage threshold Vthr, start collecting the voltage value u corresponding to the sampling time t.
6. The AC power tool voltage detection method according to any one of claims 1 to 5, Features The following steps are also included: Calculate the starting phase φ 0 The corresponding sine value Sinφ 0 , and the sine value Sinφ corresponding to the phase φ at any time within the period T.
7. The AC power tool voltage detection method according to any one of claims 1 to 5, Features: The periodic waveform signal is collected within the preset sampling time period, and the sampling time t 0 , t 1 , t 2 ,……,t i The corresponding voltage value u 0 ,u 1 ,u 2 ,……,u i , i is the number of sampling points; sampling time interval Δt i =t i+1 -t i , each of the sampling time intervals Δt i equal.
8. The AC power tool voltage detection method according to claim 7, Features: The linear fitting is performed using the least square method, and the formula of the slope k is: , Wherein n is a positive integer greater than 1.
9. The AC power tool voltage detection method according to claim 8, Features: Positive integer n=2 m , m is a positive integer.
10. An AC power tool, comprising an AC power source, a drive module, a motor, and a control module for controlling the motor through the drive module; Features: The AC power supply includes a rectifier circuit for rectifying a voltage sinusoidal signal input by the AC power supply into a periodic waveform signal; The control module collects the voltage value corresponding to each sampling moment of the periodic waveform signal within a preset sampling time period, and performs linear fitting on the voltage value to obtain the slope of the voltage sinusoidal signal; The slope corresponds to the phase φ of the voltage sinusoidal signal. When the control module detects that the slope is equal to a preset value stored in the control module, the phase φ corresponding to the slope is used as the starting phase φ. 0 , and calculate the phase φ of the voltage sinusoidal signal at any time within the cycle; Wherein, the linear fitting is performed using the least squares method, and the formula of the slope k is: k=(E(t*u)-Et*Eu) / (E(t^2)-(Et)2) Where: E(t*u) is the mathematical expectation of the product of the sampling time t and the voltage value u, Et*Eu is the product of the mathematical expectation of the sampling time t and the mathematical expectation of the voltage value u, E(t^2) is the mathematical expectation of the square of the sampling time t, (Et)2 is the square of the mathematical expectation of the sampling time t.
11. The AC power tool according to claim 10, Features: The control module calculates the starting phase φ 0 and the sine value corresponding to the phase φ at any time in the cycle; the control module is based on the starting phase φ 0 , the phase φ and the sine value at any time within the period, and controlling the motor through the driving module.
