The mathematical framework in the paper develops a **distance-based control algorithm** for two non-holonomic robots performing **leader-follower circumnavigation** around a stationary target. Below is an explanation of the mathematics presented in the paper, structured for clarity:

---

### 1. **Robot Dynamics**

Each robot follows non-holonomic motion described by:

\[
\dot{x}_i(t) = v_c \cos \theta_i(t), \quad \dot{y}_i(t) = v_c \sin \theta_i(t), \quad \dot{\theta}_i(t) = \omega_i(t),
\]

where:
- \((x_i, y_i)\): Position of robot \(i\),
- \(v_c\): Constant linear velocity,
- \(\theta_i(t)\): Azimuth (orientation) of robot \(i\),
- \(\omega_i(t)\): Angular velocity, the only control input.

**Key Assumptions:**
- Robots lack global positioning information.
- Only relative distances between robots and the target are measured.

---

### 2. **Circumnavigation Objective**

Two robots must:
1. Orbit the target at a desired radius \(d_c\):
   \[
   \lim_{t \to \infty} d_i(t) = d_c, \quad i = 1, 2.
   \]
   Here, \(d_i(t) = \|p_i(t) - T\|\) is the distance of robot \(i\) from the target \(T\).
2. Maintain a desired spacing \(d_{12}^*\) between robots:
   \[
   \lim_{t \to \infty} d_{12}(t) = d_{12}^*, \quad d_{12}(t) = \|p_1(t) - p_2(t)\|.
   \]

---

### 3. **Coordinate Transformation**

A polar coordinate system is introduced for each robot:
\[
\dot{d}_i(t) = -v_c \cos \alpha_i(t),
\]
\[
\dot{\alpha}_i(t) = -\omega_i(t) + \frac{v_c \sin \alpha_i(t)}{d_i(t)},
\]
where:
- \(\alpha_i(t)\): Polar angle of the target relative to robot \(i\).

This transformation simplifies control design by focusing on:
1. Adjusting \(d_i(t)\) to converge to \(d_c\),
2. Adjusting \(\alpha_i(t)\) to maintain tangential motion.

---

### 4. **Control Algorithm**

The leader and follower robots' angular velocities (\(\omega_1, \omega_2\)) are controlled as:

#### (a) Leader Robot (\(i = 1\)):
\[
\omega_1(t) = \frac{v_c + k_1 \dot{d}_1(t)}{d_c},
\]

#### (b) Follower Robot (\(i = 2\)):
\[
\omega_2(t) = \frac{v_c + k_2 \dot{d}_2(t) + \eta_2 v_c \tanh(d_{12}(t) - d_{12}^*)}{d_c}.
\]

**Components:**
- \(k_1, k_2\): Proportional control gains for distance convergence.
- \(\eta_2\): Gain for maintaining spacing between robots.
- \(\tanh(d_{12}(t) - d_{12}^*)\): Smooth saturation function that prevents excessive control inputs.

---

### 5. **Closed-Loop Dynamics**

Substituting the control inputs into the robot dynamics yields:

1. For the leader:
   \[
   \dot{d}_1(t) = -v_c \cos \alpha_1(t),
   \]
   \[
   \dot{\alpha}_1(t) = -\frac{v_c}{d_c} + \frac{k_1 v_c \cos \alpha_1(t)}{d_c} + \frac{v_c \sin \alpha_1(t)}{d_1(t)}.
   \]

2. For the follower:
   \[
   \dot{d}_2(t) = -v_c \cos \alpha_2(t),
   \]
   \[
   \dot{\alpha}_2(t) = -\frac{v_c}{d_c} + \frac{k_2 v_c \cos \alpha_2(t)}{d_c} - \frac{\eta_2 v_c \tanh(d_{12}(t) - d_{12}^*)}{d_c} + \frac{v_c \sin \alpha_2(t)}{d_2(t)}.
   \]

---

### 6. **Stability Analysis**

#### (a) Equilibrium Points:
At equilibrium:
\[
d_i = d_c, \quad \dot{d}_i = 0, \quad \alpha_i = \frac{\pi}{2}, \quad d_{12} = d_{12}^*.
\]

#### (b) Convergence Criteria:
The paper derives conditions on the control parameters to ensure convergence:
1. \(k_1 > 1, k_2 > \eta_2 + 1, \eta_2 < 1\),
2. Initial polar angles \(\alpha_i(0)\) must lie within specific bounds.

---

### 7. **Extension to Multiple Robots**

For \(n > 2\) robots, the algorithm is extended using a **leader-follower chain**:
- Robot \(i\) follows robot \(i-1\) using the control law:
\[
\omega_i(t) = \frac{v_c + k_i \dot{d}_i(t) + \eta_i v_c \tanh(d_{i-1,i}(t) - d_{i-1,i}^*)}{d_c}.
\]

---

### 8. **Simulations and Experiments**

The results demonstrate:
1. Convergence of \(d_i\) to \(d_c\) and \(d_{12}\) to \(d_{12}^*\).
2. Smooth control inputs (avoiding overshoot or oscillations).

---

This mathematical framework provides a robust, coordinate-free method to achieve cooperative circumnavigation with minimal sensing. Let me know if you want clarification on specific derivations!   
please provide me matlab code of the above problem    Simulations
 In this section, a simulation comparison is first given to val
