Skip to main content

Computer simulation algorithm of gymnastics formation change path based on wireless sensor

Abstract

Today with the rapid development of the information age, the exchange of science and technology has brought closer the closeness of countries, and our country has also begun to conduct in-depth research on WSN. This research mainly discusses the computer simulation algorithm of gymnastics formation change path based on wireless sensor. In this research, an improved Leader-Follower method is designed. In the research of gymnastics formation transformation of mobile nodes in the wireless sensor network environment, the traditional three types of nodes are divided into four categories according to the different formation responsibilities, namely, coordinator, beacon node, master mobile node (Leader), slave mobile node (Follower). After it accurately locates itself with the help of the information of the beacon node, the information should be sent out in the form of broadcast, and the coordinator sends the information to the host computer through the serial port for tracking display. In order to enable the mobile nodes in the network to keep the current gymnastic formation moving toward the target point after completing the gymnastic formation transformation, this paper uses the l-φ closed-loop control method to modify the gymnastic formation in real time. The method based on the received signal strength is selected to realize the positioning of the beacon node to the mobile node, and combined with the positioning engine in the core processor CC2431 of the mobile node, efficient and low-energy wireless positioning can be realized. Multiple mobile nodes coordinate with each other to control communication between each node in a wireless manner, and sense their own heading angle information through geomagnetic sensors, so as to make judgments and adjustments on the maintenance and transformation of the current gymnastics formation. During the formation change, after analysis, it is concluded that the maximum offset of Follower2 from the ideal path in the process of traveling to the desired position in the triangular queue is + 0.28 m. This research effectively realized the computer simulation of autonomous formation.

1 Introduction

Wireless sensor network has the advantages of low cost and simple node layout, while mobile gymnastics has strong initiative. Researching the formation control problem of multi-mobile gymnastics under wireless sensor network is to combine the advantages of wireless sensor networks and multi-mobile gymnastics groups. It makes the multi-mobile gymnastics formation control more effective and reliable, and the efficiency of completing tasks is also higher. Therefore, the research on multi-mobile gymnastics formation control based on WSN deserves to be further deepened.

Whether in the scientific research of universities or the military field, the increase in investment in this area shows that the research boom of wireless sensor networks has entered a new height. At present, WSN technology has been used in various aspects such as warehouse monitoring and expedition and disaster relief. It can also be applied to a wider range of areas according to different environments and tasks, leading researchers to continue in-depth exploration and make research into one brand new stage.

Behera SK proposed a method to analyze 3D signatures captured using Leap motion sensors. He extended the original 2D function from the original signature to 3D and applied a well-known classifier for identification and verification. Although he used the Leap motion interface to create a large data set containing more than 2000 signatures registered by 100 volunteers, his research method is still not new enough [1]. Motion sensor technology and automatic fall detection systems have become reliable and low-cost solutions for falls. Yu S has developed a fall detection system based on hidden Markov model (HMM), which can use a single motion sensor to automatically detect falls for actual home monitoring scenarios. He proposed a new representation for the acceleration signal in HMM to avoid feature engineering and developed a sensor orientation calibration algorithm to solve the problem of sensor misalignment in actual scenes. The HMM classifier is trained to detect falls based on the acceleration signal data collected from the motion sensor. Although he collects data sets from experiments that simulate falls and normal activities, the research process lacks theoretical foundation [2]. Shen C studied the reliability and applicability of active and continuous smart phone authentication using motion sensor behavior in various operating scenarios, and systematically evaluated the uniqueness and durability of the behavior. Although he provides accurate and fine-grained representations of user touch actions, his research process lacks data [3]. Yurtman A proposed a novel non-iterative direction estimation method based on the physical and geometric characteristics of acceleration, angular velocity, and magnetic field vector to estimate the direction of the motion sensor unit. He obtains the orientation of the sensor unit according to the rotation quaternion transformation between the sensor unit frames. He evaluates the proposed method by incorporating it into the activity identification scheme for daily and sports activities. Although his scheme needs to accurately estimate the direction of the sensor unit to achieve the invariance of the direction the unit is worn on the body, the research process lacks experimental data [3]. Signature recognition is to identify the owner of the signature, and verification is the process of finding the authenticity of the signature. Although both are important in the field of forensic science, verification is even more important for banks and credit card companies [4].

