An anti-interference method for wireless communication in industrial applications

By using directional antennas and improved moth optimization algorithms in industrial wireless communication networks, router layout parameters and channel adjustments are optimized to solve the problems of signal interference and computing resource consumption, and achieve more efficient wireless communication coverage.

CN117596602BActive Publication Date: 2024-08-27ZHEJIANG KABAL ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311860711.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-31
Publication Date
2024-08-27
Estimated Expiration
2043-12-31

AI Technical Summary

Technical Problem

In industrial wireless communication networks, multiple routers share the same channel, resulting in serious signal crosstalk. The existing technology has a large amount of calculations and the number of iterations of the moth optimization algorithm, making it difficult to effectively solve the signal interference and coverage optimization problems.

Method used

A directional antenna wireless router is used for coverage. Through the improved moth optimization algorithm and coverage judgment method, the router layout parameters are optimized, repeated coverage areas are reduced, and channel parameters are adjusted to minimize interference.

Benefits of technology

It effectively avoids signal interference caused by repeated coverage of routers, reduces the computing resource requirements for coverage judgment, increases the iteration speed, and achieves a more efficient wireless communication network layout.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117596602B
    Figure CN117596602B
Patent Text Reader

Abstract

The present application discloses an anti-interference method for wireless communication in industrial applications, which specifically includes: step S1, obtaining the terminal location information of the industrial wireless communication network and establishing an industrial wireless communication network model; step S2, constructing an objective function according to preset constraints, with the goal of maximizing coverage and minimizing interference, and obtaining the optimal router layout parameters according to the moth optimization algorithm; step S3, arranging the routers according to the optimal router layout parameters, and adjusting the channel parameters of each router according to the interference channel conditions of each router position. The anti-interference method of the present application can reduce the repeated coverage areas between routers and avoid the channel interference phenomenon caused by the presence of multiple wireless router signals in the same area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of wireless communications, and in particular to an anti-interference method and storage medium for wireless communications in industrial applications. Background Art

[0002] For industrial wireless communication networks, there are often a large number of terminals distributed in different locations that need to be covered by wireless networks. In order to cover a large number of terminals, a large number of wireless routers are usually required. When there are many wireless router signals nearby, the probability of multiple routers sharing the same channel is greatly increased, further generating signal crosstalk, seriously interfering with normal communication. Routers in existing networks generally use omnidirectional antennas, which are more likely to cause duplicate coverage problems. At the same time, the existing method of determining whether there is coverage has a large amount of calculation, and the existing moth optimization algorithm has the problem of requiring a large number of iterations. Summary of the invention

[0003] The purpose of this application is to provide an anti-interference method and storage medium for wireless communication in industrial applications, so as to better solve the problems in the background technology.

[0004] To achieve the above objectives, this application provides the following technical solutions:

[0005] An anti-interference method for wireless communication in industrial applications, characterized by comprising the following steps:

[0006] Step S1, obtaining the terminal location information of the industrial wireless communication network and establishing an industrial wireless communication network model; wherein the industrial wireless communication network is composed of a terminal, a router, and a gateway, and the router is a directional antenna wireless router, which covers the terminal in a directional manner through a wireless connection and connects to the gateway through a wired connection;

[0007] Step S2, according to the preset constraints, with the goal of maximizing coverage and minimizing interference, construct an objective function, and obtain the optimal router layout parameters according to the moth optimization algorithm;

[0008] Step S3, arranging the routers according to the optimal router arrangement parameters, and adjusting the channel parameters of each router according to the interference channel conditions at each router location;

[0009] In step S1, the number of terminals is defined as n, and the position of the i-th terminal Ti is represented as (xi, yi), where the terminal number i = 1, 2, ..., n; the number of deployed routers is defined as m, and the position of the j-th router Rj is represented as (xj, yj), the coverage radius is represented as rj, the coverage angle of the antenna is represented as aj, the deflection angle of the antenna is represented as bj, and the coverage area is represented as cj, where the router number j = 1, 2, ..., m;

