A comprehensive detection system for an electric bicycle controller
By employing virtual back EMF injection, real-time nonlinear inductance compensation, and electromechanical coupling dynamic reconfiguration techniques, combined with a hierarchical decoupling control architecture, the problem of low efficiency in electric bicycle controller testing equipment has been solved, achieving high-precision and fully automated testing results and ensuring the reliability and consistency of the test results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU ZHIQI DRIVE TECH CO LTD
- Filing Date
- 2026-03-19
- Publication Date
- 2026-06-02
AI Technical Summary
Existing electric bicycle controller testing equipment is inefficient, making it difficult to guarantee the consistency and reliability of test results. Furthermore, it is difficult to reproduce the dynamic and complex working conditions during actual riding, resulting in discrepancies between test results and actual application scenarios.
By employing virtual back EMF injection, real-time nonlinear inductance compensation, and electromechanical coupling dynamic reconstruction techniques, the motor model is reconstructed in the digital domain. Combined with a hierarchical decoupling control architecture, this achieves high-fidelity simulation of real riding conditions, ensuring the accuracy and stability of the detection.
It achieves high-precision, fully automated testing of electric bicycle controllers, covering key operating conditions such as low speed and high torque, avoiding the risk of failure caused by compatibility issues, improving the reliability and consistency of test results, and expanding the depth and breadth of testing.
Smart Images