Today, with the rapid development of the information age, the exchange of science and technology has brought closeness between countries, and our country has also begun to conduct in-depth research on WSN. This research mainly discusses the computer simulation algorithm of gymnastics formation change path based on wireless sensor. In this research, an improved Leader-Follower method is designed. In the research of gymnastics formation transformation of mobile nodes in the wireless sensor network environment, the traditional three types of nodes are divided into four categories according to the different formation responsibilities, namely, coordinator, beacon node, master mobile node (Leader), and slave mobile node (Follower). After it accurately locates itself with the help of the information of the beacon node, the information should be sent out in the form of broadcast, and the coordinator sends the information to the host computer through the serial port for tracking display. In order to enable the mobile nodes in the network to keep the current gymnastic formation moving toward the target point after completing the gymnastic formation transformation, this paper uses the l-φ closed-loop control method to modify the gymnastic formation in real time. The method based on the received signal strength is selected to realize the positioning of the beacon node to the mobile node, and combined with the positioning engine in the core processor CC2431 of the mobile node, efficient and low-energy wireless positioning can be realized. Multiple mobile nodes coordinate with each other to control communication between each node in a wireless manner, and sense their own heading angle information through geomagnetic sensors, so as to make judgments and adjustments on the maintenance and transformation of the current gymnastics formation.

2 Computer simulation of gymnastics formation change path

2.1 Wireless sensor

Generally, when researchers choose sensor positions, they often only consider the importance of different sensor positions to the action category. When a position is selected, the subsequent position selection will be selected according to the importance of the remaining position to the action category [5, 6]. If each position is not related to each other, then there is no problem with this method. However, in practice, the positions are related to each other, and they may contain the same information. If only the correlation between the sensor position and the action category is considered, the result will be positions that cause serious overlap are selected at the same time, the importance is relatively small but the position and the selected position do not have any overlap are often ignored, so that some action categories that can only be distinguished by the ignored position cannot be well recognized [7]. When a single-turn optical fiber coil with a diameter of D rotates, two light waves are emitted clockwise (CW) and counterclockwise (CCW) from point P of the circular optical path, then:

$$ {T}_{cw}=\frac{\pi D}{V_{cw}}=\frac{\pi D}{V_f-\Omega D}=\frac{\pi D}{\frac{c}{n}-\Omega D} $$
(1)

Among them, c is the speed in vacuum [8]. Assuming that the node has unlimited energy storage capacity, the energy collected by the node in the time period [t0, t0 + ΔT] is:

$$ {N}_h\left({T}_0,{T}_0+\Delta T\right)={\int}_{T_0}^{T_0+\Delta T}{\eta}_e{f}_e(T) dT $$
(2)

Among them, t0 is the starting point of energy harvesting time [9]. Suppose the maximum stored energy of the node is Nmax, then the remaining energy after the energy is collected is:

$$ {N}_H\left({T}_0,{T}_0+\Delta T\right)=\min \left({N}_{left}+{N}_h\left({T}_0,{T}_0+\Delta T\right),{N}_{\mathrm{max}}\right) $$
(3)

In most cases, the motion state of the target in a short period of time will not change much, so the following approximate constant velocity model can be used to describe the target motion [10]:

$$ X(c)=A\left(\Delta {\tau}_c\right)X(c)+L(c) $$
(4)

Among them,

$$ A\left(\Delta {\tau}_k\right)=\left[\begin{array}{c}1\\ {}\Delta {\tau}_k\\ {}0\\ {}0\end{array}\begin{array}{c}\Delta {\tau}_k\\ {}1\\ {}\Delta {\tau}_k\\ {}0\end{array}\begin{array}{c}0\\ {}\Delta {\tau}_k\\ {}1\\ {}\Delta {\tau}_k\end{array}\begin{array}{c}0\\ {}0\\ {}\Delta {\tau}_k\\ {}1\end{array}\right] $$
(5)
$$ Q\left(\Delta {\tau}_k\right)=\frac{\Delta {\tau}_k^3+\Delta {\tau}_k^2}{3} $$
(6)

The prediction of the target by the extended Kalman filter is [11]:

$$ \hat{X}\left(c+1\kern0.5em \left|\kern0.5em c\right.\right)=A\left(\Delta {\tau}_c\right)\hat{X}\left(k\kern0.5em \left|\kern0.5em c\right.\right) $$
(7)
$$ P(k)=A\left(\Delta {\beta}_k\right)P\left(k\left|\kern0.5em k\right.\right)A{\left(\Delta \beta k\right)}^T $$
(8)

The predicted value of the target state at time step k + j is [12]:

$$ \hat{X}\left(k+j\kern0.5em \left|\kern0.5em k\right.\right)={\left[A\left(\Delta {\tau}_k\right)\right]}^j\hat{X}\left(k\kern0.5em \left|\kern0.5em k\right.\right) $$
(9)

The predicted value of the corresponding error covariance is [13]:

$$ {M}^{-}\left(k+j\kern0.5em \left|\kern0.5em k\right.\right)=A\left(\Delta {\tau}_k\right){M}^{+}\left(k+j-1\kern0.5em \left|\kern0.5em k\right.\right)A{\left(\Delta {\tau}_k\right)}^T+Q\left(\Delta {\tau}_k\right) $$
(10)

The Kalman gain is:

$$ R(k)=\frac{P^{-}\left(c+m\kern0.5em \left|\kern0.5em c\right.\right){H}^T\left(c+m\kern0.5em \left|\kern0.5em c\right.\right)}{\left[H\left(c+m\kern0.5em \left|\kern0.5em c\right.\right){P}^{-}\left(c+m\kern0.5em \left|\kern0.5em c\right.\right){H}^T\left(c+m\kern0.5em \left|\kern0.5em c\right.\right)+R\left(c+m\right)\right]} $$
(11)

Among them, R(k) is the Jacobian function of the measurement function at time T [14].

2.2 Mobile node positioning

Ranging methods mainly include TOA method, TDOA method, AOA method, and RSSI algorithm [15, 16]. The AOA method is based on the principle of the angle of arrival of the signal, and the antenna array on the node realizes the angle acquisition. This method has high accuracy, but the node energy consumption is high, the cost is high, and the practical value is low [17]. The RSSI method is based on receiving positioning based on the principle of signal strength indicator converts the loss caused by the signal in the transmission process into the corresponding distance, which requires low hardware, but in the wireless transmission process, the acquisition of the RSSI value is relatively simple and low in cost. A more commonly used method in wireless sensor network positioning [18, 19]. The mobile node identification is shown in Fig. 1.

Fig. 1
figure 1

Mobile node identification

Feature extraction is often based on a certain decision rule used in classification as a criterion to extract features to minimize the classification error under a certain criterion [20].

$$ E\left({r}_x\right)=\frac{\sum_{j=1}^{\left|\overline{X}\right|}{\prod}_{j=1}^{Nf}{K}_{B_i^k\in \kern0.5em {B}_i}\mu {A}_j^k\left({x}_i,j\right)}{\sum_{i=1}^{\left|X\right|}{\prod}_{j=1}^{Nf}{K}_{B_j^k\in \kern0.5em {B}_j}\mu {A}_j^k\left({x}_i,j\right)} $$
(12)

Take xi as a sample of training data set E(rx) [21, 22].

$$ P\left({f}_i,{f}_j\right)=\int \int T\left({f}_i,{f}_j\right)\log \frac{T\left({f}_i,{f}_j\right)}{T\left({f}_i\right)T\left({f}_j\right)}{df}_i{df}_j $$
(13)

Here, p(fi) and p(fj) are the probability distributions of features fi or fj [23].

$$ {L}_m\left(U,V\right)=\sum \limits_{i=1}^c\sum \limits_{j=1}^n{\mu^m}_{ij}{\left\Vert {x}_j-{v}_i\right\Vert}^2 $$
(14)

Here, L(U, V) is the Euclidean distance of the cluster center [24, 25]. μ is called a weighted index, which may affect the clustering effect of FCM. Generally speaking, time series multi-step (long-term) forecasting refers to the forecast of multiple data points in the future [26].

$$ {Y}_m=\sum \limits_{i=1}^c\sum \limits_{j=1}^N{u}_{ij}^m{\left\Vert T-{v}_i\right\Vert}^2+\sum \limits_{i=1}^c\sum \limits_{j=1}^N{O}_{ij}^mT $$
(15)

3 Computer simulation algorithm experiment of gymnastics formation change path

3.1 Positioning realization of the mobile node

  1. (1)

    RSSI positioning

The method based on the received signal strength is selected to realize the positioning of the beacon node to the mobile node. Combined with the positioning engine in the mobile node core processor CC2431, it can achieve efficient and low-energy wireless positioning [27]. The formation algorithm between each mobile node can be processed. Keep a certain formation moving toward the target point, and at the same time, if a command to change the formation is received, the current formation will be adjusted according to its own position until it is adjusted to the desired formation.

In the positioning experiment, it is necessary to select an appropriate value of N to achieve accurate positioning. However, since the value of N is very susceptible to interference from environmental factors, it is relatively difficult to obtain its value. The most common method is to test all networks at the test site. The nodes inside are tested in turn. Although this method is cumbersome, it can select an accurate N value for positioning. Since the value of the propagation coefficient N is greatly affected by the environment, in actual positioning, the parameter N_index is often used instead of the N value to perform positioning calculations to reduce errors caused by environmental interference. For the CC2431 positioning engine, the expected value of parameter A is between 30 and 50, and the value of N_index is between 15 and 25. Finally, the current position is displayed on the host computer, and each packet of data transmitted wirelessly contains the short address of the node itself, so that the node information will not be confused.

  1. (2)

    Realization of mobile node positioning based on RSSI