[0010] The steps of the moth optimization algorithm in step S2 are:

[0011] Step S2.1: Initialize parameters, namely, the number of moth populations N, the maximum number of iterations Tmax, and the spatial dimension d. The spatial dimension d is the dimension of the router layout parameters, which include the location, coverage radius, and deflection angle of each router;

[0012] Step S2.2: Generate moth positions randomly in the space that satisfies the constraints; calculate the fitness value of each moth through the objective function;

[0013] Step S2.3: sort the spatial positions of the moths in ascending order of fitness values ​​and assign them to the flames as the spatial positions of the flames in the first generation;

[0014] Step S2.4: The moth updates its position according to the logarithmic spiral curve function, reorders the fitness values ​​of the updated moth position and the flame position, selects the spatial position with a better fitness value to update it as the position of the next generation of flames, and reduces the number of flames according to the flame abandonment function;

[0015] Step S2.5: Determine whether the maximum number of iterations has been reached. If so, output the moth with the best fitness value, and its position is the optimal router layout parameter. Otherwise, return to step S2.4.

[0016] Furthermore, the constraint condition preset in step S2 is: the coverage radius rj of each router is not greater than the maximum coverage radius rjmax of the router;

[0017] The objective function in step S2 is: λ is the aggregation coefficient that reflects the relative importance of each indicator, 0<λ<1;

[0018] If terminal Ti is covered by at least one router, then p i =0; otherwise,

[0019] At this time, j is the router number closest to terminal Ti;

[0020] If router Rj does not overlap with other routers in coverage area, then q j =0; otherwise, where cc j Indicates c j The area where there is repeated coverage.

[0021] Further, the following steps are performed to determine whether the terminal is covered by the router and whether there is an overlapping coverage area between the routers:

[0022] Step T1, dividing the wireless communication network area into grids with a side length of d;

[0023] Step T2: for each router Rj, define its rectangular coverage area as a rectangular grid range consisting of vertices (K1j, K3j), (K2j, K3j), (K1j, K4j) (K2j, K4j); wherein,

[0024]

[0025]

[0026]

[0027] Step T3, when judging whether the decision point is covered by router Rj, if the position of the decision point is (xt, yt), firstly judge whether the position of the decision point (xt, yt) does not fall into the rectangular grid range of Rj. If not, the judgment result is that the decision point is not covered by router Rj; if so, calculate (xt, yt). t -x j ) 2 +(y t -y j ) 2 Is it greater than If yes, then the result is that the decision point is not covered by router Rj; if no, then calculate equation Is it true? If not, the judgment result is that the decision point is not covered by router Rj, otherwise the judgment result is that the decision point is covered by router Rj;

[0028] Step T4.1, when determining whether terminal Ti is covered by router Rj, substitute the position (xi, yi) of terminal Ti into the determination point in step T3 to obtain the coverage determination result;

[0029] Step T4.2, when judging whether router Rj overlaps with router Rj', first judge whether there is any overlapping part in the rectangular grid range of router Rj and router Rj'. If not, it is judged that there is no overlapping. If so, for each grid of the overlapping part, take the center point of each grid and substitute it into the judgment point in step T3, and obtain the coverage judgment results of the judgment point relative to router Rj and router Rj' respectively. If the judgment results are not all overlapping, it is judged that there is no overlapping. Otherwise, count the number of grids that are all overlapping, and add the value of the number of grids × d2 to the area cc of the overlapping coverage area of ​​router Rj and router Rj'. j ,cc j 'middle.

[0030] Furthermore, after the moths are initialized randomly in the space satisfying the constraint conditions in step S2.2, and before the fitness value of each moth is calculated by the objective function, the following steps are also included:

[0031] Step U1: Randomly select m terminals Ti as group centers and form m covering groups;

[0032] Step U2: assign each terminal Ti to the coverage group where the nearest cluster center is located;

