Sampling method for optimizing the spatial layout of load sample points
By hierarchically random sampling of the cumulative distribution function of the load variable and adjusting the minimum distance variance, uniform distribution of load sample points is achieved, and the problem of uneven spatial layout of load sample points in the prior art is solved, and the calculation efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202111106130.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-22
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2041-09-22
AI Technical Summary
When considering the structural response under dynamic environmental loads, existing Monte Carlo sampling has problems such as large repeatability and slow iteration. Latin hypercube sampling cannot effectively capture the data characteristics of all spatial locations, resulting in a reduced calculation accuracy and an urgent need for a load. A sampling method with uniform spatial layout of sample points to obtain reasonable representative sample points.
By performing stratified random sampling of the cumulative distribution function of the load variable, the minimum distance variance of the load sample points is calculated and adjusted until the combination of load sample points with the optimal spatial layout is achieved, so as to achieve uniform distribution of load sample points.
This method breaks out of local optimal defects and realizes uniform distribution of load sample space. It is suitable for high-dimensional algorithms, saves calculation time, and provides an efficient load uncertainty sample extraction method, which has practical engineering significance.
Smart Images

Figure CN113987745B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of random sampling technology, and in particular to a sampling method for optimizing the spatial layout of load sample points. Background Art
[0002] Various uncertain factors are ubiquitous in engineering practice, such as external loads on structures. These dynamic or uncertain factors often lead to failure of structural design. When considering the structural response under dynamic environmental loads, it is necessary to obtain load samples with uniform spatial distribution and establish a mathematical model to effectively describe these uncertain information. At present, Monte Carlo sampling has problems such as high repeatability and slow iteration; Latin hypercube sampling cannot effectively capture the data characteristics of all spatial positions, thereby reducing the subsequent calculation accuracy. Therefore, a sampling method with uniform spatial distribution of load samples is urgently needed to obtain reasonable representative sample points for subsequent research on complex problems such as uncertainty in dynamic environments. Summary of the invention
[0003] The present application provides a sampling method for optimizing the spatial layout of load sample points. Its technical purpose is to achieve a uniform spatial distribution of load sample points under the randomness of load data, so as to provide reasonable data points for studying uncertainty problems.
[0004] The above technical objectives of this application are achieved through the following technical solutions:
[0005] A sampling method for optimizing the spatial layout of load sample points, comprising:
[0006] S1: Perform stratified random sampling on the cumulative distribution function values of the load variables to obtain the cumulative distribution probability value;
[0007] S2: taking the inverse function of the cumulative distribution function and substituting it into the cumulative distribution probability value to obtain a corresponding first load sample point combination;
[0008] S3: Calculate the minimum distance between each load sample point and the remaining load sample points in the first load sample point combination, and calculate the variance of the minimum distance of all load sample points;
[0009] S4: adjusting part of the sample data combinations in the first load sample point combination to reduce the variance until the variance of the minimum distance of all load sample points cannot be reduced any further, thereby obtaining a load sample point combination with an optimal spatial layout.
[0010] The beneficial effects of the present application are as follows: the sampling method for optimizing the spatial layout of load sample points described in the present application takes into account the variance of all minimum distances, can avoid the defects of local optimality, achieve uniform distribution of load sample space, and provide reasonable sample points for subsequent fitting calculations; in high-dimensional algorithms, the idea of step-by-step optimization is adopted to ensure that when the load variables are increased, there is no need to re-extract the load sample points, thereby retaining the validity of the original load data and saving calculation time; a method is provided for efficiently solving the problem of load uncertainty sample extraction, which has practical engineering significance. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 A flowchart of the method described in this application;
[0012] Figure 2 This is a schematic diagram of the distribution of the thermal sample in step (1) of a specific embodiment of the present application;
[0013] Figure 3 This is a schematic diagram of the distribution of thermal noise samples after optimizing the spatial layout in step (2) of a specific embodiment of the present application;
[0014] Figure 4 This is a variance variation diagram of all minimum distances in step (2) of the specific embodiment of the present application. DETAILED DESCRIPTION
[0015] The technical solution of the present application will be described in detail below with reference to the accompanying drawings.
[0016] Figure 1 Flow chart of the sampling method for optimizing the spatial layout of load sample points described in this application, such as Figure 1 As shown, the sampling method includes:
[0017] Step S1: Perform stratified random sampling on the cumulative distribution function values of the load variables to obtain the cumulative distribution probability value.
[0018] Specifically, the step S1 includes:
[0019] According to the probability distribution of the load variable, the cumulative distribution function of the load variable is generated, and the cumulative distribution function with a value interval of [0,1] is equally divided to obtain m sub-intervals. Each sub-interval is randomly sampled to obtain the cumulative distribution probability value P i (x) is:
[0020]
[0021] Among them, P i (x) represents the i-th cumulative distribution probability value, rand(1, 1) represents a random number in the range [0, 1], and m represents the number of equally divided subintervals.
[0022] Step S2: Obtain an inverse function of the cumulative distribution function and substitute the cumulative distribution probability value into the cumulative distribution probability value to obtain a corresponding first load sample point combination.
[0023] Specifically, the step S2 includes:
[0024] x i =F -1 (P i (x))
[0025] Among them, x i represents the sample value of the i-th load sample point, i∈[1,n], n represents the total number of load sample points, then all x i Constitute the first load sample point combination; F -1 Represents the inverse of the cumulative distribution function.
[0026] Step S3: Calculate the minimum distance between each load sample point in the first load sample point combination and the remaining load sample points, and calculate the variance of the minimum distances of all load sample points.
[0027] Specifically, step S3 includes:
[0028] S31: Calculating the minimum distance between each load sample point in the first load sample point combination and the remaining load sample points, including:
[0029]
[0030] di=min(dij)
[0031] Wherein, dij represents the distance between load sample point i and load sample point j, i∈[1,n], j∈[1,n], and i≠j; l represents the sample dimension, where l=2; di represents the minimum distance between the i-th load sample point and the remaining n-1 load sample points.
[0032] S32: Calculate the variance of the minimum distance of all load sample points as:
[0033]
[0034] Among them, Var(d) represents the variance of all minimum distances, Represents the average of the minimum distances.
[0035] Step S4: adjusting part of the sample data combinations in the first load sample point combination to reduce the variance until the variance of the minimum distance of all load sample points cannot be reduced any further, thereby obtaining a load sample point combination with an optimal spatial layout.
[0036] Specifically, step S4 includes:
[0037] S41: Count all minimum distances, then D = [d1, d2, ..., di, ...dn]; where di represents the minimum distance between the i-th load sample point and the remaining load sample points, and D represents the vector composed of all minimum distances.
[0038] S42: Find the maximum value and the minimum value among all minimum distances, then minD=min(D), maxD=max(D); wherein minD represents the minimum value in vector D, and maxD represents the maximum value in vector D.
[0039] S43: Obtain the load sample points corresponding to minD and maxD respectively, exchange the high-dimensional data of the load sample points corresponding to minD and maxD respectively, generate new load sample points, and obtain a second load sample point combination.
[0040] S44: Compare the variances of all minimum distances between the first load sample point combination and the second load sample point combination. If the variance corresponding to the second load sample point combination is smaller, go to step S41 and execute again; if the variance corresponding to the first load sample point combination is smaller, go to step S45.
[0041] S45: If there are 2 or more elements remaining in the current vector D, remove the maximum value maxD and the minimum value minD in the current D, and then select a new maximum value maxD and a new minimum value minD from the vector D, and go to step S43; if the number of remaining elements in the current vector D is less than 2, go to step S46.
[0042] In step S45, removing the maximum value maxD and the minimum value minD in the current D means ignoring the maximum value maxD and the minimum value minD in the current D, and then selecting a new maximum value maxD and a new minimum value minD in the vector D, and then turning to step S43, obtaining the load sample points corresponding to the new minD and the new maxD, exchanging the high-dimensional data of the load sample points corresponding to the new minD and the new maxD, generating new load sample points, and forming a new load sample point combination.
[0043] S46: The current load sample point combination has reached the optimal spatial layout, and the sample results are output.
[0044] As a specific implementation, a high-dimensional layout design is performed on the basis of a low-dimensional one. By only adjusting the high-dimensional data combination of the sample points, a high-dimensional uniform spatial distribution is achieved without changing the original data combination. Then:
[0045] (dij l+1 ) 2=(x j (l+1)-x i (l+1)) 2 +(dij l ) 2
[0046] Right now
[0047]
[0048] di=min (dij l+1 )
[0049] Among them, dij l+1 Represents the distance between load sample point i and load sample point j in l+1 dimension, l≥2.
[0050] The specific embodiment of this application is to calculate the structural response results of a certain thermal protection structure in a multi-field dynamic environment. It is necessary to select load sample points with uniform sample space layout. The design dynamic environment is: the force load is 180~220N, the surface temperature of the structure is 720~880℃, and the environmental noise is 150~180db. In order to consider the worst case, all variables are considered to obey uniform distribution. The sampling method is used to obtain a sampling result under a 2-dimensional (force, heat) combination, such as Figure 2 As shown in the figure, the sampling result of a three-dimensional (force, heat, noise) combination is obtained by using the sampling method of optimizing the spatial layout of load sample points and projected on the force and heat plane, as shown in the figure. Figure 3 shown.
[0051] The sampling method includes the following steps:
[0052] (1) First, the cumulative distribution function of the load variable is sampled in a stratified manner, and the corresponding sample points are obtained by taking the inverse function.
[0053] The specific steps include the following:
[0054] 11) Generate the cumulative distribution function of the load variable and divide the value interval [0,1] into 100 equal parts. Randomly sample in each sub-interval to obtain the random probability value:
[0055]
[0056]
[0057]
[0058] Where P i (x) represents the i-th cumulative distribution probability value, and rand(1, 1) is a random number in the range of [0, 1].
[0059] 12) Invert the cumulative distribution function and substitute the probability value P i (x) Get the corresponding load sample point data:
[0060]
[0061]
[0062]
[0063] x i =F -1 (P i (x))
[0064] Among them, x i represents the i-th sample value, F -1 represents the inverse function of the cumulative distribution function. The result of step (1) is as follows Figure 2 shown.
[0065] (2) Calculate the minimum distance between each load sample point and the other load sample points, count all the minimum distances and get the variance value. By adjusting the data combination of the load sample points to reduce the variance, ensure that all the minimum distance values are close, and achieve the goal of uniform distribution of the load sample space.
[0066] The specific steps include the following:
[0067] 21) Calculate the minimum distance between each load sample point and the remaining sample points:
[0068]
[0069] di=min(dij 2 )
[0070] where dij 2 It represents the distance between load sample point i and load sample point j considering force and thermal variables (i∈[1,100]; j∈[1,100], and i≠j), and di represents the minimum distance between the i-th load sample point and the remaining load sample points.
[0071] 22) Count all the minimum distances in (21), and reduce the variance by adjusting the sample data combination corresponding to the maximum and minimum values in the minimum distance, so as to achieve a uniform layout of the sample space:
[0072] ①Count all minimum distances:
[0073] D = [d1, d2, ..., d100]
[0074] Where di represents the minimum distance between the i-th point and the remaining load sample points (i∈[1,100]), and D is the vector composed of all minimum distances;
[0075] ②Find the maximum and minimum values in the minimum distance:
[0076] minD=min(D); maxD=max(D)
[0077] Where minD represents the minimum value in vector D, and maxD represents the maximum value in vector D;
[0078] ③ Find the load sample points corresponding to minD and maxD, and generate new load sample points by exchanging the high-dimensional data of the load sample points;
[0079] ④Compare the variance of all minimum distances of the original sample with the variance of all minimum distances of the new sample. If the variance corresponding to the new sample is smaller, go to ①; if the variance corresponding to the original sample is smaller, go to ⑤;
[0080]
[0081] Among them, Var(d) represents the variance of all minimum distances, represents the average value of the minimum distance, and n represents the number of overall sample points;
[0082] ⑤If there are 2 or more elements remaining in the current vector D, remove the maximum value maxD and the minimum value minD in the current D, and then select a new maximum value maxD and a new minimum value minD from the vector D, and go to step ③; if the number of remaining elements in the current vector D is less than 2, go to step ⑥.
[0083] ⑥ It is considered that the current load sample point is the optimal spatial distribution and the sample results are output. Figure 3 As shown in (a), the variance changes as Figure 4 As shown in (a).
[0084] 23) Based on the low dimension, a high-dimensional uniform spatial layout is performed. The principle is the same as 22). By only adjusting the high-dimensional data combination of the load sample points, a high-dimensional uniform spatial distribution is achieved without changing the original data combination:
[0085]
[0086] di=min(dij 3 )
[0087]
[0088] where dij 3represents the distance between load sample point i and load sample point j under the consideration of force and thermal noise variables (i∈[1,100]; j∈[1,100], and i≠j); the force and thermal noise sample point distribution is as follows Figure 3 As shown in (b), the variance changes as Figure 4 (b) as shown.
[0089] The above are exemplary embodiments of the present application, and the protection scope of the present application is defined by the claims and their equivalents.
Claims
1. A sampling method to optimize the spatial layout of load sample points, It is characterized in that include: S1: Perform stratified random sampling on the cumulative distribution function values of the load variables to obtain the cumulative distribution probability value; S2: taking the inverse function of the cumulative distribution function and substituting it into the cumulative distribution probability value to obtain a corresponding first load sample point combination; S3: Calculate the minimum distance between each load sample point and the remaining load sample points in the first load sample point combination, and calculate the variance of the minimum distance of all load sample points; S4: adjusting part of the sample data combination in the first load sample point combination to reduce the variance, until the variance of the minimum distance of all load sample points cannot be reduced any further, thereby obtaining a load sample point combination with an optimal spatial layout; Wherein, the step S2 comprises: x i =F -1 (P i (x)) Among them, x i represents the sample value of the i-th load sample point, i∈[1,n], n represents the total number of load sample points, then all x i Constitute the first load sample point combination; F -1 Represents the inverse of the cumulative distribution function; The step S3 comprises: S31: Calculating the minimum distance between each load sample point in the first load sample point combination and the remaining load sample points, including: di=min(dij) Wherein, dij represents the distance between load sample point i and load sample point j, i∈[1,n], j∈[1,n], and i≠j; l represents the sample dimension, where l=2; di represents the minimum distance between the i-th load sample point and the remaining n-1 load sample points; S32: Calculate the variance of the minimum distance of all load sample points as: Among them, Var(d) represents the variance of all minimum distances, Represents the average of the minimum distances.
2. The method according to claim 1, It is characterized in that The step S1 comprises: According to the probability distribution of the load variable, the cumulative distribution function of the load variable is generated, and the cumulative distribution function with a value interval of [0, 1] is equally divided to obtain m sub-intervals. Each sub-interval is randomly sampled to obtain the cumulative distribution probability value P i (x) is: Among them, P i (x) represents the i-th cumulative distribution probability value, rand(1, 1) represents a random number in the range [0, 1], and m represents the number of equally divided subintervals.
3. The method according to claim 2, It is characterized in that The step S4 comprises: S41: Count the minimum distances of all current load sample points, then D = [d1, d2, ..., di, ...dn]; where di represents the minimum distance between the i-th load sample point and the remaining load sample points, and D represents the vector composed of all minimum distances; S42: Find the maximum value and the minimum value of all minimum distances, then minD = min(D), maxD = max(D); where minD represents the minimum value in vector D, and maxD represents the maximum value in vector D; S43: Obtain the load sample points corresponding to minD and maxD, exchange the high-dimensional data of the load sample points corresponding to minD and maxD, generate new load sample points, and obtain a second load sample point combination; S44: Compare the variances of all minimum distances between the first load sample point combination and the second load sample point combination. If the variance corresponding to the second load sample point combination is smaller, go to step S41 and execute again; if the variance corresponding to the first load sample point combination is smaller, go to step S45; S45: If there are 2 or more elements remaining in the current vector D, remove the maximum value maxD and the minimum value minD in the current D, and then select a new maximum value maxD and a new minimum value minD from the vector D, and go to step S43; if the number of remaining elements in the current vector D is less than 2, go to step S46; S46: The current load sample point combination has reached the optimal spatial layout, and the sample results are output.
4. The method according to claim 2, It is characterized in that When the load sample points are high-dimensional data, then: (I said l+1 ) 2 (x) j (l+1)-x i (l+1)) 2 +(I said l ) 2 Right now at=min(dij l+1 ) Among them, dij l+1 Represents the distance between load sample point i and load sample point j in l+1 dimension, l≥2.
Citation Information
Patent Citations
Guided missile structure uncertain load interval reconstruction method based on Bayesian theory
CN111177966A
Bimodal three-parameter Weibull distribution fitting method based on random numbers
CN112328971A
Mechanical product structure failure optimization method considering distribution parameter uncertainty
CN113221263A
Method of fast identifying the distribution rule of wind speed
US20190228122A1
Robust optimization design method for mechanical arm based on hybrid interval and bounded probabilistic uncertainties
US20210264078A1
