A method and system for implementing real-time position output of a motor in an electronic simulation platform

By constructing a signal processing structure in the simulation platform to generate real-time motor position output, the problem that the motor model cannot directly output position information is solved, achieving stable and continuous motor position output, applicable to various motor types and control strategies, and reducing system complexity.

CN122154593APending Publication Date: 2026-06-05陈树亮

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
陈树亮
Filing Date
2026-03-02
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

The existing simulation platform cannot directly output real-time rotor position information from the motor model, which makes it impossible to implement advanced motor control algorithms based on position closed loop. Furthermore, the reliance on external hardware sensors and complex estimation methods present complexity and accuracy issues in the simulation environment.

Method used

By constructing a signal processing structure in the simulation platform, the original state signals of the virtual motor model are obtained. Continuous angle information is generated using numerical integration algorithms and signal processing modules, and then converted into real-time angle feedback signals through the output mapping module. This method is applicable to various motor types and control strategies.

Benefits of technology

It achieves stable and continuous real-time motor position output in the simulation platform, reduces system complexity, improves the integrity and versatility of advanced control algorithm simulation, and is applicable to various motor types and control strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122154593A_ABST
    Figure CN122154593A_ABST
Patent Text Reader

Abstract

The application discloses a method and system for realizing real-time position output of a motor in an electronic simulation platform, and comprises the steps of obtaining original state signals of a virtual motor model in a simulation time domain through a signal acquisition interface. The application constructs a signal processing structure for motor position calculation in a simulation environment, continuously processes motor operating states, generates angle information corresponding to motor rotor positions, and encapsulates the angle information as real-time position output signals which can be directly used for feedback of a control system. Further, the angle output is uniformly mapped and adapted to an interface, so that it can be directly sampled or called by a motor control algorithm, thereby realizing motor position closed-loop control simulation. The application effectively solves the problem of lack of position information of a motor model in an existing simulation platform, improves the integrity and stability of motor advanced control algorithm simulation, reduces system simulation complexity, and has good universality and engineering application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of motor control and simulation technology, specifically to a method and system for realizing real-time position output of a motor in an electronic simulation platform. Background Technology

[0002] Proteus, a powerful platform widely used in electronic circuit design and simulation, includes various built-in motor models, including but not limited to three-phase brushless DC motors (BLDC) and three-phase asynchronous motors, greatly facilitating the design and verification of motor control systems. However, these motor models share a significant common drawback in practical applications: they cannot directly output the real-time rotor position information of the motor. This limitation severely restricts the ability to implement advanced position-closed-loop based motor control algorithms on the Proteus platform, such as field-oriented control (FOC), direct torque control (DTC), angle-sampling-based current loop control, and precise position control.

[0003] In traditional motor control simulation solutions, obtaining rotor position information typically relies on external hardware sensors, such as encoders and resolvers, or indirectly through current and voltage sensors combined with complex estimation algorithms. However, these methods face numerous challenges when reproducing the simulation in a real-world environment. 1. Dependence on external hardware sensors: Traditional methods often require the installation of physical sensors in the actual hardware system, which is obviously impossible in a pure simulation environment. Even if these sensors are simulated through modeling, it will significantly increase the complexity of the system and the difficulty of simulation.

[0004] 2. High integration complexity: Integrating external sensor models into the simulation platform requires not only accurate sensor modeling but also handling the complex interface issues between the sensors and motor models, which greatly increases the complexity of system integration.

[0005] 3. Poor accuracy and versatility: Estimation methods based on current and voltage sensors are often affected by various factors such as changes in motor parameters and noise interference, resulting in inaccurate estimation results. Furthermore, these methods are typically designed for specific types of motors or control strategies, lacking versatility and making it difficult to adapt to the needs of different motor types and control strategies. Summary of the Invention

[0006] To address the aforementioned technical problems, a method and system for realizing real-time motor position output in an electronic simulation platform are provided. This technical solution solves the problems mentioned in the background section.