[0033] Step U3: recalculate the center point of each coverage group; the center point can be calculated by the average position of all terminals in the coverage group;

[0034] Step U4: Repeat steps U2 and U3 until the cluster center point no longer changes or the maximum number of iterations is reached.

[0035] Step U5: For each coverage group, a circle is drawn with the group center as the center and the distance between the terminal farthest from the group center and the group center as the radius, forming m coverage circles; a router is assigned to each coverage circle, and the point on the circumference of the coverage circle closest to the coverage circle is used as the position of the router, and the horizontal angle from the point to the coverage circle group center is used as the deflection angle of the router antenna, and the coverage radius of the router is the maximum coverage radius of the router, forming the initial intervention router layout parameters;

[0036] Step U6, using the initial intervention router layout parameters to replace an initial moth in a random manner.

[0037] And a computer-readable storage medium, characterized in that the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute a method for obtaining optimal router layout parameters, the method for obtaining optimal router layout parameters comprising:

[0038] Step S1, obtaining the terminal location information of the industrial wireless communication network and establishing an industrial wireless communication network model; wherein the industrial wireless communication network is composed of a terminal, a router, and a gateway, and the router is a directional antenna wireless router, which covers the terminal in a directional manner through a wireless connection and connects to the gateway through a wired connection;

[0039] Step S2, according to the preset constraints, with the goal of maximizing coverage and minimizing interference, construct an objective function, and obtain the optimal router layout parameters according to the moth optimization algorithm;

[0040] In step S1, the number of terminals is defined as n, and the position of the i-th terminal Ti is represented as (xi, yi), where the terminal number i = 1, 2, ..., n; the number of deployed routers is defined as m, and the position of the j-th router Rj is represented as (xj, yj), the coverage radius is represented as rj, the coverage angle of the antenna is represented as aj, the deflection angle of the antenna is represented as bj, and the coverage area is represented as cj, where the router number j = 1, 2, ..., m;

[0041] The steps of the moth optimization algorithm in step S2 are:

[0042] Step S2.1: Initialize parameters, namely, the number of moth populations N, the maximum number of iterations Tmax, and the spatial dimension d. The spatial dimension d is the dimension of the router layout parameters, which include the location, coverage radius, and deflection angle of each router;

[0043] Step S2.2: Generate moth positions randomly in the space that satisfies the constraints; calculate the fitness value of each moth through the objective function;

[0044] Step S2.3: sort the spatial positions of the moths in ascending order of fitness values ​​and assign them to the flames as the spatial positions of the flames in the first generation;

[0045] Step S2.4: The moth updates its position according to the logarithmic spiral curve function, reorders the fitness values ​​of the updated moth position and the flame position, selects the spatial position with a better fitness value to update it as the position of the next generation of flames, and reduces the number of flames according to the flame abandonment function;

[0046] Step S2.5: Determine whether the maximum number of iterations has been reached. If so, output the moth with the best fitness value, and its position is the optimal router layout parameter. Otherwise, return to step S2.4.

[0047] Compared with the prior art, the innovations and beneficial effects of this application are:

[0048] 1. Use directional antenna wireless routers to cover the terminals of the industrial wireless communication network, thereby providing targeted wireless coverage of the terminals and avoiding signal interference caused by repeated coverage of the router.

[0049] 2. The use of directional antenna wireless routers increases the difficulty of optimizing the router layout location, because its network coverage method is significantly different from that of omnidirectional antenna routers. This application uses the moth optimization algorithm to optimize the router layout parameters.

[0050] 3. The coverage judgment method is improved according to the coverage characteristics of directional antennas, thereby reducing the computing resources required for coverage judgment.

[0051] 4. According to the coverage characteristics of directional antennas, a step of intervening in the initial population is proposed to improve the iteration speed of the moth optimization algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 Schematic diagram of the router model in the industrial wireless communication network model.

[0053] Figure 2 Schematic diagram of allocating routers according to coverage circles. DETAILED DESCRIPTION

