Drilling Systems Modeling & Automation, Part 3: Validating model with field data
From the series: Drilling Systems Modeling & Automation
So far, the hoisting system model has been built using our best educated guesses for the system parameters. We used the datasheet of the AC motor and our engineering judgement for guessing values of the proportional & integral gains for the controller and ramp up speed for the drive. While manufacturers may provide values for some of these quantities, they are only approximate. We want to estimate these parameters as precisely as possible for our digital twin using field data to ascertain whether it is an accurate representation of the actual AC motor system.
This is where Simulink Design Optimization plays a pivotal role in estimating parameter values. The Parameter Estimation tool is a user interface to perform parameter estimation, organize the estimation project, and save it for future work. The process consists of a few well-defined steps:
- Collect field data.
- Specify the parameters to estimate including initial guesses and parameter bounds.
- Configure your estimation and run an optimization algorithm. In this case, the objective function compares measured command speed with simulated speed for the drive.
- Validate the results against other data sets and repeat above steps if necessary.
This workflow is also the first step in creating digital twins. Digital twins use real-time drilling data to update the model. They can be used to evaluate the current condition of the rig and more importantly, predict future behavior, refine the control, or optimize operation.
Hi, and welcome back. My name is Jonathan LeSage, and I'm an application engineer with The MathWorks. Now, in our last video, we saw how we could use a Simulink and Simscape blocks to build up a simple simulation of a hoisting mechanism. Today, we're going to take another step forward and look, see how we can actually take data from the field, so from our real equipment, and then use that to calibrate our simulations so that they're better representatives of the asset that we have in the field. OK?
So if you're just joining us, we're using this model of a drawworks hoisting system kind of as a representative model here for field equipment. This is the hoisting machine, lifts heavy loads up and down, and it's safety critical. Having an accurate model to do kind of benchmarking and testing is pretty critical for this equipment.
All right, the other thing that we kind of talked about last time was how to actually build models, and this whole idea of gray-box, these models in the middle, where we're basically using first principles models and then calibrating them with real data. It's a very powerful way to enhance the models that you build of systems. All right, and we can do this using a tool and Simulink called the Parameter Estimation tool. All right, so let's take a look at how that can be done.
All right, so hopping over to Simulink here, you can see we have kind of a further built up version of our hoisting system. We've got pulleys now. We've got our top drive down here. We've got our drum that we built last time and a little bit of a drive train down into a motor. OK?
And so what we've actually done is parameterized this model using our best guess for the field equipment, and so this involved our torque speed curves that we have from our data sheets and then our guesses for controls, so Ki gains, Kp gains. We didn't have access to these parameters, speed rate. That's kind of the ramp up and down rate that we have for this drive. And so we've basically parameterized this with our best guesses.
Now, rather than simulating and using simulated inputs, we're now using measured inputs. So I'm going to take a speed command that I measured in the field, pass that into this model, and then I'm going to see what the recorded speed-- compare the recorded speed, what we measured in the field, versus the simulated speed. And so if we see a good, close correlation between those two, then we know our model and our parameters are pretty good, and they match what we're seeing in the field. If there's not a good correlation, that means we might need to do some adjustments, either by modeling more or by adjusting the parameters so our simulation matches.
So I'm going to go ahead and run this simulation, given the data that we've pulled in. And this data is just in my MATLAB workspace. That's where I'm using, feeding it in from.
And we'll see this blue trace. This is the measured data from the field. That's our speed response from the actual drive, and you'll see this yellow simulated trace here is our current simulation response. So we have good, pretty good steady state response matching, but we don't really have good transient response matching.
So this is where we might want to do some parameter tuning. So we could come in here and Kp is defined in my MATLAB workspace, so I could come in and say Kp-- right now it's 0.5. Maybe I can make it 0.6. Then I could rerun the simulation, try to match this a little closer.
Did I make it better? Did I make it worse? Hard to tell.
I only have a few parameters here that I'm going to be adjusting, but this problem can become a lot more complex if you have lot, many parameters. So rather than do this process manually, we have a app in the design optimization tool called Parameter Estimator. And what this lets you do is configure a parameter estimation session-- I'm going to go ahead and load one that I already saved-- to select parameters in your model, and this could be anything. This could be anything in your model that's adjustable.
I've just selected a few parameters here. And then you can bring in data from the field, and so here's my experiment. In this case, we're just using one set, but you could use multiple. Once you've got this configured, you can kind of re-plot to see the difference between the two, and we'll see the discrepancy here as well.
And then we can go ahead and set this up. I'm going to hit Estimate and kind of talk as this is running. What this is actually doing is it's formulating this parameter estimation problem as an optimization, and the kind of the knobs that it has to tune are the parameters that you've selected. And so it's going to be adjusting those, and the metric it's using to assess how good its doing is basically the difference between these two curves, the residual. OK?
You have very-- you have a lot of flexibility on how you define what that is. You have flexibility on the bounds of the parameters. So I could say Kp has to be a positive value, for example. This is an important thing to consider, too, because an optimization technique is a numerical method and doesn't necessarily know the physics of your system. OK?
The other thing is you'll notice here, as it's kind of doing the optimization process, we can take a look at the parameters as soon as it makes an adjustment. So you'll see it's just kind of running these simulations multiple times, and then it will kind of take a bigger step after it's tweaked and tuned the parameters. OK? So you see here just after one iteration it's already improved that performance quite a bit. So I'll let it run one more time just so we can get a better, even closer match.
Now, this process is not only useful for calibrating models for simulations. It looks pretty good. I'll go ahead and stop it. But it's also very good for creating digital twins. And once we've actually calibrated this model, and you can rerun the simulation, we'll see a much closer match between the two.
Now, if you were to do things like fault injection, simulate different fault scenarios, I can start to use these models for things beyond just control-tuning. I can use them for predictive maintenance applications, streaming applications. I can have this model running online, kind of streaming in data from the field, and looking for discrepancies away from nominal behavior. So there's a lot of very good applications you can do just by calibrating your models. All right?
Thank you for joining us today. Next time we'll talk about another topic.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.