Wireless cooperative control system and method for multi-node brushless motor
Through the dynamic channel switching and timestamp alignment mechanism of the hierarchical architecture and the ESP-NOW protocol, combined with the FOC vector control algorithm, the wireless communication compatibility and delay problems of multi-node brushless motors are solved, and efficient and stable multi-node collaborative control is achieved.
Patent Information
- Application Number
- CN202510416389.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-07-08
AI Technical Summary
In the prior art, the wireless communication compatibility of multi-node brushless motors has poor, delays, and lack of effective collaborative control, resulting in insufficient system stability and scalability.
The hierarchical architecture is designed, including the main control layer, the driver layer, the communication layer and the software layer. The main control layer is composed of the master node and the driver layer is composed of slave nodes. The communication layer builds a star network topology based on the ESP-NOW protocol, adopts dynamic channel switching and timestamp alignment mechanisms, and combines FOC vector control algorithm and improved sliding mode observer to realize multi-node collaborative control.
It realizes efficient and stable multi-node brushless motor collaborative control, with high accuracy, low latency and low loss, the system conversion efficiency is as high as 90%, frequency stability is ±0.1%, current harmonic distortion rate is reduced to 7.8%, and communication delay is controlled within 15ms.
Smart Images

Figure CN120276326A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of motor control, and particularly to a wireless collaborative control system and method for a multi-node brushless motor. Background Art
[0002] In the development process of many fields such as current industrial automation, robotics, and smart home, brushless motors have been extremely widely used due to their significant advantages such as high efficiency, high power density, low noise, and long life. However, the drive control of a single brushless motor has been difficult to meet the complex requirements of actual applications. In many application scenarios, such as the motion control of multi-axis robots, the collaborative operation of complex industrial equipment, and the stable flight of unmanned aerial vehicles, there is an urgent need for precise collaborative driving between multiple brushless motors.
[0003] For the collaborative control of multi-node brushless motors in the prior art, either a wired communication method is adopted, such as CAN bus, RS-485, etc. This will make the system wiring cumbersome and complex. Especially in the scenario where the number of nodes is large and the distribution is relatively scattered, the increase in cable length not only increases the attenuation and interference of signal transmission, but also increases the difficulty of fault troubleshooting. Moreover, the scalability of the system is poor. Once nodes need to be added or reduced, the wiring must be redone, consuming a large amount of time and cost. Or a wireless communication technology is adopted, but it is difficult to achieve seamless docking between different wireless communication protocols, resulting in the impact on the overall stability of the system. In addition, some wireless communication methods will generate a large communication delay, which is fatal for the brushless motor collaborative control with extremely high real-time requirements, and may lead to uncoordinated actions between multiple motors, affecting the normal operation of the system. Summary of the Invention
[0004] The purpose of the present invention is to propose a wireless collaborative control system and method for a multi-node brushless motor to solve the problems of poor wireless communication compatibility, delay, and lack of collaborative control in the prior art.
[0005] The present invention provides a wireless collaborative control system for a multi-node brushless motor, which adopts a hierarchical architecture design and includes a main control layer, a drive layer, a communication layer, and a software layer;
[0006] The main control layer is composed of a main node, which is the task instruction scheduling center of the system and includes a core control module, a display module, and a self-locking button module; the core control module runs the FreeRTOS real-time operating system and controls multiple threads using a task priority scheduling algorithm;
[0007] The drive layer consists of N slave nodes, where N ≥ 3; the drive layer drives the brushless motor by executing the FOC vector control algorithm and monitors the state of the brushless motor; the slave node includes a node main control module, a CH340 serial port programming module, a power input circuit module for providing the power required by the drive layer, a buck circuit module, a gate drive circuit module, a three-phase inverter circuit module, a current sampling circuit module, and an AS5600 encoder circuit module;
[0008] The communication layer constructs a star network topology based on the ESP-NOW protocol, establishes a direct communication link between the master node of the master control layer and the N slave nodes, and uses a dynamic channel switching mechanism and a timestamp alignment mechanism to achieve multi-node collaborative control;
[0009] The software layer establishes communication with the master control layer through the USART serial port, receives the state data of the brushless motors of each slave node centralized by the master control layer, and at the same time sends instructions to the master control layer to control the entire system, realizing parameter adjustment, state monitoring, and data visualization of the brushless motors.
[0010] The FreeRTOS real-time operating system is a real-time operating system designed specifically for embedded devices. Its core features are lightweight, scalable, and high real-time performance, and it can operate efficiently on resource-constrained microcontrollers. It provides mechanisms such as multi-task scheduling, semaphores, and message queues, supports preemptive and round-robin scheduling strategies, and allows flexible control of system resources through dynamic or static memory management.
[0011] The ESP-NOW protocol is a wireless communication protocol that supports low-power, low-latency direct data transmission between devices without a router. It uses a point-to-point or broadcast communication mode, quickly transmits data packets based on the MAC address, supports encrypted communication to ensure security, and can achieve efficient linkage of devices in a network-free environment.
[0012] Furthermore, the node main control module of the wireless collaborative control system of the present invention can communicate with the master control layer, execute the FOC vector control algorithm, and output PWM signals;
[0013] The CH340 serial port programming module programs the compiled and debugged control code into the node main control module;
[0014] The step-down circuit module can step down the voltage of the power input circuit module to 3.3V and 5V, and then supply it to other modules in the driving layer that require specific voltage power supply. Other modules that require specific voltage power supply include the node master control module, gate drive circuit module, current sampling circuit module, and AS5600 encoder circuit module in the driving layer. Further, the gate drive circuit module of the wireless collaborative control system of the present invention uses an EG2133 gate drive chip to construct a three-stage drive architecture: the front stage accesses the PWM signal output by the node master control module to the EG2133 pin; the middle stage has a built-in bootstrap boost circuit to generate a 5V gate drive voltage; the rear stage drive signal is connected to the gate of the NMOS tube of the three-phase inverter circuit;
[0015] The three-phase inverter circuit module is composed of 6 NMOS tubes to form an H-bridge topology. The MOS tubes in the upper bridge arm are used to convert the input DC voltage into the positive half cycle of the AC output, and the MOS tubes in the lower bridge arm are used to convert the input DC voltage into the negative half cycle of the AC output; the MOS tubes in the upper bridge arm and the lower bridge arm conduct and turn off alternately, so as to realize the conversion from DC to AC;
[0016] The current sampling circuit module uses two INA240A2PWR current detection amplifiers to form a differential sampling topology; the circuit detection amplifier detects and amplifies the input current signal; at the same time, by reasonably setting the value of the external resistor, the gain of the amplifier can be adjusted to adapt to the current detection requirements of different ranges; in addition, an external capacitor is set to filter the amplified signal to remove high-frequency noise interference and make the output signal more stable and reliable;
[0017] The AS5600 encoder circuit module detects the change in the magnetic field intensity when the brushless motor rotates through the built-in magnetic inductor, and converts the intensity change into an electronic signal; processes the electronic signal into an angle value; calculates the rotation speed of the brushless motor by calculating the angle of rotation for a period of time.
[0018] Further, the AS5600 encoder circuit of the wireless collaborative control system of the present invention includes an AS5600-ASOM chip, an interface circuit, a communication interface, a filtering circuit, and a grounding circuit;
[0019] The interface circuit includes an SCL pin and an SDA pin;
[0020] The communication interface is composed of a CN1 interface, including two pins, SCL and SDA;
[0021] The filtering circuit includes a capacitor C25 and a capacitor C26 connected in parallel to the VDD5V and VDD3V3 power supply lines, which are used to filter out the high-frequency noise components in the power supply;
[0022] The grounding circuit is connected to an external grounding terminal through the GND pin, providing a common reference potential.
[0023] Furthermore, the FOC vector control algorithm of the wireless collaborative control system of the present invention includes the following steps:
[0024] First, decouple the three-phase current through Clark transformation and Park transformation to generate a direct-axis current component and a quadrature-axis current component;
[0025] Then, use an improved sliding mode observer to estimate the rotor position, and the added compensation term is θ comp = θ meas + K·sgn(Δi αβ )·Δt, where the value of K is adaptively adjusted through motor parameters, θ comp is the compensated rotor position estimation value, with the unit of rad; θ meas is the initial rotor position measurement value, with the unit of rad; Δi αβ is the current deviation vector in the α-β coordinate system, with the unit of A; sgn is the vector sign function operation; Δt is the discrete sampling interval, with the unit of s;
[0026] Generate a PWM signal based on the seven-segment SVPWM optimization algorithm, insert zero vectors to reduce the number of switches, and reduce the current harmonic distortion rate through asymmetric duty cycle calculation.
[0027] Furthermore, the dynamic channel switching mechanism and timestamp alignment mechanism of the communication layer of the wireless collaborative control system of the present invention include:
[0028] The master node fixedly operates on Wi-Fi Channel 6;
[0029] The slave node periodically detects the RSSI strength and selects the channel with the least interference for dynamic switching, and the switching delay is controlled within 15 ms;
[0030] Synchronization control is achieved by the master node broadcasting a synchronization frame containing a 32-bit microsecond-level timestamp. The slave node calculates the transmission delay Δt1 = (T receive - T send ) / 2 for phase compensation, where Δt1 is the transmission time delay of the signal from the master node to the slave node; T send is the transmission timestamp, the 32-bit high-precision timestamp embedded when the master node broadcasts the synchronization frame, generated by the local clock of the master node; T receive is the reception timestamp, the local recording time when the slave node detects the arrival of the synchronization frame.
[0031] Furthermore, the multi-node collaborative control of the communication layer of the wireless collaborative control system of the present invention includes:
[0032] 1) The master node receives the motion instructions from the host computer and calculates the target trajectories of each slave node;
[0033] 2) Broadcast and synchronize the start instruction through ESP-NOW, including a 5ms time tolerance window;
[0034] 3) Each slave node executes the local FOC vector control algorithm and real-time feedbacks the status data;
[0035] 4) The master node uses the least squares method for error compensation: Δω = ∑(ω target - ω actual ) / N;
[0036] Where Δω is the global angular velocity compensation amount, with the unit of rad / s, which is the average value of the angular velocity deviations of each slave node calculated by the master node, used to eliminate the cumulative error of multi-motor collaborative operation; ω target is the target angular velocity, with the unit of rad / s, which is the expected angular velocity calculated by the master node according to the host computer instructions; ω actual is the actual angular velocity, with the unit of rad / s, which is the rotor angular velocity measured in real time by the slave node through the AS5600 encoder module; N is the number of slave nodes, averaging the angular velocity deviations of all slave nodes to avoid the influence of abnormal values of a single node on global control;
[0037] 5) Dynamically adjust the PWM duty cycle to achieve torque balance, satisfying: Where T ref is the reference torque, with the unit of N·m, which is the expected output torque calculated by the master node, used to dynamically adjust the PWM duty cycle to achieve multi-motor torque balance; K t is the motor torque constant, with the unit: N·m / A, which is the torque generated by the motor per unit current and is determined by the inherent structure of the motor; I q is the quadrature axis current, with the unit: A, which is the torque component current decoupled from the FOC vector control algorithm of the slave node and is obtained by converting the three-phase current through the Clark-Park transformation; Δω is the angular velocity compensation amount, feeding back the global speed deviation to the torque control loop to form a closed-loop correction; K p is the proportional gain, with the unit: A·s / rad, adjusting the weight of the speed deviation on the torque compensation to achieve a compromise between dynamic stiffness and stability.
[0038] The Clark-Park transformation is a coordinate transformation method in the field of motor control, consisting of two parts: the Clark transformation and the Park transformation. Its characteristic is to convert the AC signals (such as voltage and current) in the three-phase stationary coordinate system into DC quantities in the two-phase rotating coordinate system through mathematical mapping, thereby simplifying the complexity of motor control.
[0039] Duty cycle calculation formula: D = V ref / (V dcIn (D / 2)+0.5, D is the duty cycle, representing the proportion of the high-level time of the signal in the entire cycle; V ref is the reference voltage, which is a set value used for comparison with the input voltage; V dc is the average value of the input voltage, used to calculate the duty cycle, and 0.5 is the offset used to adjust the reference value of the duty cycle.
[0040] Furthermore, the multi-threads of the wireless collaborative control system of the present invention include a status monitoring thread, a human-computer interaction thread, a multi-node communication control thread, and a serial communication thread with the host computer;
[0041] The status monitoring thread collects the rotation parameters of the brushless motor in real time;
[0042] The human-computer interaction thread drives the display module for parameter visualization and responds to the start / stop instructions of the self-locking button;
[0043] The multi-node communication control thread communicates with the N slave nodes through the ESP-NOW protocol and performs task scheduling;
[0044] The serial communication thread conducts instruction interaction and data transmission with the host computer through the USART serial port.
[0045] Furthermore, the main control module of the wireless collaborative control system of the present invention is an ESP-WROOM-32 main control module, and the main control module runs the FreeRTOS real-time operating system through a dual-core 32-bit LX7 processor; the display module is an OLED display module.
[0046] Furthermore, the cut-off frequency of the RC low-pass filter of the wireless collaborative control system of the present invention is 10 kHz.
[0047] The wireless collaborative control method for a multi-node brushless motor of the present invention specifically includes the following steps:
[0048] S1: System initialization
[0049] Burn the compiled and debugged FOC vector control code into the node main control modules of each slave node through the CH340 serial port burning module;
[0050] Based on the ESP-NOW protocol, construct a star network topology between the master node and each slave node to establish a direct communication link;
[0051] Adopt a timestamp alignment mechanism to complete the clock synchronization calibration between multiple nodes to ensure a microsecond-level synchronization error of control instructions;
[0052] S2: Instruction issuance and collaborative control
[0053] The main control layer runs the FreeRTOS real-time operating system and issues target instructions to the slave nodes in the drive layer through the task priority scheduling algorithm, including speed and torque parameters;
[0054] Each slave node executes the FOC vector control algorithm, generates PWM drive signals, and outputs them to the three-phase inverter circuit module through the gate drive circuit module;
[0055] S3: State feedback and dynamic adjustment
[0056] Detect the magnetic field change of the brushless motor through the AS5600 encoder circuit module, and calculate the real-time speed and angle information;
[0057] Feed back the current sampling data, speed and angle information to the main control layer, and realize the visualization of state data and fault diagnosis through the USART serial port;
[0058] The main control layer dynamically adjusts the global according to the feedback data.
[0059] For the wireless collaborative control system and method of a multi-node brushless motor described in the present invention, its beneficial effects are as follows:
[0060] First of all, the combination of the gate drive circuit module and the three-phase inverter module in the drive layer of the wireless collaborative control system of the multi-node brushless motor described in this application uses the EG2133 gate drive chip to construct a three-stage drive architecture. The PWM signal output by the main control module of the front-stage input node is input, the intermediate stage has a built-in bootstrap boost circuit to generate a 5V gate drive voltage, and the drive signal of the rear stage is connected to the three-phase inverter circuit module with an H-bridge topology composed of 6 NMOS transistors. The MOS transistors on the upper bridge arm convert the input DC voltage into the positive half cycle of the AC output, and the MOS transistors on the lower bridge arm convert it into the negative half cycle, and alternate conduction and cutoff to achieve the conversion from DC to AC. This architecture has the characteristics of high efficiency (the system conversion efficiency can reach more than 90%), high stability (ensuring the stability of signal transmission and anti-interference ability), high-precision control (realizing precise control of the output alternating current, and the frequency stability can reach ±0.1%), fast response (able to complete signal transmission and conversion within microseconds), low loss (effectively reducing energy consumption and heat generation), and high reliability (ensuring long-term stable operation of the system and low failure rate).
[0061] Secondly, the FOC vector control algorithm uses an improved sliding mode observer (SMO) and a seven-segment SVPWM optimization algorithm. Among them, the improved sliding mode observer adds a compensation term θ in the observation function comp =θ meas +K·sgn(Δi αβ)·Δt, combined with the 0.1% gain error characteristic of INA240A2PWR, improves the position estimation accuracy to ±0.8°. The seven-segment SVPWM optimization algorithm reduces the switching times by 33% (from 6 times per cycle to 4 times per cycle) by inserting zero vectors, and at the same time, adopts the asymmetric PWM waveform generation method to reduce the total harmonic distortion (THD) of the current from 12.3% to 7.8%.
[0062] Among them, the observation function includes two parts: 1. Back electromotive force observation equation: Based on the sign function of the current error, the back electromotive force components are estimated through the following formula: Where and Estimated α-β axis back electromotive force components; K smo : Sliding mode gain coefficient (fixed value or set according to motor parameters); and Reference current output by the current loop; and Actually measured α-β axis current; sgn: Sign function, used to generate the switching signal for sliding mode control. 2. Arctangent method: Calculate the rotor position angle θ using the phase relationship of the back electromotive force components meas :
[0063] In addition, the present invention also adopts the combination of ESP-NOW wireless cooperative control and FOC vector control. Slave node dynamic channel switching algorithm: Select the channel with the least interference through RSSI strength detection (sampling period 10ms), and the switching delay is controlled within 15ms. And in the timestamp alignment mechanism, when the master node broadcasts the synchronization frame, it carries a 32-bit microsecond-level timestamp (obtained from the ESP32 hardware timer). After receiving the synchronization frame, the slave node compares the local clock and calculates the transmission delay Δt1=(T receive -T send ) / 2 to achieve phase compensation. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 Schematic diagram of the wireless cooperative control system of the multi-node brushless motor described in Embodiment 1 of the present invention;
[0065] Figure 2 Logic flowchart of the FOC vector control algorithm described in Embodiment 1 of the present invention;
[0066] Figure 3 Schematic diagram of the communication layer networking described in Embodiment 1 of the present invention;
[0067] Figure 4 Step-down circuit diagram described in Embodiment 1 of the present invention;
[0068] Figure 5 The current sampling circuit diagram described in Embodiment 1 of the present invention;
[0069] Figure 6 The AS5600 encoder circuit diagram described in Embodiment 1 of the present invention;
[0070] Figure 7 The power input circuit diagram described in Embodiment 1 of the present invention;
[0071] Figure 8 The main control circuit diagram of the node main control module described in Embodiment 1 of the present invention;
[0072] Figure 9 The gate drive circuit diagram described in Embodiment 1 of the present invention;
[0073] Figure 10 The three-phase inverter circuit diagram described in Embodiment 1 of the present invention;
[0074] Figure 11 The interface schematic diagram of the upper computer described in Embodiment 1 of the present invention. Detailed implementation manners
[0075] For a clearer understanding of the technical features, objectives, and effects of the present invention, the specific implementation manners of the present invention will now be described in detail with reference to the accompanying drawings. The described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention. For those not specified in the specific implementation manners, they are carried out according to conventional conditions or conditions provided by the manufacturer.
[0076] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. The terms used in the present disclosure are only for the purpose of describing specific embodiments, and are not intended to limit the present disclosure. Detailed implementation manner one:
[0078] A wireless collaborative control system for a multi-node brushless motor, designed with a hierarchical architecture, including a main control layer, a drive layer, a communication layer, and a software layer;
[0079] The main control layer is composed of a main node, which is the task instruction scheduling center of the system, including a core control module, a display module, and a self-locking button module. The core control module runs the FreeRTOS real-time operating system and controls multiple threads using a task priority scheduling algorithm;
[0080] The drive layer consists of N slave nodes, where N ≥ 3; the drive layer drives the brushless motor by executing the FOC vector control algorithm and monitors the state of the brushless motor; the slave nodes include a node main control module, a CH340 serial port programming module, a power input circuit module for providing the power required by the drive layer, a buck circuit module, a gate drive circuit module, a three-phase inverter circuit module, a current sampling circuit module, and an AS5600 encoder circuit module;
[0081] The communication layer constructs a star network topology based on the ESP-NOW protocol, establishes direct communication links between the master node of the master control layer and the N slave nodes, and uses a dynamic channel switching mechanism and a timestamp alignment mechanism to achieve multi-node collaborative control;
[0082] The software layer establishes communication with the master control layer through the USART serial port, receives the state data of the brushless motors of each slave node concentrated by the master control layer, and at the same time sends instructions to the master control layer to control the entire system to achieve parameter adjustment, state monitoring, and data visualization of the brushless motors.
[0083] In other embodiments, the node main control module can communicate with the master control layer, execute the FOC vector control algorithm, and output PWM signals;
[0084] The CH340 serial port programming module programs the compiled and debugged control code into the node main control module;
[0085] The buck circuit module can step down the voltage of the power input circuit module to 3.3V and 5V, and then supply it to the node main control module, the gate drive circuit module, the current sampling circuit module, and the AS5600 encoder circuit module of the drive layer.
[0086] In other embodiments, the gate drive circuit module uses an EG2133 gate drive chip to construct a three-stage drive architecture: the front stage connects the PWM signal output by the node main control module to the EG2133 pin; the middle stage has a built-in bootstrap boost circuit to generate a 5V gate drive voltage; the rear stage drives the signal to the gate of the NMOS tube of the three-phase inverter circuit module;
[0087] The three-phase inverter circuit module uses 6 NMOS tubes to form an H-bridge topology. The upper-arm MOS tubes are used to convert the input DC voltage into the positive half-cycle of the AC output, and the lower-arm MOS tubes are used to convert the input DC voltage into the negative half-cycle of the AC output. The MOS tubes of the upper arm and the lower arm alternately conduct and turn off, thereby realizing the conversion from DC to AC.
[0088] The current sampling circuit module adopts a differential sampling topology composed of two INA240A2PWR current detection amplifiers. The circuit detection amplifier detects and amplifies the input current signal. At the same time, by reasonably setting the value of the external resistor, the gain of the amplifier can be adjusted to meet the current detection requirements of different ranges. In addition, an external capacitor is set to filter the amplified signal to remove high-frequency noise interference and make the output signal more stable and reliable.
[0089] The AS5600 encoder circuit module detects the change in the magnetic field intensity when the brushless motor rotates through the built-in magnetic sensor, and converts the intensity change into an electronic signal; processes the electronic signal into an angle value; calculates the rotation speed of the brushless motor by calculating the angle of rotation for a period of time.
[0090] In other embodiments, the AS5600 encoder circuit includes an AS5600-ASOM chip, an interface circuit, a communication interface, a filtering circuit, and a grounding circuit;
[0091] The interface circuit includes an SCL pin and an SDA pin;
[0092] The communication interface is composed of a CN1 interface and includes two pins, SCL and SDA;
[0093] The filtering circuit includes capacitors C26 and C25 connected in parallel to the VDD5V and VDD3V3 power supply lines to filter out high-frequency noise components in the power supply;
[0094] The grounding circuit is connected to the external grounding terminal through the GND pin to provide a common reference potential.
[0095] In other embodiments, the FOC vector control algorithm includes the following steps:
[0096] First, decouple the three-phase current through Clark transformation and Park transformation to generate a direct-axis current component and a quadrature-axis current component;
[0097] Then, use an improved sliding mode observer to estimate the rotor position, and the added compensation term is θ comp =θ meas +K·sgn(Δi αβ )·Δt, where the value of K is adaptively adjusted through motor parameters, θ comp is the compensated rotor position estimate value, in rad; θ meas is the initial rotor position measurement value, in rad; Δi αβ is the current deviation vector in the α-β coordinate system, in A; sgn is the vector sign function operation; Δt is the discrete sampling interval, in s;
[0098] Generate PWM signals based on the seven-segment SVPWM optimization algorithm, insert zero vectors to reduce the number of switching operations, and reduce the current harmonic distortion rate through the calculation of asymmetric duty cycles.
[0099] In other embodiments, the dynamic channel switching mechanism and timestamp alignment mechanism of the communication layer include:
[0100] The master node fixedly operates on Wi-Fi Channel 6;
[0101] The slave nodes periodically detect the RSSI strength, select the channel with the least interference for dynamic switching, and control the switching delay within 15 ms or less;
[0102] Synchronization control is achieved by the master node broadcasting a synchronization frame containing a 32-bit microsecond-level timestamp. The slave nodes calculate the transmission delay Δt1 = (T receive - T send ) / 2 based on the reception time for phase compensation, where Δt1 is the transmission time delay of the signal from the master node to the slave node; T send is the transmission timestamp, a 32-bit high-precision timestamp embedded by the master node when broadcasting the synchronization frame, generated by the local clock of the master node; T receive is the reception timestamp, the local recorded time when the slave node detects the arrival of the synchronization frame.
[0103] In other embodiments, the multi-node collaborative control of the communication layer includes:
[0104] 1) The master node receives the motion instructions from the host computer and calculates the target trajectories of each slave node;
[0105] 2) Broadcast a synchronization start instruction through ESP-NOW, including a 5ms time tolerance window;
[0106] 3) Each slave node executes the local FOC vector control algorithm and real-time feedbacks the status data;
[0107] 4) The master node uses the least squares method for error compensation: Δω = ∑(ω target - ω actual ) / N;
[0108] where Δω is the global angular velocity compensation amount, with the unit of rad / s, which is the average value of the angular velocity deviations of each slave node calculated by the master node and is used to eliminate the cumulative error of multi-motor collaborative operation; ω target is the target angular velocity, with the unit of rad / s, which is the expected angular velocity calculated by the master node according to the host computer instructions; ω actualω is the actual angular velocity, with the unit of rad / s, which is the angular velocity of the rotor measured in real time by the AS5600 encoder module at the slave node; N is the number of slave nodes, and the angular velocity deviations of all slave nodes are averaged to avoid the influence of outliers of a single node on the global control;
[0109] 5) Dynamically adjust the PWM duty cycle to achieve torque balance, satisfying: where T ref is the reference torque, with the unit of N·m, which is the expected output torque calculated by the master node and is used to dynamically adjust the PWM duty cycle to achieve multi-motor torque balance; K t is the motor torque constant, with the unit of N·m / A, which is the torque generated by the motor per unit current and is determined by the inherent structure of the motor; I q is the quadrature-axis current, with the unit of A, which is the torque component current decoupled from the FOC vector control algorithm at the slave node and is obtained by converting from three-phase current through Clark-Park transformation; Δω is the angular velocity compensation amount, which feeds back the global speed deviation to the torque control loop to form a closed-loop correction; K p is the proportional gain, with the unit of A·s / rad, which adjusts the weight of the speed deviation on the torque compensation to achieve a compromise between dynamic stiffness and stability.
[0110] In other embodiments, the multi-threading includes a status monitoring thread, a human-machine interaction thread, a multi-node communication control thread, and a serial communication thread with the host computer;
[0111] The status monitoring thread collects the rotation parameters of the brushless motor in real time;
[0112] The human-machine interaction thread drives the display module to visualize the parameters and responds to the start / stop instructions of the self-locking button;
[0113] The multi-node communication control thread communicates with the N slave nodes through the ESP-NOW protocol and performs task scheduling;
[0114] The serial communication thread conducts instruction interaction and data transmission with the host computer through the USART serial port.
[0115] In other embodiments, the main control module is an ESP-WROOM-32 main control module, and the main control module runs the FreeRTOS real-time operating system through a dual-core 32-bit LX7 processor; the display module is an OLED display module.
[0116] In other embodiments, the cut-off frequency of the RC low-pass filter is 10 kHz. Specific Embodiment 2:
[0118] A wireless cooperative control method for a multi-node brushless motor according to the present invention specifically includes the following steps:
[0119] S1: System initialization
[0120] Burn the compiled and debugged FOC vector control code into the node master control modules of each slave node through the CH340 serial port programming module;
[0121] Build a star network topology between the master node and each slave node based on the ESP-NOW protocol to establish a direct communication link;
[0122] Adopt a timestamp alignment mechanism to complete clock synchronization calibration between multiple nodes to ensure a microsecond-level synchronization error of control instructions;
[0123] S2: Instruction issuance and cooperative control
[0124] The master control layer runs the FreeRTOS real-time operating system and issues target instructions to the slave nodes in the drive layer through a task priority scheduling algorithm, including speed and torque parameters;
[0125] Each slave node executes the FOC vector control algorithm to generate a PWM drive signal and outputs it to the three-phase inverter circuit module through the gate drive circuit module;
[0126] S3: Status feedback and dynamic adjustment
[0127] Detect the magnetic field change of the brushless motor through the AS5600 encoder circuit module and calculate the real-time speed and angle information;
[0128] Feed back the current sampling data, speed and angle information to the master control layer, and realize status data visualization and fault diagnosis through the USART serial port;
[0129] The master control layer dynamically adjusts the global according to the feedback data.
[0130] The following further elaborates on the present invention with specific embodiments.
[0131] Embodiment 1:
[0132] A wireless cooperative control system for a multi-node brushless motor according to the present invention, as Figure 1 shown, adopts a hierarchical architecture design, including a master control layer, a drive layer, a communication layer, and a software layer;
[0133] The main control layer consists of a main node, which is the task instruction scheduling center of the system, including a core control module, a display module, and a self-locking button module. The core control module runs the FreeRTOS real-time operating system and controls multiple threads using a task priority scheduling algorithm. In Embodiment 1, the main control module is an ESP-WROOM-32 main control module, and the main control module runs the FreeRTOS real-time operating system through a dual-core 32-bit LX7 processor; the display module is an OLED display module.
[0134] The multiple threads include a status monitoring thread, a human-machine interaction thread, a multi-node communication control thread, and a serial communication thread with the host computer.
[0135] The status monitoring thread continuously collects the rotation parameters of the brushless motor.
[0136] The human-machine interaction thread drives the display module to visualize parameters and responds to the start / stop instructions of the self-locking button.
[0137] The multi-node communication control thread communicates with the N slave nodes through the ESP-NOW protocol and performs task scheduling.
[0138] The serial communication thread interacts with the host computer for instruction and data transmission through the USART serial port.
[0139] As Figure 3 shown, the drive layer consists of N slave nodes, where N ≥ 3; the drive layer drives the brushless motor by executing the FOC vector control algorithm and monitors the status of the brushless motor. The slave node includes a node main control module, a CH340 serial port programming module, a power input circuit module for providing the power required by the drive layer, a buck circuit module, a gate drive circuit module, a three-phase inverter circuit module, a current sampling circuit module, and an AS5600 encoder circuit module.
[0140] The node main control module can communicate with the main control layer, execute the FOC vector control algorithm, and output PWM signals.
[0141] The CH340 serial port programming module burns the compiled and debugged control code into the node main control module.
[0142] The buck circuit module can step down the voltage of the power input circuit module to 3.3V and 5V and then supply it to the node main control module, gate drive circuit module, current sampling circuit module, and AS5600 encoder circuit module of the drive layer.
[0143] In Embodiment 1, as Figure 4As shown, the step-down circuit module includes a 5V step-down circuit and a 3.3V step-down circuit.
[0144] The 5V step-down circuit includes an input part and a step-down conversion part. The input part consists of capacitors C15 and C16 connected in parallel to the 5V power input terminal and inductor L1 connected in series, which is used to filter the input power supply to reduce high-frequency noise and ripple in the power supply. The step-down conversion part consists of step-down chip U1, capacitors C14, C17, C18, C19, resistor R3 and resistor R4. The model of step-down chip U1 is TPS54302DDCR. It outputs a stable 5V voltage through the internal power MOSFET switch and control circuit. Capacitors C17 and C18 are connected between the VIN pin and GND of the step-down chip, and capacitor C14 is connected between the BOOT pin and SW pin of the step-down chip to provide a stable input voltage for the chip and filter out ripple and noise in the power supply. Capacitor C19 is connected between the 5V voltage of the step-down chip and the FB pin to provide a suitable driving voltage for the internal high-side power MOSFET. Resistors R3 and R4 form a voltage division network. R3 is connected between the FB pin of the chip and the 5V output terminal, and R4 is connected between the FB pin of the chip and GND. By adjusting the resistance values of R3 and R4, the magnitude of the output voltage can be set.
[0145] The 3.3V step-down circuit consists of an input part and a step-down conversion part. The input part includes capacitor C26 connected between the 5V power input terminal and GND, which is used to filter the input power supply to reduce high-frequency noise and ripple in the power supply. The step-down conversion part consists of step-down chip U3 and capacitor C25. The model of step-down chip U3 is XC6210B332MR. It converts the input 5V voltage into a stable 3.3V output through the internal reference voltage source, error amplifier and adjustment transistor. Capacitor C25 is used to filter out ripple and noise in the output voltage to make the output voltage more stable.
[0146] The gate drive circuit module uses the EG2133 gate drive chip to build a three-stage drive architecture: the front stage connects the PWM signal output by the node master control module to the EG2133 pin; the middle stage has a built-in bootstrap boost circuit to generate a 5V gate drive voltage; the rear stage connects the drive signal to the gate of the NMOS transistor in the three-phase inverter circuit module;
[0147] The three-phase inverter circuit module uses 6 NMOS transistors to form an H-bridge topology. The MOS transistors in the upper bridge arm are used to convert the input DC voltage into the positive half-cycle of the AC output, and the MOS transistors in the lower bridge arm are used to convert the input DC voltage into the negative half-cycle of the AC output. The MOS transistors in the upper bridge arm and the lower bridge arm conduct and turn off alternately, thus realizing the conversion from DC to AC.
[0148] The current sampling circuit module adopts a differential sampling topology composed of two INA240A2PWR current detection amplifiers. The circuit detection amplifier detects and amplifies the input current signal. At the same time, an external capacitor is set to filter the amplified signal to remove high-frequency noise interference, making the output signal more stable and reliable.
[0149] In Embodiment 1, as Figure 5 shown, the current sampling circuit module includes a current sampling circuit, and the current sampling circuit includes: current detection resistors R40 and R41 for converting the flowing current into a voltage signal; current detection amplifiers U12 and U13 for amplifying the voltage signal; filter capacitors C43 and C44 for filtering high-frequency noise in the output signal; a voltage reference chip U16 for providing a stable reference voltage; voltage-dividing resistors R44 and R45 for setting the output voltage of the voltage reference; a protection resistor R46 for preventing the input current from being too large and protecting the voltage reference chip; output terminals MCS1 and MCS2 for outputting current.
[0150] The AS5600 encoder circuit module detects the change in the magnetic field intensity when the brushless motor rotates through the built-in magnetic sensor, and converts the intensity change into an electronic signal; processes the electronic signal into an angle value; calculates the rotation speed of the brushless motor by calculating the angle of rotation over a period of time.
[0151] As Figure 6 shown, in Embodiment 1, the AS5600 encoder circuit module includes an AS5600 encoder circuit, and the AS5600 encoder circuit includes an AS5600-ASOM chip, an interface circuit, a communication interface, a filter circuit, and a grounding circuit;
[0152] The interface circuit includes SCL pins and SDA pins;
[0153] The communication interface consists of a CN1 interface and includes two pins, SCL and SDA;
[0154] The filter circuit includes capacitors C25 and C26 connected in parallel to the VDD5V and VDD3V3 power supply lines for filtering high-frequency noise components in the power supply;
[0155] The grounding circuit is connected to an external grounding terminal through a GND pin to provide a common reference potential.
[0156] As Figure 7As shown, in Embodiment 1, the power input circuit module includes a power input circuit, and the power input circuit includes: an external power input port PVIN for receiving an external power supply; an internal power input port VIN for providing an internal power supply; filter capacitors C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C48, and C49 for filtering high-frequency noise and ripple in the power input; a power switch SW3 for controlling the on / off of the external power input; and a power input protection component CN6 for protecting the circuit from abnormal conditions such as overcurrent and overvoltage.
[0157] As Figure 8 As shown, in Embodiment 1, the node master control module includes a master control circuit, and the master control circuit includes a master control chip U4 with the model ESP32-WROOM-32; C27 and C50 are filter capacitors to stabilize the voltage of the master control chip; EN, MIN1, MIN2, MIN3, MCS1, MCS2, CS0, MEN, VINM, TXD0, RXD0, SDA, SCL, IO4, BOOT, IO2, and IO15 are interfaces for other circuits.
[0158] As Figure 9 As shown, in Embodiment 1, the gate drive circuit module includes a gate drive circuit, and the gate drive circuit includes a drive chip EG2133 for converting direct current into three-phase alternating current; signal input pins MIN1, MIN2, and MIN3, and filter capacitors C33, C34, C35, C36, and C37 for filtering high-frequency noise and ripple generated during the inversion process; reverse protection diodes D3, D4, and D5 to prevent reverse current from damaging the chip; drive signal output pins MGH1, MGH2, MGH3, MGL1, MGL2, and MGL3 for outputting gate drive signals; and current output pins MOUT1P, MOUT2P, and MOUT3 for outputting the required alternating current.
[0159] As Figure 10As shown in the figure, in the present Embodiment 1, the three-phase inverter circuit module includes a three-phase inverter circuit, and the three-phase inverter circuit includes: The upper-arm NMOS transistors Q1, Q3, and Q5, as the NMOS transistors of the upper arm, are used to output the positive voltage of the DC power supply to the corresponding phase line to provide a positive voltage for the load; The lower-arm NMOS transistors Q2, Q4, and Q6, as the NMOS transistors of the lower arm, are used to output the negative voltage of the DC power supply to the corresponding phase line to provide a negative voltage for the load. The gate drive resistors R16, R17, R18, R19, R20, R21, R22, R23, R24, R25, R26, and R27 are used to limit the gate drive current, prevent the gate circuit from being too large, and protect the NMOS transistors from being damaged; The upper-arm gate drive signal input ports MGH1, MGH2, and MGH3 are used to control the gates of the upper-arm NMOS transistors (Q1, Q3, and Q5) to turn them on or off; The lower-arm gate drive signal input ports MGL1, MGL2, and MGL3 are used to control the gates of the lower-arm NMOS transistors (Q2, Q4, and Q6) to turn them on or off. The power output ports MOUT1, MOUT2, and MOUT3 are used to output power-amplified three-phase alternating current.
[0160] The FOC vector control algorithm includes the following steps:
[0161] First, decouple the three-phase current through Clark transformation and Park transformation to generate the direct-axis current component and the quadrature-axis current component;
[0162] Then, use an improved sliding-mode observer to estimate the rotor position, and the added compensation term is θ comp = θ meas + K·sgn(Δi αβ )·Δt, where the value of K is adaptively adjusted through motor parameters, θ comp is the estimated value of the compensated rotor position, with the unit of rad; θ meas is the measured value of the initial rotor position, with the unit of rad;
[0163] Δi αβ is the current deviation vector in the α-β coordinate system, with the unit of A; sgn is the vector sign function operation; Δt is the discrete sampling interval, with the unit of s;
[0164] Generate PWM signals based on the seven-segment SVPWM optimization algorithm, insert zero vectors to reduce the number of switching times, and reduce the current harmonic distortion rate through asymmetric duty cycle calculation.
[0165] The basic control principle of the brushless motor includes:
[0166] Six-step commutation control: By alternately energizing the three phases of the brushless motor, the magnetic field rotation is completed. A total of six steps are required to complete one revolution of the stator synthetic magnetic field, and the magnetic field rotates 60° in each step.
[0167] FOC vector control algorithm: Using the above six space voltage vectors as base vectors and reasonably configuring the duty cycles of different base vectors in one cycle, any equivalent space voltage vector can be synthesized, that is, any magnetic field vector can be synthesized. Specifically, through methods such as Clark transformation, (inverse) Park transformation, and PI, the essence is to decouple, decouple the mutually coupled three-phase magnetic fluxes into two easily controllable current quantities, calculate the required voltage vector, use SVPWM technology to generate debugging signals, drive the three-phase inverter circuit, and synthesize an equivalent three-phase sinusoidal voltage to drive the motor.
[0168] The control of the motor is actually the control of the switching law of the MOS transistors. And the switching law of the MOS transistors needs to be controlled by a single-chip microcomputer program. Therefore, this leads to the FOC vector control algorithm, which is a process of abstracting and simplifying the motor motion model and then regularly controlling the switching and on / off of each MOS transistor.
[0169] The communication layer constructs a star network topology based on the ESP-NOW protocol, establishes a direct communication link between the master node of the master control layer and N slave nodes, and realizes multi-node cooperative control by adopting a dynamic channel switching mechanism and a timestamp alignment mechanism.
[0170] As Figure 2 shown, the logic of the FOC vector control algorithm is:
[0171] Sample the three-phase current of the motor to obtain I a , I b and I c . Pass I a , I b and I c through Clark transformation to obtain I α and I β . Pass I α and I β through Park transformation to obtain I q and I d . Calculate the error between I q and its set value I q__Ref , and calculate the error between I d and its set value I d _Ref; Input the two errors into two PI controllers respectively to obtain the output control voltages U q and U d . Pass U q and U d through inverse Park transformation to obtain U α and U β . Use U α and Uβ The synthesized voltage space vector is input into the SVPWM module for modulation, and the state coding value of the half-bridge at this moment is output; the MOS transistors of the three-phase inverter are controlled according to the output state coding value to drive the motor;
[0172] In addition, the error between the position set value Position_Ref and the actual position value Position(θ) passes through a P controller to obtain the speed set value Speed_Ref. The error between the speed set value Speed_Ref and the actual speed value ω passes through a PI controller to obtain the set value I q of I q _Ref;
[0173] The speed and position feedback module provides the actual speed value ω and the actual position value θ;
[0174] The above steps are cycled.
[0175] In this Embodiment 1, the dynamic channel switching mechanism and timestamp alignment mechanism of the communication layer include:
[0176] The master node fixedly operates on Wi-Fi Channel 6;
[0177] The slave node periodically detects the RSSI intensity, selects the channel with the least interference for dynamic switching, and the switching delay is controlled within 15 ms;
[0178] Synchronization control is achieved by the master node broadcasting a synchronization frame containing a 32-bit microsecond-level timestamp. The slave node calculates the transmission delay Δt1 = (T receive -T send ) / 2 for phase compensation, where Δt1 is the transmission time delay of the signal from the master node to the slave node; T send is the transmission timestamp, a 32-bit high-precision timestamp embedded when the master node broadcasts the synchronization frame, generated by the local clock of the master node; T receive is the reception timestamp, the local recorded time when the slave node detects the arrival of the synchronization frame.
[0179] The software layer establishes communication with the main control layer through the USART serial port, receives the state data of the brushless motors of each slave node centralized by the main control layer, and simultaneously sends instructions to the main control layer, thereby controlling the entire system to achieve parameter adjustment, state monitoring, and data visualization of the brushless motors.
[0180] The multi-node cooperative control of the communication layer includes:
[0181] 1) The master node receives the motion instructions from the upper computer and calculates the target trajectories of each slave node;
[0182] 2) Broadcast the synchronization start instruction via ESP-NOW, including a 5-ms time tolerance window;
[0183] 3) Each slave node executes the local FOC vector control algorithm and real-time feedbacks status data;
[0184] 4) The master node performs error compensation using the least squares method: Δω = ∑(ω target - ω actual ) / N;
[0185] where Δω is the global angular velocity compensation amount, with the unit of rad / s, which is the average value of the angular velocity deviations of each slave node calculated by the master node and is used to eliminate the cumulative error of multi-motor collaborative operation; ω target is the target angular velocity, with the unit of rad / s, which is the expected angular velocity calculated by the master node according to the host computer instruction; ω actual is the actual angular velocity, with the unit of rad / s, which is the rotor angular velocity measured in real time by the slave node through the AS5600 encoder module; N is the number of slave nodes, averaging the angular velocity deviations of all slave nodes to avoid the influence of abnormal values of a single node on the global control;
[0186] 5) Dynamically adjust the PWM duty cycle to achieve torque balance, satisfying: where T ref is the reference torque, with the unit of N·m, which is the expected output torque calculated by the master node and is used to dynamically adjust the PWM duty cycle to achieve multi-motor torque balance; K t is the motor torque constant, with the unit: N·m / A, which is the torque generated by the motor per unit current and is determined by the inherent structure of the motor; I q is the quadrature axis current, with the unit: A, which is the torque component current decoupled from the FOC vector control algorithm of the slave node and is obtained by Clark-Park transformation from the three-phase current; Δω is the angular velocity compensation amount, feeding back the global speed deviation to the torque control loop to form a closed-loop correction; K p is the proportional gain, with the unit: A·s / rad, which adjusts the weight of the speed deviation on the torque compensation to achieve a compromise between dynamic stiffness and stability.
[0187] Such as Figure 11As shown in the figure, in the first embodiment, the host computer in the software layer includes a slave node broadcast section, a mode selection section, a slave node control and monitoring section, and a serial port communication debugging section. The slave node broadcast section simultaneously sends data to all selected slave nodes, and controls the position, speed, and current of the motors corresponding to the slave nodes. The mode selection section includes six custom mode selection buttons: Mode 1 button, Mode 2 button, Mode 3 button, Mode 4 button, Mode 5 button, and Mode 6 button. The slave node control and monitoring section is used to control the position, speed, and current of the brushless motor corresponding to a single slave node, send data through the send button, and simultaneously display the actual values and target values of the position, speed, and current. The serial port communication debugging section includes a send button, a clear button, and a select slave node button, which are used for data transmission between the host computer software and the main control layer.
[0188] Embodiment 2:
[0189] The wireless cooperative control system of a multi-node brushless motor described in the first embodiment is used in the automatic sorting system of intelligent logistics equipment. The automatic sorting system requires multiple brushless motors to drive different conveyor belts, push rods and other devices to achieve fast and accurate sorting of goods. Through the wireless cooperative control method, the flexibility and scalability of the system can be improved, and the wiring cost can be reduced.
[0190] It includes the following steps:
[0191] Step 1: System initialization
[0192] Main control layer configuration: Initialize the main control layer, including the configuration of task instruction scheduling rules, such as setting the sorting paths and priorities corresponding to different types of goods. At the same time, set the parameters of the USART serial communication between the main control layer and the software layer to ensure the accuracy of data transmission.
[0193] Driver layer preparation: Initialize N slave nodes (N≥3) in the driver layer. Each slave node needs to complete the parameter configuration of the FOC vector control algorithm, and these parameters will affect the starting, speed regulation and other performances of the brushless motor. In addition, the AS5600 encoder circuit module also needs to be initialized to prepare for subsequent real-time monitoring of the motor's speed, position, current and other state information.
[0194] Communication layer networking: Build a star network topology based on the ESP-NOW protocol. The master node actively broadcasts the networking information. After receiving the information, the N slave nodes establish a direct communication link with the master node. At the same time, start the dynamic channel switching mechanism and the timestamp alignment mechanism to ensure the stability and synchronization of communication between multiple nodes.
[0195] Step 2: Task allocation
[0196] Instruction Issued by the Software Layer: When goods enter the automatic sorting system, the software layer determines the type and destination of the goods through technologies such as image recognition. Then, the software layer sends the sorting task instructions to the main control layer via the USART serial port.
[0197] Main Control Layer Scheduling: After receiving the instructions from the software layer, the main control layer distributes specific tasks to each slave node in the drive layer according to the task instruction scheduling rules. For example, it assigns the transmission speed and direction instructions to the motor node responsible for transporting the goods, and assigns the time and force instructions for the pusher action to the motor node responsible for the pusher.
[0198] Step 3: Motor Drive and Status Monitoring
[0199] FOC Vector Control: After receiving the task instructions from the main control layer, the slave nodes in the drive layer execute the FOC vector control algorithm, convert the instructions into appropriate voltage and current signals, and drive the brushless motor to operate as required.
[0200] Status Monitoring: During the operation of the motor, the slave nodes continuously monitor the status of the brushless motor, such as speed, temperature, current, etc. These status data will be fed back to the main control layer through the communication layer.
[0201] Step 4: Multi-Node Cooperative Control
[0202] Dynamic Channel Switching: The dynamic channel switching mechanism in the communication layer continuously monitors the network signal strength and interference situation. When a certain channel is interfered, the main control node will automatically switch to other available channels to ensure stable communication between the main control node and the slave nodes.
[0203] Timestamp Alignment: To ensure the synchronization between multiple nodes, the timestamp alignment mechanism periodically calibrates the time of each node. In this way, each motor node can execute corresponding actions at the accurate time to achieve cooperative control. For example, when the goods reach the specified position, the motors responsible for transportation and the pusher can accurately act simultaneously to complete the sorting task.
[0204] Step 5: Data Feedback and Adjustment
[0205] Data Centralization and Upload: The main control layer centrally processes the motor status data received from each slave node, and then uploads this data to the software layer via the USART serial port.
[0206] Instruction Adjustment: The software layer determines whether the motor is operating normally based on the received motor status data. If it is found that the speed of a certain motor is abnormal, the software layer will promptly adjust the task instructions and send them to the main control layer. The main control layer then issues the adjusted instructions to the corresponding slave nodes to ensure the stable operation of the system.
Claims
1. A wireless collaborative control system for a multi-node brushless motor, characterized in that, Adopt a hierarchical architecture design, including a main control layer, a driver layer, a communication layer, and a software layer; The main control layer consists of a main node, which is the task instruction scheduling center of the system, including a core control module, a display module, and a self-locking button module; the core control module runs the FreeRTOS real-time operating system and controls multiple threads using a task priority scheduling algorithm; The driver layer consists of N slave nodes, where N≥3; the driver layer drives the brushless motor by executing the FOC vector control algorithm and monitors the state of the brushless motor; the slave node includes a node main control module, a CH340 serial port programming module, a power input circuit module for providing the power required by the driver layer, a buck circuit module, a gate drive circuit module, a three-phase inverter circuit module, a current sampling circuit module, and an AS5600 encoder circuit module; The communication layer constructs a star network topology based on the ESP-NOW protocol, establishes a direct communication link between the main node of the main control layer and N slave nodes, and realizes multi-node collaborative control using a dynamic channel switching mechanism and a timestamp alignment mechanism; The software layer establishes communication with the main control layer through the USART serial port, receives the state data of the brushless motors of each slave node centralized by the main control layer, and at the same time sends instructions to the main control layer to control the entire system to realize parameter adjustment, state monitoring, and data visualization of the brushless motor.
2. The wireless collaborative control system of the multi-node brushless motor according to claim 1, characterized in that: The node main control module can communicate with the main control layer and execute the FOC vector control algorithm to output PWM signals; The CH340 serial port programming module programs the compiled and debugged control code into the node main control module; The buck circuit module can step down the voltage of the power input circuit module to 3.3V and 5V, and then supply it to the node main control module, the gate drive circuit module, the current sampling circuit module, and the AS5600 encoder circuit module of the driver layer.
3. The wireless collaborative control system of the multi-node brushless motor according to claim 2, characterized in that: The gate drive circuit module uses an EG2133 gate drive chip to construct a three-stage drive architecture: the front stage connects the PWM signal output by the node main control module to the EG2133 pin; the middle stage has a built-in bootstrap boost circuit to generate a 5V gate drive voltage; the rear stage drive signal is connected to the gate of the NMOS tube of the three-phase inverter circuit module; The three-phase inverter circuit module uses 6 NMOS tubes to form an H-bridge topology. The upper bridge arm MOS tubes are used to convert the input DC voltage into the positive half cycle of the AC output, and the lower bridge arm MOS tubes are used to convert the input DC voltage into the negative half cycle of the AC output; the MOS tubes of the upper bridge arm and the lower bridge arm alternately conduct and turn off, so as to realize the conversion from DC to AC; The current sampling circuit module uses two INA240A2PWR current detection amplifiers to form a differential sampling topology; the circuit detection amplifier detects and amplifies the input current signal; at the same time, by reasonably setting the value of the external resistor, the gain of the amplifier can be adjusted to adapt to the current detection requirements of different ranges; in addition, an external capacitor is set to filter the amplified signal to remove high-frequency noise interference and make the output signal more stable and reliable; The AS5600 encoder circuit module detects the change in the magnetic field intensity during the rotation of the brushless motor through the built-in magnetic inductor, converts the intensity change into an electronic signal, processes the electronic signal into an angle value, and calculates the rotation speed of the brushless motor by calculating the angle of rotation for a period of time.
4. The wireless collaborative control system of the multi-node brushless motor according to any one of claims 1 to 3, characterized in that: The FOC vector control algorithm includes the following steps: First, decouple the three-phase current through Clark transformation and Park transformation to generate the direct-axis current component and the quadrature-axis current component; Then, an improved sliding mode observer is used to estimate the rotor position, and the added compensation term is θ comp = θ meas + K·sgn(Δi αβ )·Δt, where the value of K is adaptively adjusted according to the motor parameters, θ comp is the estimated value of the compensated rotor position, in rad; θ meas is the measured value of the initial rotor position, in rad; Δi αβ is the current deviation vector in the α-β coordinate system, in A; sgn is the vector sign function operation; Δt is the discrete sampling interval, in s; Generate PWM signals based on the seven-segment SVPWM optimization algorithm, insert zero vectors to reduce the number of switching times, and reduce the current harmonic distortion rate through asymmetric duty cycle calculation.
5. The wireless collaborative control system of the multi-node brushless motor according to claim 1, characterized in that: The dynamic channel switching mechanism and timestamp alignment mechanism of the communication layer include: The master node fixedly operates on Wi-Fi Channel 6; The slave node periodically detects the RSSI intensity, selects the channel with the least interference for dynamic switching, and controls the switching delay within 15 ms; Synchronous control is achieved by the master node broadcasting a synchronization frame containing a 32-bit microsecond-level timestamp. The slave node calculates the transmission delay Δt1 = (T receive - T send ) / 2 based on the reception time and performs phase compensation, where Δt1 is the transmission time delay of the signal from the master node to the slave node; T send is the transmission timestamp, a 32-bit high-precision timestamp embedded when the master node broadcasts the synchronization frame, generated by the local clock of the master node; T receive is the reception timestamp, the local recorded time when the slave node detects the arrival of the synchronization frame.
6. The wireless collaborative control system of the multi-node brushless motor according to claim 5, characterized in that: The multi-node cooperative control of the communication layer includes: 1) The master node receives the motion instructions from the host computer and calculates the target trajectories of each slave node; 2) Broadcast and synchronously start the instructions through ESP-NOW, including a 5 ms time tolerance window; 3) Each slave node executes the local FOC vector control algorithm and real-time feedbacks the status data; 4) The master node uses the least squares method for error compensation, Δω = ∑(ω target - ω actual ) / N; Among them, Δω is the global angular velocity compensation, with the unit of rad / s, which is the average value of the angular velocity deviations of each slave node calculated by the master node and is used to eliminate the cumulative error of multi-motor collaborative operation; ω target is the target angular velocity, with the unit of rad / s, which is the expected angular velocity resolved by the master node according to the host computer instruction; ω actual is the actual angular velocity, with the unit of rad / s, which is the rotor angular velocity measured in real time by the slave node through the AS5600 encoder module; N is the number of slave nodes, averaging the angular velocity deviations of all slave nodes to avoid the influence of outliers of a single node on global control; 5) The PWM duty cycle is dynamically adjusted to achieve torque balance, satisfying: where, T ref is the reference torque, with the unit of N·m, which is the expected output torque calculated by the master node and is used to dynamically adjust the PWM duty cycle to achieve multi-motor torque balance; K t is the motor torque constant, with the unit of N·m / A, which is the torque generated by the motor per unit current and is determined by the inherent structure of the motor; I q is the quadrature-axis current, with the unit of A, which is the torque component current decoupled from the FOC vector control algorithm of the slave node and is obtained by Clark-Park transformation from the three-phase current; Δω is the angular velocity compensation amount, which feeds back the global speed deviation to the torque control loop to form a closed-loop correction; K p is the proportional gain, with the unit of A·s / rad, which adjusts the weight of the speed deviation on the torque compensation to achieve a compromise between dynamic stiffness and stability.
7. The wireless collaborative control system of the multi-node brushless motor according to claim 1, wherein: The multi-threading includes a status monitoring thread, a human-computer interaction thread, a multi-node communication control thread, and a serial communication thread with the host computer; The status monitoring thread real-time collects the rotation parameters of the brushless motor; The human-computer interaction thread drives the display module to visualize the parameters and responds to the start / stop instructions of the self-locking button; The multi-node communication control thread communicates with N slave nodes through the ESP-NOW protocol and executes task scheduling; The serial communication thread performs instruction interaction and data transmission with the host computer through the USART serial port.
8. The wireless collaborative control system of the multi-node brushless motor according to claim 1, characterized in that: The main control module is an ESP-WROOM-32 main control module, and the main control module runs the FreeRTOS real-time operating system through a dual-core 32-bit LX7 processor; the display module is an OLED display module.
9. The wireless collaborative control system of the multi-node brushless motor according to claim 3, characterized in that: The cut-off frequency of the RC low-pass filter is 10 kHz.
10. A wireless cooperative control method for a multi-node brushless motor of a wireless cooperative control system of a multi-node brushless motor according to any one of claims 1 to 9, characterized in that: The method specifically includes the following steps: S1: System initialization Burn the compiled and debugged FOC vector control code into the node main control module of each slave node through the CH340 serial port burning module; Build a star network topology of the master control node and each slave node based on the ESP-NOW protocol to establish a direct communication link; Adopt the timestamp alignment mechanism to complete the clock synchronization calibration between multiple nodes to ensure the microsecond-level synchronization error of control instructions; S2: Instruction issuance and cooperative control The master control layer runs the FreeRTOS real-time operating system and issues target instructions to the slave nodes of the drive layer through the task priority scheduling algorithm, including speed and torque parameters; Each slave node executes the FOC vector control algorithm, generates PWM drive signals, and outputs them to the three-phase inverter circuit module through the gate drive circuit module; S3: Status feedback and dynamic adjustment Detect the magnetic field change of the brushless motor through the AS5600 encoder circuit module and calculate the real-time speed and angle information; Feed back the current sampling data, speed, and angle information to the master control layer, and realize status data visualization and fault diagnosis through the USART serial port; The master control layer dynamically adjusts the global according to the feedback data.
Citation Information
Cited By
Highly integrated embedded motor control MCU chip and control system thereof
CN121635028A
Data acquisition and processing method for linear motor performance test
CN121763099A
A data acquisition and processing method for linear motor performance test
CN121763099B