Introduction

The widespread application of resistor networks has played a crucial role in shaping today’s developed society. In community detection, resistor network has been used to study the number of communities in a network1 and the relationship between structure and function in flow networks2. In biology, resistor networks have been used to study high-density loops in leaf veins3 and to investigate the dynamics of a material’s pore space by interpreting metal accumulation as resistance4. In data networks, researchers have studied the relationship between current flow in a resistor network and data flow in a communication network by comparing Ohm’s law and Little’s theorem5. In the field of sociology, the opinion heterogeneity and their statistical properties under non-consensus conditions have been studied by analogy with the resistance distance in a resistor network6. In the study of damaged plates, the accuracy of damaged plate imaging has been enhanced by modeling the resistor network based on the resistance characteristics obtained through calculation and simulation7. Additionally, resistor networks have also played an important role in the research of ecological network modeling8 and power-grid networks9,10,11. With the deepening of applied research, the research of resistor networks becomes more and more important. One of the most common problems with resistor network is the calculation of equivalent resistance. However, recent studies have shown that building a mathematical equation model of resistor network can help derive its equivalent resistance formula12,13,14,15,16,17,18,19. In order to improve the computational efficiency of the equivalent resistance, our focus should be on optimizing and rewriting the nearly perfect formula for equivalent resistance. This is an important and challenging task.

In the past few years, many results are achieved in the study of resistor networks. For example, the researches on Laplacian matrix method20,21,22,23,24 of resistor network, corner-to-corner resistance25, infinite network26, and finite network27,28,29,30,31,32,33,34,35,36,37. Since 2013, Tan38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54 creatively proposed the Recursive Transformation (RT) method, which is of great significance in calculating the potential and equivalent resistance of the resistor network. The RT methods includes the RT-V method based on node voltage and the RT-I method based on branch current. Tan uses a different approach than the Laplacian matrix method to solve the resistor network calculation problem, which is simpler and more accurate than the previous methods. As a result, Tan’s RT method has become the foundation for large majority of studies of resistor networks. The RT method uses a modified tridiagonal Toeplitz matrix and the eigenvalues of the matrix in the calculation. Currently, tridiagonal matrices55,56,57,58,59 are extensively researched. Furthermore, the equivalent resistance in graph theory is called the resistance distance60,61,62.

Planning optimal paths63,64 is consistently a challenging task. To this day, path planning is utilized across various fields such as autonomous driving65, ship route navigation66, UAV path optimization and control67, and robot path planning68. When planning a path on geometric shapes, the minimum distance calculation method based on Euclidean distance fails in this case, making the optimal path planning more complicated. In recent years, as researchers conduct in-depth studies of path planning on geometric shapes, related results continue to emerge. For example, Kulathunga69 and Mazaheri70 respectively study path planning in 3D environment, UĞUR studies path planning on cuboids71, and Xue studies path planning on cylindrical storage tanks72. These researches fully demonstrate the importance of path planning on geometric shapes. In this paper, a path planning algorithm on the cylindrical environment is proposed, which is capable of avoiding local optima, achieving obstacle avoidance and optimal path planning.

The structure of this article is as follows: In section “Re-derivation of equivalent resistance formula”, the re-derived equivalent resistance formula and related proofs are given, several examples of special cases are shown, and made a detailed analysis between the equivalent resistance formula derived in this paper and the formula given by Tan. Finally, a path planning algorithm on the cylinder is designed using the potential formula. In section “Discussion”, the significance and contribution of this study are discussed. In section “Equivalent resistance formula of Tan”, we introduced the equivalent resistance formula derived by Tan.

Fig. 1
figure 1

A cylindrical resistor network model of \(m\times n\) (\(n+1\) and m are the number of vertical lines and horizontal lines, respectively) with an OA zero resistor axis, where the left and right edge vertical resistances are \(r_1\) and \(r_2\), respectively, the resistance between two nodes on each horizontal line is r, and the resistance between two nodes on each vertical line is \(r_0\).

Fig. 2
figure 2

Segment of the resistor network with current directions and parameters taken from Fig. 1.

Re-derivation of equivalent resistance formula

In this section, we first present the formula for the equivalent resistance, then derive it in detail in sections “Rederive the equivalent resistance formula using the discrete cosine transform”, “Horadam sequence and Chebyshev polynomials”, “Express the solution of the matrix equations in terms of Chebyshev polynomials”. In section “Rederive the equivalent resistance formula using the discrete cosine transform”, we left-multiplied Eq. (9) by DCT-II, and the resulting Eq. (23) is more suitable for solution. In section “Horadam sequence and Chebyshev polynomials”, we used Chebyshev polynomials to process Eq. (23), and the resulting Eq. (30) helps to derive the final formula. Subsequently, several special cases are discussed and the efficiency of the original and rewritten formulas are compared. Finally, the application of potential functions in path planning is demonstrated.

Equivalent resistance formula expressed by Chebyshev polynomials

In this subsection, the re-derived equivalent resistance formula of the cylindrical resistor network in Fig. 1 is given.

Let current J flow in from \(d_{1}(x_{1}, y_{1})\) and flow out in \(d_{2}(x_{2}, y_{2})\), then the exact equivalent resistance formula between \(d_{1}(x_{1}, y_{1})\) and \(d_{2}(x_{2}, y_{2})\) in the \(m \times n\) cylindrical resistor network is

$$\begin{aligned} {R_{{{m}} \times {{n}}}}({d_1},{d_2}) = \frac{{{r_0}}}{m} \times \sum \limits _{i = 2}^m {\frac{{r_{1,1}^{(i)}C_{y_{1},i}^2 - 2r_{1,2}^{(i)}{C_{y_{1},i}}{C_{y_{2},i}} + r_{2,2}^{(i)}C_{y_{2},i}^2}}{{(1 - \cos {\theta _i})\Psi _n^{(i)}}}}, \end{aligned}$$
(1)

where

