Vehicle permanent magnet synchronous motor current loop bandwidth determination method and device, and medium
Through the online discrete Fourier analysis and self-adjusting PI parameters, the accuracy and time-consuming problems of the current loop bandwidth measurement method of automotive permanent magnet synchronous motor are solved, and the performance consistency of the motor in all operating conditions is achieved.
Patent Information
- Application Number
- CN202411812516.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-22
AI Technical Summary
The existing method of current ring bandwidth measurement of permanent magnet synchronous motors for automotive use has problems of poor accuracy and time-consuming, and it is impossible to ensure the consistency of the dynamic and steady-state performance of the motor under all operating conditions.
Through online discrete Fourier analysis, the amplitude attenuation and phase hysteresis between torque and torque commands are estimated, and the PI parameters of the current loop PI regulator are adjusted automatically until the set threshold is met, and the online measurement of the current loop bandwidth and the adaptive adjustment of the actual bandwidth are achieved.
Accurate online measurement of the current loop bandwidth is achieved, ensuring the consistency of the dynamic and steady-state performance of the motor under all operating conditions, and improving measurement efficiency and accuracy.
Smart Images

Figure CN119861284A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of permanent magnet synchronous motor detection, and in particular to a method for measuring a current loop bandwidth of a permanent magnet synchronous motor for a vehicle. Background Art
[0002] Permanent magnet synchronous motors are used in vehicle control systems. The duty cycle obtained through current and voltage commands controls the output of the inverter to achieve target current and torque tracking. The bandwidth of the current loop PI regulator directly determines the dynamic performance of the torque response. Too low current loop bandwidth will cause untimely torque response, thus affecting the vehicle's acceleration performance, anti-shake performance, etc.
[0003] The existing bandwidth measurement methods mainly include the step response method and the sinusoidal response method. The step response method obtains the current loop bandwidth through the step response waveform of the current. This method is greatly affected by the dq axis current coupling and it is difficult to obtain true results. The sinusoidal response method measures the current loop bandwidth by giving sinusoidal current instructions of different frequencies and observing the amplitude attenuation and phase lag of the feedback current. It generally uses manual measurement methods, which is time-consuming and has poor accuracy.
[0004] In the existing PI parameter setting principle of the current loop of a permanent magnet synchronous motor for automobiles, the system is equivalent to a typical type I system according to the engineering design method, in which an idealized equivalent process exists, resulting in the actual bandwidth of the system being lower than the set bandwidth under different currents and speeds. Some existing methods identify the motor parameters online or offline, hoping to meet the current loop bandwidth requirements by ensuring the accuracy of the motor parameters. This strategy is still based on parameter setting based on a theoretical model, without considering the differences between the theoretical model and the actual control system. Therefore, it is impossible to guarantee the consistency of the dynamic and steady-state performance of the motor under all operating conditions. Summary of the invention
[0005] The purpose of the present invention is to provide a method for measuring the current loop bandwidth of a permanent magnet synchronous motor for a vehicle in order to overcome the defect of poor consistency in the above-mentioned prior art.
[0006] The purpose of the present invention can be achieved by the following technical solutions:
[0007] A method for measuring the current loop bandwidth of a permanent magnet synchronous motor for a vehicle comprises the following steps:
[0008] S1: Get motor parameters, set the desired current loop bandwidth, and calculate ideal current loop parameters;
[0009] S2: Determine the test conditions, set the torque command frequency and torque command, and calculate the torque data when the current is stable through the ideal current loop parameters, motor parameters and torque command;
[0010] S3: Through online discrete Fourier analysis, the amplitude attenuation and phase lag corresponding to the torque data when the current is stable are obtained;
[0011] S4: According to the amplitude attenuation and phase lag, adjust the torque command frequency, repeat S2-S3 until the amplitude attenuation and phase lag meet the set threshold, and obtain the actual bandwidth range of the current loop at this time;
[0012] S5: If the actual bandwidth range of the current loop at this time meets the requirement, then the actual bandwidth range of the current loop at this time is output; otherwise, the desired current loop bandwidth is increased, and S1-S4 are repeated until the actual bandwidth range of the current loop at this time meets the requirement.
[0013] Furthermore, the motor parameters include d-axis stator inductance, q-axis stator inductance, stator resistance and switching frequency of the inverter.
[0014] Furthermore, the calculation expression for calculating the ideal current loop parameters is:
[0015] K pd =2*π*L d *f PWM *B
[0016] K pq =2*π*L q *f PWM *B
[0017] K id =K iq =2*π*R s *f PWM *B
[0018] Where, L d is the d-axis stator inductance, L q is the q-axis stator inductance, f PWM is the switching frequency, B is the desired current loop bandwidth, K pd and K id are the proportional coefficient and integral coefficient of the d-axis current, K pq and K iq are the proportional coefficient and integral coefficient of the q-axis current respectively.
[0019] Furthermore, the expression of the torque command is:
[0020] T cmd =T amp *sin(2πft)+T offset
[0021] Where, T offset Select 10% peak torque, rated torque and 90% peak torque respectively, f is the torque command frequency, Tamp Select 10% rated torque.
[0022] Furthermore, in step S3, multiple sampling points are selected, and the number of the sampling points is:
[0023]
[0024] Where N is the number of sampling points, is the rounding down sign, and f is the torque command frequency.
[0025] Further, in step S3, a first array and a second array are established, the number of items in the first array and the second array is the same as the number of sampling points, the first array stores the estimated torque data of each sampling point, the second array stores the torque command of each sampling point, the first fundamental wave amplitude and the first phase of the first array are calculated, the second fundamental wave amplitude and the second phase of the second array are calculated, the amplitude attenuation is the difference between the first fundamental wave amplitude and the second fundamental wave amplitude, and the phase lag is the difference between the first phase and the second phase.
[0026] Furthermore, the process of the online discrete Fourier analysis is: calculating the real data and imaginary data of each sampling point, and the calculation expression is:
[0027]
[0028] Where Re(k) is the real data, Im(k) is the imaginary data, C(k) is the kth item in the array, and the value of k is 1 to N.
[0029] Furthermore, the calculation expression of the fundamental wave amplitude is:
[0030]
[0031] Where A is the fundamental amplitude, is the phase, N is the number of sampling points, Re_Sum is the sum of the real data of each sampling point in the same array, and Im_Sum is the sum of the imaginary data of each sampling point in the same array.
[0032] According to a second aspect of the present invention, a device for measuring the current loop bandwidth of a permanent magnet synchronous motor for a vehicle comprises a memory, a processor, and a program stored in the memory. When the processor executes the program, it implements a method for measuring the current loop bandwidth of a permanent magnet synchronous motor for a vehicle as described above.
[0033] A third aspect of the present invention is a storage medium having a program stored thereon, wherein when the program is executed, a method for measuring a current loop bandwidth of a permanent magnet synchronous motor for a vehicle as described above is implemented.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] 1) The present invention estimates the amplitude attenuation and phase lag between the torque and the torque request through online Fourier analysis, realizes online measurement of the current loop bandwidth, and makes the actual bandwidth equal to the expected bandwidth by self-adjusting the PI parameters of the current loop PI regulator, thereby ensuring the consistency of the dynamic and steady-state performance of the motor control system under all working conditions.
[0036] 2) The present invention uses recursive discrete Fourier transform to perform online spectrum analysis, which has small calculation amount, is easy to implement, and improves measurement efficiency.
[0037] 3) The present invention can be used for measuring the actual bandwidth of the current loop and also for setting the parameters of the current loop PI regulator. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a schematic diagram of the process of the present invention.
[0039] Figure 2 This is a flowchart of the recursive discrete Fourier algorithm. DETAILED DESCRIPTION
[0040] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0041] Example 1
[0042] The present invention provides a method for measuring the current loop bandwidth of a permanent magnet synchronous motor for a vehicle, comprising the following steps:
[0043] S1: Get motor parameters, set the desired current loop bandwidth, and calculate ideal current loop parameters;
[0044] S2: Determine the test conditions, set the torque command frequency and torque command, and calculate the torque data when the current is stable through the ideal current loop parameters, motor parameters and torque command;
[0045] S3: Through online discrete Fourier analysis, the amplitude attenuation and phase lag corresponding to the torque data when the current is stable are obtained;
[0046] S4: According to the amplitude attenuation and phase lag, adjust the torque command frequency, repeat S2-S3 until the amplitude attenuation and phase lag meet the set threshold, and obtain the actual bandwidth range of the current loop at this time;
[0047] S5: If the actual bandwidth range of the current loop at this time meets the requirement, then the actual bandwidth range of the current loop at this time is output; otherwise, the desired current loop bandwidth is increased, and S1-S4 are repeated until the actual bandwidth range of the current loop at this time meets the requirement.
[0048] The specific steps of the present invention are as follows:
[0049] S1: Get motor parameters, set the desired current loop bandwidth, and calculate ideal current loop parameters;
[0050] Obtain the basic parameters of the motor, including the d-axis stator inductance Ld, the q-axis stator inductance Lq, the stator resistance Rs and the switching frequency f of the inverter PWM ;
[0051] Set the desired current loop bandwidth B according to the requirements, which is generally the switching frequency f PWM 1 / 25 to 1 / 10 of
[0052] Calculate the ideal current loop parameters, the calculation expression is:
[0053] K pd =2*π*L d *f PWM *B
[0054] K pq =2*π*L q *f PWM *B
[0055] K id =K iq =2*π*R s *f PWM *B
[0056] Where, L d is the d-axis stator inductance, L q is the q-axis stator inductance, f PWM is the switching frequency, B is the desired current loop bandwidth, K pd and K id are the proportional coefficient and integral coefficient of the d-axis current, K pq and K iq are the proportional coefficient and integral coefficient of the q-axis current respectively.
[0057] S2: Determine the test conditions, set the torque command frequency and torque command, and calculate the torque data when the current is stable through the ideal current loop parameters, motor parameters and torque command;
[0058] Determine the test conditions, covering all operating voltages and speeds: use the default current loop bandwidth to calculate the initial current loop PI parameters; set the operating voltage and speed through the motor test bench; set the amplitude and DC bias of the sinusoidal torque command, and increase the frequency from 25 Hz to 400 Hz in steps of 25 Hz, with each frequency lasting 500 ms.
[0059] According to the target formula below, the torque command is given, and the id and iq commands of MTPA or weak magnetic field are obtained by looking up the table, and the low-pass filter of the current command is cancelled; the torque command expression is:
[0060] T cmd =T amp *sin(2πft)+T offset
[0061] Where, T offset Select 10% peak torque, rated torque and 90% peak torque respectively, f is the torque command frequency, T amp Select 10% rated torque.
[0062] The torque is estimated by the feedback of d-axis current id, q-axis current iq and motor parameters;
[0063] S3: Through online discrete Fourier analysis, the amplitude attenuation and phase lag corresponding to the torque data when the current is stable are obtained;
[0064] The estimated torque data when the current is stable and the corresponding torque command data are stored in an array. 400ms after the torque command is issued, the motor current enters a steady state. The estimated torque data with a sampling point number of N is stored in array C1, and the corresponding torque command input is stored in array C2. In order to prevent spectrum leakage, the sampling point number N is proportional to the switching frequency f. PWM The relationship between the torque command frequency f should satisfy:
[0065]
[0066] In the formula, The floor symbol.
[0067] Perform spectrum analysis on the data in arrays C1 and C2 to obtain the fundamental amplitude A1 and phase of C1 respectively. Fundamental amplitude A2 and phase of C2 Then the amplitude attenuation and phase lag between the estimated torque and the torque command can be calculated as follows:
[0068] Amplitude attenuation ΔA = A2 - A1;
[0069] Phase lag
[0070] Online discrete Fourier analysis methods such as Figure 2 As shown, the specific steps are:
[0071] Calculate the real data Re(k) and imaginary data Im(k) of each sampling point. The calculation expression is:
[0072]
[0073] Where C(k) is the kth item in the array, and the value of k ranges from 1 to N.
[0074] Calculate the real data and imaginary data of arrays C1 and C2 respectively, and accumulate the real data and imaginary data of all sampling points from 1 to N in each array to obtain the real data sum Re_Sum and the imaginary data sum Im_Sum;
[0075] Calculate the fundamental amplitude A and phase of the input data based on the accumulated real and imaginary sums The calculation expression is:
[0076]
[0077] S4: According to the amplitude attenuation and phase lag, adjust the torque command frequency, repeat S2-S3 until the amplitude attenuation and phase lag meet the set threshold, and obtain the actual bandwidth range of the current loop at this time;
[0078] The threshold is when the amplitude attenuation ΔA is greater than 0.707, or the phase lag If the angle is greater than 45 degrees, the minimum torque command frequency f(n) that meets the threshold and the torque command frequency f(n-1) of the previous cycle are obtained, where n is the number of current cycles and the actual bandwidth range of the current loop is from f(n-1) to f(n).
[0079] S5: If the actual bandwidth range of the current loop at this time meets the requirement, then the actual bandwidth range of the current loop at this time is output; otherwise, the desired current loop bandwidth is increased, and S1-S4 are repeated until the actual bandwidth range of the current loop at this time meets the requirement.
[0080] Determine whether the actual bandwidth is within the expected bandwidth range. If not, increase the expected bandwidth B, recalculate the PI parameter, and repeat steps S1-S4 until the actual bandwidth is within the expected bandwidth range.
[0081] Example 2
[0082] On the basis of Example 1, the program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0083] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0084] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A method for measuring the current loop bandwidth of a permanent magnet synchronous motor for a vehicle, characterized in that: The following steps are involved: S1: Get motor parameters, set the desired current loop bandwidth, and calculate ideal current loop parameters; S2: Determine the test conditions, set the torque command frequency and torque command, and calculate the torque data when the current is stable through the ideal current loop parameters, motor parameters and torque command; S3: Through online discrete Fourier analysis, the amplitude attenuation and phase lag corresponding to the torque data when the current is stable are obtained; S4: According to the amplitude attenuation and phase lag, adjust the torque command frequency, repeat S2-S3 until the amplitude attenuation and phase lag meet the set threshold, and obtain the actual bandwidth range of the current loop at this time; S5: If the actual bandwidth range of the current loop at this time meets the requirement, then the actual bandwidth range of the current loop at this time is output; otherwise, the desired current loop bandwidth is increased, and S1-S4 are repeated until the actual bandwidth range of the current loop at this time meets the requirement.
2. The method for measuring the current loop bandwidth of a permanent magnet synchronous motor for a vehicle according to claim 1, characterized in that: The motor parameters include d-axis stator inductance, q-axis stator inductance, stator resistance and switching frequency of the inverter.
3. The method for measuring the current loop bandwidth of a permanent magnet synchronous motor for a vehicle according to claim 1, characterized in that: The calculation expression for calculating the ideal current loop parameters is: K pd =2*π*L d *f PWM *B K pq =2*π*L q *f PWM *B K id =K iq =2*π*R s *f PWM *B Where, L d is the d-axis stator inductance, L q is the q-axis stator inductance, f PWM is the switching frequency, B is the desired current loop bandwidth, K pd and K id are the proportional coefficient and integral coefficient of the d-axis current, K pq and K iq are the proportional coefficient and integral coefficient of the q-axis current respectively.
4. The method for measuring the current loop bandwidth of a permanent magnet synchronous motor for a vehicle according to claim 1, characterized in that: The expression of the torque command is: T cmd =T amp *sin(2πft)+T offset Where, T offset Select 10% peak torque, rated torque and 90% peak torque respectively, f is the torque command frequency, T amp Select 10% rated torque.
5. The method for measuring the current loop bandwidth of a permanent magnet synchronous motor for a vehicle according to claim 1, characterized in that: In step S3, multiple sampling points are selected, and the number of the sampling points is: Where N is the number of sampling points, is the rounding down sign, and f is the torque command frequency.
6. A method for measuring the current loop bandwidth of a permanent magnet synchronous motor for a vehicle according to claim 5, characterized in that: In step S3, a first array and a second array are established, the number of items in the first array and the second array is the same as the number of sampling points, the first array stores the estimated torque data of each sampling point, the second array stores the torque command of each sampling point, the first fundamental wave amplitude and the first phase of the first array are calculated, the second fundamental wave amplitude and the second phase of the second array are calculated, the amplitude attenuation is the difference between the first fundamental wave amplitude and the second fundamental wave amplitude, and the phase lag is the difference between the first phase and the second phase.
7. A method for measuring the current loop bandwidth of a permanent magnet synchronous motor for a vehicle according to claim 6, characterized in that: The process of online discrete Fourier analysis is: calculating the real data and imaginary data of each sampling point, and the calculation expression is: Where Re(k) is the real data, Im(k) is the imaginary data, C(k) is the kth item in the array, and the value of k is 1 to N.
8. The method for measuring the current loop bandwidth of a permanent magnet synchronous motor for a vehicle according to claim 7, characterized in that: The calculation expression of the fundamental amplitude is: Where A is the fundamental amplitude, is the phase, N is the number of sampling points, Re_Sum is the sum of the real data of each sampling point in the same array, and Im_Sum is the sum of the imaginary data of each sampling point in the same array.
9. A device for measuring the current loop bandwidth of a permanent magnet synchronous motor for a vehicle, comprising a memory, a processor, and a program stored in the memory, characterized in that: When the processor executes the program, it implements a method for measuring the current loop bandwidth of a permanent magnet synchronous motor for a vehicle as described in any one of claims 1-8.
10. A storage medium having a program stored thereon, characterized in that: When the program is executed, a method for measuring the current loop bandwidth of a permanent magnet synchronous motor for a vehicle as described in any one of claims 1-8 is implemented.