💥💥💞💞Welcome to this blog❤️❤️💥💥
🏆Author’s Advantage: 🌞🌞🌞The blog content aims to be logically clear and coherent for the convenience of readers.
⛳️Motto: A journey of a hundred miles begins with a single step.
💥1 Overview
This article provides an example demonstrating how to implement a simple formation of four agent robots and explains the implementation of a leader-follower formation control law based on bearing angle. This control law ensures that, within a finite time, even if the leader moves at a time-varying speed, the followers can still track the leader, and the bearing angle error will ultimately converge to zero.
In practice, we can expand and improve this example to meet different needs and conditions. First, we can change the simulation time, which will affect the overall duration and resolution of the simulation process, thereby better simulating the motion behavior in real scenarios.
Secondly, we can adjust control parameters, such as tuning the proportional gains kp and ke, as well as other related parameters, to make the formation system more stable and adaptable to different environmental conditions. Such adjustments may require experimentation and simulation to determine the optimal parameter values to ensure the system has good performance and robustness.
Additionally, we can simulate different motion situations and scene requirements by setting the leader’s speed. If the leader moves at a high speed, it may be necessary to increase the followers’ response speed or adjust control parameters to ensure that the followers can timely track the leader without significant deviation or loss of control.
It is important to note that adjusting these parameters and settings may require a certain experimental and debugging process to achieve good results in practical applications. Moreover, for different application scenarios and requirements, further optimization and improvement of the formation control algorithm may be necessary to meet more complex and diverse practical needs. Therefore, in practical applications, we need to make flexible adjustments and optimizations based on specific situations to ensure that the system can achieve the expected performance and results.
1. Basic Principles of Leader-Follower Formation Control
Leader-follower formation control is a widely adopted core strategy in multi-agent systems (MAS), where the core idea is to achieve stability of the formation structure through hierarchical division of labor.
Role Definitions:
Leader: Directly controlled by external inputs, determining the overall trajectory and speed of the formation, usually not relying on feedback from the followers.
Follower: Dynamically adjusts its motion based on the relative position (such as bearing angle and distance) to the leader or other followers, maintaining the preset formation structure.
Control Advantages:
Simple Structure: Only the leader’s path needs to be planned, and followers adjust based on predefined rules, reducing system complexity.
Strong Scalability: Adding new followers does not require reconstructing the entire control framework.
Limitations:
Single Point Dependency Risk: If the leader fails or its speed exceeds the tracking range of the followers, the formation is prone to collapse.
Lack of Feedback Mechanism: Traditional methods do not consider the state of the followers, leading to insufficient adaptability to dynamic environments.
2. Implementation Methods for Disturbance Rejection in Formation Control
In complex environments, internal and external disturbances (such as wind, waves, communication delays, and unmodeled dynamics) can disrupt formation stability. Disturbance rejection techniques enhance robustness by estimating and compensating for disturbances:
Disturbance Observer Design:
Extended State Observer (ESO): Treats disturbances as the system’s “extended state,” estimating and compensating in real-time (e.g., in the MPC-ESO framework).
Finite Time Disturbance Observer (FTDO): Accurately estimates disturbances within a fixed time, suitable for high-dynamic scenarios.
Control Strategy Integration:
Model Predictive Control (MPC): Integrates disturbance estimates into the predictive model through rolling optimization, generating disturbance-resistant control laws.
Sliding Mode Control (SMC): Combines terminal sliding surfaces to ensure convergence and suppress chattering within a finite time.
Application Cases:
Heterogeneous systems of drones and unmanned vehicles achieve time-varying formations through hierarchical controllers (consistency formation center estimation + disturbance compensation).
Unmanned Surface Vehicles (USVs) employ fixed-time sliding mode control with disturbance observers to effectively resist current disturbances.
3. Finite Time Convergence Control Strategies
Finite time control ensures that system errors converge to equilibrium points within a finite time through mathematical constraints, offering faster response and stronger disturbance resistance compared to asymptotic stability methods:
Theoretical Basis:
Finite Time Lyapunov Stability: Ensures state convergence by designing a Lyapunov function that satisfies V˙≤−cVα (α∈(0,1)).
Homogeneity Theory: Constructs homogeneous control laws to achieve finite time convergence of tracking errors.
Key Technologies:
Terminal Sliding Mode Control: Avoids singular points through nonsingular sliding surfaces, combined with neural networks to compensate for model uncertainties.
Backstepping: Designs virtual control quantities step by step to stabilize subsystems progressively.
Practical Applications:
In multi-robot formations, fixed-time controllers make convergence time independent of initial states, significantly improving formation reconstruction efficiency.
Underwater robots achieve rapid stabilization at target points through finite time switching control laws.
4. The Role of Bearing Angle in Formation Control
Bearing angle serves as a key parameter for relative positioning, providing geometric constraint information in formation control:
Formation Modeling:
Bearing Angle Rigidity Theory: Defines formation shapes through angular constraints, avoiding reliance on global coordinate systems.
Distributed Sensing: Followers only need to measure the bearing angles to neighbors for localization, reducing communication requirements.
Control Law Design:
Bearing Angle Error Feedback: Designs control laws that enable followers to adjust their motion to eliminate deviations from the desired bearing.
Dynamic Weight Adjustment: In obstacle avoidance scenarios, real-time updates of bearing angle weights achieve adaptive formations.
Collaborative Optimization:
Active Sensing Strategies: Maximize the information entropy of bearing angle measurements to enhance formation observability.
Virtual Leader Coupling: Combines circular motion control laws to ensure followers converge to the desired bearing.
5. Collaborative Control Scheme Design
Integrating the above technologies to achieve disturbance-resistant bearing angle formation control within finite time:
Architecture Design:
Hierarchical Control: The leader layer plans the global path, while the follower layer generates local control commands based on bearing angle errors and disturbance estimates.
Distributed Observer: Fixed-time observers estimate the leader’s state, reducing communication dependency.
Algorithm Flow:


Simulation Verification:
In Matlab/Simulink, comparing traditional PID with finite time control, the latter reduces convergence time by 30%, and the bearing angle error is reduced to within 5mm.
6. Challenges and Future Directions
Communication Reliability: Need to address synchronization and fault tolerance of bearing angle information under local communication.
Energy Optimization: The high gain of finite time control may lead to energy waste, requiring a balance between convergence speed and energy consumption.
Heterogeneous System Expansion: The dynamic differences of heterogeneous platforms like drones and unmanned vehicles need further unified modeling.
Conclusion
By integrating finite time control, disturbance observers, and bearing angle rigidity theory, leader-follower formations can achieve rapid and robust collaborative motion in complex environments. Future research should focus on optimizing distributed architectures and validating in real-world scenarios to promote the application of this technology in large-scale unmanned systems.
📚2 Running Results


Directly remove the frame from the image:




Partial Code:
%initial and desired position
p_des = [5 5 -5 -5
5 -5 5 -5];
p_init = [5 5 0 -7
5 -5 6 0];
e_des = H_bar*[p_des(:,1)’ p_des(:,2)’ p_des(:,3)’ p_des(:,4)’]’;
g_des = [e_des(1)/norm(e_des(1:2)) e_des(2)/norm(e_des(1:2)) e_des(3)/norm(e_des(3:4)) e_des(4)/norm(e_des(3:4)) …
e_des(5)/norm(e_des(5:6)) e_des(6)/norm(e_des(5:6)) e_des(7)/norm(e_des(7:8)) e_des(8)/norm(e_des(7:8)) …
e_des(9)/norm(e_des(9:10)) e_des(10)/norm(e_des(9:10))]’;
% Simulation parameters
t_end = 40;
dt = 0.001;
t = 0:dt:t_end; %simulation horizon
num_steps = length(t);
% Pre-allocate memory
p = zeros(N*d,num_steps);
g_memo = zeros(5,num_steps);%to record bearing error
p_next = [p_init(:,1)’ p_init(:,2)’ p_init(:,3)’ p_init(:,4)’]’;
omega_hat = zeros(N*d,1);
for i = 1:num_steps
p(:,i) = p_next;
e = H_bar*p_next;
g = [e(1)/norm(e(1:2)) e(2)/norm(e(1:2)) e(3)/norm(e(3:4)) e(4)/norm(e(3:4)) …
e(5)/norm(e(5:6)) e(6)/norm(e(5:6)) e(7)/norm(e(7:8)) e(8)/norm(e(7:8)) …
e(9)/norm(e(9:10)) e(10)/norm(e(9:10))]’;
[p_dot,omega_hat_dot] = system(e,g,g_des,H_bar,omega_hat,dt*i);
p_next = p_next+p_dot*dt;
omega_hat = omega_hat+omega_hat_dot*dt;
%p_next’H_bar’sig_alpha(g,g_des) >0;
%record distance errors
g_memo(1,i) = norm(e(1:2))-10;
🎉3 References
Some content in this article is sourced from the internet, and references will be noted. If there are any inaccuracies, please feel free to contact for removal.
[1] Wang C, Zuo Z, Gong Q, et al. Formation control with disturbance rejection for a class of Lipschitz nonlinear systems[J]. Science China Information Sciences, 2017. DOI:10.1007/s11432-016-9125-2.
[2] Wu Yichen, Liu Tianyu, Wang Ying. Multi-robot formation control based on leader-follower technology[J]. Southern Agricultural Machinery, 2021(019):052.
[3] Chen Xin. Research on formation control of mobile robots based on leader-follower structure[D]. South China University of Technology, 2019.
🌈4 Matlab Code and Data
Reply in the public account backend: Program download