$$\begin{aligned} & \Psi _{{n}}^{(i)} = B_{n+1}^{(i)} + \bigg (\frac{r_1}{r_0} + \frac{r_2}{r_0} - 2\bigg )B_{n}^{(i)} + \bigg (\frac{r_2}{r_0} - 1\bigg )\bigg (\frac{r_1}{r_0} - 1\bigg )B_{n - 1}^{(i)}, \end{aligned}$$
(2)
$$\begin{aligned} & \mathrm{{r}}_{k,s}^{(i)} = \partial _{1,{x_k}}^{(i)}\partial _{2,n - {x_s}}^{(i)}, \end{aligned}$$
(3)
$$\begin{aligned} & {C_{q,i}} = \sin \frac{{q(i - 1)\pi }}{m}, \quad q = {y_1},{y_2}, \end{aligned}$$
(4)
$$\begin{aligned} & \partial _{u,x}^{(i)} =\Delta B_{x}^{(i)} + ({h_u} - 1)\Delta B_{x-1}^{(i)},\quad \Delta B_k^{(i)} = B_{k + 1}^{(i)} - B_k^{(i)}, \end{aligned}$$
(5)
$$\begin{aligned} \begin{aligned}{}&B_k^{(i)}(\cosh \varphi _{i}) = \frac{{\sinh (k{\varphi _i})}}{{\sinh {\varphi _i}}},~~\cosh \varphi _{i}=\frac{t_{i}}{2},\\&k = {x_1} + 1,{x_1},{x_1} - 1,n - {x_1} + 1,n - {x_1},n - {x_1} - 1,{x_2} + 1,{x_2},{x_2} - 1,n - {x_2} + 1,n - {x_2},n - {x_2} - 1,i = 2,3,...,m, \end{aligned} \end{aligned}$$
(6)
$$\begin{aligned} & t_{i}=2+\frac{2r}{r_{0}}-\frac{2r}{r_{0}}\cos \theta _{i},\ \theta _{i} = (i-1)\pi /m, \end{aligned}$$
(7)

Equation (1) applies to all nodes \((x_{q}, y_{p})\) where \(0\le {x_q} < n\) and \(0\le {y_p} < m\). Its input and output points can be any two points. \(r_1\), \(r_2\), \(r_0\) and r represent the longitudinal resistances of the left boundary, right boundary, the remaining longitudinal resistance and all the lateral resistances in the network, respectively, as shown in Fig. 1.

Rederive the equivalent resistance formula using the discrete cosine transform

In this subsection, we will show how to use the well-known discrete cosine transform of the third kind(DCT-III) to process matrix.

In order to obtain a novel formula for calculating equivalent resistance, we use the matrix \(\textbf{A}_m\), \(\textbf{A}_m\) is a corrected tridiagonal Toeplitz matrix given by Tan12

$$\begin{aligned} \textbf{A}_{m}= \left( \begin{array}{cccccc} 2+h & -h & 0& \cdots & 0\\ -h & 2(1+h) & -h & \ddots & \vdots \\ 0 & \ddots & \ddots & \ddots & 0 \\ \vdots & \ddots & -h & 2(1+h) & -h\\ 0 & \cdots & 0 & -h & 2+h \end{array} \right) _{m\times m}, \end{aligned}$$
(8)

where \(h = r/r_0\).

Tan12 used Kirchhoff’s law and RT-I method to eliminate the horizontal current shown in Fig. 2, and established a recursive matrix equation model, which is given as follows

$$\begin{aligned} \textbf{I}_{k+1} = \textbf{A}_{m}\textbf{I}_{k} - \textbf{I}_{k-1} - J \textbf{H}_{y}\delta _{k,x}, \end{aligned}$$
(9)