In wireless sensor networks, beacon nodes provide blind nodes with position coordinates and RSSI values, and the received signal strength is easily affected by environmental factors. Therefore, a reasonable layout of beacon nodes is required to ensure that blind nodes can use the beacon. The information provided by the target node calculates its accurate position. In this subject, 16 beacon nodes are selected in a 20 × 20 m experimental site to locate the mobile nodes, and the distance between adjacent beacon nodes is 5 m. The beacon nodes are all distributed at the outer contour of the area, and no beacon nodes are placed in the movement area of the mobile node. This layout makes it unnecessary for the mobile node to consider obstacle avoidance during the travel process, which simplifies the overall complexity of the system.

After the core processor CC2431 of the mobile node receives the data packet sent by each beacon node, it arranges the RSSI value in it in descending order and selects the top 8 data. If it is not due to external interference or other reasons, if the data information of more than 8 beacon nodes can be obtained, all current beacon nodes will be sorted and processed. At the same time, the program is designed such that the mobile node receives 6 data packets within 300 ms, and then uses the average filtering method to smooth the RSSI value to ensure positioning accuracy.

3.2 Z-Location positioning monitoring

When the preliminary work of positioning is ready, the system can be started for wireless positioning, and the monitoring of the upper computer and analysis of positioning errors can be performed with the help of Z-Location Engine software. You can change the position coordinates of the beacon node in the coordinate system in Reference Node Setup on this interface. After the setting is completed, the beacon node will remember its position, which can be used directly in future experiments. After the software is turned on, you can observe the coordinates (X, Y) of the current mobile node at BlindNodeSetup, compare this coordinate with the actual position coordinate, calculate the error between the true value, and change these two parameters through the A and N input fields the value of will get the new coordinates of the mobile node. Repeat this operation until the values of A and N are changed to values suitable for the current experimental site. This not only finds the appropriate A and N values, but also improves the accuracy of positioning.

3.3 Coordinated control of multiple mobile nodes

The mobile node obtains its own pose information from the beacon node through the communication mechanism, and at the same time, each mobile node exchanges information to realize information sharing. When a node in the system receives the status information of other members in the system, it calculates and processes it, and combines its own perception of the environment to make corresponding behavior plans, so that each member in the system can achieve expectations through collaboration of the goal Multiple mobile nodes coordinate with each other to control communication between each node in a wireless manner, and sense their own heading angle information through the geomagnetic sensor, so as to make judgments and adjustments on the current formation and transformation conditions.

The cooperative control of multiple mobile nodes is mainly embodied in that when the mobile node perceives the external environment information and receives the pose information of other nodes, it influences the behavior of other mobile nodes through its own decision-making and planning. The coordinated control of multiple mobile nodes mainly studies the two-party recognition results

  1. 1)

    In the process of collaborating to complete a certain task, how to make each node maintain a consistent goal;

  2. 2)

    How to avoid conflicts and deadlocks in behavior planning between nodes when running to a consistent target point and what measures should be taken to effectively eliminate conflicts or deadlocks.

The multi-mobile node coordinated control system established with the above two aspects as the core will be able to complete the overall task of the system efficiently with good dynamics, adaptability, and flexibility.

3.4 Formation reference points

In order for the mobile node to have a corresponding adjustment mechanism for the maintenance and transformation of the formation in the process of moving to the target point, it is necessary to select suitable reference points for these mobile nodes. In this way, each mobile node can determine its own position and the position of the reference point. After calculation and processing, reasonable adjustments can be made to maintain the formation and make corresponding changes. In general, there are three methods for selecting reference nodes: taking the navigator as the reference point, taking the adjacent node as the reference point, and taking the geometric center as the reference point.

The selection method based on the navigator as a reference point can provide reference for other nodes without resorting to a large amount of communication. The communication is simple and the control is convenient. This method is used to realize the formation maintenance and formation transformation of the mobile nodes in the wireless sensor network. Taking the navigator as a reference, each mobile node adjusts its position autonomously to achieve the purpose of maintaining and changing the formation.

3.5 Improved Leader-Follower method design

This paper chooses the Leader-Follower method to study the formation transformation and formation maintenance of mobile nodes. This paper designs an improved Leader-Follower method. In this research, the traditional three types of nodes are divided into four types according to the different formation responsibilities in the research work of the formation transformation of mobile nodes in the wireless sensor network environment, namely, the coordinator, beacon node, master mobile node (Leader), and slave mobile node (Follower). These four types of nodes have a clear division of labor in the network.

Since the functions of the beacon node and the coordinator have not changed, this article focuses on the analysis of the functions of the master mobile node and the slave mobile node. First of all, for the master mobile node, as the leader of other nodes in the network, its fundamental task is to provide references for its followers.

After it accurately locates itself with the help of the information of the beacon node, the information should be sent out in the form of broadcast, and the coordinator sends the information to the host computer through the serial port for tracking display. The pose information sent by the master mobile node to the slave mobile node in real time includes three types of information, namely, the current position coordinates of the master mobile node, the current speed, and the current formation to be maintained or formed.

