How about multi-task learning for virtual flow metering?
It can be extremely useful to apply multi-task learning (MTL) to the problem of virtual flow metering (VFM). Why? Because of the inherent non-stationarity of the underlying process. Part 2/5 of the MTL series.
![Author Mathilde Hotvedt Wekre portrait image](https://solutionseeker2021.imgix.net/images/people/mathilde_avatar.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=160&q=90&w=160&s=112d03742687b4a0118a0563fa5b854f)
- Author
- Mathilde Hotvedt Wekre
- Publish date
- · 4 min read
In petroleum production systems, the reservoir is depleted in time. Due to this, the pressure in the reservoir decreases. This in turn causes the pressures in the rest of the production system to decline in time, for instance in each petroleum well. To compensate for the decreasing pressure, petroleum engineers typically increase the choke opening to maintain high production rates. An illustration of this is seen in Figure 1. In the figure, historical data of the choke opening and the pressure upstream the choke is visualized for 55 wells. The data points are colored for one of the wells, indicating the time since the first data point.
![](https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=248&q=90&w=600&s=9de98101c7b7e01fbdbc827b893f1ed5 600w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=290&q=90&w=700&s=f692647bdbaff4c8380cfc2ace5caaca 700w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=331&q=90&w=800&s=fe044b8f252a4a4184119b698b5b5955 800w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=373&q=90&w=900&s=8ab540d7ca3fb393f0d2a0d027415230 900w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=414&q=90&w=1000&s=a855e0f1128fa3eaa430dff7cb649f3e 1000w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=455&q=90&w=1100&s=507b22befe27e6c77f775d4c398dcd0e 1100w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=497&q=90&w=1200&s=96620a21f7461d032fe9d2e1476dbce7 1200w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=538&q=90&w=1300&s=afc605ad19e79ec5997b560db91457f0 1300w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=580&q=90&w=1400&s=1562d2507977fd6c1fe0062ba81c5c02 1400w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=621&q=90&w=1500&s=a63610a1d908d838f12ed409d8c68ada 1500w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=662&q=90&w=1600&s=4e6758e8d4419f2ad12e2dc8fd513c62 1600w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=704&q=90&w=1700&s=08de8e5b67e5d1ae8a62f325ac10f3ae 1700w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=745&q=90&w=1800&s=664ced8faf6d9a26b8423005ff0bd574 1800w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=787&q=90&w=1900&s=62ec3b8252aa00e6f082a6e8a93f6c48 1900w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=828&q=90&w=2000&s=0e0b4ad8e9f99bc2c694946be7205eeb 2000w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=869&q=90&w=2100&s=6abe91ac9b739c08bfb32c337964cb06 2100w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=911&q=90&w=2200&s=e745d0f55084c8642a18eeda621d65f3 2200w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=952&q=90&w=2300&s=29b0fa13ea360a466c2d3a7b1a926db2 2300w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure1.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=994&q=90&w=2400&s=60b96a1b4869bc2e68a1d85dc44df98a 2400w)
Imagine that you want to model a data-driven virtual flow meter solely based on historical sensor data from that well in question. After developing the model, you use it to predict the multiphase flow rates in the future - say one year ahead. What do you think the prediction accuracy would be? In general, I’d say the performance would be poor. How come, you say? Because the future states of the well have never been seen before and are not represented in the historical well data. How can you expect a data-driven model that learns only from data, to do well on data it has never seen before?
A potential fix to this issue is to learn from experiences on other wells. For example, take one chosen well from any petroleum asset. Then, if we have another petroleum well with similar characteristics that is much older than your chosen well, why not learn from the behavior of this well?
We can utilize the historical data from the old well to learn how the chosen well should behave when it ages. This is MTL in a nutshell.
But why stop with one well? Why not let all wells learn from all other wells at a petroleum asset? Or thinking even bigger, why not learn from all other wells in the world? Look at the figure below as an example. The figure illustrates the pressure distribution upstream the choke in the historical data from 55 wells. The vertical dotted lines group wells from four different assets, also indicated by color. Now, as the pressure will decline in time, the orange wells would likely benefit by learning from the green wells.
![](https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=244&q=90&w=600&s=9fb0e858372aefba499b2a5e432b891a 600w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=285&q=90&w=700&s=dfaa789d101fea6b899517097e3b7cb3 700w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=325&q=90&w=800&s=f3a000a84bc511d525cebba9cb79de5e 800w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=366&q=90&w=900&s=3141e1a0b7c05dea487d96a5997f7f6e 900w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=407&q=90&w=1000&s=d6c3b2b871b274415e96fba79666c620 1000w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=447&q=90&w=1100&s=4aa5736b42316bacb304f3e44c0a20d4 1100w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=488&q=90&w=1200&s=c903389345718cbbd23f80517cef4504 1200w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=528&q=90&w=1300&s=937ba9182243351d88b3b745a06c943e 1300w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=569&q=90&w=1400&s=ac8393fdbe1cba7774c0153a80682a64 1400w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=610&q=90&w=1500&s=0e9e36eb070d8ef05d4aa08daf0e3ee2 1500w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=650&q=90&w=1600&s=a62f01b4cc28666f8c4f0bc1a2e74947 1600w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=691&q=90&w=1700&s=adcc43256d2b90afcdb1716dd8ceace9 1700w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=732&q=90&w=1800&s=9cec85af0ed2948b0d762ce9a87dfce9 1800w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=772&q=90&w=1900&s=85e22d65226cfef3739ea00af3fc05bf 1900w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=813&q=90&w=2000&s=55273b3757e285a8e01d90467e25df7f 2000w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=854&q=90&w=2100&s=716a4c4a2d1e6d2a9c32b6751c07910d 2100w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=894&q=90&w=2200&s=2fae7e57efc76ebdec9fb448df259c04 2200w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=935&q=90&w=2300&s=5338d1d025131b99fb9366c05dd2284c 2300w, https://solutionseeker2021.imgix.net/images/MTL-2.2-Figure2.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=976&q=90&w=2400&s=db5d719581a1acf897ca2d745ae4cb09 2400w)
As described in the previous post, MTL differs from transfer learning by learning just one big, shared model with data from all available wells. There are two sets of parameters, one set that is common for all wells, and one set with specific parameters linked to each well. In a way, we can think of this as attempting to learn the general physical behavior of a petroleum well. Let us draw this analogy to first-principle, mechanistic simulators. In these, first-principle equations are utilized to describe the physical behavior of the process. The equations are common for all wells. But, there will be parameters that are unique for each well. For instance, the density of oil could be substantially different from one asset to another. So in a way, these two methods are not that different in the way that they try to capture both generality and specificity.
We think the concept of MTL is intriguing for the virtual flow meter application. Previous research into data-driven modeling for virtual flow metering - see several previous posts on this topic - has shown that the method is sensitive to the available data and the non-stationarity of the underlying process. In three upcoming posts in this article series (soon to be published!), we discuss the results from a recent study on MTL for VFM. For the interested, the full article may be found here. The three articles will discuss three key properties of an MTL model - robustness, making sense physically, and low maintenance.