[0054] The present invention is described in detail below with reference to the accompanying drawings:

[0055] For industrial wireless communication networks, there are often a large number of terminals distributed in different locations that need to be covered by wireless networks. These terminals are usually covered by networks such as 802.11 and 802.15.4, but these networks are mostly concentrated in the 2.4GHz frequency band and interfere with each other. At the same time, a large number of wireless routers are usually required to cover a large number of terminals. When there are many wireless router signals nearby, the probability of multiple routers sharing the same channel is greatly increased, further generating signal crosstalk and seriously interfering with normal communication. Therefore, by optimizing the number and layout of routers, constraining the signals of each router, reducing the repeated coverage area between routers, and avoiding the channel interference caused by multiple wireless router signals in the same area, it has become a feasible optimization method for building an interference-resistant wireless communication network.

[0056] At the same time, reducing the overlapping coverage areas between routers also brings convenience to the subsequent addition of terminals in the industrial wireless communication network. As long as the location of the new terminal has been covered by the existing router, there is no need to consider whether it will be interfered by the signals of other routers.

[0057] In this regard, the present application provides an anti-interference method for wireless communication in industrial applications, which specifically includes the following steps:

[0058] Step S1, obtaining the terminal location information of the industrial wireless communication network and establishing an industrial wireless communication network model; wherein the industrial wireless communication network is composed of a terminal, a router, and a gateway, and the router is a directional antenna wireless router, which covers the terminal in a directional manner through a wireless connection and connects to the gateway through a wired connection;

[0059] Step S2, according to the preset constraints, with the goal of maximizing coverage and minimizing interference, construct an objective function, and obtain the optimal router layout parameters according to the moth optimization algorithm;

[0060] Step S3, arranging the routers according to the optimal router arrangement parameters, and adjusting the channel parameters of each router according to the interference channel conditions at each router location.

[0061] The applicant has noticed that wireless routers in the prior art often use omnidirectional antenna coverage, which is simple to arrange and has a large coverage range. However, it is also because of its large coverage range that it is more likely to cause duplicate coverage problems. Therefore, in the industrial wireless communication network constructed by this application, a directional antenna wireless router is used to provide targeted wireless coverage for the terminal. At the same time, in order to avoid the problem of repeated coverage of routers, it is preferred to use wired connections between routers and between routers and gateways.

[0062] However, the use of directional antenna wireless routers increases the difficulty of optimizing the layout of routers, because its network coverage method is significantly different from that of omnidirectional antenna routers, with two additional parameters, the coverage angle and deflection angle of directional antennas, and the layout optimization method of omnidirectional antenna routers cannot be directly applied. To this end, the applicant established an industrial wireless communication network model and performed optimization calculations based on the improved moth optimization algorithm.

[0063] First, in step S1, the terminal location information is obtained and an industrial wireless communication network model is established. Figure 1 As shown, the number of terminals is defined as n, and the position of the i-th terminal Ti is represented as (xi, yi), where the terminal number i = 1, 2, ..., n. Figure 2 As shown, the number of routers to be arranged is defined as m, the position of the jth router Rj is represented as (xj, yj), the coverage radius is represented as rj, the coverage angle of the antenna is represented as aj, the deflection angle of the antenna (i.e., the horizontal angle of the angular bisector of the antenna coverage angle) is represented as bj, and the coverage area is represented as cj, where the router number j = 1, 2, ..., m. The coverage angle of the router antenna is represented as aj, which is generally a known parameter and is set according to the parameters of the existing inventory directional antennas, but the parameter aj can also be set to be selected by the moth optimization algorithm, and the corresponding directional antenna can be purchased according to the aj value obtained by the algorithm. The number of routers m is also a known parameter, which can be set or adjusted or pre-set by the staff, or obtained from the industrial wireless communication network.

[0064] In step S2, the preset constraint condition is: the coverage radius rj of each router is not greater than the maximum coverage radius rjmax of the router. With the goal of maximizing coverage and minimizing interference, the objective function constructed is:

