Permanent magnet motor current prediction control method and device
By using a feedforward neural network in a permanent magnet synchronous motor to predict and compensate for voltage errors caused by the inverter dead zone effect in real time, the problem of inaccurate current prediction is solved, and higher control accuracy and system stability are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-03-13
AI Technical Summary
In traditional current prediction control schemes for permanent magnet synchronous motors, voltage errors are not modeled due to non-ideal characteristics such as inverter dead-zone effect, resulting in inaccurate current prediction and affecting control performance and motor torque pulsation.
By employing a feedforward neural network combined with historical current time-series characteristics, voltage errors caused by non-ideal factors such as dead zones are predicted in real time, and feedforward compensation is incorporated into the current prediction model to improve the accuracy of current prediction.
By accurately compensating for voltage errors, suppressing steady-state current errors and low-speed torque pulsation, the accuracy of motor current control and the smoothness of drive system operation are improved.
Smart Images

Figure CN121664057A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent control, and more specifically, to a method and apparatus for predictive control of current in a permanent magnet motor. Background Technology
[0002] Permanent magnet synchronous motors (PMSMs) have gained widespread application in high-performance servo drives and new energy vehicles due to their high efficiency and high power density. To achieve precise control of motor torque, improve system dynamic response performance, and reduce torque ripple, constructing a high-performance current predictive control scheme is crucial. The core of this scheme lies in using an accurate system model to predict the future current response of the motor, thereby selecting the optimal control strategy online. Therefore, the performance of predictive control is highly dependent on the accuracy of the predictive model; any deviation between the model and the physical reality will directly affect the final control effect.
[0003] However, traditional current predictive control schemes often employ idealized motor system models, neglecting the non-ideal characteristics of hardware components such as the inverter. For example, to prevent shoot-through short circuits in the inverter's power switching devices, a dead time must be introduced into the control signal. This dead time effect leads to a non-linear voltage error, related to the phase current direction, between the actual inverter output voltage and the controller's command voltage. For the predictive model, this voltage error is an unmodeled disturbance that causes the predicted future current value to systematically deviate from the true value. Based on the biased prediction, the controller makes suboptimal control decisions, resulting in steady-state current tracking errors, current waveform distortion near zero crossings, and torque pulsation in the motor at low speeds, thus limiting the overall performance improvement of the drive system.
[0004] Therefore, an optimized predictive control scheme for permanent magnet motor current is desired. Summary of the Invention
[0005] To address the aforementioned technical problems, this application is proposed. Embodiments of this application provide a method and apparatus for predictive control of permanent magnet motor current. This method utilizes the powerful nonlinear fitting capability of a feedforward neural network, combined with learning historical current timing characteristics, to predict voltage errors caused by non-ideal factors such as dead zones in real time. Furthermore, this prediction error is feedforward-compensated into the prediction model of future current to improve the accuracy of current prediction, resulting in a more precise cost function evaluation. This allows for the selection of the optimal voltage vector, effectively suppressing steady-state current errors and low-speed torque ripple. In this way, precise control of the motor current is achieved, comprehensively improving the control accuracy and operational stability of the drive system.
[0006] According to one aspect of this application, a method for predictive control of current in a permanent magnet motor is provided, comprising: Obtain the time series of the actual current along the dq axis, including time k. The time series of the actual dq-axis current, including time k, is input into a pre-trained feedforward neural network to obtain the predicted dq-axis voltage error at time k. Based on the dq-axis voltage error predicted at time k, future current prediction based on a compensation model is performed on each candidate voltage vector to obtain the dq-axis current predicted at time k+1. Based on the dq-axis current predicted at time k+1 and the dq-axis reference current at time k+1, a cost function is evaluated for each candidate voltage vector to obtain the cost value corresponding to each candidate voltage vector. The optimal vector is selected and the PWM signal is generated based on the cost of each candidate voltage vector to obtain the optimal three-phase switching signal.
[0007] According to another aspect of this application, a permanent magnet motor current prediction and control device is provided, comprising: The data acquisition module is used to acquire the time series of the actual current along the dq axis, including time k. The voltage error prediction module is used to input the time series of the actual dq axis current, including time k, into a pre-trained feedforward neural network to obtain the predicted dq axis voltage error at time k. The future current prediction module is used to perform future current prediction based on the dq-axis voltage error predicted at time k, and to obtain the dq-axis current predicted at time k+1. The cost function evaluation module is used to evaluate the cost function of each candidate voltage vector based on the dq-axis current predicted at time k+1 and the dq-axis reference current at time k+1 to obtain the cost value corresponding to each candidate voltage vector. The three-phase switching signal generation module is used to select the optimal vector and generate the PWM signal based on the cost corresponding to each candidate voltage vector in order to obtain the optimal three-phase switching signal.
[0008] Compared with existing technologies, the permanent magnet motor current prediction control method and device provided in this application utilizes the powerful nonlinear fitting capability of feedforward neural networks and combines it with the learning of historical current time-series characteristics to predict voltage errors caused by non-ideal factors such as dead zones in real time. Furthermore, this prediction error is feedforward-compensated into the prediction model of future current to improve the accuracy of current prediction, making the cost function evaluation more precise. This allows for the selection of the optimal voltage vector, effectively suppressing steady-state current errors and low-speed torque ripple. In this way, precise control of the motor current is achieved, comprehensively improving the control accuracy and operational stability of the drive system. Attached Figure Description
[0009] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0010] Figure 1 This is a flowchart of a permanent magnet motor current prediction control method according to an embodiment of this application; Figure 2 This is a schematic diagram of the data flow of the permanent magnet motor current prediction control method according to an embodiment of this application; Figure 3 This is a block diagram of a permanent magnet motor current prediction control device according to an embodiment of this application. Detailed Implementation
[0011] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.
[0012] As indicated in this application and claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" are not specifically singular and may include plural forms. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of explicitly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.
[0013] While this application makes various references to certain modules of the systems according to embodiments of this application, any number of different modules can be used and run on user terminals and / or servers. The modules described are merely illustrative, and different aspects of the systems and methods may use different modules.
[0014] Flowcharts are used in this application to illustrate the operations performed by the system according to embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, various steps can be processed in reverse order or simultaneously as needed. Furthermore, other operations can be added to these processes, or one or more steps can be removed from them.
[0015] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.
[0016] To address the prediction inaccuracies caused by neglecting non-ideal effects such as inverter dead zones in traditional predictive control models, an innovative compensatory control framework combining a physical model and artificial intelligence is constructed. This concept leverages the powerful nonlinear fitting capabilities of feedforward neural networks to predict voltage errors caused by hardware non-ideal characteristics online by learning from historical current data, and then feeds these errors forward to compensate for them in the current prediction model.
[0017] Specifically, the technical solution of this application proposes a method for predictive control of permanent magnet motor current. Figure 1 This is a flowchart of a permanent magnet motor current prediction control method according to an embodiment of this application. Figure 2 This is a system architecture diagram of a permanent magnet motor current prediction control method according to an embodiment of this application. Figure 1 and Figure 2 As shown, the permanent magnet motor current prediction control method according to an embodiment of this application includes the following steps: S1, obtaining the time series of the actual dq-axis current including time k; S2, inputting the time series of the actual dq-axis current including time k into a pre-trained feedforward neural network to obtain the predicted dq-axis voltage error at time k; S3, based on the predicted dq-axis voltage error at time k, performing future current prediction based on a compensation model on each candidate voltage vector to obtain the predicted dq-axis current at time k+1; S4, based on the predicted dq-axis current at time k+1 and the dq-axis reference current at time k+1, performing a cost function evaluation on each candidate voltage vector to obtain the cost value corresponding to each candidate voltage vector; S5, performing optimal vector selection and PWM signal generation based on the cost value corresponding to each candidate voltage vector to obtain the optimal three-phase switching signal.
[0018] Specifically, in S1, the time series of the actual current along the dq axis, including time k, is obtained. It should be understood that the time series of the actual current along the dq axis precisely carries this crucial historical information; the dynamic trajectory of the current implies the characteristics of nonlinear disturbances in the system. Therefore, obtaining a continuous current time series including the current time k is a necessary prerequisite for achieving accurate error prediction.
[0019] Specifically, this step involves acquiring the actual dq-axis current at the current moment through a series of acquisitions and coordinate transformations within each control cycle, and combining it with historical data to form a time series. First, the controller's built-in analog-to-digital converter (ADC) module acquires the three-phase stator currents of the motor in real time. Simultaneously, the mechanical angle of the rotor is obtained through position sensors (such as resolvers or encoders) connected to the motor shaft, and the rotor electrical angle at the current moment k is calculated based on the number of pole pairs of the motor. Next, the system performs a Clarke transformation on the acquired three-phase currents, converting them from a three-phase stationary coordinate system (abc) to a two-phase stationary coordinate system (α-β), obtaining the α-axis current and β-axis current. Specifically, this transformation process is described by the following formula:
[0020] Subsequently, the system performs a Park transformation on the obtained two-phase stationary coordinate system currents, using the real-time acquired rotor electrical angle as a rotation factor to rotate them to a dq coordinate system that rotates synchronously with the rotor magnetic field, ultimately obtaining the actual d-axis current and q-axis current at time k. Specifically, the mathematical expression for the Park transformation is:
[0021] In this process, the actual dq-axis current refers to the two orthogonal components obtained by decomposing the motor stator current vector in a coordinate system that rotates synchronously with the permanent magnet magnetic field. The d-axis (direct axis) component is aligned with the rotor flux linkage and is used to control the magnetic flux, while the q-axis (quadrature axis) component is perpendicular to the rotor flux linkage and is used to generate electromagnetic torque. The time series refers to the current calculated at time k. The data pairs, along with the dq-axis current data from previous historical moments (k-1), (k-2), ..., (k-N+1), are arranged chronologically to form a sequence of a specific length N. This sequence, as a whole, will be input into the subsequent neural network.
[0022] Specifically, in step S2, the time series of the actual dq-axis current, including time k, is input into a pre-trained feedforward neural network to obtain the predicted dq-axis voltage error at time k. Due to factors such as inverter dead-time effect and on-state voltage drop of power devices, there is a nonlinear voltage error between the command voltage issued by the controller and the actual voltage experienced by the motor, which is closely related to the current and operating conditions. This unmodeled voltage error is the root cause of inaccurate current prediction and consequently affects control performance. Therefore, in the technical solution of this application, the powerful nonlinear function fitting and time-series pattern learning capabilities of the feedforward neural network are utilized to directly learn and predict this complex voltage error from the current time series containing historical operating state information of the motor. By accurately predicting this error, the system can compensate for it in subsequent steps, thereby correcting the prediction model and achieving accurate prediction of future current, which is crucial for improving the accuracy and robustness of the entire control system.
[0023] In practice, the first step is to process the time series of the actual current along the d and q axes, including time k, to obtain the actual current time series along the d and q axes. It should be understood that the d-axis current is primarily related to the motor's magnetic field, while the q-axis current is directly related to the output torque; the two may differ in their dynamic response and the patterns affected by nonlinear factors. By splitting the coupled d and q axis current time series into two independent univariate time series, each processing channel of the neural network can focus on learning the timing patterns of specific components, avoiding cross-interference between different components. This allows for a more accurate capture of the nonlinear mapping relationship between each component and the voltage error, forming the basis for efficient and accurate feature extraction. Specifically, this data processing step is a structured data recombination or unpacking operation. The time series of the actual current along the d and q axes, including time k, can be structurally viewed as an array of length N, where each element is a vector or tuple containing two values (d-axis current and q-axis current). The data processing involves traversing this array and separating the two components of each element, storing them separately in two new, independent arrays. The obtained d-axis actual current time series contains only the d-axis current values at all times, and the q-axis actual current time series contains only the q-axis current values at all times. These two series will be used as direct inputs to the two parallel branches of the neural network encoder. Next, the actual current time series along the d-axis and q-axis are input into the encoder of a pre-trained feedforward neural network to obtain the d-axis and q-axis actual current time series latent pattern feature encoding vectors, respectively. It should be understood that while the original current time series contains rich dynamic information, its complex form and direct use for prediction would face problems such as the curse of dimensionality and information redundancy. Therefore, a specially designed encoder is used to extract low-dimensional, abstract, and information-dense features from the original, high-dimensional current time series data that can effectively characterize the system's nonlinear disturbances (especially dead-zone effects). This yields the d-axis and q-axis actual current time series latent pattern feature encoding vectors, which condense the patterns and trends most relevant to voltage error. These vectors provide high-quality, easily processed input for the subsequent decoder to perform accurate voltage error prediction, serving as a crucial bridge connecting the original data and the final prediction results.
[0024] Specifically, this step involves a hierarchical, progressive deep feature extraction process, processing two independent current time series along the d-axis and q-axis in parallel. The entire encoding process can be decomposed into two main sub-steps. First, local temporal pattern features are extracted from the actual current time series along the d-axis and q-axis to obtain the sequence distributions of the local temporal pattern feature encoding vectors for the d-axis and q-axis. In this stage, the encoder employs a one-dimensional convolutional network (1D-CNN) structure, scanning the input current time series through a sliding window. Each data point within the window is considered a local segment. Through convolutional kernel operations, specific change patterns of the current within a short timescale can be captured, such as the current's rise / fall rate, waveform morphology near zero crossings, and minute harmonic oscillations. The output of each convolutional operation is a local temporal pattern feature encoding vector. As the window slides across the entire sequence, the sequence distributions of the local temporal pattern feature encoding vectors for the d-axis and q-axis are ultimately generated. Furthermore, a current-mode feature time-series nonlinear transfer mechanism is applied to the sequence distribution of the d-axis actual current local time-series pattern feature encoding vector and the q-axis actual current local time-series pattern feature encoding vector to obtain the d-axis actual current time-series implicit pattern feature encoding vector and the q-axis actual current time-series implicit pattern feature encoding vector. It should be understood that in high-performance current predictive control of permanent magnet synchronous motors, inverter nonlinear disturbances (such as dead-zone effects) lead to complex time-varying errors between the actual voltage and the command voltage. Traditional ideal models struggle to accurately describe this dynamic process, resulting in current prediction deviations, which in turn cause tracking errors and torque ripple. Therefore, to improve the model's accuracy in identifying the dynamics of the real system, this application's technical solution introduces a current-mode feature time-series nonlinear transfer mechanism to deeply process the local time-series pattern feature encoding sequences of the d-axis and q-axis actual currents, extracting deeper implicit features from the local time-series patterns of the d-axis and q-axis currents that better reflect the potential voltage error generation mechanism. Specifically, this process recalibrates the importance of features at each time step in the current sequence, strengthens the feature representation corresponding to abrupt events (such as dead-zone effect abrupt changes caused by current direction changes), and weakens the redundancy or interference that may be introduced during the steady-state phase. As a result, the extracted time-series latent features can more sensitively capture nonlinear time-series patterns in the current dynamics that are highly correlated with unmodeled disturbances. This enables the downstream neural network to learn more accurately the complex mapping relationship from current time-series dynamics to voltage errors, thereby improving the compensation accuracy for inverter nonlinear disturbances, ultimately improving current tracking performance, reducing torque ripple, and enhancing the system's control robustness across the entire operating range.
[0025] Specifically, taking the sequence distribution of the local time-series mode feature encoding vector of the actual d-axis current as an example for the nonlinear transfer of current mode features, the specific process includes: First, the local dynamic stability of the d-axis actual current is evaluated for each d-axis actual current local time-series pattern feature encoding vector in the sequence distribution of the d-axis actual current local time-series entropy change to obtain the sequence distribution of the d-axis actual current local time-series entropy change. It should be understood that in the predictive control of permanent magnet synchronous motor current, voltage errors caused by factors such as inverter nonlinearity result in complex time-series characteristics of the current dynamics, especially near the current zero-crossing point and during transient processes, which are often accompanied by disturbances and abrupt changes that are difficult to model. These disturbances are not uniformly distributed along the time axis, but rather concentrated at certain critical moments reflecting system dynamic instability or state transitions. Specifically, although the local time-series characteristics of the d-axis current contain system dynamic information, the contribution of features at different times to error prediction varies significantly. Directly using features at all times without differentiation will cause those high-information moments that indicate changes in current direction, the prominence of dead-zone effects, or transient processes to be submerged in a large amount of stable, conventional data, thereby weakening the model's ability to capture the key causes of voltage errors. Traditional methods struggle to automatically identify and quantify the importance of these key events to the prediction model. Therefore, in the technical solution of this application, the local time-series characteristics of the actual current are evaluated at the dynamic stability level to transform the d-axis current local time-series pattern characteristic sequence into an index distribution that reflects the prominence of dynamic information at each moment. Evaluating the dynamic stability of the characteristics at each moment essentially measures the degree to which the current behavior deviates from the expected stationary pattern, thereby identifying event points in system operation that are highly uncertain, unpredictable, or signify state transitions. These event points often correspond to the actual occurrence times of nonlinear disturbances caused by dead-zone effects or other unmodeled dynamics, and are crucial for accurately predicting voltage errors.
[0026] Specifically, in the technical solution of this application, the specific process of evaluating the local dynamic stability of the actual current on the d-axis for each d-axis actual current local timing mode feature encoding vector includes: Here, taking the d-axis actual current local time-series pattern feature encoding vector at time step t as an example, firstly, the information entropy of the d-axis actual current local time-series pattern feature encoding vector at time step t is calculated. This process is expressed by the formula:
[0027] in, Let represent the feature value of the i-th dimension in the feature encoding vector of the local timing pattern of the actual current along the d-axis at time step t. This represents the logarithmic operation with base 2. The information entropy represents the local timing pattern feature encoding vector of the actual d-axis current at time step t. Furthermore, based on the information entropy of the local time-series pattern feature encoding vector of the actual d-axis current at time step t, the local time-series entropy change of the actual d-axis current at time step t is calculated. This process is expressed by the formula:
[0028] in, To smooth hyperparameters, This represents the difference between the current entropy and the entropy of the previous time step. This represents the local temporal entropy change of the actual current along the d-axis at time step t.
[0029] Next, based on the sequence distribution of the local temporal entropy change of the actual d-axis current, the sequence distribution of the local temporal adjustment coefficient of the actual d-axis current is determined. It should be understood that voltage errors caused by nonlinear factors such as the inverter dead-zone effect will trigger significant entropy changes in the d-axis current at specific moments. These abrupt changes often correspond to key dynamic events such as current zero-crossing, torque pulsation, or system transient processes. Although the previous step has identified the sequence distribution of these entropy changes, simply remaining at the identification level without converting them into operable control signals will not substantially improve the targeting and effectiveness of subsequent feature encoding. Therefore, to map the abrupt change information into specific feature modulation criteria, thereby achieving differentiated enhancement or suppression of the original feature sequence, the technical solution of this application transforms the distribution of the local temporal entropy change of the d-axis current into a set of weighted coefficient sequences that can be used to dynamically adjust feature expression. These adjustment coefficients are essentially importance weights adaptively generated according to the degree of abrupt change at each moment, and their magnitude directly reflects the contribution of the current feature at that moment to the final voltage error prediction. This process transforms abstract entropy changes into operable modulation signals, enabling downstream processing to nonlinearly reshape feature sequences based on the real-time importance of current dynamics.
[0030] Specifically, in the technical solution of this application, the sequence distribution of the local timing adjustment coefficient of the actual d-axis current is determined by the following formula:
[0031] in, For hyperparameters, Indicates exponentiation. This is the local timing adjustment weighting coefficient for the actual d-axis current.
[0032] Furthermore, based on the sequence distribution of the local timing adjustment coefficients of the actual d-axis current, the sequence distribution of the feature encoding vector of the local timing mode of the actual d-axis current is dynamically enhanced to obtain the sequence distribution of the modulated local timing mode feature encoding vector of the actual d-axis current. It should be understood that the adjustment coefficient sequence only provides a quantitative indicator of the importance of features at each moment, while the original feature encoding vector sequence still maintains a uniform information density distribution. This distribution does not match the actual importance of the current dynamics; the moment features that mark key changes in the system are not highlighted, while a large number of conventional features in the stable operating phase may introduce noise interference. Therefore, in the technical solution of this application, based on the importance of each moment in the d-axis current dynamics, the local timing mode feature encoding vector is subjected to differentiated enhancement or suppression processing. Specifically, by dynamically weighting the feature vectors using the adjustment coefficients as weights, the key moment features corresponding to current abrupt changes, high uncertainty, or containing rich error information are strengthened, while the features of the stable operating phase with lower information content are appropriately weakened, resulting in the sequence distribution of the modulated local timing mode feature encoding vector of the actual d-axis current. This allows subsequent LSTMs to focus more on learning the temporal dependencies between key events, ultimately improving the prediction accuracy of voltage errors and the overall control performance of the system.
[0033] Specifically, in the technical solution of this application, the sequence distribution of the feature encoding vector of the local timing mode of the actual d-axis current is dynamically enhanced using the following formula:
[0034] in, This represents the modulated local timing pattern feature encoding vector of the actual d-axis current at time step t. Let represent the modulated d-axis actual current local timing mode feature encoding vectors at the 1st, 2nd, and nth time steps in the sequence distribution of the modulated d-axis actual current local timing mode feature encoding vector, respectively. This represents the sequence distribution of the local timing mode feature encoding vector of the actual d-axis current after modulation.
[0035] Subsequently, the sequence distribution of the modulated d-axis actual current local time-series pattern feature encoding vector is subjected to forward LSTM-based sequence encoding to obtain the d-axis actual current time-series latent pattern feature encoding vector. It should be understood that although the modulated feature sequence emphasizes information at important moments, it has not yet formed a global and compact representation of the current dynamic evolution law. Pre-processing mainly focuses on the distinction of importance in the time dimension, while complex time-series features such as long-range dependencies, periodic change patterns, and the correlation between transient processes and steady-state operation in current dynamics require in-depth mining through specialized sequence modeling capabilities. These time-series patterns often span multiple time steps and have nonlinear evolution laws. Therefore, in the technical solution of this application, a forward LSTM sequence encoder is used to perform deep time-series modeling of the modulated d-axis current local time-series features to extract latent pattern features that can comprehensively reflect the current dynamic evolution law. LSTM, with its gating mechanism and memory units, can adaptively learn long-range dependencies in sequences, capturing periodic, trend, and abrupt patterns in current dynamics. This results in a highly condensed encoding vector—the d-axis actual current time-series latent pattern feature encoding vector. This vector not only preserves key dynamic information in the modulated sequence but, more importantly, reveals the intrinsic laws and long-term dependencies of current dynamic evolution through deep time-series modeling by LSTM. This enables the feedforward neural network to more accurately establish the mapping relationship from current dynamics to voltage error based on this encoding vector rich in temporal semantics, ultimately improving the compensation accuracy for nonlinear disturbances such as dead-zone effects and enhancing the system's current tracking performance and control robustness.
[0036] Specifically, in the technical solution of this application, the sequence distribution of the modulated d-axis actual current local timing mode feature encoding vector is sequence encoded using the following formula:
[0037] in, express Sequence encoding, This represents the implicit pattern feature encoding vector of the actual current timing along the d-axis.
[0038] Furthermore, the d-axis actual current timing implicit mode feature encoding vector and the q-axis actual current timing implicit mode feature encoding vector are input into the decoder of a pre-trained feedforward neural network to obtain the predicted dq-axis voltage error at time k. That is, the pre-trained feedforward neural network decoder accurately maps the high-dimensional, nonlinear patterns learned by the encoder in the abstract feature space back to quantities with clear meaning in the physical world, namely, the predicted dq-axis voltage error at time k. The predicted dq-axis voltage error at time k is a two-dimensional vector, whose two components represent the predicted voltage deviations on the d-axis and q-axis caused by non-ideal factors such as the inverter dead zone during the current control cycle k.
[0039] Specifically, this step follows a standard feedforward computation process, with a core decoder module consisting of one or more fully connected neural network layers. First, to enable the decoder to comprehensively consider the dynamic characteristics and mutual influence of the d-axis and q-axis current components, the input d-axis actual current time-series hidden pattern feature encoding vector and the q-axis actual current time-series hidden pattern feature encoding vector need to be merged. This can be achieved by concatenating these two vectors to form a single input vector with a larger dimension and complete time-series feature information. Next, this combined feature vector is used as the input to the decoder, and the final voltage error is calculated through a series of nonlinear transformations. A typical decoder structure consists of at least one hidden layer and one output layer. The combined feature vector is first fed into the hidden layer, where it is first combined with the layer's weight matrix. Perform matrix multiplication, then add a bias vector. Finally, the hidden layer's output is obtained by processing it through a non-linear activation function. This process can be represented by the following formula:
[0040] in, This represents the activation function. Represents the weight matrix. This represents the bias term; if the decoder contains multiple hidden layers, the output of the previous hidden layer is used as the input of the next hidden layer, and the above calculation process is repeated; finally, the output of the last hidden layer is fed into the output layer. The output layer is a linear fully connected layer with two neurons, corresponding to the predicted values of the d-axis voltage error and the q-axis voltage error, respectively. The calculation process of this layer involves combining the output of the last hidden layer with the weight matrix of the output layer. Multiply and add the bias vector of the output layer. Since the voltage error is a continuous real value, the output layer typically does not use a nonlinear activation function; ultimately, the output layer outputs the predicted dq-axis voltage error vector at time k. This process can be represented by the following formula:
[0041] in, Represents the weight matrix. Indicates the bias term. This represents the predicted dq-axis voltage error vector at time k.
[0042] Specifically, in step S3, based on the predicted dq-axis voltage error at time k, future current predictions are performed on each candidate voltage vector using a compensation model to obtain the predicted dq-axis current at time k+1. Traditional predictive control directly uses an idealized motor model for deduction, and its prediction results will produce systematic deviations due to neglecting non-ideal effects such as dead zones. In the technical solution of this application, the voltage error predicted by the neural network in the previous step is used as a feedforward compensation term to actively correct the prediction model, making it closer to physical reality. Based on this compensated and more accurate model, future current prediction can significantly improve the accuracy of the predicted values, providing a reliable decision-making basis for subsequent optimal voltage vector selection.
[0043] In practice, firstly, based on the DC bus voltage at time k, the motor rotor electrical angle at time k, the motor electrical angular velocity at time k, and the control cycle, candidate voltage vectors are mapped along the dq axis for all possible switching states of the inverter to obtain a candidate voltage vector set in the dq coordinate system at time k. Specifically, a standard three-phase two-level inverter has eight switching states ((Sa,Sb,Sc) from (0,0,0) to (1,1,1)), corresponding to six non-zero voltage vectors and two zero voltage vectors. These basic voltage vectors are first defined in the stationary abc coordinate system, and their magnitudes are related to the DC bus voltage. Subsequently, through Clarke and Park transformations, using the real-time motor rotor electrical angle, these eight basic voltage vectors are transformed into the dq coordinate system, which rotates synchronously with the rotor, thus forming a candidate set containing eight dq-axis voltage vectors. Furthermore, based on the predicted dq-axis voltage error at time k, the actual dq-axis current at time k, and the motor's electric angular velocity at time k, multi-vector compensated current prediction is performed on each candidate voltage vector in the candidate voltage vector set at time k in the dq coordinate system to obtain the predicted dq-axis current at time k+1. This prediction process is executed cyclically, performing an independent prediction calculation for each candidate voltage vector in the set. Specifically, the process includes: first, extracting a first candidate voltage vector from the candidate voltage vector set at time k in the dq coordinate system; then, inputting the predicted dq-axis voltage error at time k, the actual dq-axis current at time k, the motor's electric angular velocity at time k, and the first candidate voltage vector into the discrete-time state equation of the permanent magnet motor containing compensation terms to obtain the predicted dq-axis current of the first candidate voltage vector at time k+1. This discrete-time state equation containing compensation terms is obtained by discretization using the forward Euler method based on the fundamental voltage equation of the permanent magnet synchronous motor in the dq coordinate system. In this process, the effective voltage applied to the motor is modeled as the difference between the candidate voltage vector and the predicted voltage error. Specifically, the process can be expressed by the following formula:
[0044] in, and This represents the predicted current at time k+1. and This represents the actual current at time k. and This represents the dq-axis component of the j-th candidate voltage vector. and This represents the predicted dq-axis voltage error at time k. Indicates resistance. , Indicates permanent magnet flux linkage. Indicates the control period. This represents the electric angular velocity of the motor at time k; by repeating this calculation for all candidate voltage vectors j=0,1,...,7, eight different sets of predicted dq-axis currents at time k+1 will be obtained.
[0045] Specifically, in step S4, based on the predicted dq-axis current at time k+1 and the dq-axis reference current at time k+1, a cost function evaluation is performed on each candidate voltage vector to obtain the cost value corresponding to each candidate voltage vector. It should be understood that under the model predictive control framework, the system needs to select the optimal solution from multiple possible control actions, and cost function evaluation is the basis for achieving this selection. By quantifying the deviation between the predicted current and the reference current as a cost value, it can be ensured that the finally selected voltage vector can most effectively track the reference current, thereby improving the motor control accuracy and dynamic performance. That is, in the technical solution of this application, a cost function evaluation is performed on each candidate voltage vector to measure the gap between each possible control decision (i.e., applying a certain candidate voltage vector) and the final control objective.
[0046] Specifically, this step is executed as a parallel, cyclical computation process. The system calculates the cost function for each of the eight sets of predicted dq-axis currents at time k+1 generated in the previous step. Specifically, for each candidate voltage vector j (j=0,1,...,7), its corresponding cost is calculated... The calculation process is as follows:
[0047] in, This is the weighting factor for the d-axis current. and This represents the dq-axis reference current at time k+1. and This indicates that when the j-th candidate voltage vector is applied, and This represents the dq-axis current value predicted by the system at time k+1 in the previous stage when the i-th candidate voltage vector is applied. This represents the cost corresponding to the i-th candidate voltage vector.
[0048] Specifically, in step S5, optimal vector selection and PWM signal generation are performed based on the cost values corresponding to each candidate voltage vector to obtain the optimal three-phase switching signal. That is, after calculating the cost values of all candidate voltage vectors, the system needs to select the voltage vector that best meets the control objective through objective criteria and convert it into an executable PWM signal for the inverter. This step directly determines the actual input voltage of the motor and plays a decisive role in achieving accurate current tracking, improving system efficiency, and reducing torque ripple. By performing optimal vector selection and PWM signal generation based on the cost values corresponding to each candidate voltage vector, the previous series of complex online simulation and evaluation results can be successfully transformed into specific, executable control commands for the inverter hardware.
[0049] In practice, firstly, the candidate voltage vector with the lowest cost value is selected as the optimal voltage vector for the next control cycle. During this process, the system iterates through the set of eight cost values calculated in the previous step to find the minimum value. Specifically, this can be implemented using a comparison algorithm: initializing a minimum cost value variable and an optimal vector index variable, then comparing each cost value in the set one by one; if a smaller value is found, both variables are updated. Its mathematical expression is:
[0050] in, This represents the index of the optimal candidate voltage vector in the candidate set; once this index is determined, the corresponding candidate voltage vector is determined as the optimal voltage vector to be applied in the next control cycle (from time k to time k+1); Furthermore, the optimal voltage vector is mapped to the switching signals of the inverter's three-phase bridge arms as the optimal three-phase switching signals. The optimal three-phase switching signals refer to the set of three-phase logic signals consisting of high and low levels (1 or 0) that can drive the inverter to generate the optimal voltage vector; these are the final physical signals output by the controller to the hardware drive circuit. Since this application employs finite set model predictive control, the optimal voltage vector itself directly corresponds to a specific switching state of the inverter. Each switching state of the inverter (e.g., (Sa,Sb,Sc)=(1,0,0)) has a one-to-one correspondence with a specific candidate voltage vector (e.g., vector u_1). Therefore, this mapping process is essentially a table lookup or a simple index conversion operation. The system indexes the found optimal vector... The system directly looks up the predefined mapping table to obtain the corresponding three-phase switching states. This set of switching states, consisting of 0s and 1s, is the final generated three-phase switching signal that will remain constant in the next PWM cycle. These signals will be sent to the inverter's drive circuit to directly control the on and off of the power switches of the upper and lower bridge arms of the three-phase bridge, thereby synthesizing the desired optimal voltage vector on the motor stator windings.
[0051] Taking the scheme of this application as an example, assuming that the eight cost values obtained after cost function evaluation are as follows:
[0052] In the optimal vector selection phase, the system determines the following through comparison: The minimum value among all cost values; therefore, the system determines the index of the optimal vector as... This means that the candidate voltage vector associated with index 2 is the optimal choice for the current cycle; therefore, during the PWM signal generation stage, the system queries the mapping table between the switch state and the voltage vector index. Assume that this table defines the switch state corresponding to index 2 as (Sa,Sb,Sc)=(1,1,0). Then, the system will ultimately generate three switch signals: Sa signal is high (1), Sb signal is high (1), and Sc signal is low (0). This set of signals will be sent to the inverter and remain unchanged throughout the subsequent control cycle, thereby driving the motor to operate according to the optimal strategy.
[0053] In summary, the permanent magnet motor current prediction control method according to the embodiments of this application is explained. It utilizes the powerful nonlinear fitting capability of a feedforward neural network, combined with learning historical current timing characteristics, to predict voltage errors caused by non-ideal factors such as dead zones in real time. Furthermore, this prediction error is feedforward-compensated into the prediction model of future current to improve the accuracy of current prediction, making the cost function evaluation more precise. This allows for the selection of the optimal voltage vector, effectively suppressing steady-state current errors and low-speed torque ripple. In this way, precise control of the motor current is achieved, comprehensively improving the control accuracy and operational stability of the drive system.
[0054] Furthermore, a permanent magnet motor current prediction and control device is also provided.
[0055] Figure 3 This is a block diagram of a permanent magnet motor current prediction control device according to an embodiment of this application. Figure 3 As shown, the permanent magnet motor current prediction control device 300 according to an embodiment of this application includes: a data acquisition module 310, used to acquire the time series of the actual dq-axis current including time k; a voltage error prediction module 320, used to input the time series of the actual dq-axis current including time k into a pre-trained feedforward neural network to obtain the predicted dq-axis voltage error at time k; a future current prediction module 330, used to perform future current prediction based on a compensation model on each candidate voltage vector based on the predicted dq-axis voltage error at time k to obtain the predicted dq-axis current at time k+1; a cost function evaluation module 340, used to perform cost function evaluation on each candidate voltage vector based on the predicted dq-axis current at time k+1 and the dq-axis reference current at time k+1 to obtain the cost value corresponding to each candidate voltage vector; and a three-phase switching signal generation module 350, used to perform optimal vector selection and PWM signal generation based on the cost value corresponding to each candidate voltage vector to obtain the optimal three-phase switching signal.
[0056] As described above, the permanent magnet motor current prediction control device 300 according to the embodiments of this application can be implemented in various wireless terminals, such as servers with permanent magnet motor current prediction control algorithms. In one possible implementation, the permanent magnet motor current prediction control device 300 according to the embodiments of this application can be integrated into the wireless terminal as a software module and / or a hardware module. For example, the permanent magnet motor current prediction control device 300 can be a software module in the operating system of the wireless terminal, or it can be an application developed for the wireless terminal; of course, the permanent magnet motor current prediction control device 300 can also be one of many hardware modules of the wireless terminal.
[0057] Alternatively, in another example, the permanent magnet motor current prediction control device 300 and the wireless terminal can also be separate devices, and the permanent magnet motor current prediction control device 300 can be connected to the wireless terminal via wired and / or wireless networks, and transmit interactive information in accordance with an agreed data format.
[0058] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for predictive control of permanent magnet motor current, characterized in that, include: Obtain the time series of the actual current along the dq axis, including time k. The time series of the actual dq-axis current, including time k, is input into a pre-trained feedforward neural network to obtain the predicted dq-axis voltage error at time k. Based on the dq-axis voltage error predicted at time k, future current prediction based on a compensation model is performed on each candidate voltage vector to obtain the dq-axis current predicted at time k+1. Based on the dq-axis current predicted at time k+1 and the dq-axis reference current at time k+1, a cost function is evaluated for each candidate voltage vector to obtain the cost value corresponding to each candidate voltage vector. The optimal vector is selected and the PWM signal is generated based on the cost of each candidate voltage vector to obtain the optimal three-phase switching signal.
2. The permanent magnet motor current prediction control method according to claim 1, characterized in that, The time series of the actual dq-axis current, including time k, is input into a pre-trained feedforward neural network to obtain the predicted dq-axis voltage error at time k, including: The time series of actual current along the d and q axes, including time k, are processed to obtain the actual current time series along the d and q axes. The actual current time series of the d-axis and the actual current time series of the q-axis are input into the encoder of the pre-trained feedforward neural network to obtain the hidden pattern feature encoding vector of the actual current time series of the d-axis and the hidden pattern feature encoding vector of the actual current time series of the q-axis. The d-axis actual current time-series hidden pattern feature encoding vector and the q-axis actual current time-series hidden pattern feature encoding vector are input into the decoder of a pre-trained feedforward neural network to obtain the dq-axis voltage error predicted at time k.
3. The permanent magnet motor current prediction control method according to claim 2, characterized in that, The actual current time series along the d-axis and q-axis are input into the encoder of a pre-trained feedforward neural network to obtain the latent pattern feature encoding vectors of the actual current time series along the d-axis and q-axis, including: Local time-series current pattern features are extracted from the actual current time series of the d-axis and the actual current time series of the q-axis to obtain the sequence distribution of the local time-series current pattern feature encoding vector of the actual current in the d-axis and the sequence distribution of the local time-series current pattern feature encoding vector of the actual current in the q-axis. The sequence distributions of the local time-series feature encoding vectors of the actual current along the d-axis and the q-axis are subjected to current mode feature time-series nonlinear propagation to obtain the hidden mode feature encoding vectors of the actual current along the d-axis and the q-axis.
4. The permanent magnet motor current prediction control method according to claim 1, characterized in that, Based on the dq-axis voltage error predicted at time k, future current predictions based on a compensation model are performed on each candidate voltage vector to obtain the predicted dq-axis current at time k+1, including: Based on the DC bus voltage at time k, the motor rotor electrical angle at time k, the motor electrical angular velocity at time k, and the control cycle, the candidate voltage vector dq axis is mapped to the set of all possible switching states of the inverter to obtain the candidate voltage vector set in the dq coordinate system at time k. Based on the predicted dq-axis voltage error at time k, the actual dq-axis current at time k, and the electric angular velocity of the motor at time k, multi-vector compensating current prediction is performed on each candidate voltage vector in the candidate voltage vector set in the dq coordinate system at time k to obtain the predicted dq-axis current at time k+1.
5. The permanent magnet motor current prediction control method according to claim 4, characterized in that, Based on the predicted dq-axis voltage error at time k, the actual dq-axis current at time k, and the motor's electric angular velocity at time k, multi-vector compensated current prediction is performed on each candidate voltage vector in the candidate voltage vector set in the dq coordinate system at time k to obtain the predicted dq-axis current at time k+1, including: Extract the first candidate voltage vector from the set of candidate voltage vectors in the dq coordinate system at time k; The predicted dq-axis voltage error at time k, the actual dq-axis current at time k, the motor's electric angular velocity at time k, and the first candidate voltage vector are input into the discrete-time state equation of the permanent magnet motor containing compensation terms to obtain the predicted dq-axis current of the first candidate voltage vector at time k+1.
6. The permanent magnet motor current prediction control method according to claim 1, characterized in that, Based on the predicted dq-axis current at time k+1 and the dq-axis reference current at time k+1, a cost function evaluation is performed on each candidate voltage vector to obtain the cost value corresponding to each candidate voltage vector. This includes: evaluating the cost function of each candidate voltage vector using the following formula: , in, This is the weighting factor for the d-axis current.
7. The permanent magnet motor current prediction control method according to claim 1, characterized in that, Based on the cost value corresponding to each candidate voltage vector, optimal vector selection and PWM signal generation are performed to obtain the optimal three-phase switching signal, including: Select the candidate voltage vector with the lowest cost as the optimal voltage vector for the next control cycle. The optimal voltage vector is mapped to the switching signals of the three-phase bridge arms of the inverter as the optimal three-phase switching signals.
8. The permanent magnet motor current prediction control method according to claim 3, characterized in that, The sequence distributions of the local time-series feature encoding vectors of the actual current along the d-axis and the q-axis are subjected to current mode feature time-series nonlinear propagation to obtain the latent mode feature encoding vectors of the actual current along the d-axis and the q-axis, including: The local dynamic stability of the d-axis actual current is evaluated for each d-axis actual current local time-series pattern feature encoding vector in the sequence distribution of the d-axis actual current local time-series pattern feature encoding vector to obtain the sequence distribution of the d-axis actual current local time-series entropy change. Based on the sequence distribution of the local time-series entropy change of the actual d-axis current, the sequence distribution of the local time-series adjustment coefficient of the actual d-axis current is determined. Based on the sequence distribution of the local timing adjustment coefficient of the actual d-axis current, the sequence distribution of the feature encoding vector of the local timing mode of the actual d-axis current is dynamically enhanced to obtain the sequence distribution of the feature encoding vector of the local timing mode of the actual d-axis current after modulation. The sequence distribution of the modulated d-axis actual current local timing pattern feature encoding vector is subjected to forward LSTM-based sequence encoding to obtain the d-axis actual current timing hidden pattern feature encoding vector.
9. A permanent magnet motor current prediction and control device, characterized in that, include: The data acquisition module is used to acquire the time series of the actual current along the dq axis, including time k. The voltage error prediction module is used to input the time series of the actual dq axis current, including time k, into a pre-trained feedforward neural network to obtain the predicted dq axis voltage error at time k. The future current prediction module is used to perform future current prediction based on the dq-axis voltage error predicted at time k, and to obtain the dq-axis current predicted at time k+1. The cost function evaluation module is used to evaluate the cost function of each candidate voltage vector based on the dq-axis current predicted at time k+1 and the dq-axis reference current at time k+1 to obtain the cost value corresponding to each candidate voltage vector. The three-phase switching signal generation module is used to select the optimal vector and generate the PWM signal based on the cost corresponding to each candidate voltage vector in order to obtain the optimal three-phase switching signal.
Citation Information
Cited By
Flux linkage tracking full-speed-domain high-precision predictive current control method of permanent magnet synchronous motor
CN121966386A