When the mobile node is traveling to the target point, it receives the formation change command from the coordinator. This command is a point-to-point communication between the coordinator and the master mobile node, and the slave mobile nodes in the network will not receive the command. The slave mobile node can obtain the related transformation of the formation from the pose information sent to it in real time by the master mobile node, because the slave mobile node needs to make real-time adjustments to the path during the formation transformation. After a series of positioning calculations, the mobile node transmits its position information to the coordinator in a point-to-point manner. At the same time, it needs to receive the leader’s pose information in real time, calculate its distance and angle, and extract the information transmitted by the main mobile node. Determine whether the current formation information is consistent with the formation at the previous moment. If it is inconsistent, the formation needs to be changed. According to the formation information, the corresponding expectation matrix is selected as the target to adjust its position.

3.6 Formation maintenance of mobile nodes

In order to enable the mobile nodes in the network to maintain the current formation and move toward the target point after completing the formation change, but in the process of travel, due to the interference of various factors in the road conditions and the environment, one or the other will inevitably appear. Thousands of mobile nodes are left behind. Therefore, this paper adopts the l-φ closed-loop control method to correct the formation in real time, and maintain the formation of the mobile node group during the walking process, so that the current follower will be between the current leader and the leader. Adjust the distance and included angle to the desired value l and φ. As long as the follower successfully receives the pose information sent by the leader, the l-φ controller can maintain a certain distance and angle with the leader, so that the formation can be maintained. The slave mobile node compares its own pose with the expected value and realizes the correction of the formation through the feedback of the current position and angle error, which ensures the stability of the formation. Closed loop control is shown in Fig. 2.

Fig. 2
figure 2