[0065] λ is the aggregation coefficient that reflects the relative importance of each indicator, 0<λ<1, and its value can be flexibly adjusted according to actual needs;

[0066] In the objective function, if at least one router covers terminal Ti, then p i =0; otherwise, At this time, j is the router number closest to terminal Ti. If router Rj does not overlap with other routers, then q j =0; otherwise, where cc j Indicates c j The area where there is repeated coverage.

[0067] In an optional embodiment, when there is no coverage and repeated areas, the objective function corresponding to p i and q i Can also be modified to and To avoid the influence of individual discrete extreme values.

[0068] According to the improved moth optimization algorithm, the optimal router layout parameters are obtained. The moth optimization algorithm is an existing intelligent optimization algorithm based on the behavior of moths flying into flames. By setting constraints and constructing objective functions, the optimal router layout parameters can be obtained through the standard moth optimization algorithm. The main steps of the moth optimization algorithm are as follows. Those skilled in the art know the specific functions and definitions in the steps, which will not be repeated in this article:

[0069] Step S2.1: Initialize parameters, namely, the number of moth populations N, the maximum number of iterations Tmax, and the spatial dimension d. The spatial dimension d is the dimension of the router layout parameters, which include the location, coverage radius, and deflection angle of each router;

[0070] Step S2.2: Generate moth positions randomly in the space that satisfies the constraints; calculate the fitness value of each moth through the objective function;

[0071] Step S2.3: sort the spatial positions of the moths in ascending order of fitness values ​​and assign them to the flames as the spatial positions of the flames in the first generation;

[0072] Step S2.4: The moth updates its position according to the logarithmic spiral curve function, reorders the fitness values ​​of the updated moth position and the flame position, selects the spatial position with a better fitness value to update it as the position of the next generation of flames, and reduces the number of flames according to the flame abandonment function;

[0073] Step S2.5: Determine whether the maximum number of iterations has been reached. If so, output the moth with the best fitness value, and its position is the optimal router layout parameter. Otherwise, return to step S2.4.

[0074] The moths are initialized in a random manner, that is, the position of each moth is set in a random manner. The position of the moth may include multiple dimensions such as the position of each router, the coverage radius, and the deflection angle.

[0075] The fitness value of each moth is calculated through the objective function. The smaller the value of the objective function, the smaller and better the fitness value.

[0076] The logarithmic spiral curve function is as follows:

[0077] S(M i , F j )=D i ·e bt ·cos(2πt)+F j

[0078] Among them, S(M i , F j ) represents the i-th moth M i Around the jth flame F j Position after motion update; D i =|F j -M i | indicates M i With F j The distance between them; b is the logarithmic spiral shape constant defined; t∈[-1,1] is a random number.

[0079] The specific function of abandoning flame is as follows:

[0080]

[0081] Among them, flame.no is the number of flames after update, L is the current number of iterations; N is the maximum number of flames; Tmax represents the maximum number of iterations.

[0082] In step S3, the routers are arranged according to the optimal router arrangement parameters. In a preferred embodiment, step S2 can be performed for different values ​​of the number of routers m to seek a combination of the number of routers m and the arrangement parameters with the best cost performance, so that when the number of routers m is more than the number of existing routers, new routers can be purchased in time to meet the anti-interference requirements. After determining the optimal router arrangement parameters, the position, coverage angle and deflection angle of the routers are arranged and adjusted accordingly according to the optimal router arrangement parameters, and the coverage radius of the routers is adjusted by adjusting the transmitting and / or receiving power of the routers. After the routers are arranged, there may be other background interference channels at the location of the routers, such as wireless networks for staff or external wireless networks, etc. Therefore, it is necessary to adjust the channel parameters of each router according to the interference channel situation of each router position to avoid conflicts between the channels used by the routers and the background interference channels.