[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows: In a first aspect of the present invention, a method for realizing real-time position output of a motor in an electronic simulation platform is provided. The method is applied in a simulation circuit environment including a virtual motor model and a controller, and includes the following steps: The original state signals of the virtual motor model in the simulation time domain are obtained through the signal acquisition interface. The original state signals include the rotor mechanical angular velocity, electrical angular velocity or electromagnetic torque signal of the motor. The original state signal is input to the signal processing module, and the original state signal is accumulated in the time dimension through the numerical integration algorithm to generate the angle base quantity that continuously advances with the simulation time. The angle base quantity is a monotonically increasing or decreasing value without periodic limitation. Based on the motor's rotation direction logic signal, the polarity of the angle base quantity's numerical change trend is determined and dynamically corrected to ensure that the cumulative direction of the angle data is consistent with the motor's actual rotation direction. The angle encapsulation module performs modulo operation and range limiting on the corrected angle base quantity, forcibly constraining the angle value to within 0° to 360°, and eliminates the jump error when the value crosses the boundary through periodic closed logic. The encapsulated angle value is converted into a standardized physical signal or digital protocol using the output mapping module to generate a real-time angle feedback signal. The real-time angle feedback signal is transmitted back to the feedback input of the controller, serving as the position feedback source for the closed-loop control algorithm.

[0008] Preferably, obtaining the original state signal of the virtual motor model in the simulation time domain specifically includes the following steps: A multi-channel signal acquisition buffer is established to perform time-domain sampling on the rotor mechanical angular velocity signal of the motor output by the virtual motor model; An adaptive moving average filtering algorithm is introduced to denoise the sampled data and obtain the original state signal; When using adaptive moving average filtering, the formula for calculating the filter output value is as follows: ; in, This is the estimated filtered angular velocity at the current moment; For the current moment and the previous moment The original sampled values ​​at each time point; The dynamic window length, whose value is related to angular acceleration. Inversely proportional, that is: ; in, The constant coefficients, To prevent division by zero of tiny positive numbers.

[0009] Preferably, the step of performing a numerical integration algorithm to accumulate the original state signal in the time dimension employs a high-precision Runge-Kutta method, and the specific processing logic is as follows: The fourth-order Runge-Kutta method was used to calculate the angular foundation quantity. Through calculation Four slope weighted values ​​are used to approximate the true angle; ; The formulas for calculating each slope component are as follows: ; ; ; ; in, and These are the basic angle quantities for the next and current moments, respectively. This is the simulation step size, which is also the integration step size; Angular velocity is a function of time and angle; These are the slope estimates for each stage; After each integration iteration, calculate the estimated local truncation error at the current step size. ,like If the absolute value is greater than the allowable error limit, the simulation step size will be automatically halved and recalculated until the error meets the requirements, ensuring that the basic angular quantity does not accumulate drift during long-term simulation. and The calculation formula uses the embedded formula method and is as follows: ; in, The result is calculated using the fifth-order method. This is the result calculated using the fourth-order method.

[0010] Preferably, the polarity determination and dynamic correction of the numerical change trend of the basic angular quantity specifically includes the following steps: Define direction signal This is a binary logic value, where 1 represents forward rotation and -1 represents reverse rotation. The system sets a direction confirmation counter, which is activated only if there are N consecutive sampling periods, N≥3. Only when the rotation direction of the motor is kept consistent can it be confirmed that the rotation direction has reversed, to prevent incorrect angle accumulation due to signal glitches; Real-time calculation of electromagnetic torque With current angular velocity product sign The calculation formula is: ; in, It is a symbolic function; If S < 0, meaning the torque and velocity are in opposite directions, the system is in a braking state, and the duration exceeds [a certain value]. If the result is not cleared, it is determined as a "traffic jam warning" or "emergency stop". At this time, the cumulative trend of the basic angle is forcibly locked, or the angle prediction value is corrected in reverse according to the deceleration curve model. ; in, This is the corrected angular velocity; This is the moment when braking begins; The attenuation coefficient is determined by the motor's moment of inertia J and the braking torque. Decision, then .

[0011] Preferably, the modulus calculation and range limiting processing of the corrected angular baseline specifically includes: Use high-precision mathematical library functions to analyze fundamental angle quantities. Perform modulo operation, the calculation formula is: ; in, This is the floor function; The angle value after modulo operation, ranging from [0, ... ); To eliminate jump errors when values ​​cross boundaries, the system has built-in boundary crossing detection logic: Calculate the difference between the current angle and the angle of the previous cycle in real time. The calculation formula is: ; like That is, it is determined that a crossing has occurred. / The jump of the line is determined by the rotation direction flag. ,right Perform ± The compensation correction generates monotonically continuous physical angles. ; The corrected formula is: ; in, Indicates forward rotation. Indicates reversal; Simultaneously, a dead-zone limit is set. When a non-physical abnormal change occurs in the basic angle value, the angle value of the previous valid cycle is output and an abnormality flag is triggered. The limit judgment formula is: ; in, The maximum permissible angle change per step is determined by the motor's rated speed and the simulation step size. The safety factor is 1.5.

[0012] Preferably, the output mapping module supports analog voltage signal mapping or logic signal encoding, enabling the angle signal to be adapted to different input structures of analog sampling controllers or digital logic controllers.

[0013] Preferably, the method is applicable to various motor types, including but not limited to three-phase brushless DC motors and three-phase induction motors, and supports modeling extensions of motor parameters with different pole pairs, torque constants, and rotor inertia.

[0014] In a second aspect of the invention, a system for realizing real-time position output of a motor in an electronic simulation platform is also provided, comprising: The acquisition module is used to acquire the original state signals of the virtual motor model in the simulation time domain through the signal acquisition interface. The original state signals include the rotor mechanical angular velocity, electrical angular velocity or electromagnetic torque signal of the motor. The processing module is used to input the original state signal to the signal processing module, and to perform cumulative calculation on the original state signal in the time dimension through a numerical integration algorithm to generate a basic angle quantity that continuously advances with the simulation time. The basic angle quantity is a monotonically increasing or decreasing value without periodic limitation. The determination and correction module is used to determine the polarity and dynamically correct the numerical change trend of the basic angle quantity based on the rotation direction logic signal of the motor, so as to ensure that the cumulative direction of the angle data is consistent with the actual rotation direction of the motor. Modular calculation and limiting module, the modular calculation and limiting module is used to perform modular calculation and range limiting processing on the corrected angle base quantity through the angle encapsulation module, to forcibly constrain the angle value within 0° to 360°, and to eliminate the jump error when the value crosses the boundary through periodic closed logic; The feedback signal generation module is used to convert the encapsulated angle value into a standardized physical signal or digital protocol using the output mapping module, thereby generating a real-time angle feedback signal. The feedback module is used to transmit the real-time angle feedback signal back to the feedback input terminal of the controller, serving as the position feedback source for the closed-loop control algorithm.

[0015] Compared with the prior art, the present invention provides a method and system for realizing real-time position output of a motor in an electronic simulation platform, which has the following beneficial effects: This invention constructs a signal processing structure for motor position estimation within a simulation environment. It continuously processes the motor's operating state, generating angle information corresponding to the motor rotor position. This angle information is then encapsulated into a real-time position output signal that can be directly used for control system feedback. Furthermore, by uniformly mapping and adapting the angle output through interfaces, it can be directly sampled or invoked by the motor control algorithm, thereby achieving closed-loop control simulation of the motor position. Using this method, stable and continuous real-time motor position output can be achieved in the simulation platform without adding external sensors or disassembling and reprogramming the motor model. It is applicable to various types of motors and various control strategies. This method effectively solves the problem of insufficient position information in existing simulation platforms, improves the completeness and stability of advanced motor control algorithm simulation, reduces system simulation complexity, and has good versatility and engineering application value. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the method flow of S101-S106 in this invention; Figure 2 This is a schematic diagram of the method flow for S201-S203 in this invention; Figure 3 This is a schematic diagram of the method flow of S301-S303 in this invention; Figure 4 This is a schematic diagram of the system framework in this invention. Detailed Implementation

[0017] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.

[0018] Example 1 Please refer to Figure 1 As shown, in a first aspect of the present invention, a method for realizing real-time position output of a motor in an electronic simulation platform is provided. The method is applied in a simulation circuit environment including a virtual motor model and a controller, and includes the following steps: S101. Obtain the original state signal of the virtual motor model in the simulation time domain through the signal acquisition interface. The original state signal includes the rotor mechanical angular velocity, electrical angular velocity or electromagnetic torque signal of the motor. S102. Input the original state signal to the signal processing module, and perform cumulative calculation on the original state signal in the time dimension through the numerical integration algorithm to generate the angle base quantity that continuously advances with the simulation time. The angle base quantity is a monotonically increasing or decreasing value without periodic limitation. S103. Based on the motor's rotation direction logic signal, determine the polarity and dynamically correct the trend of the angle base quantity's value change to ensure that the cumulative direction of the angle data is consistent with the actual rotation direction of the motor. S104. The angle encapsulation module performs modulo operation and range limiting on the corrected angle base quantity, forcibly constrains the angle value to within 0° to 360°, and eliminates the jump error when the value crosses the boundary through periodic closed logic. S105. Use the output mapping module to convert the encapsulated angle value into a standardized physical signal or digital protocol to generate a real-time angle feedback signal. S106. The real-time angle feedback signal is transmitted back to the feedback input terminal of the controller as the position feedback source of the closed-loop control algorithm.

[0019] Those skilled in the art will understand that this invention constructs a signal processing structure for motor position estimation in a simulation environment, continuously processes the motor's operating state, generates angle information corresponding to the motor rotor position, and encapsulates this angle information into a real-time position output signal that can be directly used for control system feedback. Furthermore, by uniformly mapping and adapting the angle output to an interface, it can be directly sampled or called by the motor control algorithm, thereby achieving closed-loop control simulation of the motor position. Using this method, stable and continuous real-time motor position output can be achieved in the simulation platform without adding external sensors or disassembling and reprogramming the motor model. It is applicable to various types of motors and various control strategies. This method effectively solves the problem of insufficient position information in existing simulation platforms, improves the completeness and stability of advanced motor control algorithm simulation, reduces system simulation complexity, and has good versatility and engineering application value.

[0020] Obtaining the original state signal of the virtual motor model in the simulation time domain includes the following steps: A multi-channel signal acquisition buffer is established to perform time-domain sampling on the rotor mechanical angular velocity signal of the motor output by the virtual motor model; An adaptive moving average filtering algorithm is introduced to denoise the sampled data and obtain the original state signal; When using adaptive moving average filtering, the formula for calculating the filter output value is as follows: ; in, This is the estimated filtered angular velocity at the current moment; For the current moment and the previous moment The original sampled values ​​at each time point; The dynamic window length, whose value is related to angular acceleration. Inversely proportional, that is: ; in, The constant coefficients, To prevent division by zero of tiny positive numbers.

[0021] The original state signal is accumulated over time using a numerical integration algorithm, employing a high-precision Runge-Kutta method. The specific processing logic is as follows: The fourth-order Runge-Kutta method was used to calculate the angular foundation quantity. Through calculation Four slope weighted values ​​are used to approximate the true angle; ; The formulas for calculating each slope component are as follows: ; ; ; ; in, and These are the basic angle quantities for the next and current moments, respectively. This is the simulation step size, which is also the integration step size; Angular velocity is a function of time and angle; These are the slope estimates for each stage; After each integration iteration, calculate the estimated local truncation error at the current step size. ,like If the absolute value is greater than the allowable error limit, the simulation step size will be automatically halved and recalculated until the error meets the requirements, ensuring that the basic angular quantity does not accumulate drift during long-term simulation. and The calculation formula uses the embedded formula method and is as follows: ; in, The result is calculated using the fifth-order method. This is the result calculated using the fourth-order method.

[0022] Please refer to Figure 2 As shown, the polarity determination and dynamic correction of the numerical change trend of the basic angular quantity include the following steps: S201, Define direction signal This is a binary logic value, where 1 represents forward rotation and -1 represents reverse rotation. The system sets a direction confirmation counter, which is activated only if there are N consecutive sampling periods, N≥3. Only when the rotation direction of the motor is kept consistent can it be confirmed that the rotation direction has reversed, to prevent incorrect angle accumulation due to signal glitches; S202, Real-time calculation of electromagnetic torque With current angular velocity product sign The calculation formula is: ; in, It is a symbolic function; S203. If S < 0, meaning the torque and speed are in opposite directions, the vehicle is in a braking state, and the duration exceeds [a certain value]. If the result is not cleared, it is determined as a "traffic jam warning" or "emergency stop". At this time, the cumulative trend of the basic angle is forcibly locked, or the angle prediction value is corrected in reverse according to the deceleration curve model. ; in, This is the corrected angular velocity; This is the moment when braking begins; The attenuation coefficient is determined by the motor's moment of inertia J and the braking torque. Decision, then .

[0023] Please refer to Figure 3 As shown, modulo operations and range limiting are performed on the corrected angular baseline, specifically including: S301. Use high-precision mathematical library functions for basic angle quantities. Perform modulo operation, the calculation formula is: ; in, This is the floor function; The angle value after modulo operation, ranging from [0, ... ); S302. To eliminate jump errors when values ​​cross boundaries, the system has built-in boundary crossing detection logic: Calculate the difference between the current angle and the angle of the previous cycle in real time. The calculation formula is: ; like That is, it is determined that a crossing has occurred. / The jump of the line is determined by the rotation direction flag. ,right Perform ± The compensation correction generates monotonically continuous physical angles. ; The corrected formula is: ; in, Indicates forward rotation. Indicates reversal; S303. Simultaneously set dead zone limiting. When a non-physical abnormal change occurs in the basic angle quantity, output the angle value of the previous valid cycle and trigger the abnormal flag. The limiting judgment formula is: ; in, The maximum permissible angle change per step is determined by the motor's rated speed and the simulation step size. The safety factor is 1.5.

[0024] The output mapping module supports analog voltage signal mapping or logic signal encoding, enabling angle signals to be adapted to different input structures of analog sampling controllers or digital logic controllers.

[0025] The method is applicable to various motor types, including but not limited to three-phase brushless DC motors and three-phase induction motors, and supports modeling extensions of motor parameters with different pole pairs, torque constants, and rotor inertia.

[0026] Please refer to Figure 4 As shown, in a second aspect of the present invention, a system for realizing real-time position output of a motor in an electronic simulation platform is also provided, the system comprising: The acquisition module is used to acquire the original state signals of the virtual motor model in the simulation time domain through the signal acquisition interface. The original state signals include the rotor mechanical angular velocity, electrical angular velocity or electromagnetic torque signal of the motor. The processing module is used to input the original state signal to the signal processing module, and to perform cumulative calculation on the original state signal in the time dimension through a numerical integration algorithm to generate the angle base quantity that continuously advances with the simulation time. The angle base quantity is a monotonically increasing or decreasing value without periodic limitation. The judgment and correction module is used to determine the polarity and dynamically correct the numerical change trend of the basic angle quantity based on the motor's rotation direction logic signal, so as to ensure that the cumulative direction of the angle data is consistent with the actual rotation direction of the motor. Modular operation and limiting module: The modular operation and limiting module is used to perform modular operation and range limiting on the corrected angle base quantity through the angle encapsulation module, forcibly constraining the angle value within 0° to 360°, and eliminating the jump error when the value crosses the boundary through periodic closed logic. The feedback signal generation module is used to convert the encapsulated angle value into a standardized physical signal or digital protocol using the output mapping module, thereby generating a real-time angle feedback signal. The feedback module is used to transmit the real-time angle feedback signal back to the feedback input of the controller, serving as the position feedback source for the closed-loop control algorithm.

[0027] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.

Claims

1. A method for realizing real-time position output of a motor in an electronic simulation platform, characterized in that, The method is applied to a simulation circuit environment that includes a virtual motor model and a controller, and includes the following steps: The original state signals of the virtual motor model in the simulation time domain are obtained through the signal acquisition interface. The original state signals include the rotor mechanical angular velocity, electrical angular velocity or electromagnetic torque signal of the motor. The original state signal is input to the signal processing module, and the original state signal is accumulated in the time dimension through the numerical integration algorithm to generate the angle base quantity that continuously advances with the simulation time. The angle base quantity is a monotonically increasing or decreasing value without periodic limitation. Based on the motor's rotation direction logic signal, the polarity of the angle base quantity's numerical change trend is determined and dynamically corrected to ensure that the cumulative direction of the angle data is consistent with the motor's actual rotation direction. The angle encapsulation module performs modulo operation and range limiting on the corrected angle base quantity, forcibly constraining the angle value to within 0° to 360°, and eliminates the jump error when the value crosses the boundary through periodic closed logic. The encapsulated angle value is converted into a standardized physical signal or digital protocol using the output mapping module to generate a real-time angle feedback signal. The real-time angle feedback signal is transmitted back to the feedback input of the controller, serving as the position feedback source for the closed-loop control algorithm.

2. The method for realizing real-time position output of a motor in an electronic simulation platform according to claim 1, characterized in that, The process of obtaining the original state signal of the virtual motor model in the simulation time domain specifically includes the following steps: A multi-channel signal acquisition buffer is established to perform time-domain sampling on the rotor mechanical angular velocity signal of the motor output by the virtual motor model; An adaptive moving average filtering algorithm is introduced to denoise the sampled data and obtain the original state signal; When using adaptive moving average filtering, the formula for calculating the filter output value is as follows: ; in, This is the estimated filtered angular velocity at the current moment; For the current moment and the previous moment The original sampled values ​​at each time point; The dynamic window length, whose value is related to angular acceleration. Inversely proportional, that is: ; in, The constant coefficients, To prevent division by zero of tiny positive numbers.

3. The method for realizing real-time position output of a motor in an electronic simulation platform according to claim 2, characterized in that, The numerical integration algorithm for accumulating the original state signal over time employs a high-precision Runge-Kutta method, and the specific processing logic is as follows: The fourth-order Runge-Kutta method was used to calculate the angular foundation quantity. Through calculation Four slope weighted values ​​are used to approximate the true angle; ; The formulas for calculating each slope component are as follows: ; ; ; ; in, and These are the basic angle quantities for the next and current moments, respectively. This is the simulation step size, which is also the integration step size; Angular velocity is a function of time and angle; These are the slope estimates for each stage; After each integration iteration, calculate the estimated local truncation error at the current step size. ,like If the absolute value is greater than the allowable error limit, the simulation step size will be automatically halved and recalculated until the error meets the requirements, ensuring that the basic angular quantity does not accumulate drift during long-term simulation. and The calculation formula uses the embedded formula method and is as follows: ; in, The result is calculated using the fifth-order method. This is the result calculated using the fourth-order method.

4. The method for realizing real-time position output of a motor in an electronic simulation platform according to claim 3, characterized in that, The polarity determination and dynamic correction of the numerical change trend of the basic angular quantity specifically includes the following steps: Define direction signal This is a binary logic value, where 1 represents forward rotation and -1 represents reverse rotation. The system sets a direction confirmation counter, which is activated only if there are N consecutive sampling periods, N≥3. Only when the rotation direction of the motor is kept consistent can it be confirmed that the rotation direction has reversed, to prevent incorrect angle accumulation due to signal glitches; Real-time calculation of electromagnetic torque With current angular velocity product sign The calculation formula is: ; in, It is a symbolic function; If S < 0, meaning the torque and velocity are in opposite directions, the system is in a braking state, and the duration exceeds [a certain value]. If the result is "blockage warning" or "emergency stop", the cumulative trend of the angle base quantity will be forcibly locked, or the angle prediction value will be corrected in reverse according to the deceleration curve model. ; in, This is the corrected angular velocity; This is the moment when braking begins; The attenuation coefficient is determined by the motor's moment of inertia J and the braking torque. Decision, then .

5. A method for realizing real-time position output of a motor in an electronic simulation platform according to claim 4, characterized in that, The modulo operation and range limiting processing of the corrected angle base quantity specifically includes: Use high-precision mathematical library functions to analyze fundamental angle quantities. Perform modulo operation, the calculation formula is: ; in, This is the floor function; The angle value after modulo operation, ranging from [0, ... ); To eliminate jump errors when values ​​cross boundaries, the system has built-in boundary crossing detection logic: Calculate the difference between the current angle and the angle of the previous cycle in real time. The calculation formula is: ; like That is, it is determined that a crossing has occurred. / The jump of the line is determined by the rotation direction flag. ,right Perform ± The compensation correction generates monotonically continuous physical angles. ; The corrected formula is: ; in, Indicates forward rotation. Indicates reversal; Simultaneously, a dead-zone limit is set. When a non-physical abnormal change occurs in the basic angle value, the angle value of the previous valid cycle is output and an abnormality flag is triggered. The limit judgment formula is: ; in, The maximum permissible angle change per step is determined by the motor's rated speed and the simulation step size. The safety factor is 1.

5.

6. A method for realizing real-time position output of a motor in an electronic simulation platform according to claim 5, characterized in that, The output mapping module supports analog voltage signal mapping or logic signal encoding, enabling the angle signal to be adapted to different input structures of analog sampling controllers or digital logic controllers.

7. A method for realizing real-time position output of a motor in an electronic simulation platform according to claim 6, characterized in that, The method is applicable to various motor types, including but not limited to three-phase brushless DC motors and three-phase induction motors, and supports modeling extensions of motor parameters with different pole pairs, torque constants, and rotor inertia.

8. A system for realizing real-time position output of a motor in an electronic simulation platform, used to implement the method for realizing real-time position output of a motor in an electronic simulation platform as described in any one of claims 1-7, characterized in that, include: The acquisition module is used to acquire the original state signals of the virtual motor model in the simulation time domain through the signal acquisition interface. The original state signals include the rotor mechanical angular velocity, electrical angular velocity or electromagnetic torque signal of the motor. The processing module is used to input the original state signal to the signal processing module, and to perform cumulative calculation on the original state signal in the time dimension through a numerical integration algorithm to generate a basic angle quantity that continuously advances with the simulation time. The basic angle quantity is a monotonically increasing or decreasing value without periodic limitation. The determination and correction module is used to determine the polarity and dynamically correct the numerical change trend of the basic angle quantity based on the rotation direction logic signal of the motor, so as to ensure that the cumulative direction of the angle data is consistent with the actual rotation direction of the motor. Modular calculation and limiting module, the modular calculation and limiting module is used to perform modular calculation and range limiting processing on the corrected angle base quantity through the angle encapsulation module, to forcibly constrain the angle value within 0° to 360°, and to eliminate the jump error when the value crosses the boundary through periodic closed logic; The feedback signal generation module is used to convert the encapsulated angle value into a standardized physical signal or digital protocol using the output mapping module, thereby generating a real-time angle feedback signal. The feedback module is used to transmit the real-time angle feedback signal back to the feedback input terminal of the controller, serving as the position feedback source for the closed-loop control algorithm.