Figure CN122131749A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of power electronics and motor control technology, and in particular to a comprehensive testing system for electric bicycle controllers. Background Technology
[0002] With the popularization of green travel concepts, electric bicycles have become the mainstream short-distance transportation tool worldwide, and their market size and social ownership continue to rise. As the nerve center of an electric bicycle, the controller undertakes key functions such as motor power regulation, speed control, battery protection, pedal detection, and safety strategies. Its performance and reliability directly determine the driving safety of the vehicle. Therefore, comprehensive testing of the controller before it leaves the factory is a key link to ensure the quality of the end product and the safety of users.
[0003] Most small and medium-sized enterprises still rely on simple test benches operated manually, conducting tests by manually connecting the power supply and adjusting the load. This method is not only inefficient, but also prone to missed detections due to differences in human operation, making it difficult to guarantee the consistency and reliability of test results. Existing testing equipment that can achieve a certain degree of automation mostly relies on computer control units and dedicated software, which are complex systems. The cost of a single device often exceeds tens of thousands of yuan, creating a sharp contradiction with the cost affordability of many small and medium-sized manufacturers in the industry.
[0004] However, whether it is a simple test bench or a partially automated device, the load simulation mostly uses static resistors or simple inductors, which makes it difficult to reproduce the dynamic and complex working conditions in real riding, such as continuous changes in pedal speed, sudden braking, load fluctuations caused by slope, and the coupling effect of motor back EMF and mechanical motion. This static or simplified test environment leads to deviations between the test results and the actual application scenario. Summary of the Invention
[0005] This invention overcomes the shortcomings of the prior art and provides a comprehensive testing system for electric bicycle controllers.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is: a comprehensive testing system for electric bicycle controllers, comprising the following steps:
[0007] S1. Perform an electrical self-test to verify the effectiveness of the basic operating status;
[0008] S2. After the self-test passes, the preset automated test sequence is obtained, and the control and simulation of various test conditions for the controller under test are performed.
[0009] S3. While running the automated test sequence, a virtual motor operating environment is constructed on the rotorless stator coils to perform virtual reconstruction and dynamic compensation algorithms; wherein, the dynamic compensation algorithm includes the generation and injection of virtual back electromotive force, real-time compensation of nonlinear inductance, and electromechanical coupling dynamic reconstruction.
[0010] S4. Through a hierarchical decoupled control architecture, the generation and injection of the virtual back electromotive force, real-time compensation of nonlinear inductance, and dynamic reconstruction of electromechanical coupling are processed collaboratively to obtain the detection data results of the controller.
[0011] In a preferred embodiment of the present invention, in step S1, the electrical self-test operation includes detecting the power supply integrity, internal control logic state, and electrical state of the power load interface of the system.
[0012] In a preferred embodiment of the present invention, in step S2, the preset automated test sequence includes at least one or more of the following test items: stall condition test, routine test, wheel slippage test, hill climb test, protection strategy test, and instrument display test.
[0013] In a preferred embodiment of the present invention, in step S3, the generation and injection of the virtual back electromotive force is based on the real-time acquisition of the phase currents of the rotorless stator coils, calculating the instantaneous value of the back electromotive force that satisfies the preset motor voltage balance equation, and by adjusting the feedback compensation logic inside the system, correcting the port potential sensed by the controller under test to a target value that includes the instantaneous value of the back electromotive force.
[0014] In a preferred embodiment of the present invention, in step S3, the real-time compensation of the nonlinear inductance is to obtain the instantaneous inductance value corresponding to the current based on a pre-established mapping model describing the nonlinear relationship between the stator coil inductance and the excitation current intensity, and to dynamically correct the current sampling gain and control parameters based on the instantaneous inductance value, so that the load impedance sensed by the controller under test is equivalent to the ideal motor load.
[0015] In a preferred embodiment of the present invention, in step S3, the electromechanical coupling dynamic reconstruction converts the collected stator phase current into virtual electromagnetic torque. Based on the virtual electromagnetic torque, the preset simulated vehicle rotational inertia, and the load torque determined by the simulated operating conditions, the mechanical motion equation of the motor is solved in real time to obtain the simulated speed. The simulated speed is then fed back into the calculation of the virtual back electromotive force to realize the closed-loop dynamic correlation between electrical quantities and mechanical quantities.
[0016] In a preferred embodiment of the present invention, in step S3, the generation of the virtual back electromotive force further includes superimposing a harmonic component of a specific order on the fundamental wave to simulate the influence of the non-sinusoidal distribution of the motor magnetic field on the back electromotive force waveform.
[0017] In a preferred embodiment of the present invention, in step S4, the hierarchical decoupling control architecture includes an upper parameter adaptive layer and a lower high-speed current tracking layer; the upper parameter adaptive layer operates at a lower frequency and is responsible for the calculation and updating of virtual back electromotive force, nonlinear inductor compensation parameters, and electromechanical coupling dynamic reconstruction; the lower high-speed current tracking layer operates at a higher frequency and forces the actual current to track the reference current command generated by the upper layer, ensuring the speed and stability of the system response.
[0018] Secondly, the present invention provides a comprehensive testing system for an electric bicycle controller, comprising:
[0019] The electrical self-test module is used to verify the effectiveness of the controller under test in completing the basic operating status.
[0020] The test sequence module is used to control and simulate various test conditions for the controller under test;
[0021] The test board has an embedded main control unit, which is used to execute the virtual reconstruction and dynamic compensation algorithm of the system, and control the execution of the automated test sequence and the real-time monitoring of the response of the controller under test, so as to complete the comprehensive testing of the controller under test.
[0022] The layered decoupling module is used to coordinate with the test board to process the generation and injection of virtual back electromotive force, real-time compensation of nonlinear inductance, and dynamic reconstruction of electromechanical coupling.
[0023] In a preferred embodiment of the present invention, the main control unit further includes:
[0024] The signal acquisition array is used to acquire the three-phase current and bus voltage output by the controller under test in real time.
[0025] The power drive module is used to generate and output simulated vehicle input signals to the controller under test.
[0026] Data storage module, used to record test data;
[0027] The human-computer interaction unit is used to display the test status and results.
[0028] This invention addresses the shortcomings of the prior art and has the following beneficial effects:
[0029] (1) This system integrates virtual back EMF injection technology in the test board. By calculating and compensating the instantaneous value of back EMF corresponding to the simulated speed in real time in the digital domain, key speed and position information is implanted into the feedback loop of the controller under test. This enables the observer and closed-loop control algorithm inside the controller to operate normally, thereby accurately reproducing the torque and speed characteristics of the real motor. Compared with the current runaway and algorithm failure caused by the complete absence of back EMF when using a simple rotorless stator scheme, this technology fundamentally solves the core contradiction of the absence of back EMF, enabling the detection to cover key working conditions such as low speed and high torque, and effectively avoiding the risk of failure caused by the controller due to compatibility issues in actual riding.
[0030] (2) The system executes a nonlinear inductance real-time compensation algorithm. This algorithm is based on the nonlinear inductance current model established in the pre-experiment and dynamically corrects the control parameters according to the real-time current during the detection process. It actively cancels the load impedance distortion caused by the magnetic saturation of the stator core, so that the impedance characteristics of the rotorless stator coil during operation are always equivalent to an ideal motor load with a constant inductance value. Compared with the large nonlinear drop in inductance value caused by magnetic saturation in the traditional rotorless scheme, this technology eliminates the current waveform distortion and test result misjudgment caused by it, ensures the reliability and consistency of the controller dynamic response test results, and improves the accuracy of performance evaluation.
[0031] (3) This system introduces electromechanical coupling dynamic reconfiguration logic, which solves the mechanical motion equation of the motor in real time in the digital domain, converts electrical quantities into mechanical quantities and forms closed-loop feedback, and reconstructs the dynamic relationship between the electrical system and the mechanical system that are physically cut off by the rotorless structure. It can simulate the transient process in real riding with high fidelity, such as the current-speed coupling change during rapid acceleration, and the demand for drive current due to the increase in load torque when climbing. Compared with static load or simple dynamic load schemes, which cannot simulate such electromechanical coupling processes, this system realizes the reproduction of complex dynamic working conditions, greatly expands the depth and breadth of detection, and makes the detection environment highly matched with the actual application scenario.
[0032] (4) This system adopts a hierarchical decoupled control architecture, which divides the control task into a bottom high-speed current tracking layer and an upper parameter adaptive layer, and performs decoupled scheduling on the time scale. It coordinates the management of multiple parallel algorithms such as virtual back EMF injection, nonlinear inductor compensation and electromechanical coupling reconstruction, avoiding potential logical conflicts and loop oscillations, and ensuring the stability and fast response of the entire high-fidelity simulation system in real-time operation. Compared with the system instability or response lag that may be caused by simply superimposing multiple compensation algorithms, this technology is the cornerstone for the reliable and coordinated operation of various core functions. Under the condition of abandoning the expensive computer central control unit, it still realizes the stable execution of complex algorithms on low-cost embedded hardware, taking into account both high performance and high reliability. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a flowchart of a preferred embodiment of the present invention;
[0035] Figure 2 This is a schematic diagram of a preferred embodiment of the present invention;
[0036] Figure 3 This is a flowchart illustrating the operation of a preferred embodiment of the present invention.
[0037] In the diagram: 1. Fixed bracket; 2. Test board; 3. DC power supply unit; 4. Rotorless stator coil. Detailed Implementation
[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] Application Overview:
[0040] To address the limitations of traditional controller detection technologies, which struggle to balance cost, accuracy, and automation, some studies have attempted to incorporate rotorless stator coils as power loads into the detection system. This technology utilizes the energy consumption characteristics of inductor coils to simulate motor power consumption and, due to the removal of the rotor, offers inherent safety, low hardware cost, and a simple structure.
[0041] Then, when using rotorless stator coils directly as the load, the removal of the physical rotor causes three fundamental physical defects: First, the coils cannot generate a back electromotive force that is strictly related to the speed during actual motor operation, causing the closed-loop control algorithm of the controller under test to become disordered due to the lack of feedback information, resulting in current runaway under critical operating conditions and making it impossible to simulate real drive characteristics; Second, the stator core is prone to magnetic saturation under rotorless constraints, and its inductance value drops significantly and nonlinearly with the current, which severely distorts the impedance characteristics of the load, rendering the test results of the controller's dynamic performance meaningless; Finally, this scheme completely breaks the strong coupling relationship between the electrical system and the mechanical system established by the equation of motion in a real motor, making it impossible to simulate the dynamic feedback of the electrical system due to changes in mechanical state during riding, resulting in a serious disconnect between the test environment and real applications. These defects have kept the low-cost rotorless stator scheme at the level of simple functional testing for a long time, and it cannot be used for comprehensive performance evaluation of the controller.
[0042] The applicant recognized that to overcome this predicament, it was not enough to simply repair the physical hardware itself; a change in thinking was necessary, starting from the top-level design of the control system theory. Since the rotorless stator physically lacks the characteristics of back electromotive force, linear inductance, and electromechanical coupling, a virtual but realistic motor model could be reconstructed in the computational domain of the test board using active digital control technology. This model could then be used to compensate for and correct the actual performance of the physical load in real time.
[0043] To address this, this invention proposes three core technologies in the digital domain of the test board: active virtual back EMF injection, real-time nonlinear inductance compensation, and dynamic reconfiguration of electromechanical coupling. These technologies compensate for the inherent physical defects of rotorless stator coils. Furthermore, a hierarchical decoupling control architecture is introduced to fundamentally solve the problems of current runaway, impedance distortion, and operational condition simulation distortion caused by the lack of back EMF, magnetic circuit saturation, and electromechanical coupling breakage in rotorless stators.
[0044] like Figure 1 and Figure 3 As shown, a comprehensive testing method for an electric bicycle controller includes:
[0045] S1. Verify the validity of the system's basic operating status by performing the system power-on self-test operation;
[0046] S2. After the self-test passes, execute the preset automated test sequence to control and simulate various test conditions for the controller under test;
[0047] S3. While running the automated test sequence, execute the virtual reconstruction and dynamic compensation algorithm to build a virtual motor operating environment on the rotorless stator coil 4. The dynamic compensation algorithm includes the generation and injection of virtual back electromotive force, real-time compensation of nonlinear inductance, and electromechanical coupling dynamic reconstruction.
[0048] S4. The system uses a hierarchical decoupled control architecture to collaboratively process the generation and injection of the virtual back electromotive force, real-time compensation of nonlinear inductance, and dynamic reconstruction of electromechanical coupling, thereby obtaining the controller's detection data results.
[0049] The core of this invention lies in addressing the inherent defects of rotorless stator loads through digital reconstruction. Specifically, it employs three collaborative technologies: virtual back EMF injection, enabling the controller to operate normally in a closed loop and accurately replicate real-time torque and speed characteristics; real-time nonlinear inductor compensation, offsetting the effects of magnetic saturation and presenting a constant linear load impedance to ensure accurate testing; and electromechanical coupling dynamic reconstruction, rebuilding the electromechanical correlation in the digital domain to simulate dynamic riding conditions with high fidelity. Finally, a hierarchical decoupling control architecture ensures the stable and collaborative operation of the above algorithms, thereby achieving high-precision, fully automated detection with low-cost hardware, resolving the industry's core contradiction between cost, accuracy, and automation.
[0050] Each step will be explained in detail below.
[0051] In step S1, after the system receives the start detection command, it executes a series of self-test procedures to ensure that it and its connection with external devices are in normal condition, laying the foundation for subsequent accurate detection. Among them, the electrical self-test includes detecting the power supply integrity, the internal control logic status, and the electrical status of the power load interface.
[0052] Power supply integrity testing uses a voltage sampling circuit to monitor whether the output bus voltage is within the preset rated range and to detect whether the voltage ripple is too large; at the same time, it also checks whether the power supply voltage of each internal functional module is normal.
[0053] Internal control logic status detection involves running a self-test program to verify whether critical areas such as the program counter, stack pointer, random access memory, and read-only memory are functioning correctly, in order to ensure the reliable execution of subsequent algorithms.
[0054] The power load interface electrical status detection detects whether there is a short circuit or open circuit at the output terminal connected to the rotorless stator coil 4 when the system is powered on but not being tested.
[0055] In step S2, multiple pre-stored automated test sequences are used, which correspond to various complex operating conditions that electric bicycles may encounter during actual riding. Based on the test items or preset test procedures selected by the user, the corresponding test sequences are read, and the power of these sequences generates corresponding analog signals to drive the controller under test, thereby simulating specific test conditions.
[0056] The preset automated test sequence includes the following tests: stall condition test, routine test, wheel slippage test, hill climb test, protection strategy test, and instrument display test.
[0057] The stall test simulates the user turning the throttle all the way to the maximum power output by the throttle module, while the speed module outputs a 0 speed signal to simulate the stall condition of the whole vehicle.
[0058] The standard test involves controlling the throttle module to generate irregular throttle signals, while simultaneously controlling the speed signal to simulate the power output effect of the controller at different speeds. At the same time, it controls the gear signal to simulate the operating conditions of the vehicle at various gears.
[0059] The wheel slippage test is conducted by controlling the throttle module to generate a throttle signal and simultaneously control the speed signal, causing the controller to enter a constant speed cruise mode. Then, the speed signal is suddenly changed to simulate the slippage condition of the entire vehicle.
[0060] The hill-climbing test is conducted by controlling the throttle module to generate a full-throttle signal, while simultaneously adjusting the speed control module to reduce the speed to 100 rpm, simulating the hill-climbing conditions of the entire vehicle.
[0061] The protection strategy test is conducted by controlling the throttle module to generate a full-throttle signal, while simultaneously adjusting the speed to a constant 500 rpm via the speed module, and then gradually downshifting and upshifting, as well as repeatedly switching between forward and reverse gear signals.
[0062] The instrument display test simulates the communication between the instrument and the controller by sending specified communication commands to the controller through the communication test module.
[0063] In step S3, the physical defects of the rotorless stator coil 4 are actively compensated by the algorithm. The main control unit runs these algorithms in real time. Its input is the real-time electrical quantity collected by the signal acquisition array, and the output is the corrected control parameters and the reference command for the underlying current tracking.
[0064] Virtual back EMF injection addresses the problem of not being able to generate a rotating back EMF. The algorithm calculates a virtual back EMF signal in real time based on the target operating conditions and, by adjusting the system's feedback network, superimposes this potential onto the actual sensed terminal voltage of the controller under test, making the controller believe that it is driving a rotating motor. Its basis is the motor voltage balance equation as follows:
[0065] ;
[0066] in, For the voltage vector at the controller output terminal, This is the equivalent resistance of the stator coil. For sampling current vector, The stator flux linkage vector, This represents the injected virtual back electromotive force vector. The algorithm determines this by solving this equation in real time. .
[0067] Real-time nonlinear inductance compensation addresses the problem of nonlinear decrease in inductance caused by magnetic saturation of the stator core under high current. The algorithm pre-determines the coil inductance. With current Functional relationship During operation, based on real-time sampled current... The controller dynamically looks up or calculates the current instantaneous inductance value and adjusts the control parameters accordingly to keep the load impedance sensed by the controller linear. This relationship can be modeled as follows:
[0068] ;
[0069] in, It is a transient inductance. It is the linear region reference inductor. It is the saturation decay coefficient. It is the current magnitude. It is the saturation critical current; An accurate lookup table can be obtained through offline calibration, which involves applying a series of stepped currents from zero to the rated value and measuring the voltage response to calculate the instantaneous inductance.
[0070] Electromechanical coupling dynamic reconfiguration aims to reconstruct the dynamic relationship between the electrical and mechanical systems in a real electric motor. The algorithm solves the motor's mechanical motion equations in real time in the digital domain. It calculates the electromagnetic torque. With simulated load torque By comparison and integration, the angular velocity of the virtual motor is obtained. This velocity is then fed back into the virtual back EMF injection algorithm, forming a closed loop. The equations of motion and phase correlation are as follows:
[0071] ; ;
[0072] in, To simulate rotational inertia, The damping coefficient is... To match the simulated speed and gradient Load capacity Related load torque, for The virtual electrical angle at any given moment. This is the initial phase. It realistically simulates the effect of a non-sinusoidal distribution of the motor's magnetic field, and can generate a fundamental back electromotive force. Superimposed on specific
[0073] Preferably, harmonic superposition results in more harmonics:
[0074] ;
[0075] in, For a preset set of harmonic orders, and For the first The amplitude and initial phase angle of the second harmonic.
[0076] Step S4 describes the software control architecture that ensures the stable and coordinated operation of multiple compensation algorithms.
[0077] Layered decoupled control architecture refers to a software architecture that divides the entire complex control task into different layers according to time and function; it aims to solve the timing conflicts, loop coupling and system instability problems that may occur when multiple dynamic compensation algorithms run at the same time.
[0078] Cooperative execution is a process in which the system achieves stable collaboration of algorithms through the division of labor between the upper-level parameter adaptation layer and the lower-level high-speed current tracking layer.
[0079] The upper parameter adaptation layer operates at a lower frequency (e.g., 1-10kHz) and is responsible for calculating and updating slowly varying parameters. The model queries the current inductance; the mechanical motion equations are solved, and the simulated rotational speed is updated. and electric angle ; Calculate the new virtual back electromotive force and reference current command This layer ensures the accuracy of the operating condition model.
[0080] The underlying high-speed current tracking layer operates at very high frequencies (e.g., >50kHz), and its core task is singular and fast, as provided by the upper layers. For absolute targets, high-speed feedforward or feedback control is employed to directly drive the power regulation circuit, forcing the actual physical current in the rotorless stator coil 4. Real-time, precise tracking This layer ensures a fast physical response. To achieve this high-speed control, the power regulation circuit must employ a low inductive reactance design and high-frequency power devices to minimize the effects of switching delay and dead time.
[0081] Understandably, this layered decoupling approach, where upper-level decision-making and lower-level execution are implemented, isolates the coupling effects of complex algorithms at the upper level, ensuring the stability and speed of the underlying current loop. This allows virtual back EMF injection, nonlinear inductance compensation, and electromechanical coupling reconstruction to work seamlessly together, jointly constructing a high-fidelity virtual motor environment.
[0082] Example 1:
[0083] The system configuration parameters are as follows: Simulated vehicle rotational inertia for The reference inductance of rotor-less stator coil 4 in the linear region for Magnetic circuit saturation critical current threshold The set of harmonic orders superimposed in the virtual back electromotive force is 25A. Including fifth and seventh harmonics, the system executes core algorithms such as virtual back EMF injection, real-time nonlinear inductor compensation, and electromechanical coupling dynamic reconstruction. The main control unit uses a 200MHz ARM Cortex-M7 core microcontroller with an FPU, whose ADC supports three-channel synchronous sampling at a sampling rate of 2MSPS. The underlying current loop control period is set to 20μs (50kHz), and the upper-level model solution period is set to 200μs (5kHz).
[0084] Comparative Example 1:
[0085] A real permanent magnet synchronous motor with a hysteresis brake is used as the load. This scheme can physically generate back electromotive force, but it is limited by mechanical inertia and suffers from mechanical wear.
[0086] Comparative Example 2:
[0087] Using the existing simple rotorless scheme, which only uses a static inductor-resistor (LR) array as the load, without any dynamic compensation logic, it is impossible to generate back electromotive force.
[0088] The results are shown in the table below:
[0089] Group Current loop response error (%) Back EMF simulation fidelity (%) Load mutation response delay (ms) Continuous operating stability (h) Speed control deviation (rpm) Example 1 0.45 98.2 2.5 >500 ±2 Comparative Example 1 0.38 100 15.0 <100 ±5 Comparative Example 2 12.6 0.0 / >1000 /
[0090] In Example 1 and Comparative Example 1: Comparative Example 1 uses a real permanent magnet synchronous motor and a hysteresis brake. The fundamental reason for its performance degradation lies in the inherent inertia, friction, and wear of the mechanical system. First, its load change response delay is much higher than that of Example 1 because its physical rotor and load mechanism have a large mechanical moment of inertia. When simulating a sudden change in load torque, the speed of the real motor cannot change instantaneously like the digital model; it must undergo a physical acceleration or deceleration process. This mechanical dynamic delay is directly converted into a lag in the electrical response. Second, its continuous working stability is low because there are mechanical moving parts in the scheme. Under long-term, high-intensity conditions... In dynamic testing, mechanical wear, heat generation, and even malfunctions inevitably occur, leading to performance degradation or the need for maintenance, which cannot meet the uninterrupted, high-intensity testing requirements of the production line. Finally, its speed control deviation is slightly larger than that of Example 1. This is because parameters such as the friction coefficient and hysteresis characteristics of the real mechanical system will slowly drift with temperature and wear conditions, and it is difficult to perform precise full-state observation and real-time compensation like a digital model, resulting in inherent fluctuations in control accuracy. Therefore, although Comparative Example 1 can provide perfect back electromotive force, the inertia, wear, and parameter drift of its mechanical system become bottlenecks restricting its dynamic performance, long-term stability, and ultimate accuracy.
[0091] In Example 1 and Comparative Example 2: Comparative Example 2 uses a simple rotorless LR load, and all its dynamic performance indicators are severely degraded or even missing. The root cause is that it completely lacks the three major digital reconfiguration capabilities proposed in this invention, thus amplifying the inherent defects of rotorless loads. First, its current loop response error is extremely large because the scheme has neither virtual back EMF injection nor real-time compensation for nonlinear inductance. In principle, a real motor controller relies on back EMF for closed-loop control and state observation. In Comparative Example 2, back EMF is completely missing, causing the controller's current loop to be continuously out of balance due to incorrect feedback information, resulting in severe distortion of current tracking. At the same time, the nonlinear saturation of inductance under high current is not compensated, and the load impedance changes drastically, further aggravating the distortion of current waveform and the offset of the controller's operating point. Secondly, its back EMF simulation fidelity is 0% because it lacks any mechanism for simulating back EMF, and the controller always operates at zero speed or with incorrect speed perception. Furthermore, its load change response delay and speed control deviation are unmeasurable because the scheme completely breaks electromechanical coupling; it is merely a passive linear impedance network that cannot calculate and feedback a simulated speed based on the controller's current output. Therefore, it cannot simulate dynamic operating conditions involving electromechanical energy conversion, such as climbing and acceleration, and naturally cannot evaluate the controller's dynamic speed control performance. Although its simple mechanical structure theoretically provides an advantage in continuous operation stability, this comes at the cost of completely sacrificing the effectiveness and authenticity of the test. Therefore, the performance of Comparative Example 2 demonstrates from the opposite perspective that without actively digitally reconstructing technology to compensate for the three core defects of missing back EMF, inductive nonlinearity, and electromechanical decoupling, the rotorless scheme will be completely unusable for evaluating the overall performance of the controller.
[0092] Specifically, the mounting bracket 1 is used to stabilize and install the controller under test. The bracket is made of high-strength aluminum alloy or engineering plastic and has internally machined positioning grooves and a quick-clamping mechanism. The shape of the positioning grooves is adapted to the outer shell contour of the controller under test.
[0093] like Figure 2 As shown, a comprehensive testing system for an electric bicycle controller includes:
[0094] Specifically, the power self-test module is used to automatically perform a power-on self-test operation after the system starts up, and to verify the validity of the basic operating status of the controller under test and its interfaces.
[0095] Furthermore, the electrical self-test module includes a power supply detection submodule, an internal control logic detection submodule, and a power load interface detection submodule. The power supply detection submodule is used to monitor the stability of the bus voltage of the DC power supply unit 3 and the power supply status of the internal modules. The internal control logic detection submodule is used to verify the operating status of the program counter, stack pointer, and key memory areas. The power load interface detection submodule is used to detect whether there is a short circuit or open circuit fault at the output terminal connected to the rotorless stator coil 4.
[0096] Specifically, the test sequence module is used to generate and output automated test sequences according to preset test procedures or user instructions to simulate various working conditions of electric bicycles in actual riding.
[0097] Furthermore, the test sequence module includes a stall condition simulation submodule, a normal riding simulation submodule, a wheel slippage simulation submodule, a hill climbing simulation submodule, a protection strategy verification submodule, and an instrument communication simulation submodule. Each submodule achieves automated testing of the controller's response characteristics under complex operating conditions by controlling the combination of throttle signals, speed signals, gear signals, and communication commands.
[0098] Specifically, the fixed bracket 1 is used to stabilize and install the controller under test. The bracket is made of high-strength aluminum alloy and has internal positioning grooves and quick clamping mechanisms to fix the detector under test.
[0099] Preferably, the quick clamping mechanism is an eccentrically rotating cam that generates pressure when it rotates to the correct position, thus clamping the workpiece.
[0100] Specifically, DC power supply unit 3 provides clean, controllable, and sufficient power to the entire detection system and the controller under test. This unit is a programmable DC power supply whose output voltage range needs to cover the rated voltage of common electric bicycle controllers and has a sufficiently large current output capability to simulate the controller's needs under extreme conditions such as stall and hill climbing.
[0101] Understandably, the DC power supply unit 3 receives instructions from the test board 2 through the communication interface to realize functions such as remote power-on, power-off, and voltage setting, thus being seamlessly integrated into the fully automatic test sequence.
[0102] Specifically, the rotorless stator coil 4 serves as a power load, with its windings connected to the power output terminal of the controller under test. It is constructed by removing the internal permanent magnet rotor and related mechanical structures from a standard permanent magnet synchronous motor stator.
[0103] Specifically, the test board 2 has an embedded main control unit, which is used to execute virtual reconstruction and dynamic compensation algorithms, and control the execution of automated test sequences and real-time monitoring of the response of the controller under test.
[0104] Furthermore, the test board 2 includes a digital signal processor that supports multi-channel high-speed sampling and real-time control. The main control unit constructs a virtual motor operating environment on the rotorless stator coil 4 by running a virtual back EMF injection algorithm, a nonlinear inductance real-time compensation algorithm, and an electromechanical coupling dynamic reconstruction algorithm, so that the controller under test can still perceive the near-real motor load characteristics even without an actual rotor.
[0105] Specifically, the layered decoupling module is used to collaboratively process the generation and injection of virtual back EMF, real-time compensation of nonlinear inductance, and dynamic reconstruction of electromechanical coupling on the test board 2.
[0106] Furthermore, the hierarchical decoupling module includes an upper parameter adaptive layer and a lower high-speed current tracking layer. The upper parameter adaptive layer operates at a lower frequency and is responsible for solving the electromechanical coupling model, calculating the virtual back electromotive force, updating the nonlinear inductor parameters, and generating the reference current command. The lower high-speed current tracking layer operates at a higher frequency and, based on the reference current command generated by the upper layer, forces the actual current in the rotorless stator coil 4 to track the command value in real time through a high-speed feedforward or feedback control strategy, ensuring the dynamic response speed and control stability of the system.
[0107] Specifically, the signal acquisition array is used to acquire the three-phase current, bus voltage and interface status signals output by the controller under test in real time; the signal acquisition array includes a multi-channel synchronous sampling analog-to-digital converter, isolation amplifier circuit and filter circuit, supporting high-precision and low-latency electrical quantity acquisition.
[0108] Specifically, the power drive module is used to generate and output simulated vehicle input signals to the controller under test according to the instructions of the test sequence module, including throttle signal, speed signal, gear signal and communication protocol simulation signal; the power drive module adopts a programmable signal generation circuit, which supports multiple waveform outputs and protocol simulation.
[0109] Specifically, the data storage module is used to record electrical parameters, response curves, fault information and test results during the test process; the data storage module includes non-volatile memory or external storage interface, supporting local storage and export of test data.
[0110] Specifically, the human-machine interaction unit is used to display test status, real-time waveforms, fault alarm information and test results, and to receive test commands and parameter configurations input by the user; the human-machine interaction unit includes a touch screen, indicator lights, buttons or remote communication interface, and supports local and remote monitoring operations.
[0111] Based on the preferred embodiments of the present invention described above, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. A comprehensive testing method for an electric bicycle controller, characterized in that, Includes the following steps: S1. Perform an electrical self-test to verify the effectiveness of the basic operating status; S2. After the self-test passes, the preset automated test sequence is obtained, and the control and simulation of various test conditions for the controller under test are performed. S3. Run the automated test sequence to construct a virtual motor operating environment on the rotorless stator coil and perform virtual reconstruction and dynamic compensation algorithms; wherein, the dynamic compensation algorithm includes the generation and injection of virtual back electromotive force, real-time compensation of nonlinear inductance, and electromechanical coupling dynamic reconstruction; S4. Through a hierarchical decoupled control architecture, the generation and injection of the virtual back electromotive force, real-time compensation of nonlinear inductance, and dynamic reconstruction of electromechanical coupling are processed collaboratively to obtain the detection data results of the controller.
2. The comprehensive testing method for an electric bicycle controller according to claim 1, characterized in that: In step S1, the electrical self-test operation includes detecting the power supply integrity, internal control logic status, and electrical status of the power load interface of the system.
3. The comprehensive testing method for an electric bicycle controller according to claim 1, characterized in that: In step S2, the preset automated test sequence includes at least one or more of the following test items: stall condition test, routine test, wheel slippage test, hill climb test, protection strategy test, and instrument display test.
4. The comprehensive testing method for an electric bicycle controller according to claim 1, characterized in that: In step S3, the generation and injection of the virtual back EMF is based on the real-time acquisition of the phase currents of the rotorless stator coils. The instantaneous value of the back EMF that satisfies the preset motor voltage balance equation is calculated, and the port potential sensed by the controller under test is corrected to a target value that includes the instantaneous value of the back EMF by adjusting the feedback compensation logic inside the system.
5. The comprehensive testing method for an electric bicycle controller according to claim 1, characterized in that: In step S3, the nonlinear inductance real-time compensation is based on a pre-established mapping model that describes the nonlinear relationship between the stator coil inductance and the excitation current intensity. The instantaneous inductance value corresponding to the current is obtained, and the current sampling gain and control parameters are dynamically corrected based on the instantaneous inductance value, so that the load impedance sensed by the controller under test is equivalent to the ideal motor load.
6. The comprehensive testing method for an electric bicycle controller according to claim 1, characterized in that, In step S3, the electromechanical coupling dynamic reconfiguration converts the collected stator phase current into virtual electromagnetic torque. Based on the virtual electromagnetic torque, the preset simulated vehicle rotational inertia, and the load torque determined by the simulated operating conditions, the mechanical motion equation of the motor is solved in real time to obtain the simulated speed. The simulated speed is then fed back into the calculation of the virtual back electromotive force, thereby realizing a closed-loop dynamic correlation between electrical and mechanical quantities.
7. The comprehensive testing method for an electric bicycle controller according to claim 1, characterized in that, In step S3, the generation of the virtual back EMF also includes superimposing a harmonic component of a specific order on the fundamental wave to simulate the influence of the non-sinusoidal distribution of the motor magnetic field on the back EMF waveform.
8. The comprehensive testing method for an electric bicycle controller according to claim 1, characterized in that: In step S4, the hierarchical decoupling control architecture includes an upper parameter adaptive layer and a lower high-speed current tracking layer. The upper parameter adaptive layer operates at a lower frequency and is responsible for calculating and updating the virtual back electromotive force, nonlinear inductor compensation parameters, and electromechanical coupling dynamic reconfiguration. The lower high-speed current tracking layer operates at a higher frequency and forces the actual current to track the reference current command generated by the upper layer, ensuring the speed and stability of the system response.
9. A comprehensive testing system for an electric bicycle controller, based on the comprehensive testing method for an electric bicycle controller according to any one of claims 1-8, characterized in that, include: The electrical self-test module is used to verify the effectiveness of the controller under test in completing the basic operating status. The test sequence module is used to control and simulate various test conditions for the controller under test; The test board has an embedded main control unit, which is used to execute the virtual reconstruction and dynamic compensation algorithm of the system, and control the execution of the automated test sequence and the real-time monitoring of the response of the controller under test, so as to complete the comprehensive testing of the controller under test. The layered decoupling module is used to coordinate with the test board to process the generation and injection of virtual back electromotive force, real-time compensation of nonlinear inductance, and dynamic reconstruction of electromechanical coupling.
10. A comprehensive testing system for an electric bicycle controller according to claim 9, characterized in that, The main control unit also includes: The signal acquisition array is used to acquire the three-phase current and bus voltage output by the controller under test in real time. The power drive module is used to generate and output simulated vehicle input signals to the controller under test. Data storage module, used to record test data; The human-computer interaction unit is used to display the test status and results.