CN115859838B - Digital twin deployment method and system for ecological environment monitoring sensor - Google Patents

Digital twin deployment method and system for ecological environment monitoring sensor Download PDF

Info

Publication number
CN115859838B
CN115859838B CN202310157411.0A CN202310157411A CN115859838B CN 115859838 B CN115859838 B CN 115859838B CN 202310157411 A CN202310157411 A CN 202310157411A CN 115859838 B CN115859838 B CN 115859838B
Authority
CN
China
Prior art keywords
environment monitoring
deployment
sensor
monitoring sensor
population
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310157411.0A
Other languages
Chinese (zh)
Other versions
CN115859838A (en
Inventor
陈思维
徐亮
陈龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hubei Xiecheng Transportation Environmental Protection Co ltd
Original Assignee
Hubei Xiecheng Transportation Environmental Protection Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hubei Xiecheng Transportation Environmental Protection Co ltd filed Critical Hubei Xiecheng Transportation Environmental Protection Co ltd
Publication of CN115859838A publication Critical patent/CN115859838A/en
Application granted granted Critical
Publication of CN115859838B publication Critical patent/CN115859838B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D21/00Measuring or testing not otherwise provided for
    • G01D21/02Measuring two or more variables by means not covered by a single other subclass
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/06Multi-objective optimisation, e.g. Pareto optimisation using simulated annealing [SA], ant colony algorithms or genetic algorithms [GA]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Biology (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Hardware Design (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physiology (AREA)
  • Genetics & Genomics (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Computer Graphics (AREA)
  • Testing Or Calibration Of Command Recording Devices (AREA)

Abstract

The invention relates to an ecological environment monitoring sensor digital twin deployment method and system, which are oriented to the deployment requirements of environment monitoring sensors in complex scenes such as roads, bridges, rivers, lakes and the like, and decide to generate an optimal deployment scheme of the environment monitoring sensors with optimal cost, performance and service life; taking cost, performance and service life as optimization targets, and utilizing a multi-target optimization genetic algorithm to obtain an optimal deployment scheme set of the environmental monitoring sensor in the complex scene; and combining a Unity3D development engine and Matlab software to realize the interaction of data between the optimal deployment scheme of the environment monitoring sensor and the digital twin model scene. The invention can solve the technical problem of optimal deployment of the environment monitoring sensor, has the advantages of low calculation cost and high calculation efficiency, and has important practical significance.

Description

Digital twin deployment method and system for ecological environment monitoring sensor
Technical Field
The invention relates to the technical field of ecological environment monitoring, in particular to a digital twin body deployment method and system of an ecological environment monitoring sensor.
Background
In the ecological environment monitoring field, environmental data such as water, air, soil and the like are monitored, data support can be provided for confirming pollution sources and formulating corresponding solutions, and the method has important significance for environmental protection. However, when the number of deployment nodes of the environmental monitoring sensors increases, the number of the environmental monitoring sensors selectable by each node is hundreds to thousands, so that the number of alternatives for the deployment of the environmental monitoring sensors in different environmental scenes increases exponentially, and how to select the optimal solution for the deployment of the environmental monitoring sensors so as to provide references for environmental monitoring enterprises is a problem to be solved.
In the prior art, a traditional traversal method is adopted to obtain an optimal solution for environmental monitoring sensor deployment. The traversal method refers to that each node in the structure tree is accessed sequentially along a certain search route, and the operation performed by the access node depends on a specific application problem, and a specific access operation may be checking the value of the node, updating the value of the node, and the like. The order of access nodes is different in different traversal modes. The traversal method is also applicable to the case of multi-element sets, such as arrays.
However, the conventional traversal method has the disadvantages of high difficulty in obtaining the optimal solution, high calculation cost and low calculation efficiency.
Disclosure of Invention
The invention aims to provide a digital twin deployment method and a digital twin deployment system for an ecological environment monitoring sensor, which are based on a digital twin technology for three-dimensional modeling, can visually present an optimization process and an optimization result, can solve the technical problem of optimal deployment of the environment monitoring sensor, have the advantages of low calculation cost and high calculation efficiency, and have important practical significance.
In order to achieve the purpose, the invention designs a digital twin body deployment method of an ecological environment monitoring sensor, which is characterized by comprising the following steps:
step 1: according to the environment monitoring requirements, setting deployment nodes of an environment monitoring sensor in an environment monitoring scene to form a blocky ecological area containing roads, bridges and rivers;
step 2: determining the types and the number of the environmental monitoring sensors used in the blocky ecological area;
step 3: determining an evaluation index of each environment monitoring sensor in the blocky ecological area, wherein the evaluation index comprises performance, cost and service life;
step 4: generating selectable individuals of each environment monitoring sensor according to the evaluation index, carrying out real number coding on the selectable individuals, and constructing a gene code for deployment of the environment monitoring sensors by using a real number coding method;
step 5: according to different types and numbers of environment monitoring sensors, constructing an initial population of a multi-objective optimized genetic algorithm by a random number generation method;
step 6: calculating non-dominant ranking and crowding degree of the initial population to obtain a population matrix containing ranking levels and crowding degree, and evaluating the advantages and disadvantages of the environment monitoring sensor optimized deployment scheme with a plurality of evaluation indexes;
step 7: combining race selection and elite strategies, constructing crossover operators of a genetic algorithm by adopting a random number threshold method, constructing mutation operators of the genetic algorithm by random number updating operation, and solving an optimal set for optimizing deployment of environmental monitoring sensors in a complex scene by adopting a strategy of population loop iteration updating;
step 8: based on a Unity virtual development engine and Matlab genetic algorithm programming environment, an environment monitoring sensor optimizing deployment system is built, an optimal set of environment monitoring sensor optimizing deployment in the complex scene is imported into a simulated environment monitoring scene containing a road-bridge-river block ecological area, and an environment monitoring sensor optimizing deployment effect is dynamically presented.
In the step 2, the method for determining the type of the environmental monitoring sensor used in the block ecological area is that an air temperature sensor, a road pressure sensor and a rainfall sensor are selected on a road, a road pressure sensor and a rainfall sensor are selected on a bridge, and a river flow rate sensor is selected in a river.
In a preferred embodiment, in step 3, the performance evaluation index specifically includes a monitoring value range, a signal transmission distance, and a resolution of the sensor.
Preferably, based on the isomerism of the evaluation indexes, normalization processing is performed on different evaluation indexes by a quantitative normalization method.
In the step 5, for different types of environment monitoring sensors, randomly selecting one from 1000 selectable individuals of each environment monitoring sensor, constructing an initial population of a multi-objective optimized genetic algorithm, and randomly generating parameters of each individual in the initial population; the parameter random generation method is that integers with specified number are randomly generated in a certain range and are filled into a fixed-length array; the resolution parameter in the performance index in the sensor evaluation index is randomly generated by a selected way among several already determined numbers.
As a preferred scheme, the evaluation index is used as an objective function in the initial population, the real number codes of the selectable individuals of each environment monitoring sensor are used as decision variables, in order to facilitate calculation when the population is initialized, the decision variables and the objective function are connected in series to form a matrix, the decision variable values and the objective function values corresponding to each decision variable are respectively stored in corresponding positions of a chromosome, the real number codes are adopted in the gene coding process, the node number of one sensor deployment scheme forms a gene sequence of a feasible solution, and different sensor deployment schemes correspond to different feasible solutions, namely correspond to different decision variables.
As a preferred scheme, after an optimal set for optimizing deployment of the environmental monitoring sensors in the complex scene is obtained in the step 7, selecting a scheme with the largest performance parameter in the corresponding optimal solution set as an optimization result to be visualized for the air temperature sensor and the road pressure sensor; and for the rainfall sensor and the river flow rate sensor, selecting a scheme with the largest cost parameter in the corresponding optimal solution set as an optimization result to be visualized.
In the step 8, a TXT text file is used as a middleware to realize data communication of a Unity virtual development engine and a Matlab genetic algorithm programming environment, an optimal deployment scheme is selected in the Matlab genetic algorithm programming environment, and corresponding data is imported into an external appointed TXT text file; writing a script in a text component corresponding to the Unity virtual development engine to read the TXT text file, and displaying data; when the parameters of the optimal deployment scheme are changed, the optimization result is changed along with the parameters, and the parameters are dynamically updated to the visualization platform for display.
The invention also designs a digital twinning-based environment monitoring sensor deployment system, which is characterized in that the system is used for realizing the digital twinning deployment method of the ecological environment monitoring sensor.
As a preferable scheme, the environment monitoring sensor deployment system based on digital twinning is built based on a Unity virtual development engine and Matlab genetic algorithm programming environment, and data communication is realized by using a TXT text file as a middleware.
Compared with the prior art, the method aims at the problem of combination explosion of the deployment scheme of the environment monitoring sensor in a complex scene, adopts coding, local searching and global searching strategies of a multi-objective optimization genetic algorithm based on the model selection requirement of the environment monitoring sensor, analyzes and generates the optimal deployment scheme of the environment monitoring sensor in a cyclic iteration mode, fully utilizes theories and technologies such as digital twin, intelligent group optimization and the like, proposes an optimal deployment method of the environment monitoring sensor driven by a digital twin model, generates an optimal deployment scheme set of the environment monitoring sensor, carries out three-dimensional modeling based on the digital twin technology, can visually present the optimization process and the optimization result, and deeply understands the optimal deployment scheme of the sensor from multiple dimensions. The invention combines the multi-objective optimization genetic algorithm with the 3D virtual model to simulate the optimal deployment of the environmental monitoring sensor in actual production, which has important practical significance for optimizing the deployment capacity of the environmental monitoring enterprise sensor and reducing the deployment cost of the monitoring network.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a basic deployment scenario of the environmental monitoring sensor of the present invention;
FIG. 3 is an optimal deployment scenario for the environmental monitoring sensor of the present invention;
FIG. 4 is a flow chart of the gene encoding process of the present invention;
FIG. 5 is a flow chart of a selection method for a competitive bidding process of the present invention;
FIG. 6a is a graph of run time versus iteration number for a population count of 20;
FIG. 6b is a graph of run time versus iteration number for a population count of 30;
FIG. 6c is a graph of run time versus iteration number for a population count of 40;
FIG. 7a is a graph of generation distance versus iteration number for a population count of 20;
FIG. 7b is a graph of generation distance versus iteration number for a population count of 30;
FIG. 7c is a graph of generation distance versus iteration number for a population count of 40;
FIG. 8a is an optimized result for a cluster count of 200 iterating 50 space-time temperature sensor deployments;
FIG. 8b is an optimization result for a cluster number of 200, iterating 100 time-space temperature sensor deployments;
FIG. 8c is an optimization result for a cluster count of 200, iterating 150 time-space temperature sensor deployments;
FIG. 9 is a flow chart of a visualization system deployment of the present invention.
Detailed Description
In order to make the technical problems solved, the technical scheme adopted and the technical effects achieved by the invention more clear, the technical scheme of the invention is further described below by a specific embodiment in combination with the attached drawings. It is to be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. It should be further noted that, for convenience of description, only some, but not all of the drawings related to the present invention are shown.
In the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Wherein the terms "first position" and "second position" are two different positions.
In the description of the present invention, it should be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixed or removable, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.
The digital twin concept is derived from the digital full life cycle management in the industrial manufacturing field, is mainly applied to links such as product design, performance simulation, assembly process, measurement and inspection, and the like, and can improve the research and development efficiency and reduce the research and development cost.
The invention discloses an environment monitoring sensor optimizing deployment method based on a multi-objective optimizing genetic algorithm, and a digital twin model modeling method based on Unity3D is used for intuitively presenting an optimizing scheme, and the basic process is shown in figure 1.
The invention relates to a digital twin body deployment method of an ecological environment monitoring sensor, which comprises the following steps:
step 1: according to the environment monitoring requirements, dividing the environment monitoring scene into roads, bridges and rivers; setting a deployment node of an environment monitoring sensor in each environment monitoring scene; forming a blocky ecological area comprising a road, a bridge and a river;
step 2: determining the types and the number of environmental monitoring sensors used in the blocky ecological area;
after comprehensively considering the functions and deployment sites of various sensors, 100 four sensors are respectively deployed at sites such as roads, bridges, rivers and the like according to the actual demands of enterprises. The method for determining the type of the environment monitoring sensor used in the blocky ecological area is that an air temperature sensor, a road pressure sensor and a rainfall sensor are selected on a road, a road pressure sensor and a rainfall sensor are selected on a bridge, and a river flow rate sensor is selected in a river.
The number of the environment monitoring sensors used in each environment monitoring scene is specifically 60 on the road, wherein 30 air temperature sensors, 10 road pressure sensors and 20 rainfall sensors are used; the number of the bridge is 20, wherein the number of the road pressure sensors is 10, and the number of the rainfall sensors is 10; the total of 20 rivers are river flow rate sensors. As shown in table 1 and figure 2 in detail,
table 1 number of environmental monitoring sensors used in environmental monitoring scenario
Figure SMS_1
Step 3: determining an evaluation index of each environment monitoring sensor in the blocky ecological area, wherein the evaluation index comprises performance, cost and service life;
to determine an alternative population for the initial population of the input optimization algorithm, the sensor's evaluation index needs to be defined, and then the alternative population can be generated based on the defined criteria.
The evaluation indexes of the sensor can be divided into two main performance indexes and other indexes. The main performance index is used for judging the advantages and disadvantages of the sensor in terms of use performance, and comprises a monitoring value range, a signal transmission distance, resolution, linearity, sensitivity, drift, a threshold value and the like; other indexes are specifically analyzed according to the specific use scene, and the common indexes include cost, aging degree, service life and the like.
Based on a basic deployment scheme of the sensor, five evaluation indexes are selected to evaluate the deployed sensor according to the self situation of an enterprise and the application scene of the environment monitoring sensor on the premise of meeting research requirements. Which are respectively as follows: monitoring value range, signal transmission distance, resolution, service life and cost. Meanwhile, in order to simplify the sensor optimizing and deploying process, three main performance indexes of a monitoring value range, a signal transmission distance and a resolution are subjected to dimension unification and linear weighted summation, and the three main performance indexes are comprehensively characterized as evaluation indexes of performance. Based on the isomerism of the evaluation indexes, different evaluation indexes are normalized by a quantification normalization method.
Let the monitoring value range be X1, the signal transmission distance be X2, the resolution be X3. The performance Y1 is expressed as follows:
Figure SMS_2
afterwards, the evaluation index of the sensor optimizing deployment problem is: performance, life, cost. The result of the multi-objective optimization is thus to make the overall solution performance and life as large as possible, while at the same time the cost is as small as possible. To ensure consistency of optimization objectives, a parametric transformation of costs is required.
Let the cost be X4, the cost parameter Y2 is expressed as: y2=max+min-X4
MAX and MIN in the above equation refer to the maximum and minimum values of the corresponding parameters.
Thus, the optimization objectives of the multi-objective optimization problem in the present invention are performance, age, and cost.
Based on the evaluation model of the optimal deployment scheme of the environment monitoring sensor is constructed.
Step 4: generating selectable individuals of each environment monitoring sensor according to the evaluation index, carrying out real number coding on the selectable individuals, and constructing a gene code deployed by the environment monitoring sensor by using a real number coding method;
in the step 4, 1000 selectable individuals of each environment monitoring sensor are set, and the 1000 selectable individuals are subjected to real number coding from 0 to 1000.
Step 5: according to different types and numbers of environment monitoring sensors, constructing an initial population of a multi-objective optimized genetic algorithm by a random number generation method;
in each environment monitoring scene, randomly selecting one of 1000 selectable individuals of each environment monitoring sensor aiming at different types of environment monitoring sensors, constructing an initial population of a multi-objective optimized genetic algorithm, and randomly generating parameters of each individual in the initial population; the parameter random generation method is that integers with specified number are randomly generated in a certain range and are filled into a fixed-length array; the resolution parameter in the performance index in the sensor evaluation index is randomly generated by a selected way among several already determined numbers.
In the initial population, an evaluation index is used as an objective function, the real number codes of selectable individuals of each environment monitoring sensor are used as decision variables, when the population is initialized, the decision variables and the objective function are connected in series to form a matrix for facilitating calculation, the decision variable values and the objective function values corresponding to each decision variable are respectively stored in corresponding positions of chromosomes, the real number codes are adopted in the gene coding process, the node number of one sensor deployment scheme forms a feasible solution gene sequence, and different sensor deployment schemes correspond to different feasible solutions, namely correspond to different decision variables.
Thereafter, in terms of a multi-objective optimized genetic algorithm based on Pareto (Pareto) optimal solution set and crowding distance:
based on an evaluation model of an environment monitoring sensor optimized deployment scheme, an optional population needs to be generated, and the initial population is subjected to gene coding and initialization, wherein the basic process is as follows:
first, an initial selectable population needs to be randomly generated, where 1000 selectable individuals per sensor are included, the 1000 individuals being custom-defined in the database.
And (3) writing a program by utilizing MATLAB, randomly generating parameters of each individual, and writing the parameters into corresponding cells of the Excel file. The parameter random generation comprises two program sections, wherein one program section is used for randomly generating an integer with a specified number in a certain range and filling the integer into a fixed-length array; another way in which the resolution in the performance index in the sensor evaluation index needs to be generated is that each data can only be selected among a few already determined numbers.
Simulation data of four sensors are randomly generated, and then the generated data are respectively filled into four different sheets of an Excel table. In the present invention, there are a total of 1OO of environmental monitoring sensors, so the initial selectable population has a total of 100 tens of thousands of individuals containing four sensors.
Secondly, the gene coding and initializing process of the population;
gene coding corresponds to gene decoding, and the candidate solution of the problem is expressed by chromosome, so that mapping from a decoding space to a coding space is realized. There are many coding modes, such as binary coding, real vector coding, integer permutation coding, general data structure coding, etc.
Wherein, the decision variable refers to the serial number (a certain number between 1 and 1000) of the sensor selected by the node; the objective function refers to three evaluation indexes of the environmental monitoring sensor. In the algorithm design, the gene coding process adopts real number coding. Specifically, the node number of one sensor deployment scheme can form a feasible solution gene sequence, and different sensor deployment schemes correspond to different feasible solutions, namely correspond to different decision variables, as shown in fig. 4 in detail.
The process of population initialization is to randomly generate a matrix composed of individuals in the population. All decision variables for each individual are randomly valued within the constraints.
In addition, for ease of computation, decision variables and objective functions are concatenated into a matrix at population initialization. If there are V decision variables and M objective functions, then randomly generated decision variable values are stored at positions 1 to V of the chromosome, and corresponding objective function values are stored at positions v+1 to v+m of the chromosome.
Step 6: calculating non-dominant ranking and crowding degree of the initial population to obtain a population matrix containing ranking levels and crowding degree, and evaluating the advantages and disadvantages of the environment monitoring sensor optimized deployment scheme with a plurality of evaluation indexes;
after the initialization of the population is completed, the initial population needs to be subjected to non-dominant ranking and congestion degree calculation:
according to the Pareto optimal solution theory, when the solution A is better than the solution B, the solution A is the A dominant B; and when neither A nor B can be mutually supported, they constitute a pair of non-dominant solutions. The fast non-dominant ordering process is a process of ordering decision vectors according to dominant relations. When A dominates B, the non-dominated ordering value of A is higher than B.
Meanwhile, in order to obtain the crowding degree of the surrounding solutions of a specific solution in the population, the average distance between two side points of the point needs to be calculated according to each objective function. This value is taken as an estimate of the perimeter of a cuboid with nearest neighbors as vertices (called the congestion factor).
Thereafter, each individual calculates a corresponding non-dominant ranking value and crowding distance. Meanwhile, non-dominant ranking values and crowding distances are also added to the chromosome matrix for ease of subsequent processing. Thus, a population matrix comprising ranking levels and crowdedness can be obtained, and the matrix has been ranked according to ranking levels.
Step 7: combining race selection and elite strategies, constructing crossover operators of a genetic algorithm by adopting a random number threshold method, constructing mutation operators of the genetic algorithm by random number updating operation, and solving an optimal set for optimizing deployment of environmental monitoring sensors in a complex scene by adopting a strategy of population loop iteration updating.
After an optimal set for optimizing and deploying the environment monitoring sensor in a complex scene is obtained, selecting a scheme with the largest performance parameter in a corresponding Pareto optimal solution set as an optimization result to be visualized for the air temperature sensor and the road pressure sensor; and for the rainfall sensor and the river flow rate sensor, selecting a scheme with the largest cost parameter from the corresponding Pareto optimal solution set as an optimization result to be visualized.
Step 8: based on a Unity virtual development engine and Matlab genetic algorithm programming environment, an environment monitoring sensor optimizing deployment system is built, an optimal set of environment monitoring sensor optimizing deployment in the complex scene is imported into a simulated environment monitoring scene containing a road-bridge-river block ecological area, and an environment monitoring sensor optimizing deployment effect is dynamically presented.
Data communication between the Unity virtual development engine and the Matlab genetic algorithm programming environment is realized by using the TXT text file as a middleware: selecting an optimal deployment scheme in a Matlab genetic algorithm programming environment, and importing corresponding data into an external appointed TXT text file; writing a script in a text component corresponding to the Unity virtual development engine to read the TXT text file, and displaying data; when the parameters of the optimal deployment scheme are changed, the optimization result is changed along with the parameters, and the parameters are dynamically updated to the visualization platform for display.
After the initial population is subjected to non-dominant ranking and the degree of congestion is calculated, the selection, crossing and mutation are performed through a genetic algorithm (comprising selection, crossing and mutation), and the basic process is as follows:
wherein, the selection algorithm uses the choice of competitive bidding contests; the crossing algorithm adopts analog binary crossing; the variation algorithm selects a polynomial variation. These processes will be explained below, respectively.
Competitive bidding selection and elite strategy:
the core thought is as follows: two individuals are selected randomly each time, and the individuals with high non-dominant ranking values are selected preferentially, and if the ranking levels are the same, the individuals with high crowdedness are selected preferentially. The basic flow chart is shown in fig. 5.
The choice of competitive game in the genetic algorithm can be divided into the following steps:
(1) randomly selecting different participating individuals;
(2) recording the sorting grade and the crowding degree of each participating individual;
(3) selecting a participating individual with a smaller ranking grade value, and returning an index of the participating individual by find; a smaller ranking level value represents a higher ranking level;
(4) if the ranking levels of the two participating individuals are equal, the crowding degree is continuously compared, and the individual with larger crowding degree is selected.
Through competitive race selection, an excellent initial parent population can be obtained, and then crossover and mutation operations are carried out on the parent population to obtain a child population.
After the crossover and mutation algorithm operations are completed, a new population including a parent population and a offspring population can be obtained. Thereafter, using elite strategies, new excellent populations are generated therefrom for the next iteration.
The iteration population by elite strategy is the largest difference between NSGA-II algorithm and NSGA algorithm, and the specific process is as follows:
first, the offspring population Q generated by the t th generation and the father population P are combined to form R t ,R t The population size was 2N. Then for R t Fast non-dominant ordering to produce a series of non-dominant sets Z i And calculates the degree of congestion. Since individuals of both the offspring population Q and the parent population P are contained in R t In a series of non-dominant sets Z after non-dominant ordering i The individuals contained in the formula are all R t Is the best in (a); first stage non-dominant set Z 1 Put into a new parent population P t+1 If a new parent population P t+1 If the population size of (2) is smaller than N, continuing to P t+1 Middle-fill next-level non-dominant set Z 2 Until Z is added i New parent population P t+1 Stopping when the population size of (C) is larger than N, and for Z i The individuals in (a) are subjected to crowding degree comparison and selection to enable P t+1 The number of individuals in (a) reaches N, and then a new offspring population Q is generated by genetic algorithm (selection, crossover, mutation) t+1
Crossover and mutation:
and randomly selecting 0-1 decimal by using a rand function. When the selected natural number is smaller than the crossover probability, crossover operation is implemented; when the selected natural number is smaller than the mutation probability, a mutation operation is performed. In addition, there are two issues to be noted when implementing analog binary crossover and polynomial variation:
(1) when new offspring individuals are generated through intersection and mutation, rounding operation is needed to be carried out on the calculation results so as to ensure that the data in the population are positive integers:
(2) when the random mutation operation is carried out on the data, the constraint condition is added, so that the data exceeding the data limit range is forcedly converted into the upper bound or the lower bound of the constraint.
Finally, in the aspect of an environment monitoring scene digital twin model creation and system integration method:
after the Pareto optimal solution set of the sensor deployment schemes is obtained, each deployment scheme contained in the Pareto optimal solution set is not mutually controlled. However, in the visualization of the optimization results, we only need to import a complete deployment scenario. The optimal solution needs to be selected.
Among the three evaluation indexes, the service life is the index with the least relative influence, and the performance parameters and the cost parameters of the other two indexes are different emphasis demands under different conditions and need to be specifically considered.
For an air temperature sensor and a road pressure sensor, the performance of the air temperature sensor and the road pressure sensor is more required to be strong and stable, so that a scheme with the maximum performance parameter is selected in the corresponding Pareto solution set to be used as an optimization result to be visualized; for the rainfall sensor and the river flow sensor, compared with the excellent performance, the cost control is more important, so the scheme with the largest cost parameter is selected in the corresponding Pareto solution set, the visualized optimization result is needed, and the basic process is shown in fig. 3.
Combining the selected schemes of the four sensors to obtain a deployment result of optimal deployment of the environment monitoring sensor, and importing corresponding data into a Unity corresponding model to realize visualization of the optimization result.
In order to realize the construction of an environment monitoring sensor optimizing deployment system, namely, realize the real-time visualization of the optimizing result of a deployment scheme, data connection is needed between Matlab and Unity.
The invention also relates to a digital twinning-based environment monitoring sensor deployment system, which is used for realizing the digital twinning deployment method of the ecological environment monitoring sensor.
The environment monitoring sensor deployment system based on digital twinning is built based on a Unity virtual development engine and a Matlab genetic algorithm programming environment, and data communication is achieved by using a TXT text file as a middleware.
The construction of the environment monitoring sensor deployment system based on digital twinning comprises the following steps:
sequentially constructing virtual models of roads, bridges and rivers through three steps of standard resource package introduction, material coverage and topography drawing, and constructing a digital twin model of an environment monitoring scene in a virtual assembly mode;
labeling the deployment nodes of the environment monitoring sensor in each environment monitoring scene, performing simulation modeling on the deployment nodes of the environment monitoring sensor, and importing an optimization scheme corresponding to external data to realize the construction, test and analysis of a visual system;
considering the heterogeneity of data, according to the data interaction characteristics of a group intelligent optimization algorithm and a digital twin model development environment, utilizing TXT text as a data interaction middleware to realize effective transmission of the label of selectable individuals of each environment monitoring sensor and the optimal target data of an environment monitoring sensor deployment scheme, and integrating a Unity3D virtual engine and a Matlab computing environment;
when the parameters of the optimization algorithm change, the optimization result also changes, and the change can be timely reflected in the visualization system.
The invention uses TXT text file as intermediate file to realize data communication, and the basic flow chart is shown in figure 9.
The whole idea is as follows: selecting an optimal deployment scheme from Matlab, and importing corresponding data into an external appointed TXT text file; then, writing a script into the Unity corresponding text component to read the TXT text file, and displaying data.
In order to realize the visualization of the optimal deployment scheme of the sensor, firstly, modeling of the basic topography needs to be performed in Unity, namely, a small ecological area containing a road-bridge-river is intuitively presented.
In order to complete the foundation modeling, the standard resource package (Standard Assets package) needs to be imported first, and after the standard resource package is imported, enough foundation resources are needed to support the construction of the foundation topography.
First, it is necessary to create a topography and make preliminary drawings of the relief of the topography. Then, the terrains are covered by the material, green grassland materials are generally used for covering the terrains, and brown stone materials are used for covering the mountains. Then, a part of the topography is reduced to be used as a river channel, and the river is conveniently manufactured later. After the work is completed, the construction of the topography is completed, which lays a foundation for the subsequent manufacture of roads, bridges and rivers and the introduction of optimized results.
For roads and bridges, the invention selects the Road architecture plugin to construct a three-dimensional visualization model of roads and bridges.
After the Road architecture resource package is imported, a Road system needs to be newly built under the Window drop-down column. Then selecting a Road system, selecting an 'Add Road' on the component panel, and creating a Road component. After 'Road 1' is selected by clicking, the 'shift+mouse left button' is pressed, and then the Road model can be quickly created on the terrain.
For bridges, only the road side generated in the river channel area is required to be subjected to material correction. The material used here is a self-contained aluminum material of Road architecture. After material correction and subsequent river coverage, the effect of the bridge can be simulated by the part of the road.
This section can be described in two small sections. The first part is the formation of the water surface effect, and the second part is the production of the underwater effect.
First, it is the formation of the water surface effect, which is relatively simple. The importation of standard resource packages has been described above. The ambient resource package may be found in the standard resource package (Standard Assets package) that has been imported. The environment resource package is clicked, and the water is searched for, so that the preset (Prefabs) of the water resource can be seen.
The resource package has a plurality of water resource presets including static water, dynamic water, daytime water, night water and the like. The preset as used herein is "dynamic water resource during the day" (waterbasic daytime). And splicing the water surface effects, and finally covering the whole river channel to finish the manufacturing of the river water surface effects.
The main idea for producing the underwater effect is that a scene main camera has a special view mask when entering underwater. Corresponding to the thought, the work to be completed includes the following items:
(1) writing a corresponding script file, and importing the script file into a newly built transparent square;
(2) the position of the transparent square is adjusted to enable the transparent square to just cover the whole river;
(3) and importing the needed configuration file into the scene main camera.
First, a script file underwater. Cs is written. The core thought is as follows:
(1) when the camera is in the water, the Fog and Blur assembly is turned on and the color is set to light blue;
(2) when the camera is out of the water, the Fog and Blur assemblies are turned off:
after the script underwater.cs is written, the script file is added into an established transparent square model isTriggerCube. And then adding the Blur script in the environment resource package into the scene main camera. And parameters and operation projects are adjusted, so that the success of the underwater effect can be observed.
So far, the water surface effect and the underwater effect are all finished, and the river model is basically realized. In summary, we have obtained an environment monitoring scenario involving "road-bridge-river".
Some sensor deployment points have been marked with dots for ease of viewing. And the sensor deployment node is only required to be subjected to simulation modeling, and a corresponding optimization scheme is imported, so that the visual platform is tested and analyzed.
After the 3D modeling of the environment monitoring scene is realized, external data is required to be imported and displayed, and the construction, test and analysis of a visual platform are realized.
Before external data is imported, the process of carrying out simulation modeling on the deployment node of the environment monitoring sensor is specifically to establish 100 white squares to simulate the deployment node of 100 environment monitoring sensors, and import text plug-ins on the white squares to record the labels of the environment monitoring sensors deployed on the nodes.
The external data is imported into the environment monitoring sensor label and the optimization scheme evaluation index; for the importing of the environment monitoring sensor label, txt text is mainly used as a middleware for importing;
and adding a corresponding script file to the Text plug-in Text (TMP) of each block (sensor deployment node), namely reading the Text content of the external file 'sensor label. Txt' to the inside of the Unity in a line and displaying the Text content in the corresponding Text box.
It should be mentioned that, in order to ensure the convenience of searching text content, a new Streaming assembly folder needs to be created under the Unity project assemblies folder, and several text files storing the sensor deployment scheme optimization result need to be dragged into the Streaming assembly folders. The text file is named "sensor number + index of the corresponding category sensor".
The numbers represent the sensor numbers deployed on that node. The deployment of different sensors is annotated with fonts of different colors. The red font represents the deployment of an air temperature sensor, the yellow font represents the deployment of a road pressure sensor, the blue font represents the deployment of a rainfall sensor, and the green font represents the deployment of a river flow rate sensor. To this end, the sensor label is successfully introduced and displayed normally.
In order to completely and intuitively observe the optimization result of the sensor deployment scheme, besides the introduction of the sensor label, visual display of the sensor evaluation index (performance, cost and service life) of the currently selected optimal scheme is required.
The method used here is similar to that used when the sensor label is introduced, and will not be described again. In contrast, it is assumed that the evaluation index should be displayed on the uppermost UI interface, so that a script file for automatically inserting text should be added to a newly created UI component instead of a text component attached to an object.
When the evaluation index of the current scheme is displayed, the sum of service lives of the currently deployed sensors is represented by F1, the sum of performance parameters of the currently deployed sensors is represented by F2, and the sum of cost parameters of the currently deployed sensors is represented by F3.
When the parameters of the optimization algorithm change, the optimization result also changes, and the change can be timely reflected in the visualization platform. Through comparison, the display result is found to be consistent with the actual calculation result, which means that the result change caused by parameter change can be updated to the visual platform in time for display.
Examples
In this embodiment, parameters such as population, iteration number, crossover rate and mutation rate need to be set, and specific parameter values are shown in table 2.
Table 2 setting parameters of optimization algorithm
Figure SMS_3
In terms of parameter selection, experiments are carried out under the conditions that the population size is 20, 30 and 40 and the iteration times are 25, 50, 75 and 100, meanwhile, the population number is kept to be 200, the iteration times are changed, and different optimization results are observed; each set of experiments was repeated five times and a box plot was drawn to observe the effect of parameter changes on algorithm run time and performance.
The presentation of the optimization results is divided into two parts. One part is a three-dimensional representation drawn by three evaluation index values of each scheme in the Pareto solution set, and three coordinate axes of the three-dimensional representation respectively correspond to a service life (F1), a performance parameter (F2) and a cost parameter (F3) in the evaluation index, and the other part is a data set of all schemes in the Pareto solution set.
In the relation of the influence of the parameters on the algorithm running time, when the population number is 20, 30 and 40, the algorithm running time is increased along with the increase of the iteration number, and at this time, the influence of the iteration number on the algorithm running time can be respectively summarized as shown in fig. 6a, 6b and 6 c.
And analyzing the running performance of the algorithm under different iteration times by using a Generation Distance (GD) index on the influence relationship of the parameters on the performance of the algorithm. In general, the smaller the generation distance value, the higher the quality of the solution, as shown in fig. 7a, 7b, and 7 c.
When the population number is 200 and the iteration times are 50, 100 and 150, respectively, the optimization results of the air temperature sensor deployment schemes are shown in fig. 8a, 8b and 8c, wherein blue points represent the air temperature sensors.
Finally, based on the Unity virtual development engine and Matlab genetic algorithm programming environment, when the parameters of the optimization algorithm change, the optimal solution calculated by the genetic algorithm can be dynamically presented in a digital twin model, as shown in FIG. 9.
The foregoing examples illustrate only a few embodiments of the invention and are described in detail herein without thereby limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (8)

1. The digital twin body deployment method of the ecological environment monitoring sensor is characterized by comprising the following steps of: the method comprises the following steps:
step 1: according to the environment monitoring requirements, setting deployment nodes of an environment monitoring sensor in an environment monitoring scene to form a blocky ecological area containing roads, bridges and rivers;
step 2: determining the types and the number of the environmental monitoring sensors used in the blocky ecological area;
step 3: determining an evaluation index of each environment monitoring sensor in the blocky ecological area, wherein the evaluation index comprises performance, cost and service life;
step 4: generating selectable individuals of each environment monitoring sensor according to the evaluation index, carrying out real number coding on the selectable individuals, and constructing a gene code for deployment of the environment monitoring sensors by using a real number coding method;
step 5: according to different types and numbers of environment monitoring sensors, constructing an initial population of a multi-objective optimized genetic algorithm by a random number generation method; for different types of environment monitoring sensors, randomly selecting one from 1000 selectable individuals of each environment monitoring sensor, constructing an initial population of a multi-objective optimized genetic algorithm, and randomly generating parameters of each individual in the initial population; the parameter random generation method is that integers with specified number are randomly generated in a certain range and are filled into a fixed-length array; the resolution parameter in the performance index in the sensor evaluation index is randomly generated by a selected mode among several determined numbers;
in the initial population, an evaluation index is used as an objective function, the real number codes of selectable individuals of each environment monitoring sensor are used as decision variables, when the population is initialized, in order to facilitate calculation, the decision variables and the objective function are connected in series to form a matrix, the decision variable values and the objective function values corresponding to each decision variable are respectively stored in corresponding positions of chromosomes, the real number codes are adopted in the gene coding process, the node number of one sensor deployment scheme forms a feasible solution gene sequence, and different sensor deployment schemes correspond to different feasible solutions, namely correspond to different decision variables;
step 6: calculating non-dominant ranking and crowding degree of the initial population to obtain a population matrix containing ranking levels and crowding degree, and evaluating the advantages and disadvantages of the environment monitoring sensor optimized deployment scheme with a plurality of evaluation indexes;
step 7: combining race selection and elite strategies, constructing crossover operators of a genetic algorithm by adopting a random number threshold method, constructing mutation operators of the genetic algorithm by random number updating operation, and solving an optimal set for optimizing deployment of environmental monitoring sensors in a complex scene by adopting a strategy of population loop iteration updating;
step 8: based on a Unity virtual development engine and Matlab genetic algorithm programming environment, an environment monitoring sensor optimizing deployment system is built, an optimal set of environment monitoring sensor optimizing deployment in the complex scene is imported into a simulated environment monitoring scene containing a road-bridge-river block ecological area, and an environment monitoring sensor optimizing deployment effect is dynamically presented.
2. The method for digital twin deployment of an ecological environment monitoring sensor according to claim 1, wherein: in the step 2, the method for determining the type of the environment monitoring sensor used in the block ecological area is that an air temperature sensor, a road pressure sensor and a rainfall sensor are selected on a road, a road pressure sensor and a rainfall sensor are selected on a bridge, and a river flow rate sensor is selected in a river.
3. The method for digital twin deployment of an ecological environment monitoring sensor according to claim 1, wherein: in step 3, the performance evaluation index specifically includes a monitoring value range, a signal transmission distance and a resolution of the sensor.
4. The method for digital twin deployment of an ecological environment monitoring sensor of claim 3, wherein: based on the isomerism of the evaluation indexes, different evaluation indexes are normalized by a quantification normalization method.
5. The method for digital twin deployment of an ecological environment monitoring sensor according to claim 1, wherein: step 7, after the optimal set for optimizing and deploying the environmental monitoring sensors in the complex scene is obtained, selecting a scheme with the maximum performance parameter in the corresponding optimal solution set as an optimization result to be visualized for the air temperature sensor and the road pressure sensor; and for the rainfall sensor and the river flow rate sensor, selecting a scheme with the largest cost parameter in the corresponding optimal solution set as an optimization result to be visualized.
6. The method for digital twin deployment of an ecological environment monitoring sensor according to claim 1, wherein: in the step 8, a TXT text file is used as a middleware to realize data communication of a Unity virtual development engine and a Matlab genetic algorithm programming environment, an optimal deployment scheme is selected in the Matlab genetic algorithm programming environment, and corresponding data is imported into an external appointed TXT text file; writing a script in a text component corresponding to the Unity virtual development engine to read the TXT text file, and displaying data; when the parameters of the optimal deployment scheme are changed, the optimization result is changed along with the parameters, and the parameters are dynamically updated to the visualization platform for display.
7. An environmental monitoring sensor deployment system based on digital twinning, which is characterized in that: the system is for implementing the digital twin deployment method of the ecological environment monitoring sensor of any one of claims 1-6.
8. A digital twinning-based environmental monitoring sensor-deployment system in accordance with claim 7, wherein: the environment monitoring sensor deployment system based on digital twinning is built based on a Unity virtual development engine and a Matlab genetic algorithm programming environment, and data communication is achieved by using a TXT text file as a middleware.
CN202310157411.0A 2022-12-07 2023-02-23 Digital twin deployment method and system for ecological environment monitoring sensor Active CN115859838B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2022115662019 2022-12-07
CN202211566201.9A CN115563890A (en) 2022-12-07 2022-12-07 Environment monitoring sensor deployment method and experiment platform based on digital twins

Publications (2)

Publication Number Publication Date
CN115859838A CN115859838A (en) 2023-03-28
CN115859838B true CN115859838B (en) 2023-05-05

Family

ID=84770664

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202211566201.9A Pending CN115563890A (en) 2022-12-07 2022-12-07 Environment monitoring sensor deployment method and experiment platform based on digital twins
CN202310157411.0A Active CN115859838B (en) 2022-12-07 2023-02-23 Digital twin deployment method and system for ecological environment monitoring sensor

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202211566201.9A Pending CN115563890A (en) 2022-12-07 2022-12-07 Environment monitoring sensor deployment method and experiment platform based on digital twins

Country Status (1)

Country Link
CN (2) CN115563890A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110445762A (en) * 2019-07-10 2019-11-12 湖北省协诚交通环保有限公司 Intelligent environment protection monitoring management system in highway network based on Internet of Things

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11493908B2 (en) * 2018-11-13 2022-11-08 Rockwell Automation Technologies, Inc. Industrial safety monitoring configuration using a digital twin
EP3994635A1 (en) * 2019-07-02 2022-05-11 Konux GmbH Monitoring, predicting and maintaining the condition of railroad elements with digital twins
CN111065103B (en) * 2019-12-11 2022-08-02 哈尔滨工程大学 Multi-objective optimization wireless sensor network node deployment method
CN113283095A (en) * 2021-05-31 2021-08-20 中国水利水电科学研究院 Evolutionary digital twin watershed construction method
CN113573322B (en) * 2021-07-23 2022-11-22 杭州电子科技大学 Multi-target area sensor network coverage optimization method based on improved genetic algorithm
CN113806968A (en) * 2021-10-20 2021-12-17 上海无线电设备研究所 Multi-sensor optimized deployment method in complex environment
CN115002788B (en) * 2022-03-30 2024-04-09 西安电子科技大学 Directional sensor network coverage optimization method for road health detection

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110445762A (en) * 2019-07-10 2019-11-12 湖北省协诚交通环保有限公司 Intelligent environment protection monitoring management system in highway network based on Internet of Things

Also Published As

Publication number Publication date
CN115563890A (en) 2023-01-03
CN115859838A (en) 2023-03-28

Similar Documents

Publication Publication Date Title
Sadeghi-Moghaddam et al. New approaches in metaheuristics to solve the fixed charge transportation problem in a fuzzy environment
Wu SimLand: a prototype to simulate land conversion through the integrated GIS and CA with AHP-derived transition rules
Smith-Miles et al. Generating new test instances by evolving in instance space
Zhou et al. Genetic algorithm approach on multi-criteria minimum spanning tree problem
Halim et al. Quantifying and optimizing visualization: An evolutionary computing-based approach
CN110677284A (en) Heterogeneous network link prediction method based on meta path
CN110781933A (en) Visual analysis method for understanding graph convolution neural network
CN104700160A (en) Vehicle route optimization method
EP3561688A1 (en) Hierarchical tree data structures and uses thereof
Masoumi et al. Using an evolutionary algorithm in multiobjective geographic analysis for land use allocation and decision supporting
CN115859838B (en) Digital twin deployment method and system for ecological environment monitoring sensor
CN116226487B (en) Data large screen visualization method and system based on pattern recognition
Shariatpour et al. Urban 3D Modeling as a Precursor of City Information Modeling and Digital Twin for Smart City Era: A Case Study of the Narmak Neighborhood of Tehran City, Iran
Demetriou et al. LandParcelS: A module for automated land partitioning
CN116167254A (en) Multidimensional city simulation deduction method and system based on city big data
CN115048473B (en) Urban information model artificial intelligent service method and system
US20160292300A1 (en) System and method for fast network queries
EP3979092A1 (en) Method for querying indexed, partitioned dimension tables
Morgan et al. Using binary space partitioning to generate urban spatial patterns
Owaki et al. Road Network Generation with City Block Attributes Using Link Attribute Aggregation
Heppenstall et al. Evolutionary algorithms
Foroutan et al. Urban growth modeling based on cellular automata with transition rules optimized using genetic fuzzy systems
CN110659736B (en) Visual system for identifying evolution algorithm parameterized effect
Sietchiping GIS and cellular automata for urban dynamics
Kumar et al. Cellular automata and Genetic Algorithms based urban growth visualization for appropriate land use policies

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant