From the series: Drilling Systems Modeling & Automation
Jonathan LeSage, MathWorks
Simulation studies performed on a digital twin aid in exploring the limits of equipment and allow for control strategies to be optimized for common scenarios or prevent hazardous conditions. In this case, we want to ensure safe operation by preventing the ‘crown out’ and ‘floor out’ of the travelling block on the drilling rig.
Safe operation with maximum speed is ensured by maintaining process parameters within operational constraints, expressed by the design space. This design space can be obtained through multiple parallel simulations. Specifically, the model is simulated by varying the values of top drive speed and load. Once the corresponding distances of the traveling block from the top or bottom are obtained, we investigate the design space through visualizations. By doing this, we learn about the infeasible operational areas i.e. the parameter values that are impractical because they lie outside the torque-speed curve of the drive.
We then incorporate these values into the control logic through a look-up table to enforce operator limits. The result is a much safer (and optimized) operation of the traveling block on a drilling rig. This optimized lookup table allows operators to control the drawworks at the maximum possible speed given top-drive load and drum-spool position. This allows maximum speed given safety requirements.
This entire workflow is demonstrated using MATLAB and Simulink which provide several in-built functions and interactive tools to easily check for diagnostics and explore the design space using parallel computing.
Hi, and welcome back. My name is Jonathan LaSage, and I'm an application engineer with the MathWorks. Today we're continuing our video series on how you can use digital twins to optimize system performance. We've been using a Drawworks example, which is a common piece of equipment in the oil and gas industry, which is a piece of electromechanical equipment. We have a mechanical side with the pulleys, a drive train, an electrical mechanical drive with the torque speed curves, and then we have operational limits. Ultimately, our goal is to prevent the system from either crowning out, which would mean hitting the top because it couldn't slow down in time, or bottoming out, hitting the bottom, and this is really important because these systems have a lot of mass, a lot of inertia.
So today we're going to use this digital twin that we've calibrated in the last video to actually optimize system performance and perform in an optimal way. All right, let's get back into simulate. All right, so we're using the same Digital Twin model that we created and calibrated in our last videos, and the only difference here is we've added this other block here, the simple operator. We're actually going to cover in more detail with this type of block is, the state machine and state flow based modeling architecture is in the next video. But for this video, all you have to know is really it's serving as an operator that we're telling to do certain commands.
Now for this particular case, when I push Play what this simple operator is doing is it's driving the Drawworks up to a steady state of whatever I've specified the speed command to be. In this case, it's 1,500 RPM and as soon as it hits 1,500 RPM, the operator is going to slam on the brakes, and we're going to see how long it takes for this system to come to a complete halt. Now the reason that we're doing this test is we want to explore the design space of this system. We want to see at given speeds and at given weights or loads on our hook out at the end of this Drawworks, what are the operational limits that we can actually drive this system before we exceed the thresholds of all of these, the linkages and the torque speed curves that we have.
Now we could do this one at a time. You know, we could start with 1,500 RPM with maybe 50,000 pounds, then we could change things around, but that's going to be time consuming and tedious. So what we can actually do is script things in MATLAB. Now MATLAB lets us actually script up the experiments that we want to do. So I'm going to tell MATLAB that we're using this model, my Drawworks model that I've been working with. And I'm going to tell it that I'm going to explore the design space between minus 1,500 RPM, so going down at 1,500 RPM, to positive 1,500 RPM in intervals of 500 RPM. Now I can make this a higher granularity, but for today's quick example we're going to keep it at that.
The other vector I'm going to provide here is this loadVec. The load in this case is a multiple of my base load at the end of the hook on the Drawworks, which is in this case 50,000 pounds, so one is 50,00 pounds, two is 100,000 pounds, so on and so forth. And what we're going to do is we're going to use this meshgrid command to basically create a matrix and combine all of these different modes. And what that lets us do is basically create a simulation object that will have all these different simulation modes to explore the design space. Now if you wanted to use parallel cores, you could use the parsim command. Today I'm just going to use a single core on my laptop to run these simulations.
So once you've created the simulation object this in, you can pass it into the sim command and start your simulations. And again, if you did parsim instead of the sim command, these simulations would be parellelized. Now the beauty is if you use this approach you get the simulation manager. This will keep track of all the simulations as they're running. So you'll see in this case, I've queued up 36 different simulations to explore this design space. We're going through these right now, you can see. The other thing is we can take a look at where we are in the matrix of design space.
So we can see here's the load scale. Here's the speed command. And we're kind of just simulating. Now the thing that's nice about doing this approach is if there's an issue with one of the simulations, you can jump in, you can look at the diagnostics. This is the same diagnostics viewer that you would see in Simulink. So if there was an error in one of your simulations, the multiple runs would continue, but you wouldn't have to wait for them to complete. And then lastly, if you have a lot of simulations, you can use this grid view.
Now we're just about done. And once we're done, we can actually process these results. And I actually ran this with the higher fidelity or higher granularity earlier just so we can get a lot more results quickly, and we can get a figure that looks like this. And what we have basically is different speeds on this axis, different loads on this axis, and then how long it took to stop this system for these different conditions. And you can see that there's kind of a nice curve that kind of flows with kind of the power relationships here, and then you'll notice that along these edges here, we get this area where we actually cannot stop this system in time, or actually at all. And that's because we're exceeding the torque speed curve limitations of this drive.
And so these regions out here would be considered a no go zone, and that is something that you fundamentally could have calculated using first principles, but we were able to extract out using our Digital Twin very quickly and effectively. All right, now let's take a look at how we can use this data that we've generated from our multiple simulations to actually build a lookup table that will enforce some operator limits. Now this data that we've generated essentially right now, if we were to implement this as a lookup table, we'd have speed as an input, load as an input, and then output would be how long it takes to stop. Ideally, what we might want is what is the current load, and what is the current distance from the top or bottom, and the output could be what's the maximum speed we can go?
So we really just need to kind of pivot this around, and thankfully because this is kind of a unidirectional table, we can actually do that using interpolation. So we kind of go through some interpolation here, and what we're able to do is get a inverse of that data that we've generated from our simulations. So now we have load on one axis here, the distance from the top and bottom on the other axis here, and then what is the speed limit of the drive given those different conditions. And so you'll see here as our load goes up, as we would expect, the speed that we can operate starts to slow down, so our speed as we're going down goes down, and then also our speed as we're going up goes down as well.
So these are now limits that we can then enforce, maybe put in as I lookup table into our logic so that our operator, even if they're giving the full 1,500 RPM command, if we get into a condition where they're close to the top the control system will limit them and prevent a crown out or a bottom out situation. Now let's take a look at what that can look like in the simulation environment. So we have our same Digital Twin here again, and again, we're going to cover this in more detail in the next video, but underneath the hood, we have a lookup table that basically implements that table that we just saw there.
We have the load and the distance from the top and bottom as inputs to this, and this is going to constrain the raising and lowering rates of the Drawworks given the loads and the positions we are from the top and the bottom. So I'll just run the simulation real quick so we can get a quick look at that. Let me get the animation, in this case. But we'll see here that we're raising to the top, and as we get closer and closer to the top, our speed comes down until we get very close to the top when we actually enforce it to zero. So if we put the animation side by side, perhaps this will make it a little more interesting.
You'll see as it's raising, these dashed lines indicate the raising speed limit and the lowering speed limit. And so you'll see as that raising speed limit comes down, we're very close to the top, and that's actually artificially constraining the operator. So in this case, the operator is just going for 1,500 all the way up and full minus 1,500 all the way down but the actual safety control system is constraining the operator by dialing the operating modes back and forth. And that's all done using that lookup table that we generated using those multiple simulations.
All right, in our next video, we're going to talk about how we can actually start to implement these things using the state based logic. So we're going to talk more about building those state charts and how you can do that in Simulink.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .Select web site
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.