Electric vehicle motor rotor position determination method and electric vehicle control device
By inputting a high-frequency sinusoidal voltage signal to the motor and performing a Fourier transform, the current amplitude and phase are obtained, and the rotor angle of the Hall sensor is compensated, thus solving the problem of low rotor angle accuracy of the motor and realizing accurate rotor angle detection and vector control under various working conditions.
Patent Information
- Application Number
- CN202411957375.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-12-27
AI Technical Summary
In the existing technology, the accuracy of determining the rotor angle of the motor is relatively low, especially at low speeds, high carrier ratios and rapid changes in speed, which leads to a decrease in the vector control performance of the motor and even the risk of losing steps.
By inputting a high-frequency sinusoidal voltage signal to the motor, the target current of the motor under the α axis in the two-phase stationary coordinate system is obtained. The high-frequency current is extracted and subjected to discrete Fourier transform to obtain the current amplitude and phase. Based on this information, the rotor angle collected by the Hall sensor is compensated to obtain the accurate target rotor angle.
It improves the accuracy of motor rotor angle determination, especially at low speeds, high carrier ratios, and rapid speed changes. It can stably and accurately detect the motor rotor angle, thereby improving the accuracy of motor vector control and avoiding step loss.
Smart Images

Figure CN119834675B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of motor control, and particularly relates to a method for determining the position of a motor rotor of an electric vehicle and a control device of the electric vehicle. BACKGROUND
[0002] As a convenient and environmentally friendly means of transportation, two-wheeled electric vehicles have become the main tool for many families to travel. The motor is the driving component of the two-wheeled electric vehicle, and thus the motor will directly affect the performance indicators such as the climbing ability and the range of the two-wheeled electric vehicle. The permanent magnet synchronous motor is widely used in two-wheeled electric vehicles because of its excellent performance.
[0003] At present, the permanent magnet synchronous motor in the two-wheeled electric vehicle is often controlled based on a Hall sensor, and vector control calculation is performed according to the motor rotor position detected by the Hall sensor. Three latching type Hall sensors can be installed in the permanent magnet synchronous motor, and the three Hall sensors can output three high-low level waveforms with a phase difference of 120 degrees in one electrical cycle. Using the three high-low level waveforms, six electrical angle regions can be obtained, and each region corresponds to an electrical angle range of 60°. In order to obtain higher precision of the electrical angle, the existing electrical angle estimation methods are the average speed interpolation method and the phase-locked loop overshoot control strategy. However, both methods depend on the speed calculated in the previous angle interval, and thus the degree of delay is relatively large, and the angle error estimated at low speed, high carrier ratio, and rapid change of the speed is relatively large, which will affect the control performance and even exist the risk of out of step.
[0004] At present, there is no effective solution to the problem of low accuracy of the determination of the motor rotor angle. SUMMARY
[0005] Embodiments of the present application provide a method for determining the position of a motor rotor of an electric vehicle, a control device of the electric vehicle, a two-wheeled electric vehicle, and a computer program product, to at least solve the problem of low accuracy of the determination of the motor rotor angle.
[0006] In a first aspect, the embodiments of the present application provide a method for determining the position of a motor rotor of an electric vehicle, the method comprising: obtaining a target current of the motor in the alpha axis of a two-phase stationary coordinate system after inputting a high-frequency sinusoidal voltage signal to the motor, wherein the motor is provided with a Hall sensor, and a component of the high-frequency sinusoidal voltage signal in the beta axis of the two-phase stationary coordinate system is zero; extracting a high-frequency current corresponding to the high-frequency sinusoidal voltage signal from the target current; performing first discrete Fourier transform on the high-frequency current to obtain a current amplitude of the high-frequency current; performing second discrete Fourier transform on the current amplitude to obtain a first phase corresponding to the current amplitude; and compensating a rotor angle of the motor collected by the Hall sensor based on the first phase and a phase offset corresponding to the first discrete Fourier transform, to obtain a target rotor angle.
[0007] In some embodiments, compensating, based on the first phase and the phase offset corresponding to the first discrete Fourier transform, the rotor angle of the motor collected by the Hall sensor to obtain the target rotor angle includes: performing a third discrete Fourier transform on the preset target waveform to obtain a second phase corresponding to the target waveform, wherein a mathematical expression of the target waveform is:
[0008]
[0009] wherein S is the target waveform, is the rotor angle collected by the Hall sensor; compensating, based on a phase difference between the first phase and the second phase and the phase offset, the rotor angle collected by the Hall sensor to obtain the target rotor angle.
[0010] In some embodiments, compensating, based on a phase difference between the first phase and the second phase and the phase offset, the rotor angle collected by the Hall sensor to obtain the target rotor angle includes: determining the phase offset based on an injection frequency of the high-frequency sinusoidal voltage signal and an operating frequency of the motor, wherein a mathematical expression of the phase offset is:
[0011]
[0012] wherein θ err2 is the phase offset, f e is the operating frequency, and f h is the injection frequency; compensating, based on a phase difference between the first phase and the second phase and the phase offset, the rotor angle collected by the Hall sensor to obtain the target rotor angle, wherein a mathematical expression of the target rotor angle is:
[0013]
[0014] wherein θ e is the target rotor angle, is the rotor angle collected by the Hall sensor, θ err1 is the phase difference, and θ err2 is the phase offset.
[0015] In some embodiments, extracting, from the target current, the high-frequency current corresponding to the high-frequency sinusoidal voltage signal includes: filtering, using a second-order generalized integrator filter, the target current to obtain the high-frequency current corresponding to the high-frequency sinusoidal voltage signal, wherein a mathematical expression of the high-frequency sinusoidal voltage signal is:
[0016]
[0017] wherein u αhu is a component of the high-frequency sinusoidal voltage signal on the a-axis βh U is a component of the high-frequency sinusoidal voltage signal on the β-axis αh ω is an amplitude of the component of the high-frequency sinusoidal voltage signal on the a-axis h ω is an injection angular frequency of the high-frequency sinusoidal voltage signal, and t is time.
[0018] In some embodiments, obtaining the target current of the motor on the a-axis of the two-phase static coordinate system comprises: obtaining a first current of the motor on a three-phase static coordinate system; converting the first current into a second current of the motor on the two-phase static coordinate system by using a Clark transformation; and obtaining the target current from the second current.
[0019] In some embodiments, the mathematical expression of the current amplitude is:
[0020]
[0021] wherein I αh is the current amplitude, θ e is a rotor angle of the motor, U αh is an amplitude of the component of the high-frequency sinusoidal voltage signal on the a-axis, ω h is an injection angular frequency of the high-frequency sinusoidal voltage signal, and L d is an inductance value of the motor on the d-axis of the two-phase rotating coordinate system, L q is an inductance value of the motor on the q-axis of the two-phase rotating coordinate system.
[0022] In some embodiments, after compensating the rotor angle of the motor collected by the Hall sensor based on the first phase and a phase offset corresponding to the first discrete Fourier transform, to obtain a target rotor angle, the method further comprises: inputting the target rotor angle into a double closed-loop control system, so that the double closed-loop control system performs vector control on the motor.
[0023] In a second aspect, the embodiments of the present application provide an electric vehicle control device, comprising: an obtaining module configured to, after inputting a high-frequency sinusoidal voltage signal into a motor, obtain a target current of the motor on an a-axis of a two-phase static coordinate system, wherein the motor is provided with a Hall sensor, and a component of the high-frequency sinusoidal voltage signal on a β-axis of the two-phase static coordinate system is zero; an extracting module configured to extract a high-frequency current corresponding to the high-frequency sinusoidal voltage signal from the target current; a calculating module configured to perform a first discrete Fourier transform on the high-frequency current to obtain a current amplitude of the high-frequency current, and perform a second discrete Fourier transform on the current amplitude to obtain a first phase corresponding to the current amplitude; and a compensating module configured to compensate a rotor angle of the motor collected by the Hall sensor based on the first phase and a phase offset corresponding to the first discrete Fourier transform, to obtain a target rotor angle.
[0024] In a third aspect, the embodiments of the present application provide a two-wheeled electric vehicle, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor executes the computer program to implement the electric vehicle motor rotor position determination method of any one of the first aspect.
[0025] In a fourth aspect, the embodiments of the present application provide a computer program product, comprising a computer program, and the computer program is executed to implement the electric vehicle motor rotor position determination method of any one of the first aspect.
[0026] The existing electric angle estimation methods all rely on the speed calculated in the last angle interval, so the delay is relatively large, and the angle error obtained in low speed, high carrier ratio, and rapid change of rotation speed is relatively large. In addition, since the vector control of the motor needs to obtain the motor rotor position, the existence of the angle error will affect the accuracy of the motor rotor position, and the lower accuracy of the electronic rotor position will reduce the performance of the vector control, and even there is the risk of losing step. The electric vehicle motor rotor position determination method, electric vehicle control device, two-wheeled electric vehicle, and computer program product provided by the embodiments of the present application, by inputting a high-frequency voltage signal to the motor, obtaining a target current of the motor under the alpha axis of the two-phase static coordinate system, extracting a high-frequency current corresponding to the high-frequency voltage signal from the target current, and performing discrete Fourier transform on the high-frequency current to obtain a current amplitude of the high-frequency current, the current amplitude can reflect the spatial position relationship between the alpha axis and the d-axis of the two-phase rotating coordinate system, and based on the spatial position relationship, the rotor angle of the motor collected by the Hall sensor can be compensated, and finally an accurate target rotor angle is obtained. This process does not rely on the speed calculated in the last angle interval, so it can respond faster to the change of the motor rotor position, and can stably and accurately detect the rotor angle of the motor in low speed, high carrier ratio, and rapid change of rotation speed, thereby improving the accuracy of the motor rotor position, and further improving the accuracy of the vector control of the motor. Through the present application, the problem of low accuracy of the determination of the motor rotor angle is solved, and the technical effect of improving the accuracy of the determination of the motor rotor angle is achieved.
[0027] The details of one or more embodiments of the present application are presented in the following drawings and description to make other features, objects, and advantages of the present application more apparent. BRIEF DESCRIPTION OF DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creating any inventive labor.
[0029] Figure 1 is a flow chart of a method for determining the position of an electric vehicle motor rotor according to an embodiment of the present application;
[0030] Figure 2 is a structural block diagram of a double closed-loop control system according to an embodiment of the present application;
[0031] Figure 3 is a three-coordinate system space vector relationship diagram according to an embodiment of the present application;
[0032] Figure 4 is a circuit model diagram in a two-phase rotating coordinate system according to an embodiment of the present application;
[0033] Figure 5 is a current amplitude curve of a high-frequency current according to an embodiment of the present application;
[0034] Figure 6 is a target waveform and current amplitude curve according to an embodiment of the present application;
[0035] Figure 7 is a structural schematic diagram of an electric vehicle control device according to an embodiment of the present application;
[0036] Figure 8 is a structural schematic diagram of a two-wheeled electric vehicle according to an embodiment of the present application. DETAILED DESCRIPTION
[0037] In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular sequences of steps, techniques, architectures, etc. in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known methods, devices, circuits, and
[0038] It is to be understood that the terminology "includes", "has", "holds", "contains" and / or "comprising", when used in this specification and in the following claims, indicates the presence of the described features, integers, steps, operations, elements, and / or components but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0039] It is also to be understood that the terminology "and / or" when used in this specification and in the following claims, refers to at least one of the items, or any combination of the items, listed after the term in the various aspects.
[0040] As used in the specification and the appended claims, the term "if' can be interpreted as meaning "when" or "upon" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if [the described condition or event] is detected" can be interpreted to mean "upon determining" or "in response to determining" or "upon detecting [the described condition or event]" or "in response to detecting [the described condition or event]" depending on the context.
[0041] In addition, the description in the specification of the application and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0042] In the present specification, the phrase "one embodiment" or "some embodiments" etc. means that the particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, the phrases "in one embodiment", "in some embodiments", "in other some embodiments", "in yet some embodiments" etc. appearing in various places in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically stated. The terms "comprise", "include", "have" and their conjugates mean "including but not limited to", unless otherwise specifically stated.
[0043] As a convenient and environmentally friendly means of transportation, two-wheeled electric vehicles have become the main tool for many families to travel. The motor is the driving component of the two-wheeled electric vehicle, therefore, the motor will directly affect the climbing ability and the range of the two-wheeled electric vehicle and other performance indicators, and the permanent magnet synchronous motor is widely used in two-wheeled electric vehicles because of its excellent performance.
[0044] At present, the permanent magnet synchronous motor in the two-wheeled electric vehicle is often controlled based on the Hall sensor, and the vector control calculation is performed according to the motor rotor position detected by the Hall sensor. Three latching type Hall sensors can be installed in the permanent magnet synchronous motor, and the three Hall sensors can output three phase difference 120 degree high-low level waveforms in one electrical cycle. Six electrical angle regions can be obtained by using the three high-low level waveforms, and each region corresponds to an electrical angle range of 60°. In order to obtain higher precision electrical angle, the existing electrical angle estimation method is the average speed interpolation method and the phase-locked loop overshoot control strategy. However, both methods depend on the speed calculated in the previous angle interval, so the delay is relatively large, and the angle error estimated at low speed, high carrier ratio and rapid speed change is relatively large. In addition, since the vector control of the motor needs to obtain the motor rotor position, the existence of the angle error will affect the accuracy of the motor rotor position, and the lower accuracy of the electronic rotor position will reduce the performance of the vector control, and even there is the risk of step loss.
[0045] At present, there is no effective solution to the problem of low accuracy of the determination of the motor rotor angle.
[0046] Therefore, the embodiment of the present application provides a motor rotor position determination method for an electric vehicle. The method is applied to control the motor in the two-wheeled electric vehicle or the three-wheeled electric vehicle. The motor can be provided with a Hall sensor. After a high-frequency voltage signal is input to the motor, the target current of the motor under the α axis of the two-phase static coordinate system is obtained. The high-frequency current corresponding to the high-frequency voltage signal is extracted from the target current, and the current amplitude of the high-frequency current is obtained by performing discrete Fourier transform on the high-frequency current. The current amplitude can reflect the spatial position relationship between the α axis and the d axis of the two-phase rotating coordinate system. Based on the spatial position relationship, the rotor angle of the motor collected by the Hall sensor can be compensated, and finally the accurate target rotor angle is obtained. This process does not depend on the speed calculated in the previous angle interval, so it can respond faster to the change of the motor rotor position, and can stably and accurately detect the rotor angle of the motor at low speed, high carrier ratio and rapid speed change, thereby improving the accuracy of the motor rotor position and the accuracy of the vector control of the motor. Through the present application, the problem of low accuracy of the determination of the motor rotor angle is solved, and the technical effect of improving the accuracy of the determination of the motor rotor angle is realized.
[0047] The following will be combined with Figure 1 The motor rotor position determination method for an electric vehicle provided by an embodiment of the present application will be described. Please refer to Figure 1 , Figure 1 The flow chart of the motor rotor position determination method for an electric vehicle according to an embodiment of the present application is shown in Figure 1 The method comprises:
[0048] In step S101, after inputting the high-frequency sinusoidal voltage signal to the motor, the target current of the motor on the α-axis of the two-phase static coordinate system is obtained, wherein the motor is provided with a Hall sensor, and the component of the high-frequency sinusoidal voltage signal on the β-axis of the two-phase static coordinate system is zero.
[0049] In this embodiment, the high-frequency voltage signal can be injected only to the α-axis of the two-phase static coordinate system of the motor based on the two-phase static coordinate axis of the motor estimated by the double closed-loop control system, and the mathematical expression of the high-frequency sinusoidal voltage signal can be:
[0050]
[0051] wherein u αh is the component of the high-frequency sinusoidal voltage signal on the α-axis, u βh is the component of the high-frequency sinusoidal voltage signal on the β-axis, U αh is the amplitude of the component of the high-frequency sinusoidal voltage signal on the α-axis, ω h is the injection angular frequency of the high-frequency sinusoidal voltage signal, and t is time.
[0052] Specifically, the amplitude U αh of the injected high-frequency sinusoidal voltage signal can be 1% to 5% of the reference voltage U dc of the motor, and the injection frequency f h of the high-frequency sinusoidal voltage signal can be 5% of the control frequency f sys of the double closed-loop control system.
[0053] As an example, refer to Figure 2 , Figure 2 is the structural block diagram of the double closed-loop control system according to an embodiment of the present application, as shown in Figure 2 , the high-frequency voltage signal is injected to the α-axis of the two-phase static coordinate system of the motor by superimposing the high-frequency sinusoidal voltage signal u αh on the output end of the speed-current double closed-loop (including the speed loop PI control unit 207, the first current loop PI control unit 208, and the second current loop PI control unit 208) through the high-frequency sinusoidal voltage signal injection unit 213.
[0054] In this embodiment, the target current is the current i α of the motor on the α-axis of the two-phase static coordinate system after inputting the high-frequency sinusoidal voltage signal to the motor.
[0055] In this embodiment, obtaining the target current of the motor on the α-axis of the two-phase static coordinate system can include the following steps:
[0056] Step 1, obtaining the first current iabc .
[0057] Step 2, using the Clark transformation to convert the first current i abc to the second current i αβ .
[0058] Step 3, obtaining the target current i αβ from the second current i α .
[0059] wherein the space vector relationship between the three-phase stationary coordinate system and the two-phase stationary coordinate system can refer to Figure 3 , Figure 3 is a three-coordinate system space vector relationship according to an embodiment of the present application, according to Figure 3 , the transformation formula of the first current i abc and the second current i αβ can be obtained:
[0060]
[0061] As an example, refer to Figure 2 , as shown in Figure 2 , when the two-wheel electric vehicle is running, the first current i abc of the motor 200 can be obtained by using a microcontroller unit (MCU) first S, and then the first current i abc is input into the Clark transformation unit 201 to obtain the second current i αβ output by the Clark transformation unit 201.
[0062] Step S102, extracting the high-frequency current corresponding to the high-frequency sinusoidal voltage signal from the target current.
[0063] In this embodiment, a filter can be used to extract the high-frequency current from the target current. Specifically, a second-order general integrator (SOGI) can be used to filter the target current to obtain the high-frequency current corresponding to the high-frequency sinusoidal voltage signal, wherein the transfer function of the SOGI can be represented as:
[0064]
[0065] The SOGI is a band-pass filter, and can effectively track a signal with a specific frequency of ω0. For a signal with a specific frequency of ω0, the SOGI has an amplitude gain of 1 and a phase offset of 0, and can effectively extract the high-frequency current while offsetting the phase offset caused by a traditional band-pass filter, thereby improving the accuracy of subsequent compensation of the rotor angle collected by the Hall sensor using the high-frequency current.
[0066] As an example, reference can be made to Figure 2 As shown in Figure 2 , a second current i αβ output by the Clark transformation unit 201 can be obtained. αβ A target current i α is obtained from the second current i αβ , and the target current i α is input into a filter unit 203. α The filter unit 203 performs a filtering operation on the target current i α using SOGI, thereby obtaining a high-frequency current i αh corresponding to the high-frequency sinusoidal voltage signal.
[0067] In step S103, a first discrete Fourier transform is performed on the high-frequency current, thereby obtaining a current amplitude of the high-frequency current.
[0068] In this embodiment, the mathematical expression of the current amplitude can be:
[0069]
[0070] where I αh is the current amplitude, θ e is the rotor angle of the motor, U αh is the amplitude of the component of the high-frequency sinusoidal voltage signal on the α axis, ω h is the injection angular frequency of the high-frequency sinusoidal voltage signal, L d is the inductance value of the motor on the d axis of the two-phase rotating coordinate system, and L q is the inductance value of the motor on the q axis of the two-phase rotating coordinate system.
[0071] The mathematical expression of the current amplitude described above can be obtained by performing high-frequency current response calculation on the obtained target current i α .
[0072] First, the high-frequency sinusoidal voltage signal in the two-phase stationary coordinate system can be converted to the two-phase rotating coordinate system by using Park transformation according to Figure 3 , and the mathematical formula of the conversion can be:
[0073]
[0074] where u dhis the component of the high-frequency sinusoidal voltage signal in the d-axis of the two-phase rotating coordinate system. qh is the component of the high-frequency sinusoidal voltage signal in the q-axis of the two-phase rotating coordinate system.
[0075] Secondly, the circuit model in the two-phase rotating coordinate system is regarded as a model in which a resistor is connected in series with an inductor (the circuit model can be referred to Figure 4 , Figure 4 is a circuit model diagram of the circuit model in the two-phase rotating coordinate system according to an embodiment of the present application), and thus a mathematical expression of the high-frequency current in the two-phase rotating coordinate system can be obtained.
[0076]
[0077] where i dh is the component of the high-frequency current in the d-axis, i qh is the component of the high-frequency current in the q-axis, Z d and Z q are impedances of the motor in the d-axis and the q-axis, respectively, R s is an equivalent resistance value of the motor in the d-axis and the q-axis, and L d and L q are inductance values of the motor in the d-axis and the q-axis, respectively.
[0078] When the high-frequency sinusoidal voltage signal is injected, the influence of the resistor can be ignored because the resistance impedance is much smaller than the inductive reactance, and finally a current response caused by the injection of the high-frequency sinusoidal voltage signal in the two-phase rotating coordinate system is obtained. The mathematical expression of the current response is:
[0079]
[0080] Then, the high-frequency current in the two-phase rotating coordinate system can be converted into the two-phase stationary coordinate system by using inverse Park transformation, and the high-frequency current i αh in the two-phase stationary coordinate system is obtained. The mathematical expression of the high-frequency current i αh may be:
[0081]
[0082] Finally, based on the mathematical expression of the high-frequency current i αh , the mathematical expression of the current amplitude I αh of the high-frequency current i αh may be determined. The mathematical expression of the current amplitude I αh is:
[0083]
[0084] As can be seen from the mathematical expression of the current amplitude I αh , the current amplitude I αh is related to the rotor angle θ eThere is a correlation, that is, the current amplitude I αh It can reflect the spatial positional relationship between the α-axis and the d-axis of the two-phase rotating coordinate system, when the rotor angle θ e When it is 0 or π, When the rotor angle θ e for or hour, Therefore, a current amplitude I can be obtained. αh With rotor angle θ e The curve, which can be seen in [reference] Figure 5 , Figure 5 This is a graph of the current amplitude of a high-frequency current according to an embodiment of this application, wherein the frequency f of the current amplitude curve is... I f is the operating frequency of the motor e 2 times.
[0085] In this embodiment, the mathematical expression for the first discrete Fourier transform can be:
[0086]
[0087] Where F = I αh f = i αh F Re F is the real part of the signal. Im Let θ be the imaginary part of the signal, F be the amplitude of the signal, and θ be the phase of the signal. The high-frequency current i can be obtained based on the first discrete Fourier transform. αh Current amplitude I αh .
[0088] As an example, see Figure 2 ,like Figure 2 As shown, the high-frequency current i output by the filter unit 203 is obtained. αh Then, it can be input into the Discrete Fourier Transform unit 204, which uses the first Discrete Fourier Transform described above to process the high-frequency current i. αh Data processing is performed to obtain the current amplitude I. αh .
[0089] Step S104: Perform a second discrete Fourier transform on the current amplitude to obtain the first phase corresponding to the current amplitude.
[0090] Step S105: Based on the first phase and the phase shift corresponding to the first discrete Fourier transform, the rotor angle of the motor acquired by the Hall sensor is compensated to obtain the target rotor angle.
[0091] In the embodiment, the rotor angle of the motor collected by the Hall sensor is compensated based on the first phase and the phase offset corresponding to the first discrete Fourier transform to obtain a target rotor angle, including the following steps:
[0092] Step 1, performing third discrete Fourier transform on the preset target waveform to obtain a second phase corresponding to the target waveform, wherein the mathematical expression of the target waveform is:
[0093]
[0094] wherein S is the target waveform, is the rotor angle collected by the Hall sensor;
[0095] Step 2, compensating the rotor angle collected by the Hall sensor based on the phase difference between the first phase and the second phase and the phase offset to obtain the target rotor angle.
[0096] In the embodiment, the second discrete Fourier transform and the third discrete Fourier transform are similar to the first discrete Fourier transform, and the purpose is to obtain the phase information of the target waveform S and the current amplitude I αh .
[0097] Since the Hall sensor can only obtain the interval in which the current rotor position is located, an interpolation method is usually used to estimate the actual rotor angle. However, since there is a measurement error in the installation position of the Hall sensor, and the interpolation method is affected by the average speed of the previous period, the rotor angle estimated by the interpolation method has an error θ from the actual rotor angle. err When the motor is running stably, it can be considered that there is a fixed error between the rotor angle collected by the Hall sensor and the actual rotor angle.
[0098] Specifically, it can be seen from Figure 6 , Figure 6 the curve graph of the target waveform and the current amplitude according to an embodiment of the application as shown in Figure 6 that the waveform and the current amplitude I αh are compared, and it can be considered that the error θ err1 between the phases of the two waveforms is the error between the rotor angle estimated by the Hall sensor and the actual rotor angle. err1
[0099] Therefore, the target waveform S and the current amplitude I αh Both are subjected to Discrete Fourier Transform to obtain their phase information (i.e., the first phase and the second phase). The phase difference between the first phase and the second phase is θ. err1 .
[0100] In addition, in obtaining the current amplitude I αh Since filtering and Discrete Fourier Transform (DFT) operations have been performed, the phase shift introduced by these processes must also be considered. For the filtering stage, due to the use of SOGI to filter the high-frequency current i... αh For a signal with a specific frequency ω0, SOGI has an amplitude gain of 1 and a phase shift of 0. Therefore, SOGI effectively extracts the high-frequency current while also canceling the phase shift introduced by the traditional bandpass filter. Thus, the filtering stage can be considered not to introduce phase shift. For the Discrete Fourier Transform, since it extracts the high-frequency current i... αh Current amplitude I αh Therefore, it will affect the current amplitude I. αh Generate a high-frequency current i αh Delay T with equal period h High-frequency current i αh The period is consistent with the period of the injected high-frequency sinusoidal voltage information, therefore T h =1 / f h .
[0101] As an example, see Figure 6 , Figure 6 The current amplitude I is shown. αh The waveforms before and after the delay can be used to determine the phase shift θ. err2 .
[0102] Specifically, based on the phase difference and phase shift between the first and second phases, the rotor angle acquired by the Hall sensor is compensated to obtain the target rotor angle, which may include:
[0103] Based on the injection frequency of the high-frequency sinusoidal voltage signal and the operating frequency of the motor, the phase shift is determined, where the mathematical expression for the phase shift is:
[0104]
[0105] Where, θ err2 For phase shift, f e f is the operating frequency. h The injection frequency is used; based on the phase difference and phase shift between the first and second phases, the rotor angle acquired by the Hall sensor is compensated to obtain the target rotor angle, where the mathematical expression for the target rotor angle is:
[0106]
[0107] Where, θ e For the target rotor angle, The rotor angle θ is acquired by the Hall sensor. err1 For the phase difference, θ err2 This is the phase shift.
[0108] By performing the above operations, the rotor angle acquired by the Hall sensor can be processed. Compensation is performed to obtain the target rotor angle θ. e Then, the target rotor angle θ can be... e Input the dual closed-loop control system to enable the dual closed-loop control system to perform vector control on the motor.
[0109] It should be noted that vector calculation can be performed within a timer interrupt to obtain the rotor angle estimated by the Hall sensor. Next, the three-phase current of the motor is collected and subjected to Clark transformation, followed by an angle compensation algorithm to adjust the rotor angle. Compensation is performed, and finally the target rotor angle θ obtained after compensation is calculated. e Input into a dual closed-loop control system.
[0110] For details, please refer to Figure 2 ,like Figure 2 As shown, vector control of the motor includes: setting the motor speed setpoint ω e_ref The rotor angle and angular velocity acquisition unit 206 obtains the rotor angular velocity ω based on the Hall signal acquired by the Hall sensor. e The difference is input to the speed loop PI control unit 207, and the expected value of the motor current i in the q-axis of the two-phase rotating coordinate system is obtained from the output of the speed loop PI control unit 207. q_ref The speed loop PI control unit uses a PI controller, whose purpose is to control the motor speed so that the actual motor speed can quickly follow the given speed. It is the outer loop part of the dual closed-loop control system and needs to meet the requirements of rapid speed adjustment and stable speed.
[0111] Then, the expected current value i q_ref The actual value of the motor current i in the q-axis of the two-phase rotating coordinate system, fed back by the Park transformation unit 202. q The difference is input to the first current loop PI control unit 208, and the voltage reference value U of the motor in the q-axis of the two-phase rotating coordinate system is obtained from the output of the first current loop PI control unit 208. q Similar to the steps described above, based on the Park transformation unit 202 and the second current loop PI control unit 208, the voltage reference value U of the motor in the d-axis of the two-phase rotating coordinate system can be obtained. dThe current loop PI control unit uses a PI controller, whose purpose is to control the motor current so that the three-phase current value i of the motor is... abc Current i in the two-phase rotating coordinate system obtained by coordinate transformation d i q It can follow the expected current output of the speed loop PI control unit 207, which is the inner loop part of the dual closed-loop control system, and needs to meet the requirements of fast response and small current fluctuation.
[0112] Then, the voltage reference value U can be... d U q and the target rotor angle θ output by the angle error compensation unit 205. e Input to the inverse Park transformation unit 210, which transforms the target rotor angle θ. e Voltage reference value U d U q Converted to the voltage reference value U of the motor in two-phase stationary coordinate axes α U β Space vector pulse width modulation 211 pairs voltage reference value U α U β The PWM wave is modulated to obtain a PWM wave, which controls the six switching devices of the inverter 212 to convert the DC power signal into a three-phase AC voltage, thereby performing vector control on the motor 200.
[0113] Through steps S101 to S105, after inputting a high-frequency voltage signal to the motor, the target current of the motor under the α-axis in the two-phase stationary coordinate system is obtained. The high-frequency current corresponding to the high-frequency voltage signal is extracted from the target current, and a discrete Fourier transform is performed on the high-frequency current to obtain its amplitude. This amplitude reflects the spatial relationship between the α-axis and the d-axis of the two-phase rotating coordinate system. Based on this spatial relationship, the rotor angle of the motor acquired by the Hall sensor can be compensated, ultimately obtaining an accurate target rotor angle. This process does not rely on the speed calculated from the previous angle interval, thus enabling faster response to changes in the motor rotor position. It can stably and accurately detect the motor rotor angle even at low speeds, high carrier ratios, and rapid speed changes, thereby improving the accuracy of the motor rotor position and consequently improving the accuracy of vector control of the motor. This application solves the problem of low accuracy in determining the motor rotor angle and achieves the technical effect of improving the accuracy of motor rotor angle determination.
[0114] Corresponding to the electric vehicle motor rotor position determination method described in the above embodiments, Figure 7Fig. 1 shows a schematic diagram of an electric vehicle control device according to an embodiment of the present application. For ease of illustration, only parts related to the embodiments of the present application are shown.
[0115] Fig. 1 shows a schematic diagram of an electric vehicle control device according to an embodiment of the present application. For ease of illustration, only parts related to the embodiments of the present application are shown. Figure 7 The electric vehicle control device 7 is applied to control an electric motor in a two-wheeled or three-wheeled electric vehicle, and the electric motor is provided with a Hall sensor. The electric vehicle control device 7 comprises: an acquisition module 70, configured to acquire a target current of the electric motor on an a-axis of a two-phase static coordinate system after inputting a high-frequency sinusoidal voltage signal to the electric motor, wherein a component of the high-frequency sinusoidal voltage signal on a β-axis of the two-phase static coordinate system is zero; an extraction module 71, configured to extract a high-frequency current corresponding to the high-frequency sinusoidal voltage signal from the target current; a calculation module 72, configured to perform first discrete Fourier transform on the high-frequency current to obtain a current amplitude of the high-frequency current, and perform second discrete Fourier transform on the current amplitude to obtain a first phase corresponding to the current amplitude; and a compensation module 73, configured to compensate a rotor angle of the electric motor collected by the Hall sensor based on the first phase and a phase offset corresponding to the first discrete Fourier transform, to obtain a target rotor angle.
[0116] In one embodiment, the calculation module 72 is further configured to perform third discrete Fourier transform on a preset target waveform to obtain a second phase corresponding to the target waveform, wherein a mathematical expression of the target waveform is:
[0117]
[0118] wherein S is the target waveform, the rotor angle collected by the Hall sensor; the compensation module 73 is further configured to compensate the rotor angle collected by the Hall sensor based on a phase difference between the first phase and the second phase and the phase offset, to obtain the target rotor angle.
[0119] In one embodiment, the compensation module 73 is further configured to determine the phase offset based on an injection frequency of the high-frequency sinusoidal voltage signal and an operating frequency of the electric motor, wherein a mathematical expression of the phase offset is:
[0120]
[0121] wherein θ err2 is the phase offset, f e is the operating frequency, and f h is the injection frequency; the compensation module 73 is further configured to compensate the rotor angle collected by the Hall sensor based on a phase difference between the first phase and the second phase and the phase offset, to obtain the target rotor angle, wherein a mathematical expression of the target rotor angle is:
[0122]
[0123] wherein θ e is a target rotor angle, is a rotor angle collected by a Hall sensor, θ err1 is a phase difference, θ err2 is a phase offset.
[0124] In an embodiment, the extraction module 71 is further configured to filter the target current using a second-order generalized integral filter to obtain a high-frequency current corresponding to a high-frequency sinusoidal voltage signal, wherein the high-frequency sinusoidal voltage signal has a mathematical expression as follows:
[0125]
[0126] wherein u αh is a component of the high-frequency sinusoidal voltage signal in the α-axis, u βh is a component of the high-frequency sinusoidal voltage signal in the β-axis, U αh is an amplitude of the component of the high-frequency sinusoidal voltage signal in the α-axis, ω h is an injection angular frequency of the high-frequency sinusoidal voltage signal, and t is time.
[0127] In an embodiment, the acquisition module 70 is further configured to acquire a first current of the motor in a three-phase stationary coordinate system; convert the first current into a second current of the motor in a two-phase stationary coordinate system using a Clark transformation; and acquire the target current from the second current.
[0128] In an embodiment, the current amplitude has a mathematical expression as follows:
[0129]
[0130] wherein I αh is the current amplitude, θ e is a rotor angle of the motor, U αh is an amplitude of the component of the high-frequency sinusoidal voltage signal in the α-axis, ω h is an injection angular frequency of the high-frequency sinusoidal voltage signal, L d is an inductance value of the motor in a d-axis of a two-phase rotating coordinate system, L q is an inductance value of the motor in a q-axis of the two-phase rotating coordinate system.
[0131] In an embodiment, the electric vehicle control device 7 further comprises a control module configured to input the target rotor angle into a double closed-loop control system to enable the double closed-loop control system to perform vector control on the motor.
[0132] It should be noted that the information interaction, execution process, and the like between the above-described devices / units, since based on the same concept as the method embodiments, specific functions and brought technical effects can be referred to the method embodiments part, and will not be described here.
[0133] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0134] Figure 8 This is a structural schematic diagram of a two-wheeled electric vehicle according to an embodiment of this application. Figure 8 As shown, the two-wheeled electric vehicle 8 includes: at least one processor 80 ( Figure 8 (Only one is shown) a processor, a memory 81, and a computer program 82 stored in the memory 81 and capable of running on at least one processor 80. When the processor 80 executes the computer program 82, it implements the steps in any of the above embodiments of the electric vehicle motor rotor position determination method.
[0135] The two-wheeled electric vehicle 8 may include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will understand that... Figure 8 This is merely an example of a two-wheeled electric vehicle 8 and does not constitute a limitation on the two-wheeled electric vehicle 8. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as motors, wheel hubs, transmission devices, input / output devices, network access devices, etc.
[0136] The processor 80 can be a central processing unit (CPU), and can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0137] The memory 81 can be an internal storage unit of the two-wheeled electric vehicle 8 in some embodiments, such as a hard disk or a memory of the two-wheeled electric vehicle 8. The memory 81 can also be an external storage device of the two-wheeled electric vehicle 8 in other embodiments, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, or the like. In other embodiments, the memory 81 can include both an internal storage unit and an external storage device of the two-wheeled electric vehicle 8. The memory 81 is used to store an operating system, an application program, a boot loader, data, and other programs, such as program codes of the computer program 82. The memory 81 can also be used to temporarily store data that has been output or is to be output.
[0138] The embodiments of the present application also provide a computer readable storage medium storing a computer program, and the computer program is executed by a processor to implement the steps in the above-mentioned various electric vehicle motor rotor position determination method embodiments.
[0139] The embodiments of the present application provide a computer program product, and when the computer program product is run on a mobile terminal, the mobile terminal is caused to implement the steps in the above-mentioned various electric vehicle motor rotor position determination method embodiments.
[0140] The computer program can be stored in a computer readable storage medium. The computer readable storage medium can be, for example, a Read-Only Memory (ROM), a Random Access Memory (RAM), a flash memory, or a hard disk.
[0141] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0142] Those skilled in the art can appreciate that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0143] In the embodiments provided in the present application, it should be understood that the disclosed apparatus / network device and method can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely schematic, for example, the division of modules or units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed units can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0144] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.
[0145] The above examples are only used to illustrate the technical solutions of the present application, but not limit the same; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that the technical solutions recorded in the foregoing examples can be modified, or some technical features can be replaced by equivalent ones; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method of determining the position of an electric vehicle motor rotor, characterized by, The method comprises: After inputting a high-frequency sinusoidal voltage signal to the motor, obtaining a target current of the motor on an alpha axis of a two-phase stationary coordinate system, wherein the motor is provided with a Hall sensor, and a component of the high-frequency sinusoidal voltage signal on a beta axis of the two-phase stationary coordinate system is zero; extracting a high-frequency current corresponding to the high-frequency sinusoidal voltage signal from the target current; performing first discrete Fourier transform on the high-frequency current to obtain a current amplitude of the high-frequency current; performing second discrete Fourier transform on the current amplitude to obtain a first phase corresponding to the current amplitude; performing third discrete Fourier transform on a preset target waveform to obtain a second phase corresponding to the target waveform, wherein a mathematical expression of the target waveform is: wherein S is the target waveform, is the rotor angle collected by the Hall sensor; determining a phase offset based on an injection frequency of the high-frequency sinusoidal voltage signal and an operating frequency of the motor, wherein a mathematical expression of the phase offset is: where θ err2 is the phase offset, f e is the operating frequency, f h is the injection frequency; compensating a rotor angle collected by the Hall sensor based on a phase difference between the first phase and the second phase and the phase offset to obtain a target rotor angle.
2. The method of claim 1, wherein, A mathematical expression of the target rotor angle is: wherein θ e is the target rotor angle, is the rotor angle acquired by the Hall sensor, θ err1 is the phase difference, θ err2 is the phase offset.
3. The method of claim 1 or 2, wherein the extracting a high-frequency current corresponding to the high-frequency sinusoidal voltage signal from the target current comprises: filtering the target current using a second-order generalized integral filter to obtain the high-frequency current corresponding to the high-frequency sinusoidal voltage signal, wherein a mathematical expression of the high-frequency sinusoidal voltage signal is: wherein u αh is the component of the high-frequency sinusoidal voltage signal in the a-axis, u βh is the component of the high-frequency sinusoidal voltage signal in the β-axis, U αh is the amplitude of the component of the high-frequency sinusoidal voltage signal in the a-axis, ω h is the injection angular frequency of the high-frequency sinusoidal voltage signal, t is time.
4. The method according to claim 1 or 2, characterized in that, The obtaining a target current of the motor on an alpha axis of a two-phase stationary coordinate system comprises: obtaining a first current of the motor on a three-phase stationary coordinate system; converting the first current into a second current of the motor on the two-phase stationary coordinate system using a Clark transformation; obtaining the target current from the second current.
5. The method according to claim 1 or 2, characterized in that, A mathematical expression of the current amplitude is: where I αh is the current amplitude, θ e is the target rotor angle of the electric machine, U αh is the amplitude of the component of the high-frequency sinusoidal voltage signal in the a-axis, ω h is the injection angular frequency of the high-frequency sinusoidal voltage signal, L d is the inductance value of the electric machine in the d-axis of the two-phase rotating coordinate system, L q is the inductance value of the electric machine in the q-axis of the two-phase rotating coordinate system.
6. The method of claim 1 or 2, wherein, After the compensating a rotor angle collected by the Hall sensor based on a phase difference between the first phase and the second phase and the phase offset to obtain the target rotor angle, the method further comprises: inputting the target rotor angle into a double closed-loop control system to enable the double closed-loop control system to perform vector control on the motor.
7. An electric vehicle control device characterized by comprising: comprises: a obtaining module, configured to obtain a target current of the motor on an alpha axis of a two-phase stationary coordinate system after inputting a high-frequency sinusoidal voltage signal to the motor, wherein the motor is provided with a Hall sensor, and a component of the high-frequency sinusoidal voltage signal on a beta axis of the two-phase stationary coordinate system is zero; an extracting module, configured to extract a high-frequency current corresponding to the high-frequency sinusoidal voltage signal from the target current; a calculating module, configured to perform first discrete Fourier transform on the high-frequency current to obtain a current amplitude of the high-frequency current, and to perform second discrete Fourier transform on the current amplitude to obtain a first phase corresponding to the current amplitude; The compensation module is configured to perform third discrete Fourier transform on a preset target waveform to obtain a second phase corresponding to the target waveform, wherein a mathematical expression of the target waveform is: wherein S is the target waveform, is a rotor angle collected by the Hall sensor; based on an injection frequency of the high-frequency sinusoidal voltage signal and an operating frequency of the motor, a phase offset is determined, wherein a mathematical expression of the phase offset is: wherein θ err2 is the phase offset, f e is the operating frequency, f h is the injection frequency; based on a phase difference between the first phase and the second phase and the phase offset, the rotor angle collected by the Hall sensor is compensated to obtain a target rotor angle.
8. A two-wheeled electric vehicle comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, the processor executes the computer program to implement the motor rotor position determination method of the electric vehicle of any one of claims 1 to 6.
9. A computer program product, characterised in that, The computer program comprises a computer program which, when executed, causes the electric vehicle motor rotor position determination method of any one of claims 1 to 6 to be performed.
Citation Information
Patent Citations
Motor rotor position information acquisition method and system
CN112737440A
High-frequency injection compensation method for SPMSM rotor position estimation
CN112737450A