[0083] The applicant noted that in the moth optimization algorithm of step S2 above, the objective function needs to be calculated frequently, so it is necessary to judge whether the terminal is covered by the router and whether there are repeated coverage areas between routers. At the same time, the introduction of directional antennas further increases the complexity of the calculation. The usual way to judge whether the terminal Ti is covered by the router Rj is to calculate whether the distance between the terminal Ti and the router Rj is less than the coverage radius rj of the router, and to calculate whether the angle between the terminal Ti and the router Rj falls within the coverage angle of the router. It is more complicated to use algebra or matrix methods to calculate whether there is repeated coverage between two routers. Obviously, this requires a large amount of computing resources. Because in actual working conditions, the coverage radius of the router is not strictly limited to rj, a larger distance can still meet the communication needs. Therefore, the applicant proposes an improved method for coverage judgment that can reduce computing resources based on the coverage characteristics of directional antennas, as follows:

[0084] Step T1, dividing the wireless communication network area into grids with a side length of d; the side length d can be flexibly adjusted according to the required accuracy;

[0085] Step T2: For each router Rj, define its rectangular coverage area as a rectangular grid range consisting of vertices (K1j, K3j), (K2j, K3j), (K1j, K4j), and (K2j, K4j).

[0086]

[0087]

[0088]

[0089]

[0090] Step T3, when judging whether the decision point is covered by router Rj, if the position of the decision point is (xt, yt), firstly judge whether the position of the decision point (xt, yt) does not fall into the rectangular grid range of Rj. If not, the judgment result is that the decision point is not covered by router Rj; if so, calculate (xt, yt). t -x j ) 2 +(y t -y j ) 2 Is it greater than If yes, then the result is that the decision point is not covered by router Rj; if no, then calculate equation Is it true? If not, the judgment result is that the decision point is not covered by router Rj, otherwise the judgment result is that the decision point is covered by router Rj.

[0091] Step T4.1, when determining whether terminal Ti is covered by router Rj, substitute the position (xi, yi) of terminal Ti into the determination point in step T3 to obtain the coverage determination result;

[0092] Step T4.2, when judging whether router Rj overlaps with router Rj', first judge whether there is any overlapping part in the rectangular grid range of router Rj and router Rj'. If not, it is judged that there is no overlapping. If so, for each grid of the overlapping part, take the center point of each grid and substitute it into the judgment point in step T3, and obtain the coverage judgment results of the judgment point relative to router Rj and router Rj' respectively. If the judgment results are not all overlapping, it is judged that there is no overlapping. Otherwise, count the number of grids that are all overlapping, and add the value of the number of grids × d2 to the area cc of the overlapping coverage area of ​​router Rj and router Rj'. j ,cc j 'middle.

[0093] Through the above coverage judgment method, for each router Rj, it is only necessary to calculate the rectangular grid range in step T2 once and store it in the cache for use in the subsequent steps T3-T4. Therefore, compared with the usual calculation method, the coverage judgment method can reduce the amount of calculation for frequent coverage judgment when calculating the objective function, and it is the cc in the objective function. j Parameters provide an easy way to calculate.

[0094] The applicant also noticed that in the moth optimization algorithm of step S2 above, the introduction of directional antennas increases the spatial dimension, resulting in the moth optimization algorithm requiring more iterations. Since the initial population of the moth optimization algorithm is initialized in a random manner, it further increases the number of iterations required. In view of the coverage characteristics of directional antennas, the applicant proposed a step that can intervene in the initial population. This step can be inserted in step S2.2 after the moths are initialized in a random manner in the space that meets the constraints, and before the fitness value of each moth is calculated by the objective function, so as to intervene in the initial moths. It can also be inserted in step S2.3 after selecting the current optimal parameters as the next generation of flame positions to intervene in the first or second generation of flames. The steps for intervening in the initial population are as follows:

[0095] Step U1: Randomly select m terminals Ti as group centers and form m covering groups;

[0096] Step U2: assign each terminal Ti to the coverage group where the nearest cluster center is located;

[0097] Step U3: recalculate the center point of each coverage group; the center point can be calculated by the average position of all terminals in the coverage group;

