Multi-state loading cycle control method
By employing a multi-state loading cyclic control method, utilizing a state transition prediction model, S-shaped acceleration curves, and adaptive dynamic matrix control algorithm, the problem of low transient control accuracy during state switching in power system test benches was solved, achieving high-precision, low-overshoot state switching and optimizing the test cycle and system response.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANCAL ENERGY-SAVING TECHNOLOGY CO LTD
- Filing Date
- 2026-01-23
- Publication Date
- 2026-05-01
AI Technical Summary
In power system test benches and material fatigue tests, the transient control accuracy of state switching during multi-state cyclic loading is low, and there are problems such as aggravated fatigue damage to mechanical components, extended test cycles, and interference from multivariable coupled systems.
A multi-state loading cyclic control method is adopted, which predicts the optimal transition trajectory through a state transition prediction model. It combines S-curve switching instructions, fuzzy PID controller and adaptive dynamic matrix control algorithm, uses extended Kalman filter to compensate for sensor bias and actuator dead zone, and allocates computing tasks through heterogeneous computing architecture to achieve real-time control.
It improves the transient control accuracy during state switching, reduces mechanical shock and overshoot, optimizes the test cycle, and enhances the system's response speed and control quality.
Smart Images

Figure CN121956491A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of test bench technology, and more specifically, relates to a loop control method for multi-state loading. Background Technology
[0002] In industrial scenarios such as power system test benches and material fatigue testing, it is necessary to apply cyclic loading spectra containing multiple different speeds, torques, and temperatures to the test specimen. Traditional methods use preset PID parameters combined with step commands to achieve state switching. In existing technologies, due to the significant differences in the dynamic characteristics of the system at different operating points, fixed control parameters are difficult to balance the response speed and overshoot suppression of each state. Using step commands during state switching generates impact loads, leading to accelerated fatigue damage to mechanical components. On the other hand, using an overly gentle ramp transition prolongs the test cycle. Meanwhile, in multivariable coupled systems, the speed and torque channels interfere with each other, and nonlinear factors such as sensor drift and actuator dead zones further deteriorate the control quality during the switching transient. In other words, existing technologies suffer from low transient control accuracy during state switching in multi-state cyclic loading processes. Summary of the Invention
[0003] In view of this, the present invention provides a cyclic control method for multi-state loading, which can solve the technical problem of low transient control accuracy during state switching in the prior art during multi-state cyclic loading.
[0004] This invention is implemented as follows: A multi-state loading loop control method reads a multi-state recipe table and initializes a real-time control kernel, establishing a state index sequence and a loop counter. Based on the state index sequence, the current state parameters and target state parameters are determined. These parameters are then input into a state transition prediction model, outputting the optimal transition trajectory, feedforward compensation, and fuzzy gain adjustment coefficient. An S-shaped acceleration curve switching instruction is generated based on the optimal transition trajectory. The difference between the target value and the actual value is calculated to obtain the deviation. This deviation is input into an adaptive dynamic matrix control algorithm to obtain a multivariable coordinated control quantity. The deviation is then input into a fuzzy PID controller and combined with the fuzzy gain adjustment coefficient to obtain the real-time control increment. Finally, the feedforward compensation, multivariable... The variable coordination control quantity and the real-time control increment are superimposed and output to the actuator; the step response model matrix parameters are periodically updated by recursive least squares method using the historical sequence of control input and the historical sequence of system output; the sensor acquisition data is input into the extended Kalman filter to obtain the sensor deviation estimate and the actuator dead zone estimate, and the sensor acquisition data is corrected; the heterogeneous computing architecture allocates computing tasks to the real-time control kernel and the accelerated processing unit; the control cycle delay time and sensor acquisition data are monitored in real time; when the control cycle delay time exceeds the delay threshold or the sensor acquisition data exceeds the data amplitude limit, a fault signal is generated and the status is recorded to non-volatile memory; when the operation resumes, the non-volatile memory is read to determine whether to continue execution or initialize and start over.
[0005] The multi-state recipe table is a data structure containing parameters for different test states. Each row corresponds to a test state and includes the speed setpoint, torque setpoint, running time, switching delay time, and controller gain parameters.
[0006] In this multi-state recipe table, each state parameter is stored in a shared memory area, the state index sequence records the execution order and loop count of each state in the multi-state recipe table, and the loop counter is used to count the execution time of the current state and the total number of loops.
[0007] The current state parameter is a row of state parameters in the multi-state recipe table currently pointed to by the state index sequence, which includes the current speed value, current torque value, and current temperature value. The target state parameter is a row of state parameters in the multi-state recipe table to be pointed to by the next step of the state index sequence, which includes the target speed value and target torque value.
[0008] The current speed, torque, and temperature values from the current state parameters, as well as the target speed and torque values from the target state parameters, are input into the state transition prediction model.
[0009] The state transition prediction model receives five normalized parameters in its input layer: current speed, current torque, current temperature, target speed, and target torque. Features are extracted through three convolutional modules with residual connections. Each convolutional module contains 64 convolutional kernels. The model outputs the optimal transition trajectory, feedforward compensation, and fuzzy gain adjustment coefficient in the 50-step prediction time domain through two fully connected layers.
[0010] Among them, the state transition prediction model supports an inter-layer jump mechanism. The jump strategy is determined based on the absolute value of the speed difference between the current speed value and the target speed value, and the absolute value of the torque difference between the current torque value and the target torque value. When the absolute value of the speed difference is less than 10% of the rated speed and the absolute value of the torque difference is less than 15% of the rated torque, the second and third convolutional modules are skipped and the connection to the second fully connected layer is made directly.
[0011] The inter-layer jump mechanism establishes conditional branch paths between convolutional modules in the state transition prediction model, dynamically selects the computation path based on the complexity index of the input features, and releases the GPU memory space occupied by the intermediate activation tensors of the skipped layers after the jump, retaining only the gradient information required for backpropagation.
[0012] The training dataset for the state transition prediction model includes 1,000 sets of actual switching process data under different combinations of initial and target states. Each set of data includes the speed time series, torque time series, and temperature time series for 3 seconds before and 5 seconds after the switch. The speed time series, torque time series, and temperature time series are resampled to 100Hz and normalized.
[0013] The deviations include the speed deviation calculated from the difference between the target speed value and the actual speed value collected by the sensor, and the torque deviation calculated from the difference between the target torque value and the actual torque value collected by the sensor.
[0014] The S-shaped acceleration curve is a three-segment trajectory planning curve. The first segment is the acceleration phase with linearly increasing acceleration, the second segment is the uniform acceleration phase with constant acceleration, and the third segment is the deceleration phase with linearly decreasing acceleration. The maximum acceleration value is determined based on the actuator response bandwidth and the inertia of the test piece.
[0015] The fuzzy PID controller fuzzifies the speed deviation and torque deviation into seven linguistic variables, establishes a fuzzy rule base of 49 rules, and infers the adjustment amounts of proportional gain, integral gain and derivative gain based on the magnitude and rate of change of the deviation. The accurate gain parameters are obtained by defuzzifying the fuzzy parameters using the centroid method.
[0016] Among them, the adaptive dynamic matrix control algorithm predicts the future multi-step output trajectory based on the step response model. It optimizes the control increment sequence to make the predicted output approximate the desired trajectory. It introduces a forgetting factor recursive update mechanism and corrects the step response coefficient every 10 control cycles based on the deviation between the actual output and the model predicted output.
[0017] Among them, the recursive least squares method is an online parameter identification algorithm that uses newly collected input and output data to recursively update the model parameter estimates. A forgetting factor of 0.98 is introduced to make the influence of the recursive least squares method on the old data decay exponentially. The control input history sequence and the system output history sequence are constructed into a regression equation to calculate the least squares estimate of the model coefficients.
[0018] Among them, the extended Kalman filter is a nonlinear state estimation algorithm. It takes sensor bias and actuator dead zone as extended state variables, inputs the actual speed value, actual torque value and actual temperature value collected by the sensor into the extended Kalman filter, establishes a state space model by linearizing the nonlinear system equation, and uses the residual of the measured value and the model prediction value to recursively update the state estimate and covariance matrix.
[0019] The heterogeneous computing architecture fixes the real-time control increment calculation task of the fuzzy PID controller and the multivariable coordinated control quantity calculation task of the adaptive dynamic matrix control algorithm in the high-priority thread of the real-time control kernel, and allocates the inference task of the state transition prediction model and the matrix operation task of the recursive least squares method to the acceleration processing unit.
[0020] This invention predicts the optimal transition trajectory and outputs feedforward compensation using a state transition prediction model. It combines this with an S-curve acceleration curve switching command to eliminate step shocks, utilizes an adaptive dynamic matrix control algorithm to handle multivariable coupling relationships, employs a fuzzy PID controller to dynamically adjust control parameters based on fuzzy gain adjustment coefficients, and uses a recursive least squares method to periodically update the step response model matrix parameters to adapt to changes in operating conditions. An extended Kalman filter estimates and compensates for sensor biases and actuator dead zones in real time. The synergistic effect of these multiple control strategies ensures high tracking accuracy and low overshoot during state transition transients. The state transition prediction model establishes the optimal trajectory mapping from the current state to the target state by learning from historical switching data. Feedforward compensation offsets foreseeable disturbances, the S-curve acceleration curve limits jerk to avoid mechanical shocks, the predictive control characteristics of the adaptive dynamic matrix control algorithm pre-plan control actions to coordinate multivariable outputs, the fuzzy gain adjustment coefficients adaptively adjust the feedback strength based on the deviation magnitude, the recursive update mechanism allows model parameters to drift with system characteristics, and the extended Kalman filter eliminates the influence of measurement errors and actuator nonlinearity on the control law. In summary, this invention solves the technical problem of low control accuracy during state transition transients in multi-state cyclic loading processes mentioned in the background art. Attached Figure Description
[0021] Figure 1 This is a flowchart of the method of the present invention.
[0022] Figure 2 The diagram shows a comparison between the optimal transition trajectory and the actual tracking trajectory during the state transition process, including two sub-diagrams: (A) is a comparison diagram of the speed-related trajectory, and (B) is a comparison diagram of the torque-related trajectory.
[0023] Figure 3 This is a time series diagram of speed deviation and torque deviation during the state transition process.
[0024] Figure 4 This is a diagram illustrating the online update process of the matrix parameters for the step response model. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below.
[0026] like Figure 1 The diagram shown is a flowchart of a multi-state loading loop control method provided by the present invention. This method includes the following steps:
[0027] S01: Read the multi-state recipe table and initialize the real-time control kernel, store each state parameter in the multi-state recipe table into the shared memory area, and establish a state index sequence and a loop counter;
[0028] S02: Determine the current state parameters and target state parameters based on the state index sequence. Input the current speed, current torque, and current temperature values from the current state parameters, as well as the target speed and target torque values from the target state parameters, into the state transition prediction model. Output the optimal transition trajectory, feedforward compensation amount, and fuzzy gain adjustment coefficient.
[0029] S03: Generate an S-shaped acceleration curve switching command based on the optimal transition trajectory, calculate the speed deviation by comparing the target speed value with the actual speed value collected by the sensor, calculate the torque deviation by comparing the target torque value with the actual torque value collected by the sensor, input the speed deviation and torque deviation into the adaptive dynamic matrix control algorithm to obtain the multivariable coordinated control quantity, input the speed deviation and torque deviation into the fuzzy PID controller and combine it with the fuzzy gain adjustment coefficient to obtain the real-time control increment, and output the feedforward compensation quantity, multivariable coordinated control quantity and real-time control increment to the actuator after superimposing them;
[0030] S04: Every 10 control cycles, the control input history sequence and system output history sequence are input into the recursive least squares method to update the step response model matrix parameters. The actual speed value, actual torque value and actual temperature value collected by the sensor are input into the extended Kalman filter to obtain the sensor deviation estimate and actuator dead zone estimate. The sensor data is corrected based on the sensor deviation estimate and actuator dead zone estimate.
[0031] S05: The heterogeneous computing architecture fixes the real-time control increment calculation task of the fuzzy PID controller and the multivariable coordinated control quantity calculation task of the adaptive dynamic matrix control algorithm in the high-priority thread of the real-time control kernel, and allocates the inference task of the state transition prediction model and the matrix operation task of the recursive least squares method to the acceleration processing unit.
[0032] S06: Real-time monitoring of control cycle delay duration and sensor data acquisition. When the control cycle delay duration exceeds the delay threshold or the sensor data acquisition exceeds the data limit range, a fault signal is generated. Upon receiving the fault signal, the current state index sequence position and the running time are recorded to non-volatile memory and the system is stopped. Upon resumption of operation, the state index sequence position and the running time in the non-volatile memory are read to determine whether to continue execution or initialize and start over.
[0033] The multi-state recipe table is a data structure containing different test state parameters. Each row corresponds to a test state and includes the speed setpoint, torque setpoint, running time, switching delay time, and controller gain parameter.
[0034] The state index sequence records the execution order and loop count of each state in the multi-state recipe table.
[0035] The loop counter is used to count the time elapsed since the current state was executed and the total number of loops.
[0036] The current state parameter is a row of state parameters in the multi-state recipe table currently pointed to by the state index sequence, which includes the current speed value, the current torque value, and the current temperature value.
[0037] The target state parameter is a row of state parameters in the multi-state recipe table that the next step of the state index sequence points to, including the target speed value and the target torque value.
[0038] The state transition prediction model is structured as follows: the input layer receives five normalized parameters: current speed, current torque, current temperature, target speed, and target torque. Features are extracted through three convolutional modules with residual connections. Each convolutional module contains 64 convolutional kernels. The model outputs the optimal transition trajectory, feedforward compensation, and fuzzy gain adjustment coefficients for 50 steps in the prediction time domain through two fully connected layers. The state transition prediction model supports an inter-layer jump mechanism. The jump strategy is determined based on the absolute value of the speed difference between the current speed and the target speed, and the absolute value of the torque difference between the current torque and the target torque. When the absolute value of the speed difference is less than 10% of the rated speed and the absolute value of the torque difference is less than 15% of the rated torque, the second and third convolutional modules are skipped, and the model directly connects to the two fully connected layers. After the jump, the activation values of the skipped second and third convolutional modules are released, and only the gradient cache on the jump path is retained.
[0039] The steps for establishing the training dataset for the state transition prediction model include collecting 1000 sets of actual switching process data under different combinations of initial and target states. Each set of data includes the speed time series, torque time series, and temperature time series for 3 seconds before and 5 seconds after the switch. The speed time series, torque time series, and temperature time series are resampled to 100Hz, and the actual steady-state time point and maximum overshoot are marked. The speed time series and torque time series are normalized to the 0 to 1 interval according to their respective rated values, and the temperature time series is normalized according to the operating temperature range. The training set and validation set are divided in a 7:3 ratio.
[0040] The training steps of the state transition prediction model include using mean squared error as the trajectory prediction loss function, using overshoot weighted loss as the compensation optimization objective, setting the initial learning rate to 0.001, decaying to 0.8 times the original rate every 20 rounds, training for 150 rounds using mini-batch gradient descent with a batch size of 32, monitoring the trajectory prediction error and overshoot suppression rate on the validation set, and stopping the training early and saving the model parameters when the validation loss does not decrease for 10 consecutive rounds.
[0041] The technical principle of the inter-layer jump mechanism is to establish conditional branch paths between each convolutional module of the state transition prediction model, and dynamically select the computation path according to the complexity index of the input features. When the input is a simple case, the jump path is activated to bypass the intermediate layer and directly reach the output layer, avoiding redundant feature extraction and nonlinear transformation. The jump decision is based on the Euclidean distance between the current state vector and the target state vector in the input space. If the distance is less than a set threshold, it indicates that the state change amplitude is small and the nonlinear characteristics of the system are not obvious. At this time, complete multi-layer feature extraction will introduce unnecessary computational overhead and may cause high-frequency oscillations in the optimal transition trajectory due to overfitting. By using the inter-layer jump mechanism to directly use shallow features to complete linear interpolation prediction, the accuracy requirements are met. After the jump, the GPU memory space occupied by the intermediate activation tensor of the bypassed layer is immediately released, and only the ladder required for backpropagation is retained. The degree information is used for subsequent model updates. The selective calculation strategy significantly improves the inference speed of the state transition prediction model when dealing with frequent small state switching scenarios. At the same time, it retains the complete calculation path to cope with large-scale operating condition jumps. In multi-state cyclic experiments, when different switching amplitudes occur alternately, the inter-layer jump mechanism can adaptively adjust the computational complexity according to the real-time operating conditions. This ensures the trajectory prediction accuracy during large-scale switching and optimizes the response speed and computational resource utilization during small-scale switching. It avoids the problem of uneven distribution of computational resources when dealing with heterogeneous operating conditions in fixed-depth models. In hard real-time scenarios where the control cycle is strictly limited to 1ms, the inter-layer jump mechanism ensures that the inference time of the state transition prediction model is stable within 0.3ms by reducing the number of floating-point operations and memory access overhead, reserving sufficient time margin for subsequent control law calculation and communication tasks.
[0042] The S-shaped acceleration curve is a three-segment trajectory planning curve. The first segment is an acceleration phase with linearly increasing acceleration, the second segment is a uniform acceleration phase with constant acceleration, and the third segment is a deceleration phase with linearly decreasing acceleration. The maximum acceleration value is determined based on the actuator response bandwidth and the inertia of the test piece. Flexible switching is achieved by adjusting the time allocation of the three segments to avoid the impact caused by step commands.
[0043] The fuzzy PID controller fuzzifies the speed deviation and torque deviation into 7 linguistic variables and establishes a fuzzy rule base of 49 rules. It infers the adjustment amounts of proportional gain, integral gain and derivative gain based on the deviation magnitude and deviation change rate. It obtains accurate gain parameters by defuzzifying using the centroid method. The fuzzy rule base designs rules for state switching transients. When the deviation change rate exceeds the change rate threshold, it increases the derivative gain to suppress overshoot.
[0044] The technical principle of the adaptive dynamic matrix control algorithm is to predict the future multi-step output trajectory based on the step response model. It optimizes the control increment sequence to make the predicted output approximate the desired trajectory. The core lies in discretizing the dynamic characteristics of the controlled object into a finite-length step response coefficient matrix. This matrix describes the coupling influence of each control input on each controlled output. During prediction, historical control values and current measurements are substituted into the step response coefficient matrix for matrix-vector multiplication to obtain the predicted output sequence in the future time domain. Then, a quadratic objective function is constructed, penalizing both output tracking error and the magnitude of control increment changes. The optimal control increment sequence is obtained by solving a constrained quadratic programming problem. Only the first step of the control increment is implemented to form a rolling optimization closed loop. To adapt to multi-state switching scenarios on the test bench, a forgetting factor recursive update mechanism is introduced. Every 10 control cycles, the step response coefficient is corrected based on the deviation between the actual output and the model's predicted output. The forgetting factor in the correction formula is set to 0.98, giving higher weight to recent data and gradually diminishing the influence of historical data, thus avoiding interference from outdated model parameters with the control performance under current conditions. A rapid model reconstruction strategy is designed for state transition moments. Utilizing the similarity of model parameters between adjacent states, the step response coefficient matrix of the new state is initialized using linear interpolation. This avoids the time delay required by traditional identification methods, which require injecting excitation signals and waiting for the system response to stabilize. The adaptive dynamic matrix control algorithm essentially achieves feedforward predictive control by explicitly considering multivariable coupling relationships and future constraints. Compared to traditional feedback controllers that adjust only based on current deviations, the adaptive dynamic matrix control algorithm uses model information to plan control actions in advance. In strongly coupled multi-input multi-output systems, it can coordinate various control channels to avoid mutual interference. The recursive update mechanism allows model parameters to adaptively adjust with operating conditions, compensating for the impact of mechanical wear, temperature drift, and load characteristic changes on control accuracy. The rapid model reconstruction strategy solves the problem of transient performance degradation caused by model mismatch during state transitions. The adaptive dynamic matrix control algorithm organically combines multivariable prediction, rolling optimization, and parameter adaptation mechanisms to form an advanced control scheme suitable for multi-state cyclic loading scenarios on test benches, ensuring control accuracy while also considering algorithm real-time performance and engineering practicality.
[0045] The step response model matrix parameters are a coefficient matrix describing the dynamic relationship between the control input and the system output, and the matrix elements are the output values of the system at different sampling times under a unit step input.
[0046] The recursive least squares method is an online parameter identification algorithm that uses newly collected input and output data to recursively update the estimated values of model parameters. It does not require storing all historical data, and its computational complexity is quadratic to the number of parameters. A forgetting factor of 0.98 is introduced to make the influence of the recursive least squares method on old data exponentially decay, adapting to the parameter drift of time-varying systems. When updating the parameters of the step response model matrix, the historical sequence of control input and the historical sequence of system output are constructed into a regression equation, and the least squares estimate of the model coefficients is calculated through the recursive formula.
[0047] The control input history sequence is a record of control commands output to the actuator over the past 50 control cycles. The system output history sequence is a record of actual rotational speed and actual torque values collected by sensors over the past 50 control cycles.
[0048] The extended Kalman filter is a nonlinear state estimation algorithm that uses sensor bias and actuator dead zone as extended state variables. It establishes a state-space model by linearizing the nonlinear system equations, and recursively updates the state estimate and covariance matrix using the residuals of the measured values and model predictions. The filter gain is dynamically adjusted according to the covariance matrix of the measurement noise and process noise, thereby realizing real-time estimation and compensation for sensor zero drift and actuator nonlinear characteristics.
[0049] The sensor bias estimate is the sensor zero-point drift estimate output by the extended Kalman filter. The actuator dead zone estimate is the actuator nonlinearity interval width estimate output by the extended Kalman filter.
[0050] The heterogeneous computing architecture comprises a real-time control kernel and an accelerated processing unit. The real-time control kernel runs periodic control tasks using preemptive scheduling to ensure that the 1ms control cycle is strictly met. The accelerated processing unit is a graphics processor or a field-programmable gate array (FPGA) that executes matrix operation-intensive tasks and neural network inference tasks. The real-time control kernel and the accelerated processing unit exchange data through a shared memory region to avoid cross-bus copy latency. The task allocation strategy is determined according to the priority ceiling protocol. Critical control tasks are locked to high-priority threads in the real-time control kernel, while non-real-time analysis tasks are executed in the idle time slots of the accelerated processing unit.
[0051] The priority ceiling protocol is a resource access control mechanism to prevent priority inversion. It assigns an access priority ceiling to each shared resource. When a task acquires a resource, it is temporarily promoted to the access priority ceiling. High-priority tasks will not be blocked by low-priority tasks occupying resources. Combined with the resource reservation mechanism, memory and processor time slices are reserved for critical control tasks to ensure that tasks with strict real-time requirements are not interfered with by non-real-time tasks.
[0052] The data limiting range is the physical measurement range of the sensor. A fault signal is generated when the sensor collects data that exceeds the data limiting range for five consecutive control cycles, or when the deviation between the actuator feedback position and the command position exceeds 20% of the rated value, or when the communication bus fails to verify three times consecutively. The delay threshold is 1.2ms.
[0053] The specific implementation methods of the above steps are described in detail below.
[0054] The specific implementation of step S01 is as follows: First, a pre-set multi-state recipe table file is read from the storage device. The recipe table file is in a structured data format and contains the speed setting value, torque setting value, runtime, switching delay time, and controller gain parameters for each test state. After reading, the real-time control kernel is initialized, including allocating the address space of the shared memory region, setting memory access permissions, and initializing the thread scheduler. Each row of state parameters in the recipe table is written into the shared memory region according to a fixed data structure for subsequent high-speed access. At the same time, a state index sequence is established to record the execution order and loop count of each state. The loop counter is initialized to clear the execution time of the current state and set the initial value of the total loop count. The purpose of this step is to complete the data preparation and resource allocation before system startup, ensuring that subsequent control tasks can quickly access the recipe parameters without file reading delay. The size of the shared memory region is determined according to the number of rows in the recipe table and the number of parameters in each row. Under typical configuration, allocating 2 to 4 KB of memory space can meet the storage requirements of 100 rows of recipe tables.
[0055] The specific implementation of step S02 is as follows: Based on the current pointer position of the state index sequence, read the current state parameters from the shared memory region, extracting the current speed, current torque, and current temperature values. Simultaneously, based on the next position of the state index sequence, read the target state parameters, extracting the target speed and target torque values. Divide these five parameters by their respective rated values to normalize them, unifying the numerical range to the 0-1 interval. The normalized parameters are then used as an input vector and fed into the state transition prediction model. The model first calculates the absolute value of the difference between the current speed and the target speed as the absolute value of the speed difference, and calculates the absolute value of the difference between the current torque and the target torque as the absolute value of the torque difference. It then determines whether the absolute value of the speed difference is less than 10% of the rated speed and whether the absolute value of the torque difference is less than... If the condition of 15% of the rated torque is met, the inter-layer jump mechanism is activated, allowing the input vector to skip the second and third convolutional modules and directly enter the fully connected layer. If the condition is not met, feature extraction is performed layer by layer according to the complete three-layer convolutional module. The fully connected layer maps the extracted features to the optimal transition trajectory sequence in the 50-step prediction time domain, as well as the feedforward compensation amount and fuzzy gain adjustment coefficient. The purpose of this step is to use the neural network model to predict the optimal trajectory of the state switching process and calculate the compensation amount in advance to avoid overshoot and oscillation caused by sudden state changes. The inter-layer jump mechanism adaptively selects the calculation path according to the magnitude of the state change. When switching at a small magnitude, the reference speed threshold is 10% of the rated speed and the torque threshold is 15% of the rated torque. These thresholds are determined according to the boundary point of the nonlinear characteristics of the system.
[0056] The specific implementation of step S03 involves generating an S-shaped acceleration curve switching command based on the optimal transition trajectory sequence. The S-shaped curve consists of three segments: an acceleration phase, a uniform acceleration phase, and a deceleration phase. By setting the maximum acceleration value and time allocation parameters for each phase, the speed command value and position command value for each control cycle are calculated. Simultaneously, the actual rotational speed and actual torque values at the current moment are collected from the sensors. The difference between the target rotational speed value and the actual rotational speed value yields the rotational speed deviation, and the difference between the target torque value and the actual torque value yields the torque deviation. These rotational speed deviations and torque deviations are input into an adaptive dynamic matrix control algorithm. The algorithm first reads the current step response coefficient matrix, uses the historical control input sequence and the historical system output sequence to perform matrix-vector multiplication to predict the output trajectory for the next 50 steps, constructs a quadratic objective function, and simultaneously considers minimizing the output tracking error and the control increment smoothness constraint. The optimal control increment sequence is calculated using a quadratic programming solver, and the first step increment is taken as the multivariable coordinated control quantity. The rotational speed deviation and torque deviation are simultaneously input into a fuzzy PID controller, which then separates the rotational speed deviation and torque deviation. The process involves mapping to seven fuzzy linguistic variables, inferring proportional gain, integral gain, and derivative gain adjustments based on 49 preset fuzzy rules, and dynamically adjusting the gain parameters using the fuzzy gain adjustment coefficients output from step S02. Accurate proportional, integral, and derivative gains are obtained by defuzzifying the fuzzy parameters using the centroid method. These gain parameters are then used to perform proportional-integral-derivative operations on speed and torque deviations to obtain real-time control increments. Finally, the feedforward compensation, multivariable coordinated control, and real-time control increments output from step S02 are numerically superimposed to obtain the final control command, which is then output to the actuator to drive the motor or hydraulic valve. The purpose of this step is to achieve multi-level coordinated control. The S-curve provides flexible trajectory planning, the adaptive dynamic matrix control algorithm handles multivariable coupling problems, the fuzzy PID controller enables rapid tracking, and feedforward compensation preemptively cancels foreseeable disturbances. The three control actions work together to ensure the smoothness and accuracy of state switching. The rate of change threshold in the fuzzy rule base is set to 5% of the rated value per second; when this threshold is exceeded, the derivative gain is amplified by 1.5 times to enhance the damping effect.
[0057] The specific implementation of step S04 involves setting a control cycle counter, which increments by 1 for each control cycle execution. When the counter reaches 10, a parameter update process using the recursive least squares method is triggered. The historical sequence of control inputs and system outputs from the past 50 control cycles is retrieved. The historical sequence of control inputs includes control command values output to the actuator, and the historical sequence of system outputs includes the actual speed and torque values collected by the sensor. This historical data is organized according to a regression equation, and the estimated values of the step response model matrix parameters are gradually updated using the recursive formula of the recursive least squares method. A forgetting factor of 0.98 is introduced during the recursion process to give higher weight to recent data while exponentially decaying the influence of older data. The updated step response model matrix parameters are stored back in the shared memory area for use by the adaptive dynamic matrix control algorithm in step S03. After the parameter update is complete, the counter is reset and restarted. Simultaneously, the currently collected actual speed, torque, and temperature values from the sensor are input into the extended Kalman filter algorithm. The extended Kalman filter then processes the sensor data... The deviation and actuator dead zone are used as extended state variables to establish a state-space model. The prior values of the state estimate and the covariance matrix are calculated through the prediction step. The posterior value of the state estimate is obtained by correcting the residual between the actual measured value and the predicted value through the update step. The sensor deviation estimate and the actuator dead zone estimate are output. The actual speed value, actual torque value and actual temperature value collected by the sensor are zero-point corrected according to the sensor deviation estimate. The dead zone compensation is performed on the control command output to the actuator according to the actuator dead zone estimate. The purpose of this step is to realize online adaptive update of model parameters and real-time compensation of sensor and actuator errors. The recursive least squares method keeps the step response model accurate by continuously learning the actual dynamic characteristics of the system. The extended Kalman filter identifies and compensates for sensor zero drift and actuator nonlinearity through state estimation technology. The two algorithms work together to improve long-term operating accuracy. The update cycle is set to 10 control cycles, i.e., 10ms, which is a trade-off between calculated load and parameter update frequency. The forgetting factor of 0.98 corresponds to an effective data window of about 50 sampling points.
[0058] The specific implementation of step S05 involves configuring the task allocation strategy during system initialization of the heterogeneous computing architecture. The real-time control incremental calculation task of the fuzzy PID controller and the multivariable coordinated control quantity calculation task of the adaptive dynamic matrix control algorithm are marked as periodic hard real-time tasks. These tasks are fixedly assigned to high-priority threads of the real-time control kernel, and a preemptive scheduling strategy is set. The real-time control kernel uses a real-time operating system or a real-time Linux kernel to ensure deterministic execution of the 1ms control cycle. The neural network inference task of the state transition prediction model and the matrix operation task of the recursive least squares method are marked as computationally intensive non-periodic tasks. These tasks are allocated to accelerated processing units such as graphics processors or field-programmable gate arrays for execution. Task allocation follows a priority ceiling protocol, allocating an access priority ceiling for each shared memory region. When a low-priority task accesses a shared resource, its priority is temporarily increased to the resource's priority ceiling to prevent high-priority tasks from being blocked. The real-time control kernel and the accelerated processing unit exchange data through a shared memory region. The real-time control kernel writes input data to the input buffer of the shared memory. The accelerated processing unit reads data from the input buffer, performs calculations, and writes the results to the output buffer. The real-time control kernel then reads the calculation results from the output buffer. The entire data exchange process is synchronized using lock-free queues and memory barrier instructions to avoid the uncertainty and delay caused by mutexes. The purpose of this step is to separate periodic control tasks and computationally intensive tasks through a heterogeneous computing architecture, ensuring that hard real-time control tasks are not interfered with by non-real-time tasks. At the same time, the parallel computing capabilities of the accelerated processing unit are used to speed up the execution of complex algorithms. The priority ceiling protocol effectively prevents priority inversion problems. The shared memory method avoids the overhead of cross-bus data copying. Under typical configurations, the neural network inference time is stable within 0.3ms, and the matrix operation time is within 0.2ms, leaving sufficient margin for the 1ms control cycle.
[0059] The specific implementation of step S06 involves real-time monitoring of the control cycle delay duration and the validity of sensor-acquired data within each control cycle. The control cycle delay duration is obtained by calculating the difference between the timestamps of the start and end times of the control cycle. The control cycle delay duration is compared with a delay threshold of 1.2ms. If the control cycle delay duration exceeds the threshold, a control cycle timeout fault signal is generated. The actual speed, torque, and temperature values acquired by the sensors are monitored to ensure they are within their respective data limits. The data limit range is determined by the physical measurement range of the sensors. An anomaly counter is set up; when the sensor data exceeds the limit range, the counter increments by 1. When the anomaly counter remains non-zero for five consecutive control cycles, a sensor data anomaly fault signal is generated. The deviation between the actuator feedback position and the command position is monitored, and the ratio of the absolute value of the deviation to the rated value is calculated. If the ratio exceeds 20%, an actuator anomaly fault signal is generated. The data verification results of the communication bus are monitored, and a communication error counter is set up; when verification fails, the counter increments by 1. When the communication error counter fails three consecutive verifications, a communication fault signal is generated. When any fault signal is generated, a shutdown procedure is immediately executed, including setting the control command to zero, cutting off the actuator power supply, and... The mechanical braking device is activated, and simultaneously the pointer position of the current state index sequence and the running time value of the loop counter are read. These two values are written to non-volatile memory such as flash memory or EEPROM for power-off protection. When the system resumes operation, the state index sequence position and running time stored in the non-volatile memory are read first. Depending on the operator's choice, it is decided whether to continue execution from the time of the fault or restart after initialization. If continued execution is selected, the state index sequence pointer is restored to the saved position, the running time of the loop counter is restored to the saved value, and execution continues from the corresponding state parameters. In subsequent tests, if a restart is selected, the state index sequence pointer will be reset to the starting position, the loop counter will be cleared, and the entire test process will be re-executed. The purpose of this step is to achieve real-time fault detection and safe shutdown, while providing a test breakpoint resume function to avoid the entire test being invalidated due to a brief fault. The delay threshold of 1.2ms is set to 1.2 times the standard control cycle of 1ms to provide a 20% fault tolerance margin. The abnormal judgment of 5 consecutive cycles avoids false alarms caused by occasional noise. The actuator deviation threshold of 20% is determined according to the system safety margin. The judgment of 3 consecutive communication failures balances reliability and response speed.
[0060] It should be noted that one of the key technical ideas of this invention is the collaborative design of the state transition prediction model and the inter-layer jump mechanism. Traditional methods use fixed control parameters and a unified calculation path during state switching, which cannot adaptively adjust according to the difference in switching magnitude. This leads to wasted computing resources during small-amplitude switching and insufficient response during large-amplitude switching. This invention predicts the optimal transition trajectory through a neural network and outputs feedforward compensation, enabling the system to plan the switching process in advance to avoid the impact caused by sudden state changes. The inter-layer jump mechanism dynamically selects the calculation path according to the difference between the current state and the target state. During small-amplitude switching, it bypasses the deep convolution module and directly completes linear interpolation prediction. During large-amplitude switching, it uses the full network to extract nonlinear features. This adaptive calculation strategy ensures prediction accuracy under complex conditions and optimizes calculation efficiency under simple conditions. After the jump, the memory resources of the bypassed layer are immediately released to provide more available space for other tasks. In scenarios with frequent switching of multiple states, the inter-layer jump mechanism significantly reduces the average inference time, reserves sufficient time margin for hard real-time control systems, and avoids the problem of uneven distribution of computing resources in heterogeneous conditions for fixed-depth networks.
[0061] The second key technical idea of this invention is the parameter adaptation mechanism of the adaptive dynamic matrix control algorithm and the recursive least squares method. Traditional multivariable control methods rely on fixed model parameters identified offline. When system characteristics change due to mechanical wear, temperature changes, or load characteristic drift, the mismatch between the fixed model and the actual object leads to a gradual decrease in control accuracy. This invention uses an adaptive dynamic matrix control algorithm to explicitly describe the multivariable coupling relationship through the step response model matrix, predicts the output trajectory in the future time domain, and achieves multi-step predictive control by optimizing the control increment sequence. Compared with the passive approach of traditional feedback control that only adjusts based on the current deviation, predictive control can actively plan control actions and coordinate various control channels. To avoid mutual interference, the recursive least squares method updates the step response model matrix parameters every 10 control cycles based on the actual input and output data. The introduction of a forgetting factor gives higher weight to recent data to adapt to parameter drift in time-varying systems. This online parameter identification mechanism ensures that the control model always closely reflects the dynamic characteristics of the actual object, compensating for the slow changes in system characteristics during long-term operation. The rapid model reconstruction strategy uses the parameter similarity between adjacent states for interpolation initialization, avoiding the waiting time for re-identification during state transitions. The combination of parameter adaptation mechanism and predictive control algorithm forms a closed-loop self-learning system, maintaining stable control performance during long-term operation of multi-state cyclic experiments.
[0062] The third key technical concept of this invention is a real-time task scheduling strategy based on heterogeneous computing architecture and a priority ceiling protocol. Traditional test bench control systems use a single-core processor to execute all tasks sequentially. When switching states, multiple tasks such as trajectory prediction, model updating, and control law calculation need to be completed simultaneously. This surge in computational load leads to extended control cycles and even task backlog, affecting the system's real-time performance and stability. This invention divides tasks into two categories: periodic hard real-time control tasks and aperiodic computationally intensive tasks. Periodic control tasks are fixed on high-priority threads of the real-time control kernel and employ preemptive scheduling to strictly guarantee deterministic execution of the 1ms control cycle. Computationally intensive tasks are allocated to acceleration processing units utilizing graphics processors or field-programmable gates. The array's parallel computing capabilities accelerate matrix operations and neural network inference. The two parts exchange data at high speed through shared memory to avoid cross-bus copy overhead. The priority ceiling protocol assigns an access priority cap to each shared resource. When a low-priority task accesses a resource, its priority is temporarily increased to prevent high-priority tasks from being blocked. This effectively avoids the uncertainty and delay caused by priority inversion. The heterogeneous computing architecture realizes the specialization of computing resources. The real-time kernel focuses on periodic control to ensure time determinism, while the acceleration unit undertakes computationally intensive tasks to leverage the advantages of parallel computing. The priority ceiling protocol ensures the orderliness and predictability of resource access. The overall scheduling strategy maximizes the utilization of the system's computing power while meeting hard real-time constraints.
[0063] The synergistic effect of the three key technical approaches described above forms a complete multi-state loading loop control solution. The state transition prediction model pre-plans the switching trajectory and outputs feedforward compensation, providing the optimal target trajectory and compensation signal for the subsequent controller. The inter-level jump mechanism adaptively adjusts the calculation path according to the complexity of the operating conditions, saving valuable computation time for the real-time system. The adaptive dynamic matrix control algorithm uses the prediction model to achieve multi-variable coordinated control, and the recursive least squares method continuously updates the model parameters to prevent the control accuracy from decaying over long-term operation. The heterogeneous computing architecture and priority scheduling strategy rationally allocate each algorithm module to different computing resources, ensuring both the deterministic execution of hard real-time control tasks and fully utilizing... By leveraging the parallel computing capabilities of the acceleration unit, three technical approaches play their respective roles in the prediction, control, and execution layers, and are tightly coupled through data flow and control flow. Prediction results guide control decisions, control commands drive execution actions, and execution feedback updates the prediction model, forming a closed-loop adaptive intelligent control system. Compared to traditional open-loop control methods that rely on fixed parameters and passive feedback, this invention significantly improves the stability of multi-state switching, the maintenance of accuracy during long-term operation, and the real-time response capability of the system through a multi-level collaborative mechanism of prediction feedforward, parameter adaptation, and real-time scheduling. It is particularly suitable for test bench applications with short state times, frequent switching, numerous cycles, and strict requirements for control accuracy.
[0064] It should be noted that this invention also solves the following technical problems: In multi-state cyclic loading tests, the inference calculation of the state transition prediction model and the matrix operation of the adaptive dynamic matrix control algorithm consume a large amount of processor resources. The traditional serial execution method leads to the extension of the control cycle or even timeout, affecting the stability of the real-time control system. This invention fixes the control law calculation tasks of the fuzzy PID controller and the adaptive dynamic matrix control algorithm in the high-priority thread of the real-time control kernel through a heterogeneous computing architecture, and allocates the inference of the state transition prediction model and the recursive least squares matrix operation to the acceleration processing unit for parallel execution. The priority ceiling protocol is used to prevent priority inversion. The key control tasks are locked in the high-priority thread of the real-time control kernel to ensure that the 1-millisecond control cycle is strictly met. Non-real-time analysis tasks are executed in the idle time slots of the acceleration processing unit to avoid blocking the main control flow. At the same time, the inter-layer jump mechanism of the state transition prediction model dynamically adjusts the calculation path according to the state switching amplitude. Under simple working conditions, the intermediate convolutional layer is skipped and the output layer is directly reached, and the memory of the activation value of the skipped layer is released. This reduces the inference time and optimizes the utilization of computing resources, so that the entire control system can still maintain real-time performance and efficient allocation of computing resources when dealing with frequent state switching.
[0065] Specifically, the principle of this invention is that the solution can solve the technical problem of low transient control accuracy during state switching in multi-state cyclic loading. The principle is to organically integrate data-driven trajectory prediction, multivariable predictive control, parameter adaptive mechanism and nonlinear compensation strategy to form a hierarchical control architecture. The state transition prediction model extracts switching features from the difference between the current and target operating conditions. The output optimal transition trajectory serves as the inner-loop tracking benchmark, avoiding the blindness of manually designed transition curves. The feedforward compensation amount predicts the inertial effect during state changes based on the system dynamic model and applies control action in advance. The S-shaped acceleration curve decomposes the switching process into acceleration, constant speed, and deceleration segments by limiting jerk, making the actuator output change smoothly. The adaptive dynamic matrix control algorithm uses the step response model matrix to describe the coupling relationship between the speed and torque channels, and optimizes the control sequence in the prediction time domain to make the multi-variable output collaboratively approximate the desired trajectory. The fuzzy PID controller infers the gain adjustment amount based on the deviation and the rate of change of deviation to compensate for model errors. The recursive least squares method periodically updates the step response model matrix parameters to make the prediction model reflect the current system characteristics in real time. The extended Kalman filter incorporates sensor deviation and actuator dead zone into the state space for joint estimation. The corrected measurement value eliminates the pollution of the feedback signal by nonlinear factors. Each control element has a clear division of labor and complements the others. The prediction layer provides a forward-looking trajectory, the adaptive layer follows system changes, the compensation layer eliminates deterministic disturbances, and the feedback layer suppresses random errors. The hierarchical architecture enables the control system to maintain output stability while having a rapid response capability during state transition transients.
[0066] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.
[0067] The specific implementation of step S01 involves reading the multi-state recipe table and initializing the real-time control kernel. Each state parameter in the multi-state recipe table is stored in a shared memory area, and a state index sequence and a loop counter are established. The multi-state recipe table is a data structure containing different test state parameters. Each row corresponds to a test state, including the speed setpoint, torque setpoint, runtime, switching delay time, and controller gain parameter. The state index sequence records the execution order and loop count of each state in the multi-state recipe table, and the loop counter is used to count the execution time of the current state and the total number of loops.
[0068] The specific implementation of step S02 involves determining the current state parameters and target state parameters based on the state index sequence. The current speed, torque, and temperature values from the current state parameters, and the target speed and torque values from the target state parameters, are input into the state transition prediction model. The model outputs the optimal transition trajectory, feedforward compensation, and fuzzy gain adjustment coefficient. The current state parameters are a row of state parameters in the multi-state recipe table currently pointed to by the state index sequence, containing the current speed, torque, and temperature values. The target state parameters are a row of state parameters in the multi-state recipe table pointed to by the next step of the state index sequence, containing the target speed and torque values. The structure of the state transition prediction model is as follows: the input layer receives five normalized parameters (current speed, current torque, current temperature, target speed, and target torque values); features are extracted through three layers of residual-connected convolutional modules, each containing 64 convolutional kernels; and the model outputs the optimal transition trajectory, feedforward compensation, and fuzzy gain adjustment coefficient within the prediction time domain over 50 steps through two fully connected layers. The state transition prediction model supports an inter-layer jump mechanism. The jump strategy is determined based on the absolute value of the speed difference between the current speed value and the target speed value, and the absolute value of the torque difference between the current torque value and the target torque value. When the absolute value of the speed difference is less than 10% of the rated speed and the absolute value of the torque difference is less than 15% of the rated torque, the second and third convolutional modules are skipped and the model is directly connected to the two fully connected layers.
[0069] The specific implementation of step S03 involves generating an S-shaped acceleration curve switching command based on the optimal transition trajectory, calculating the speed deviation by comparing the target speed value with the actual speed value acquired by the sensor, calculating the torque deviation by comparing the target torque value with the actual torque value acquired by the sensor, inputting the speed deviation and torque deviation into an adaptive dynamic matrix control algorithm to obtain a multivariable coordinated control quantity, inputting the speed deviation and torque deviation into a fuzzy PID controller and combining it with a fuzzy gain adjustment coefficient to obtain a real-time control increment, and then superimposing the feedforward compensation quantity, the multivariable coordinated control quantity, and the real-time control increment before outputting them to the actuator. The formula for calculating the speed deviation is as follows:
[0070] ;
[0071] In the formula, This is the normalized value of the rotational speed deviation, which is dimensionless. The target rotational speed is expressed in r / min. The actual rotational speed value collected by the sensor, in r / min; The rated speed is expressed in r / min, with an empirical value of 3000 r / min.
[0072] The formula for calculating torque deviation is as follows:
[0073] ;
[0074] In the formula, This is the normalized value of the torque deviation, which is dimensionless. The target torque value is expressed in Nm. The actual torque value collected by the sensor, in Nm; This is the rated torque, measured in Nm, with an empirical value of 500 Nm.
[0075] The formula for calculating the final control quantity output to the actuator is as follows:
[0076] ;
[0077] In the formula, The total control quantity output to the actuator is dimensionless. This is the feedforward compensation quantity, which is dimensionless and is directly output by the state transition prediction model. It is a multivariable coordinated control quantity, dimensionless, and calculated by an adaptive dynamic matrix control algorithm; The increment is dimensionless and calculated by a fuzzy PID controller for real-time control.
[0078] The specific implementation of step S04 involves updating the step response model matrix parameters every 10 control cycles by inputting the control input history sequence and the system output history sequence into a recursive least squares method. The actual speed, torque, and temperature values collected by the sensors are input into an extended Kalman filter to obtain sensor bias estimates and actuator dead-zone estimates. The sensor data is then corrected based on these estimates. The control input history sequence consists of records of control commands output to the actuator over the past 50 control cycles, and the system output history sequence consists of records of actual speed and torque values collected by the sensors over the past 50 control cycles. The parameter update formula for the recursive least squares method is expressed as follows:
[0079] ;
[0080] In the formula, For the first The updated step response model matrix parameter vector is dimensionless and has dimensions of . ,in This is the model order, typically ranging from 20 to 50. For the first The updated step response model matrix parameter vector is dimensionless and has dimensions of . ; For the first The gain matrix of order n is dimensionless and has a dimension of n. ; For the first The normalized system output value at each sampling time is dimensionless. For the first The regression vector at each sampling time point is dimensionless and has a dimension of . It consists of a control input history sequence.
[0081] The formula for calculating the gain matrix is as follows:
[0082] ;
[0083] In the formula, For the first The covariance matrix of order n is dimensionless and has dimensions n. ; This is the forgetting factor, dimensionless, with a default value of 0.98.
[0084] The formula for updating the covariance matrix is as follows:
[0085] ;
[0086] In the formula, For the first The updated covariance matrix is dimensionless and has dimensions of . .
[0087] The correction formula for sensor-acquired data is expressed as follows:
[0088] ;
[0089] In the formula, These are the corrected, normalized values of the sensor data, dimensionless. The value is the actual measurement from the sensor; the unit is determined based on the object being measured. This is a sensor bias estimate, in units of and . The same, output by the extended Kalman filter algorithm; This is the nominal range value of the sensor, in units of... same; This is the estimated dead zone value for the actuator, in units of... The same, output by the extended Kalman filter algorithm.
[0090] The specific implementation of step S05 is that the heterogeneous computing architecture fixes the real-time control increment calculation task of the fuzzy PID controller and the multivariable coordinated control quantity calculation task of the adaptive dynamic matrix control algorithm in the high-priority thread of the real-time control kernel, and allocates the inference task of the state transition prediction model and the matrix operation task of the recursive least squares method to the acceleration processing unit. The heterogeneous computing architecture consists of two parts: the real-time control kernel and the acceleration processing unit. The real-time control kernel runs periodic control tasks using preemptive scheduling to ensure that the 1ms control cycle is strictly met. The acceleration processing unit is a graphics processor or a field-programmable gate array, which executes matrix operation-intensive tasks and neural network inference tasks.
[0091] The specific implementation of step S06 involves real-time monitoring of the control cycle delay and sensor data acquisition. A fault signal is generated when the control cycle delay exceeds a delay threshold or the sensor data exceeds the data limit range. Upon receiving the fault signal, the current state index sequence position and elapsed time are recorded in non-volatile memory, and the system is stopped. Upon resumption of operation, the state index sequence position and elapsed time in the non-volatile memory are read to determine whether to continue execution or initialize and restart. The delay threshold is 1.2ms, and the data limit range is the sensor's physical measurement range. A fault signal is generated when the sensor data exceeds the data limit range for five consecutive control cycles, the actuator feedback position deviates from the command position by more than 20% of the rated value, or the communication bus fails to verify three times consecutively.
[0092] It should be noted that the variables involved in this invention are explained in detail in Table 1.
[0093] Table 1. Variable Explanation Table
[0094]
[0095] To better understand and implement this invention, a specific application scenario of the invention is provided below as Example 2: To verify the effectiveness of the invention, technicians built a test environment and conducted a multi-state cyclic durability test using a motor test bench. This test bench is used to simulate the operating characteristics of an electric vehicle drive motor under different operating conditions, and needs to perform a cyclic loading task including multiple states such as acceleration, constant speed cruise, brake feedback, and idling for 48 consecutive hours. The test object is a permanent magnet synchronous motor with a rated power of 120kW, a rated speed of 3000rpm, and a rated torque of 380Nm. The test bench is equipped with a torque sensor, a speed encoder, and a temperature sensor. The control system adopts a heterogeneous computing architecture combining a dual-core real-time processor and a graphics processor, with a control cycle set to 1ms.
[0096] Based on the experimental outline, the technicians compiled a multi-state recipe table containing eight states, as shown in Table 2. The state index sequence was set to execute states 1 to 8 sequentially and then loop back to state 1, with a total loop count of 150. During the initialization phase, the multi-state recipe table was loaded into the shared memory area, the state index sequence was established, and the loop counter was cleared. After the real-time control kernel started, it first executed the parameter setting for state 1.
[0097] Table 2 Multi-state formulation table
[0098]
[0099] The state transition prediction model was trained offline before the experiment. The training dataset contained 1000 sets of actual switching process data with different combinations of initial and target states. Each set of data covered the complete time series of 3 seconds before and 5 seconds after the switch. The training process used mean squared error as the trajectory prediction loss function and overshoot weighted loss as the compensation optimization objective. The initial learning rate was set to 0.001, decaying to 0.8 times the original rate every 20 rounds. The batch size was 32, and the model was trained for 150 rounds before verifying loss convergence. During the state transition phase, when the system switched from state 1 to state 2, the input layer of the state transition prediction model received five normalized parameters: current rotational speed (500 rpm), current torque (50 Nm), current temperature (65℃), target rotational speed (1500 rpm), and target torque (180 Nm). Since the absolute value of the speed difference is 1000 rpm, exceeding the 10% threshold (300 rpm) of the rated speed of 3000 rpm, and the absolute value of the torque difference is 130 Nm, exceeding the 15% threshold (57 Nm) of the rated torque of 380 Nm, the model determines it to be a large change in operating conditions. Therefore, a complete 3-layer residual convolutional module is executed for feature extraction, outputting the optimal transition trajectory in the time domain over 50 steps, a feedforward compensation of 85 Nm, and a fuzzy gain adjustment coefficient of 1.15. Figure 2As shown, the optimal transition trajectory exhibits a smooth S-shaped curve characteristic, effectively avoiding the mechanical impact caused by the step command.
[0100] The S-shaped acceleration curve switching command generated based on the optimal transition trajectory is decomposed into a three-segment trajectory planning curve. The first acceleration phase lasts for 0.08 seconds, with the acceleration increasing linearly from 0 to 15. The second uniform acceleration phase lasted 0.12s, with the acceleration maintained at 15. The acceleration is constant, the third deceleration phase lasts 0.08 seconds, and the acceleration increases from 15... The speed decreases linearly to 0. During the state transition, the sensor collects the actual speed and torque values in real time. The speed deviation is calculated by the difference between the target speed value of 1500 rpm and the actual speed value, and the torque deviation is calculated by the difference between the target torque value of 180 Nm and the actual torque value. Figure 3 As shown, the speed deviation and torque deviation exhibit significant fluctuations in the initial switching phase, subsequently converging rapidly under multivariable coordinated control. The fuzzy PID controller fuzzifies the speed deviation and torque deviation into seven linguistic variables: negative large, negative medium, negative small, zero, positive small, positive medium, and positive large. A fuzzy rule base of 49 rules is established. Based on the magnitude and rate of change of the deviation, the adjustment amounts of the proportional gain, integral gain, and derivative gain are inferred. The precise gain parameters are obtained by defuzzifying using the centroid method, and the real-time control increment is calculated by combining the fuzzy gain adjustment coefficient of 1.15.
[0101] The adaptive dynamic matrix control algorithm predicts the output trajectory for the next 50 steps based on a step response model. The step response model matrix parameters are initialized as a 2x50 coefficient matrix, with the first row corresponding to the speed channel and the second row corresponding to the torque channel. Every 10 control cycles (0.01 s), the recursive least squares method updates the step response model matrix parameters using the historical sequence of control input and system output. The forgetting factor is set to 0.98 to give higher weight to recent data. Figure 4 As shown, the step response model matrix parameters adjust rapidly within the first 100 control cycles and then tend to stabilize, effectively adapting to the drift characteristics of motor parameters with temperature changes. The adaptive dynamic matrix control algorithm substitutes historical control values and current measured values into the updated step response coefficient matrix for matrix-vector multiplication to obtain the output prediction sequence in the future time domain. A quadratic objective function is constructed to penalize both output tracking error and the magnitude of control increment changes. The optimal control increment sequence is obtained by solving a constrained quadratic programming problem. Only the first step of the control increment is implemented to form a rolling optimization closed loop, and the multivariable coordinated control quantity is calculated.
[0102] The Extended Kalman Filter (EKF) treats sensor bias and actuator dead zone as extended state variables. It establishes a state-space model by linearizing the nonlinear system equations and recursively updates the state estimate and covariance matrix using the residuals between measured and model predictions. At the 35,000th control cycle, the EKF detects a zero-point drift of 8 rpm for the speed sensor, 3 Nm for the torque sensor, and an estimated actuator dead zone width of 5 Nm. The system then corrects the sensor data in real time based on the estimated sensor bias and dead zone. The corrected speed and torque tracking errors are significantly reduced, effectively improving system control accuracy. The feedforward compensation of 85 Nm, the multivariable coordinated control input, and the real-time control increment are superimposed and output to the actuator, driving the motor to follow the target trajectory.
[0103] The heterogeneous computing architecture fixes the real-time control incremental calculation tasks of the fuzzy PID controller and the multivariable coordinated control quantity calculation tasks of the adaptive dynamic matrix control algorithm on the high-priority thread of the real-time control kernel, with a priority set to 95, ensuring priority execution within the 1ms control cycle. The inference tasks of the state transition prediction model and the matrix operation tasks of the recursive least squares method are assigned to the graphics processor and executed asynchronously during the idle time slots of the real-time control kernel. Data exchange between the real-time control kernel and the graphics processor is achieved through a shared memory region, avoiding cross-bus copy latency. A priority ceiling protocol allocates an access priority cap of 98 to the shared memory region; high-priority tasks are temporarily elevated to the access priority cap when acquiring resources to prevent priority inversion. Real-time monitoring shows that the fuzzy PID controller calculation takes 0.15ms, the adaptive dynamic matrix control algorithm calculation takes 0.28ms, the state transition prediction model inference takes 0.29ms, the recursive least squares matrix operation takes 0.18ms, and the total control cycle delay is stable at 0.87ms, far below the delay threshold of 1.2ms.
[0104] During 48 hours of continuous operation, the real-time monitoring module recorded the control cycle delay and sensor data. When the 28th hour (100,800,000th control cycle) was reached, the torque sensor data exceeded the data limit range of -450 to 450 Nm for five consecutive control cycles. The system determined this to be a sensor malfunction and generated a fault signal. Upon receiving the fault signal, the control system immediately recorded the current state index sequence position as state 5, the elapsed time as 28 hours, and the cycle counter as indicating 58 complete cycles. After writing the relevant data to the non-volatile memory, the system shut down. Technicians replaced and recalibrated the torque sensor, and operation resumed. The control system read the state index sequence position and elapsed time stored in the non-volatile memory, determined to continue execution from state 5, and the cycle counter returned to 58 cycles. The test continued seamlessly, ultimately completing 150 cycles for a total of 48 hours of endurance testing.
[0105] This invention represents a significant advancement over traditional control methods. Its core lies in the deep integration of predictive control and adaptive parameter adjustment mechanisms. Traditional PID control relies solely on current deviation information for feedback adjustment, failing to anticipate future changes in operating conditions, leading to substantial overshoot and oscillations during state transitions. This invention, however, pre-plans the optimal switching trajectory using a state transition prediction model and outputs feedforward compensation to eliminate the lag caused by system inertia, enabling the control system to make forward-looking decisions. The adaptive dynamic matrix control algorithm explicitly models multivariable coupling relationships, coordinating the control actions of the speed and torque channels based on the predicted future output trajectory, avoiding performance degradation caused by mutual interference in traditional single-variable controllers. The recursive least squares method updates the step response model matrix parameters online, allowing the control algorithm to track parameter drift of the controlled object in real time, compensating for the impact of temperature changes, mechanical wear, and other factors on control accuracy, and overcoming the performance degradation problem of fixed-parameter controllers over long-term operation. Extended Kalman filtering provides real-time estimation and compensation for sensor zero-point drift and actuator dead zones, fundamentally eliminating the disturbances of measurement and execution errors to the closed-loop system, thus improving the robustness of the control system. The inter-layer jump mechanism dynamically adjusts the computational depth of the state transition prediction model based on the complexity of the operating conditions. While ensuring prediction accuracy during large state transitions, it optimizes the response speed for small transition scenarios, resolving the contradiction of uneven computational resource allocation when fixed-depth neural networks handle heterogeneous operating conditions. The heterogeneous computing architecture locks real-time-critical control tasks onto high-priority threads in the real-time kernel, while allocating computationally intensive tasks to the graphics processor. Task parallelization and priority management ensure the feasibility of the algorithm under hard real-time constraints. The fault recovery mechanism saves the running state using non-volatile memory, allowing the system to resume execution from the breakpoint after fault resolution. This avoids the data loss and time wastage caused by re-initialization after a traditional control system failure, improving the reliability and continuity of multi-state cyclic experiments.
[0106] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A loop control method for multi-state loading, characterized in that, The system reads the multi-state recipe table and initializes the real-time control kernel, establishing a state index sequence and a loop counter. Based on the state index sequence, it determines the current state parameters and the target state parameters, inputs these parameters into the state transition prediction model, and outputs the optimal transition trajectory, feedforward compensation, and fuzzy gain adjustment coefficient. Based on the optimal transition trajectory, it generates an S-shaped acceleration curve switching command, calculates the difference between the target value and the actual value to obtain the deviation, inputs the deviation into the adaptive dynamic matrix control algorithm to obtain the multivariable coordinated control quantity, inputs the deviation into the fuzzy PID controller and combines it with the fuzzy gain adjustment coefficient to obtain the real-time control increment, and then outputs the feedforward compensation, multivariable coordinated control quantity, and real-time control increment to the actuator. The step response model matrix parameters are periodically updated using a recursive least squares method by periodically inputting historical control input sequences and historical system output sequences. Sensor-acquired data is input into an extended Kalman filter to obtain sensor bias estimates and actuator dead zone estimates, and the sensor-acquired data is corrected accordingly. The heterogeneous computing architecture allocates computing tasks to the real-time control kernel and the accelerated processing unit. The control cycle delay and sensor-acquired data are monitored in real time. When the control cycle delay exceeds the delay threshold or the sensor-acquired data exceeds the data limit range, a fault signal is generated and the status is recorded in non-volatile memory. During recovery, the non-volatile memory is read to determine whether to continue execution or initialize and restart.
2. The multi-state loading loop control method according to claim 1, characterized in that, The multi-state recipe table is a data structure containing parameters for different test states. Each row corresponds to a test state and includes the speed setpoint, torque setpoint, running time, switching delay time, and controller gain parameters.
3. The multi-state loading loop control method according to claim 2, characterized in that, Each state parameter in the multi-state recipe table is stored in a shared memory area. The state index sequence records the execution order and loop count of each state in the multi-state recipe table. The loop counter is used to count the execution time of the current state and the total number of loops.
4. The multi-state loading loop control method according to claim 3, characterized in that, The current state parameter is a row of state parameters in the multi-state recipe table currently pointed to by the state index sequence, including the current speed value, current torque value, and current temperature value. The target state parameter is a row of state parameters in the multi-state recipe table to be pointed to by the next step of the state index sequence, including the target speed value and target torque value.
5. The multi-state loading loop control method according to claim 4, characterized in that, Input the current speed, torque, and temperature values from the current state parameters, as well as the target speed and torque values from the target state parameters, into the state transition prediction model.
6. The multi-state loading loop control method according to claim 5, characterized in that, The input layer of the state transition prediction model receives five normalized parameters: current speed, current torque, current temperature, target speed, and target torque. Features are extracted through three convolutional modules with residual connections. Each convolutional module contains 64 convolutional kernels. The model outputs the optimal transition trajectory, feedforward compensation, and fuzzy gain adjustment coefficient in the 50-step prediction time domain through two fully connected layers.
7. The multi-state loading loop control method according to claim 6, characterized in that, The state transition prediction model supports an inter-layer jump mechanism. The jump strategy is determined based on the absolute value of the speed difference between the current speed value and the target speed value, and the absolute value of the torque difference between the current torque value and the target torque value. When the absolute value of the speed difference is less than 10% of the rated speed and the absolute value of the torque difference is less than 15% of the rated torque, the second and third convolutional modules are skipped and the model is directly connected to the second fully connected layer.
8. The multi-state loading loop control method according to claim 7, characterized in that, The inter-layer jump mechanism establishes conditional branch paths between convolutional modules in the state transition prediction model, dynamically selects the computation path based on the complexity index of the input features, and releases the GPU memory space occupied by the intermediate activation tensors of the skipped layers after the jump, retaining only the gradient information required for backpropagation.
9. The multi-state loading loop control method according to claim 8, characterized in that, The training dataset for the state transition prediction model collected 1000 sets of actual switching process data under different combinations of initial and target states. Each set of data includes the speed time series, torque time series, and temperature time series for 3 seconds before and 5 seconds after the switch. The speed time series, torque time series, and temperature time series were resampled to 100Hz and normalized.
10. The multi-state loading loop control method according to claim 9, characterized in that, The deviations include the speed deviation calculated from the difference between the target speed value and the actual speed value collected by the sensor, and the torque deviation calculated from the difference between the target torque value and the actual torque value collected by the sensor.