 Welcome everybody. We're going to wait for a few minutes for people to enter the room. We'll probably get started at like 12 01 or two. So just hang tight and thanks for being here started in just a few seconds. We're going to get started right now. Awesome. So thanks so much for being here everybody. My name is Brittany Van Dwork. I'm the communication and outreach specialist for New Mexico at score, which is the established program to stimulate competitive research it's NSF funded and it's nationwide. I'll be your host for today's webinar, along with ISIS sir not our website administrator who'll be working behind the scenes to do everything to make it flow smoothly. A few housekeeping things before we begin. I want to let you know that if you have questions at any point, feel free to type them in the Q amp a box and ISIS will play. We're going to quickly interrupt our presenter and ask him the questions and if it's something that is time relevant, feel free to ask at any point during this webinar. I know he really wants to make this a useful training for everybody. So, with that, I would like to introduce our presenter for today, Mr rusty nail, who has been on the New Mexico smart grid center team for a while now. He's a research assistant at MSU under Dr over La Prova, and he received his BS in electrical engineering from the University of New Mexico and in abacurkey in 2019. He's currently pursuing an MS degree in power systems with a certificate in public utility regulations and economics at MSU. And his research interests are electric energy systems including renewable energy integration and electric vehicles. Thanks so much for being here today rusty and take it away. Hi everybody. I'm going to go to sharing my screen here. Thank you for the introduction Brittany. As she said my name is rusty. I'll be giving today's beginner webinar. And I'm over at New Mexico State University right now. So first I want to jump into starting with what is open RT. And let me get to the slideshow here. So put simply or open RT description on their website is this worded long worded long worded and winded language here. Put simply put simply it's computational hardware and software that allows us to run fast simulations. And that allows us to be capable of running simulations that are also capable with interacting with real world components. And that that it's designated as hardware in the loop simulations. It looks a lot like this there's several hardware instruments you can purchase or buy from Opal RT. One of these is the Opal 5600 and we have one of these in our lab. There's a newer version of this that is the Opal 5700. And that's what we'll be running but it looks very similar to this and essentially it's just it's a bunch of FPGAs and some CPUs that help you expedite whatever code you may be running. There's various types of softwares that can be purchased or used. There's HyperSim, E-PhaserSim, E-FPGASim and E-MegaSim. Those are all proprietary and have varying costs but today we'll be using a version of E-MegaSim which is RT lab. And I'll be getting into that later but the reason why we're using that today is because it's it couples with MATLAB Simulink. And so most of the actual programming and whatnot is used from MATLAB Simulink and then it essentially gets plugged into RT lab which allows us to communicate with the hardware you see on the right. So what is MATLAB Simulink? So in case you haven't been you haven't used MATLAB Simulink in the past, here's an image of what it would look like. It's a drag and drop graphical programming environment designed by MATLAB and it's a way for you to be able to simulate, test and debug multiple control system schemes and all those other things. And so what we want to do is you oftentimes you'll make a model like this and MATLAB Simulink and you'd like to speed it up or you'd like to incorporate row world components. So you'd like to send a signal from the simulation you have here out to Opal, for example, and then that signal will actually interact with a relay or some type of communications device. It'll send also a real world physical digital analog signal which you can incorporate back into your simulation and have real world behavior rather than just these equations and theory and stuff like that you can actually incorporate some real world testing before you integrate it into an actual grid. And those are the kind of applications we're looking at. Well, how does this work? Where does Simulink, how do we plug this in and get it to work with our T lab? Well, first you take that Simulink model and I'll go through the process, we're going to make a simple one later. You would make this Simulink model and you're going to package it into a subsystem called SM underscore file name. And that SM subsystem essentially stands for main computation system. You're packaging your Simulink model into something that's digestible to load onto the Opal RT and that's what it's going to be using. Do we have any questions? I see there's three chats. Okay, never mind. I was just checking out that. Nope, you're good. No questions yet, Rusty, but I did put the link to the research document in the chat. Great. Okay, cool. So as an aside, or so once you've made this single subsystem, there's a second subsystem that you need to create in Simulink and again I'll walk you through this but just to preface, you'll know what we're looking for later. And this subsystem is the GUI subsystem. This is actually what you'll interact with once you load the Simulink files onto RT lab with Opal RT. And that subsystem is going to be called the SC system and this stands stands for the CPU system with respect to the desktop you're working on. More of this will make sense later, but essentially you have what's loaded onto Opal on the left and what you see when Opal is running on the right. And then you can also make this a control loop where things that you interact with while Opal is running in real time on the right end up affecting the simulation and the main computation that's going on on the left. This will become much more complicated. We won't get into a system like this today, but this opens the door for other cores available on the Opal RT that also allow for parallel processing and things of that nature. And those are called SS systems and those are just subsystems that help in the computation system. So now I'm going to walk you through making a simple example it's going to be, I was going for a two node but I wanted to mix it up a little bit so we'll have a source here a simple electrical circuit will have a source, well then have a switch and then we'll have two resistors. So going into that I'm going to open up Matlab just as I would again we're going to start with Simulink. I'll close everything else. So here I have a Simulink where I clicked on this to open it. And then what will come up is here. We're just going to make a blank model I'm going to show you from scratch making a simple two node model how we get this started. Okay, so I'll open it up. And first thing I want to do again it's drag and drop how you're going to get most of these components is by going to the library browser. And the first thing we want to make sure is that we have the libraries we need so you're going to need to make sure you have RT lab. These are RT events. These will be libraries that you get when you purchase open RT software download RT lab I believe for free. You'll get these libraries. And sometimes they won't show up there's debugging processes for that but you want to make sure you have these. And then the last one you want to have, at least if you're working with power systems and things that nature are going to be is going to be the specialized power systems and that's what we'll be using today. The library that I'd like to use. We're going to go to, we'll click around and I'm searching for sources here. Okay, so we're going to use an AC voltage source drag and drop may take a minute. Okay, awesome. And you can really organize this how you like see it'll say AC voltage source. If we go back to that last image I showed, I called this BS. It's relatively standard could just be be one I'm going to call it BS and so you can actually just go in and change the name. What's nice about simulink is you can generally annotate anywhere you could on older model it looks different, but I'm using the 2019 be version right now, and you can just double click and start typing away. And sometimes they have commands that will automatically drop down but that's just kind of an aside. Okay, so for this voltage source the next thing I'll need is a ground. I'm going to look for that. Okay, I got a ground here and again, there are multiple grounds, but that's why it's kind of important to either search the full document, but, or look forward on your own but make sure that when you're looking for components, they'll tend to only be the only work with other components in that library so there are other grounds within my lab simulink, but they're not grounds from the electrical library and so they won't be compatible with each other so just keep that in mind. I'm going to copy and paste this because I know I'm going to need that later. Now we want to get those resistors. Okay. I'm going to get a series load and see if that's the one I'm looking for I just wanted to find. Okay, so this this, this load is defined as how many watts and stuff like that that it consumes as a load I just want the branch. If you double click on that model, double left click, you'll be able to define the inductances the capacitance again I just want a simple resistor so we're going to say this is zero, zero, and I'm going to make this resistance or impedance 20. And then I'm going to make sure that it knows that this is just a resistor. We say okay, I got a simple resistor here. We're doing great. I can also copy and paste this. And again it'll name differently. And so just for the sake of being organized here in the debugging process whenever it says there's an issue somewhere you have a problem with the component. If you label it, rather than just leaving the name. It'll say hey we have an issue at Z line, rather than we have an issue at resistor one, resistor two it can be kind of annoying difficult to narrow down where that is so naming all your components is helpful. So line and Z load. That's something I'm used to. Usually the load being the last thing and then the line being anywhere in between. And then you can also orient components how you like them so you can go to rotate or flip. We're going to go clockwise or counterclockwise. I'm going to blow this up so it looks a little bit bigger. Hopefully that looks, that looks fine enough for everybody to see. Okay. We have the basic circuit now all we need is a the breaker the switch. This is a three phase breaker I'm looking for a single phase. First option. Okay. Great. Okay, and then I need a constant. I need something this is externally controlled. So I need something that tells the breaker to shut or open. And that's going to be for the our purposes of constant. So for example what you can do if you know what you're looking for. And you're willing to try some stuff out and if it doesn't work you can just search, and it'll pull up constant for you. So that's kind of a faster way I just, I knew everything was in that library. So that's why I was picking from it but generally I actually searched most microphone. So we're going to make this constant. Okay, awesome. So here's our system. Now generally after we've made something like this. I go back to my image. That's what it looks like. Everything looks good we got the labels going on. You can change this breaker but because we just have one if I had more otherwise I would change it. Initial status to one. So now I have a switch this will be closed we can simulate it. We can define the values peak amplitude is going to be 100 frequencies going to be 60. And then I don't want this to be identical we're going to make this five so now I have a voltage divider. Now if you don't know what that is that's okay. It's very important. The point is that we've made this simple circuit. We have two resistors here of switch that opens and that'll come into effect later when you see it and a voltage source now generally when we're making a simulation like this we want to measure stuff we want to take a look at things. The main way that we do that is through measurement tools and or blocks and scope scope is how you visualize those. So again I'm going to go into my fundamental we're going to find specialized power systems within here there's measurements you can do the drop down. And then I'm going to scroll down and find voltage measurement. And I want to measure. I want to measure the voltage drop across this resistor. And again for that I'm going to need to scope. Okay so I'll pull the scope out. Okay, awesome. We've got our simulink model no problems here. So just like I was talking about earlier. The first step is making the simulink model, then we're going to need to package it so let's see if it runs first, and this is something you want to do. Generally, you know if you're doing a lot of coding anyway, but let's just run it and see if it works like we think it should. So I'm going to click run up here and use the debugger I'll tell me if it doesn't like something. Oh no okay so it's telling me here. I need the power glue block anytime you use these simscape power systems, you'll require the power glue block. Now I know it says maybe some other issues. I'm going to take on the first one and see if we can solve that. So I'm just going to search power gooey. As you can see I searched your previous one. I'm going to pull out the power gooey. And having done this several times and just the simulations I'm used to running we're going to go with discrete. And I usually start with a sample time at 50 microsecond. And then we need to save this as a name so I'm going to go under where I'd like to save this file. I'm going to use your account. And we're going to call this opal to note. Okay, now I'll try and run it, compiling down here in the bottom. 10 seconds okay so you did that really fast that was, it's not doing it real time it's just computing it and spitting out as fast as it can. We're going to look at what the scope says here. The blob of yellow. But again it's over the course of 10 seconds, each of these is 60 Hertz. And so in here we can go through if you want to look at those waveforms and see if anything was, you know, awry. You can zoom in. And here we go okay that's a little bit more digestible still kind of crazy. You can look at, you know, let's look at half a second. Let's look at roughly a quarter of that or half of that. We definitely have seven and a half way form something that order and that's roughly what we have. And so okay this, this is acting like we should have the voltage dividing characteristics that we wanted earlier. Yeah we have 80, which is what I've anticipated on the voltage division. Okay, so this is behaving as we would suspect and as we want. If we want to put this into opal though again we need to, we've done the first step we've made the simulation in MATLAB and we want some real time behavior so now we need to package it up into this main computation system or opal RT. So what I'm going to do is I'm just going to highlight everything. Now the reason why I'm not highlighting the power GUI is because of power GUI block. The way it operates is it has to be on the highest level of your model. And so I'm going to keep it at the highest level. So we're going to we're just going to highlight everything. We're going to right click. We're going to scroll that we're going to go down to create subsystem from selection, and now we've created our subsystem. And on that left side that we're talking we were working on we're trying to package this. So we're going to rename this SM. And that stands for main computation system, and then we're going to give it the name as this as the file name and simulink. So opal to note is what I gave. Okay, now we need to make the CPU or SC system. And that's going to be what RT lab allows us to interact with while we're running our simulink model on the opal. So I'm going to go to library browser and just to start off with, we're going to just make another concert or we're going to make a inputs. And I'll explain for that later here in just a second. We're going to have to make an output for this see how there's no pieces where we can actually draw. There's no outputs that come from the system into the next block, like we had here, I need to make these input outputs. So I'll come back to that here but right now let's make this system it's very simple. I'm making an input. Then I need something called an opcom block. This is something that opal our team needs to recognize nice points between subsystems within your simulink model. And to do this, anytime there's a signal typically coming into your system from another system. And so I'm designing this second subsystem such that signals come from the SM block into the SC block. And so when they enter they're going to first have to come through the op the opcom block, and then anything through there is what we can look at manipulate stuff like that. So then I'm going to go to scope. I'm going to pull the scope out over here. Select that and then this is the only this is all we're going to do I just want to run this system and show that we can see it in the opal. So we're going to select that right click again and create subsystem now because I made that input like I should have made an output here, we have a, it can receive an input. So real quick I'm going to delete this. And we need to make sure that before we do anything else we name the system right otherwise it won't separate properly and you'll get all these debug issues. And we're going to call this SC underscore opal to note. Cool. And so we have an input now but I need to make an output so what do we want to look at. While we're looking at this at measuring the voltage drop across here and that's what we're doing in simulink we can keep everything we have here but somehow I need to get it to the other one. I need to get it to the other system because that's what we're going to be able to see when RT lab runs and again that's the software that allows us to connect and talk with the opal RT. So I'm going to say output, and you can rename the out that we wanted to we could say voltage drop if we like here. I'm going to keep it as out for simplicity. And now I have an out so now I can tie this. Okay awesome so we have the original model. We packaged it into a subsystem called SM that's for main computational system. And then we made an output, read that output as an input for the computer system, the system we're going to see when we're running on the opal with RT lab software. And then this is what we're going to see we need the opcom block to allow us to receive those inputs from our simulink system, and that's an RT lab situation. Okay, so I've changed a little bit here right let's make sure that it still runs and sim and simulink, because simulink is going to help us out the most in the debugging process if we will if we have issues later an opal RT, or it's going to be much more difficult it's not as I would say intuitive, and it's not as helpful and identifying what exactly your issue is so let's run that here. Oh, no, I have some more issues what are we going to do. Okay, so if we scroll down, I have that it says there's a knit function call back I'll tackle it here in a little bit, but first I want to look at this fixed step size. So, there's a solver on here, most of your issues are going to be solved by going to model settings, and this is going to be configuration parameters. And then we'd simply it's asking us to change the from variable step to fixed step. And I know I know to go here because again if I just look through this will say the solver step to variable to change those go to simulation configure okay. So if you're reading this will go to Okay, it wants fixed step. Now, I've done this a number of times I typically start with runga cutter and go from there. Solver details, it says this is set to auto, and it needs it set to something I'm going to make this the same as I did for the power GUI and that's going to be 50 microsecond. And we're going to save that. Okay, now we're going to try and run it. Now I think I only solved one thing. Okay, but that seemed to solve the rest of the issues so there was another issue there, but I just want to tackle one at a time, because sometimes maybe if I change something I change more than one thing. You know I did too much and maybe I was doing some damage so I try and solve one issue at a time to get to the solution and we ran it and there was no problem. And if I look at things, even though we haven't done anything with open RT, we've just used simulink you should still be able to see the waveforms still operating we just use simulink. I'm going to open this up. Like I said we can investigate we're seeing the same thing we did on the simulink side. Good. Okay, cool. So now we have our finished simulink model we're going to save this. I remember my name opal to know know where you saved it. Yeah I'm going to minimize this get out of the debug. We're going to get rid of the simulink library about browser. And now we're going to see if we can throw this on opal RT. So, I, what you want to do is you want to go over and download the software you're using. Again we're using RT lab. There are other types of proprietary software like multi like hypersim, and hypersim essentially does both of this for you but because again, a lot of our labs use MATLAB already and we're moving towards the direction of using opal RT simulink just made sense. So now we're going to make you want to make a workspace where you want to basically be saving all of this. I'm going to go to my account. That looks good to me. Okay, awesome. You're going to click okay, and it'll start up and get everything ready for you. So you'll get this first opening page. You can either go to here up here on the top left or just simply go to go to workbench. And here you'll see a blank, a very blank it's going to get a little bit complicated later up here you'll see targets these are simply what you're connected to. This is generally the network and then the target, the targets are just the machine that you're trying to interface with. And so target 137 you can double click it and anything over here you double click, it'll actually open a window and tell you everything about that. And so we know the IP address, you can go into the specifics of what model it is, what platform it's running on, things of that nature. And so this is the this is the opal 5700 that we will be working on. Then next the first thing I want to do is I want to create a new project. So we're going to double click, double left click, create a new project, and generally I keep this you can make this whatever you like, just for our sake I'm going to call it opal practice. Doesn't have to be all caps. And just because of, I don't know if this is something for RT lab but I generally don't do spaces will do opal underscore practice. I know where the locations to save we're going to say next, I want it within the simscape project space will say finish. And now it's going to set up that project force, then we're going to go to the drop down, and it needs models we don't have any models for it right now. So we're going to right click, go down to add existing model. And it's going to say do you want to link to something or do you want to add it we're going to we're going to import. We need to go, we need to browse and find our simulink model to put into the RT lab software operate on the open RT. So I'm going to go to my user account. And we made opal to note. That's what we were working on, you can verify it. Now, what I suggest you see we have a bunch of stuff here. And we see here's the PowerPoint I was showing you here's another model I made. I recommend whenever you're working in these things make a separate folder. So actually, instead of putting it here I would say make a new folder and put it in that folder because it'll every time you select the area you saved it'll pull up everything. So just to simplify this you can just say deselect all and then we're going to go find the system, we're going to go to opal to note. And then finish. And what we're going through now is now that one of those documents that was shown a lot of this is covering that. So if we can verify, we have opal to note it'll say it's not compiled though. And so that's the next step we'll have to go into. But right now we've essentially saved a copy of our simulink model so from here on out. You can actually edit the model with an open RT and that's what we'll get into I'll show you that here in a little bit once we run it once, but if you edit anything from opal RT, going into this model so if we edit the model from opal RT and it'll open up MATLAB for us, editing this file that we've essentially copied will not edit the original. Just keep that in mind when you're changing things because sometimes you'll, this is good for debugging and you don't want to have to go through the process of reloading that file. So, we'll come back to that there'll be a review but so I've uploaded the simulink model within RT lab, and it says it's not compiled yet. We've already set our target. That's one of the first things you want to do before you even make a project, make sure that your targets assigned it's up that basically means the machine's up and running, and it's connected to the computer. Then we're going to see if it builds. Does it build. And this is just going to see if it can compile all the MATLAB code into something some digestible seed that can then be put on those FPGAs and the computers within opal RT. And we'll just be using one core, anybody's interested in that. And generally this, especially for simpler models like what we're doing, it should only take about a minute and a couple seconds. So bear with me. How am I doing is that is the face good. Just a reminder everybody if you have questions feel free to put them into the Q&A box. And this crisis will direct them towards rusty. The build is the area where there will be most of the issues or places where you might, you'll run into things with opal RT not, not agreeing with what you have. The first thing being make sure that you have the target assigned and the compiler correctly and stuff like that. Every once in a while when it's doing this when it's building it'll give you these warnings. These are things that are actually pretty common and you can neither you can search those on the opal RT website and they're very helpful in helping you identify. How to fix those are what those mean. It's it's looking good so far. I just didn't know. Okay, so see the compilation took a minute and a half. So we've now built the model, and now it says okay it's ready to be put on the target. So the next step after it's been compiled let's load it on to the opal RT, put on the hardware. We're going to load the node and when it does this it's going to it's going to pull up that that piece that we can interact with and look at that was that right hand side of this diagram I gave you. But because this debugging once you get here is a little can be kind of ugly. That's why you want to make sure it works and simulink first, then come to opal RT, and then try and work that out. Great. Okay, so it loaded it completed. So now we're ready to execute and we can see down here it's actually it's brought up that second system. So, as we can see everything basically to the left of the outcome block which is all of our inputs is gone. Everything only the things we put on that right system the SC system is what I'm going to be able to see interact with etc. So I'm going to go to the scope. There's something that happens usually when you put in these scopes you have to change the viewing options that you want to go to view configuration properties, logging, and then uncheck limit data points, unless you're worried about memory and stuff like that. And if you don't do this it'll only let you see partial waveforms and things of that nature. So we're going to say okay. Great looks good. I want this open so we can look at it in real time. We're going to run this for about 10 seconds. And all this should be doing is just running the system and in real time as we're speaking now. So you can't click run here that won't work. You want to say execute because we're actually trying to control the opal RT not simulink to click execute. You can jump to it. We can open up this. You can watch the scope and there you go it's happening in real time. Okay, cool. So that just shows you how we can run a simple system. I want to show you how we can interact with it in real time now. And you might be thinking oh my gosh we have to you know go through this whole process. Oh, sorry I'll get back to this in a second. What you want to do when you're done is you want to pause and then reset the model. Now again I want to edit this I want to show you some different characteristics you might be thinking oh this is going to be a nightmare he's going to have to delete what we have here. He's going to have to go back to a board I mean to MATLAB edit it re upload you don't have to go through that they have this nice, you can edit the model within RT lab so I'm going to click on edit. Now as I said earlier when we edit the model within RT lab this we're editing the copy that we upload. So it'll pull up another MATLAB account or file. And here's the copy that we've uploaded to RT. Now I want to edit this a little bit I want to get what we're going to show you is I want to see if I can get this control loop going on, so I can interact with the real time simulation. So we're going to right click on SC and I want to change this up a little bit we're going to go to the library browser. And sometimes this will take a little bit I've noticed that once you open it from open RT some things are a little bit slower, but it'll it'll get there. It should be about a minute, maybe less. But we finally we have it pulled up here and I'm going to get the constant out and see even searching takes a little bit of time. Constant will also be found in commonly used blocks. I'm going to be alarmed at the change in lighting, commonly used blocks. Oh I didn't spell it right. Okay, if you don't spell it right that'll be an issue. I'll bring constant here and then I want to have another I want to have an output. Here's our drag and drop output. And then when I get out of this I have an output. Well now I need an input for SM for the whole system. And what I want to show is we want to actually manipulate this switch while it's running so this whole time it was set to a constant one, meaning it was closed the entire time you didn't see an interruptions in the waveform. I'm going to get rid of this, and we're going to make this our, our input. Now as I said earlier whenever you have an input and you're interacting from one subsystem to another, as we are here going from SC back to SM, just like we did when we were going from SM to SC, when you one of those inputs. So I'm going to go here. And we're just going to search opcom. And this will be in your RT lab library if you're looking for it. Hold out. Okay cool. So now, all I've done is I set up an output from the SC to have an input to the SM, and we use opcom blocks to interpret those inputs. And so now when this value is one, which it begins to which it starts as in the game, it'll be closed. And when this is zero, this will open the switch and we shouldn't have any signal going. Now I'm going to save this. And again, everything I just changed because I edited it within the debug capabilities of RT lab I didn't actually change the original file. I can actually go back to the original file that we had earlier. And there's been no change. So this is a good way to change things with your model see how it will work and see how you can make it, but they are going to change it per se. So then we're going to come out of this. Okay, awesome. I've saved it already. We're going to minimize give her to this. Okay, so I went to edit. I've already got, we were editing an already imported model. So now we're going to try and build it. We're going to see if there's any issues with that. If you try and build the model you've already built, it'll let you know it'll actually it should like instantaneously build because it'll say there was no change it identified that we changed the model within what we uploaded to RT lab and so that's why it says, Oh, we need to go through this process again. Oftentimes it'll verify you're using the right type of MATLAB version. And that's all associated with what you've purchased with open RT and see like I said earlier it'll open this up. And it specifically looks for SM and SC and then file name. So just again that's important to do. Okay, so that took a little bit longer. I guess this one was shorter. Usually it takes in the time practice runs I've done it'll take a minute fives a minute or seven that was minute nine. Great. So we built it. Now we can load it. So now it says, Hey, your changes were valid and see all those changes we made are can be seen here but again, within open RT what it opens up for you to be able to interact with is only the desktop CPU visible interactive version which is this SC portion. So it opens this for us, I'm going to go into that scope, and you can actually save these changes but I just want to show it so you remember, you go to view configuration properties, logging, and then you unclick or uncheck limit data points to 5,000 so we can see the whole wave one. Sometimes before you run you want to click this it'll auto scale, I already, I can already see that we have the max axes that we need and it's going to go from zero to 10 seconds will be okay. Okay, now we're ready to run. I'm going to execute the model. And while it's changing I'm going to press zero here for a little bit, and then I change it to one. You might be thinking why'd you change it from zero to one or whatever. So I ran that in real time we could have seen those changes, but I'll show you what that came out in the scope, we have this here so it ran, and in the beginning for the first three seconds, we had that that constant value was set to one so the switch was closed, and we had a full completed circuit at, you know, T equals 5.9 roughly, I changed that constant values to zero, which opened the switch and gave us no voltage read. Then at roughly nine seconds, I made that value one again, and it flipped on that switch. So just as you can see we can not only interact with real time software simulations that are running on the Opal. I think so you can also integrate hardware in the loop signals where both digital and analog inputs and outputs can be sent to hardware that can be integrated into the simulations that those two can affect the simulation just as we did here with software in real time. So there you go. I close that. Once you've ran something it's it's still technically running on the Opal you want to pause. So even though it only we said just execute 10 seconds. So we need to pause the model on the Opal RT, and then we need to reset. And then from here we can go in we can build we can add, we can do all these different types of things to this model. So that's this is an example of how you can make a very simple simulink model. Here's the original. Here's the version I changed in Opal RT. Here's the inputs necessary blocks that you need to communicate with, and general architecture that can allow you to make systems like I showed here, and more complex ones, like you see in these images or in the routes demonstrated ahead. So that's all I have for the presentation. I hope everybody liked it. If anybody's got any questions might have been answer those. Hopefully that was a good drive run a good introduction to it. Now, we currently do not have any questions from the attendees. Cool. But I have a question. Until we until we get questions from anyone. How have you been using this software specifically. What have you been building and simulating. Can you tell us a little bit about that. Yeah, there we go. Okay, sorry about that. I guess I just let me know my internet connection is unstable. Yeah, there was a project I worked on last year that was a collaboration with the National Labs, Idaho National Lab, Sandy and whatnot, and we're working on a microgrid study up in Cordova, Alaska. And so my objective or job was to take that and make it so that we could in the future work on it and simulate and compare it with other microgrid studies that we might have here at MSU. And so my job was to basically make the entire model in simulink so it was much more complex than this. There was lots of these blocks, many pieces and so I've, I've been through the ringer of trying to model and simulate and debug, not just you know 10 blocks or so at least a couple hundred. And that's why I you know I can understand the process of fixing it and simulink first thing going on or tea but it got to a point where you know or tea has the computational capabilities of not only doing it in real time but simply conducting it sometimes you'll have a model that's so big and so complex that running it on Matlab simulink just becomes I wouldn't say not feasible but a very lengthy time consuming process. And I'm experiencing some of that on my thesis but yeah we took that model and we could break it down we could compile it and then we could run all of that that whole simulation that microgrid in open RT and look at some of those waveforms look at faults that would take place or issues disturbances on the grid. And with that we could, you know, collect, we could compare those outcomes to other simulation software and the future prospects of this is to be able to use this with other you Mexico State studies that we'd like to have with rooftop solar data and real time data that you can essentially plug in whether that's from, you know, a spreadsheet, just like you normally would with any other code, or it's actually, as we're speaking you know the data we're getting off of the electricity being consumed on the roof, or produce you can do a lot with this system and it sounds pretty essential to anyone who's pursuing a career in power systems or microgrids in general smart grids. Definitely yeah it's a it's a growing. There's definitely very fast adoption right now. There's a lot of popular simulation softwares like DSLF and etap are all big and actually a lot of those you can use with the other software types, a for mentioned. So, not hypersim, we're using a mega sim but phasers in an FPGA some use other types of software and some of them are just even you could just simply code something and it'll speed it up. These are mostly for power electronics and smaller applications. And so they use other things that we're using simulink and RT lab. For sim, some of these like I said you can, they're specifically made for other types of software suites. And so it, it's not just like you're restricted to this and it, it really opens up that the conversation about trying to legitimately and credibly simulate something before you put it in the real world. I mean it can it can be costly to get some of this equipment but I think there's definitely an investment made by research associates and industry to make sure that before they put something out and they've got at least even some hardware input as part of those simulations. Sweet. Oh, this is cool. We don't have any questions yet, but I do have to say this was very well presented and it's a lot less scary than other presentations I've seen. So thank you for making this very simple and not intimidating. Totally software. Great. I have a question. Let's see is this is this open source or is it license based. How do you, how do you get access to it access to like the hardware or some of this any of it. So Matt lab you'll have to get the license of course and simulink should come with that that's what some of the packages you can download. But anybody who's in the research consortium research consortium being part of, you know, any of the labs are being part of any of the university should have a like an academic and research license for that. And once you have that you can that you can at least use a mega sim. To my knowledge you have to make an account and they're depending on your work you can get hypersim. So it's anything outside of that RT lab is owned by Opal RT but usually any of E mega sim and hypersim some of those you have to purchase it just depends on what your nature of your work is similar to like if you're working with Matt lab. But usually that just starts with making an account reaching out to them, but you tend to have to pay for all of those. RT lab is the cheaper one because basically once you've bought the license for you've bought the hardware for Opal RT so we've purchased the Opal RT machine. That's the biggest expense then getting the license to run on it to be to work on it and buying that license essentially allows you to work with certain Matt lab packages and whatnot. Once you've done that you just have to have Matt lab and then they'll give you RT lab to integrate that with. The things you have to purchase like the hardware so and any inverters that Opal RT makes they have some power electronics you can purchase that can serve as interfaces. But you know we have something we have some stuff in the lab. We have several relays that I was working on last semester where you know I broke open the relay found whether there's inputs and outputs took those wires and make sure I scaled them down so that they didn't hurt the computer or the other way around. So you can so long as you have hardware that you want to work with, and you have Matt lab you can do at least what we did with RT lab so long as you purchase the equipment essentially and the license is kind of integrated with that equipment purchase. So I'd say the biggest barrier to entry is the hardware. But once you have that at least so far as simulink that's kind of the most costly thing I can't say much about the phasor sim FPGA sim or I percent because I haven't used them. But yeah, those tend to be you have to pay for most of that from Opal RT, and that's that's been taken care of through our lab with Dr La Prova. Okay, thanks. True. And I know we have actually supported you guys getting that equipment down there so it's great. Our New Mexico is Margaret Center has and I know there's also some support for the test site at Mesa del Sol, as well. So it's great to hear that it's being used and that you're training our our students on this so they can use it. Totally. We have a question from our own Selena Kenyali. She asked, do you ever hook more than one Opal RT up together. How big is the thing. I suppose you can there's actually two network ports on the back so I wish I could show you but if you took you see this image on the right. You can if you turn that around there's two ethernet cables in the back. And so I haven't looked at it, but you could have one pretend to be something and the other one be pretend to be something else because essentially, well they can first of all I guess connect to each other on the network, or you could just have digital inputs and outputs feeding out of one and into another. And the other one can pretend to be something else. You can also take, like I said, a lot of, you could record data from different machines, install all of or read all of those into the Opal and it's pure job I guess you could make and in theory I'm just coming up with this, you know, if I was making an experiment like this, you could just say okay this this Opal's whole job is to just pretend to be these types of machines, and then you could feed all of that input into the other Opal and that's like if you were doing a very highly complex. It can also be a really good asset for cybersecurity research that's what I've looked at with a couple other. Some other documentation associated with Sandia some other projects they did where it serves as like a communication hub and and for those types of simulations where you can read in all those signals and you can have it simulate a cyber attack environment type of thing and that's something that's the direction we're in some ways moving towards with New Mexico State and Southwest TDI, otherwise known as the ideal research area. The nice other part here on campus is that you know we you can actually the nice part about Opal RT is it's almost like a really good conglomerate conglomerate a way to integrate and take to pull together all of the data in a system. So we're interested in looking at, we have several buildings over there you could pull together all the data being read into this machine, and you could simulate it on there and then you can build all this other infrastructure that you otherwise wouldn't be able to afford you know we can. I can't walk out tomorrow and just go build a distribution system but I can if I have Opal RT, I can just build that and then we can just take all these components we already own. So we have a relay we have a solar panel on the roof and we have an electric car. Well if you have Opal you can build you can build a fake model of your distribution feeder and then you can pull that all together you don't have to go test it and then that would allow for in the future if you wanted to design something you could try and design it using Opal is like a test bed. And then if it works then you can move on to the actual grid so it's like it's a really good midway between theoretical and application because you can plug in and aggregate actual real time hardware inputs from around, you know, your research environment. So long answer. Yes, you could connect them but I guess there's a number of ways you could do that. So I'm going to say the last chance for questions all. Well we've got Dr rusty in the house. And if I don't hear anything, I will just end this early but we did want to give you a chance because he's really good at answering questions and making this accessible. While we're waiting for other any other questions come in I'm going to just take a moment to say thank you thank you again for doing this. At the end of the semester when it's a really busy time. And we, I also want to thank my partner and crime ISIS Serna who's been making everything go smoothly behind the scenes. And we don't have a webinar for next month, public yet so stay tuned. We may be taking a hey it is over the summer, but stay tuned to our website, our newsletter and our social media feeds to see if that changes. And it looks like without that we have no more questions so I mean thanks so much rusty for doing this and for everybody who's yeah thanks rusty. Good job. We will be recording this and it will be up on our YouTube channel will send you an email in a little while, like in about a week to let you know when it's up so you can refer to it later. With that, have a wonderful day everybody. Thanks everyone.