CN-122026764-A - Motor three-phase current sampling method, system, equipment and storage medium
Abstract
The invention discloses a motor three-phase current sampling method systems, devices, and storage media. The method comprises the steps of calculating a feasible sampling window and generating a sampling plan containing N sampling moments according to PWM modulation information and sampling link time sequence constraint, executing multipoint sampling, converting sampling values into a synchronous rotation coordinate system, carrying out weighted fusion to obtain dq axis current estimated values, constructing a time sequence feature set based on historical data, outputting current predicted values and prediction confidence coefficients of the next period by using a deep learning prediction network, and carrying out dynamic weighted fusion on the current estimated values and the predicted values according to the prediction confidence coefficients to obtain final current. According to the invention, dead zones and interference are avoided through self-adaptive window planning, no-lag noise suppression and high-precision delay compensation are realized by utilizing dq domain fusion and deep learning prediction, and the dynamic performance and robustness of a motor control system are remarkably improved.
Inventors
- LI WUHUA
- Guo Xiangding
- SHENG JING
- DOU YU
- Feng Xinchun
- LIU YING
Assignees
- 杭州市拱墅区全息智能技术研究院
Dates
- Publication Date
- 20260512
- Application Date
- 20260413
Claims (10)
- 1. A three-phase current sampling method of a motor is characterized by comprising the steps of calculating a feasible sampling window of a current control period according to PWM modulation information and sampling link time sequence constraint, generating a sampling plan containing N sampling moments in the feasible sampling window based on a preset principle, executing multipoint sampling according to the sampling plan, converting acquired sampling values into a synchronous rotation coordinate system to obtain N groups of dq-axis sample sequences, carrying out weighted fusion on the N groups of dq-axis sample sequences under the synchronous rotation coordinate system to obtain dq-axis current estimated values of the current period, constructing a time sequence feature set based on the dq-axis current estimated values of a historical period, mapping the time sequence feature set into a multidimensional input tensor, inputting the multidimensional input tensor into a pre-trained deep learning prediction network, outputting current predicted values and prediction confidence of the next period, and carrying out dynamic weighted fusion on the dq-axis current estimated values and the current predicted values according to the prediction confidence to obtain final current for current loop control.
- 2. The method of claim 1, wherein the calculating the viable sampling window of the current control period includes obtaining a sector number, an effective vector duration, a carrier phase, a duty cycle, and a dead zone parameter of the current control period, determining a minimum window width meeting a current stability establishment condition by combining an op-amp establishment time, an ADC sample hold time, a trigger delay, and a safety margin of a sampling link, removing a dead zone influence region and a switching transient interference region in a PWM carrier period to obtain the viable sampling window, and the preset rule includes at least one of that all sampling moments fall in the viable sampling window, an electrical angle error sensitivity corresponding to the sampling moments is minimum, or a window quality index corresponding to the sampling moments is maximum.
- 3. The method of claim 1, wherein the weighted fusion of the N sets of dq-axis sample sequences in the synchronous rotation coordinate system comprises calculating a corresponding fusion weight for each set of samples in the N sets of dq-axis sample sequences, wherein the generation of the fusion weights is based on sample variance, inter-sample differential energy, a sampling window quality index, or a suppression target for a specific switching frequency and a side band thereof, and wherein the N sets of dq-axis sample sequences are weighted and summed according to the fusion weights, and wherein the sum of all fusion weights is 1.
- 4. The method of claim 1, wherein the mapping the time sequence feature set into a multi-dimensional input tensor comprises selecting dq-axis current estimated values, first-order differences, second-order differences and noise level estimated values of historical W periods, sector numbers, duty ratios, bus voltages and electrical angular speeds of the current periods as feature dimensions, arranging each dimension feature on a time axis in a feature-time gray scale matrix mapping mode to construct a two-dimensional matrix, or dividing the features into a current base group, a difference group, a quality group and a modulation group in a grouping multi-channel image mapping mode to respectively construct a matrix and superposing the matrices to form the multi-channel tensor, and performing normalization processing on the current class features in the multi-dimensional input tensor to perform single-heat coding or numerical coding embedding on the sector numbers.
- 5. The method of claim 1, wherein the deep learning prediction network comprises a feature extraction sub-network for extracting local morphological features in the multi-dimensional input tensor, a time sequence aggregation sub-network for capturing long-term dependencies of current changes, and a multi-head output layer for outputting at least the current prediction value and the prediction confidence, wherein the prediction confidence characterizes uncertainty estimation of the network to a current prediction result, and is used for determining weight coefficients in fusion.
- 6. The method according to claim 1, further comprising a rollback protection step of calculating a linear prediction value based on a conventional second order difference in parallel, and when a prediction confidence of the deep learning prediction network output is lower than a preset threshold, or a prediction residual exceeds a safety range, or a network output abnormality flag, replacing the current prediction value with the linear prediction value, or increasing a weight of the linear prediction value in fusion.
- 7. The method according to claim 1, further comprising an online self-calibration step of the sampling link, wherein when the zero vector duration is detected to meet a preset length or the dq axis reference current is close to zero and is in a steady state, current samples are collected to estimate bias errors of the sampling link, gain errors of the sampling link are estimated by injecting reference signals or comparing the reference signals with a theoretical model under a preset steady state condition, and subsequent sampling values are compensated online by using the estimated bias errors and gain errors.
- 8. A three-phase current sampling system of a motor is characterized by comprising a sampling plan generation module (101) for calculating a feasible sampling window according to PWM (pulse width modulation) modulation information and sampling link time sequence constraint and generating a sampling plan comprising N sampling moments, a multi-point sampling and conversion module (102) for executing multi-point sampling and converting the sampling values into a synchronous rotation coordinate system to obtain an N group dq axis sample sequence, a weighted fusion module (103) for carrying out weighted fusion on the sample sequence under the synchronous rotation coordinate system to obtain a dq axis current estimated value, a characteristic construction and imaging module (104) for constructing a time sequence characteristic set and mapping the time sequence characteristic set into a multidimensional input tensor, a deep learning prediction module (105) for outputting a current predicted value and a predicted confidence coefficient of the next period through a deep learning prediction network, and a fusion control module (106) for fusing according to the predicted confidence coefficient to generate a final current.
- 9. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any of claims 1 to 7.
- 10. An electronic device comprising a memory (202) and a processor (201), the memory (202) having stored thereon a computer program, characterized in that the processor (201) implements the method according to any of claims 1 to 7 when executing the computer program.
Description
Motor three-phase current sampling method, system, equipment and storage medium Technical Field The invention relates to the technical field of new energy automobiles and motor control, in particular to a motor three-phase current sampling method, a system, equipment and a storage medium. Background In a high performance vector control system of a Permanent Magnet Synchronous Motor (PMSM), accuracy and instantaneity of current sampling are key factors for determining control performance. The current feedback signal is the basic data for realizing coordinate transformation (such as Clark transformation and Park transformation) and current loop closed-loop adjustment (PI adjustment), and directly influences the accuracy of torque control and the accuracy of magnetic field orientation. However, in a practical digital control system, the current sample value obtained by the controller is often not the actual current value in the motor winding at the present moment, but includes a certain degree of hysteresis. This hysteresis results mainly from the following aspects: 1. hardware delay, namely, inherent response time exists in a current sensor (such as a Hall sensor or a shunt) and a signal conditioning circuit of the current sensor; 2. filtering delay, namely, in order to filter high-frequency noise introduced by PWM switching action, a low-pass filter is usually added into a hardware circuit or a software algorithm, and phase lag is inevitably introduced while noise is filtered; 3. Processing delays-analog-to-digital conversion (ADC) processes and MCUs need to consume clock cycles to read and calculate data. The delay factor may cause the sampled current vector to deviate in amplitude and phase from the actual current vector. Such phase lag can significantly reduce the phase margin of the current loop, resulting in slow system dynamic response and even increased torque ripple and control system instability, especially at high motor speeds or high carrier frequencies. The existing solution is usually to use pure software prediction or hardware lead compensation, but it is often difficult to combine the accuracy of filtering effect and phase compensation. Therefore, how to design a current sampling scheme which can accurately filter the switching frequency harmonic wave, effectively compensate the sampling delay and has proper calculation cost is a technical problem to be solved in the current motor control field. Disclosure of Invention The invention aims to provide a three-phase current sampling method of a motor, which comprises the steps of calculating a feasible sampling window of a current control period according to PWM modulation information and sampling link time sequence constraint, generating a sampling plan containing N sampling moments in the feasible sampling window based on a preset principle, executing multipoint sampling according to the sampling plan, converting acquired sampling values into a synchronous rotation coordinate system to obtain N groups of dq-axis sample sequences, carrying out weighted fusion on the N groups of dq-axis sample sequences under the synchronous rotation coordinate system to obtain dq-axis current estimated values of the current period, constructing a time sequence feature set based on the dq-axis current estimated values of a historical period, mapping the time sequence feature set into a multidimensional input tensor, inputting the multidimensional input tensor into a pre-trained deep learning prediction network, outputting current predicted values and prediction confidence of the next period, and carrying out dynamic weighted fusion on the dq-axis current estimated values and the current predicted values according to the prediction confidence level to obtain final current for current loop control. The method comprises the steps of obtaining sector numbers, effective vector duration time, carrier phases, duty ratios and dead zone parameters of a current control period, determining minimum window widths meeting current stability establishment conditions by combining operation and amplification establishment time, ADC sampling and holding time, trigger delay and safety margin of a sampling link, eliminating dead zone influence areas and switching transient interference areas in PWM carrier periods to obtain the feasible sampling window, and obtaining at least one of the following preset principles, wherein all sampling moments fall in the feasible sampling window, electric angle error sensitivity corresponding to the sampling moments is minimum, or window quality indexes corresponding to the sampling moments are maximum. Preferably, the N groups of dq-axis sample sequences are subjected to weighted fusion under a synchronous rotation coordinate system, wherein the method comprises the steps of calculating corresponding fusion weights for each group of samples in the N groups of dq-axis sample sequences, wherein the generation of the fusion weights comprises sample var