So, when you do control design you always have a number of parameters that need to be tweaked and tuned. And there's really no way of selecting these parameters without actually testing what's going on. So, we have seen how to design now goal to goal behaviors but we haven't really picked parameters in the PID regulator. So, what we're going to do now is take what we have done and actually simulate it. And for that, we're going to use our in-house GRITS robot simulator, which is a MATLAB-based simulator. It's based on a Khepera [inaudible] differential drive mobile robots with infrared range sensors around it, so it can detect things in the environment and odometry is obtained using wheel encoders. and I should point out that I will be using this simulator quite a lot in this course. and you can actually download it for free at this address and you can either download it as a standalone executable, which means you'll be able to run it and interact with the user interface, or you can download the entire MATLAB package. Now, I will not require that you use if for the course, but if you want to play around with different control designs on a robot, this is a very good simulator to start with. So, let's actually see what it would do. So, I'm going to move over to MATLAB and start up the simulator. And what we're going to see here is, this is the robot, it's pointing in some direction. I have placed a goal at negative 1, 1 so it's going to go backwards in this direction to get to the goal. So, let's see what it's actually doing. So, I'm going to start playing this. The robot is turning, turning and, as you can see here, the blue line is the, is the actual heading and the dotted line, the red line, is the desired heading. And here, we have quite a bit of overshoot. So, this is not a particularly good control the sign actually that's going on because we're overshooting even though we now seem to be stabilizing towards the direction in which we want to go. So, instead of going in this direction, let' s, let's see if we can do something better to the, the control parameters. So, I'm going to open up the file where we define the PID controller. So, I have a p gain, a proportional gain of 10, an integral gain of 10 and no d gain. Well, the integral gain of 10 seems rather excessive to me. So, I'm rather brutally going to say, why don't we make it 0? We're not caring about getting exactly there. So, let's turn it down to zero and actually see what happens. So, if we do that and close this window here, and this window, let's see what happens, let's start it off again. Well, now, let's, let's start the simulator and now, it should go again to negative 1, 1. And hopefully, we'll we will have cured the robot of its annoying overshoot. And look at this step response. See how the desired heading goes up to, or the actual heading goes up to the desired heading quite nicely and then stabilizes to where we wanted. So now, in simulation, we have verified that this particular choice of control parameters is, is at least not entirely useless. which is a good way to start when you actually go on a real robot. So now, let's stop this simulation business and move on to the actual robot. So, now that we've seen how to think about control design for building a go to goal behavior, and we even simulated it with varying degrees of success, let's actually now put it on an actual robot. So, I'm here with again, JP, who is the master of ceremony and a Khepera 3 differential drive mobile robot. And we're going to be running exactly the same code as we did in the simulator. All we're doing is flipping a switch so we're actually running it on the robot instead of on the simulator. And this differential drive robot will know where it is based solely on the edometric information it's getting from the wheel encoders, and its task is, is to make it from here over to this turquoise gold point here. And a simple PID regulator is enforced and we're going to use the same parameters as in the simulation With a p of 10, an i gain of 0 and a d gain of 0, so its a pure P-regulator. And without further ado, JP, let's see how the computer does. ,, , And as you can see the turn was nice, there are very few or little oscillation here and the Khepera is making it very nicely all the way to the turquoise goal point. So, we will call that a success.