the \(\textbf{A}_{m}\) is a corrected tridiagonal Toeplitz matrix in Eq. (8), J means current,  \(\delta _{k,x}\) is defined as follow \(\delta _{k,x}={\left\{ \begin{array}{ll}1,& x=k,\\ 0,& x\ne k,\end{array}\right. }\) \(\textbf{I}_{k}\) and \(\textbf{H}_{y}\) are column vectors of \(m \times 1\), defined as follows

$$\begin{aligned} \textbf{I}_{k} = \bigg [I^{(1)}_{k},I^{(2)}_{k},...,I^{(m)}_{k}\bigg ] ^{T}, ~(0 \le k \le n), \\ {(\textbf{H}_{z})_{i}} = h{( - 1)^z}({\delta _{i,{y_z}}} - {\delta _{i,{y_z} + 1}}), ~~z = 1,2. \end{aligned}$$

Subsequently, we consider the boundary case, we can obtain the following equations when we use Kirchhoff’s law for the left and right boundaries

$$\begin{aligned} & \begin{array}{l} {I_1} = [{A_m} - (2 - {h_1})E]{I_0},\\ {h_1}{I_0} + {I_2} = {A_m}{I_1}, \end{array} \end{aligned}$$
(10)
$$\begin{aligned} & \begin{array}{l} {I_{n - 1}} = [{A_m} - (2 - {h_2})E]{I_n},\\ {h_2}{I_n} + {I_{n - 2}} = {A_m}{I_{n - 1}}. \end{array} \end{aligned}$$
(11)

where \(h_1=r_1/r_0,~h_2=r_2/r_0\).

We will perform the matrix transformation. Let

$$\begin{aligned} \mathbb {C}_m^{III}=\left( \sqrt{\frac{2}{m}}d_i\cos \frac{(2k-1)(i-1)\pi }{2m} \right) _{k,i=1}^m, \end{aligned}$$
(12)

where \({d_i} = \min \{ 1,\frac{{\sqrt{2} }}{2}-1 + i\}\).

Obviously, the matrix \(\mathbb {C}_m^{III}\)73,74,75,76 we use is an orthogonal matrix, which is the famous third kind of discrete cosine transform, and its transpose and inverse are both \(\mathbb {C}_m^{II}\), which has the following property

$$\begin{aligned} (\mathbb {C}_m^{III})^{-1}=(\mathbb {C}_m^{III})^T=\mathbb {C}_m^{II}, \end{aligned}$$
(13)

where the \(\mathbb {C}_m^{II}\) is the famous second kind of discrete cosine transform.

We ortho-diagonalize \(A_{m}\), the following equation is obtained by means of matrix multiplication and a series of complex algebraic operations

$$\begin{aligned} \bigg (\mathbb {C}_m^{III}\bigg )^{-1}\textbf{A}_{m}\mathbb {C}_m^{III}=\mathbb {C}_m^{II}\textbf{A}_{m}\mathbb {C}_m^{III}=\textrm{diag}(t_1,t_2,\ldots ,t_m), \end{aligned}$$
(14)

i.e.,

$$\begin{aligned} \textbf{A}_{m} = \mathbb {C}_{{m}}^{III}\textrm{diag}({t_1},{t_2},...,{t_m}){\bigg (\mathbb {C}_{{m}}^{III}\bigg )^{ - 1}}\mathrm{{ = }}\mathbb {C}_{{m}}^{III}\textrm{diag}({t_1},{t_2},...,{t_m})\mathbb {C}_{{m}}^{II}, \end{aligned}$$
(15)

where

$$\begin{aligned} t_i=2+2h-2h\cos \frac{(i-1)\pi }{m},~~i=1,2,\ldots ,m. \end{aligned}$$
(16)

From Eq. (14), it is evident that the matrix \(\textbf{A}_{m}\) is similar to \(\textrm{diag}({t_1},{t_2},...,{t_m})\), and thus \(t_i\) is the eigenvalue of \(\textbf{A}_{m}\).

By left-multiplying Eq. (14) by \(\mathbb {C}_{{m}}^{III}\) the following equation is obtained

$$\begin{aligned} {\mathbf{{A}}}_m\mathbb {C}_m^{III} =\mathbb {C}_m^{III}\mathrm{{diag}}({t_1},{t_2}, \ldots ,{t_m}), \end{aligned}$$
(17)

i.e.,

$$\begin{aligned} {\mathbf{{A}}_m}\bigg ({\zeta ^{(1)}},{\zeta ^{(2)}}, \cdots ,{\zeta ^{(m)}}\bigg ) = \bigg ({\zeta ^{(1)}},{\zeta ^{(2)}}, \cdots ,{\zeta ^{(m)}}\bigg )\mathrm{{diag}}({t_1},{t_2}, \ldots ,{t_m}), \end{aligned}$$
(18)

where \(\zeta ^{(i)}=\bigg (\zeta ^{(i)}_1,\ldots ,\zeta ^{(i)}_m\bigg )^{T}\),

$$\begin{aligned} \zeta ^{(i)}_k=\sqrt{\frac{2}{m}}d_i\cos \frac{(2k-1)(i-1)\pi }{2m},~~k=1,2,\ldots ,m,~i=1,2,\ldots , m, \end{aligned}$$
(19)

and \({d_i} = \min \{ 1,\frac{{\sqrt{2} }}{2}-1 + i\}\).

Equation (18) can be written as follows

$$\begin{aligned} \mathbf{{A}}_m\zeta ^{(i)}= t_i\zeta ^{(i)},~i=1,2,\ldots , m. \end{aligned}$$
(20)

According to Eq. (20), we get the eigenvector \(\zeta ^{(i)}=\bigg (\zeta ^{(i)}_1,\ldots ,\zeta ^{(i)}_m\bigg )^{T}\) corresponding to \(t_{i}\).

Let

$$\begin{aligned} {W}_{k}=\mathbb {C}_m^{II}{I}_{k}, \ \end{aligned}$$
(21)

i.e.,

$$\begin{aligned} {I_k} = \mathbb {C}_\mathrm{{m}}^{III}{W_k}, \end{aligned}$$
(22)

\({W}_{k}\) is a column vector of \(m\times 1\),

$$\begin{aligned} \textbf{W}_{k} = \bigg [W^{(1)}_{k},W^{(2)}_{k},...,W^{(m)}_{k}\bigg ]^{T},~~(0 \le k \le n). \end{aligned}$$

Equations (9), (10) and (11) are multiplied by \(\mathbb {C}_m^{II}\) on the left, and then combine with Eq. (21) to obtain the following equations

$$\begin{aligned} & W_{k + 1}^{(i)} = {t_i}W_k^{(i)} - W_{k - 1}^{(i)} - Jh{\delta _{k,x}}{\xi _{x_z,i}}, \end{aligned}$$
(23)
$$\begin{aligned} & \begin{array}{l} W_1^{(i)} = ({t_i} + {h_1} - 2)W_0^{(i)},\\ {h_1}W_0^{(i)} + W_2^{(i)} = {t_i}W_1^{(i)}, \end{array} \end{aligned}$$
(24)
$$\begin{aligned} & \begin{array}{l} W_{n - 1}^{(i)} = ({t_i} + {h_2} - 2)W_n^{(i)},\\ {h_2}W_n^{(i)} + W_{n - 2}^{(i)} = {t_i}W_{n - 1}^{(i)}, \end{array} \end{aligned}$$
(25)

where \({\xi _{x_z,i}} = 2{( - 1)^z}\sin \bigg (\frac{{(i - 1)\pi }}{{2m}}\bigg )\sin \bigg (\frac{{{y_z}(i - 1)\pi }}{m}\bigg )\), \(z = 1,2\).

Horadam sequence and Chebyshev polynomials

In the following, we express the explicit formulation of the Horadam sequence77 by Chebyshev polynomials78 of the second kind.

The Horadam sequence is defined by the following recurrence relation

$$\begin{aligned} H_k=dH_{k-1}-qH_{k-2},~~H_0=M,~~H_1=Z, \end{aligned}$$
(26)

where \(k\in \textbf{N},~~k\ge 2,~~M,Z,d,q\in \textbf{C}\),  \(\textbf{N}\) is the set of all natural numbers and \(\textbf{C}\) is the set of all complex numbers.

Subsequently, we rewrite Eq. (26) with Chebyshev polynomials of the second kind

$$\begin{aligned} H_{k} =\bigg (\sqrt{q}\bigg )^k\left( \frac{Z}{\sqrt{q}}U_{k-1}\left( \frac{d}{2\sqrt{q}}\right) - MU_{k-2}\left( \frac{d}{2\sqrt{q}}\right) \right) , \end{aligned}$$
(27)

where

$$\begin{aligned} U_{k}(\cos L) = \frac{\sin ((k+1)L)}{\sin L},~~\cos L=\frac{d}{2\sqrt{q}},~~L\in \textbf{C}. \end{aligned}$$
(28)

The homogeneous equation of Eq. (23) is given by

$$\begin{aligned} W_{k + 1}^{(i)} = {t_i}W_k^{(i)} - W_{k - 1}^{(i)}, \end{aligned}$$
(29)

let \(H_0=W_c\), \(H_1=W_{c+1}\), \(d=t_i\) and \(q=1\) in Eq. (26), based on Eqs. (27) and (28), the following equation is obtained

$$\begin{aligned} W_k^{(i)} = W_{{c} + 1}^{(i)}B_{k - {c}}^{(i)} - W_{{c}}^{(i)}B_{k - {c} - 1}^{(i)}, \end{aligned}$$
(30)

where

$$\begin{aligned} B_{k}(\cos L) = \frac{\sin (kL)}{\sin L},~~\cos L=\frac{t_i}{2}, \end{aligned}$$
(31)

the Chebyshev polynomials of the second kind is re-described by hyperbolic functions, then Eq. (31) is transformed into

$$\begin{aligned} B_{k}(\cosh L) = \frac{\sinh (kL)}{\sinh L},~~\cosh L=\frac{t_i}{2},~~L\in \textbf{R}, \end{aligned}$$
(32)

where \(\textbf{R}\) is the set of all real numbers.

Express the solution of the matrix equations in terms of Chebyshev polynomials

In this subsection, we will complete the final derivation of the equivalent resistance formula.

Taking into account the disturbance caused by the input \(d_1(x_1,y_1)\) and output \(d_2(x_2,y_2)\) points of current, and based on Eqs. (23) and (30), the following piecewise formula is obtained

$$\begin{aligned} & W_k^{(i)} = W_1^{(i)}B_k^{(i)} - W_0^{(i)}B_{k - 1}^{(i)},~0 \le k \le {x_1}, \end{aligned}$$
(33)
$$\begin{aligned} & W_{{x_1} + 1}^{(i)} = {t_i}W_{{x_1}}^{(i)} - W_{{x_1} - 1}^{(i)} - Jh{\xi _{{x_1},i}}, \end{aligned}$$
(34)
$$\begin{aligned} & W_k^{(i)} = W_{{x_1} + 1}^{(i)}B_{k - {x_1}}^{(i)} - W_{{x_1}}^{(i)}B_{k - {x_1} - 1}^{(i)},~{x_1} \le k \le {x_2}, \end{aligned}$$
(35)
$$\begin{aligned} & W_{{x_2} + 1}^{(i)} = {t_i}W_{{x_2}}^{(i)} - W_{{x_2} - 1}^{(i)} - Jh{\xi _{{x_2},i}}, \end{aligned}$$
(36)
$$\begin{aligned} & W_k^{(i)} = W_{{x_2} + 1}^{(i)}B_{k - {x_2}}^{(i)} - W_{{x_2}}^{(i)}B_{k - {x_2} - 1}^{(i)},~{x_2} \le k \le n, \end{aligned}$$
(37)

by combining Eqs. (24) and (25) with Eqs. (33) to (37), the following expression is obtained

$$\begin{aligned} & W_{{x_1}}^{(i)} = \frac{{r_{1,1}^{(i)}{\xi _{x_1,i}} + r_{1,2}^{(i)}{\xi _{x_2,i}}}}{{({t_i} - 2)\psi _n^{(i)}}}hJ,(i > 1), \end{aligned}$$
(38)
$$\begin{aligned} & W_{{x_\mathrm{{2}}}}^{(i)} = \frac{{r_{1,\mathrm{{2}}}^{(i)}{\xi _{x_1,i}} + r_{\mathrm{{2}},2}^{(i)}{\xi _{x_2,i}}}}{{({t_i} - 2)\psi _n^{(i)}}}hJ,(i > 1), \end{aligned}$$
(39)

where \({\xi _{x_z,i}} = 2{( - 1)^z}\sin (\frac{{(i - 1)\pi }}{{2m}})\sin (\frac{{{y_z}(i - 1)\pi }}{m})\), \(z = 1,2\), \(\psi _n^{(i)}\), \(r_{k,s}^{(i)}\), \(\partial _{u,x}^{(i)}\) and \(t_{i}\) are given in Eqs. (2), (3), (5) and (16), respectively.

According to the cyclic property shown in Fig. 1, when \(i = 1\), we obtain

$$\begin{aligned} \sum \limits _{i = 1}^m {U_k^{(j)}} = 0, \end{aligned}$$
(40)

combining Eq. (21), the following equation is obtained

$$\begin{aligned} W_k^{(1)} = \frac{\sqrt{2} }{{ 2 }}\sum \limits _{i = 1}^m {I_k^{(i)}} = \frac{\sqrt{2}}{{2{r_0} }}\sum \limits _{i = 1}^m {U_k^{(i)}} = 0. \end{aligned}$$
(41)

Based on Eqs. (22), (38), (39) and (41) we can get the following equations

$$\begin{aligned} & \sum \limits _{i = 1}^{{\mathrm{{y}}_1}} {I_{{x_1}}^{(i)}} = \frac{1}{m}\sum \limits _{i = 2}^m {W_{{x_1}}^{(i)}} \frac{{\sin ({y_1}(i - 1)\pi /m)}}{{\sin ((i - 1)\pi /2m)}}, \end{aligned}$$
(42)
$$\begin{aligned} & \sum \limits _{i = 1}^{{\mathrm{{y}}_\mathrm{{2}}}} {I_{{x_\mathrm{{2}}}}^{(i)}} = \frac{1}{m}\sum \limits _{i = 2}^m {W_{{x_\mathrm{{2}}}}^{(i)}} \frac{{\sin ({y_\mathrm{{2}}}(i - 1)\pi /m)}}{{\sin ((i - 1)\pi /2m)}}. \end{aligned}$$
(43)

According to Ohm’s law, the principle formula of the equivalent resistance between \(d_{1}(x_{1}, y_{1})\) and \(d_{2}(x_{2}, y_{2})\) is obtained

$$\begin{aligned} R_{m\times n}(d_{1},d_{2}) = \frac{r_{0}}{J}\bigg (\sum _{i=1}^{y_{2}}I^{(i)}_{x_{2}} -\sum _{i=1}^{y_{1}}I^{(i)}_{x_{1}}\bigg ), \end{aligned}$$
(44)

where \(I_{x}^{(i)}\) is expressed as the current in the vertical direction.

Finally, based on Eqs. (42), (43) and (44), the equivalent resistance formula (1) is obtained.

Display the equivalent resistance formula for special cases

In the previous subsection, we obtained the exact equivalent resistance formula (1) for cylindrical resistor network. In this subsection, we will present formulas under several specific conditions. The equivalent resistance 3D graphs under different cases are given. To enhance readability and facilitate comparison between different cases, this subsection presents a table at the outset summarizing all the variables in the special cases as shown in Table 1. Among them, r, \(r_0\), \(r_1\) and \(r_2\) represent the resistance of the lateral, longitudinal, left boundary, and right boundary segments, respectively, as shown in Fig. 1.

Table 1 Variable changes in special cases.

Special 1 and 2 illustrate the equivalent resistance diagrams when the resistance on one boundary is zero and when the resistance on both boundaries is zero, respectively. In contrast, Special 3 and 4 show the equivalent resistance diagrams when the resistance in the horizontal segment is \(r=20\) and the resistance in the vertical segment is \(r_0=20\), respectively.

Special 1 In an arbitrary \(m \times n\) network, given that the input point of the current is \(d_{1}(x_{1},y_{1})\) and the fixed output point is \(d_{2}(0,0)=O\), the exact formula for the equivalent resistance between \(d_{1}\) and \(d_{2}\) is

$$\begin{aligned} {R_{{{m}} \times {{n}}}}({d_1},{d_2}) = \frac{{{r_0}}}{m} \times \sum \limits _{i = 2}^m {\frac{{r_{{{1}},{{1}}}^{(i)}C_{{y_{{1}}},i}^2}}{{(1 - \cos {\theta _i})\psi _n^{(i)}}}}, \end{aligned}$$
(45)

where \(\psi _{n}^{(i)}, r_{k,s}^{(i)},C_{q,i}\) and \(\theta _i\) are defined in Eqs. (2), (3), (4) and (7), respectively.

In the exact formula, we assume that \(m=n=100\), \(x_{2}=0\), \(y_{2}=0\), \(r=r_{0}=r_{1}=1\), and \(r_{2}=0\). The formula can be derived using the above equation

$$\begin{aligned} {R_{\mathrm{{100}} \times \mathrm{{100}}}}({d_1},O)= & \frac{\mathrm{{1}}}{{\mathrm{{100}}}} \times \sum \limits _{i = 2}^{\mathrm{{100}}} {\frac{{r_{\mathrm{{1}},\mathrm{{1}}}^{(i)}C_{{y_\mathrm{{1}}},i}^2}}{{(1 - \cos {\theta _i})\psi _{\mathrm{{100}}}^{(i)}}}}, \end{aligned}$$
(46)

where

$$\begin{aligned} & r_{\mathrm{{1}},\mathrm{{1}}}^{(i)}\mathrm{{ = }}\bigg (B_{{x_1} + 1}^{(i)} - B_{{x_\mathrm{{1}}}}^{(i)}\bigg )\bigg (B_{101 - {x_1}}^{(i)} - 2B_{100 - {x_1}}^{(i)} + B_{99 - {x_1}}^{(i)}\bigg ), \end{aligned}$$
(47)
$$\begin{aligned} & \psi _{100}^{(i)}\mathrm{{ = }}B_{100}^{(i)} - B_{99}^{(i)},~{C_{{y_\mathrm{{1}}},i}}\mathrm{{ = }}\sin \frac{{{y_1}(i - 1)\pi }}{{100}}, \nonumber \\ & k = {x_\mathrm{{1}}},{x_\mathrm{{1}}} + 1,101 - {x_\mathrm{{1}}},100 - {x_\mathrm{{1}}},99 - {x_\mathrm{{1}}},100,99,i = 1,2,...,100, \end{aligned}$$
(48)
$$\begin{aligned} & B_k^{(i)}(\cosh \varphi _{i}) = \frac{{\sinh (k{\varphi _{i}})}}{{\sinh {\varphi _{i}}}},~\cosh \varphi _{i}=\frac{t_{i}}{2},~{t_i} = 2 + \frac{{2r}}{{{r_0}}} - \frac{{2r}}{{{r_0}}}\cos \theta _i,~{\theta _i} = \frac{{(i - 1)\pi }}{m}. \end{aligned}$$
(49)

Use Matlab to get a 3D graph about the equivalent resistance between \(d_1(x_1,y_1)\) and \(d_2(0,0)\), as shown in Fig. 3.

Fig. 3
figure 3

Three-dimensional graph for \(R_{100\times 100}(d_{1},O)\) in Eq. (46).

Fig. 4
figure 4

Three-dimensional graph for \(R_{100\times 100}(O,d_{2})\) in Eq. (51).

Special 2 Subsequently, when we fix the resistance of the left and right boundaries to \(0 (r_{1}=r_{2}=0)\), and allow the current to be input at point \(d_{1}(0,0)\) and output at point \(d_{2}(x_{2},y_{2})\), the exact equivalent resistance formula between \(d_{1}\) and \(d_{2}\) is as follows

$$\begin{aligned} {R_{{{m}} \times {{n}}}}({d_1},{d_2}) = \frac{{{r_0}}}{m} \times \sum \limits _{i = 2}^m {\frac{{r_{2,2}^{(i)}C_{{y_2},i}^2}}{{(1 - \cos {\theta _i})\psi _n^{(i)}}}}, \end{aligned}$$
(50)

where \(\psi _{n}^{(i)}, r_{k,s}^{(i)},C_{q,i}\) and \(\theta _i\) are defined in Eqs. (2), (3), (4) and (7), respectively.

When \(m=n=100\), \(x_{1}=0\), \(y_{1}=0\), \(r=r_{0}=1\), and \(r_{1}=r_{2}=0\), the following formula is obtained

$$\begin{aligned} {R_{\mathrm{{100}} \times \mathrm{{100}}}}(O,{d_2}) = \frac{\mathrm{{1}}}{{\mathrm{{100}}}} \times \sum \limits _{i = 2}^{\mathrm{{100}}} {\frac{{r_{2,2}^{(i)}C_{{y_2},i}^2}}{{(1 - \cos {\theta _i})\psi _{\mathrm{{100}}}^{(i)}}}}, \end{aligned}$$
(51)

where

$$\begin{aligned} & r_{2,2}^{(i)}\mathrm{{ = }}\bigg (B_{{x_2} + 1}^{(i)} - 2B_{{x_2}}^{(i)} + B_{{x_2} - 1}^{(i)}\bigg )\bigg (B_{101 - {x_2}}^{(i)} - 2B_{100 - {x_2}}^{(i)} + B_{99 - {x_2}}^{(i)}\bigg ), \end{aligned}$$
(52)
$$\begin{aligned} & \psi _{100}^{(i)}\mathrm{{ = }}B_{100}^{(i)} - 2B_{99}^{(i)} + B_{98}^{(i)},~~{C_{{y_2},i}}\mathrm{{ = }}\sin \frac{{{y_2}(i - 1)\pi }}{{100}}, \end{aligned}$$
(53)
$$\begin{aligned} k = {x_2} - 1,{x_\mathrm{{2}}},{x_\mathrm{{2}}} + 1,101 - {x_\mathrm{{2}}},100 - {x_\mathrm{{2}}},99 - {x_\mathrm{{2}}},i = 1,2,...,100, \end{aligned}$$

\(B_k^{(i)}(\cosh \varphi _{i})\) and \(\theta _i\) are the same as Eq. (49).

Use Matlab to get a 3D graph about the equivalent resistance between \(d_1(0,0)\) and \(d_2(x_2,y_2)\), as shown in Fig. 4.

Special 3 When the input point of the current is at \(d_{1}(0,0)\) and the output point is at \(d_{2}(x_{2},y_{2})\), the exact equivalent resistance formula between \(d_{1}\) and \(d_{2}\) can be written as follows

$$\begin{aligned} {R_{{{m}} \times {{n}}}}({d_1},{d_2}) = \frac{{{r_0}}}{m} \times \sum \limits _{i = 2}^m {\frac{{r_{2,2}^{(i)}C_{{y_2},i}^2}}{{(1 - \cos {\theta _i})\psi _n^{(i)}}}}, \end{aligned}$$
(54)

where \(\psi _{n}^{(i)}, r_{k,s}^{(i)},C_{q,i}\) and \(\theta _i\) are defined in Eqs. (2), (3), (4) and (7), respectively.

When \(m=n=100\), \(x_{1}=0\), \(y_{1}=0\), \(r_{0}=r_{1}=r_{2}=1\), \(r=20\), substituting into the above Eq. (54) yields

$$\begin{aligned} {R_{\mathrm{{100}} \times \mathrm{{100}}}}(O,{d_2}) = \frac{\mathrm{{1}}}{{\mathrm{{100}}}} \times \sum \limits _{i = 2}^{\mathrm{{100}}} {\frac{{r_{2,2}^{(i)}C_{{y_2},i}^2}}{{(1 - \cos {\theta _i})\psi _{\mathrm{{100}}}^{(i)}}}}, \end{aligned}$$
(55)

where

$$\begin{aligned} & r_{2,2}^{(i)}\mathrm{{ = }}({B_{{x_2} + 1}} - {B_{{x_2}}})({B_{101 - {x_2}}} - {B_{100 - {x_2}}}), \end{aligned}$$
(56)
$$\begin{aligned} & \psi _{100}^{(i)}\mathrm{{ = }}B_{100}^{(i)},~~{C_{{y_2},i}}\mathrm{{ = }}\sin \frac{{{y_2}(i - 1)\pi }}{{100}}, \end{aligned}$$
(57)
$$\begin{aligned} & B_k^{(i)}(\cosh \varphi _{i}) = \frac{{\sinh (k{\varphi _{i}})}}{{\sinh {\varphi _{i}}}},~\cosh \varphi _{i}=\frac{t_{i}}{2},~{t_i} = 2 + \frac{{2r}}{{{r_0}}} - \frac{{2r}}{{{r_0}}}\cos \theta _i,~{\theta _i} = \frac{{(i - 1)\pi }}{m}, \nonumber \\ & k = {x_\mathrm{{2}}},{x_\mathrm{{2}}} + 1,101 - {x_\mathrm{{2}}},100 - {x_\mathrm{{2}}},\mathrm{{100}},i = 1,2,...,100. \end{aligned}$$
(58)

Use Matlab to get a 3D graph about the equivalent resistance between \(d_1(0,0)\) and \(d_2(x_2,y_2)\), as shown in Fig. 5.

Fig. 5
figure 5

Three-dimensional graph for \(R_{100\times 100}(O,d_{2})\) in Eq. (55).

Fig. 6
figure 6

Three-dimensional graph for \(R_{100\times 100}(O,d_{2})\) in Eq. (60).

Special 4 Subsequently, let’s change the vertical resistance value to \(r_{0}=20\). The input point for the current is the fixed point \(d_{1}(0,0)=O\), and the output point is any point \(d_{2}(x_{2},y_{2})\). The exact equivalent resistance formula between \(d_{1}\) and \(d_{2}\) can be written as

$$\begin{aligned} {R_{{{m}} \times {{n}}}}({d_\mathrm{{1}}},{d_2}) = \frac{{{r_0}}}{m} \times \sum \limits _{i = 2}^m {\frac{{r_{2,2}^{(i)}C_{{y_2},i}^2}}{{(1 - \cos {\theta _i})\psi _n^{(i)}}}}, \end{aligned}$$
(59)

where \(\psi _{n}^{(i)}, r_{k,s}^{(i)},C_{q,i}\) and \(\theta _i\) are defined in Eqs. (2), (3), (4) and (7), respectively.

When \(m=n=100\), \(x_{1}=0\), \(y_{1}=0\), \(r=r_{1}=r_{2}=1\), and \(r_{0}=20\), the above formula can be written as follows

$$\begin{aligned} {R_{\mathrm{{100}} \times \mathrm{{100}}}}(O,{d_2}) = \frac{\mathrm{{1}}}{\mathrm{{5}}} \times \sum \limits _{i = 2}^{100} {\frac{{r_{2,2}^{(i)}C_{{y_2},i}^2}}{{(1 - \cos {\theta _i})\psi _{100}^{(i)}}}}, \end{aligned}$$
(60)

where

$$\begin{aligned} & r_{2,2}^{(i)}\mathrm{{ = }}\bigg (B_{{x_2} + 1}^{(i)} - \frac{{\mathrm{{39}}}}{{\mathrm{{20}}}}B_{{x_2}}^{(i)} + \frac{{19}}{{20}}B_{{x_2} - 1}^{(i)}\bigg )\bigg (B_{101 - {x_2}}^{(i)} - \frac{{\mathrm{{39}}}}{{\mathrm{{20}}}}B_{100 - {x_2}}^{(i)} + \frac{{19}}{{20}}B_{99 - {x_2}}^{(i)}\bigg ), \end{aligned}$$
(61)
$$\begin{aligned} & \psi _{100}^{(i)}\mathrm{{ = }}B_{100}^{(i)} - \frac{{19}}{{10}}B_{99}^{(i)} + \frac{{361}}{{400}}B_{98}^{(i)},~~{C_{{y_2},i}}\mathrm{{ = }}\sin \frac{{{y_2}(i - 1)\pi }}{{100}},\nonumber \\ & k = {x_\mathrm{{2}}} - 1,{x_\mathrm{{2}}},{x_\mathrm{{2}}} + 1,101 - {x_\mathrm{{2}}},100 - {x_\mathrm{{2}}},99 - {x_\mathrm{{2}}},98,99,\mathrm{{100}},i = 1,2,...,100, \end{aligned}$$
(62)

\(B_k^{(i)}(\cosh \varphi _{i})\) and \(\theta _i\) are the same as Eq. (58).

Use Matlab to get a 3D graph about the equivalent resistance between \(d_1(0,0)\) and \(d_2(x_2,y_2)\), as shown in Fig. 6.

Comparison of computational efficiency

In this subsection, we provide some examples to compare two different methods of calculating equivalent resistance in papers, and use time to compare the computational efficiency of the two methods. We let the current input at \(d_{1}(x_{1},y_{1})\)and output at \(d_{2}(x_{2},y_{2})\) in an \(m\times n\) cylindrical resistor network with a zero resistor axis. In the comparison, The computational efficiency of the equivalent resistance formula is shown, where the CPU processing time of the original formula and the rewritten formula is represented by \(t_{1}\) and \(t_{2}\), respectively. Formula (1) is the new formula, and formula (68) is the original formula.

These experiments are done with MATLAB (R2021a) on an AMD Ryzen 7 5800H laptop with a 3.20 GHz CPU. In the table below, the computation time is in seconds, “\(m\times n\)” represents the size of the resistor network, and “−” indicates that the computation time exceeded 1600 seconds or that MATLAB ran out of memory.

Fig. 7
figure 7

Comparison of the calculation efficiency of formulas (1) and (68) when \({r}/{r_0}={r_1}/{r_0}={r_2}/{r_0}=1\).

Fig. 8
figure 8

Comparison of the calculation efficiency of formulas (1) and (68) when \({r}/{r_0}={r_1}/{r_0}={r_2}/{r_0}=1\).

Fig. 9
figure 9

Comparison of the computational efficiency between Eqs. (1) and (68) as m increases, with \({r}/{r_0}={r_1}/{r_0}={r_2}/{r_0}=1\) and \(n=100\).

Fig. 10
figure 10

Comparison of the computational efficiency between Eqs. (1) and (68) as n increases, with \({r}/{r_0}={r_1}/{r_0}={r_2}/{r_0}=0.1\) and \(m=100\).

Fig. 11
figure 11

Comparison of the computational efficiency of formula (1) and formula (68) at scale of \(200\times 200\) when \({r}/{r_0}={r_1}/{r_0}={r_2}/{r_0}\) are 0.001, 0.01, 0.1, 1 and 10, respectively. (No data means the numerical calculation is invalid).

Fig. 12
figure 12

Comparison of the calculation efficiency of formulas (1) and (68) when \({r}/{r_0}={r_1}/{r_0}={r_2}/{r_0}=0.01\). (No data means the numerical calculation is invalid).

Remark 1

It can be observed from Fig. 7 that when the number of nodes in the resistor network is the same i.e., the result of \(m\times n\) is constant, as m increases, the time required for calculation also increases. Nevertheless, regardless of these changes, the computational efficiency of Eq. (1) remains consistently higher than that of Eq. (68). As shown in Fig. 8, when the size of the resistor network is less than \(300 \times 300\), the computation time is quite small, making it the most suitable for numerical calculations. The computational efficiency of Eq. (1) improves significantly with increasing network size. Let’s fix n, the calculation time increases significantly after m is greater than 1000, as shown in Fig. 9. In particular, the calculation time of Eq. (68) increases more obviously. Similarly, Fig. 10 shows the efficiency comparison when m is fixed and n is increased, when n is greater than 500, the calculation time increases significantly. Figures 9 and 10 clearly demonstrate the superiority of Eq. (1) when handling large-scale networks.

Remark 2

Referring to Fig. 11, it is evident that the electrical resistivity significantly influences the calculation of the equivalent resistance. When the resistivity ratio increases to 10, it becomes unsuitable for numerical calculation. As shown in Fig. 12, the computation time increases by a factor of 8 for every 4-fold increase in the number of nodes in the resistor network, and the original formula cannot handle large-scale resistor networks within the specified time, whereas the improved formula can.

Application to robot path planning

In this subsection, a path planning method on the cylindrical environment is designed based on the potential formula of the cylindrical given by Tan79.

The formula for the cylindrical potential is as follows

$$\begin{aligned} \frac{{{U_{m \times n}}(x,y)}}{J} = \frac{{{x_1} - {x_\tau }}}{m}r + \frac{{{r_0}}}{{2m}}\sum \limits _{i = 1}^{m - 1} {\frac{{\beta _{{x_1} \vee x}^{(i)}C_{{y_1} - y}^{(i)} - \beta _{{x_2} \vee x}^{(i)}C_{{y_2} - y}^{(i)}}}{{(1 - \cos {\theta _i})G_n^{(i)}}}}, \end{aligned}$$
(63)

where

$$\begin{aligned} & \beta _{x \vee {x_s}}^{(i)} = \left\{ {\begin{array}{*{20}{c}} {\beta _{x,{x_s}}^{(i)} = \alpha _{1,x}^{(i)}\alpha _{2,n - {x_s}}^{(i)},\mathrm{{if }}~x \le {x_s},}\\ {\beta _{{x_s},x}^{(i)} = \alpha _{1,{x_s}}^{(i)}\alpha _{2,n - x}^{(i)},\mathrm{{if }}~x \ge {x_s},} \end{array}} \right. \end{aligned}$$
(64)
$$\begin{aligned} & G_n^{(i)} = F_{n + 1}^{(i)} + ({r_1/r_0} + {r_2/r_0} - 2)F_n^{(i)} + ({r_2/r_0} - 1)({r_1/r_0} - 1)F_{n - 1}^{(i)}, \end{aligned}$$
(65)
$$\begin{aligned} & C_{{y_k} - y}^{(i)} = \cos ({y_k} - y){\theta _i},~{\theta _i} = 2i\pi /m, \end{aligned}$$
(66)
$$\begin{aligned} & {x_\tau } = \{ {x_1},0 \le x \le {x_1}\} \cup \{ x,{x_1} \le x \le {x_2}\} \cup \{ {x_2},{x_2} \le x \le n\}, \end{aligned}$$
(67)

\(F_n^{(i)}\) and \(\alpha _{u,x}^{(i)}\) are given in Eqs. (69) and (70), respectively.

This algorithm is a heuristic method that completes path planning by simulating potential decline. Compared to the traditional method, the path planning algorithm of potential formula is more suitable for path planning on cylindrical, particularly because it can accommodate the bidirectional reachability characteristic of paths on cylindrical. The algorithm is described as follows

Algorithm:
figure a

Path planning algorithm

The following is a simulation experiment conducted on the \(10\times 10\) cylindrical environment with obstacles shown in Fig. 13.

Let \(x_1=2, ~y_1=2, ~x_2=6, ~y_2=5, ~r=1, ~r_0=1, ~r_1=1, ~r_2=1\) and \(J=1\). The potential discrete distribution view can be obtained according to formula (63), as shown in Fig. 14.

Fig. 13
figure 13

\(10 \times 10\) cylindrical environment with obstacles.

Fig. 14
figure 14

Obstacle-free potential distribution diagram.

When obstacles are present in the environment, a fixed increment is added to the potential value at the locations of the obstacles. This adjustment allows the robot to effectively navigate around obstacles and achieve obstacle avoidance during path finding, ensuring optimal path planning from high potential to low potential. Path planning in a node-weighted potential distribution diagram is shown in Figs. 15, and 16 presents the robot path planning corresponding to the real cylindrical environment.

Fig. 15
figure 15

Path planning in a node-weighted potential distribution diagram.

Fig. 16
figure 16

Robot path planning in \(10 \times 10\) cylindrical environment.

Discussion

This paper utilizes DCT-III and Chebyshev polynomials to derive an equivalent resistance formula. On the one hand, the properties of DCT-III simplify the derivation process. On the other hand, the optimal approximation properties of Chebyshev polynomials enhance the efficiency of the new formula. Based on the efficiency comparison in section “Discussion”, it is clear that the equivalent resistance Eq. (1) is more computationally efficient than Eq. (68). The computing efficiency is increased by 5 times at the same scale. This is especially noticeable as the scale of the resistor network increases. A detailed comparison of the two formulas shows that Eq. (69) requires exponential operations, significantly slowing down the calculation speed. Currently, the equivalent resistance formula has been used to impact damage localization and mode identification of carbon fiber reinforced plastic composites panels7. However, as the area of the composite material plate increases, the computational cost of the original equivalent resistance formula also increases significantly. The equivalent resistance formula proposed in this paper is very suitable for locating the damage position of large materials due to its high calculation efficiency.

This is an innovative attempt to perform path planning by potential formula. The process of finding a path is to find a path from the input point to the output point on the circuit. The process of finding a path is to find the path from the input point to the output point on the circuit. This search is mainly carried out using the numerical results of the potential. In addition, Since most storage tanks are cylindrical, the path planning algorithm designed in this paper is very suitable for the needs of wall-climbing robots to inspect cylindrical storage tanks. The natural downward trend of the potential enables the robot to quickly approach the target, and adding a fixed increment at the obstacle allows the robot to effectively avoid the obstacle. The numerical simulation experiments in section “Application to robot path planning” also demonstrate the effectiveness of the algorithm.

Equivalent resistance formula of Tan

In 2017, Tan12 proposed a non-regular \(m \times n\) cylindrical resistor network, as shown in Fig. 1. The equivalent resistance between \(d_1(x_1, y_1)\) and \(d_2(x_2, y_2)\) in the \(m \times n\) cylindrical resistor network is as follows

$$\begin{aligned} {R_{m\times n}(d_{1},d_{2})} = \frac{r_{0}}{m} \times \sum ^{m}_{i=2}\frac{\beta ^{(i)}_{1,1}S^{2}_{1,i}-2\beta ^{(i)}_{1,2}S_{1,i}S_{2,i}+\beta ^{(i)}_{2,2}S^{2}_{2,i}}{(1-\cos (\theta _{i}))G^{(i)}_{n}}, \end{aligned}$$
(68)

where

$$\begin{aligned} F^{(i)}_{k} = (\lambda ^{k}_{i}-\bar{\lambda }^{k}_{i})/(\lambda _{i}-\bar{\lambda }_{i}),\end{aligned}$$
(69)
$$\begin{aligned} \Delta F^{(i)}_{k}=F^{(i)}_{k+1}-F^{(i)}_{k}, \nonumber \\ \begin{aligned} \alpha ^{(i)}_{u,x}&=\Delta F^{(i)}_{x}+(h_{u}-1)\Delta F^{(i)}_{x-1},\\&\beta ^{(i)}_{k,s}=\alpha ^{(i)}_{1,x_{k}}\alpha ^{(i)}_{2,n-x_{s}}, \end{aligned} \end{aligned}$$
(70)
$$\begin{aligned} G^{(i)}_{n}=F^{(i)}_{n+1}+(h_{1}+h_{2}-2)F^{(i)}_{n}+(h_{2}-1)(h_{1}-1)F^{(i)}_{n-1},\end{aligned}$$
(71)
$$\begin{aligned} h=r/r_{0},\quad h_{1}=r_{1}/r_{0},\quad h_{2}=r_{2}/r_{0}, \nonumber \\ S_{k,i} = \sin (y_{k}\theta _{i}),\ \theta _{i} = (i-1)\pi /m, \end{aligned}$$
(72)
$$\begin{aligned} \begin{aligned}{}&\lambda _{i} = 1+h-h\cos \theta _{i}+\sqrt{(1+h-h\cos \theta _{i})^{2} - 1},\\&\bar{\lambda }_{i} = 1+h-h\cos \theta _{i}-\sqrt{(1+h-h\cos \theta _{i})^{2} - 1}, \end{aligned} \end{aligned}$$
(73)

Conclusions

In this article, we modified the equivalent resistance formula for the \(m\times n\) cylindrical resistor network with a zero resistor axis based on the RT-I method. In the derivation process, the third kind of discrete cosine transform is used to process the equation model. For the equivalent resistance formula, we use Chebyshev polynomials to express it. Subsequently, the formula of equivalent resistance in special cases is displayed using 3D views, and the computational efficiency of the original formula and the modified formula is compared. Additionally, a cylindrical environment path planning algorithm based on the potential formula is proposed. Finally, the application scenarios of the new formula and the path planning algorithm are discussed separately.