AUTOMATIC HISTORY MATCHING SYSTEM AND METHOD FOR AN OIL RESERVOIR BASED ON TRANSFER LEARNING
20220341306 · 2022-10-27
Inventors
- Kai Zhang (Dongying City, CN)
- Jun Yao (Dongying City, CN)
- Guoxin Li (Dongying City, CN)
- Xia Yan (Dongying City, CN)
- Bingxuan Liu (Dongying City, CN)
- Junrong Liu (Dongying City, CN)
- Wei Wang (Dongying City, CN)
- Hui Zhao (Dongying City, CN)
- Chuanjin Yao (Dongying City, CN)
- Yanlai Li (Dongying City, CN)
- Zhiwei Wang (Dongying City, CN)
- Ji Qi (Dongying City, CN)
- Xiaopeng Ma (Dongying City, CN)
- Yunqi Jiang (Dongying City, CN)
Cpc classification
E21B43/30
FIXED CONSTRUCTIONS
E21B2200/20
FIXED CONSTRUCTIONS
E21B43/00
FIXED CONSTRUCTIONS
International classification
Abstract
The present invention relates to an automatic history matching system for an oil reservoir based on transfer learning, comprising a data reading module, a population reinitializing module, an optimization module, a simulated calculation module, a comparative judgment module and an output module, wherein the data reading module reads an optimized result of an existing oil reservoir, outputs the optimized result to the population reinitializing module, obtains an initial population of a new oil reservoir by calculation and outputs the initial population to the optimization module; the optimized result is outputted to the simulated calculation module to obtain oil reservoir production simulated data, and the oil reservoir production simulated data is outputted to the comparative judgment module; when an error between the simulated data and observed data meets the requirement, the optimized result is outputted to the output module, and the system operation is completed; and if the error does not meet the requirement, optimization will be performed again. The present invention may construct the initial population closer to the optimized result by using experience of adjusting a history matching model in an old example oil reservoir model according to the matching experience of an existing model, and can be integrated with any one evolutionary optimization algorithm, so the system is more suitably applied to an actual engineering problem.
Claims
1. An automatic history matching system for an oil reservoir based on transfer learning, comprising a data reading module, a population reinitializing module, an optimization module, a simulated calculation module, a comparative judgment module and an output module; and characterized in that: the data reading module reads an optimized result of an existing oil reservoir, outputs the optimized result to the population reinitializing module, obtains an initial population of a new oil reservoir by calculation and outputs the initial population to the optimization module; the optimized result is outputted to the simulated calculation module to obtain oil reservoir production simulated data, and the oil reservoir production simulated data is outputted to the comparative judgment module; when an error between the simulated data and observed data meets the requirement, the optimized result is outputted to the output module, and the system operation is completed; and if the error does not meet the requirement, the simulated result is outputted to the optimization module, and optimized calculation of the optimization module, the simulated calculation module and the comparative judging module is performed again.
2. The automatic history matching system for an oil reservoir based on transfer learning according to claim 1, characterized in that: the data reading module is configured to read oil reservoir observed data at a moment (t+1) and the optimized results of the history matching model at a moment (t−2), a moment (t−1) and a moment t, and output the observed data and optimized results to the population reinitializing module; the population reinitializing module is configured to process the optimized result at the moment t by using a reinitializing policy with directivity and random change based on transfer learning at the moment (t+1) to obtain the initial population using experience of adjusting a history matching model in an old optimized example, which is used for the optimization module to optimize the oil reservoir model at the moment (t+1) subsequently; the optimization module is configured to optimize according to the oil reservoir observed data and the initial population at the moment (t+1) to obtain a static parameter of an oil reservoir model optimized at the current moment and output the static parameter to the subsequent simulated calculation module; the simulated calculation module is configured to perform numerical simulation calculation on the static parameter to the subsequent simulated calculation module obtained by the optimization module to obtain a simulated production result, i.e., simulated data, and output the simulated production result to the comparative judging module; the comparative judging module is configured to compare the simulated data with the observed data at the current moment to obtain an error, and judge whether the error is lower than a preset error value; if yes, go to the output module, and if not, go to the optimization module to perform iterative calculation again; and the output module is configured to output the optimized static parameter of the oil reservoir history matching model, i.e., a final optimized result when the error is lower than the preset error value.
3. The automatic history matching system for an oil reservoir based on transfer learning according to claim 1, characterized in that: the population reinitializing module specifically comprises a controlled translation unit, a directional variation unit and a random variation unit, wherein the controlled translation unit is configured to calculate a translation vector c.sub.dd.sup.(t) and translate the optimized result at the moment t, i.e., an optimized population, to obtain a repositioned population individual; the directive vacation unit is configured to calculate a random vector N(1, σ.sub.d.sup.2) and perform random variation on all the population individuals processed by the controlled translation unit in a direction of the translation vector; and the random variation unit is configured to calculate an average distance
4. The automatic history matching system for an oil reservoir based on transfer learning according to claim 1, characterized in that: the optimization module specifically comprises a construction unit, an initialization unit, an updating unit, a judging unit and an optimum value output unit, wherein the construction unit is configured to construct a target function (a loss function) of the oil reservoir, the target function being determined according to a specific history matching model construction requirement of the oil reservoir; the initialization unit is configured to initialize the parameter and set an optimization stopping condition, the parameter at least comprising a number of iterations and a population scale; the updating unit is configured to update a reference point and a population according to a preset algorithm rule condition; the judging unit is configured to judge whether the optimization stopping condition is met; if yes, go to the optimum value output unit, and if not, go to the updating unit; and the optimum value output unit is configured to output to the simulated calculation module the optimum target function value and the optimized static parameter of the oil reservoir corresponding to the optimum target function value.
5. An automatic history matching method for an oil reservoir based on transfer learning, adopting the automatic history matching system for an oil reservoir based on transfer learning according to any of claim 1, characterized in that the method comprises the steps of: S1, reading observed data and an optimized result of an old model; S2, performing population reinitializing processing on the optimized result of the old model; and S3, performing evolutionary optimization calculation and simulated calculation by using the reinitialized population.
6. The automatic history matching method for an oil reservoir based on transfer learning according to claim 5, characterized in that S1 comprises the specific steps of: realized by the data reading module in the automatic history matching system for an oil reservoir based on transfer learning; assuming that the current moment is the moment (t+1), wherein the history matching model used by the oil reservoir at present is a t moment model, and as the oil reservoir at the moment (t+1) changes or the oil reservoir model is added with novel data, it is necessary to construct the history matching model for a current situation of the oil reservoir at the moment (t+1); reading the observed data of the oil reservoir at the moment (t+1) and providing preparation to judge whether the optimized result meets the requirement; and reading the optimized results of the history matching models at the moment (t−2), the moment (t−1) and the moment t, and constructing the initial population for the optimization process at the moment (t+1) by using its useful information for reference.
7. The automatic history matching method for an oil reservoir based on transfer learning according to claim 5, characterized in that S2 comprises the specific steps of: realized by the reinitializing module in the automatic history matching system for an oil reservoir based on transfer learning; processing the optimized result of the history matching model of the oil reservoir at the moment t by using a reinitializing policy with directivity and random change based on transfer learning; extracting experience used as reference thereof; and constructing an initial population of a case at the moment (t+1).
8. The automatic history matching method for an oil reservoir based on transfer learning according to claim 5, characterized in that S3 comprises the specific steps of: setting an optimized target function that meets a specific requirement of the case at the moment (t+1), specific optimization indexes comprising, for example, oil production, water production and water content, and a formula (1) giving a loss function of the history matching model of a reservoir:
{M=Σ(Q.sub.obs−Q.sub.cal).sup.2} (1) where M is an unmatched value, Q.sub.obs is true observed data of the oil reservoir, and Q.sub.cal is simulated calculation data obtained by the simulated calculation module in the automatic history matching system for an oil reservoir based on transfer learning in the present invention; by using the population obtained in the S2 as the initial population in the optimization process of the history matching model of the oil reservoir at the moment (t+1), using any one evolutionary optimization algorithm, for example, PSO and NSGA-III to optimize the history matching model of the oil reservoir at the moment (t+1) and adjusting the parameter thereof to obtain the optimized result at the moment (t+1), wherein the evolutionary optimization algorithm is realized by the optimization module in the automatic history matching system for an oil reservoir based on transfer learning; and putting the optimized result into a reservoir numerical simulation for simulated calculation, wherein if an error between the observed data and the simulated data meets the requirement, an effective effect may be outputted, and on the contrary, iterative calculation is performed continuously; and it is realized by adopting the simulated calculation module and the comparative judging module in the automatic history matching system for an oil reservoir based on transfer learning.
9. The automatic history matching method for an oil reservoir based on transfer learning according to claim 5, characterized in that S2 specifically comprises: S21, controlled translation calculating centroids of the optimum solution sets at three moments: C.sup.(t−2), C.sup.(t−1) and C.sup.(t) respectively according to optimum solution sets at the moment (t−2), the moment (t−1) and the movement t, making C.sup.(t)−C.sup.(t−1) to obtain a vector d.sup.(t), and making C.sup.(t−1)−C.sup.(t−2) to obtain a vector d.sup.(t−1); making C.sup.(t−1)+d.sup.(t+1) to obtain a vector b, defining an included angle between b and d.sup.(t) as cos.sup.−1c.sub.d, and calculating c.sub.d and further calculating a translation vector c.sub.dd.sup.(t), wherein all solutions in the optimum solution set at the moment t, i.e., all individuals and translation vectors in the optimized population at the moment t are added to reposition according to amplitude and direction of the translation vectors; tracking movement of the optimum solution sets at the moment (t−2), the moment (t−1) and the moment t, thereby providing experience of being transferred to the optimum solution set that predicts a new problem at the moment (t+1); first, calculating movement of the optimized population individual at the moment t, wherein as shown in a formula (2), C.sup.(t) and C.sup.(t−1) are centroids of the population individual at the moment t and the moment (t−1);
d.sup.t=C.sup.(t)−C.sup.(t−1) (2) a predicted value C.sup.(t+1) is a centroid of the population individual in the optimums solution set at the moment (t+1), wherein a calculation method thereof is as shown in a formula (3),
y.sub.j=x.sub.j.sup.*(t)+c.sub.dd.sup.(t).Math.N(1, σ.sub.d.sup.2), j=1, 2, . . . ,N.sub.s (4) where y.sub.j is a population subject to controlled translation and directional variation, N(1, σ.sub.d.sup.2) is an independent random number vector sample in normal distribution, a mean value thereof being 1, and a standard deviation being σ.sub.d; N.sub.s is a size of population, and x.sub.j.sup.*(t) is the j.sup.th individual in the old optimum solution set at the moment t; under a default condition, the standard deviation is 1, and if y.sub.j is not in a search space, it is only needed to reposition y.sub.i to the nearest point in the search space; and in the repositioning process, whether each element of y.sub.j falls within the search space is judged, and if not, it is modified to an upper/lower bound value corresponding to the element; and S23, random variation applying completely random variable to all the population individuals processed in S22 to form an initial population of a new example (an example at the moment (t+1), the amplitude of random variation being determined by a mean value
σ.sub.r=c.sub.r
x.sub.j.sup.new˜N(y.sub.j,σ.sub.r.sup.2, L, U), j=1, 2, . . . ,N.sub.s (5) where c.sub.r is a self defined value, x.sub.j.sup.new is an initial population processed by the reinitializing policy with directivity and random change based on transfer learning at the moment (t+1), used for optimizing the history matching model of the oil reservoir at the moment (t+1), which is generated by using truncated normal distribution, wherein a center thereof is y.sub.j, a standard deviation is σ.sub.r, a lower bound is a lower bound (L) of the search space and an upper bound is an upper bound (U) of the search space.
10. The automatic history matching method for an oil reservoir based on transfer learning according to claim 5, characterized in that: the method for calculating the initial population of the oil reservoir model at the moment (t+1) comprises the specific steps of: calculating a translation vector according to a formula (2); calculating c.sub.d according to a formula (3); calculating y.sub.j according to a formula (4), and modifying the same according to the method in the S22 if it is not in the search space; and calculating a population reinitializing result according to a formula (5).
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
DETAILED DESCRIPTION OF THE EMBODIMENTS
[0025] As shown in
[0026] The data reading module is configured to read oil reservoir observed data at a moment (t+1) and the optimized results of the history matching model at a moment (t−2), a moment (t−1) and a moment t, and output the observed data and optimized results to the population reinitializing module; in the present invention, the optimum static parameter of the history matching model of the oil reservoir at the current moment is the optimized population individual and is also the optimum solution set of the optimized model;
[0027] the population reinitializing module is configured to process the optimized result at the moment t by using a reinitializing policy with directivity and random change based on transfer learning at the moment (t+1) to obtain the initial population using experience of adjusting a history matching model in an old optimized example, which is used for the optimization module to optimize the oil reservoir model at the moment (t+1) subsequently;
[0028] the optimization module is configured to optimize according to the oil reservoir observed data and the initial population at the moment (t+1) to obtain a static parameter of an oil reservoir model optimized at the current moment and output the static parameter to the subsequent simulated calculation module;
[0029] the simulated calculation module is configured to perform numerical simulation calculation on the static parameter to the subsequent simulated calculation module obtained by the optimization module to obtain a simulated production result, i.e., simulated data, and output the simulated production result to the comparative judging module;
[0030] the comparative judging module is configured to compare the simulated data with the observed data at the current moment to obtain an error, and judge whether the error is lower than a preset error value; if yes, go to the output module, and if not, go to the optimization module to perform iterative calculation again;
[0031] the output module is configured to output the optimized static parameter of the oil reservoir history matching model, i.e., a final optimized result when the error is lower than the preset error value.
[0032] The population reinitializing module specifically comprises a controlled translation unit, a directional variation unit and a random variation unit, wherein
[0033] the controlled translation unit is configured to calculate a translation vector c.sub.dd.sup.(t) and translate the optimized result at the moment t, i.e., an optimized population, to obtain a repositioned population individual;
[0034] the directive vacation unit is configured to calculate a random vector N(, σ.sub.d.sup.2) and perform random variation on all the population individuals processed by the controlled translation unit in a direction of the translation vector; and
[0035] the random variation unit is configured to calculate an average distance
[0036] The optimization module specifically comprises a construction unit, an initialization unit, an updating unit, a judging unit and an optimum value output unit, wherein
[0037] the construction unit is configured to construct a target function (a loss function) of the oil reservoir, the target function being determined according to a specific history matching model construction requirement of the oil reservoir;
[0038] the initialization unit is configured to initialize the parameter and set an optimization stopping condition, the parameter at least comprising a number of iterations and a population scale;
[0039] the updating unit is configured to update a reference point and a population according to a preset algorithm rule condition;
[0040] the judging unit is configured to judge whether the optimization stopping condition is met; if yes, go to the optimum value output unit, and if not, go to the updating unit.
[0041] The optimum value output unit is configured to output to the simulated calculation module the optimum target function value and the optimized static parameter of the oil reservoir corresponding to the optimum target function value.
[0042] In the whole automatic history matching system for an oil reservoir based on transfer learning, the data reading module reads an optimized result of an existing oil reservoir, outputs the optimized result to the population reinitializing module, obtains an initial population of a new oil reservoir by calculation and outputs the initial population to the optimization module; the optimized result is outputted to the simulated calculation module to obtain oil reservoir production simulated data, and the oil reservoir production simulated data is outputted to the comparative judgment module; when an error between the simulated data and observed data meets the requirement, the optimized result is outputted to the output module, and the system operation is completed; and if the error does not meet the requirement, a simulated result is outputted to the optimization module, and optimized calculation of the optimization module, the simulated calculation module and the comparative judging module is performed again.
[0043] An automatic history matching method for an oil reservoir based on transfer learning adopting the automatic history matching system for an oil reservoir based on transfer learning, wherein the method comprises the steps of:
[0044] S1, reading observed data and an optimized result of an old model, realized by the data reading module in the automatic history matching system for an oil reservoir based on transfer learning; assuming that the current moment is the moment (t+1), wherein the history matching model used by the oil reservoir at present is a t moment model, and as the oil reservoir at the moment (t+1) changes or the oil reservoir model is added with new data, it is necessary to construct the history matching model for a current situation of the oil reservoir at the moment (t+1); reading the observed data of the oil reservoir at the moment (t+1) and providing preparation to judge whether the optimized result meets the requirement or not; and reading the optimized results of the history matching models at the moment (t−2), the moment (t−1) and the moment t, and constructing the initial population for the optimization process at the moment (t+1) by using its useful information for reference.
[0045] S2, performing population reinitializing processing on the optimized result of the old model, realized by the reinitializing module in the automatic history matching system for an oil reservoir based on transfer learning; processing the optimized result of the history matching model of the oil reservoir at the moment t by using a reinitializing policy with directivity and random change based on transfer learning; extracting experience used as reference thereof; and constructing an initial population of a case at the moment (t+1).
[0046] S3, performing evolutionary optimization calculation and simulated calculation by using the reinitialized setting an optimized target function that meets a specific requirement of the case at the moment (t+1), specific optimization indexes comprising, for example, oil production, water production and water content, and a formula (1) giving a loss function of the history matching model of a reservoir:
min(M=Σ(Q.sub.obs−Q.sub.cal).sup.2} (1),
[0047] where M is an unmatched value, Q.sub.obs is true observed data of the oil reservoir, and Q.sub.cal is simulated calculation data obtained by the simulated calculation module in the automatic history matching system for an oil reservoir based on transfer learning in the present invention;
[0048] by using the population obtained in the S2 as the initial population in the optimization process of the history matching model of the oil reservoir at the moment (t+1), using any one evolutionary optimization algorithm, for example, PSO and NSGA-III to optimize the history matching model of the oil reservoir at the moment (t+1) and adjusting the parameter thereof to obtain the optimized result at the moment (t+1), wherein the evolutionary optimization algorithm is realized by the optimization module in the automatic history matching system for an oil reservoir based on transfer learning; and
[0049] putting the optimized result into a reservoir numerical simulation for simulated calculation, wherein if an error between the observed data and the simulated data meets the requirement, an effective effect may be outputted, and on the contrary, iterative calculation is performed continuously; and it is realized by adopting the simulated calculation module and the comparative judging module in the automatic history matching system for an oil reservoir based on transfer learning.
[0050] Further, S2 specifically comprises:
[0051] S21, controlled translation
[0052] calculating centroids of the optimum solution sets at three moments: C.sup.(t−−2), C.sup.(t−1)and C.sup.(t) respectively according to optimum solution sets at the moment (t−2), the moment (t−1) and the movement t, making C.sup.(t)−C.sup.(t−1) to obtain a vector d.sup.(t), and making C.sup.(t−1)−C.sup.(t−2) to obtain a vector d.sup.(t−1); making C.sup.(t−1)+d.sup.(t−1) to obtain a vector b, defining an included angle between b and d.sup.(t) as cos.sup.−1c.sub.d, and calculating c.sub.d and further calculating a translation vector c.sub.dd.sup.(t), wherein all solutions in the optimum solution set at the moment t, i.e., all individuals and translation vectors in the optimized population at the moment t are added to reposition according to amplitude and direction of the translation vectors;
[0053] tracking movement of the optimum solution sets at the moment (t−2), the moment (t−1) and the moment t, thereby providing experience of being transferred to the optimum solution set that predicts a new problem at the moment (t+1); first, calculating movement of the optimized population individual at the moment t, wherein as shown in a formula (2), C.sup.(t) and C.sup.(t−1) are centroids of the population individual at the moment t and the moment (t−1);
d.sub.t=C.sup.(t)−C.sup.(t−1) (2)
[0054] a predicted value C.sup.(t−1) is a centroid of the population individual in the optimums solution set at the moment (t+1), wherein a calculation method thereof is as shown in a formula (3),
[0055] where 0≤c.sub.d≤1 represents reliability that d.sup.(t) is taken as an evaluated value of d.sup.(t+1); as the two are usually different in both amplitude and direction, precise calculation may not be performed on the true d.sup.(t+1) in the stage; a predicted vale of d.sup.(t−1) to C.sup.(t) after moment change is analyzed; it can be seen from the controlled translation schematic diagram that C.sup.(t−l) is moved directly with an accurate value close to Co according to direction and amplitude of d.sup.(t−1), wherein C.sup.(t−1) arrives a wrong point X; therefore, ∥b∥/∥d(.sup.t−1)∥may calculate prediction reliability of d.sup.(t−1) to C.sup.(t), and the reliability is used to predict translation of C.sup.(t) along a direction of d.sup.(t) to obtain a distance of C.sup.(t+1);
[0056] S22, directional variation
[0057] performing random variation on all the population individuals processed in the S21 in a direction of the translation vector c.sub.dd.sup.(t), the change intensity thereof being amplitude of the translation vector multiplied with an independent random number vector N(1, σ.sub.d.sup.2) sampled in normal distribution, wherein direction change is adopted as a specific form of random change to improve diversity of population obtained as the population translates along the direction of do, specifically as shown in a formula (4):
y.sub.j=x.sub.j.sup.*(t)+c.sub.dd.sup.(t).Math.N(1,σ.sup.2.sub.d), j=1, 2, . . . ,N.sub.s (4)
[0058] where y.sub.j is a population subject to controlled translation and directive variation, N(1, σ.sub.d.sup.2) is an independent random number vector sample in normal distribution, a mean value thereof being 1, and a standard deviation being σ.sub.d; N.sub.s is a size of population, and x.sub.j.sup.*(t) is the j.sup.th individual in the old optimum solution set at the moment t; under a default condition, the standard deviation is 1, and if y.sub.j is not in a search space, it is only needed to reposition y.sub.i to the nearest point in the search space; and in the repositioning process, whether each element of y.sub.j falls within the search space is judged, and if not, it is modified to an upper/lower bound value corresponding to the element; and
[0059] S23, random variation
[0060] applying completely random variable to all the population individuals processed in S22 to form an initial population of a new example (an example at the moment (t+1), the amplitude of random variation being determined by a mean value
[0061] wherein each population goes through uniform random change to generate white noise, intensity of which being determined by amplitude of random change; a calculating process is shown in
σ.sub.r=c.sub.r
x.sub.j.sup.new˜N(y.sub.j,σ.sub.r .sup.2, L, U),j=1, 2, . . . ,N.sub.s (5)
[0062] where c.sub.r is a self defined value; x.sub.j.sup.new is an initial population processed by the reinitializing policy with directivity and random change based on transfer learning at the moment (t+1), used for optimizing the history matching model of the oil reservoir at the moment (t+1), which is generated by using truncated normal distribution, wherein a center thereof is y.sub.j, a standard deviation is σ.sub.r, a lower bound is a lower bound (L) of the search space and an upper bound is an upper bound (U) of the search space.
[0063] The method for calculating the initial population of the oil reservoir model at the moment (t+1) specifically comprises:
[0064] {circle around (1)} a translation vector is calculated according to a formula (2);
[0065] {circle around (2)} c.sub.d is calculated according to a formula (3);
[0066] {circle around (3)} y.sub.j is calculated according to a formula (4), and modifying the same according to the method in the S22 if it is not in the search space; and
[0067] {circle around (4)} a population reinitializing result is calculated according to a formula (5).
[0068] Embodiment 1 The automatic history matching method for the oil reservoir based on transfer learning is primarily researched and experimented to inspect its effect. An experimental model is a reservoir model set by Eclipse, gridding distribution is 10*10*1, a dimension of a single gridding is 100*100*20 inches, and the model has four production wells and one water injection well distributed in a five point well pattern. The four production wells are respectively located at four corners of the gridding and the water injection well is located at the right center of the gridding. It may be observed that the permeability changes greatly when the time step changes, as shown in
[0069] When four specific objectives: oil production, reservoir pressure, water cut and liquid production are considered, a simulation result is as shown in