Random field rapid generation method with arbitrary distribution and spatial correlation
The generation of random fields with arbitrary distribution and spatial correlation through fast Fourier transform and spatial mapping technology solves the shortcomings of the existing methods in terms of generation efficiency, flexibility and complex spatial correlation processing, and realizes efficient and flexible random fields generation, which is suitable for a variety of application scenarios.
Patent Information
- Application Number
- CN202510203907.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-06-27
AI Technical Summary
The existing random field generation methods have shortcomings in the generation efficiency, flexibility and handling complex spatial correlation structures, and it is difficult to quickly generate high-quality random fields, especially in the study of heterogeneous materials and disordered materials.
Fast Fourier transform (FFT) and its inverse transform are used to construct Gaussian random fields with specified correlations, and the random variable samples of any specified distribution are mapped to the location of the Gaussian random field through spatial mapping technology, thereby generating random fields with any specified distribution and spatial correlation.
It realizes efficient, flexible random generation with arbitrary spatial correlation and distribution characteristics, significantly speeds up the generation speed, improves computing efficiency, and is suitable for a variety of application scenarios, such as material modeling, image processing, geological modeling and climate simulation.
Smart Images

Figure CN120216843A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of random field modeling, and in particular, to a method for quickly generating a random field with arbitrary distribution and spatial correlation. Background Art
[0002] In the study of heterogeneous materials and disordered materials, it is usually necessary to generate random fields with specific spatial correlation and distribution characteristics. A random field is a mathematical tool used to describe the distribution of random variables in space or time, and is widely used in fields such as materials science, geology, and meteorology. Its main purpose is to simulate the spatial variation of different physical quantities (such as elastic modulus, thermal conductivity, density, etc.) in materials.
[0003] In heterogeneous materials, physical properties are not uniformly distributed, but there are spatial variability and a certain degree of correlation. In order to accurately study the mechanical behavior, heat conduction properties, fluid permeability and other properties of such materials, it is usually necessary to use random fields to simulate these non-uniformities. Especially in the study of disordered materials, how to efficiently generate random fields that meet specific statistical characteristics and spatial correlations has become a crucial issue.
[0004] Although existing random field generation methods can describe randomness and correlation to a certain extent, they still have certain limitations in the following aspects:
[0005] Low generation efficiency: Many traditional methods (such as the generation method based on Fourier transform, the generation method based on Kriging interpolation, etc.) require a large amount of computing resources, especially in large-scale simulations, the computational cost is too high.
[0006] Poor flexibility: The random fields generated by some methods are difficult to simultaneously meet multiple different statistical characteristics (such as mean, variance, covariance, etc.) and correlations at different spatial scales.
[0007] Difficult to handle complex spatial correlation structures: For materials with complex spatial correlations, existing methods may not be able to efficiently capture their inherent physical laws.
[0008] Therefore, developing a method that can quickly generate high-quality random fields and meet the requirements of arbitrary distribution and spatial correlation is of great significance for the study of heterogeneous materials and disordered materials. Summary of the Invention
[0009] In order to overcome the defects in the above-mentioned prior art, the present invention provides a method for quickly generating a random field with arbitrary distribution and spatial correlation, realizing the generation of a random field with high efficiency, flexibility and arbitrary spatial correlation and distribution characteristics, and providing strong support for the study of heterogeneous materials, disordered materials and their applications in the fields of mechanics, thermotics, etc.
[0010] To achieve the above object, the present invention adopts the following technical solutions, including:
[0011] A method for quickly generating a random field with arbitrary distribution and spatial correlation, including:
[0012] Step 1: Perform a fast Fourier transform according to the specified correlation function C r to obtain the power spectral density function S k ;
[0013] Step 2: Construct a complex number sequence where U is a set of Gaussian random variables;
[0014] Step 3: Transform the complex random variable Φ k to the real space through the inverse fast Fourier transform to obtain two independent Gaussian random fields with the specified correlation;
[0015] Step 4: Generate uncorrelated random numbers f(x) with the specified distribution F(x);
[0016] Step 5: Sort the generated uncorrelated random numbers f(x) with the specified distribution, and map them one by one to the Gaussian random field with the specified correlation generated in Step 3 according to the relative position in space of the numerical relative size, thus obtaining a random field with the specified distribution and spatial correlation.
[0017] Preferably, on a space L with a size of L and a dimension of d d the discrete correlation function C r is expressed as:
[0018] C r =<τ x τ x+r >
[0019] In the formula, <...> represents the mathematical expectation; τ x is a random variable, τ x+r is a random variable whose spatial distance vector from τ x is r, and the correlation between τ x+r and τ x is C r .
[0020] Preferably, using the fast Fourier transform, the discrete power spectral density S r corresponding to the correlation function C k is:
[0021]
[0022] In the formula, is the summation symbol; and are the real part and the imaginary part of Φ k respectively; L is the length of the random field size; the subscript k represents the space where the variable is located, which is the wavenumber space obtained after Fourier transform of the real space, i.e., the frequency space; Φ k is a complex random variable in the wavenumber space after Fourier transform; N is the total number of random variables in the random field.
[0023] Preferably, Φ k is related to the complex random variable in the real space through the following formula:
[0024]
[0025] The relationship expression between the correlation function C r and its Fourier coefficients is:
[0026]
[0027] In the formula, is the complex random variable at position x, is the complex conjugate of.
[0028] Preferably, a complex number sequence is constructed, where U is a set of Gaussian random variables with a mean U> = 0 and a variance
[0029] Preferably, the fast Fourier transform is performed on the complex random variable Φ k to convert the obtained complex random variable Φ k in the frequency space containing the target correlation into two independent random variables and
[0030] Preferably, in step four, random numbers conforming to different distributions are generated by transforming the basic uniform distribution, so as to obtain uncorrelated random numbers f(x) with the target distribution.
[0031] Preferably, in step five, the generated f(x) sample sizes are sorted as f(x1)>f(x2)>f(x3)>…>f(x N ), and are mapped one-to-one with or the samples , and the positions of the elements in f(x) are adjusted according to the positions of the elements in . After the positions are adjusted, the element sizes of f’(x) are distributed as F(x), and its correlation function is C r , thus realizing the generation of a random field with arbitrary distribution and spatial correlation.
[0032] An electronic device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements a method for quickly generating a random field with arbitrary distribution and spatial correlation.
[0033] A computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, they implement the method for quickly generating a random field with arbitrary distribution and spatial correlation. The advantages of the present invention are as follows:
[0034] (1) First, the present invention constructs a Gaussian random field with a specified correlation relationship through the fast Fourier transform (FFT) and its inverse transform, and then maps the samples of random variables with an arbitrarily specified distribution to the positions of the Gaussian random field through a spatial mapping technique, so as to be able to generate a random field with an arbitrarily specified distribution and spatial correlation.
[0035] (2) The present invention provides a method for quickly generating a random field with arbitrary distribution and spatial correlation, which combines the high-efficiency computing ability of FFT and the flexibility of spatial mapping, and realizes the quick generation of a random field with arbitrary distribution and spatial correlation.
[0036] (3) The efficient, flexible generation of a random field with arbitrary spatial correlation and distribution characteristics of the present invention provides strong support for the research of heterogeneous materials, disordered materials and their applications in the fields of mechanics, thermotics, etc.
[0037] (4) The present invention can significantly accelerate the generation speed of the random field. As an efficient algorithm, FFT can greatly reduce the amount of calculation, making it possible to generate a large-scale random field in a multi-dimensional space, thereby improving the overall computing efficiency.
[0038] (5) The present invention allows users to adjust parameters according to actual needs, including specifying correlation functions, power spectral density functions, and the distribution types of random variables, etc. This high degree of flexibility enables the method to be applicable to a variety of different application scenarios, such as material modeling, image processing, geological modeling, and climate simulation, etc.
[0039] (6) By combining Gaussian random variables and uncorrelated random numbers with an arbitrary distribution, and using a spatial mapping technique, the present invention can generate a random field with an arbitrarily specified distribution and spatial correlation. This wide applicability enables the method to play an important role in multiple fields.
[0040] (7) Since the present invention fully considers spatial correlation when generating a random field and ensures the accurate transmission of correlation through FFT and its inverse transform, the generated random field has a high spatial correlation accuracy while maintaining the specified distribution.
[0041] (8) Although the present invention is theoretically complex, it is easy to implement through programming in actual operation. Existing FFT algorithm libraries and random number generation libraries provide strong support for the implementation of this method, enabling users to conveniently apply it to actual projects.
[0042] (9) The present invention performs excellently in the generation of random fields, having the advantages of high efficiency, high flexibility, wide application range, high precision, and easy implementation, making the method of the present invention have broad application prospects and potential value in multiple fields. Description of the Drawings
[0043] Figure 1 Concrete photos at different scales.
[0044] Figure 2 Contour map of the random field of a single concrete sample.
[0045] Figure 3 Flowchart of the algorithm of the embodiment of the present invention.
[0046] Figure 4 Gauss random field with a specified correlation distribution.
[0047] Figure 5 Uncorrelated random field with a Weibull distribution.
[0048] Figure 6 Weibull distribution random field with a specified correlation structure.
[0049] Figure 7 Comparison chart of the correlation function of the random field sample obtained with the specified distribution and the target correlation function. Detailed Embodiment
[0050] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0051] As Figure 3 shown, a method for quickly generating a random field with arbitrary distribution and spatial correlation of the present invention includes the following steps:
[0052] Step 1: Perform a fast Fourier transform according to the specified correlation function C r to obtain the power spectral density function S k .
[0053] Assume a space \(L\) with dimension \(d\) and size \(L\). d , consider the following correlation function:
[0054] \(C\) r \(=\langle\tau\) x \(\tau\) x+r \rangle\)
[0055] where \(\langle...\rangle\) is the mathematical expectation, \(\tau\) x is a random variable, \(\tau\) x+r represents a random variable with a spatial distance vector \(r\) from \(\tau\) x and the correlation between them is \(C\). r . For convenience, the random variable \(\tau\) x is generally selected as a Gaussian random variable, so the mean of the random variable \(\langle\tau\) x \rangle=\langle\tau\rangle = 0\) and the variance Here, \(C\) r is temporarily regarded as an arbitrary correlation function;.
[0056] Using the fast Fourier transform (FFT), the discrete power spectral density \(S\) r corresponding to the correlation function \(C\) k is:
[0057]
[0058] where is the summation symbol, summing over all variables at distances in the \(k\)-space; and are the real and imaginary parts of \(\varPhi\) k respectively; the subscript \(k\) represents the space where the complex random variable is located, which is the wave number space (or frequency space, \(k\)-space) obtained after Fourier transform of the coordinate space (or real space, \(x\)-space); is the exponential term in the Fourier transform, representing the frequency component of the wave; \(i\) is a variable; \(r\) is the distance vector; \(k\) is the space where the wave number is located; \(2\pi\) is the period conversion prefix.
[0059] \(\varPhi\) k is a complex random variable in the wave number space after Fourier transform, and is related to the complex random variable in the real space by the following equation:
[0060]
[0061] Thus, the relationship between the correlation function \(C\) r and its Fourier coefficient can be written as:
[0062]
[0063] In the formula, is a complex random variable at position x, is the complex conjugate of;
[0064] Step 2: Construct a complex number sequence Relate the Gaussian random variable to the Fourier transform; where U is a set of Gaussian random variables with a mean = 0, variance
[0065] Step three: For the complex random variable Φ k Perform a fast Fourier transform, which can convert the obtained k-space (frequency domain space) random variable related to the target into two sets of random variables in the real space (x-space) and And the random field formed by these two sets of independent random variables has a mean of zero and a correlation function of the target C r . Due to the orthogonality of the Fourier transform, these two sets of random variables and Are statistically independent, and each can be associated with the actual random variable τ in Equation C r = <τ x τ x+r > and used for further analysis. At the same time, since U is taken from a Gaussian distribution, the generated random variable after its transformation is also a Gaussian distribution. x
[0066] Use the fast Fourier transform to map the Gaussian random field to the target non-Gaussian distribution. The specific method is to filter the spectrum of the Gaussian random field to control its spatial correlation. Adjust the statistical properties of the random field through frequency domain filtering to make it conform to the target spatial correlation and target distribution characteristics, thereby generating an ideal random field.
[0067] Step four: Generate uncorrelated random numbers f(x) with a specified arbitrary distribution F(x).
[0068] Random numbers that conform to different distributions can be generated by transforming the basic uniform distribution, so as to obtain uncorrelated random numbers with the target distribution. Common random distributions include power-law distribution, Weibull distribution, normal distribution, etc.
[0069] Power-law Distribution: The power-law distribution is often used to describe the phenomena of a large number of complex systems in nature, and its probability density function is:
[0070] f(x) = Cx -α , x ≥ x min , α > 1
[0071] Among them, α is the power-law exponent, C is the normalization constant, x is the random variable, and x min Is the set minimum value of the random variable to prevent the integral from diverging.
[0072] Weibull Distribution: The Weibull distribution is often used to describe material strength and life, and its probability density function is:
[0073]
[0074] Among them, k is the shape parameter and λ is the scale parameter.
[0075] Normal Distribution: The probability density function of the normal distribution is:
[0076]
[0077] Among them, μ is the mean and σ is the standard deviation.
[0078] Step Five: Sort the generated uncorrelated random numbers with a specified arbitrary distribution according to their magnitudes, and map them one by one to the Gaussian random field with specified correlation generated in Step Three based on the relative positions of their numerical relative magnitudes in space. Thus, a random field with a specified distribution and spatial correlation is obtained.
[0079] Sort the generated sample sizes of f(x) as f(x1) > f(x2) > f(x3) > … > f(x N ) and compare with (or ) samples for one-to-one mapping, and adjust the positions of the elements in f(x) according to the positions of the elements in . For example, in a two-dimensional random field: That is, adjust the nth largest element in f(x) to the nth largest element in at the ith row and jth column. For random fields with more than two dimensions, do the same by analogy. After adjusting the positions, the element magnitude distribution of f’(x) is F(x), and its correlation function is C r , thus realizing the generation of a random field with an arbitrary distribution and spatial correlation.
[0080] After establishing the Gaussian spatially correlated random field, according to the non-Gaussian random field distribution of the target, the values of the Gaussian random field can be sorted according to their magnitudes and mapped one by one to the target distribution. Specifically, each value in the Gaussian random field is mapped to the corresponding position in the target non-Gaussian distribution according to its relative magnitude (from small to large) in the overall random field. In this way, the original Gaussian random field can be transformed into a random field that conforms to the specified non-Gaussian distribution while maintaining its original spatial correlation. This process ensures that the spatial correlation structure of the random field and the characteristics of the target distribution can be effectively combined.
[0081] The present invention lies in processing the Gaussian random field in the frequency domain through the fast Fourier transform theory, so as to obtain a random field that meets the requirements of specific spatial correlation, with high computational efficiency and strong flexibility. This method can effectively solve the problems of traditional methods in dealing with materials with complex spatial variability, especially when generating random fields with long-range correlation or specific threshold requirements, showing unique advantages and providing an effective data source for numerical simulation.
[0082] The following further elaborates on the present invention in combination with a case.
[0083] Concrete is one of the most commonly used building materials and is widely used in various infrastructure construction projects. The compressive strength of concrete is an important indicator for evaluating its bearing capacity. However, due to differences in the composition of concrete (such as the proportion of aggregate, sand, fine aggregate, cement, and water) and the mixing and curing processes, the compressive strength of concrete often exhibits strong randomness and spatial heterogeneity. In order to more accurately predict its compressive strength, traditional statistical distribution models often struggle to fully describe this randomness. Thus, a random generation algorithm for arbitrary distribution and spatial correlation is proposed, such as Figure 1 As shown, by comparing concrete models at three different scales (macro scale, meso scale, micro scale), it can be clearly seen that there is strong spatial correlation inside the concrete, as Figure 2 As shown, we present the contour map of the random field with relatively close correlation lengths. Different materials have different correlation lengths, so a parameter of the correlation length is proposed in the algorithm to enable the correlation to characterize the material properties among various materials. Compared with concrete, the correlation length is used to characterize the internal differences of concrete.
[0084] In this case, the target correlation function has the following Gaussian function form:
[0085]
[0086] In the formula, l c = 8, which is the correlation length of the random field.
[0087] According to the correlation function and the methods from step one to step three, a Gaussian random field with a specified Gaussian function correlation distribution is obtained. Its two-dimensional size is 512*512, and its contour map is as Figure 4 shown.
[0088] Record the spatial positions of the elements in this Gaussian random field, that is, the rows and columns in the two-dimensional space where the maximum value, the second-largest value, and so on until the minimum value are located.
[0089] In this case, concrete of grade C30 (i.e., concrete with a compressive strength grade of 30 MPa) was selected for experimental analysis. 30 concrete specimens were obtained for the compressive strength test. The strength measurement values of each specimen were obtained through standard compressive tests, and the measured compressive strength values were between 22 MPa and 45 MPa. The data showed a positive skewed distribution, indicating that the compressive strength of most samples was concentrated in the lower to medium range. The Weibull distribution was used to fit the experimental data. The maximum likelihood estimation (MLE) method was adopted to estimate the parameters of the Weibull distribution, and finally the following parameter values were obtained: shape parameter k = 2.8. The shape parameter determines the tail behavior of the distribution. Finally, the following parameter values were obtained: shape parameter k = 2.8. The shape parameter determines the tail behavior of the distribution. If k is less than 1, the distribution has a long tail, indicating that low strength values are more significant. For k > 1, the tail of the distribution becomes shorter, meaning that the probability of low strength occurrence is lower. In this case, k = 2.8 indicates that the compressive strength of the concrete shows a distribution more concentrated in the medium range with a shorter tail. Scale parameter λ = 35.2 MPa. The scale parameter λ represents the scale size of the material strength distribution. A larger λ value indicates higher material strength. The λ value of 35.2 MPa indicates that the average compressive strength of C30 concrete is on the high side in the experiment and close to the standard strength of this grade of concrete.
[0090] Subsequently, consider the Weibull distribution as follows to describe the random micro-meso tensile strength of concrete materials:
[0091]
[0092] where λ is the scale parameter and k is the shape parameter. The values of λ and k determine the shape and scale of the distribution. Research shows that when k = 2.5 - 3.5 and λ = 2 - 3, the Weibull distribution can better describe the randomness of the tensile properties of C30 concrete materials. Therefore, the parameter values of the Weibull distribution in this case are k = 3 and λ = 2, and the corresponding random field of the Weibull distribution is generated according to these parameters, as Figure 5 shown. Sort the sample sizes of the generated f(x) as f(x1) > f(x2) > f(x3) > … > f(x N ), and map them one by one with (or ) samples and adjust the element positions in f(x) according to the element positions in . For example, in a two-dimensional random field: That is, adjust the nth largest element in f(x) to the nth largest element in The i-th row and j-th column where it is located. For random fields with more than two dimensions, the same principle applies. After adjusting the position, the element size distribution of f’(x) is F(x), and its correlation function is C r , thus realizing the generation of a random field with arbitrary distribution and spatial correlation.
[0093] Adjust the maximum value in the Weibull distribution sample to the position of the maximum value in the two-dimensional space of the Gaussian random field, so that the Weibull distribution sample after adjusting the element position has basically the same correlation as the Gaussian random field. The contour map of the Weibull distribution sample after adjusting the element position is as Figure 6 shown. Calculate the correlation function (Average Sample Correlation) of the Weibull distribution sample after adjusting the element position, and compare it with the target correlation function (TargetCorrelation). As Figure 7 shown, it can be seen that the correlation function of the sample is very consistent with the target correlation function, thus verifying the effectiveness of the method of the present invention.
[0094] Through the above method, the compressive strength distribution map of concrete is successfully generated, providing relatively accurate simulation parameters for the digital simulation of concrete. It can be seen that the contour map of the generated random field has good spatial correlation with the mesoscopic scale and microscopic scale of concrete, and the target sample has a high degree of coincidence with the original correlation function.
[0095] The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for rapidly generating random fields with arbitrary distribution and spatial correlation, characterized in that: include: Step 1: According to the specified correlation function C r Perform fast Fourier transform to obtain the power spectral density function S k ; Step 2: Construct a complex sequence Where U is a set of Gaussian random variables; Step 3: Use the inverse fast Fourier transform to transform the complex random variable Φ k Transform to real space Obtain two independent sets of Gaussian random fields with specified correlations; Step 4: Generate uncorrelated random numbers f(x) with specified distribution F(x); Step 5: Sort the generated uncorrelated random numbers f(x) with specified distribution by size, and map them one by one to the Gaussian random field with specified correlation generated in step 3 through the relative size of the numbers and their relative positions in space, so as to obtain a random field with specified distribution and spatial correlation.
2. A method for rapidly generating a random field with arbitrary distribution and spatial correlation according to claim 1, characterized in that: A space L of size L and dimension d d On the discrete correlation function C r It is expressed as: C r =<τ x t x+r > Where <...> represents the mathematical expectation; τ x is a random variable, τ x+r is x The spatial distance vector is a random variable r, and τ x+r With τ x The correlation between the two is C r .
3. A method for rapidly generating a random field with arbitrary distribution and spatial correlation according to claim 2, characterized in that: Using the Fast Fourier Transform, the correlation function C r The corresponding discrete power spectral density S k for: In the formula, for the summation symbol; and They are Φ k The real and imaginary parts of the random field; L is the length of the random field; the subscript k represents the space where the variable is located, which is the wave number space obtained after Fourier transform of the real space, that is, the frequency space; Φ k is the complex random variable in the wave number space after Fourier transform; N is the total number of random variables in the random field.
4. A method for rapidly generating a random field with arbitrary distribution and spatial correlation according to claim 3, characterized in that: Φ k Through the following formula and the real space complex random variable Contact: Related function C r The relationship between it and its Fourier coefficient is expressed as: In the formula, is a complex random variable at position x, for The complex conjugate of .
5. The method for rapidly generating a random field with arbitrary distribution and spatial correlation according to claim 1, characterized in that: Constructing complex number sequences Where U is a set of Gaussian random variables with mean =0, variance 6. A method for rapidly generating a random field with arbitrary distribution and spatial correlation according to claim 1, characterized in that: For complex random variables Φ k Perform fast Fourier transform and transform the obtained complex random variable Φ in the frequency space containing the target correlation k Transformed into two sets of independent random variables in real space and 7. A method for rapidly generating a random field with arbitrary distribution and spatial correlation according to claim 1, characterized in that: In step 4, random numbers conforming to different distributions are generated by transforming the basic uniform distribution, thereby obtaining uncorrelated random numbers f(x) with target distribution.
8. A method for rapidly generating a random field with arbitrary distribution and spatial correlation according to claim 6, characterized in that: In step 5, the generated f(x) sample sizes are sorted as f(x1)>f(x2)>f(x3)>…>f(x N ), and with or sample One-to-one mapping, and according to The position of the elements in f(x) is adjusted. The element size distribution of f'(x) after the adjustment is F(x), and its correlation function is C r , thereby achieving the generation of random fields with arbitrary distribution and spatial correlation.
9. An electronic device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a method for quickly generating a random field with arbitrary distribution and spatial correlation as described in any one of claims 1 to 8 is implemented.
10. A computer program product, characterized in that It includes a computer program / instruction, which, when executed by a processor, implements a method for quickly generating a random field with arbitrary distribution and spatial correlation as described in any one of claims 1-8.