[0098] Step U4: Repeat steps U2 and U3 until the cluster center point no longer changes or the maximum number of iterations is reached.

[0099] Step U5: Figure 2 As shown, for each coverage group, a circle is drawn with the group center as the center and the distance between the terminal farthest from the group center and the group center as the radius, forming m coverage circles; a router is assigned to each coverage circle, and the point on the circumference of the coverage circle closest to the coverage circle is taken as the position of the router, and the horizontal angle from the point to the coverage circle group center is taken as the deflection angle of the router antenna, and the coverage radius of the router is the maximum coverage radius of the router, finally forming the initial intervention router layout parameters.

[0100] Step U6, since the population of initial moths and first-generation flames in the moth optimization algorithm is N, the initial intervention router layout parameters are used to randomly replace the initial moths and / or the sorted first-generation flames. One initial moth or flame can be replaced, or a preset ratio multiplied by the population number of moths or flames can be replaced, wherein the preset ratio should not be too high to avoid falling into the situation of local optimization, and the optional value is 1%-10%.

[0101] The present application also provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, the computer executes methods such as steps S1-S2, steps T1-T4, and steps U1-U6 mentioned above. By executing these methods, the optimal router layout parameters can be obtained according to the terminal location information of the industrial wireless communication network.

[0102] It can be understood that in the embodiments of the present application, the size of the serial numbers of the above-mentioned steps does not mean the order of execution. At the same time, the above-mentioned steps can be combined arbitrarily. The execution order and combination of each step should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

Claims

1. An anti-interference method for wireless communication in industrial applications, characterized in that: The following steps are involved: Step S1, obtaining the terminal location information of the industrial wireless communication network and establishing an industrial wireless communication network model; wherein the industrial wireless communication network is composed of a terminal, a router, and a gateway, and the router is a directional antenna wireless router, which covers the terminal in a directional manner through a wireless connection and connects to the gateway through a wired connection; Step S2, according to the preset constraints, with the goal of maximizing coverage and minimizing interference, construct an objective function, and obtain the optimal router layout parameters according to the moth optimization algorithm; Step S3, arranging the routers according to the optimal router arrangement parameters, and adjusting the channel parameters of each router according to the interference channel conditions at each router location; In step S1, the number of terminals is defined as n, and the i-th terminal T i The position is represented by (x i ,y i ), where the terminal number i = 1, 2, ..., n; define the number of deployed routers as m, and set the jth router R j The position is represented by (x j ,y i ), the coverage radius is represented by r j , the coverage angle of the antenna is represented by a j , the deflection angle of the antenna is represented by b j , the coverage area is denoted as c j , where router number j = 1, 2, ..., m; The steps of the moth optimization algorithm in step S2 are: Step S2.1: Initialize parameters, namely, the number of moth populations N, the maximum number of iterations Tmax, and the spatial dimension d, where the spatial dimension d is the dimension of the router layout parameters, and the router layout parameters include the location, coverage radius, and deflection angle of each router; Step S2.2: Generate moth positions randomly in the space that satisfies the constraints; calculate the fitness value of each moth through the objective function; Step S2.3: sort the spatial positions of the moths in ascending order of fitness values ​​and assign them to the flames as the spatial positions of the flames in the first generation; Step S2.4: The moth updates its position according to the logarithmic spiral curve function, reorders the fitness values ​​of the updated moth position and the flame position, selects the spatial position with a better fitness value to update it as the position of the next generation of flames, and reduces the number of flames according to the flame abandonment function; Step S2.5: Determine whether the maximum number of iterations has been reached. If so, output the moth with the best fitness value, and its position is the optimal router layout parameter. Otherwise, return to step S2.4; in, The preset constraint condition in step S2 is: the coverage radius r of each router j Not greater than the maximum coverage radius r of the router jmax ; The objective function in step S2 is: λ is the aggregation coefficient that reflects the relative importance of each indicator, 0<λ<1; If the terminal T i is covered by at least one router, then p i =0; otherwise, At this time, j is the distance from the terminal T i The nearest router number; If router R j If there is no overlapping coverage area with other routers, then q j =0; otherwise, where cc j Indicates c j The area where there is repeated coverage.

