Method for testing an electric machine and electric machine
By adjusting the current control signal and collecting feedback signals while the motor is stationary, the voltage distortion problem caused by dead time is solved, and the accuracy and consistency of current loop testing are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN ZHONGQING ROBOT TECH CO LTD
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-02
AI Technical Summary
When the motor responds to the current control signal, the introduction of dead time causes phase voltage distortion, which affects the accuracy of the current loop test.
Upon receiving the current loop test command, the motor is kept stationary. The initial current control signal is adjusted by the preset bias parameters to generate the target current control signal. The current loop is run while the motor is stationary, and feedback signals are collected for testing.
It eliminates the influence of dead zone effect on voltage distortion, provides more accurate current loop test results, ensures current direction consistency, and improves the accuracy of current loop test.
Smart Images

Figure CN121763098B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of motor control, and more specifically, to a test method for a motor and a motor. Background Technology
[0002] In control systems, to prevent the switching transistors of the upper and lower bridge arms from conducting simultaneously during switching, which could cause a power supply short circuit, a dead time is designed, i.e., the on / off delay of the inverter's switching transistors. However, the introduction of dead time causes distortion in the motor phase voltage, resulting in a difference between the actual performance of the motor in response to the current control signal and the prediction under ideal conditions. This affects the accuracy of the current response, leading to lower accuracy in the motor's current loop test.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This application provides a test method and a motor for an electric motor, so as to at least solve the technical problem of low accuracy of current loop testing of electric motors in related technologies.
[0005] According to one aspect of the embodiments of this application, a method for testing a motor is provided, comprising: during the operation of a current loop corresponding to the motor based on an initial current control signal, if a current loop test command for the motor is received, controlling the motor to be in a stationary state, wherein the initial current control signal is used to control the current direction of the motor to change; while the motor is in a stationary state, adjusting the initial current control signal based on preset bias parameters to obtain a target current control signal, wherein the target current control signal is used to control the current direction of the motor to remain unchanged; operating the current loop based on the target current control signal and acquiring feedback signals of the current loop to the target current control signal; testing the current loop based on the feedback signals to obtain test results, wherein the test results are used to indicate whether the current loop parameters of the current loop are valid.
[0006] Furthermore, if a current loop test command for the motor is received, controlling the motor to be stationary includes: if a current loop test command is received, determining the braking torque of the electromagnetic brake based on the motor's running speed, wherein the electromagnetic brake is installed on the motor shaft; controlling the electromagnetic brake to generate a braking torque to brake the motor rotor so that the motor is stationary.
[0007] Furthermore, the signal frequency of the initial current control signal is analyzed to obtain the signal change period of the initial current control signal; based on the signal change period, the signal peak value and signal valley value of the initial current control signal are determined; based on the signal peak value and signal valley value, the target absolute value of the initial current control signal in the signal change period is determined, wherein the target absolute value is greater than a preset threshold; based on the target absolute value and the preset safety threshold, the preset bias parameter is determined.
[0008] Furthermore, based on the target absolute value and the preset safety threshold, a preset bias parameter is determined, including: determining the target difference between the target absolute value and the preset safety threshold; determining the target ratio between the target difference and the preset safety threshold; if the target ratio is greater than the preset ratio, decreasing the initial bias parameter to obtain the preset bias parameter; if the target ratio is less than the preset ratio, increasing the initial bias parameter to obtain the preset bias parameter; if the target ratio is the preset ratio, determining the initial bias parameter as the preset bias parameter.
[0009] Furthermore, based on the signal peak and signal valley values, the target absolute value of the initial current control signal during the signal change cycle is determined, including: acquiring the motor load mode of the motor, wherein the motor load mode is used to represent the load state of the motor connected to the load; determining the initial absolute value of the initial current control signal during the signal change cycle based on the signal peak and signal valley values; and adjusting the initial absolute value based on the motor load mode to obtain the target absolute value.
[0010] Furthermore, based on the signal peak and signal valley values, the target absolute value of the initial current control signal during the signal change cycle is determined, including: acquiring the motor load mode of the motor, wherein the motor load mode is used to represent the load state of the motor connected to the load; determining the initial absolute value of the initial current control signal during the signal change cycle based on the signal peak and signal valley values; and adjusting the initial absolute value based on the motor load mode to obtain the target absolute value.
[0011] Furthermore, based on the signal peak value and the signal valley value, the initial absolute value of the initial current control signal during the signal change period is determined, including: performing an absolute value conversion on the signal peak value to obtain a first absolute value; performing an absolute value conversion on the signal valley value to obtain a second absolute value; and determining the minimum absolute value between the first absolute value and the second absolute value as the initial absolute value.
[0012] Furthermore, the current loop is run based on the target current control signal, and the feedback signal of the current loop to the target current control signal is collected, including: inputting the target current control signal to the current loop and collecting the output current of the current loop; determining the error signal based on the target current and output current corresponding to the target current control signal; and collecting the feedback signal of the current loop to the target current control signal based on the error signal and a preset threshold.
[0013] Furthermore, based on the error signal and a preset threshold, the feedback signal of the current loop to the target current control signal is acquired, including: if the error signal is less than or equal to the preset threshold, the feedback signal of the current loop to the target current control signal is acquired; if the error signal is greater than the preset threshold, the target current control signal is adjusted based on the error signal to obtain an adjusted current control signal; the current loop is run based on the adjusted current control signal until the error signal between the output current of the current loop and the target current is less than or equal to the preset threshold, the adjusted current control signal is determined to be the target current control signal, and the feedback signal of the current loop to the target current control signal is acquired.
[0014] Furthermore, the current loop is tested based on the feedback signal to obtain test results, including: determining the response time parameter, overshoot parameter, and oscillation parameter in the feedback signal; if the response time parameter is within a preset response time interval, the overshoot parameter is within a preset overshoot interval, and the oscillation parameter is within a preset oscillation parameter interval, the test result is determined to be that the current loop parameters of the current loop are valid; if the response time parameter is not within a preset response time interval, or the overshoot parameter is not within a preset overshoot interval, or the oscillation parameter is not within a preset oscillation parameter interval, the test result is determined to be that the current loop parameters of the current loop are invalid.
[0015] According to another aspect of the embodiments of this application, a motor is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of this application when it runs.
[0016] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of this application when it runs.
[0017] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of this application.
[0018] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the methods of various embodiments of this application.
[0019] According to another aspect of the embodiments of this application, a computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods in various embodiments of this application.
[0020] According to another aspect of the embodiments of this application, a computer program is also provided, which, when executed by a processor, implements the methods of the various embodiments of this application.
[0021] In this embodiment, firstly, during the operation of the motor's corresponding current loop based on the initial current control signal, if a current loop test command for the motor is received, the motor is controlled to remain stationary to avoid phase current commutation caused by motor operation, thereby eliminating the dynamic influence of dead-zone effect on voltage distortion. After the motor is stationary, the initial current control signal is adjusted based on preset bias parameters to obtain the target current control signal. The application of preset bias parameters ensures that the current direction remains unchanged during the test, converting the voltage distortion caused by the dead-zone effect into a fixed deviation. Next, the current loop is operated based on the target current control signal, and the feedback signal of the current loop to the target current control signal is collected. By monitoring and analyzing the feedback signal in real time, the response of the current loop to the test command can be observed intuitively, eliminating the interference of dead-zone effect on the current response. Finally, the current loop is tested based on the feedback signal to obtain the test results. By quantitatively analyzing various performance indicators in the feedback signal, the effectiveness and performance level of the current loop control strategy can be objectively evaluated, thereby solving the technical problem of low accuracy in motor current loop testing in related technologies. Attached Figure Description
[0022] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0023] Figure 1 This is a flowchart of a test method for an electric motor according to an embodiment of this application;
[0024] Figure 2 This is a schematic diagram comparing the current loop response effects with and without dead zones according to an embodiment of this application;
[0025] Figure 3 This is a schematic diagram comparing the current loop response effects with and without dead zone under bias compensation according to an embodiment of this application;
[0026] Figure 4 This is a schematic diagram comparing the current loops with and without dead zones under a sinusoidal command according to an embodiment of this application;
[0027] Figure 5 This is a schematic diagram comparing the response effects of a sinusoidal current command with and without dead zone under bias compensation according to an embodiment of this application.
[0028] Figure 6This is a schematic diagram comparing the current loop response effect of a motor in a rotating state according to an embodiment of this application;
[0029] Figure 7 This is a schematic diagram of the phase current commutation dynamics during the rotation of a motor according to an embodiment of this application;
[0030] Figure 8 This is a schematic diagram of a test apparatus for an electric motor according to an embodiment of this application. Detailed Implementation
[0031] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0033] According to an embodiment of this application, a method embodiment for testing the current loop of a motor is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0034] This application provides a method for testing an electric motor and a method for testing electric motors. The method for testing electric motors can be used to provide current loop testing functionality for preset application scenarios. The preset application scenarios may include the following scenarios in the field: current loop testing scenarios for intelligent robots (such as cleaning robots, service robots, delivery robots, etc.).
[0035] When the aforementioned preset application scenario falls within a field other than robotics, those skilled in the art should understand that the robot in the above motor testing method can be replaced with other objects (such as agricultural machinery, drones, etc.), and correspondingly, the current loop test can be replaced with current loop performance evaluation related to other objects. Based on this, this application embodiment uses the field of motor drives as an example to exemplify the specific implementation of the motor testing method.
[0036] Figure 1 This is a flowchart of a test method for an electric motor according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:
[0037] Step S102: During the operation of the motor's corresponding current loop based on the initial current control signal, if a current loop test command for the motor is received, the motor is controlled to be stationary. The initial current control signal is used to control the change of the motor's current direction.
[0038] The aforementioned initial current control signal refers to the signal output by the controller, which guides the motor driver on how to control the motor current. The initial current control signal can be dynamically adjusted based on the task the motor needs to perform, the load conditions, and the motor's current state. Changes in the initial current control signal cause changes in the direction and magnitude of the motor's phase current, thereby controlling the motor's speed and torque.
[0039] In embodiments of this application, the initial current control signal may include components that cause a change in current direction, such as a sine wave or square wave signal. This change in current direction is to enable the motor to perform its tasks under normal operating conditions. A sine wave can refer to an electrical signal that exhibits a smooth, periodic sinusoidal function fluctuation over time, and can be used to generate the motor's drive current or voltage, achieving precise motor control. A square wave signal can refer to a periodic pulse signal whose waveform rapidly switches between two main levels within the period, typically positive and negative (or high and low), and can be used to directly control the forward and reverse rotation of the motor.
[0040] The aforementioned current loop can refer to a closed-loop control circuit in a motor control system, used to precisely control the motor current to achieve precise control of the motor torque. The current loop typically includes a controller that receives the error signal between the actual motor current and the current command (i.e., the target current value), and adjusts the output signal based on this error signal to drive the motor driver to change the current in the motor's phase windings.
[0041] The aforementioned current loop test command refers to a command sent by the control system or operator to the motor control system to test the performance of the current loop. The current loop test command may include a series of preset current values or variation patterns, such as step changes or sinusoidal changes. The purpose of the current loop test command is to evaluate the current loop's ability to control the motor current under different operating conditions, and to check whether the controller parameters are appropriate, whether it can respond quickly, reduce overshoot, suppress oscillations, and maintain stability. The test command can be manually triggered during the commissioning phase or maintenance checks, or it can be automatically executed by the control system as part of an automatic test.
[0042] The aforementioned stationary state can refer to a state where the motor rotor is stationary and the motor does not produce any physical motion. In the embodiments of this application, when a current loop test command is received, the control system takes measures to bring the motor into and maintain a stationary state. Keeping the motor stationary is to eliminate the influence of dead-zone effect changes caused by phase current commutation during motor rotation, ensuring that the evaluation of current loop performance during the test is not affected by the dead-zone effect. The stationary state can be achieved by braking the motor shaft with an electromagnetic brake, electromechanical locking, or other means to ensure that the motor does not rotate unexpectedly during the test.
[0043] The current direction mentioned above refers to the direction in which the current flows through the motor windings. In a three-phase motor, the current direction determines the motor's rotation direction and the generation of torque. Changes in the current direction can be achieved by altering the switching states of the inverter bridge transistors in the motor driver. For example, by changing the on and off sequence and timing of the bridge arm transistors, the phase current of the motor can be controlled, thereby controlling the motor's operating state.
[0044] In one alternative embodiment, the main controller in the control system, such as a microprocessor, continuously monitors input signals from the operator interface, maintenance mode, or automated test program. When the control system detects a specific instruction code or signal pattern, it recognizes that a current loop test command has been received. Once the current loop test command is received, the control system calculates and controls the electromagnetic brake mounted on the motor shaft to generate sufficient braking torque based on the motor's current operating state. This torque is sufficient to overcome the motor's inertia and any external load, ensuring that the motor rotor stops rotating, i.e., the motor is stationary. The braking torque of the electromagnetic brake can be dynamically calculated and adjusted based on the motor's operating speed, load conditions, and dead-zone compensation requirements.
[0045] Optionally, to determine whether a current loop test command for the motor has been received, a predefined test command can be input through the host computer software or operating interface. The system can then control the monitoring software to define ports or input signals to identify specific test command sequences. Alternatively, a dedicated current loop test trigger key or switch can be set in the control system. Once triggered, the system immediately enters test mode and identifies the test command. Furthermore, current loop test commands can be received from external devices (such as test benches or monitoring systems) using a Controller Area Network (CAN) bus, Ethernet, or other industrial communication protocols.
[0046] In another alternative embodiment, an electromechanical locking device is installed between the motor and the load on the motor shaft, or at the end of the motor shaft. Meanwhile, a control mechanism is typically required to quickly lock and unlock the motor when needed. This control mechanism can be a manually operated lever or button, or an automatic control mechanism triggered by the electronic control unit (ECU) of the control system or an external control signal.
[0047] When the control system receives a current loop test command, the ECU immediately sends a lock-up signal to the electromechanical lock-up device to initiate the lock-up process. This signal can be sent directly via hardwired connection or via network communication protocols (such as Controller Area Network, Ethernet for control automation, etc.). Upon receiving the signal, the lock-up device activates its actuators (such as electromagnets or pneumatic cylinders), generating friction or physical resistance to lock the motor shaft. Once the lock-up operation is complete, the system can verify that the motor is stationary by monitoring the output signals of the motor shaft's position or speed sensors, ensuring no unexpected rotation occurs.
[0048] In another alternative embodiment, when the ECU receives a current loop test command, the system's internal logic begins executing an energy dissipation control program. Specifically, the control system can control the inverter's pulse width modulation (PWM) to generate a reverse voltage in the motor, changing the motor's excitation state and switching it from motor mode to generator mode. The generated electrical energy then needs to be dissipated through one or more energy absorption elements, such as braking resistors, energy feedback systems, and load absorbers. The ECU continuously monitors parameters such as motor speed, current, and voltage, adjusting the excitation and load conditions during energy dissipation to ensure the motor decelerates smoothly and eventually stops. During deceleration, the frequency and duty cycle of the PWM signal, as well as the value of the braking resistor, can be adjusted to improve energy dissipation efficiency and the smoothness of the motor's stop. Once the motor speed has dropped to zero and remained so for a period of time, the control system confirms that the motor has stopped. At this point, the inverter output can be further adjusted or disconnected to completely sever the electrical connection between the motor and the control system, ensuring that the motor does not rotate unexpectedly due to any residual voltage or current during the test.
[0049] In another alternative embodiment, upon receiving a current loop test command, the control system first analyzes the motor's current operating state, including key parameters such as speed, position, current, and voltage, to determine the control strategy for the motor to transition from its current state to a stationary state. Next, by changing the duty cycle of the pulse width modulation (PWM) signal, the voltage and current output by the inverter are controlled to slow the motor until it stops. Adjusting the PWM signal before the current loop test ensures the motor will not rotate due to dead-zone effects or any external disturbances. Applying a reverse current to the motor can also generate reverse torque, helping to decelerate the motor to a stop more quickly. Furthermore, the control system continuously monitors the motor's speed and position signals. Once it detects that the motor speed has dropped to zero, it immediately confirms that the motor has reached a stationary state. After confirming the motor is stationary, the control system sends a confirmation signal to the test system, indicating that the motor is ready for the current loop performance test. The test system then begins the test process based on these confirmation signals.
[0050] By following the steps described above and controlling the motor to a stationary state, the current direction can be kept constant during the test, eliminating or reducing the interference of dead-zone effects on the test results. This allows testers to obtain purer and more accurate current loop response data, avoiding test misrepresentation and ensuring that the test results truly reflect the control characteristics of the current loop itself, rather than being affected by dead-zone effects or other nonlinear factors. This allows for more precise adjustment and improvement of current loop parameters, enhancing the overall performance of the control system.
[0051] Step S104: When the motor is stationary, the initial current control signal is adjusted based on the preset bias parameters to obtain the target current control signal, wherein the target current control signal is used to control the current direction of the motor to remain unchanged.
[0052] The aforementioned preset bias parameter refers to an additional current value artificially added during the test to compensate for voltage distortion caused by the dead-zone effect. This parameter is usually determined before the test, and its value is sufficient to ensure that the phase current of the motor does not change direction under the action of the test signal, that is, it always remains in the positive or negative range.
[0053] The aforementioned adjustments may refer to modifying or transforming the initial current control signal of the motor to accommodate the addition of preset bias parameters.
[0054] The aforementioned target current control signal can refer to a new type of control signal formed by superimposing a preset bias parameter on the initial current control signal. The purpose of designing the target current control signal is to ensure that the current loop responds correctly when the motor is stationary and a dead-zone effect exists, thereby more accurately testing and evaluating the performance of the current loop. The target current control signal can be obtained by performing mathematical operations on the initial current control signal; specifically, a preset bias value is added to the initial signal at each point in time. For example, if the initial signal fluctuates between +1A (Amperes) and -1A, and the preset bias parameter is 2A, then the target current control signal will fluctuate between 3A and 1A. This ensures that even with a dead-zone effect, the current will never become negative or zero, preventing a change in the current direction.
[0055] In one alternative embodiment, firstly, the characteristics of the initial current control signal are analyzed to determine the signal's peak and valley values, i.e., the maximum and minimum values in the positive and negative directions. Next, the dead time of the switching devices in the motor driver is determined, and the impact of the dead time on the voltage output and current response is evaluated. Then, based on the evaluation results of the dead time effect, a bias parameter is calculated that can overcome voltage distortion and ensure that the current direction does not change during testing. This bias parameter is typically calculated based on the signal's peak and valley values.
[0056] For example, if the initial signal varies between ±2A, to ensure the current is always greater than zero, the bias parameter needs to be set to the absolute value of the signal valley plus a safety margin, i.e., at least 2A. With the motor stationary, the calculated bias parameter is superimposed on the initial current control signal to generate the target current control signal. The adjusted signal will no longer contain negative current values but will always be at a positive current level. For example, adding a 2A bias to a ±2A signal will result in a signal ranging from +4A to +0A, ensuring consistency in current direction and thus eliminating the dead-zone effect on the test.
[0057] In another alternative embodiment, dynamic bias adjustment is performed based on the motor load mode. First, motor load information is collected in real time using sensors such as current sensors, torque sensors, or encoders. These sensors can measure key parameters such as the load resistance driven by the motor, the output torque and current of the motor, and the motor's speed and position. The sensor data is analyzed to determine the current load mode of the motor. Next, based on the current load mode and motor characteristics, the required dynamic bias parameters are calculated. For half-load mode, the motor current is relatively small, so the required bias parameters are also small, helping to eliminate the dead-zone effect at lower current levels while ensuring that the motor's energy consumption and temperature are controlled within safe ranges. For heavy-load mode, the motor requires a larger current to maintain operation, and the corresponding bias parameters need to be increased to ensure the consistency of the current direction, effectively overcoming the dead-zone effect even under high-current conditions. After determining the dynamic bias parameters, they are superimposed on the original current control signal to generate the target current control signal.
[0058] In another alternative embodiment, an integrator is used for automatic bias parameter adjustment. First, before the test begins, the integrator's accumulated value is set to zero to ensure that it is not immediately affected by accumulated errors after power-on. Then, integrator parameters, such as the integration time constant, are determined to balance response speed and the ability to eliminate static errors. With the motor stationary, a current loop test is initiated, and the actual current value of the motor is acquired in real time via a current sensor and compared with the target current value to obtain a deviation signal. Next, the deviation signal is input to the integrator, which begins to accumulate the deviation. The integrator's output, the accumulated deviation signal, serves as the dynamic bias parameter. Based on the dynamic bias parameter output by the integrator, the dynamic bias parameter is superimposed on the original current control signal to generate a new target current control signal.
[0059] By adjusting the bias of the control signal while the motor is stationary through the above steps, the consistency of the current direction can be ensured, and the current response will not be significantly disturbed even if a dead-zone effect exists. Furthermore, when the motor is stationary, the current loop response is primarily controlled by software commands, rather than by the load or external disturbances. Adjusting the current control signal based on this eliminates variables that cause dead-zone effects, providing cleaner and more accurate current response data.
[0060] S106 runs the current loop based on the target current control signal and collects the feedback signal of the current loop to the target current control signal.
[0061] The aforementioned feedback signal can refer to the actual output value measured in the control system, used to compare with the desired input value to determine the control effect. In the current loop test of a motor drive, the feedback signal can refer to the actual current value of the motor, which is measured in real time by a current sensor and reflects the actual response of the motor to a given current control signal. The feedback signal can be used to evaluate the effectiveness of controller parameters, including but not limited to response time, overshoot, and oscillation.
[0062] In one optional embodiment, a target current control signal is input to a current loop controller. The current loop controller begins to adjust the command signal output to the motor according to the target current control signal to control the current in the motor windings. Then, the actual current in the motor windings is monitored in real time by a current sensor and sent back to the controller as a feedback signal. The current sensor can be a Hall effect sensor, a current transformer, or a resistive shunt, etc., capable of providing real-time current measurements. The control system continuously acquires feedback signals and records the complete current response process, including the current loop's response speed, overshoot, oscillation, and the current value after stabilization.
[0063] In another optional embodiment, firstly, the target current control signal, adjusted with preset bias parameters, is input to the current loop controller. Then, a software algorithm based on a motor mathematical model is activated to predict the actual current distribution within the motor windings, taking into account dynamic factors such as applied voltage, real-time motor speed, and ambient temperature. Specifically, the actual current in the motor windings can be predicted using the motor's mathematical model, combined with information such as applied voltage, motor speed, and temperature. The motor's mathematical model may include parameters such as electromagnetic induction, winding resistance, and inductance. After the software algorithm estimates the actual motor current, the current loop controller uses this estimate as a feedback signal and records the current feedback signal estimated by the software algorithm, including current response speed, overshoot, and oscillation, for subsequent controller parameter tuning and control system performance improvement.
[0064] In another optional embodiment, firstly, high-precision Hall effect sensors, current transformers, and other current sensors are used to monitor the actual current in the motor windings in real time. The analog signals output by the sensors are converted into digital signals by an analog-to-digital (A / D) converter for subsequent data processing and transmission. Next, the digitized current feedback signal can be transmitted to the remote monitoring system via a wireless module. The selection of the wireless module should be based on the requirements of the test environment, such as transmission distance, data rate, power consumption, and anti-interference capability. Wireless communication technologies such as Wireless Fidelity (Wi-Fi), Bluetooth, Long Range Radio (LoRa), and the Zifeng protocol can be used. Before data transmission, encryption measures can be taken to ensure information security and data integrity, such as using the Advanced Encryption Standard (AES) encryption algorithm to encrypt the transmitted data. Afterward, the remote monitoring system receives the current feedback signal from the control system. The received data is first decrypted and then analyzed in real time, including calculating key indicators such as current response time, overshoot, and oscillation. In addition to one-way data transmission, wireless communication can also support two-way communication, allowing remote monitoring systems to send control commands or update parameters to control systems, enabling real-time remote debugging and improvement.
[0065] By following the steps described above, and by operating the current loop based on the target current control signal and acquiring the feedback signal from the current loop to this signal, the negative impact of the dead-zone effect on current control is eliminated, providing accurate and stable test conditions. This improvement makes current loop performance testing more precise, simplifies the testing process, and provides a reliable data foundation for improving controller parameters.
[0066] Step S108: Test the current loop based on the feedback signal to obtain the test result, wherein the test result is used to indicate whether the current loop parameters of the current loop are valid.
[0067] The aforementioned testing can refer to a quantitative evaluation process of the performance of a control system or its components under specific conditions. Testing typically involves setting a series of input signals, observing and recording the control system output, and using this data to evaluate key performance indicators of the control system, such as response time, overshoot, and steady-state error.
[0068] The aforementioned test results can refer to data and indicators obtained during the testing process that reflect the performance of the control system. In the embodiments of this application, the test results can refer to the response of the current loop to the target current control signal, including current response time, overshoot, oscillation amplitude, etc., used to evaluate the effectiveness and suitability of the current loop parameters.
[0069] The aforementioned current loop parameters refer to the setpoints that constitute the current loop controller, including the proportional factor and integral factor. The current loop parameters determine the controller's response speed and strength to error signals, directly affecting the dynamic performance of the current loop, such as response speed, the magnitude of steady-state error, and the stability of the control system.
[0070] In one optional embodiment, the performance of the current loop is determined based on key parameters in the feedback signal, such as response time, overshoot, and oscillation amplitude. Specifically, if the response time, overshoot, and oscillation parameters in the test results are within a pre-defined reasonable range, the current loop parameters are considered valid; otherwise, the parameter settings are considered unreasonable and need adjustment. The pre-defined reasonable range can refer to a set of index ranges defined based on the control system design goals and performance requirements, used to judge whether the current loop parameter settings are valid and reasonable. For example, for the response time range, an upper or lower limit for the response time, and an acceptable fluctuation range, can be set according to the motor application scenario, such as servo motor control requiring high-speed response or fan control requiring slow but stable operation.
[0071] For example, for precision servo control, the response time needs to be less than 10 milliseconds, while for general fan or pump control, the response time is allowed to be within a few hundred milliseconds. Regarding overshoot range, most control systems typically set the target overshoot range between 5% and 30%, depending on the trade-off between stability and fast response. Precision control systems require even lower overshoot, such as below 2%, to avoid drastic output fluctuations. For oscillation parameter ranges, the number of oscillations should be minimized, and the oscillation amplitude should not be too large. For example, the number of oscillations can be limited to 3 or less, and the oscillation amplitude can be set below 5% of the stable value.
[0072] In another optional embodiment, the current acquisition device is activated to record the feedback signals of the current loop when it receives commands at various frequencies. Then, the acquired time-domain feedback signals are converted into frequency-domain data using Fast Fourier Transform (FFT), and the position and height of the main peak on the spectrum are observed. The main peak frequency should match the frequency of the input signal, and the peak height should be relatively stable without obvious spikes or drops, indicating that the current loop can maintain good control performance over a wide frequency range. Secondary peaks or abnormal spikes are identified on the spectrum. If an abnormal peak occurs at a specific frequency, the current loop parameters need to be adjusted to increase damping at that frequency and reduce oscillations. In the spectrum, the current loop should exhibit a relatively flat gain response across the entire frequency range. If the gain at certain frequency points is significantly higher or lower than the average, it indicates an amplification or attenuation problem, and parameters need to be adjusted to improve gain flatness.
[0073] In another alternative embodiment, a sudden step signal is input to the current loop controller, instantaneously changing the amplitude of the current command. Immediately after the step signal input, the feedback signal of the current loop is acquired, and step response metrics are calculated and extracted. These metrics, directly derived from the feedback signal, reflect the characteristics of the actual output current of the current loop controller over time and its relationship to the step input signal. For example, the rise time is obtained based on timing analysis of the current in the feedback signal as it increases; the overshoot is derived by comparing the difference between the maximum peak value of the feedback signal and the target value; and the settling time is the time required for the feedback signal to finally stabilize. After extracting the step response metrics, engineers evaluate whether the performance of the current loop controller meets the pre-defined reasonable range based on these metrics. If the feedback signal is within the reasonable range for all metrics, it indicates that the current loop parameters are set appropriately and can effectively respond to step signals; conversely, it indicates that the parameter settings are unreasonable and need adjustment to obtain better dynamic response and stability.
[0074] The test results obtained through the above steps are used to determine the effectiveness of the current loop parameters, directly reflecting the performance of the current loop in eliminating the dead-zone effect. Analysis of the feedback signal can identify problems such as excessively slow current response, excessively violent oscillations, or excessive steady-state errors caused by parameter settings. This provides a basis for verifying the effectiveness of the parameters, helping to adjust them in a timely manner and improve motor control performance.
[0075] In this embodiment, firstly, during the operation of the motor's corresponding current loop based on the initial current control signal, if a current loop test command for the motor is received, the motor is controlled to remain stationary to avoid phase current commutation caused by motor operation, thereby eliminating the dynamic influence of dead-zone effect on voltage distortion. After the motor is stationary, the initial current control signal is adjusted based on preset bias parameters to obtain the target current control signal. The application of preset bias parameters ensures that the current direction remains unchanged during the test, converting the voltage distortion caused by the dead-zone effect into a fixed deviation. Next, the current loop is operated based on the target current control signal, and the feedback signal of the current loop to the target current control signal is collected. By monitoring and analyzing the feedback signal in real time, the response of the current loop to the test command can be observed intuitively, eliminating the interference of dead-zone effect on the current response. Finally, the current loop is tested based on the feedback signal to obtain the test results. By quantitatively analyzing various performance indicators in the feedback signal, the effectiveness and performance level of the current loop control strategy can be objectively evaluated, thereby solving the technical problem of low accuracy in motor current loop testing in related technologies.
[0076] Optionally, the method further includes: if a current loop test command for the motor is received, controlling the motor to be in a stationary state, including: if a current loop test command is received, determining the braking torque of the electromagnetic brake based on the motor running speed, wherein the electromagnetic brake is installed on the motor shaft of the motor; controlling the electromagnetic brake to generate braking torque to brake the motor rotor of the motor so that the motor is in a stationary state.
[0077] The aforementioned motor operating speed can refer to the rotational speed of the motor rotor, typically expressed in revolutions per minute (RPM) or angular velocity (rad / s, radians per second). In the embodiments of this application, the motor operating speed is used to determine whether the motor is in motion and as a basis for calculating the braking torque to be provided to the electromagnetic brake when needed.
[0078] The aforementioned electromagnetic brake can refer to a device that uses friction generated by electromagnetic force to stop or slow down the rotation of a motor rotor. An electromagnetic brake can consist of an electromagnetic coil, a brake disc or brake drum, and friction pads. When the electromagnetic coil is energized, it generates a magnetic field that attracts the brake disc or brake drum to contact the friction pads, creating a frictional torque and thus achieving the braking function.
[0079] The aforementioned braking torque can refer to the torque applied by the electromagnetic brake to the motor rotor to prevent or slow its rotation. In the embodiments of this application, the braking torque is determined based on the motor's current operating speed to ensure that the motor can quickly and stably come to a stop, facilitating performance testing of the current loop. The magnitude of the braking torque needs to be accurately calculated to avoid excessive braking torque that could damage the motor rotor or related physical components, while also ensuring sufficient braking torque to reliably bring the motor to a stop.
[0080] The aforementioned motor rotor can refer to the main rotating component of the motor, typically consisting of an iron core, windings, and a shaft. In an AC motor, the rotor has windings that generate a rotating magnetic field through electromagnetic induction. This magnetic field interacts with the magnetic field of the stator, driving the motor to rotate. The stator can refer to the stationary part of the motor, which surrounds the rotor.
[0081] In one optional embodiment, the control system first detects the current operating state of the motor by measuring the instantaneous rotational speed of the motor rotor using a built-in speed sensor. Next, based on the motor's operating speed, it calculates a suitable braking torque. Then, according to the calculated braking torque, the control system controls the electromagnetic brake to receive current, generating sufficient electromagnetic force to bring the brake into contact with the motor rotor, creating a frictional torque. Furthermore, the control system continuously monitors the motor rotor's rotational speed until it confirms that the motor has come to a complete stop, i.e., the rotational speed has dropped to zero, before ending the braking process.
[0082] In another alternative embodiment, the control system integrates multiple sensors, including but not limited to speed sensors, torque sensors, temperature sensors, and position sensors, to monitor various operating states of the motor in real time. The sensor data is then transmitted to the control unit (such as a microprocessor) via a high-speed data bus to ensure real-time data accuracy. Based on the motor's physical parameters and real-time operating data, a dynamic model of the motor is constructed. The motor's physical parameters include, but are not limited to, at least one of the following: moment of inertia, coefficient of friction, electromagnetic characteristics, etc. Subsequently, a predictive control algorithm is used to predict the deceleration curve and braking time of the motor rotor under different braking torques based on the motor's dynamic model. Based on the real-time monitored motor speed and the braking path derived from the predictive algorithm, the current of the electromagnetic brake is dynamically adjusted, thereby changing the magnitude and direction of the braking torque. Simultaneously, improved algorithms (such as particle swarm optimization or genetic algorithms) can be used to search for suitable braking torque sequences to minimize the motor's energy consumption or physical impact during braking in a shorter time, achieving dynamic adjustment of the braking torque.
[0083] By acquiring the actual operating speed of the motor and calculating the corresponding electromagnetic brake torque using the above method, the motor can be smoothly and quickly decelerated to a standstill, avoiding the impact or damage caused by sudden stops. Adjusting the brake torque based on the motor's operating speed ensures the motor stops before the test begins, eliminating the instability in current response caused by inertia and making the test results more realistic and reliable. Automatic adjustment of the brake torque via the electromagnetic brake to bring the motor to a standstill avoids the need for manual adjustment or complex algorithms to predict the motor's stopping moment, simplifying preparations for current loop testing and improving overall testing efficiency.
[0084] Optionally, the method further includes: analyzing the signal frequency of the initial current control signal to obtain the signal change period of the initial current control signal; determining the signal peak and signal valley of the initial current control signal based on the signal change period; determining the target absolute value of the initial current control signal during the signal change period based on the signal peak and signal valley, wherein the target absolute value is greater than a preset threshold; and determining a preset bias parameter based on the target absolute value and a preset safety threshold.
[0085] The aforementioned signal frequency refers to the number of times the initial current control signal repeats itself per unit time. In motor control, the current control signal can be periodic, such as a sine wave or square wave signal, and the signal frequency determines the rate of current change. A high signal frequency means a fast current change; conversely, a low signal frequency means a slow current change. The signal frequency directly affects the motor's dynamic response performance and operating efficiency.
[0086] The signal variation period mentioned above refers to the time required for one complete cycle of the signal. The signal variation period is the reciprocal of the signal frequency. For example, if the signal frequency is 50Hz, then the signal variation period is 1 / 50 of a second, or 20 milliseconds.
[0087] The signal peak value mentioned above can refer to the maximum value of the signal within one signal variation cycle. For a sine wave signal, the signal peak value usually refers to the amplitude of the sine wave, that is, the maximum distance of the sine wave from zero; while in a square wave signal, the signal peak value is the highest level of the square wave. The signal peak value can be used to reflect the upper limit of the control signal strength.
[0088] The aforementioned signal valley value refers to the minimum value of a signal within one signal variation cycle. For a sine wave, the signal valley value can be the inverse of the signal peak value; in a square wave signal, the signal valley value is the lowest level of the square wave. The signal valley value can be used to reflect the lower limit of the control signal strength.
[0089] The aforementioned target absolute value can refer to the minimum absolute value of the current control signal set within the signal change cycle to ensure that the current direction remains unchanged. The target absolute value must ensure that the signal exceeds a preset threshold at all times, thereby maintaining the current direction. For example, if the preset threshold is 1A, then the target absolute value is 2A to ensure that the current is always greater than 1A.
[0090] The aforementioned preset threshold refers to the minimum absolute value of the current control signal set to avoid the effects of dead zone. The preset threshold ensures that the current does not change direction even in the presence of dead zone, thus enabling stable current control and testing. The magnitude of the preset threshold should be sufficient to compensate for voltage distortion caused by the dead zone effect, and can be determined experimentally or through theoretical calculations.
[0091] The aforementioned preset safety threshold can refer to a safety boundary value used to determine the magnitude of the bias, ensuring that the adjusted signal is large enough to avoid dead-zone effects, but not so large as to cause instability in the control system or damage to the motor. The preset safety threshold is set further based on the target absolute value to ensure that the motor current loop can operate safely and reliably under the control of the adjusted signal.
[0092] In one alternative embodiment, the signal frequency can first be monitored using a timer module in a digital signal processor or microcontroller. When the signal changes from one state to another, the timer records the time. By recording multiple times and calculating the average value, the signal period, or signal change period, can be obtained. The reciprocal of the signal change period is the signal frequency.
[0093] For example, if the signal variation period is 20 milliseconds, the signal frequency is 50 Hz. Once the signal variation period is determined, the signal can be continuously sampled using an analog-to-digital converter within the next period to monitor the highest and lowest points of the signal, i.e., the peak and trough values. Next, a target absolute value is determined based on the peak and trough values. Specifically, this can be done by taking the smaller absolute value of the difference between the peak and trough values as a base, and adding a preset threshold to ensure that the minimum absolute value of the signal is always greater than or equal to the preset threshold. For example, if the signal peak is 3A, the trough value is -3A, and the preset threshold is 1A, then the target absolute value must be at least 4A to ensure that even at the trough, the absolute value of the signal is greater than the preset threshold. Afterward, a preliminary bias parameter is calculated based on the target absolute value and the signal trough value. If the signal trough value is negative, the bias parameter can be the difference between the target absolute value and the absolute value of the signal trough value. Finally, it is necessary to check whether adding the signal trough value to the preliminary bias parameter will cause the final signal to exceed the preset safety threshold. If the preliminary bias parameter causes the signal absolute value to exceed the preset safety threshold, then the preliminary bias parameter needs to be adjusted. Specifically, if the absolute value of the signal is close to the upper limit of the preset safety threshold, the value of the bias parameter is reduced; if the absolute value of the signal is close to the lower limit of the preset safety threshold (when the signal valley value is positive), the value of the bias parameter is increased until the safety threshold requirement is met.
[0094] By employing the above method and maintaining a constant current direction through a bias signal, the dead-zone effect is eliminated, resulting in more accurate test results that reflect the true performance of the current loop. The appropriate selection of preset bias parameters ensures that the motor will not enter an unstable state due to sudden changes in current direction during testing, enhancing the overall stability of the control system and avoiding potential damage to the motor or driver. Verification of preset safety thresholds and adjustment of bias parameters ensure that even under test conditions, the actual operating current of the motor remains within a safe range, preventing overload and overheating issues and providing conditions for long-term reliability testing of the current loop.
[0095] Optionally, the method further includes: determining a preset bias parameter based on the target absolute value and a preset safety threshold, including: determining a target difference between the target absolute value and the preset safety threshold; determining a target ratio between the target difference and the preset safety threshold; if the target ratio is greater than a preset ratio, decreasing the initial bias parameter to obtain the preset bias parameter; if the target ratio is less than a preset ratio, increasing the initial bias parameter to obtain the preset bias parameter; if the target ratio is a preset ratio, determining the initial bias parameter as the preset bias parameter.
[0096] The aforementioned target difference refers to the difference between the target absolute value and the signal valley value, provided that the current direction remains unchanged. The target difference can be used to determine the amount of bias that needs to be applied to the signal, ensuring that even during the signal valley phase, the absolute value of the current control signal will not fall below the target absolute value, thereby avoiding interference from the dead-zone effect.
[0097] The aforementioned target ratio can refer to the ratio between the target difference and the preset safety threshold. The target ratio can be used to measure whether the adjusted current control signal will exceed the safe operating limit while eliminating the dead zone effect, that is, whether it will cause overload or potential damage to the motor or control system.
[0098] The aforementioned preset ratio can refer to a ratio pre-set based on the safety and performance requirements of the motor and control system. The preset ratio can reflect the maximum proportional relationship between the allowable target difference and the preset safety threshold. It can also ensure that, during testing, the motor remains within a safe and stable operating range even if the signal is biased.
[0099] In one optional embodiment, firstly, the target difference is calculated based on the signal valley value and the target absolute value. Next, the target ratio is calculated using the target difference and a preset safety threshold. The calculated target ratio is compared with the preset ratio. If the target ratio is greater than the preset ratio, it means that the absolute value of the current control signal after biasing will be too close to the upper limit of the preset safety threshold; in this case, the bias parameter needs to be reduced to avoid overload risks. If the target ratio is less than the preset ratio, it means that the absolute value of the current control signal after biasing will be lower than the lower limit of the preset safety threshold; therefore, the bias parameter needs to be increased to ensure the safe operation of the control system. If the two are equal, i.e., the target ratio equals the preset ratio, it indicates that the current bias parameter selection meets the safety and performance requirements and no further adjustment is needed.
[0100] In the above method, the method of determining the preset bias parameters based on the target absolute value and a preset safety threshold can effectively adjust the current control signal, ensuring that the current direction remains constant throughout the test. Verification of the preset safety threshold ensures that the biased current signal will not cause the motor to exceed its safe operating range, preventing damage such as current overload or overheating. This method provides a safer safeguard for motor testing, contributing to the long-term stability and reliability of the motor and its control system.
[0101] Optionally, the method further includes: determining the target absolute value of the initial current control signal during the signal change cycle based on the signal peak value and the signal valley value, including: acquiring the motor load mode of the motor, wherein the motor load mode is used to represent the load state of the motor connected to the load; determining the initial absolute value of the initial current control signal during the signal change cycle based on the signal peak value and the signal valley value; adjusting the initial absolute value based on the motor load mode to obtain the target absolute value.
[0102] The aforementioned motor load modes refer to different operating states or conditions under which the motor operates, and are primarily determined by the characteristics of the load connected to the motor. The motor load can be a physical load, such as a driven device or load object, or an electrical load, such as electrical components like resistors and inductors. Different load modes require different currents, voltages, and torques from the motor. In the embodiments of this application, the motor load mode can be used to adjust the target absolute value of the current control signal according to the actual operating conditions of the motor.
[0103] The aforementioned load state refers to the specific conditions of the motor load at a certain moment or time period, including the size, type, location, and operating conditions of the load. Changes in load state will cause fluctuations in the current required by the motor, thus affecting the difficulty and effectiveness of current control. Load state can include full load, half load, and no load. For example, when the physical load is full, the motor requires greater torque and current to drive it; under half load or no load conditions, the current required for the motor to operate will be significantly reduced.
[0104] The initial absolute value mentioned above refers to the range of absolute values of the signal within one signal change cycle before the current control signal is biased. The initial absolute value can be used to reflect the dynamic range of the signal in its natural state, including the absolute values of the signal peak and valley.
[0105] In one optional embodiment, firstly, the motor's load mode can be obtained through sensors, a data acquisition system, and characteristic parameters of load devices connected to the motor in real time during motor operation. These characteristic parameters include weight, shape, and coefficient of friction, while the sensors can include torque sensors on the motor shaft and speed sensors. Next, signal analysis is used to determine the peak and trough values of the signal within a cycle. For periodic current control signals, such as sine waves or square waves, the peak and trough values represent the maximum and minimum values of the signal in the positive and negative directions, respectively. The initial absolute value is determined by taking the minimum of the absolute values of the signal peak and trough. Then, the initial absolute value is adjusted according to the motor load mode to ensure that the current control signal can effectively drive the motor under any load condition, while avoiding overload or underload. Adjusting the initial absolute value based on the motor load mode includes the control system determining whether to increase or decrease the initial absolute value of the current control signal. For example, in heavy-load mode, if the initial current control signal is too low to overcome the resistance caused by the load, the absolute value of the current signal needs to be increased; while in light-load mode, if the initial current control signal is too large, it will cause energy waste, and the absolute value needs to be decreased. Based on the judgment results, the initial current control signal is adjusted by adjusting parameters such as the bias amount, signal frequency, and signal amplitude of the current control signal.
[0106] In the above method, by adjusting the absolute value of the target, the motor is prevented from overheating or being damaged due to excessive current during testing, while simultaneously preventing insufficient current from affecting the effective starting and operation of the motor, thereby improving the safety of motor testing. The adjustment of the target absolute value is based on the motor load mode, making the test results more intuitively reflect the performance of the current loop under specific load conditions, enhancing the practicality and reliability of the test data. This method also enhances the versatility and adaptability of the testing method, enabling the current loop parameters to be effectively tested and adjusted under various load conditions.
[0107] Optionally, the method further includes: determining the initial absolute value of the initial current control signal during the signal change period based on the signal peak value and the signal valley value, including: performing an absolute value conversion on the signal peak value to obtain a first absolute value; performing an absolute value conversion on the signal valley value to obtain a second absolute value; and determining the minimum absolute value between the first absolute value and the second absolute value as the initial absolute value.
[0108] The aforementioned absolute value conversion can refer to a mathematical operation that removes the sign of any number, retaining only its magnitude. In the embodiments of this application, absolute value conversion can be used to convert signal peaks and troughs into non-negative numbers to compare the magnitudes of signal peaks and troughs and to perform subsequent calculations. Absolute value conversion ensures that even if the signal fluctuates in the positive and negative directions, its magnitude can be accurately measured and compared.
[0109] The aforementioned first absolute value can refer to the value obtained after converting the signal peak value to its absolute value. By converting the signal peak value, the sign of the peak value is removed, retaining only the magnitude of the peak value. The resulting first absolute value can be used to reflect the maximum intensity of the signal in the positive direction. For example, if the signal peak value is -5A, indicating that the maximum negative value reached by the current signal at a certain moment is 5A, then after absolute value conversion, the first absolute value is 5A.
[0110] The aforementioned second absolute value can refer to the value obtained after converting the signal valley value to its absolute value. It can be used to reflect the maximum intensity of the signal in the negative direction or the minimum intensity in the positive direction, where the choice of positive or negative direction depends on the signal direction. For example, if the signal valley value is +3A, then the second absolute value is 3A, which means that the maximum intensity of the signal in the negative direction is 3A.
[0111] The aforementioned minimum absolute value can refer to the smaller of the first and second absolute values. The minimum absolute value can be used to represent the minimum strength or minimum effective value of the current control signal within the signal change cycle. Determining the minimum absolute value ensures that the motor's drive in any signal direction meets its minimum performance requirements, while avoiding excessively strong signals that could lead to energy waste or motor overload. For example, if the absolute values of the signal peak and valley are 10A and 5A respectively, then the minimum absolute value is 5A. This means that within the signal change cycle, the motor must be able to respond to a current intensity of at least 5A to ensure effective operation in both light and heavy load modes, while preventing damage to the motor or control system from excessively strong signals.
[0112] In one optional embodiment, firstly, by monitoring the current control signal in the motor control system, the maximum value (i.e., signal peak value) and minimum value (i.e., signal valley value) within a signal change cycle are identified. Next, the signal peak value is converted to an absolute value to obtain a first absolute value. The signal valley value is then converted to an absolute value to obtain a second absolute value. For example, if the signal peak value is -8A, the first absolute value is 8A; if the signal valley value is +4A, the second absolute value is 4A. The first and second absolute values are compared, and the minimum value is determined as the initial absolute value within the signal change cycle. For example, if the first absolute value is 8A and the second absolute value is 4A, then the initial absolute value is 4A.
[0113] In the above method, by determining the minimum absolute value, the control system can dynamically adjust the control signal according to different load modes (such as light load, standard load, heavy load, etc.), ensuring that the motor can maintain a stable current output under any operating condition, thus improving the adaptability and robustness of the control system. It simplifies the complexity of signal processing, improves the efficiency of setting the target current control signal, and ensures that current control is performed within a reasonable range.
[0114] Optionally, the method further includes: running a current loop based on a target current control signal and acquiring feedback signals from the current loop to the target current control signal, including: inputting the target current control signal into the current loop and acquiring the output current of the current loop; determining an error signal based on the target current and output current corresponding to the target current control signal; and acquiring feedback signals from the current loop to the target current control signal based on the error signal and a preset threshold.
[0115] The aforementioned output current refers to the actual current flowing through the motor windings when the motor responds to a current control signal. Output current is the actual physical quantity generated by the motor controller based on the received current control signal command. It reflects the motor's operating state and energy transfer at a given moment. Output current can be monitored and acquired in real time using a current sensor. This current sensor, installed between the motor controller and the motor, can accurately measure the current flowing through the motor windings. The acquired data is sent back to the current loop control unit for feedback and analysis.
[0116] The aforementioned error signal refers to the difference between the target current corresponding to the target current control signal and the actual measured output current. The error signal is an important reference for evaluating the performance of the current loop control, reflecting the degree of matching between the control signal and the actual current response. The error signal can be obtained by performing a simple subtraction operation between the real-time acquired output current and the preset target current.
[0117] In one optional embodiment, the generated target current control signal is first input to the current loop through the input interface of the motor controller. Under the action of the target current control signal, the current in the motor windings will change. To monitor this change in real time, a current sensor needs to be configured at a key point in the motor drive circuit, such as the motor output. The current sensor converts the real-time acquired output current signal into an electrical signal, and then converts it into a digital signal through an analog-to-digital converter, facilitating data analysis by the control system. The digital signal is then transmitted to the processing unit inside the motor controller. After receiving the output current signal from the current sensor, the control system compares the output current signal with the target current value corresponding to the target current control signal and calculates the difference between the two, i.e., the error signal. The preset threshold is set by the engineer before testing based on the motor performance and the testing purpose, and is used to determine whether the error signal is within an acceptable range. The setting of the threshold needs to take into account factors such as the type of motor, operating conditions, and testing accuracy requirements. If the magnitude and duration of the error signal both fall within the preset threshold, it indicates that the current loop can effectively control the motor current under the current parameter configuration and achieve the expected goal. At this time, the acquired output current and other relevant data (such as response time, overshoot, etc.) together constitute the feedback signal. Conversely, if the error signal exceeds the preset threshold, it indicates that the current parameter configuration is insufficient to cope with dead-zone effects or other disturbances, and further adjustments are needed. The system will record the cases where the threshold is exceeded, including the maximum value, average value, and peak time of the error signal, as a basis for subsequent parameter improvements.
[0118] In the above method, based on the acquired error signal, the control system can automatically or manually adjust the parameters of the current loop, such as the proportional gain, integral time, and filter parameters, to minimize the error signal and improve control accuracy and response speed. It provides accurate test data, facilitating the evaluation of the current loop control effect and ensuring the objectivity and measurability of the test results.
[0119] Optionally, the method further includes: acquiring a feedback signal of the current loop to the target current control signal based on an error signal and a preset threshold, including: if the error signal is less than or equal to the preset threshold, acquiring a feedback signal of the current loop to the target current control signal; if the error signal is greater than the preset threshold, adjusting the target current control signal based on the error signal to obtain an adjusted current control signal; running the current loop based on the adjusted current control signal until the error signal between the output current of the current loop and the target current is less than or equal to the preset threshold, determining the adjusted current control signal as the target current control signal, and acquiring a feedback signal of the current loop to the target current control signal.
[0120] The aforementioned adjusted current control signal refers to a modified current control signal based on the initial target current control signal, adjusted according to the magnitude and direction of the error signal. The adjusted current control signal can be used to bring the actual motor current closer to the target current, thereby reducing the error signal and achieving better control. There are many ways to adjust the current control signal, ranging from simple numerical correction to complex algorithmic adjustments, depending on the design of the control system and the control strategy.
[0121] In one optional embodiment, the acquired error signal is compared with a preset threshold. If the error signal is less than or equal to the preset threshold, it indicates that the current loop is performing well and can respond quickly and stably control the current. In this case, the target current control signal can be considered valid, and the feedback signal of the current loop is directly acquired for analysis to obtain the test results. If the error signal is greater than the preset threshold, it indicates that the current loop's performance is insufficient to quickly and accurately track the target current, which may be caused by improper loop parameters or other control problems. When the error signal exceeds the preset threshold, the target current control signal is adjusted according to the current error signal. Specific adjustment methods may include increasing or decreasing the bias, adjusting controller parameters, etc., to reduce the error between the current and the target current. The controller parameters may include the proportional coefficient or integral time of a proportional-integral (PI) controller. The current loop is rerun using the adjusted current control signal, and the output current is acquired and the error signal is calculated again until the error signal is less than or equal to the preset threshold. Once the adjusted current control signal makes the error signal meet the preset threshold condition, this signal can be considered a valid target current control signal, and subsequent testing and analysis can continue.
[0122] In the above method, by setting a preset threshold as a judgment criterion, the control system is allowed to automatically collect feedback signals when the error signal falls within an acceptable range, without human intervention. This improves the automation level of the test, reduces operational errors, and ensures the consistency and accuracy of the test results. When the error signal is detected to exceed the preset threshold, the test system can automatically adjust the target current control signal until the error signal returns to within the threshold, achieving self-correction of the closed-loop test and improving the accuracy of the test process and the robustness of the motor control system.
[0123] Optionally, the method further includes: testing the current loop based on the feedback signal to obtain test results, including: determining the response time parameter, overshoot parameter, and oscillation parameter in the feedback signal; if the response time parameter is within a preset response time interval, the overshoot parameter is within a preset overshoot interval, and the oscillation parameter is within a preset oscillation parameter interval, the test result is determined to be that the current loop parameters of the current loop are valid; if the response time parameter is not within the preset response time interval, or the overshoot parameter is not within the preset overshoot interval, or the oscillation parameter is not within the preset oscillation parameter interval, the test result is determined to be that the current loop parameters of the current loop are invalid.
[0124] The aforementioned response time parameter refers to the time from when the control system receives a command or input signal change until the output signal or command stabilizes near the final target value. Within this time range, the output value continues to change until it no longer changes significantly and approaches the target value. In motor control, when the current command suddenly changes, the current loop needs to adjust the actual current of the motor to a value close to the new command within a limited response time. The preset response time interval typically defines whether the controller's reaction speed is fast enough to meet the application requirements. For example, for high-speed servo motor control, the response time can be in the millisecond range, and the preset response time interval can be set to [0.1ms, 5ms]; while for large industrial motors, the response time can be in the second range, and the preset response time interval can be set to [0.5s, 3s].
[0125] The overshoot parameter mentioned above refers to the magnitude by which the output signal exceeds the final stable value of the control system during the response process. Excessive overshoot indicates improper controller parameter settings, leading to unstable system response and potential impact on the motor or load. The preset overshoot range defines an acceptable overshoot range, ensuring effective current control while avoiding potential risks from excessive current fluctuations. For example, the preset overshoot range could be [0%, 10%] or [5%, 15%].
[0126] The aforementioned oscillation parameters refer to the fluctuations in the control system before it reaches a stable state. During the process of the control system reaching its final target value, oscillation can refer to the phenomenon of the output signal repeatedly fluctuating around the target value. Oscillation parameters can be used to measure the duration and amplitude of oscillation. In current loop control, oscillation can indicate that the loop parameters are set too sensitively or that there are unstable factors in the control system. The preset oscillation parameter range sets the acceptable range of oscillation, ensuring that the control system can not only quickly follow current commands but also stabilize within a reasonable time, avoiding long-term current fluctuations that could affect the motor's performance and lifespan. For example, the maximum oscillation amplitude can be set to [0%, 5%], and the number of oscillations should not exceed 5.
[0127] In one optional embodiment, firstly, during the operation of the current loop, the actual current feedback signal of the motor is acquired in real time, and the change of current over time is recorded. Next, based on the feedback signal, the total time from the start of the current command change to the actual motor current stabilizing within a preset threshold value is evaluated, i.e., the shortest time required to reach a stable state. The maximum amplitude by which the actual current exceeds the target current value during the response process is measured, and the number and amplitude of current fluctuations around the target value after it is reached are statistically analyzed to evaluate the stability and smoothness of the control system. Then, the response time parameter, overshoot parameter, and oscillation parameter are compared with preset intervals. If the response time parameter, overshoot parameter, and oscillation parameter are all within their respective preset intervals, it indicates that the current loop parameters can still effectively control the current after eliminating the dead zone effect, achieving the expected response performance. If any of the response time parameter, overshoot parameter, or oscillation parameter exceeds the preset interval, it indicates that the current loop parameter settings are insufficient to overcome the dead zone effect or have inherent performance deficiencies, requiring parameter adjustment and retesting.
[0128] The above method quantitatively evaluates the effectiveness of current loop parameters based on response time, overshoot, and oscillation parameters in the feedback signal. This ensures that the performance parameters of the current loop remain within the ideal range under different operating conditions and loads, thereby guaranteeing the stability and reliability of the entire control system. A quantitative standard for current loop parameter evaluation is established, making the test results more intuitive, easier to understand and operate, and providing clear guidance for parameter adjustment.
[0129] Figure 2 This is a schematic diagram comparing the current loop response effects with and without dead zones according to an embodiment of this application. Figure 2As shown, the horizontal axis represents time in seconds, with values including 0, 0.002, 0.004, 0.006, 0.008, 0.01, 0.012, 0.014, 0.016, 0.018, and 0.02, representing various time points during the test. The horizontal axis also represents the process of the current loop response changing over time, from the instant of the step signal until the response stabilizes. The vertical axis represents current in amperes, with values including -1.5, -1, -0.5, 0, 0.5, 1, and 1.5, representing the actual current level. The quadrature-axis current command curve represents the desired current command level, i.e., the target value that the current loop wants the motor current to reach. The quadrature-axis current command curve shows a step change, meaning that at a certain moment, the current command suddenly changes from one value to another, to test the current loop's rapid response capability and stability. The quadrature-axis current dead-zone-free curve represents the actual response curve of the current loop to the quadrature-axis current command under ideal conditions without dead-zone effects. The quadrature-axis current dead-time curve is used to reflect the effectiveness of current loop parameters under ideal conditions. It indicates the presence of a switching dead-time effect and the actual response of the current loop to a quadrature-axis current command. The quadrature-axis current dead-time curve also reflects the negative impact of the dead-time effect on current loop performance.
[0130] Depend on Figure 2 It is evident that the dead-time effect impacts the current loop response, especially during the rapid changes of a step signal. With the dead-time effect present, the response speed and stability of the current loop are affected, while without the dead-time effect, the current loop exhibits excellent performance. This comparison helps to understand the importance of dead-time compensation methods, namely, how they can improve the current loop control performance under practical hardware constraints.
[0131] Figure 3 This is a schematic diagram comparing the current loop response effects with and without dead zone under bias compensation according to an embodiment of this application. Figure 3 exist Figure 2 Based on this, the quadrature-axis current command was adjusted by adding a bias (e.g., 2A), changing the command signal from varying between ±1A to varying within the positive range (e.g., 1, 3A). The purpose of this adjustment is to ensure that the current direction controlled by the current loop remains constant during the test, thereby eliminating the impact of voltage distortion caused by the dead-time effect on the test results. Figure 3As shown, the horizontal axis represents time in seconds, with values including 0, 0.002, 0.004, 0.006, 0.008, 0.01, 0.012, 0.014, 0.016, 0.018, and 0.02, representing various time points during the test. The horizontal axis also represents the entire time range from the start of the current step command to the stable response of the control system. The vertical axis represents current in amperes, with values including -0.5, 0, 0.5, 1, 1.5, 2, 2.5, 3, and 3.5, representing the instantaneous current value during the test, used to reflect the motor's actual current response to command changes.
[0132] also, Figure 3 The vertical axis value range is adjusted by adding a bias amount to the original current command to ensure that the current command is always in a fixed direction, eliminating the influence of the dead-zone effect. The quadrature-axis current command curve represents the current command signal given during the test. The current command signal has been biased to keep the current command in one direction, avoiding the influence of the dead-zone effect on the test. The quadrature-axis current dead-zone-free curve represents the response of the current loop to the quadrature-axis current command when there is no dead-zone effect. The quadrature-axis current dead-zone-free curve reflects the current loop's fast response, stable tracking, and small overshoot when controlling the current command, demonstrating the good performance of the current loop parameters under dead-zone-free conditions. The quadrature-axis current dead-zone curve represents the response of the current loop to the quadrature-axis current command under real-world conditions with switching dead-zone effects, by applying the bias compensation strategy proposed in this application.
[0133] Depend on Figure 3 It can be seen that although the current response differs from the curve under the dead-zone-free condition in the initial stage due to the accumulation of integral compensation, the two curves almost overlap in the steady-state stage. This indicates that even under the condition of dead-zone effect, the current loop can effectively overcome the dead-zone effect and achieve the same performance as under the dead-zone-free condition through the bias compensation strategy.
[0134] Figure 4 This is a schematic diagram comparing the current loops with and without dead zones under a sinusoidal wave command, according to an embodiment of this application. Figure 4As shown, the horizontal axis represents time in seconds, with values including 0, 0.005, 0.01, 0.015, 0.02, 0.025, 0.03, 0.035, 0.04, 0.045, and 0.05, representing various time points during the test and marking the entire time range from the start of the sine wave command to the current loop response reaching a steady state. The vertical axis represents current in amperes, with values including -1.5, -1, -0.5, 0, 0.5, 1, and 1.5, representing the instantaneous value of the motor's actual current response to the sine wave command, used to demonstrate the dynamic process of current change with the command. The quadrature-axis current command curve represents the desired current command level, i.e., the target value that the current loop wants the motor current to reach. The quadrature-axis current command curve also represents the shape of the sine wave command, i.e., the current command that changes with time according to a sine function rule. The quadrature-axis current command curve serves as the input to the current loop during the test to verify its dynamic response characteristics. The quadrature-axis current dead-zone-free curve represents the response of the current loop to a quadrature-axis current command when there is no dead-zone effect. The quadrature-axis current dead-zone curve represents the response of the current loop to a quadrature-axis current command when a dead-zone effect exists.
[0135] Depend on Figure 4 It is evident that the introduction of the dead zone effect severely distorts the actual response of the current loop, causing the test results to fail to reflect the true performance.
[0136] Figure 5 This is a schematic diagram comparing the response effects of a sinusoidal current command with and without dead zone under bias compensation according to an embodiment of this application. Figure 5 exist Figure 4 Based on this, by applying the bias compensation strategy of this application, that is, adding a bias to the current command to keep the current direction unchanged during the test, the current loop response effect after eliminating the dead zone effect can be observed. Figure 5As shown, the horizontal axis represents time in seconds, with values including 0, 0.005, 0.01, 0.015, 0.02, 0.025, 0.03, 0.035, 0.04, 0.045, and 0.05. This represents the entire duration from the start of the test to the current loop reaching a steady state. The vertical axis represents current in amperes, with values including -0.5, 0, 0.5, 1, 1.5, 2, 2.5, 3, and 3.5. This reflects the actual current output of the current loop under biased command control. The quadrature-axis current command curve represents the biased sine wave command signal. Due to the added bias, the sine wave command signal is no longer symmetrical about 0, but lies above or below 0. The quadrature-axis current dead-zone-free curve represents the current loop's response to the quadrature-axis current command when there is no dead-zone effect. The quadrature-axis current dead-zone curve is used to represent the current loop's response to quadrature-axis current commands by adding a bias compensation strategy when a dead-zone effect actually exists.
[0137] Depend on Figure 5 It can be seen that although there is a brief difference in the initial stage, as the integral compensation effect takes effect, the dead-zone curve of the quadrature-axis current gradually approaches and eventually coincides with or approaches the dead-zone-free curve of the quadrature-axis current. This shows that even in the case of dead-zone effect, the method of this application can still achieve current loop control performance comparable to that under dead-zone-free conditions.
[0138] Figure 6 This is a schematic diagram comparing the current loop response effects of a motor in a rotating state according to an embodiment of this application. For example... Figure 6 As shown, the horizontal axis represents time in seconds, with values including 0, 0.002, 0.004, 0.006, 0.008, 0.01, 0.012, 0.014, 0.016, 0.018, and 0.02, representing the time progression of the current loop's response to the command signal, from the start of the test until the current response stabilizes. The vertical axis represents current in amperes, with values including 0, 0.5, 1, 1.5, 2, 2.5, 3, and 3.5, reflecting the actual current output of the current loop during the test. The quadrature-axis current command curve represents the current command signal after biasing while the motor is rotating. The quadrature-axis current dead-zone-free curve represents the current loop's response to the biased current command under ideal conditions with theoretically no dead-zone effect. The quadrature-axis current dead-zone curve represents the current loop's response to the biased quadrature-axis current command under actual conditions where the motor is rotating and a dead-zone effect exists.
[0139] Depend on Figure 6 It can be seen that, with Figure 3 and Figure 5 compared to, Figure 6 The dead-zone curve of the quadrature-axis current in the figure does not coincide with the dead-zone-free curve of the quadrature-axis current in steady state (even if it is not explicitly marked in the figure), and instead shows a large deviation in tracking the current command. This is because the rotation of the motor causes the phase current to commutate at different time points. Even if the current command is kept unidirectional by applying a bias, the dead-zone effect near the phase current commutation point will still introduce additional voltage distortion, affecting the accurate tracking of the current command.
[0140] Figure 7 This is a schematic diagram illustrating the dynamic commutation of phase current during motor rotation, according to an embodiment of this application. For example... Figure 7 As shown, the horizontal axis represents time in seconds, with values including 0, 0.002, 0.004, 0.006, 0.008, 0.01, 0.012, 0.014, 0.016, 0.018, and 0.02, representing the entire time sequence of motor operation, from the start of the test to the completion of one complete rotation cycle. The vertical axis represents current in amperes, with values including -3, -2, -1, 0, 1, 2, 3, and 4, used to represent the changes in the motor's A-phase current, B-phase current, and C-phase current over time. Figure 7 The three curves in the diagram represent the changes in the A-phase, B-phase, and C-phase currents of the motor over time. These curves visually demonstrate the switching process of the phase current from one phase to another as the motor rotates. As the motor rotates, the phase current alternates between phases, forming a typical triangular waveform or a sine wave-like shape, depending on the control strategy of the motor drive.
[0141] Depend on Figure 7 It can be seen that, Figure 7 The phase current commutation point in the middle corresponds to Figure 6 The moment when the quadrature-axis current curve shows a significant deviation due to a dead zone (after biasing) is significant. Even if the current command is biased before testing, the current loop response is disturbed by the dead zone effect at the moment of commutation, leading to a difference from the ideal response (i.e., a quadrature-axis current response without dead zone). Simultaneously, with continuous motor rotation, frequent phase current commutation gradually accumulates the dead zone effect, impacting the long-term performance of the current loop. This is... Figure 6 This manifests as increased curve fluctuations and decreased control quality. Therefore, locking the motor in a stationary position during current loop debugging is a crucial step to ensure proper loop parameter settings and good motor control performance.
[0142] According to an embodiment of this application, an apparatus embodiment for a method of testing an electric motor is provided. It should be noted that the apparatus can be used to perform the above-described method of testing an electric motor. Figure 8 This is a schematic diagram of a motor testing device according to an embodiment of this application, as shown below. Figure 8As shown, the device includes: a control module 802, an adjustment module 804, a data acquisition module 806, and a test module 808.
[0143] The control module can be used to keep the motor stationary during the operation of the motor's corresponding current loop based on the initial current control signal, if a current loop test command for the motor is received. The initial current control signal is used to control the change of the motor's current direction. The adjustment module can be used to adjust the initial current control signal based on preset bias parameters to obtain a target current control signal when the motor is stationary. The target current control signal is used to keep the motor's current direction unchanged. The acquisition module can be used to run the current loop based on the target current control signal and acquire the feedback signal of the current loop to the target current control signal. The testing module can be used to test the current loop based on the feedback signal and obtain the test result, which indicates whether the current loop parameters of the current loop are valid.
[0144] Optionally, the control module can also be used to determine the braking torque of the electromagnetic brake based on the motor's running speed if a current loop test command is received, wherein the electromagnetic brake is installed on the motor shaft; and control the electromagnetic brake to generate braking torque to brake the motor rotor so that the motor is stationary.
[0145] Optionally, the analysis module can be used to analyze the signal frequency of the initial current control signal to obtain the signal change period of the initial current control signal; based on the signal change period, determine the signal peak and signal valley of the initial current control signal; based on the signal peak and signal valley, determine the target absolute value of the initial current control signal during the signal change period, wherein the target absolute value is greater than a preset threshold; and based on the target absolute value and the preset safety threshold, determine the preset bias parameter.
[0146] Optionally, the analysis module can also be used to determine the target difference between the target absolute value and the preset safety threshold; determine the target ratio between the target difference and the preset safety threshold; if the target ratio is greater than the preset ratio, decrease the initial bias parameter to obtain the preset bias parameter; if the target ratio is less than the preset ratio, increase the initial bias parameter to obtain the preset bias parameter; if the target ratio is the preset ratio, determine the initial bias parameter as the preset bias parameter.
[0147] Optionally, the analysis module can also be used to obtain the motor load mode of the motor, wherein the motor load mode is used to represent the load state of the motor connected to the load; determine the initial absolute value of the initial current control signal in the signal change cycle based on the signal peak value and the signal valley value; and adjust the initial absolute value based on the motor load mode to obtain the target absolute value.
[0148] Optionally, the analysis module can also be used to perform absolute value conversion on the signal peak value to obtain a first absolute value; perform absolute value conversion on the signal valley value to obtain a second absolute value; and determine the minimum absolute value between the first absolute value and the second absolute value as the initial absolute value.
[0149] Optionally, the acquisition module can also be used to input the target current control signal to the current loop and acquire the output current of the current loop; determine the error signal based on the target current and output current corresponding to the target current control signal; and acquire the feedback signal of the current loop to the target current control signal based on the error signal and a preset threshold. Optionally, the acquisition module can also be used to acquire the feedback signal of the current loop to the target current control signal if the error signal is less than or equal to the preset threshold; if the error signal is greater than the preset threshold, adjust the target current control signal based on the error signal to obtain an adjusted current control signal, run the current loop based on the adjusted current control signal until the error signal between the output current of the current loop and the target current is less than or equal to the preset threshold, determine the adjusted current control signal as the target current control signal, and acquire the feedback signal of the current loop to the target current control signal.
[0150] Optionally, the test module can also be used to determine the response time parameter, overshoot parameter, and oscillation parameter in the feedback signal; if the response time parameter is within a preset response time interval, the overshoot parameter is within a preset overshoot interval, and the oscillation parameter is within a preset oscillation parameter interval, the test result is determined to be that the current loop parameter of the current loop is valid; if the response time parameter is not within a preset response time interval, or the overshoot parameter is not within a preset overshoot interval, or the oscillation parameter is not within a preset oscillation parameter interval, the test result is determined to be that the current loop parameter of the current loop is invalid.
[0151] Embodiments of this application also provide a motor, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of this application when it runs.
[0152] Embodiments of this application also provide a computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of this application.
[0153] Embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the methods of various embodiments of this application.
[0154] Embodiments of this application also provide a computer program product, including a non-volatile computer-readable storage medium for storing a computer program that, when executed by a processor, implements the methods in various embodiments of this application.
[0155] Embodiments of this application also provide a computer program that, when executed by a processor, implements the methods described in the various embodiments of this application.
[0156] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0157] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0158] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0159] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0160] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0161] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0162] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for testing an electric motor, characterized in that, include: During the operation of the motor's corresponding current loop based on the initial current control signal, if a current loop test command for the motor is received, the motor is controlled to be in a stationary state. The initial current control signal is used to control the change of the current direction of the motor. When the motor is stationary, the initial current control signal is adjusted based on a preset bias parameter to obtain a target current control signal, wherein the target current control signal is used to control the current direction of the motor to remain unchanged; The current loop is run based on the target current control signal, and the feedback signal of the current loop to the target current control signal is collected; The current loop is tested based on the feedback signal to obtain test results, wherein the test results are used to indicate whether the current loop parameters of the current loop are valid; The current loop is tested based on the feedback signal to obtain test results, including: Determine the response time parameter, overshoot parameter, and oscillation parameter in the feedback signal; If the response time parameter is within a preset response time range, the overshoot parameter is within a preset overshoot range, and the oscillation parameter is within a preset oscillation parameter range, then the test result is determined to be valid for the current loop parameter of the current loop. If the response time parameter is not within the preset response time range, or the overshoot parameter is not within the preset overshoot range, or the oscillation parameter is not within the preset oscillation parameter range, the test result is determined to be that the current loop parameter of the current loop is invalid.
2. The method according to claim 1, characterized in that, If a current loop test command for the motor is received, controlling the motor to be in a stationary state includes: If the current loop test command is received, the braking torque of the electromagnetic brake is determined based on the motor operating speed of the motor, wherein the electromagnetic brake is installed on the motor shaft of the motor; The electromagnetic brake is controlled to generate the braking torque to brake the motor rotor, so that the motor is in the stationary state.
3. The method according to claim 1, characterized in that, The method further includes: The signal frequency of the initial current control signal is analyzed to obtain the signal change period of the initial current control signal. Based on the signal change period, determine the peak value and valley value of the initial current control signal; Based on the signal peak value and the signal valley value, the target absolute value of the initial current control signal in the signal change period is determined, wherein the target absolute value is greater than a preset threshold, and the preset threshold is the minimum absolute value of the current control signal set to avoid the influence of the dead zone effect; Based on the target absolute value and the preset safety threshold, the preset bias parameter is determined, wherein the preset safety threshold is used to represent the safety boundary value for determining the preset bias parameter.
4. The method according to claim 3, characterized in that, Based on the target absolute value and the preset safety threshold, the preset bias parameter is determined, including: Determine the target difference between the target absolute value and the preset safety threshold; Determine a target ratio between the target difference and the preset safety threshold, wherein the target ratio is the ratio between the target difference and the preset safety threshold; If the target ratio is greater than the preset ratio, decrease the initial bias parameter to obtain the preset bias parameter; If the target ratio is less than the preset ratio, increase the initial bias parameter to obtain the preset bias parameter; If the target ratio is the preset ratio, then the initial bias parameter is determined to be the preset bias parameter.
5. The method according to claim 4, characterized in that, Based on the signal peak value and the signal valley value, the target absolute value of the initial current control signal during the signal change period is determined, including: Obtain the motor load mode of the motor, wherein the motor load mode is used to represent the load state of the load connected to the motor; Based on the signal peak value and the signal valley value, determine the initial absolute value of the initial current control signal during the signal change period; The initial absolute value is adjusted based on the motor load mode to obtain the target absolute value.
6. The method according to claim 5, characterized in that, Based on the signal peak value and the signal valley value, the initial absolute value of the initial current control signal during the signal change period is determined, including: The signal peak value is converted to an absolute value to obtain a first absolute value; The absolute value of the signal valley is converted to a second absolute value. The initial absolute value is determined to be the smaller of the first absolute value and the second absolute value.
7. The method according to claim 1, characterized in that, The current loop is operated based on the target current control signal, and the feedback signal of the current loop to the target current control signal is collected, including: The target current control signal is input to the current loop, and the output current of the current loop is acquired. Based on the target current corresponding to the target current control signal and the output current, an error signal is determined; If the error signal is less than or equal to a preset threshold, the feedback signal of the current loop to the target current control signal is collected; If the error signal is greater than the preset threshold, the target current control signal is adjusted based on the error signal to obtain an adjusted current control signal. The current loop is run based on the adjusted current control signal until the error signal between the output current of the current loop and the target current is less than or equal to the preset threshold. The adjusted current control signal is then determined to be the target current control signal, and the feedback signal of the current loop to the target current control signal is collected.
8. An electric motor, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the method according to any one of claims 1 to 7.