Closed loop control (http://alturl.com/59r27)

4 Results and discussion

4.1 Positioning analysis based on RSSI

N is the signal propagation index. As the distance increases, the signal strength will decrease; A is the RSSI value when the beacon node is 1 meter away from the mobile node. The value is often fixed, and the unit is dBm. In the host computer monitoring software used in the positioning experiment, the N value and A value can be filled in by the user [28]. Therefore, appropriate parameters should be selected according to the environmental characteristics of the test area to achieve the purpose of minimizing the positioning error. Table 1 shows the data of the correspondence relationship between N and N_index.

Table 1 Correspondence between N and N_index

In the multi-mobile formation software and hardware positioning platform designed in this paper, the mobile formation with the CC2341 chip as the blind node needs to use the beacon node closest to itself for positioning. Generally, when 3–8 beacon nodes are received, positioning signal can minimize the error of the positioning result, which not only avoids channel redundancy caused by too many signals, but also prevents too few beacon nodes from receiving positioning information as reference information for mobile nodes. The sensor node control is shown in Fig. 3.

Fig. 3
figure 3

Sensor node control (http://alturl.com/cfbzi)

4.2 Simulation and analysis of formation transformation under ideal conditions

Assuming that the gymnastics formation is 5 gymnastics forming a regular triangle, the coordinates of each gymnastics are R, (0, 0), R2 (− 2.6, 1.5), R (− 2.6, − 1.5), R (− 5.2, 3), R (− 5.2, − 3), the specific transformation rules for the upper half of the formation are shown in Table 2, and the transformation rules for the lower half are the same as the upper half.

Table 2 Specific transformation rules for the upper half of the formation

The simulation of transforming the column into a triangular queue is shown in Fig. 4. In the simulation, a fixed pattern is set for each formation, and angles and distances are used to describe the formation, that is, the angle formed by the first column of the follower and the leader relative to the forward direction in the matrix expression and the second column of the follower and distance between the pilots, these parameters can be changed in the program to adjust the formation. Before the simulation, the parameters should be set, and the number of mobile nodes should be set to 3. At the beginning of the operation, the mobile nodes will keep the column forward to the target point.

Fig. 4
figure 4

Simulation of transforming a column into a triangular queue

The error of each mobile node’s trajectory relative to the ideal path is shown in Fig. 5. After the mobile node receives the command to transform into a triangular queue, it immediately adjusts its position. Leader makes a corresponding deceleration operation, reducing the 0.3 step length to 0.1 step length to advance, Follower1 and Follower2 start to accelerate, and finally adjust to a triangular team. In the simulation, the triangular queue is set as follows: Follower1 and Follower2 are both 6 m away from Leader, the angle between Follower1 and Leader relative to the forward direction is 45°, and the angle between Follower1 and Leader relative to the forward direction is − 45°. During the formation change process, the analysis shows that the maximum offset of Follower2 relative to the ideal path in the process of traveling to the desired position in the triangular queue is + 0.28 m, the maximum offset of Follower1 is + 0.15 m, and the leader’s offset is within + 0.26 m. It can be seen that the offset error of Follower2 is the largest relative to other nodes.

Fig. 5
figure 5

The error of each mobile node’s trajectory relative to the ideal path

By analyzing the factors that affect the positioning effect, optimizing the corresponding parameters can reduce the positioning error and improve the positioning accuracy. The positioning test is carried out in different environments, and the positioning effect will be different. Therefore, in the experimental test, you can flexibly modify the A value and N value in the RSSI positioning principle formula in the host computer monitoring interface according to the changes in the environment, so as to achieve more good positioning effect. The results of the ranging error are shown in Table 3.

Table 3 Comparison of ranging error results

The simulation of transforming a triangle to a horizontal team is shown in Fig. 6. The triangle queue in this simulation is set as follows: Follower1 and Follower2 are both 6 m away from the Leader, and the angle between Follower1 and Leader with respect to the forward direction is 30°, and the angle between Follower1 and Leader is 30°. The angle of the advancing direction is − 30°. After receiving the formation transformation command, each mobile node adjusts the position of the distance and angle in the horizontal expectation matrix. This article sets the parameters in the horizontal expectation matrix as follows: Follower1 and Follower2 are both 5 m away from the Leader, and the distance between Follower1 and Leader relative to the forward direction The included angle is 90°, and the included angle between Follower1 and Leader relative to the forward direction is − 90°.

Fig. 6
figure 6

Simulation of transforming from triangle to horizontal team

4.3 Leader-Follower analysis

The error comparison between the improved Leader-Follower and the traditional Leader-Follower is shown in Table 4. The data in Table 4 shows that the average error rate of the improved Leader-Follower method (1%) is 0.094, the average error rate of the improved Leader-Follower method (0.1%) is 0.007%, and the average error rate of the traditional Leader-Follower method is 3.520 %. It can be seen that the traditional Leader-Follower method can greatly reduce the average error after improving the accuracy, and because the Leader-Follower error is uncontrollable, there is still a large error after increasing the number of iterations, which is not suitable for low-error situations, so in terms of capacity limiting efficiency It is significantly higher than the traditional Leader-Follower method.

Table 4 Error comparison between the improved Leader-Follower and the traditional Leader-Follower

In this comparative study, in terms of formation transformation, the convergence time of formation transformation using the algorithm of this paper is 5 s, the convergence time ratio of formation transformation is 5.4%, and the formation expansion transformation is performed, so the formation structure difference before and after the transformation is 0.67. All gymnastics have advanced a total of 32.6 m during the formation change process; the used algorithm formation change convergence time is 7.55 s, and the formation change convergence time ratio is 8.1%. The formation change changes the original formation structure. The team before and after the change The degree of difference in form structure is 2.51, and all gymnastics formations have advanced 46.2 m in total during the transformation process. The formation change time is shown in Table 5.

Table 5 Formation time

The result of accumulating the total utility cost of the whole simulation process is shown in Table 6. It can be verified that the task modeling method proposed in this research is less effective than traditional methods.

Table 6 The result of adding up the total utility cost

When the number of mobile nodes is set to 4, the simulation of transforming from a wedge queue to a square queue is shown in Fig. 7. The initial formation is a wedge, and its parameter setting is: the distance between Follower1 and Leader is 4 m. After receiving the formation change command, adjust the position. The parameters of the square queue are set as follows: the distance between Follower1 and Leader is 5 m, the angle relative to the forward direction is 90°, the distance between Follower2 and Leader is 7.07 m, and the angle is 45°. The distance between Follower3 and Leader is 5 m, and the included angle is 0°.

Fig. 7
figure 7

When the number of mobile nodes is 4, the wedge queue is transformed into a square queue

The distance to the Leader is 5 m, and the error in the transformation process is shown in Fig. 8. The maximum deviation between the formation change trajectory of Follower1 and the ideal path is + 0.14 m, the maximum deviation of Follower2 is + 0.19 m, the maximum deviation of Follower3 is + 0.25 m, and the maximum deviation of Leader is + 0.21 m. Compared with the transformation from the column to the triangular queue, the average deviation is also reduced. This is because the adjustment rate of each node is significantly smaller than that of the column to the triangular queue from the wedge to the square, so the adjustment of the position of each mobile node is very small, which reduces the deviation.

Fig. 8
figure 8

The distance between the leader and the leader is 5 m, and the error in the transformation process

5 Conclusion

Today, with the rapid development of the information age, the exchange of science and technology has brought closeness between countries, and our country has also begun to conduct in-depth research on WSN. This research mainly discusses the computer simulation algorithm of gymnastics formation change path based on wireless sensor. In this research, an improved Leader-Follower method is designed. In the research of gymnastics formation transformation of mobile nodes in the wireless sensor network environment, the traditional three types of nodes are divided into four categories according to the different formation responsibilities, namely, coordinator, beacon node, master mobile node (Leader), and slave mobile node (Follower). After it accurately locates itself with the help of the information of the beacon node, the information should be sent out in the form of broadcast, and the coordinator sends the information to the host computer through the serial port for tracking display. In order to enable the mobile nodes in the network to keep the current gymnastic formation moving toward the target point after completing the gymnastic formation transformation, this paper uses the l-φ closed-loop control method to modify the gymnastic formation in real time. The method based on the received signal strength is selected to realize the positioning of the beacon node to the mobile node, and combined with the positioning engine in the core processor CC2431 of the mobile node, efficient and low-energy wireless positioning can be realized. Multiple mobile nodes coordinate with each other to control communication between each node in a wireless manner, and sense their own heading angle information through geomagnetic sensors, so as to make judgments and adjustments on the maintenance and transformation of the current gymnastics formation. This research effectively realized the computer simulation of autonomous formation.

Availability of data and materials

Data sharing does not apply to this article because no data set was generated or analyzed during the current research period

Abbreviations

WSN:

Wireless sensor network

3D:

Three-dimensional

HMM:

Hidden Markov model

AOA:

Angle of arrival

RSSI:

Received signal strength indicator

References

  1. S.K. Behera, D.P. Dogra, P.P. Roy, Analysis of 3D signatures recorded using leap motion sensor. Multimedia Tools and Applications 77(11), 14029–14054 (2018)

    Article  Google Scholar 

  2. S. Yu, H. Chen, R.A. Brown, Hidden Markov model-based fall detection with motion sensor orientation calibration: a case for real-life home monitoring. IEEE Journal of Biomedical and Health Informatics 22(6), 1847–1853 (2018)

    Article  Google Scholar 

  3. C. Shen, Y. Li, Y. Chen, et al., Performance analysis of multi-motion sensor behavior for active smartphone authentication. IEEE Transactions on Information Forensics & Security 13(1), 48–62 (2018)

    Article  Google Scholar 

  4. A. Yurtman, B. Barshan, Novel noniterative orientation estimation for wearable motion sensor units acquiring accelerometer, gyroscope, and magnetometer measurements. IEEE Transactions on Instrumentation and Measurement 69(6), 3206–3215 (2020)

    Article  Google Scholar 

  5. M. Hirata, R. Watanabe, Y. Koyano, et al., Using a motion sensor-equipped smartphone to facilitate CT-guided puncture. Cardiovascular & Interventional Radiology 40(4), 1–7 (2017)

    Article  Google Scholar 

  6. J.K. Min, E.J. Cheon, J.M. Kim, et al., Comparison of the 6-DOF motion sensor and stain gauge data for ice load estimation on IBRV ARAON. Journal of the Society of Naval Architects of Korea 53(6), 529–535 (2016)

    Article  Google Scholar 

  7. I.I. Duma, S. Giurgiu, Circadian activity and nest use of Dryomys nitedula as revealed by infrared motion sensor cameras. Folia Zoologica 61(1), 49–53 (2018)

    Article  Google Scholar 

  8. L Huang, W Xu, C Zhao, YL Zhang, J Hao, Multifunctional water drop energy harvesting and human motion sensor based on flexible dual-mode nanogenerator incorporated with polymer nanotubes. ACS Applied Materials And Interfaces 12(21), 24030–24038 (2020)

  9. T.A. Donaldson, Inline calibration of motion sensor. Journal of Chinese Pharmaceutical ences 48(23), 2022–2025 (2016)

    Google Scholar 

  10. G. Marin, F. Dominio, P. Zanuttigh, Hand gesture recognition with jointly calibrated Leap Motion and depth sensor. Multimedia Tools and Applications 75(22), 14991–15015 (2016)

    Article  Google Scholar 

  11. H. Jin, Q. Chen, Z. Chen, et al., Multi-LeapMotion sensor based demonstration for robotic refine tabletop object manipulation task. Caai Transactions on Intelligence Technology 1(1), 104–113 (2016)

    Article  Google Scholar 

  12. Z. Wei, W. Zhang, W. Liu, et al., Attitude theory and experimental research of micro-aircraft based on MEMS sensor. Piezoelectrics & Acoustooptics 40(4), 516–520 (2018)

    Google Scholar 

  13. D. Laurijssen, S. Truijen, W. Saeys, et al., An Ultrasonic six degrees-of-freedom pose estimation sensor. IEEE Sensors Journal 17(1), 151–159 (2016)

    Article  Google Scholar 

  14. D. Korpi, J. Tamminen, M. Turunen, et al., Full-duplex mobile device - pushing the limits. IEEE Communications Magazine 54(9), 80–87 (2016)

    Article  Google Scholar 

  15. L. Zhou, Mobile device-to-device video distribution: theory and application. ACM Transactions on Multimedia Computing Communications and Applications 12(3), 1–23 (2016)

    Article  Google Scholar 

  16. E. Noei, M.D. Syer, Y. Zou, et al., A study of the relation of mobile device attributes with the user-perceived quality of Android apps. Empirical Software Engineering 22(6), 3088–3116 (2017)

    Article  Google Scholar 

  17. K.F. Chiang, H.H. Wang, Nurses’ experiences of using a smart mobile device application to assist home care for patients with chronic disease: a qualitative study. Journal of Clinical Nursing 25(13-14), 2008–2017 (2016)

    Article  MathSciNet  Google Scholar 

  18. J. Jiang, G. Han, H. Guo, et al., Geographic multipath routing based on geospatial division in duty-cycled underwater wireless sensor networks. Journal of Network & Computer Applications 59(1), 4–13 (2016)

    Article  Google Scholar 

  19. Z. Xu, L. Chen, C. Chen, et al., Joint clustering and routing design for reliable and efficient data collection in large-scale wireless sensor networks. IEEE Internet of Things Journal 3(4), 520–532 (2016)

    Article  Google Scholar 

  20. S. Kumari, X. Li, F. Wu, et al., A user friendly mutual authentication and key agreement scheme for wireless sensor networks using chaotic maps. Future Generation Computer Systems 63(10), 56–75 (2016)

    Article  Google Scholar 

  21. Y. Zou, G. Wang, Intercept behavior analysis of industrial wireless sensor networks in the presence of eavesdropping attack. IEEE Transactions on Industrial Informatics 12(2), 780–787 (2016)

    Article  Google Scholar 

  22. D. Ebrahimi, C. Assi, On the interaction between scheduling and compressive data gathering in wireless sensor networks. IEEE Transactions on Wireless Communications 15(4), 2845–2858 (2016)

    Article  Google Scholar 

  23. Z. Hong, R. Wang, X. Li, A clustering-tree topology control based on the energy forecast for heterogeneous wireless sensor networks. IEEE/CAA Journal of Automatica Sinica 3(01), 70–79 (2016)

    MathSciNet  Google Scholar 

  24. J.M. Pak, C.K. Ahn, P. Shi, et al., Distributed hybrid particle/FIR filtering for mitigating NLOS effects in TOA-based localization using wireless sensor networks. IEEE Transactions on Industrial Electronics 64(6), 5182–5191 (2017)

    Article  Google Scholar 

  25. F. Deniz, H. Bagci, I. Korpeoglu, et al., An adaptive, energy-aware and distributed fault-tolerant topology-control algorithm for heterogeneous wireless sensor networks. Ad Hoc Networks 44(7), 104–117 (2016)

    Article  Google Scholar 

  26. W. Liu, X. Zhou, S. Durrani, et al., Energy harvesting wireless sensor networks: delay analysis considering energy costs of sensing and transmission. IEEE Transactions on Wireless Communications 15(7), 4635–4650 (2016)

    Google Scholar 

  27. W. Elsayed, M. Elhoseny, S. Sabbeh, A. Riad, Self-maintenance model for wireless sensor networks. Computers & Electrical Engineering 70, 799–812 (2018)

    Article  Google Scholar 

  28. M. Elhoseny, Multi-object detection and tracking (MODT) machine learning model for real-time video surveillance. Circuits, Systems, and Signal Processing 39, 611–630 (2019)

Download references

About the Authors

Bingxin Chen was born in Kaifeng, Henan Province. China, 1988. She received a master's degree from the School of physical Education of Hunan normal University and worked at Hunan normal University. her research interests include physical education, sports management, sports training, and sports medicine.

E-mail: chenbingxin15@163.com

Lifei Kuang, born in 1979, graduated from Hunan normal University School of physical Education, Master's degree, Lecturer, Gymnastics International referee, research field: physical Education and training

E-mail: lifekuang1@163.com

Wei He, born in Ningxiang, Hunan Province, 1986, China, obtained a master's degree in physical Education College of Hunan normal University, and now works in physical Education College of Changsha normal University.

E-mail: ccsbb@163.com

Funding

The author(s) received no financial support for the research, authorship, and/or publication of this article.

Author information

Authors and Affiliations

Authors

Contributions

Bingxin Chen: writing—editing. Lifei Kuang: data analysis. Wei He: sampling method. The authors read and approved the final manuscript.

Corresponding authors

Correspondence to Bingxin Chen or Lifei Kuang.

Ethics declarations

Ethics approval and consent to participate

This article is ethical, and this research has been agreed.

Consent for publication

The picture materials quoted in this article have no copyright requirements, and the source has been indicated.

Competing interests

The authors declare that they have no competing interests

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Chen, B., Kuang, L. & He, W. Computer simulation algorithm of gymnastics formation change path based on wireless sensor. EURASIP J. Adv. Signal Process. 2021, 53 (2021). https://doi.org/10.1186/s13634-021-00766-y

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s13634-021-00766-y

Keywords