2. The anti-interference method of wireless communication in industrial applications according to claim 1, characterized in that: After the moths are initialized randomly in the space satisfying the constraints in step S2.2, and before the fitness value of each moth is calculated by the objective function, the following steps are also included: Step U1: Randomly select m terminals T i As the group center point and form m covering groups; Step U2: Set each terminal T i Assign to the coverage group where the nearest cluster center is located; Step U3: recalculate the center point of each coverage group; the center point can be calculated by the average position of all terminals in the coverage group; Step U4: Repeat steps U2 and U3 until the cluster center point no longer changes or the maximum number of iterations is reached; Step U5: For each coverage group, a circle is drawn with the group center as the center and the distance between the terminal farthest from the group center and the group center as the radius, forming m coverage circles; a router is assigned to each coverage circle, and the point on the circumference of the coverage circle closest to the coverage circle is used as the position of the router, and the horizontal angle from the point to the coverage circle group center is used as the deflection angle of the router antenna, and the coverage radius of the router is the maximum coverage radius of the router, forming the initial intervention router layout parameters; Step U6, using the initial intervention router layout parameters to replace an initial moth in a random manner.

3. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute a method for obtaining optimal router layout parameters. The method for obtaining optimal router layout parameters includes: Step S1, obtaining the terminal location information of the industrial wireless communication network and establishing an industrial wireless communication network model; wherein the industrial wireless communication network is composed of a terminal, a router, and a gateway, and the router is a directional antenna wireless router, which covers the terminal in a directional manner through a wireless connection and connects to the gateway through a wired connection; Step S2, according to the preset constraints, with the goal of maximizing coverage and minimizing interference, construct an objective function, and obtain the optimal router layout parameters according to the moth optimization algorithm; In step S1, the number of terminals is defined as n, and the i-th terminal T i The position is represented by (x i ,y i ), where the terminal number i = 1, 2, ..., n; define the number of deployed routers as m, and set the jth router R j The position is represented by (x j ,y i ), the coverage radius is represented by r j , the coverage angle of the antenna is represented by a j , the deflection angle of the antenna is represented by b j , the coverage area is denoted as c j , where router number j = 1, 2, ..., m; The steps of the moth optimization algorithm in step S2 are: Step S2.1: Initialize parameters, namely, the number of moth populations N, the maximum number of iterations Tmax, and the spatial dimension d, where the spatial dimension d is the dimension of the router layout parameters, and the router layout parameters include the location, coverage radius, and deflection angle of each router; Step S2.2: Generate moth positions randomly in the space that satisfies the constraints; calculate the fitness value of each moth through the objective function; Step S2.3: sort the spatial positions of the moths in ascending order of fitness values ​​and assign them to the flames as the spatial positions of the flames in the first generation; Step S2.4: The moth updates its position according to the logarithmic spiral curve function, reorders the fitness values ​​of the updated moth position and the flame position, selects the spatial position with a better fitness value to update it as the position of the next generation of flames, and reduces the number of flames according to the flame abandonment function; Step S2.5: Determine whether the maximum number of iterations has been reached. If so, output the moth with the best fitness value, and its position is the optimal router layout parameter. Otherwise, return to step S2.

4. in, The preset constraint condition in step S2 is: the coverage radius r of each router j Not greater than the maximum coverage radius r of the router jmax ; The objective function in step S2 is: λ is the aggregation coefficient that reflects the relative importance of each indicator, 0<λ<1; If the terminal T i is covered by at least one router, then p i =0; otherwise, At this time, j is the distance from the terminal T i The nearest router number; If router R j If there is no overlapping coverage area with other routers, then q j =0; otherwise, where cc j Indicates c j The area where there is repeated coverage.