idate and highlight the effectiveness of the developed distance
based control algorithm (11) and (12). Then, another simulation
 is shown to verify the effectiveness of the extended control inputs
 (11) and (18) for the multi-robot case.
 4.1. Simulation comparison
 We compare the developed control algorithm (11) and (12)
 with the one proposed in Cao et al. (2016), where two con
trol inputs ωi and vi are used for the distance-based leader
follower circumnavigation of non-holonomic robots. Specifically,
 the control inputs in Cao et al. (2016) are in the following forms:
 {
 ωi(t)=
 0,
 v1(t) =a +b
 2 
,
 (
 k
 [
 −vc cos
 sin−1
 v2(t) =sat(ζ2(t),a,b),
 (
 ζ2(t) =v1(t) + γ2
 (
 d12(t) − d∗
 12
 ))
 da
 di(t)
 )
 ,
 −̇ di(t)
 ]
 , di(t)≥da,
 di(t)<da,
 i = 1,2,
 where k is a positive control parameter, da = 
√
 (41a)
 (41b)
 (41c)
 (41d)
 d2
 c 
− 1/k2, a >
 b are maximum and minimum velocities of both robots, γ2 ∈
 {−1,1} is a flag variable, and sat(·,a,b) is a saturation function. It
 can be seen from (41) that a switching mechanism is introduced
 in the control algorithm.
 For the sake of comparison, we give the same simulation setup
 for two distance-based control algorithms. In particular, we sup
pose that there is a target at T = [0,0]T m. The circumnavigation
 radius is set as dc = 2 m, and the desired spacing distance
 between two robots is set as d∗
 12 
= 1 m. Besides, the maximum
 and minimum linear velocities of two robots are both a = 3 and
 b = 1. Two robots are initialized at p1(0) = [−0.8,−0.3]T m,
 θ1(0) = 0.03π rad, and p2(0) = [1.9,−1.3]T m, θ2(0) = 0.21π
 rad. For our developed control algorithm, the linear velocities
 of two robots are set as 1 m/s. Besides, for both the control
 algorithms, the control parameters are chosen as k = k1 =
 k2 = 1.2 and η2 = 0.1. The comparison results are illustrated
 in Figs. 3–5.
 Fig. 3. Motion trajectories of two robots.
 Fig. 4. Distances with respect to target and between robots.
 8
 2 L∞ ={f :R+→Rn |f is locally integrable, esssupt∈R+ ∥f(t)∥<∞}.
Y. Zou, L. Zhong, W. He et al.
 Automatica 169 (2024) 111831
 Fig. 5. Control inputs.
 First, Fig. 3 exhibits the motion trajectories of two robots using
 two control algorithms. It can be seen that both the control al
gorithms achieve the leader–follower circumnavigation objective.
 However, two robots driven by the proposed control algorithm
 (11) and (12) with just a single input converge more quickly to
 the desired circle than those driven by the control algorithm (41).
 Next, Fig. 4 shows the distances of two robots with respect to
 the target and the spacing distance between two robots. It can
 be observed that both control algorithms are able to asymptoti
cally drive these distances to their anticipated values. However,
 by comparison, we find that the distances using our proposed
 control algorithm (11) and (12) show smoother convergence per
formance than that using the control algorithm (41). Particularly,
 there is a sudden jump of the spacing distance between two
 robots at about 10s using the control algorithm (41). This is
 caused by the input switch introduced in the control algorithm
 (41), which can be intuitively seen in Fig. 5. In particular, in
 Fig. 5, the inputs of the control algorithm (41) show an obvious
 jump at about 10s. In contrast, the inputs of the proposed control
 algorithm (11) and (12) display smooth performance.
 4.2. Simulation verification for multi-robot case
 To verify the extension of the developed distance-based con
trol algorithm (11) and (12) to clustered robots, we consider a
 case of six robots, and use the extended control inputs (11) and
 (18) for the leader–follower circumnavigation objective. Given a
 target at T = [0,0]T m, the circumnavigation radius is dc = 1
 m, and the desired spacing distance between any two successive
 robots is di,i+1 = 1 m, i = 1,2,...,5. Except the first robot,
 other robots each take their preceding ones as a leader. Six
 robots are initialized at p1(0) = [1,−1]T m, θ1(0) = 0.3π rad,
 p2(0) = [−2,−5]T m, θ2(0) = 0.2π rad, p3(0) = [3,3]T m,
 θ3(0) = −0.15π rad, p4(0) = [2,6]T m, θ4(0) = −0.2π rad,
 p5(0) = [6,−3]T m, θ5(0) = −0.3π rad, and p6(0) = [−5,−4]T
 m, θ6(0) = 0.2π rad. The linear velocities of six robots are
 set as 1 m/s. Besides, the control parameters of six robots are
 specified as ki = 1.2, i = 1,2,...,6 and ηi = 0.1, i =
 2,3,...,6. The simulation results are illustrated in Fig. 6. It can
 Fig. 6. Distances with respect to target, their distance rates, and spacing
 distances between robots.
 Fig. 7. Main compositions of TurtleBot3 Burger Pro.
 be observed therein that each distance with respect to the target
 converges to the desired circumnavigation radius, its rate con
verges to zero, and each spacing distance between the fore-robot
 and back-robot converges to the desired value. These substantiate
 that the extended control inputs (11) and (18) are capable of
 driving six robots to complete the multi-robot leader–follower
 circumnavigation objective.