An electric drive control software system based on position feedback
Patent Information
- Application Number
- CN202610877996.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-17
- Publication Date
- 2026-09-15
AI Technical Summary
现有技术中,传统PID控制技术虽能实现电机速度和位置的基本调节,但其固定参数设定难以应对负载动态变化,导致系统在工况波动时出现响应滞后和稳定性下降
本发明,通过实时位置反馈驱动任务适应模块自动切换控制模式,并结合优化算法模块动态调整控制参数,有效解决动态适应性不足、能效表现受限及控制精度低的问题,具有动态负载自适应能力强、能效高、控制精度高的优点。
Smart Images

Figure CN122764087A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy controller technology, specifically to an electric drive control software system based on position feedback. Background Technology
[0002] In the field of new energy controller technology, the performance of motor control systems directly affects the operating efficiency of new energy vehicle drive systems, industrial automation equipment, and complex task environments. In existing technologies, while traditional PID control can achieve basic adjustment of motor speed and position, its fixed parameter settings are insufficient to cope with dynamic load changes, leading to response lag and decreased stability when operating conditions fluctuate. Fixed parameter vector control (FPC) technology, based on the FOC algorithm, performs well within a specific load range but cannot adapt to multi-mode task requirements, especially with a significant reduction in control accuracy under sudden load changes. While model predictive control (MMC) technology has the ability to handle complex dynamic systems, its high computational resource consumption and real-time bottleneck limit its practical application in embedded new energy controllers.
[0003] While self-tuning algorithms attempt to introduce parameter adjustment mechanisms, their computational processes are lengthy and resource-intensive, failing to meet millisecond-level real-time control requirements. Specifically, insufficient dynamic adaptability leads to accumulated position errors when the load changes, causing efficiency losses and even operational instability; limited energy efficiency results in continuous high-power operation of the motor under low load conditions, causing energy waste and shortening the range of new energy systems; response speed and control accuracy are constrained by the real-time processing capabilities of existing technologies, making it difficult to maintain high-precision tracking under dynamic load changes; furthermore, traditional systems lack proactive fault monitoring and self-adjustment mechanisms, failing to promptly identify and compensate for potential risks such as encoder signal anomalies, overcurrent, and overtemperature, increasing system operational risks and affecting long-term reliability.
[0004] Therefore, we propose an electric drive control software system based on position feedback to solve the above problems. Summary of the Invention
[0005] (a) Technical problems to be solved To address the shortcomings of existing technologies, this invention provides an electric drive control software system based on position feedback, which has the advantages of strong dynamic load adaptability, high energy efficiency, and high control precision, thus solving the problems mentioned in the background technology.
[0006] (II) Technical Solution To achieve the above objectives, the present invention specifically adopts the following technical solution: An electric drive control software system based on position feedback includes: The position detection module is used to detect the current position, speed and acceleration information of the motor in real time and generate a real-time position feedback signal; The task adaptation module, connected to the position detection module, is used to automatically select and switch the motor control mode according to the real-time position feedback signal and the current task requirements. The control mode includes at least a high torque mode and a low power consumption mode. An adaptive control module, connected to the task adaptation module, is used to dynamically adjust the output torque and speed of the motor according to the real-time position feedback signal and the selected control mode; An optimization algorithm module, connected to the adaptive control module, has a built-in fixed control function based on the position feedback angle, used to optimize the output parameters of the adaptive control module in real time. The adaptive control module dynamically adjusts the output torque and speed of the motor according to the optimized control parameters to achieve high-precision closed-loop control of the motor.
[0007] Furthermore, the task adaptation module is configured to: adapt to real-time position errors. The system determines the load status. When the position error e exceeds the preset high load threshold, it is determined to be a heavy load or high load, and automatically switches to high torque mode. When the position error e is lower than the preset low load threshold, it is determined to be a light load or low load, and automatically switches to low power consumption mode. When the position error e is between the high load threshold and the low load threshold, the current mode is maintained or the system switches to balanced mode.
[0008] Furthermore, the adaptive control module uses the following PID control formula to adjust the output torque in real time: ; in, To control the output torque, This represents the error between the current position and the desired position. , , These are the proportional, integral, and derivative coefficients, respectively; and the adaptive control module dynamically adjusts the proportional coefficient based on the optimization parameters output by the optimization algorithm module. Integral coefficient and differential coefficients At least one of them.
[0009] Furthermore, the position detection module includes an encoder and / or a Hall sensor, with a feedback accuracy at the millisecond level; the position detection module is also used to determine the position based on the formula for the change in motor angle: Real-time calculation of motor angle, where This refers to the instantaneous rotational speed.
[0010] Furthermore, the system performs initialization operations upon startup, including: loading preset task parameters and a mode selector, activating a fault monitoring mechanism to detect the initial state of the system, and waiting to receive real-time position feedback signals from the motor; the fault monitoring mechanism includes self-diagnosis of at least one fault among encoder signal loss, sensor malfunction, overcurrent, and overtemperature.
[0011] Furthermore, the fixed control function in the optimization algorithm module is: ,That , , These are constant parameters preset according to the operating conditions. To provide real-time position and angle feedback, the system... Dynamically optimize torque and speed output; The constant parameters in the optimization algorithm module , , These are fixed values preset based on long-term motor operation test data and adapted to different operating conditions; and the fixed control function... Used to describe motor torque With position feedback angle The nonlinear mapping relationship between them is used to output different torque compensation amounts in different rotor position ranges.
[0012] Furthermore, the system adopts a hierarchical control architecture, in which the position detection module, task adaptation module, adaptive control module, and optimization algorithm module are linked through a feedback loop to form a modular design; wherein, the output of the position detection module is simultaneously fed to the task adaptation module and the adaptive control module, and the output of the adaptive control module is fed back to the task adaptation module to assist in mode switching decisions.
[0013] Furthermore, in the high torque mode, the adaptive control module is configured to increase the motor current and speed to improve torque output; in the low power mode, the adaptive control module is configured to reduce the motor power output to reduce energy consumption; and during mode switching, the adaptive control module adopts a smooth transition algorithm to avoid the impact of sudden torque changes on the system.
[0014] Furthermore, the system also includes an embedded real-time operating system for scheduling the execution timing of the position detection module, task adaptation module, adaptive control module, and optimization algorithm module, ensuring that the end-to-end delay from position signal acquisition to control output update is less than a preset real-time threshold.
[0015] Furthermore, the adaptive control module is also used to: predict the position deviation change trend within a predetermined time window based on the velocity and acceleration information in the real-time position feedback signal, and perform feedforward compensation on the optimized control parameters based on the change trend, so as to further improve the system's response speed and control accuracy under dynamic load changes.
[0016] Compared with the prior art, the present invention provides an electric drive control software system based on position feedback, which has the following advantages: This invention uses real-time position feedback to drive the task adaptation module to automatically switch control modes, and combines an optimization algorithm module to dynamically adjust control parameters. This effectively solves the problems of insufficient dynamic adaptability, limited energy efficiency, and low control precision, and has the advantages of strong dynamic load adaptation capability, high energy efficiency, and high control precision. Attached Figure Description
[0017] Figure 1 This is the overall system block diagram of the present invention; Figure 2 This is a schematic diagram of the process of the present invention; Figure 3 This is a schematic diagram of the load determination and mode switching logic of the task adaptation module of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Example Traditional motor control technologies, such as proportional-integral-derivative (PID) control, fixed-parameter vector control, model predictive control (MPC), and self-tuning algorithms, suffer from insufficient dynamic adaptability, limited energy efficiency, limited response speed and control accuracy, and difficulty in fault prediction and self-repair when dealing with complex load changes. These problems lead to response delays, reduced efficiency, increased energy consumption, and difficulties in ensuring system stability and safety in new energy vehicle drive systems, industrial automation equipment, and complex task environments.
[0020] In this regard, such as Figure 1-3 As shown, this application proposes an electric drive control software system based on position feedback, comprising: The position detection module is used to detect the current position, speed and acceleration information of the motor in real time and generate a real-time position feedback signal; The task adaptation module, connected to the position detection module, is used to automatically select and switch the motor control mode based on the real-time position feedback signal and the current task requirements. The control mode includes at least a high torque mode and a low power consumption mode. An adaptive control module, connected to the task adaptation module, is used to dynamically adjust the output torque and speed of the motor based on the real-time position feedback signal and the selected control mode. An optimization algorithm module, connected to the adaptive control module, has a built-in fixed control function based on the position feedback angle, which is used to optimize the output parameters of the adaptive control module in real time. The adaptive control module dynamically adjusts the output torque and speed of the motor based on the optimized control parameters to achieve high-precision closed-loop control of the motor.
[0021] This application further proposes a configuration method for the aforementioned task adaptation module, which can adapt to real-time location. To determine the load status. Specifically, real-time position error. It is a key parameter in motor control, indicating the current actual position of the motor. Current position relative to the system's desired target position The deviation between the target and the target position. This error is typically calculated by comparing the current motor position information provided in real-time by the position detection module with the target position information preset or dynamically generated by the system. The magnitude of the position error directly reflects the degree to which the motor deviates from the target trajectory under the current load. A larger error usually means that the motor needs greater torque to overcome the load or accelerate to catch up with the target position. By analyzing the real-time position error... The trend and magnitude of load changes can indirectly infer the load state borne by the motor. This error-based load judgment method avoids the complexity of directly measuring the load and improves the system's response speed.
[0022] When the position error When the preset high load threshold is exceeded, the system determines that the motor is in a heavy load or high load state and automatically switches to high torque mode. The high load threshold is a preset error boundary value used to distinguish different load states, typically calibrated through experimental testing, system modeling, or empirical data. When the real-time position error... When this threshold is exceeded, it indicates that the motor may be under heavy or high load, at which point the system needs to provide greater output torque to maintain or return to the target position. Therefore, the task adaptation module automatically switches the control mode to high torque mode. In this mode, the adaptive control module adjusts its control strategy, such as increasing current output or raising the speed limit, to ensure that the motor can generate sufficient torque to cope with heavy loads.
[0023] When the position error When the load falls below a preset low-load threshold, the system determines that the motor is in a light-load or low-load state and automatically switches to low-power mode. The low-load threshold is also a preset error boundary value. When the real-time position error... When the load is below this threshold, it indicates that the motor may be under light or low load conditions, at which point the system's torque demand is lower. To improve energy efficiency, the task adaptation module automatically switches the control mode to a low-power mode. In this mode, the adaptive control module optimizes control parameters, such as reducing current or voltage, to reduce unnecessary energy loss, thereby achieving energy-saving operation.
[0024] When the position error When the load falls between the high and low load thresholds, the system maintains the current mode or switches to a balanced mode. This indicates that the motor is under normal or moderate load. The system can choose to maintain the current control mode to avoid system overhead and potential instability caused by frequent switching; alternatively, the system can switch to a preset balanced mode, which aims to provide a trade-off between performance and energy consumption, suitable for most routine operating scenarios.
[0025] Based on the aforementioned position feedback-based electric drive control software system, this application introduces an intelligent load judgment and mode switching mechanism based on real-time position error. This mechanism enables the task adaptation module to dynamically adjust the control mode according to the load changes experienced by the motor during actual operation. Specifically, when the motor faces heavy load, the system can quickly switch to a high-torque mode to ensure that the motor outputs sufficient power to overcome the load and avoid performance degradation or runaway due to insufficient torque. When the motor is under light load, the system can switch to a low-power mode to effectively reduce energy consumption and improve the overall operating efficiency of the system. Furthermore, under normal load conditions, the system can maintain stable operation or switch to a balanced mode to avoid unnecessary mode switching. This adaptive mode switching strategy significantly improves the adaptability, response speed, and energy utilization efficiency of the electric drive system under complex and variable operating conditions, while ensuring high-precision closed-loop control performance.
[0026] This application further proposes that the adaptive control module uses the following PID control formula to adjust the output torque in real time: ,in, To control the output torque, This represents the error between the current position and the desired position. , , These are the proportional, integral, and derivative coefficients, respectively; and the adaptive control module dynamically adjusts the proportional coefficient based on the optimization parameters output by the optimization algorithm module. Integral coefficient and differential coefficients At least one of them.
[0027] Specifically, PID (Proportional-Integral-Derivative) control is a feedback control algorithm widely used in industrial control. Its core idea is to calculate the control input based on the system's current error, the accumulated error, and the rate of change of the error. The formula... Indicates at time The torque calculated and output by the adaptive control module will directly act on the motor to drive its movement. This represents the error between the current position and the desired position, that is, the deviation between the actual position of the motor and the target position. This error is the basis for the PID controller to perform calculations. The proportional coefficient measures the impact of the current error on the control quantity. The proportional term is used for rapid error response, but an excessively large one... This could lead to system oscillations. These are integral coefficients used to eliminate the steady-state error of the system. The integral term gradually eliminates long-standing deviations by accumulating historical errors, but excessively large integrals can lead to problems. This may result in slow system response or overshoot. The differential coefficients are used to predict the trend of error changes, thereby suppressing oscillations and improving system stability. The differential term adjusts the control quantity in advance by responding to the rate of change of the error, but excessively large differential coefficients can lead to problems. It may be sensitive to noise. Through the combination of these three parts, the PID controller can provide a robust and flexible control strategy to adapt to different system dynamic characteristics and control objectives.
[0028] Through the above technical solution, the adaptive control module introduces a mature and efficient PID control algorithm as its core control law, clarifying how to adjust the position error... To calculate and adjust the motor's output torque in real time This solves the problem of insufficient torque regulation mechanism in the basic scheme, which may lead to unstable control performance. Furthermore, the proportional gain of the PID controller is dynamically adjusted by optimizing the parameters output by the algorithm module. Integral coefficient and differential coefficients At least one of these features enables the PID controller to adaptively adjust based on the motor's real-time operating status, load changes, and task requirements. For example, under heavy load or high dynamic response requirements, the PID controller can be dynamically increased. To improve response speed; when it is necessary to eliminate steady-state error, adjustments can be made. When it is necessary to suppress oscillations, adjustments can be made. This dynamic parameter adjustment capability significantly enhances the robustness and adaptability of the adaptive control module, ensuring that the system can still achieve high-precision closed-loop control of motor output torque and speed under various complex operating conditions. It effectively suppresses possible overshoot, oscillation, or steady-state errors, thereby improving the control accuracy, response speed, and operational stability of the entire electric drive control software system.
[0029] This application further proposes a position detection module including an encoder and / or a Hall sensor, with a feedback accuracy at the millisecond level; the position detection module is also used to determine the change in motor angle according to the following formula: Real-time calculation of motor angle, where This refers to the instantaneous rotational speed.
[0030] Specifically, the position detection module can use an encoder, a Hall sensor, or a combination of both to achieve accurate detection of the motor position. An encoder is a device that converts mechanical rotation or linear motion into an electrical signal; common types include incremental encoders and absolute encoders. Incremental encoders represent rotation by outputting pulse signals; their resolution depends on the number of pulses per revolution, for example, a high-resolution encoder with thousands to tens of thousands of pulses per revolution can be selected. Absolute encoders directly output a digital code corresponding to the current position, without needing to reset to zero after power failure. Hall sensors, based on the Hall effect, determine the rotor position by detecting changes in the magnetic field and are often used to provide commutation signals or coarse position information. To achieve millisecond-level feedback accuracy—that is, providing a position update every millisecond or less—a fast-response, high-resolution sensor is required, along with a high-speed data acquisition circuit and processing unit to ensure the real-time performance and accuracy of the position data. For example, sensor signals can be acquired via high-speed interrupts or DMA (Direct Memory Access) and then rapidly preprocessed.
[0031] In addition to directly acquiring the position information output by the sensor, the position detection module can also detect instantaneous rotational speed. Integrating is performed to calculate the motor's current angle in real time. .in, Indicates the initial angle of the motor. Instantaneous speed. Precise measurements can be taken using the output signals of encoders or Hall sensors, for example, by measuring the number of pulses output by the sensor per unit time or the time interval between adjacent pulses. In digital control systems, integration is typically achieved through discrete summation, i.e., in each sampling period... The instantaneous rotational speed at the current moment is multiplied by the sampling time interval and added to the angle value of the previous sampling period to obtain continuous and smooth motor angle information. This calculation method helps to compensate for the discreteness or noise that may exist in the sensor signal, providing more accurate and continuous motor angle data, and providing high-quality input for subsequent control algorithms.
[0032] This application further proposes that the system performs initialization operations upon startup, including: loading preset task parameters and a mode selector, activating a fault monitoring mechanism to detect the initial state of the system, and waiting to receive real-time position feedback signals from the motor; the fault monitoring mechanism includes self-diagnosis of at least one fault among encoder signal loss, sensor malfunction, overcurrent, and overtemperature.
[0033] Through the above technical solutions, this system performs a series of rigorous initialization operations upon startup, ensuring that the system is in its optimal configuration state before operation. Loading preset task parameters and a mode selector prevents the system from operating with unknown or incorrect parameters, thus guaranteeing the effectiveness and consistency of the control strategy. Simultaneously, activating the fault monitoring mechanism and waiting for valid real-time position feedback signals allows for timely detection and handling of potential faults such as encoder signal loss, sensor malfunctions, overcurrent, and overtemperature, effectively preventing control errors, system oscillations, and even hardware damage caused by unstable initial states or abnormal data. This comprehensive pre-startup check and preparation significantly improves the startup reliability, operational stability, and safety of the electric drive control software system, providing a solid foundation for subsequent high-precision closed-loop control and ensuring the motor operates safely, efficiently, and accurately under various operating conditions.
[0034] This application further proposes that the fixed control function in the optimization algorithm module is: ,in , , These are constant parameters preset according to the operating conditions. To provide real-time position and angle feedback, the system... Dynamically optimize torque and speed output. The constant parameters in the optimization algorithm module... , , These are fixed values preset based on long-term motor operation test data and adapted to different operating conditions; and the fixed control function... Used to describe motor torque With position feedback angle The nonlinear mapping relationship between them is used to output different torque compensation amounts in different rotor position ranges.
[0035] Specifically, the fixed control function It is a combination of trigonometric functions that can effectively fit and compensate for periodic or quasi-periodic nonlinear torque fluctuations exhibited by a motor at different rotor angles, such as cogging torque and reluctance torque. This is achieved by adjusting constant parameters. , , This function can flexibly capture periodic changes in different phases and amplitudes, thus accurately describing the motor torque. With position feedback angle The nonlinear mapping relationship between them. During system operation, the optimization algorithm module will adjust the angle based on the real-time position feedback signal. Calculate The value is used as an optimization factor to adjust the output parameters of the adaptive control module in real time.
[0036] The constant parameter , , Instead of real-time calculation, the calculation is pre-set during the system design or debugging phase through in-depth analysis and modeling of long-term operating test data of the motor under different operating conditions. For example, the deviation curve between the actual torque output and the ideal torque output of the motor at different rotor positions can be obtained through offline identification and experimental measurement. Then, the least squares method or other optimization algorithms are used to fit the curve that best represents this deviation. , , These parameters, once determined, are fixed within the optimization algorithm module as adaptable values for different operating conditions, used for subsequent real-time optimization. This pre-defined approach ensures the accuracy and applicability of the parameters, avoiding the complexity and computational burden of online real-time identification.
[0037] The fixed control function Its core function lies in its ability to accurately simulate the deviation between the actual torque and the theoretical torque of a motor at different rotor positions, caused by factors such as magnetic circuit saturation and cogging effect. When the optimization algorithm module calculates... After the value is given, this value can be interpreted as the current rotor angle. The amount of torque compensation that needs to be applied. For example, if A positive value indicates that the motor torque is too low at that angle, requiring an increase in output; a negative value indicates that the torque is too high, requiring a decrease in output. By adding this compensation amount to the output parameters of the adaptive control module (such as PID parameters or direct torque commands), fine-tuning of the motor's output torque can be achieved, thereby eliminating or significantly reducing position-dependent torque fluctuations and ensuring that the motor outputs stable and precise torque throughout its entire rotation cycle.
[0038] This application further proposes that the system adopts a hierarchical control architecture, in which the position detection module, task adaptation module, adaptive control module and optimization algorithm module are linked through a feedback loop to form a modular design; wherein, the output of the position detection module is simultaneously fed to the task adaptation module and the adaptive control module, and the output of the adaptive control module is fed back to the task adaptation module to assist in mode switching decisions.
[0039] By adopting a hierarchical control architecture and tightly linking the position detection module, task adaptation module, adaptive control module, and optimization algorithm module through feedback loops, this system achieves a highly modular design. This design not only improves the system's maintainability and scalability, but more importantly, by simultaneously feeding the output of the position detection module to both the task adaptation and adaptive control modules, it ensures that key state information is acquired in a timely and comprehensive manner. This accelerates the mode switching decision-making process of the task adaptation module and the dynamic adjustment response of the adaptive control module. Furthermore, the output of the adaptive control module is fed back to the task adaptation module, enabling intelligent optimization of mode switching decisions based on the actual operating performance of the motor, avoiding blind switching and further improving the accuracy and smoothness of mode switching. This collaborative working mechanism significantly enhances the system's ability to perceive and respond to changes in motor state, effectively solving the problems of information lag and decision incoordination between modules, thus achieving more precise, efficient, and robust closed-loop control of the motor.
[0040] This application further proposes that, in the high torque mode, the adaptive control module is configured to increase the motor current and speed to improve torque output; in the low power mode, the adaptive control module is configured to reduce the motor power output to reduce energy consumption; and, during mode switching, the adaptive control module adopts a smooth transition algorithm to avoid the impact of sudden torque changes on the system.
[0041] Specifically, in high-torque mode, the adaptive control module increases the current flowing through the motor windings by adjusting the control signals of the motor driver, such as the duty cycle of the pulse-width modulation (PWM) signal or the output voltage. Simultaneously, to meet the demand for high torque output, the adaptive control module also correspondingly increases the motor's target speed to ensure that the motor can provide sufficient power under heavy loads or conditions requiring rapid acceleration. This configuration aims to maximize the motor's instantaneous output capability to cope with high load or dynamic response requirements.
[0042] Through the above technical solution, this application can flexibly adjust the motor's operating strategy according to actual working conditions. In high-torque mode, by increasing current and speed, it ensures that the motor provides sufficient power under heavy load or when a rapid response is required. In low-power mode, by reducing power output, unnecessary energy consumption is effectively reduced, improving the overall energy efficiency of the system. More importantly, when switching between different control modes, the adaptive control module adopts a smooth transition algorithm, effectively avoiding system shocks and vibrations caused by sudden changes in torque or speed. This significantly improves the system's operational stability, reliability, and user experience, and helps extend the service life of the motor and related mechanical components.
[0043] This application further proposes that the system also includes an embedded real-time operating system for scheduling the task execution sequence of the position detection module, task adaptation module, adaptive control module and optimization algorithm module, to ensure that the end-to-end delay from position signal acquisition to control output update is less than a preset real-time threshold.
[0044] Specifically, an embedded real-time operating system (RTOS) is an operating system specifically designed for embedded systems, capable of responding to external events within a specified timeframe. Its core characteristic is "real-time performance," meaning it has strict time constraints and can ensure task completion within a specific point in time or time period. In electric drive control software systems, the RTOS typically manages system resources, schedules task execution, handles interrupts, and provides inter-process communication mechanisms, providing underlying support for the stable and efficient operation of various control modules.
[0045] The aforementioned electric drive control software system based on position feedback acquires the motor status in real time through a position detection module, and achieves high-precision closed-loop control of the motor through the collaborative work of a task adaptation module, an adaptive control module, and an optimization algorithm module. However, when facing rapidly changing dynamic loads or external disturbances, the pure feedback control mechanism often exhibits a certain degree of lag; that is, the system needs to detect the occurrence of errors before making corresponding adjustments. This lag may lead to insufficient system response speed, making it difficult to maintain optimal control accuracy in certain highly dynamic application scenarios, especially when errors accumulate or transient shocks occur, potentially resulting in a temporary performance degradation.
[0046] In this regard, this application further proposes that the adaptive control module is also used to: predict the position deviation change trend within a future predetermined time window based on the velocity and acceleration information in the real-time position feedback signal, and perform feedforward compensation on the optimized control parameters based on the change trend, so as to further improve the system's response speed and control accuracy under dynamic load changes.
[0047] Through the above technical solution, the adaptive control module no longer passively adjusts based solely on the current real-time position feedback signal. Instead, it proactively utilizes the velocity and acceleration information in the real-time position feedback signal to predict the trend of the motor's position deviation within a predetermined time window. Based on this forward-looking prediction, the system can perform feedforward compensation on the optimized control parameters before the actual deviation occurs. This feedforward compensation mechanism, combined with the original closed-loop feedback control, forms a more proactive and efficient control strategy. It effectively overcomes the lag of pure feedback control, enabling the system to respond and adjust earlier when facing rapidly changing dynamic loads or external disturbances. This significantly improves the motor's response speed and further enhances control accuracy under dynamic conditions, ensuring stable and precise motor operation in various complex environments.
[0048] The core innovation of this embodiment lies in providing real-time position feedback angles. With preset fixed control functions By combining nonlinear mapping, control parameters are optimized in real time under dynamic load changes, which solves the problems of insufficient dynamic adaptability and limited control accuracy in traditional control technology, and achieves the effect of improving system response speed and energy efficiency.
[0049] To address this, this application proposes an electric drive control method based on position feedback, applied to the aforementioned system, comprising the following steps: Step S1: The current position, speed, and acceleration information of the motor are obtained in real time through the position detection module, and a real-time position feedback signal is generated; Step S2: The task adaptation module automatically selects and switches the motor control mode based on the real-time position feedback signal and the current task requirements. The control mode includes at least a high torque mode and a low power consumption mode. Step S3: The optimization algorithm module uses the position feedback angle from the real-time position feedback signal as a basis. Using fixed control functions Calculate the optimized control parameters; Step S4: The adaptive control module dynamically adjusts the output torque and speed of the motor according to the optimized control parameters and the selected control mode to achieve high-precision closed-loop control of the motor.
[0050] In step S1, the position detection module is configured to acquire real-time operating status data of the motor. This module includes an encoder and / or a Hall sensor, with feedback accuracy down to the millisecond level, and is based on the formula for the change in motor angle: Real-time calculation of motor angle, where This represents the instantaneous rotational speed. This formula ensures that the position detection module can accurately capture the dynamic changes in the motor angle, providing high-precision input for subsequent control.
[0051] In step S2, the task adaptation module is configured to adapt to the real-time location. Determine the load status. When the position error... When the load exceeds the preset high load threshold, it is determined to be a heavy load or high load, and the system automatically switches to high torque mode; when the position error... When the load falls below a preset low-load threshold, it is determined to be a light load or low load, and automatically switches to low-power mode; when the position error... When the load falls between the high and low load thresholds, the current mode is maintained or the system switches to a balanced mode. This module achieves intelligent switching of control modes by dynamically evaluating position errors, thereby adapting to different load scenarios.
[0052] In step S3, the fixed control function in the optimization algorithm module is... Used to describe motor torque With position feedback angle The nonlinear mapping relationship between them. Constant parameters. , , These are fixed values preset based on long-term motor operation test data, adapted to different operating conditions. The system is based on... Dynamically optimize torque and speed output to provide different torque compensation amounts in different rotor position ranges, ensuring that control parameters are highly matched with the physical characteristics of the motor.
[0053] In step S4, the adaptive control module uses a PID control formula to adjust the output torque in real time: ,in To control the output torque, This represents the error between the current position and the desired position. , , These are the proportional, integral, and derivative coefficients, respectively. This module dynamically adjusts the proportional coefficient based on the optimization parameters output by the optimization algorithm module. Integral coefficient and differential coefficients At least one of these components enables fine-tuning of the motor output. In high-torque mode, the adaptive control module is configured to increase the motor current and speed to improve torque output; in low-power mode, the adaptive control module is configured to reduce the motor power output to reduce energy consumption; and during mode switching, the module employs a smooth transition algorithm to avoid the impact of sudden torque changes on the system.
[0054] The system performs initialization operations upon startup, including: loading preset task parameters and the mode selector, activating the fault monitoring mechanism to detect the initial state of the system, and waiting to receive real-time position feedback signals from the motor. The fault monitoring mechanism includes self-diagnosis of at least one fault among encoder signal loss, sensor malfunction, overcurrent, and overtemperature. The system adopts a hierarchical control architecture, with the position detection module, task adaptation module, adaptive control module, and optimization algorithm module linked through feedback loops to form a modular design. Specifically, the output of the position detection module is simultaneously fed to both the task adaptation module and the adaptive control module, while the output of the adaptive control module is fed back to the task adaptation module to assist in mode switching decisions.
[0055] In addition, the system includes an embedded real-time operating system to schedule the execution timing of the position detection module, task adaptation module, adaptive control module, and optimization algorithm module, ensuring that the end-to-end delay from position signal acquisition to control output update is less than a preset real-time threshold. The adaptive control module is also used to: predict the position deviation change trend within a predetermined time window based on the velocity and acceleration information in the real-time position feedback signal, and perform feedforward compensation on the optimized control parameters based on this trend to further improve the system's response speed and control accuracy under dynamic load changes.
[0056] Through the above technical solutions, this application can effectively cope with complex load changes, improve the dynamic adaptability, energy efficiency, response speed and control accuracy of the system, and ensure that the motor can operate stably, efficiently and accurately under different working conditions.
[0057] The following example will provide a more detailed explanation of the above technical solution: In an electric drive control scenario for an electric vehicle, this system is deployed to manage the performance of the drive motor.
[0058] System Startup and Initialization: When the electric vehicle starts, the system first performs initialization operations. This includes loading preset task parameters and a mode selector, such as torque response curves and energy consumption targets for different driving modes (Economy, Sport). Simultaneously, a fault monitoring mechanism is activated to perform self-diagnosis of initial conditions such as encoder signal loss, Hall sensor malfunction, motor overcurrent, and overtemperature. The system then waits to receive real-time position feedback signals from the drive motor.
[0059] Real-time position detection: The position detection module operates continuously during vehicle operation. This module uses an encoder 100 and / or a Hall sensor 200 integrated on the motor to detect the current position, speed, and acceleration information of the drive motor in real time with millisecond-level accuracy. For example, when the motor rotates, the encoder 100 outputs pulse signals, and the position detection module uses these pulse signals and a formula based on changes in the motor angle: The precise angle of the motor can be calculated in real time. ,in This refers to the instantaneous rotational speed. This information is integrated into a real-time position feedback signal and simultaneously fed to the task adaptation module and the adaptive control module.
[0060] Task Adaptation and Mode Switching: After receiving the real-time position feedback signal, the task adaptation module, combined with the current driver's accelerator pedal opening, vehicle speed, and other task requirements, determines the motor's load status. For example, when the vehicle is traveling at a constant speed on a flat road, the task adaptation module will calculate the real-time position. If the positional error If the load is below the preset low load threshold, the system determines it to be a light load or low load condition, and the task adaptation module automatically switches the motor control mode to a low power consumption mode to optimize energy efficiency.
[0061] Position error occurs when the vehicle begins to climb a hill or when the driver presses the accelerator pedal deeply to accelerate quickly. The load may increase rapidly and exceed the preset high-load threshold. At this point, the task adaptation module will determine it as a heavy-load or high-load condition and automatically switch the control mode to high-torque mode to provide stronger driving force. If the position error... Between the high load threshold and the low load threshold, the system will maintain the current mode or switch to a balanced mode. This mode switching mechanism based on real-time load solves the problem of insufficient dynamic adaptability of traditional control systems under complex operating conditions, avoiding response delays and efficiency reductions.
[0062] Optimization Algorithm and Adaptive Control: After a mode switch, such as switching to high-torque mode, the adaptive control module dynamically adjusts the motor's output torque and speed based on real-time position feedback signals and the currently selected high-torque mode. Simultaneously, the optimization algorithm module receives real-time position feedback angles. This module has a built-in fixed control function based on position feedback angle. ,in , , These are constant parameters preset based on long-term motor operation test data, adapted to different operating conditions. This function is used to describe the motor torque. With position feedback angle The nonlinear mapping relationship between them allows for the output of different torque compensation amounts in different rotor position ranges. The optimization algorithm module, based on... The optimized control parameters are calculated and output to the adaptive control module.
[0063] The adaptive control module uses the PID control formula: The output torque is adjusted in real time. Among other things, To control the output torque, This represents the error between the current position and the desired position. , , These are the proportional, integral, and derivative coefficients, respectively. The adaptive control module dynamically adjusts the parameters based on the optimization parameters output by the optimization algorithm module. , and At least one of these. For example, in high-torque mode, the adaptive control module increases the motor's current and speed to improve torque output, while adjusting the PID coefficients according to optimized parameters to ensure the motor can still respond quickly and maintain high precision under heavy loads. During mode switching, the adaptive control module also employs a smooth transition algorithm to avoid the impact of sudden torque changes on vehicle ride stability.
[0064] Furthermore, the adaptive control module utilizes velocity and acceleration information from the real-time position feedback signal to predict the position deviation trend within a predetermined time window, and performs feedforward compensation on the optimized control parameters based on this trend. This further improves the system's response speed and control accuracy under dynamic load changes, solving the problem of limited tracking performance of traditional control under complex operating conditions.
[0065] System Architecture and Real-Time Performance: The entire system adopts a hierarchical control architecture. The position detection module, task adaptation module, adaptive control module, and optimization algorithm module are linked through feedback loops to form a modular design. The output of the position detection module is simultaneously fed to the task adaptation module and the adaptive control module, while the output of the adaptive control module (such as actual torque and speed) is also fed back to the task adaptation module to assist it in making more accurate mode switching decisions.
[0066] An embedded real-time operating system is responsible for scheduling the execution timing of these modules, ensuring that the end-to-end delay from position signal acquisition to control output update is less than a preset real-time threshold. This design guarantees that the system can respond quickly and accurately to dynamic load changes, overcoming the limitations of technologies such as model predictive control (MPC) in terms of computing resources and real-time performance.
[0067] Through the above collaborative work, this system achieves high-precision closed-loop control of the motor, effectively solving the shortcomings of traditional motor control technology in terms of dynamic adaptability, energy efficiency, response speed and control accuracy, as well as fault prediction and self-repair.
[0068] Real-time feedback and task adaptation capability: Traditional motor control systems typically use fixed control parameters, which cannot flexibly adapt to real-time changes in task requirements and load conditions. This method leads to low control efficiency under varying operating conditions. This patented technology, however, achieves the ability to dynamically respond to real-time load and task requirements through the collaborative work of a position detection module, an adaptive control module, and a task adaptation module.
[0069] Multi-mode control and dynamic switching: Traditional motor control systems typically offer only a single control mode (such as constant power mode), exhibiting instability under different loads or environments. This patented technology introduces multi-mode control, including a high-torque mode and a low-power mode, which can automatically switch modes when load changes are detected, thereby improving the system's adaptability and efficiency.
[0070] Feedback-based adaptive optimization algorithm: Traditional techniques generally only provide simple PID control, which has poor adaptability. This method applies a feedback-based adaptive optimization algorithm and uses a specific fixed optimization control function to adjust the output parameters based on real-time feedback signals, ensuring precise motor control under various task requirements and load conditions. This approach effectively solves the control lag problem caused by changes in operating conditions by dynamically adjusting the control strategy.
[0071] Hierarchical Control Architecture and Modular Design: Previous motor control systems were mostly single-layer control structures with unclear functional divisions, making them difficult to expand and maintain. This patent is based on a modular and hierarchical control architecture design, which independently modularizes position detection, task adaptation, optimization algorithms, etc., and links these modules through feedback loops, facilitating system expansion and customization.
[0072] Improved task execution efficiency and accuracy: Through real-time feedback and adaptive adjustment, this technology ensures rapid response and precise control under high load changes, effectively improving the efficiency and accuracy of task execution, and is particularly suitable for complex industrial tasks and application scenarios with high load changes.
[0073] The introduction of adaptive optimization algorithms enhances control accuracy: Traditional fixed-parameter control strategies such as PID control suffer from lag when the environment changes rapidly. The adaptive optimization algorithm module adjusts control parameters based on real-time feedback, improving the dynamic control accuracy of the system. This algorithm not only optimizes motor output torque and speed but also adaptively enhances control performance during task execution through dynamic parameter adjustment.
[0074] Modular design and hierarchical structure enhance scalability and maintainability: Traditional systems are mostly single-layered with high module coupling, resulting in poor scalability and maintainability. By adopting a modular, hierarchical structure, and using feedback loops to loosely couple the modules, each module (position detection, adaptive control, task adaptation, optimization algorithm) operates independently, giving the system high scalability and ease of maintenance.
[0075] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A position feedback-based electric drive control software system, characterized in that, include: The position detection module is used to detect the current position, speed and acceleration information of the motor in real time and generate a real-time position feedback signal; The task adaptation module, connected to the position detection module, is used to automatically select and switch the motor control mode according to the real-time position feedback signal and the current task requirements. The control mode includes at least a high torque mode and a low power consumption mode. An adaptive control module, connected to the task adaptation module, is used to dynamically adjust the output torque and speed of the motor according to the real-time position feedback signal and the selected control mode; An optimization algorithm module, connected to the adaptive control module, has a built-in fixed control function based on the position feedback angle, used to optimize the output parameters of the adaptive control module in real time. The adaptive control module dynamically adjusts the output torque and speed of the motor according to the optimized control parameters to achieve high-precision closed-loop control of the motor.
2. The electric drive control software system based on position feedback according to claim 1, characterized in that: The task adaptation module is configured to: adjust based on real-time position error. The system determines the load status. When the position error e exceeds the preset high load threshold, it is determined to be a heavy load or high load, and automatically switches to high torque mode. When the position error e is lower than the preset low load threshold, it is determined to be a light load or low load, and automatically switches to low power consumption mode. When the position error e is between the high load threshold and the low load threshold, the current mode is maintained or the system switches to balanced mode.
3. The electric drive control software system based on position feedback according to claim 1, characterized in that: The adaptive control module uses the following PID control formula to adjust the output torque in real time: ; in, To control the output torque, This represents the error between the current position and the desired position. , , These are the proportional, integral, and derivative coefficients, respectively; and the adaptive control module dynamically adjusts the proportional coefficient based on the optimization parameters output by the optimization algorithm module. Integral coefficient and differential coefficients At least one of them.
4. The electric drive control software system based on position feedback according to claim 1, characterized in that: The position detection module includes an encoder and / or a Hall sensor, with feedback accuracy down to the millisecond level; the position detection module is also used to determine the position based on the motor angle change formula: Real-time calculation of motor angle, where This refers to the instantaneous rotational speed.
5. The electric drive control software system based on position feedback according to claim 1, characterized in that: The system performs initialization operations upon startup, including: loading preset task parameters and a mode selector, activating a fault monitoring mechanism to detect the initial state of the system, and waiting to receive real-time position feedback signals from the motor; the fault monitoring mechanism includes self-diagnosis of at least one fault among encoder signal loss, sensor malfunction, overcurrent, and overtemperature.
6. The electric drive control software system based on position feedback according to claim 1, characterized in that: The fixed control function in the optimization algorithm module is: in , , To be based on the preset constant parameters according to the working conditions, To provide real-time position and angle feedback, the system... Dynamically optimize torque and speed output; The constant parameters in the optimization algorithm module , , These are fixed values preset based on long-term motor operation test data and adapted to different operating conditions; and the fixed control function... Used to describe motor torque With position feedback angle The nonlinear mapping relationship between them is used to output different torque compensation amounts in different rotor position ranges.
7. The electric drive control software system based on position feedback according to claim 1, characterized in that: The system adopts a hierarchical control architecture. The position detection module, task adaptation module, adaptive control module, and optimization algorithm module are linked through a feedback loop to form a modular design. The output of the position detection module is simultaneously fed to the task adaptation module and the adaptive control module, and the output of the adaptive control module is fed back to the task adaptation module to assist in mode switching decisions.
8. The electric drive control software system based on position feedback according to claim 1, characterized in that: In the high-torque mode, the adaptive control module is configured to increase the motor current and speed to improve torque output; in the low-power mode, the adaptive control module is configured to reduce the motor power output to reduce energy consumption; and during mode switching, the adaptive control module adopts a smooth transition algorithm to avoid the impact of sudden torque changes on the system.
9. The electric drive control software system based on position feedback according to claim 1, characterized in that: The system also includes an embedded real-time operating system for scheduling the execution timing of the position detection module, task adaptation module, adaptive control module, and optimization algorithm module, ensuring that the end-to-end delay from position signal acquisition to control output update is less than a preset real-time threshold.
10. The electric drive control software system based on position feedback according to claim 1, characterized in that: The adaptive control module is also used to: predict the position deviation change trend within a predetermined time window based on the velocity and acceleration information in the real-time position feedback signal, and perform feedforward compensation on the optimized control parameters based on the change trend, so as to improve the system's response speed and control accuracy under dynamic load changes.