 Welcome, everybody. We are going to wait a few minutes for people to leave the room. Thank you for being here today. So that's one more coming in. So I will wait until 1202 and then get us going, everybody. Welcome, everybody, to the New Mexico Smart Grid Center Spring Webinar Series. I'm Brittany Van Dwork, the Communication and Outreach Specialist for New Mexico Established Program to Stimulate Competitive Research, or New Mexico EPSCORE. EPSCORE is a nationwide program funded by the National Science Foundation. I'll be your host for today's webinar, along with my partner in crime, Isis Turner, who's going to be running things behind the scenes and making it all run smoothly. A few housekeeping items before we begin. I want to let you know that if you have questions at any point, feel free to type them into the Q&A box and Isis will interrupt our presenter and ask the question. But we do prefer that you put your questions into the Q&A box and then she'll read them out loud. I also want to let you know what the fantastic lineup we've put together for the next few months. Our next webinar will be April 29th, which is a Thursday, not a Wednesday, please note, where we will hear from New Mexico Smart Grid Center faculty member, Dr. Kamid Nadeemi, who will be giving a talk titled Control and Interoperability Challenges in New Energy and E-Mobility Systems. Then on May 26th, we will have an Opal RT for Beginners webinar led by New Mexico Smart Grid Center Graduate Student and Research Assistant, Rusty Nail, who's working with Olga La Prova, down at NMSU. Registration for both will be linked in the events section of our webinar, of our newsletter this month. And if you want to find out more information, you can also go to our website. Okay, with that, I would like to introduce our presenter for today, Mr. Claus Danielson, who joins the New Mexico Smart Grid Center team working at UNM last August. He received his doctorate from the University of California Berkeley, and for the past six years, he has been working as a principal research scientist at Mitsubishi Electric Research Laboratory. His research interests are in motion planning and constrained control, and his specialty is developing methods for exploiting structure in large-scale or complex planning, control, and optimization problems. Dr. Danielson, thank you for being here, and take it away. Thank you for the introduction. Let me see. Can everybody see my slides fine? Yep, yeah. Okay. Yeah, like Brittany said, my name is Claus Danielson, so I'm a new professor, just starting my second semester at University of New Mexico in the Department of Mechanical Engineering. And today I'm gonna be talking about exploiting cemetery in large-scale optimization and control. So I'm gonna do something a little bit different. I've been giving a lot of presentations that are kind of a broad sort of, here's all the things I've worked on, sort of a survey of things I've worked on, and I wanted to go more in-depth in a particular project that I worked on that I think would be of a lot of use for smart grid. So I'm gonna do a little bit of the survey. I'm gonna tell you a little bit about my personal background and research interests, and then I'll get into the technical part of the talk where I'll talk about cemetery and specifically symmetric model predictive control, both explicit and implicit, and talk about a symmetric alternating direction method and multipliers algorithm I developed and its application to symmetric HVAC. So like Brittany said, I got my doctorate in 2014 from the University of California, Berkeley out of the model predictive control lab with Francesco Borelli. I also received a master's degree back in 2005, I think, from Rensselaer Polytechnic Institute out of the Center for Automation Technology and Systems with John Nguyen, and I did my undergrad at University of Washington up in Seattle. So like Brittany said, for the last six years, I've been working at Mitsubishi Electric Research Labs or Merle, as we called it for short. The two big projects that I worked on were one, autonomous driving, so developing algorithms to autonomously drive cars, and then the other one because Mitsubishi Electric makes a lot of HVAC systems as working on heating ventilation and air conditioning or HVAC for short. While I was there working for a giant company like Mitsubishi Electric, I got a lot of opportunities to work on a whole lot of different applications. So I also did some work on some advanced manufacturing systems and a lot of spacecraft stuff because Mitsubishi Electric was the primary contractor for JAXA, which is Japan's version of NASA. A little bit else about me. So I actually, I'm not from New Mexico, but I have spent a lot of time here even before I became a professor. I had a startup here back about 10 years ago called Sequoia Technologies that was located on Sequoia Street. And we made, if you can see these little cameras here, we made these cameras that go over like football fields or basketball arenas or various sporting events, also live broadcasting for like the Oscars and things like that. We built these here in Albuquerque, or at least for the first few years we built them in Albuquerque and then we moved up to Washington. So I was a member of that startup, fresh out of getting my masters for a few years. I also worked at Air Force Research Labs, just south of where I am right now, just south of campus at Kirtland Air Force Base. And I also worked for General Dynamics as a contractor for one year before I went back to get my PhD, where I worked on two satellites, one of which is shown right here. This is the GLAST, or at least it was called GLAST when I was working on it, which was Gamma Ray Large Area Space Telescope. Now it's actually called the Fermi Space Telescope. It changed its name after it launched. So that's a Gamma Ray Telescope that's orbiting the Earth right now. So I do a lot of research work in both controls and optimization and mostly in like their intersection. So my background, as I'll talk about is in model predictive control. So model predictive control is an optimization based control technique. So I have a lot of background in both optimization control and dealing with like computational geometry and dealing with constraints. Okay, so onto the technical stuff. So I'm gonna start out by talking about my background, model predictive control for those of you who don't know and then talk about how we can exploit symmetry and model predictive control. So this talk is really about symmetry. So what is symmetry? Well, intuitively it's basically repeated patterns in a large scale system that we can try to exploit to reduce the computation in memory. Basically, the idea is that for most man-made systems these aren't sort of just randomly assembled but they're assembled in some sort of pattern. So there is some sort of patterns we can find in it. Using these patterns, we can reduce the amount of data or reduce the amount of computation we need to do to implement whatever controllers we want. So the idea is model predictive control, like I mentioned is a optimization-based control technique. So it's very computationally intensive. We're solving optimization problems in real time. So we're trying to solve these very large optimization problems in a fraction of a second. And that could be really difficult for sort of these large scale problems where you have, so for large scale for controls that means 10s, 200s of states which is a small optimization problem but when you need to solve it in one millisecond that's actually a pretty big optimization problem. So the idea is anytime we can exploit some structure to try to decompose these optimization problems to make them simpler to solve and faster to solve we should try to do that. So in this talk I'm gonna be talking about a specific structure which is cemetery which are these patterns. So model predictive control, like I mentioned it's an optimization-based control. It's actually a type of control called receding horizon control. So in receding horizon control, the idea is it's a little bit like a chess game, right? So you look at the board of the chess which is in control means measuring our sensors. You come up with some strategy. So you think about it for a while you come up with some strategy of a series of moves you're gonna make in the chess game and then you apply one of those moves and then you see what happens and you get feedback by constantly replanning as things change and don't go as expected. So in model predictive control as opposed to just broadly receding horizon control that planning stage is done by solving an optimization problem. So we have this finite time constrained optimal control problem that we solve to get our control inputs. Let's see if I talk about this. Yeah, I'll talk about real quickly about what the ingredients of this optimization problem are. So we have a model of our system. So this is our dynamics of our system of how it changes and involves over time. We have some constraints that we have to satisfy and then we have a cost function that describes what kind of behavior we want out of the system once we've closed the loop. So some of the issues we have to worry about when we design model predictive controllers it's not just optimization but we also have to worry about control theoretic things like stability. So we need to make sure that as we're doing this planning over a finite horizon we're still accomplishing our long-term horizon goals. We need to worry about persistent feasibility. So we're solving this optimization problem online to get our controller. The issue is that optimization problem isn't guaranteed to always have a solution. We can actually get situations where we literally paint ourselves into a corner because the optimization problems took us on a sequence that led us to a situation where it's just not possible anymore to satisfy our constraints. We also need to worry about robustness. We need our controller to function even when our model isn't perfect because we have a lot of systems coming off an assembly line or because there's unmodeled dynamics or things like that. So we need robustness, we need performance. So we're only looking at the cost of our finite horizon. So we really need to worry about designing a terminal cost that sort of amateurizes the cost over the infinite horizon and then of course real-time implementation. So we need to solve these optimization problems. It's great that we can pose this problem as an optimization problem, but we need to solve it in time to implement the solutions. And it's that last point that I'm gonna be talking about mostly here in terms of symmetry is how we get that real-time implementation. So how do we solve these problems on time so that we can implement the solution when we need to? So I'm gonna start by talking about something called explicit model predictive control. So explicit model predictive control, the idea is you can take your finite-time optimal control problem and you can actually solve it parameterized by the state. So these optimization problems aren't just one that you're just gonna solve once and be done with it. Instead, you're solving this optimization problem at every time instance depending on the state of your system. So if it's a car, you're looking at the position and velocity of your car and you're gonna solve an optimization problem that's based on your current position and your current velocity. So what you can do is this optimization problem, it only depends on the state of your system. You can actually form basically what's a lookup table of the solution. So the solution is going to be, of this optimization problem is going to be some function where your optimal control is going to be, so your optimal control input is gonna be a function of your state. And it turns out if you have a specific type of optimization problem, either a quadratic program or a linear program that this lookup table has a really nice form. It turns out to be piecewise affine. So we get these, this linear term plus this affine term and then those affine pieces are broken into polyhedral regions. So what we have is when our state is in some region which is a polytope here are, we apply this affine control law and when it's in this region, we apply this affine control law. So that's explicit in PC. So now I wanna define symmetry. So I'm gonna define symmetry specifically for optimal control problems here. So to, for something to be a symmetry, it has to basically preserve our constraints, our dynamics and our cost. So these are transformations of our state space and input space that preserve these three things, these constraints, dynamics and cost. So let's say these are our constraints in our state space. So we have a two-dimensional state space and our constraints are this octagon here. Well, the symmetries would then be rotations of 45 degrees and reflections about this axis, this axis, this axis, this axis because those reflections and rotations map this constraint set to itself. So those are the symmetries of our constraints. We can also have symmetries of our dynamics. So that's a little bit more abstract, but basically the idea is shown here are all the state trajectories of our system under a specific control input. And the idea is that if the system's symmetric, if the dynamics are symmetric, we can take these state trajectories and we can apply these same transformations to them and we can map a state trajectory from one initial condition to a state trajectory for another initial condition. So this is the idea of the symmetry for the dynamics. And then the cost, the symmetry for the cost is the idea that if we have two trajectories that are symmetric, say under the dynamics, we can have a cost for how well we think that trajectory behaves. The idea is that if it's symmetric, two symmetric trajectories will have the same cost. Okay, and so it turns out this is what my dissertation work was on back six years ago. I did a lot of work on this for model predictive control and basically what I was able to show is if you have a symmetric optimal control problem, then you have a symmetric optimal controller for that optimal control problem. And I say A because I didn't specify that these costs need to be convex or strictly convex. So you might have more than one controller that is optimal, but at least one of the controllers among the controllers that is optimal will satisfy this symmetry property. So what the symmetry property means is basically, so here's what our closed loop dynamics look like inside this set. So if we pick some point X and we look at what the controller is trying to do there and we look at some image of this under the symmetry, the control action at that image will be the same as the control action that we were originally trying to do. So that theorem is actually really, really general. It actually applies to not just explicit model predictive control, but basically any optimal controller under some pretty weak conditions. Now, a corollary of that, which is a practical importance is the idea that symmetric explicit in PC, what happens is we get these pieces of the controller. Again, that controller was piecewise affine, the pieces of the controller are related by symmetry. So not only do we just get the optimal control input is related by symmetry, but we get these pieces. So these gains, so our controller is made up these linear gains plus these affine offset terms and these regions. We get basically that those get mapped to each other. So that's what's shown in this figure right here. So basically our optimal controller for a QP say is going to take our state space, which in this case is two-dimensional and it's gonna break it into these regions. So however many regions there are here. The idea is that because of symmetry, we can basically take each one of these red regions, we can rotate it and get this red region, rotate it and get this one, rotate it and get this one. Not only do those regions map to each other when we do rotations and reflections, but also the control law. So the affine control law that's optimal for this region maps to this one and maps to this one and maps to this one. So those control laws sort of get reflected and rotated to give you the optimal controller. So the idea is now we can compress this explicit NPC because that's really the issue with explicit NPC is that you can get this explosion in terms of the number of pieces to define the controller. Basically it grows exponentially with the number of constraints in your system because what you're basically doing, it's similar to an active set solver for solving an optimization problem. You're basically enumerating each active set. So for each active set for your optimal control problem or the optimization problem you're using to solve for your optimal controller, each active set, you get one set of a gain, an affine term and then the region where that's valid. So what we can do is, if we have an exponential number of these, but it's symmetric, we can get an exponential reduction in the exponential number of pieces. So that's what's shown here. So basically because we know that all the controllers in the red regions are related to each other, there's really no point in keeping all three or all four. So we're gonna throw away three of them and we're just gonna keep one. The blue region gets mapped to itself. So we need to keep that. Likewise with this green region, we have four of these. We only need to keep one because the others are redundant. So we can throw away three. The yellow regions here, there's actually eight of them. Again, for these, we only need to keep one of those eight and we can throw away the three. So by doing that, we can get a really big decrease in the amount of memory. So here's a really simple example. So this is for a quad rotor. So trying to do the controller for a drone and trying to reduce the explicit MPC. So the, I'll talk a little bit more about this but the quad rotor has 16 cemeteries. Basically there's four rotations. There's four reflections. And then we can basically take the thing and flip it upside down. And so we get a reflection there. And so that gives us 16 reflections or 16 cemeteries and we can use those 16 cemeteries to reduce the complexity of the controller. So like I was saying, these things can really explode without exploiting cemeteries. So if we look at the explicit MPC for a quad rotor which has, I think, 12, 13 states. The explicit controller will have 10,000 pieces on the order, right? A little over 10,000 pieces. And it's gonna take 53 megabytes of memory to store that. So if you have your processor that's running your controller onboard your drone that processor is gonna need 53 megabytes of memory to store the lookup table for this controller. That's the idea is that we save on computation time because we have the controller in a lookup table rather than solving an optimization problem in real time. But this requires a lot of memory. Now with the cemetery, with these 16 cemeteries we can get a pretty big reduction in the amount of memory we need. So we go from something like 10,000 pieces to under 800 pieces and 4.2 megabytes. And by the way, so there's the, I have here the size of the orbits. What the orbits are is, so all the red regions form an orbit here, all the green regions form an orbit, all the yellow regions form an orbit. So we can talk about orbits of different sizes. So for this cemetery group, we have orbits of size one, two. So we have pieces of the controller that they don't, they aren't symmetric, so they're orbit in size one. Ones that are just reflectively symmetric so they have a size two, four, eight or 16. And you can see we get a lot of the 16 ones, which is why we get a big reduction in memory. Okay, so that controller, it's great because it reduces a lot of memory, but the downside is, is it's really a data compression system, right? So you have to create the full controller and then you can press it afterwards. And that's an issue because to do this controller by the way, I just ran my computer over the weekend to get these 10,000 pieces because it does take a lot of memory to form this lookup table. And so it'll take, I think it was even a three-day weekend. It'll take three days to calculate this and then I'm gonna throw away 9,000 some of these pieces. So why should I bother spending the effort to calculate those 9,000 pieces if I'm just gonna throw them away? So instead what I came up with, also again, this was part of my dissertation was this fundamental domain controller. So the idea is we can pre-compress our optimization problem so that we can find a region where we only need to solve our optimization problem on that region. So if we have a square like this, so the square is symmetric under the dihedral four group, which means we can rotate it four times and we can reflect it four times. Well, this fundamental domain here, basically this blue region, we can reconstruct the square by doing those four like symmetric operations, right? We can rotate this four times and we're basically gonna get wedges and then we can reflect it four times and we're basically gonna get the entire square covered. So that's what a fundamental domain is. Is it basically it's a small set that covers under cemetery your original set. So the idea is that when we solve our optimization problem, if we wanna solve the optimization problem for every point in the gray square, because of cemetery, we only need to solve it in the blue triangle. So that's the idea. Then what we do is we solve this explicit in PC just on this little triangular region and we get these regions for our explicit in PC. And then in the work there, really the key to making this work is that when we reconstruct from cemetery, this fundamental domain, or when we construct this fundamental domain, we wanna be able to do that more quickly than solving the optimization problem. It turns out you can do that with linear complexity. And then if we have a point that's not in the fundamental domain. So say our state is here and we wanna evaluate the controller there. Well, what we would do is we would map the state into this yellow region, evaluate the controller there and then map the controller back to the original point, which means we need to do those mappings real quick. And again, we can do that in linear time complexity. And I actually just, even though I did this work on my dissertation, I just published it really recently. I had it sort of sitting and hadn't done the paper because I was working in industry. But yeah, in that paper, I did a lot of work on just fundamental domains also for integer programming and sort of like exploring what these things look like. So this is a figure taken from that paper of what the fundamental domains look like for Archimedean solids. So Archimedean solids are a class of 13 symmetric regular polytopes in 3D. And this is basically running the algorithm. We can construct a fundamental domain for each one of these. And again, linear time, actually linear in the dimension. So linear in the dimension and the number of facets. So it requires three operations to calculate these fundamental domains. Okay, so that was explicit in PC. Explosive in PC has, of course, the issue that the memory really explodes and it really, really explodes to the point where even symmetry can't necessarily save it because you'll get an exponential increase in the number of regions and exponential decrease due to symmetry, but that can still result in exponential amount of memory. So instead, what I'm looking at is implicit in PC, which is where we solve the optimization problem online, which is what I think most people think of when they think of in PC is solving the optimization problem in real time. And I'm gonna be talking, by the way, about an ADMM alternating direction method and multipliers algorithm I developed for doing this. Okay, so with optimization algorithms, you usually wanna set a standard form that your optimization algorithms are gonna sort of accept problems in. So I'm considering this form here. So this is our optimal control problem. We have basically a quadratic LQR type cost, linear quadratic regular type cost. We can have cross terms between the states and inputs, linear dynamics, and then the outputs here are how I'm dealing with the constraints. I'm basically going to, if I have constraints on my state or input, I'm basically gonna use the C and D matrices to pull off whatever states and inputs I have constraints on and then apply the constraints directly to those. And the reason I'm doing that is because I can make sure that these constraints have a standard form when I do it this way, because it basically puts all the complexity into C and D and then I could have simple constraints here that I can do, say, proximal operators on. Okay, so the alternating direction method and multipliers algorithm, it's really like a family of algorithms. I didn't come up with this. This is a well-known sort of class of optimization algorithms, but what I'm doing is a specific flavor of it. So the idea is what we're going to do is we're going to take, the constraints are really the hard part of the optimization problem. Like if we just had this optimization problem without these constraints, that's just a linear optimal control problem. And we know the solution to that in closed form solution. The issue is these constraints. We need to be able to deal with that. So the way we're going to deal with that is we're basically going to split the linear optimal control problem from the constraints by introducing these fictitious outputs. So we're going to call them V because they're allowed to violate constraints. So these are our outputs and then we're going to have our outputs Y, which are still the ones that have to satisfy constraints. And these are the same optimization problem because we have this equality constraint here. We have our outputs V have to be equal to our outputs Y. So we haven't changed the optimization problem. We've just made it more complicated, slightly more complicated. All right, so the idea with this alternating direction method of multipliers, the method of multipliers part is we take this equality constraint now and we move it to the cost function. And we actually move it to the cost function in two ways. First, we add a Lagrange multiplier to it. So we put a Lagrange multiplier on this equality constraint. And then we also add a quadratic regularization term. So the idea is that Lagrange multipliers are pretty sensitive and so you get kind of bad, you know, convergence with those. So the idea is we add a quadratic regularization term which allows us to have a smoother derivative. So it allows the algorithm to work a little bit better. And you can simplify those two terms as Lagrange multipliers and those regularization, the quadratic regularization into one term which is this cost here. So the dual variables are these gammas here. And then this row is just a step size. So the idea then is we're going to, in the alternating direction part of this optimization algorithm is we're basically going to solve this optimization problem iteratively with respect to three sets of variables. So first set of variables is going to be our states and inputs, right? So we're just going to treat it as a, just an unconstrained optimal control problem and we're going to solve that with this little Proximal, with this little Lagrange term here. The second one we're going to solve with respect to the outputs which is going to be, basically we're going to add a proximal term that says that the outputs have to be inside the constraints. So this is actually a proximal optimization problem here which has, if the constraints here are simple it has a closed form solution. And then with the dual variables, so that's our third set of variables are Lagrangian variables here, gamma. We're just going to do a simple steepest ascent algorithm on those. So we basically just, the alternating direction method of multipliers we basically solve in three different directions which are, we solve for our states inputs and outputs where these are the outputs that are allowed to violate constraints. We then solve for the outputs that are closest to the outputs that violated the constraints but satisfy constraints. And then we solve for the dual variables by a steepest ascent. So I think this problem has a really cool intuition for optimal control problems. This algorithm has a really cool intuition for optimal control problems. If we take these, the Y and the gamma and we call that R, what we're getting is we're getting basically a reference. So this optimal control problem here is trading off solving this is going to try to minimize the open loop or the unconstrained optimal control problem. And then this guy's going to try to track some reference and it turns out what's happening with these two sub-problems is they're building a reference that pulls you away from the constraints. So these two sub-problems here are iteratively basically performing integral action to pull you away from the constraints. And then this optimal control problem is trading off tracking that reference that satisfies constraints with the optimal, if we didn't have to worry about constraints this is how the system would optimally perform. So what that looks like is this, right? So we have this green line is our optimal performance if we didn't have to worry about this black constraint here. So if we didn't have this black constraint this is what our system would do and that would be the optimal performance for it. What we do is we solve this proximal problem which is going to project that onto the constraint. So it's basically, if the green is below the constraint it's just going to keep it, if the green is above it's just going to drop it down below the constraint. So that's our initial reference and then what's going to happen is this optimal control problem is going to try to track it's going to try to track something between these two. So it's going to give us a new solution that's between the green and the red which is the blue here. Now we again have this error and what we do is this is why I call it integral action is we're basically going to take this error and we're going to subtract it from the red curve to pull the red curve down. Now we get something that violates constraints a little bit less and we basically continue that process until that red reference is going to try to pull the green line to turn into the blue line away from the constraints until finally we satisfy constraints and we have optimal performance subject to those constraints. Okay, so this algorithm has a nice interpretation it's got great guarantees on convergence and things like that. The problem is when we have really large scale problems it can become intractable to do this. And really the part that's the hardest part is this unconstrained optimal control problem this sub problem one. These two sub problems have linear complexity so basically the bigger you make your problem these only grow linearly with the problem size but this grows depending on how you solve this unconstrained optimal control problem it can either grow quadratically or cubically. So the idea is we're going to try to decompose this sub problem using symmetry and we're going to use something called the symmetric decomposition. Okay, so the symmetric decomposition is based on a theoretical result from the representation the linear representation theory of groups. So linear representation theory is basically we take groups which are a mathematical structure from abstract algebra and we basically represent those groups using matrices and then we can say things about the group based on what we can say about the matrices so we can prove things about the group. One of the most famous results of this was Scherz Lemma. This is the one I think Scherz was best known for and he sort of wanted to be known for this isn't the Scherz compliment this is a different result. And basically what it tells us is that for a linear representation of a group that it has invariant subspaces basically because of symmetry there's going to be like regions for all these operators that are going to be invariant for all of them. So in other words, they're going to have eigenspaces in common. So this is actually a really useful result for a lot of things, including dynamic systems. So how we're going to use it for dynamic systems is basically what it's going to tell us is if we have some system G we can inject the U and we get out a Y what we can do is if we inject the U where it just lies in this invariant manifold then the output will only lie on this invariant manifold Y1. Likewise, so that's true for linear operators in Jordan form but the really strong thing here with Scherz Lemma is that you also get the same thing for the compliment. So if we put our U in the compliment of that U1 then Y is going to be in the compliment for that. So the idea is we can now, if we inject our control in a specific along a specific manifold we're only going to get the output in that specific manifold and vice versa, right? There's not going to be any mixing between this. And what that allows us to do is it allows us to basically take our system and split it into two. And basically for every symmetry we can basically split those systems into two and so on. So that's a little abstract. So let's do a concrete example here. So this is a classic sort of undergrad controls class. We have two oscillating masses here mass spring damper system. And this system here is symmetric with respect to reflections, right? We can basically reflect it left and right and we won't change the system because all the Ks and the Bs are the same. So the idea is this manifold, so there's like U1 and its compliment correspond to in phase and out of phase forces. So if we have where we're applying a force to both these blocks that are the same then intuitively it makes sense that both the blocks are going to move the same. So they're going to, if we apply an in phase force on the blocks we're going to get an in phase response from the blocks. And you can actually plug this in to the transfer function for this system and you can actually see that the transfer function if we perform this transformation it will actually decompose. So actually what we'll get is we have a, this is actually a fourth order system. We can actually decompose it into two second order systems and these two second order systems don't interact at all. So we're going to get an out of phase response from the blocks. And you can actually plug this in so the second order systems don't interact at all. So from a controls perspective this is actually really nice because instead of trying to control a fourth order system which again if we're doing optimal control we have to solve an optimization problem with four states we solve two optimization problems with two states here and here. So a little bit less of a toy example more of a practical example as a quad rotor. So here what we can do is again the inputs into different subspaces and then these subspaces have basically independent actions on the system. So if we throttle all four of our quad rotors up and down the same amount we basically control the Z motion of the quad rotor. If we do alternating so these two up and these two down what's happening is these are actually rotating the, and the quad rotor the rotors every other rotor rotates in opposite direction so we actually get a torque and so we get the Z direction the Z angular dimension controlled with this direction. Here basically if we apply a force up here and a force down here the quad rotor tilt and it'll move to the side. Likewise if we apply it here and here it'll move along say call this the y-axis and call this the x-axis. So by basically decomposing our U's into these four different channels we can control four different aspects of our quad rotor independently. So the quad rotor has 12 states. Basically we're going to get a two state system for this, a two state system for this a four state system for this and a four state system for this. So we get a total of 12 split between these four which is a lot easier to control than a 12 dimensional system. Okay so the idea is back to this ADMN algorithm we're going to use this idea to split this optimization problem and we're going to do something way more complicated than a quad rotor we're going to do say an HVAC system or a smart grid system where the dimension of this system is you know in the thousands in the hundreds or thousands of states and we want to break it into smaller more bite-sized chunks. So the idea is using this symmetric decomposition we can take our ABCD matrices of our system which again a really large scale and we can basically break them into a whole bunch of independent low-dimensional systems that we're going to control independently. That's not very useful on its own if the cost is coupling them so we are actually going to also do it with the cost and because the cost is symmetric we can do the same trick and these decompositions will correspond to each other so we get systems that are their dynamics are totally decoupled and the costs are totally decoupled and so when we solve the optimization problems here the unconstrained optimization problems there's absolutely no coupling so we can do this completely in parallel or even in series just solving these smaller optimization problems one after another and we're still going to get some improvement. So that's the idea. We take this unconstrained optimal control problem which is one of the steps in our ADMM algorithm and we split it into a whole bunch of smaller problems that we can solve much quicker. So this is sort of how the flow of that algorithm works or at least that first step we get this reference from the other two sub-problems which we're still going to solve in a centralized manner which is really simple anyway. We're going to take that reference we're going to distribute it to say all of our different processors which is going to give a reference on this sub-space we're going to solve the optimal control problem which is going to give us basically again it's going to be a smaller version where it's going to trade off the unconstrained optimal and this reference which is now just a chunk of the total reference we're going to get all these problems solved independently together and then that's going to be our controller for our system. Okay so this actually will increase the this will actually increase the speed of the algorithm a lot but that I don't think is totally obvious. So here's sort of the logic. So first of all decomposing these sub-problems will not change the convergence rate, right? So one thing I didn't talk about these transformations are orthogonal so they're not going to change the sort of numerics of things. So our convergence rate of our optimization problem is going to be the same. That means whether we do this decomposition or not it's going to take the same number of iterations to solve our problem. Where we get the savings in terms of computation is that the iterations are cheaper. We're doing the same number of iterations but they're much much cheaper. So if we do it sequentially like I mentioned we basically take these optimization problems and we solve them on one processor one after another. We get a reduction in M in complexity where M is related to the amount of symmetry in the system. If we do this in parallel so we send it out to a whole bunch of different processors we're going to get M squared reduction in complexity. So that's the good news. The bad news is that there's an extra step here, right? Because we have to constantly be transforming to do this decomposition. Because we're doing the original problems in the original domain. So we're going to take this problem, we're going to decompose, right? Like we showed here, we're going to decompose and then we're going to recompose. So we need to do this decomposition and recomposition every single iteration. In general that is more expensive than actually the iteration of the optimization problem or at least as expensive as the iteration of the optimization problem. So if this decomposition was a singular value decomposition or an eigenvalue decomposition we wouldn't actually be getting any memory savings because the transformations for those are actually more expensive than the amount of memory or the amount of computation we would say from doing this. Luckily because of properties of these these symmetric transformations these symmetric transformations have much, much lower complexity than you would expect. So in the paper where I published this I talked about two different, well four different symmetry groups. Two pairs, one is the cyclic group or the dihedral group. So for these that symmetric decomposition actually turns out to be the fast Fourier transform. It actually turns out to be the Fourier transform. We can do the fast Fourier transform. So instead of getting this complexity that's m squared we get complexity that's m log m. So we can do a much faster transformation to do this decomposition. So basically what would happen is we'd have this reference coming in we do a fast Fourier transform send each of the terms in the fast Fourier transform to a separate optimization problem which would then solve it and then do an inverse fast Fourier transform to get this guy back. So that's a known result. The result that I have never seen before and that I came up with is that we can do a symmetric group or a hyper-ocpahedral group that we can actually even do even faster than Fourier transform or fast Fourier transform. We can actually get this transformation to happen in linear time. I'm not going to go into details of that because it would be another 20 minutes. But when we can do that that gives us a massive increase because now the doing this transformation is actually comparable to doing these sub-problems. All the benefit we got from doing the decomposition we actually get to keep because we're exploiting the symmetry here. So to close out I'm going to do an example. I published a number of different examples where I've used this algorithm and shown it's utility. I'm going to do one for A-track. So I think I mentioned at the beginning of the talk that I worked at Mitsubishi Electric Research Labs and we did a lot of work on heating ventilation and air conditioning control. These are kind of a challenging problem for model predictive control because they're so large scale. But on the other hand model predictive control is actually a really good way to control these sort of systems because it gives you really good performance and it enforces constraints which is really important for these HVAC systems especially the ones I was working on with vapor compression systems. So vapor compression systems you actually have refrigerant flowing between rooms and that refrigerant you need to control the phase at various points of that refrigerant which is a constraint. You need to make sure that the phase coming into the compressor it's purely gas because you don't want to pull in two phase because it'll ruin the blades on the compressor. There's a number of different constraints that we can enforce. So model predictive control is a really attractive approach for this because we can enforce those constraints while also getting optimal performance. So our cost function for our optimal control problem is basically we have room temperatures we want to track so people have thermostats in their offices we want the room in that temperature to be the room the temperature they set on the thermostat and we also want to minimize energy consumption. So HVAC buildings consume 40% of the energy in the US and HVACs I think at least a third of that if not a half of that so these HVAC systems are drawing a significant portion of the United States the power generated in the United States so we want to try to optimize that and try to reduce the amount of energy consumed. And then the dynamics are quite complex because we have the thermodynamics the fluid dynamics and all the heat transfer happening in these systems. So what's the cemetery do to the cemetery is not actually due to the rooms being the same size so for these vapor compression systems the dynamics of the rooms are kind of insignificant it's really the heat train the thermal and fluid dynamics of the refrigerant flowing through all these different pipes and the cemetery is really because we have the same equipment in each of the rooms right we have the same heat exchanger or you know one of three different sizes of heat exchanger that the company manufactures the refrigerant is flowing through the same size pipes as you know the thermocouples are on the same points on that heat exchanger the heat exchanger has a fan blowing air across it those fans are the same so that's where the cemetery in these patterns are coming from is the fact that you know every HVAC you know every unit indoor unit isn't custom made by you know some monk in the woods it's coming off of you know a factory assembly line and they all look almost identical and we can exploit the fact that they look almost identical to reduce the computation not just the computation time but also the memory for implementing these optimal controllers so here's what the the computation time so the solver time looks like as we increase the number of rooms so one of the things with these HVAC systems is you know they can get arbitrarily large sort of like smart grid right because you can always keep adding more and more and more components to it so this is just this is for 32 I went from four rooms to 32 rooms I only stopped there because at that point these experiments were getting kind of long to perform but the idea is what's shown here are so the gray is a commercial solver called quad prog we can see if we use the commercial solver after you know about 16 rooms we're no longer solving this optimization problem at the rate we need to so we're trying to solve these optimization problems at the rate of one minute so every one minute we're recalculating what our HVAC system is going to be doing and once we get above 16 rooms we can't do that reliably we can every now and then so these are showing the range of solver time you know once we get to 16 rooms there are times when we're exceeding that and by the time we get to 20 rooms we're always exceeding it for the commercial solver the red is the baseline ADMM solver I talked about without exploiting any symmetry and this grows quadratically with the number of rooms so as we increase the number of rooms this thing basically at some point we're going to hit at some point where we're going to exceed what we can do within the allotted time on the other hand if we exploit symmetry and we can actually keep it underneath this limit whether we're doing it either sequentially where we have one processor we're just solving these optimization problems one after another and then reconstituting things or in parallel either way we can stay below this limit so in parallel actually our computation time basically stays constant in sequence we basically get a linear increase in the the computation time as we increase the number of rooms so I mean the reason I'm presenting this is I think this could be useful for smart grid if we can find these sort of patterns we can look at you know solving these optimization problems exploiting the symmetry to decompose these optimization problems so that we can solve them more quickly by the way we also get some memory saving so for the by the way so there's the we have a unit on top of the roof that's doing basically rejecting say if it's air condition it's rejecting heat into the atmosphere and then we have the indoor units which are pulling heat out of the room so these are the indoor units this is the outdoor unit the idea is when we decentralized this computation normally in centralized computation we would be doing all the computation on a processor in the outdoor unit we're going to split that between processors in the indoor units so looking here is the memory for the indoor units so how much memory do we need to just write down this optimization problem so again if we just did it on the outdoor unit not exploiting any symmetry as we increase the size of the the system we also increase the size of the optimization problem and we at some point very quickly exceed the memory which I think was around 600 kilobytes was the memory on that outdoor processor so by the time we get to eight rooms we've exceeded that but intuitively it makes a lot of sense that we don't need more memory when we're just adding on more of the same identical systems right like we have, you know, four indoor units four identical indoor units or we have eight indoor identical units I don't need more bits to tell you that I just need to tell you eight of these identical systems instead of four of these identical systems so the amount of memory we need when we exploit symmetry actually remains constant so in the sequential one we're doing all the processing on the outdoor unit that's why its memory is higher than the other ones and yeah but we get a constant amount of memory regardless of the number of identical indoor units we add to our system for the for the parallel that memory goes a little bit down because we distribute some of the optimization problems to the outdoor units so we don't need to solve we don't need to store all the optimization problems on the outdoor unit we store some of them on the indoor unit and less memory you know only a few tens of kilobytes I think 50 kilobytes on those outdoor sorry those indoor units but we stay below that very easily alright so that is the end of my talk I'm happy to take any questions anybody has oh that was awesome thank you okay I personally thank you back to the green up I personally this sounds a lot like fractals as far as the scalability and maybe I'm misunderstanding that but what how do you see it applying to microgrid distributed microgrid systems like in our current day because it sounds like a lot of it depends on obviously symmetry but the same machines the same components I guess the microgrid is kind of a piecemeal situation do you see any other areas where this could help yeah so that's a good question um so yeah so one thing is you're going to have definitely less patterns if you have like the microgrids and they're all sort of custom made there might not necessarily be symmetry one thing is these symmetries can actually get also pretty abstract because it's you know so with the HVAC one they're all sort of permutation symmetries but they don't need to be that they're basically you can transform one system into another so if it's possible to take one system and basically transform it into another by slowing it down or speeding it up or things like that we could possibly apply this the other thing is you know this might be different but they might have a set number of types of components which we can use that symmetry too so I used where all the indoor units were identical but what we could have is we could have say like you know four different types of indoor units and then those increase in different numbers and we can exploit that symmetry to reduce computation um yeah that's pretty cool because it has really wide ranging implications for the for the processing load and the kind of things um do we have any other questions we do not have any more questions at this time but people a minute to type them in um and while we're waiting for people to type them in uh I will just go ahead and plug the next webinar as well um and thanks thanks POS for um presenting today um it's really cool to see the complexity that goes into things that operate in our everyday life and how it can be approved um and how much there is behind it to consider um so the next webinar we're going to have is April 29th on a Thursday and it's Dr. Hemid Nadimi and I hope you can join us for it and it looks like we don't have any other questions so with that I want to thank you thank you Dr. Danielson for presenting today and wish everybody a wonderful afternoon join us again next month um for Dr. Nadimi's talk have a great day great thank you