A self-organizing control method for swarm robots based on environmental gradient and local interaction
By employing a self-organizing control method based on environmental gradients and local interactions, and utilizing photosensitive sensors and graph traversal algorithms to identify robot subgroups, combined with iBeacon synchronization and OTA updates, the high cost and low scalability issues of traditional multi-robot systems are solved, achieving clustered intelligent emergence and efficient collaboration without centralized control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-24
AI Technical Summary
Traditional multi-robot systems rely on centralized control or complex communication, resulting in high costs, poor scalability and robustness, and a lack of effective quantitative analysis methods to evaluate the macroscopic behavior of the swarm.
A self-organizing control method based on environmental gradient and local interaction is adopted. The ambient light intensity distribution is perceived by a photosensitive sensor array to form a light intensity gradient field for implicit communication. A graph traversal algorithm is used to identify robot subgroups. Combined with iBeacon synchronous control and OTA updates, cluster collaboration without centralized control is achieved.
While reducing individual complexity, it achieves efficient collaboration and large-scale reliable deployment, supports the emergence of self-organizing intelligent behaviors in the cluster, and has the ability to balance and regulate the system and capture targets.
Smart Images

Figure CN121232689B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to autonomous robots and swarm intelligence technology, and particularly relates to a cluster robot self-organizing control method based on environmental gradient and local interaction. BACKGROUND
[0002] Traditional multi-robot systems usually adopt centralized control or need complex communication protocols to achieve collaborative work, which not only has high cost, but also has poor scalability and robustness. In recent years, inspired by biological groups in nature (such as ant colonies, bird flocks, and fish schools), distributed self-organizing systems have become a research hotspot. Such systems can emerge complex collective intelligent behaviors without global information and central control by designing simple individual behavior rules.
[0003] However, existing self-organizing robot systems still face some challenges: first, many systems rely on explicit communication methods (such as wireless networks), which increases the power consumption and design complexity of individuals; second, the system lacks effective quantitative analysis methods to evaluate the macro behavior of the cluster; in addition, the synchronous control and algorithm update of large-scale clusters is also a difficult problem. Therefore, there is an urgent need for a self-organizing control method that can maintain individual simplicity, achieve efficient collaboration, and support large-scale deployment.
[0004] It should be noted that the information disclosed in the above background section is only for understanding the background of the present application, and therefore can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY
[0005] The main purpose of the present application is to overcome the defects existing in the background art, and to provide a cluster robot self-organizing control method based on environmental gradient and local interaction.
[0006] To achieve the above purpose, the present application adopts the following technical solutions:
[0007] A cluster robot self-organizing control method based on environmental gradient and local interaction, comprising the following steps:
[0008] S1, distributed perception and behavior decision: each robot locally perceives the environmental light intensity distribution through a photosensitive sensor array, determines the extreme value direction based on the light intensity distribution ranking, and calculates the motion direction and speed according to the preset behavior mode;
[0009] S2, environmental interaction and implicit communication: each robot controls the light intensity according to the distance from the target, forming a light intensity gradient field centered on the target, and realizing implicit communication between robots through environmental media;
[0010] S3, state analysis and cluster quantification: based on the position and velocity information of robots, graph traversal algorithm is used to identify the sub-cluster of robots with consistent spatial proximity and movement direction, to quantify the cohesion and coordination state of the cluster;
[0011] Wherein, through the synergistic effect of steps S1 to S3, the robots emerge macroscopic behaviors of feedback regulation and collective target capture in a self-organizing manner without centralized control.
[0012] A self-organizing cluster robot system based on environmental gradient and local interaction, comprising:
[0013] A plurality of robot individuals, an external state analysis device, a synchronization beacon and an update server;
[0014] Each of the robot individuals is equipped with: a photosensitive sensor array, an infrared sensor, an LED light module, a wireless communication module, a control module and a movement module;
[0015] The control module is configured to perform the following operations:
[0016] (a) Collecting environmental light intensity data through the photosensitive sensor array, and performing multiple sampling and averaging processing to obtain stable light intensity distribution;
[0017] (b) Sorting the light intensity values to determine the extreme value direction, and calculating the movement direction of the robot according to the preset phototaxis or skototaxis behavior mode;
[0018] (c) Based on the infrared sensor readings, calculating the motor reference speed through a mapping function, and generating a PWM control signal for the corresponding direction motor;
[0019] (d) According to the infrared sensor readings, controlling the brightness of the LED light module through a mapping function;
[0020] (e) Scanning the wireless signal emitted by the synchronization beacon through the wireless communication module, and parsing the instruction identifier therein to switch the working or stopping state of the robot;
[0021] The external state analysis device communicates with the robot group, receives the position and velocity information of each robot, and performs the following operations:
[0022] (g) Building a graph model with robots as nodes, and establishing edges between nodes based on spatial distance and speed vector angle threshold;
[0023] (h) Using a depth-first search algorithm to traverse the graph model, identifying a sub-cluster of robots with consistent spatial proximity and movement direction;
[0024] The update server is used for storing and providing firmware files; the synchronization beacon is used for broadcasting synchronization instructions; the external state analysis device is used for quantitatively analyzing the macro state of the cluster; the robot individual realizes distributed control and environmental interaction by performing operations (a) to (d), and responds to the synchronization beacon by operation (e); and the whole system self-organizes to emerge macro intelligent behavior without centralized control.
[0025] The present application has the following beneficial effects:
[0026] The present application provides a cluster robot self-organizing control method and corresponding system based on environmental gradient and local interaction. The method makes the robot autonomously adjust the motion direction and speed based on local light intensity through distributed perception and behavior decision, and forms a light intensity gradient field centered on the target by combining the environmental interaction mechanism, to realize cooperative control without explicit communication. To ensure reliable operation of the system, the cluster state quantitative analysis based on graph traversal algorithm and the unified start-stop control function based on wireless signal are also included.
[0027] The corresponding system embodiment is composed of multiple robot individuals with perception, communication and control capabilities, as well as external state analysis devices, synchronization beacons and update servers. Each robot realizes environmental perception, motion control, light intensity adjustment, state synchronization and firmware maintenance through a local control module, while the external devices are responsible for macro analysis of cluster behavior and system-level service support.
[0028] Through the synergistic effect of the above-mentioned method and system, the robot cluster can self-organize to emerge complex intelligent behaviors such as system balance regulation and target collective capture without centralized control. This scheme significantly reduces the complexity of individuals while realizing efficient cooperation and large-scale reliable deployment of the cluster, providing an innovative and practical solution for the construction of self-organizing robot systems.
[0029] Other beneficial effects of the embodiments of the present application will be further described below. BRIEF DESCRIPTION OF DRAWINGS
[0030] Figure 1A is a structural schematic diagram of a robot individual in the embodiments of the present application.
[0031] Figure 1B is a structural schematic diagram of a robot individual in the embodiments of the present application.
[0032] Figure 1C is a structural schematic diagram of a robot individual in the embodiments of the present application.
[0033] Figure 1D is a structural schematic diagram of a robot individual in the embodiments of the present application.
[0034] Figure 2 Fig. 1 is a schematic diagram of the phototaxis algorithm principle of an embodiment of the present application.
[0035] Figure 3A and Figure 3B Fig. 2 is a schematic diagram of the determination of the angle threshold and distance threshold of an embodiment of the present application.
[0036] Figure 4 Fig. 3 is a schematic diagram of the related cluster identification algorithm principle of an embodiment of the present application. The definition of the related cluster is as follows: (a) cluster system example; (b) direct correlation relationship; (c) correlation relationship; (d) related cluster.
[0037] Figure 5 Fig. 4 is a general flowchart of the cluster robot self-organizing control method based on environmental gradient and local interaction of an embodiment of the present application. DETAILED DESCRIPTION
[0038] The embodiments of the present application are described in detail below. It should be emphasized that the following description is only exemplary, but is not intended to limit the scope of the present application and its applications.
[0039] In addition, the terms "first", "second" are only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise specifically limited.
[0040] The present application aims to overcome the limitations of centralized control and complex communication, and proposes a self-organizing cluster robot solution based on environmental gradient and local interaction. Through implicit light communication between individuals and simple local rules, the intelligent behavior emergence of the cluster under the condition of no central control is realized, the system complexity and cost are significantly reduced, and the robustness and scalability of the cluster are ensured.
[0041] Referring to Figure 5 , the embodiment of the present application provides a cluster robot self-organizing control method based on environmental gradient and local interaction, comprising the following steps:
[0042] Step S1, distributed sensing and behavior decision: each robot locally senses the environmental light intensity distribution through a photosensitive sensor array, determines the extreme value direction based on the light intensity distribution ranking, and calculates the motion direction and speed according to the preset behavior mode.
[0043] In some embodiments, step S1 specifically comprises: performing multiple consecutive sampling on each photosensitive sensor and calculating the average value to obtain stable ambient light intensity data; sorting the light intensity values in three directions to determine the direction index corresponding to the minimum light intensity value and the direction index corresponding to the second minimum light intensity value; according to a preset behavior mode, moving towards the direction with the strongest light intensity in the phototaxis mode; moving towards the direction with the weakest light intensity in the photophobic mode; based on the infrared sensor reading, calculating the motor reference speed through a linear mapping function, so that the closer to the obstacle, the lower the speed, and the farther away, the higher the speed, wherein: when the infrared reading is lower than the far distance threshold, the motor reference speed is set to the maximum speed; when the infrared reading is higher than the near distance threshold, the motor reference speed is set to the minimum speed; when the infrared reading is between the far distance threshold and the near distance threshold, the motor reference speed is calculated through linear mapping; the calculated motor reference speed is limited to be within the range of the maximum speed and the minimum speed; according to the behavior mode and the extreme value direction index, the motor output PWM signal in the corresponding direction is controlled: in the phototaxis mode, the motor corresponding to the direction with the strongest light intensity is applied with the motor reference speed; in the photophobic mode, the motor corresponding to the direction with the weakest light intensity is applied with the motor reference speed.
[0044] Step S2, environmental interaction and implicit communication: each robot controls the light emitting intensity according to its distance from the target, forming a light intensity gradient field centered on the target, and realizing implicit communication between robots through environmental media.
[0045] In some embodiments, step S2 specifically comprises: converting the infrared sensor reading into LED light emitting intensity through a linear mapping function, wherein the light emitting intensity is inversely proportional to the infrared reading, so that the closer to the target, the stronger the light emitting; outputting the light emitting intensity through PWM control of the LED to form a light intensity gradient field centered on the target with decreasing brightness outward; other robots perceive the gradient field through photosensitive sensors and move towards the direction with stronger light intensity, realizing cooperative target tracking and implicit communication.
[0046] Step S3, state analysis and cluster quantification: based on the position and speed information of the robots, a graph traversal algorithm is used to identify a sub-group of robots that are spatially adjacent and have consistent motion directions, to quantitatively analyze the cohesion and coordination state of the cluster.
[0047] In some embodiments, step S3 specifically comprises: obtaining the position coordinates and velocity vectors of all robots, wherein the global position coordinates of the robots can be achieved by various known positioning technologies, including but not limited to external visual positioning system, inter-robot relative ranging combined with multi-lateral positioning algorithm, or pre-obtained trajectory data in offline simulation scenarios, etc.; constructing a graph model, regarding the robots as nodes, and for any two robots, if the following conditions are met simultaneously, an undirected edge is established between them: a. the spatial distance is less than or equal to the distance threshold; b. the velocity vector angle is less than or equal to the angle threshold; traversing the graph model using a depth-first search algorithm: initializing an access flag array, traversing each unvisited node as a starting point, recursively accessing all unvisited nodes connected by undirected edges, and forming a relevant cluster each time; outputting the composition and statistical information of all relevant clusters for quantitative analysis of the cooperative motion state of the cluster.
[0048] Step S4, cluster synchronization control: sending unified start or stop instructions to all robots in the cluster through external wireless signals to achieve initial state synchronization.
[0049] In some embodiments, step S4 specifically comprises: the robot periodically scans the external iBeacon signal and parses its UUID information; if the parsed UUID matches the preset start identifier, the robot state is set to the working state; if it matches the preset stop identifier, the robot state is set to the stop state; in the working state, the robot performs environment perception, behavior decision and motion control; in the stop state, the robot stops all motors and light-emitting behaviors.
[0050] Step S5, firmware maintenance and remote update: realizing remote firmware distribution and update of the cluster robots based on wireless network protocol, supporting iterative upgrade of algorithm strategy.
[0051] In some embodiments, step S5 specifically comprises: the robot connects to the preset wireless network, initiates an HTTP request to the server to obtain a JSON file containing the latest firmware version information; parses the JSON file, extracts the remote version number and compares it with the locally stored version number; if the version numbers are inconsistent, download the new firmware file from the URL address parsed from the JSON file, and call the firmware update function to write the new firmware to the memory; feedback the update result to the user through the LED flashing mode.
[0052] Through the synergistic effect of each step, the robots emerge macro behaviors of feedback regulation and collective target capture in a self-organizing manner without centralized control.
[0053] In some embodiments, the method further comprises: when the cluster deviates from the equilibrium state due to external force disturbance, spontaneously recovering to the dynamic equilibrium state through light signal interaction between individuals and environmental gradient coupling.
[0054] In some embodiments, the method further comprises: in the presence of a non-power stimulus source, the robots spontaneously form multiple sub-clusters through phototaxis movement, each sub-cluster identifies the direction of the stimulus source and collectively moves, and finally achieves the encirclement and capture of the stimulus source.
[0055] In some embodiments, the behavior mode includes phototaxis mode and skototaxis mode, wherein: in the phototaxis mode, the robot moves in the direction of the strongest light intensity; in the skototaxis mode, the robot moves in the direction of the weakest light intensity; the movement speed is dynamically adjusted according to the infrared sensor reading to achieve safe obstacle avoidance and target approach.
[0056] The embodiment of the present application also provides a self-organizing cluster robot system based on environmental gradient and local interaction, comprising: a plurality of robot individuals, an external state analysis device, a synchronization beacon and an update server; each of the robot individuals is equipped with: a photosensitive sensor array, an infrared sensor, an LED light emitting module, a wireless communication module, a control module and a movement module; the control module is configured to perform the following operations: (a) collecting environmental light intensity data through the photosensitive sensor array, and performing multiple sampling and average processing to obtain a stable light intensity distribution; (b) sorting the light intensity values to determine the extreme value direction, and calculating the movement direction of the robot according to a preset phototaxis or skototaxis behavior mode; (c) calculating the motor reference speed through a mapping function based on the infrared sensor reading, and generating a PWM control signal for the motor in the corresponding direction; (d) controlling the brightness of the LED light emitting module through a mapping function according to the infrared sensor reading; (e) scanning the wireless signal emitted by the synchronization beacon through the wireless communication module, and analyzing the instruction identifier therein to switch the working or stopping state of the robot; (f) connecting to the update server through the wireless communication module to perform firmware version comparison and remote update operation; the external state analysis device communicates with the robot group to receive the position and speed information of each robot, and performs the following operations: (g) constructing a graph model with robots as nodes, and establishing edges between nodes based on spatial distance and speed vector angle threshold; (h) using a depth-first search algorithm to traverse the graph model to identify a robot sub-group that is spatially adjacent and has consistent movement direction; wherein the update server is used to store and provide firmware files; the synchronization beacon is used to broadcast synchronization instructions; the external state analysis device is used to quantitatively analyze the macro state of the cluster; the robot individual realizes distributed control and environmental interaction by performing operations (a) to (d), responds to the synchronization beacon through operation (e), and interacts with the update server through operation (f); the whole system emerges macro intelligent behavior self-organizingly without centralized control.
[0057] The self-organizing control method and corresponding system of the cluster robot based on environmental gradient and local interaction, through implicit light communication and distributed local rules based on environmental gradient, effectively overcome the high cost and low scalability problems caused by traditional centralized control, and realize the emergence of cluster intelligence without complex communication protocol and global information. Through the innovative integration of DFS-based quantitative analysis, iBeacon synchronization control and OTA remote update mechanism, the technical bottlenecks of existing self-organizing systems in behavior evaluation, cluster synchronization and algorithm update are systematically solved. Finally, while significantly reducing the complexity of individuals, the efficiency of cluster cooperation, the scalability of system deployment and the robustness of long-term operation are realized.
[0058] The specific embodiments of the present application and examples of algorithm implementation are further described below.
[0059] A self-organizing cluster robot control method and system based on environmental gradient and local interaction, the implementation scheme specifically includes the following parts, which are described in detail below.
[0060] The distributed control unit is used to make each robot individual in the cluster locally perceive the light intensity distribution of the surrounding environment through its photosensitive sensor array, and independently calculate its motion direction based on the light intensity distribution according to the preset behavior mode.
[0061] 1. Distributed control unit
[0062] The unit is the core of the autonomous decision of the robot individual, mainly including three parts of environment perception, behavior mode calculation and motion control.
[0063] 1.1 Environment perception and data preprocessing algorithm
[0064] The algorithm obtains stable and reliable environmental light intensity data to reduce noise interference.
[0065] The steps are as follows:
[0066] Multiple sampling: the analog input value of each photosensitive resistor is continuously sampled for n times (n=3 in the code). Let the single sampling value be LS_raw_i (i=1, 2, 3).
[0067] Calculate the average value: calculate the final light intensity value LS_final of the photosensitive resistor.
[0068] Calculation formula:
[0069] LS_final = (LS_raw1 + LS_raw2 +... + LS_raw_n) / n
[0070] Parameter description:
[0071] LS_raw_i: Raw analog value of the i-th sample (ADC reading of ESP32-C3).
[0072] n: Number of samples, can be adjusted according to environmental noise level, 3 in code.
[0073] Repeat the above process for the three light-dependent resistors (LS1, LS2, LS3) to get the light intensity values LS1, LS2, LS3 in three directions.
[0074] 1.2 Behavior decision and motion vector generation algorithm
[0075] This algorithm calculates the motion direction and speed of the robot based on preprocessed environmental information and preset behavior patterns.
[0076] The steps are as follows:
[0077] 1.2.1 Direction decision (find the extreme direction):
[0078] Input: Light intensity value array of three light-dependent resistors LS = [LS1, LS2, LS3].
[0079] Process: Call sorting algorithm sort(LS, size=3, n).
[0080] When n=1, the algorithm returns the index of the smallest value in the array min_index.
[0081] When n=2, the algorithm returns the index of the second smallest value in the array sec_min_index.
[0082] 1.2.2 Behavior pattern mapping:
[0083] Phototaxis mode (c=1): The robot should move towards the direction with the strongest light intensity. Since the light intensity value is inversely proportional to the ADC reading (the stronger the light, the smaller the resistance, the lower the voltage, the smaller the ADC reading), min_index corresponds to the direction with the strongest light intensity, and sec_min_index corresponds to the direction with the second strongest light intensity.
[0084] Avoid light mode (c=0): The robot should move towards the direction with the weakest light intensity. At this time, min_index corresponds to the direction with the strongest light intensity (which needs to be avoided), so the motion direction should be taken in reverse.
[0085] 1.2.3 Speed decision (based on infrared distance measurement):
[0086] Purpose: To make the robot slow down when approaching obstacles and speed up when moving away, achieving safe movement.
[0087] Input: analog value of infrared sensor IR_value.
[0088] Non-linear mapping: map the infrared reading to the maximum speed of the motor Motor_max.
[0089] Calculation formula (linear mapping in code):
[0090] The mapping process is achieved through a mapping function, the core logic of which is: the higher the infrared reading (the closer the distance), the lower the output speed; the lower the infrared reading (the farther the distance), the higher the output speed.
[0091] Parameter description: IR max : preset "short distance" threshold. When IR value < IR_value < threshold_short IR max , the robot determines that there is no obstacle in front or the distance is very far, and will move at the highest speed Motor speedmax .
[0092] IR min : preset "long distance" threshold (in code, this role is played by the fixed value 2000). When IR value IR_value >= threshold_long Motor speedmin , the robot determines that it is very close to the obstacle, and will move at the lowest speed
[0093] Motor speedmax : the maximum speed value allowed by the motor, corresponding to the movement speed when the robot is far away from the obstacle (in code max_m=255).
[0094] Motor speedmin : the minimum speed value allowed by the motor, corresponding to the movement speed when the robot is very close to the obstacle (in code min_m=150).
[0095] The map() function is a standard linear mapping utility, whose function is equivalent to the following formula: 1、If IR value < IR max , directly assign Motor max = Motor speedmax .
[0096] 2、If IRvalue >2000, then directly assign Motor max = Motor speedmin .
[0097] 3. Otherwise, between the two critical points, perform the linear mapping calculation described in point 2.
[0098] To ensure system stability, the final speed value Motor max is subjected to amplitude limiting processing: .
[0099] 1.3 Motion control execution (motor PWM output):
[0100] Input: extreme value direction (min_index, sec_min_index), behavior mode c, maximum speed Motor_max.
[0101] Process: Execute the motion control function mcon(LS1, LS2, min_index, sec_min_index, Motor_max, c).
[0102] Core logic:
[0103] The robot has three motors, corresponding to three directions.
[0104] In the phototaxis mode (c=1):
[0105] Apply maximum power Motor_max to the direction with the strongest light intensity (the motor corresponding to min_index). The direction with the second strongest light intensity (the motor corresponding to sec_min_index) has a power of 0. The third motor has a power of 0. Steering is achieved through the control of the motors.
[0106] In the photophobic mode (c=0):
[0107] Apply maximum power Motor_max to the direction with the weakest light intensity (i.e., the direction opposite to min_index). Specifically, the motor start logic can be exchanged to make the robot move away from the light source.
[0108] The algorithm pseudo code is as follows in Table 1:
[0109] Table 1 Motion control algorithm
[0110] Environment interaction unit, used to control each robot individual to emit visible light inversely proportional to its distance from the infrared SignalWhen the number of robots is odd, a gradient field of brightness unevenness is formed in the scene. The robots near the target emit stronger light to convey information to other robots. Other robots move towards the direction of stronger light. Thus, the robots achieve cooperative target tracking, thereby changing the light intensity distribution of the local environment and forming an implicit indirect communication.
[0111] Through the cyclic iterative action of the distributed control unit and the environment interaction unit, all robots emerge macro-intelligent behaviors at the cluster level in a self-organizing manner without centralized control.
[0112] 2. Environment interaction unit
[0113] This unit implements the mechanism of implicit communication by changing the environment (light emission) of the robot.
[0114] Through the environment interaction unit, the internal state of the robot (such as the distance to the target) is encoded into a light signal and transmitted to other robots through the environment medium.
[0115] Algorithm steps:
[0116] Information encoding: map the information to be transmitted (for example, the distance to the target, represented by the infrared sensor value IR_value) to the light intensity of the LED LED_brightness.
[0117] Nonlinear mapping function:
[0118] Calculation formula (linear mapping in code):
[0119] LED_brightness = map(IR_value, IR_min, IR_max, LED_max, LED_min)
[0120] Parameter description:
[0121] LED_max: maximum brightness of LED, ledvmax = 255 in code.
[0122] LED_min: minimum brightness of LED, ensure signal can be detected, while saving energy, ledvmin = 80 in code.
[0123] Algorithm description: this mapping implements the communication strategy of "the closer to the target, the stronger the light". In the actual environment, this forms a light intensity gradient field centered on the target, with brightness decreasing outward. Other robots can know the approximate direction of the target by sensing this gradient field.
[0124] Signal output: output the calculated LED_brightness by PWM control LED.
[0125] The system implementation scheme further comprises a state analysis unit, which adopts a related cluster identification algorithm based on depth-first search (DFS) to identify a robot sub-group in the cluster that is spatially adjacent and has a related movement direction, using a spatial distance threshold value ε and a speed vector angle threshold value θ as a basis for judgment, to quantitatively analyze the cohesion and cooperative movement state of the cluster.
[0126] 3. Related cluster identification algorithm based on depth-first search (DFS)
[0127] The algorithm can be run on an external monitoring computer to quantitatively analyze the macro behavior of the cluster.
[0128] The algorithm identifies a robot sub-group (related cluster) in the cluster that is spatially adjacent and has a consistent movement direction.
[0129] Input:
[0130] Position coordinates P_i(x_i, y_i) of all robots.
[0131] Speed vectors V_i(vx_i, vy_i) of all robots.
[0132] Spatial distance threshold value ε.
[0133] Speed vector angle threshold value θ.
[0134] Algorithm steps (based on depth-first search DFS):
[0135] Construct a graph model: treat robots as nodes in the graph.
[0136] The formation process of the model is shown in Figure 4 , where subgraphs (a) to (d) gradually explain the identification principle from the cluster system to the related cluster: (a) an example of the cluster system; (b) direct related relationship; (c) related relationship; (d) related cluster. Among them, p1-p4 represent robot nodes in the algorithm; N_ε(p1) represents the set of all nodes adjacent to node p1 within the spatial distance threshold value ε; S(C1) = 3, S(C2) = 1 in S(Cᵢ) represents the number of nodes contained in the related cluster Cᵢ identified by depth-first search, i.e. the size of the cluster. v p1, v p2 represent the speed vectors of corresponding robot nodes p1, p2.
[0137] Establish an edge (judge direct correlation): for any two robots i and j, if the following two conditions are met at the same time, an undirected edge is established between them:
[0138] a. Spatial proximity condition:
[0139] b. Motion coordination condition: where • denotes the dot product of vectors, and |V| denotes the modulus of a vector.
[0140] Identify relevant clusters:
[0141] Initialize an access tag array visited[], all set to False.
[0142] Traverse each robot node i:
[0143] If visited[i] is False, start a DFS from it as the starting point.
[0144] During the DFS process, access all nodes connected to the current node by edges and not yet visited, and mark them as visited.
[0145] All nodes accessed in a DFS traversal form a relevant cluster.
[0146] Output: All identified relevant cluster set {C1, C2,..., Ck}, and each cluster's size, members, duration, and other statistical information.
[0147] The algorithm starts from an unvisited individual, recursively accesses other individuals adjacent to its position and related in speed, until all individuals that meet the conditions are accessed. In this way, the composition and size of a relevant cluster can be obtained. The process of the algorithm is shown in the following Table 2 pseudo code:
[0148] Table 2 Relevant cluster algorithm
[0149] Set a cluster synchronization control unit that receives and parses the UUID information of a specific external iBeacon wireless signal, and sends uniform start or stop instructions to all robots in the cluster to ensure the initial state synchronization of the cluster behavior.
[0150] 4. Cluster synchronization control unit
[0151] This unit implements the uniform start and stop of the cluster behavior.
[0152] Algorithm steps:
[0153] Scan: The BLE module on the robot periodically (e.g., every second) scans for iBeacon signals in its surroundings.
[0154] Parse: For each iBeacon packet scanned, parse the manufacturer data segment to extract the UUID.
[0155] Judge and execute:
[0156] Calculation formula / judgment condition:
[0157] WHILE (true)
[0158] DO
[0159] scanned_uuid ← BLE_Scan() / / Scan and get UUID
[0160] IF (scanned_uuid == START_UUID) THEN
[0161] bot_state ← TRUE
[0162] ELSE IF (scanned_uuid == STOP_UUID) THEN
[0163] bot_state ← FALSE
[0164] END IF
[0165] DELAY(scan_interval)
[0166] END WHILE
[0167] When bot_state is True, the robot enters the working cycle; when it is False, the robot stops all motors and LEDs.
[0168] A firmware maintenance unit is provided, which implements the OTA wireless update function based on the HTTP protocol, and is used for remotely distributing and updating the control firmware of individual robots in the cluster to support iterative upgrading of the algorithm strategy.
[0169] 5. Firmware maintenance unit (OTA update)
[0170] This unit realizes remote and batch firmware update of the robot cluster.
[0171] Algorithm steps:
[0172] Connect to the server: After the robot starts, it connects to the preset Wi-Fi network.
[0173] Get version information: Initiate an HTTP GET request to the specified URL to obtain a JSON file containing the latest firmware version information.
[0174] Example JSON:
[0175] json
[0176] {
[0177] "version": "1_2_0_2",
[0178] "url": "some URL"
[0179] }
[0180] Version comparison: Parse the JSON and compare the version field with the version string stored locally on the robot.
[0181] Judgment conditions:
[0182] if (local_version!= remote_version)
[0183] then need_update = True
[0184] else need_update = False
[0185] Perform update: If need_update is True, download the new firmware binary file from the JSON-parsed url and call the ESPhttpUpdate.update() function to write the new firmware to Flash.
[0186] Result feedback: According to the update result, report to the user through the LED flashing specific mode (such as: success, failure, no need to update).
[0187] The macro intelligent behavior includes feedback regulation behavior: When the cluster deviates from the initial equilibrium state due to external disturbance, it can spontaneously restore to a stable state of dynamic equilibrium through light signal interaction between individuals and environmental coupling effect.
[0188] The macro intelligent behavior includes collective target capture behavior: In the presence of non-dynamic stimulus sources, individuals spontaneously form multiple sub-clusters through phototaxis, and the sub-clusters can distinguish the direction of the stimulus source and collectively move towards it, ultimately achieving the surrounding and capture of the stimulus source.
[0189] The system implementation scheme of the algorithm strategy includes the following core units:
[0190] 1. Distributed control unit: responsible for making each robot individual perceive the light intensity distribution of the surrounding environment through the photosensitive sensor array, and independently calculating the motion direction according to the preset behavior mode (phototaxis, photophobotaxis or random motion). In the phototaxis mode, the robot moves towards the direction with the strongest light intensity; in the photophobotaxis mode, the robot moves towards the direction with the weakest light intensity.
[0191] 2. Environment interaction unit: controls each robot individual to emit a visible light signal proportional to the light intensity at its location, forming an implicit indirect communication mechanism by changing the light intensity distribution of the local environment. This communication method based on environmental change avoids direct signal exchange between individuals, greatly reducing the complexity of the system.
[0192] 3. State analysis unit: uses a related cluster identification algorithm based on depth-first search (DFS) to identify the spatially adjacent and directionally related robot subgroups in the cluster, using spatial distance threshold ε and speed vector angle threshold θ as the basis for judgment. This algorithm can effectively quantify the cohesion and cooperative motion state of the cluster, providing reliable indicators for evaluating system performance.
[0193] To support the practical deployment of large-scale clusters, the system implementation scheme also provides the following auxiliary units:
[0194] The cluster synchronization control unit sends unified start or stop instructions to all robots in the cluster by receiving and analyzing the UUID information of specific external iBeacon wireless signals. This synchronization method based on Bluetooth low power technology can ensure the initial state synchronization of large-scale cluster behavior, with very low power consumption.
[0195] The firmware maintenance unit implements the OTA wireless update function based on the HTTP protocol, which can remotely distribute and update control firmware to individual robots in the cluster. This update method supports iterative upgrading of algorithm strategies, greatly improving the maintainability and scalability of the system.
[0196] Through the coordinated work of the above units, the algorithm strategy can make the robot group exhibit a variety of macro-intelligent behaviors, including but not limited to:
[0197] Feedback regulation behavior: when the cluster deviates from the initial equilibrium state due to external interference, the system can spontaneously recover to a stable state of dynamic equilibrium through the light signal interaction between individuals and the environmental coupling effect. This self-regulation ability makes the system have good robustness.
[0198] Collective target capture behavior: In the presence of non-motile stimulus sources, individuals spontaneously form multiple sub-clusters through phototaxis, which can distinguish the direction of the stimulus source and move collectively towards it, eventually achieving the encirclement and capture of the stimulus source. This emergent behavior demonstrates the collective intelligence of the system.
[0199] Embodiment 1: System architecture implementation
[0200] Reference Figures 1A-1D The robot individual, the self-organizing swarm robot system in this embodiment, includes multiple robot individuals, each equipped with a photosensitive sensor array, an LED light module, a control module, and a motion module. The robot individual of this embodiment can be a triangular prism, mainly including a shell 1, a battery 2, a pcb board 3, a thin film and motor assembly 4, a photosensitive resistor 5 and an LED 6, an infrared sensor 7. The battery and the pcb board 3 are housed inside the shell 1. Three photosensitive resistors 5 (environment perception unit) are embedded on the three common edges of the three sides of the shell. The LED 6 (neighborhood communication unit) is embedded in the circular protrusions of the three sides of the shell 1. Three groups of "flexible film 41 + vibration motor 42" (low disturbance driving unit) are respectively installed in the circular protrusions of the three sides of the shell 1. The control module uses an ESP32-C3 chip, which integrates an ADC for collecting photosensitive sensor data and a PWM for controlling motor drive and LED brightness. The distance measured by the infrared sensor 7 can be linearly mapped to the PWM control duty cycle of the LED, so that the luminous intensity is inversely proportional to the distance. The self-organizing swarm robot of this embodiment can be applied to water quality inspection tasks as a water surface robot.
[0201] Embodiment 2: Algorithm strategy implementation
[0202] Reference Figure 2 The principle of the phototaxis algorithm is shown in (a) determination of the azimuth of the light source; (b) adjusting the motor voltage to achieve phototaxis. The implementation process of the light gradient-based motion control algorithm is as follows: first, the system collects ambient light intensity data through three-direction photosensitive resistors; then, the light intensity data is sorted to determine the maximum and minimum light intensity directions; finally, the motor control parameters are calculated according to the set behavior mode (phototaxis / photophobia) to achieve the corresponding motion.
[0203] Embodiment 3: Swarm analysis implementation
[0204] Reference Figure 3A and Figure 3B, respectively, show the determination of the angle threshold and the distance threshold of the embodiment of the application. The implementation of the related cluster identification algorithm includes the following steps: first, obtaining the position and speed information of all robots; then using the DFS algorithm to traverse all robots, identifying the related clusters according to the spatial distance threshold ε and the speed angle threshold θ; finally, counting the size and duration of each related cluster for quantitative analysis of the swarm behavior.
[0205] Embodiment 4: Synchronization control implementation
[0206] The swarm synchronization is realized through the iBeacon technology. Two specific UUIDs are set: a start UUID (11111111-1111-1111-1111-111111111111) and a stop UUID (00000000-0000-0000-0000-000000000000). When the robot detects the corresponding UUID.
[0207] In summary, the present application provides a swarm robot self-organizing control method based on environmental gradient and local interaction and a self-organizing swarm robot system, which has many significant advantages. The core strategy of the method is that each robot individual only needs to have the ability of local perception, simple calculation and basic action execution, and through perceiving the environmental light intensity and adjusting the movement direction and light intensity of itself accordingly, the implicit communication between individuals mediated by light signals is realized without global coordinates or explicit communication. Based on the simple local behavior rules, the robots can emerge macro intelligent behaviors at the swarm level, such as self-regulation of system balance and complex global behaviors such as collective target capture, through the distributed interaction of individuals and environment.
[0208] To ensure the efficient and stable operation of the algorithm strategy in large-scale swarms, the present application integrates several key auxiliary functions, including a related cluster identification algorithm based on depth-first search, which is used for quantitative analysis of the cohesion and cooperative movement state of the swarm; a swarm unified start-stop control mechanism based on the iBeacon technology, which ensures that all robots can be started and stopped synchronously; and an OTA wireless update function based on the HTTP protocol, which supports remote maintenance and algorithm iteration of the swarm firmware. These mechanisms collectively provide a solid support for the reliable deployment and long-term operation of large-scale swarms.
[0209] Overall, the method strategy and system implementation proposed by the present application successfully realize the unification of the simplicity of individual robots and the high efficiency of swarm cooperation while significantly reducing the complexity and manufacturing cost of individual robots, and provide a complete and effective solution for building a robust and highly scalable self-organizing robot swarm.
[0210] The embodiment of the present application further provides a storage medium for storing a computer program, which is executed to perform at least the method described above.
[0211] The embodiment of the present application further provides a control device, comprising a processor and a storage medium for storing a computer program; wherein the processor is configured to execute the computer program to perform at least the method described above.
[0212] The embodiment of the present application further provides a processor, which executes a computer program to perform at least the method described above.
[0213] The storage medium can be implemented by any type of non-volatile storage device, or a combination thereof. The non-volatile storage device can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a ferromagnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc or a compact disc read-only memory (CD-ROM). The magnetic surface memory can be a disk memory or a tape memory. The storage medium described in the embodiment of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
[0214] In several embodiments provided by the present application, it should be understood that the disclosed system and method can be implemented in other manners. The described device embodiments are merely illustrative, for example, the division of the units is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed coupling between the components can be indirect coupling or direct coupling through some interface, device or unit, and can be electrical, mechanical or other forms.
[0215] The units described as separate components above can or can not be physically separate, and the components shown as units can or can not be physical units, that is, can be located in one place or distributed on multiple network units; part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0216] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
[0217] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware, and the foregoing program can be stored in a computer readable storage medium, and the program executes the steps including the above-mentioned method embodiments when executed; and the foregoing storage medium includes: mobile storage device, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and various storage program codes.
[0218] Alternatively, the integrated unit of the present application, if implemented in the form of a software function module and sold or used as an independent product, can also be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the various embodiments of the present application. The foregoing storage medium includes: mobile storage device, ROM, RAM, magnetic disk or optical disk and various storage program codes.
[0219] The methods disclosed in the several method embodiments of the present application can be combined arbitrarily without conflict to obtain new method embodiments.
[0220] The features disclosed in the several product embodiments of the present application can be combined arbitrarily without conflict to obtain new product embodiments.
[0221] The features disclosed in the several method or device embodiments of the present application can be combined arbitrarily without conflict to obtain new method embodiments or device embodiments.
[0222] The above is further detailed description of the present application in combination with specific preferred embodiments, and cannot be deemed as limitation of the specific implementation of the present application to these descriptions. For those skilled in the art to which the present application belongs, without departing from the concept of the present application, a number of equivalent substitutions or obvious variations can be made, and the performance or use is the same, which should be deemed as falling within the protection scope of the present application.
Claims
1. A self-organizing control method for swarm robots based on environmental gradients and local interactions, characterized in that, Includes the following steps: S1. Distributed perception and behavior decision-making: Each robot locally perceives the ambient light intensity distribution through a photosensitive sensor array, determines the extreme value direction based on the sorting of the light intensity distribution, and calculates the motion direction and speed according to a preset behavior pattern. S2. Environmental Interaction and Implicit Communication: Each robot controls its luminous intensity based on its distance from the target, forming a light intensity gradient field centered on the target. Implicit communication between robots is achieved through the environmental medium. Step S2 specifically includes: converting infrared sensor readings into LED luminous intensity through a linear mapping function, where the luminous intensity is inversely proportional to the infrared reading, so that the closer to the target, the stronger the luminous intensity; controlling the LED to output the luminous intensity through PWM to form a light intensity gradient field centered on the target and decreasing in brightness outwards; other robots perceive this gradient field through photosensitive sensors and move towards the direction with stronger light intensity, achieving cooperative target tracking and implicit communication. S3. State Analysis and Cluster Quantization: Based on the robot's position and velocity information, a graph traversal algorithm is used to identify spatially adjacent robot subgroups with the same direction of motion, so as to quantitatively analyze the cohesion and cooperative state of the cluster. Through the synergistic effect of steps S1 to S3, the robot can spontaneously emerge with macroscopic behaviors of feedback regulation and collective target acquisition without centralized control.
2. The self-organizing control method for swarm robots based on environmental gradients and local interactions as described in claim 1, characterized in that, Step S1 specifically includes: Each photosensitive sensor is sampled multiple times consecutively and the average value is calculated to obtain stable ambient light intensity data; Sort the light intensity values in the three directions and determine the direction index corresponding to the minimum light intensity value and the direction index corresponding to the second minimum light intensity value; Based on preset behavior patterns, in phototaxis mode, it moves towards the direction of strongest light intensity; in photoavoidance mode, it moves towards the direction of weakest light intensity. Based on infrared sensor readings, a linear mapping function is used to calculate the motor's base speed, resulting in a lower speed closer to the obstacle and a higher speed farther away. When the infrared reading is below the far-field threshold, set the motor reference speed to the maximum speed; When the infrared reading is higher than the near-field threshold, set the motor reference speed to the minimum speed; When the infrared reading is between the far-range threshold and the near-range threshold, the motor reference speed is calculated through linear mapping. The calculated motor reference speed is limited to ensure it does not exceed the range of maximum and minimum speed. Based on the behavior pattern and extreme value direction index, the motor outputs a PWM signal in the corresponding direction: in the light-attracting mode, the motor reference speed is applied to the motor corresponding to the direction with the strongest light intensity; in the light-avoiding mode, the motor reference speed is applied to the motor corresponding to the direction with the weakest light intensity.
3. The self-organizing control method for swarm robots based on environmental gradients and local interactions as described in claim 1 or 2, characterized in that, Step S3 specifically includes: Obtain the position coordinates and velocity vectors of all robots; Construct a graph model, treating robots as nodes. For any two robots, establish an undirected edge between them if the following conditions are simultaneously satisfied: a. The spatial distance is less than or equal to the distance threshold; b. The angle between the velocity vectors is less than or equal to the angle threshold; The graph model is traversed using a depth-first search algorithm: an array of visit markers is initialized, each unvisited node is traversed as the starting point, and all unvisited nodes connected by undirected edges are recursively visited. Each traversal forms a related cluster. Output the composition and statistical information of all relevant clusters to quantitatively analyze the cooperative motion state of the clusters.
4. The self-organizing control method for swarm robots based on environmental gradients and local interactions as described in claim 1 or 2, characterized in that, It also includes the following steps: S4. Cluster Synchronization Control: Sends unified start or stop commands to all robots in the cluster via external wireless signals to achieve initial state synchronization. Step S4 specifically includes: The robot periodically scans external iBeacon signals and parses their UUID information; If the parsed UUID matches the preset start flag, the robot state is set to working state; if it matches the preset stop flag, the robot state is set to stopped state. When in operation, the robot performs environmental perception, behavioral decision-making, and motion control; when stopped, the robot stops all motors and light-emitting behaviors.
5. The self-organizing control method for swarm robots based on environmental gradients and local interactions as described in claim 1 or 2, characterized in that, It also includes the following steps: S5. Firmware Maintenance and Remote Update: Based on the wireless network protocol, remote firmware distribution and updates for cluster robots are implemented for iterative upgrades of algorithm strategies. Step S5 specifically includes: The robot connects to the preset wireless network and sends an HTTP request to the server to obtain a JSON file containing the latest firmware version information; Parse the JSON file, extract the remote version number, and compare it with the version number stored locally; If the version numbers are inconsistent, the new firmware file is downloaded from the URL address parsed from the JSON file, and the firmware update function is called to write the new firmware to the storage. The update results are fed back to the user through an LED flashing pattern.
6. The self-organizing control method for swarm robots based on environmental gradient and local interaction as described in any one of claims 1 to 2, characterized in that, The method further includes: When the cluster deviates from its equilibrium state due to external disturbances, it spontaneously recovers to a dynamic equilibrium state through the interaction of optical signals between individuals and the coupling of environmental gradients.
7. The self-organizing control method for swarm robots based on environmental gradient and local interaction as described in any one of claims 1 to 2, characterized in that, The method further includes: In scenarios where non-dynamic stimuli exist, the robot spontaneously forms multiple sub-clusters through phototaxis. Each sub-cluster identifies the direction of the stimulus and moves collectively, ultimately achieving the encirclement and capture of the stimulus.
8. The self-organizing control method for swarm robots based on environmental gradients and local interactions as described in any one of claims 1 to 2, characterized in that, The behavioral patterns include phototaxis and photophobia, wherein: In phototaxis mode, the robot moves towards the direction of strongest light intensity; In light-avoidance mode, the robot moves in the direction of the weakest light intensity; The movement speed is dynamically adjusted based on infrared sensor readings to achieve safe obstacle avoidance and target approach.
9. A self-organizing swarm robot system based on environmental gradients and local interactions, characterized in that, include: Multiple individual robots, external state analysis equipment, synchronization beacons, and update servers; Each of the aforementioned robot individuals is equipped with: a photosensitive sensor array, an infrared sensor, an LED light-emitting module, a wireless communication module, a control module, and a motion module; The control module is configured to perform the following operations: (a) Ambient light intensity data is collected through the photosensitive sensor array, and multiple sampling and averaging processes are performed to obtain a stable light intensity distribution; (b) Sort the light intensity values to determine the extreme values and calculate the robot's motion direction according to the preset phototaxis or photoavoidance behavior pattern; (c) Based on the infrared sensor readings, calculate the motor reference speed through a mapping function and generate the corresponding PWM control signal for the motor in the direction of the motor; (d) Based on the infrared sensor readings, control the brightness of the LED light-emitting module through a mapping function; (e) Scan the wireless signal emitted by the synchronization beacon through the wireless communication module and parse the instruction identifier therein to switch the robot’s working or stopped state; The external state analysis device communicates with the robot group to receive the position and velocity information of each robot and performs the following operations: (g) Construct a graph model with the robot as the node, and establish the edges between the nodes based on the threshold of the angle between the spatial distance and the velocity vector; (h) A depth-first search algorithm is used to traverse the graph model and identify subgroups of robots that are spatially adjacent and move in the same direction; The update server is used to store and provide firmware files; the synchronization beacon is used to broadcast synchronization instructions; the external state analysis device is used to perform quantitative analysis of the macroscopic state of the cluster; the individual robots achieve distributed control and interaction with the environment by performing operations (a) to (d), and respond to the synchronization beacon by operation (e); the entire system self-organizes and emerges with macroscopic intelligent behavior without centralized control.
Citation Information
Patent Citations
Bionic robot cluster formation control method and system under communication denial condition
CN118550316A
Cluster robot platform and system based on implicit cooperation and multi-dimensional perception
CN120255500A