Modeling and Controlling Wheel-Legged Robots
Aurel Marian and Jose Avendano explain how to model and control robots that combine the use of legs and wheels using Simulink® and Simscape™. By modeling the dynamics of a wheel-legged robot, the feasibility of designs can be explored, and the required close-loop control systems can be developed in order to balance the structure and control motion reliably.
Published: 4 Nov 2022
Hello. Welcome, everyone, to the MATLAB and Simulink Robotics Arena. Today I'm here with Aurel Marian. Hi, Aurel. How are you today?
Hello, Jose. Thank you for having me. I'm fine, thank you. How are you?
Pretty good. And Aurel is going to be talking to us about an up-and-coming topic in the robotics community, which is wheel and legged robots. And he's going to be talking to us about how to model and control them using simulations. Aurel, the stage is yours.
All right, so for today's agenda, I'm going to show you a control loop diagram of all the control loops involved in the simulation. Then I'm going to do a software demonstration talking about the contacts, actuators, and the sensors involved. And then we're going to wrap it up by talking about the key takeaways and what can be done next for the development of this project.
Starting off with the control loop diagram, on the left side we have all the closed control loops that are involved. And at the top side, we have two closed control loops that represent the joints. And then we have-- in the middle of the diagram, we have the main one that represents the IMU sensor and the wheels. And then at the bottom of it, we have the shoulder joints and their respective closed control loops.
And the way they work is that each of them, they feed their output to control the robot and make it stand balanced in an upright position.
The most important one is the one here in the middle that are dealing with actuators for the motors of the wheels. And they take the IMU sensor and take the parameters from it And then they are being fed to two PIDs which control the wheels. Now moving forward, I'm going to do a software demonstration for it.
Thanks, Aurel. It looks like you've just opened up a Simulink model. Would you mind explaining to us what are the different components of this model?
Yeah, sure. So what I've opened here is the main system for our robot. And the way the system is working is that all the blocks have been reorganized into different subsystems to make it more simplified and to make it similar to how the robot would look like.
So for example, we have at the top-- starting at the top, we have the head subsystem, the respective shoulders, knees, and the subsystems of the wheels. Now at the bottom, we have the contacts. And the contacts are simply some blocks grouped into a subsystem which allows interaction between the ground and the wheels. That way, the robot would not fall through the ground when the simulation is working.
Now going back into the main system, made some set points and a debugging area to control more easily each independent subsystem for the actuators. Now the main and most important sensor for this robot is the IMU sensor which is just a transformed sensor block which allows the robot to take the position and the angle of the robot and use that to balance the robot in an upright position.
And if you guys are not familiar with this type of modeling, that includes the transform sensor and the 3D CAD imported to Simulink. Look into our Simscape Multibody product documentation and there'll be lots of tutorials to teach you how to put your own CAD and your own designs into a simulation.
All right, so moving to the 3D visualization of the system, after we run the simulation, we have a button to see what happened in the simulation, and once we click Play, we see that the robot falls from a slight distance above the ground, then moves backwards because it has some mass, of course, the inertia brings the robot slightly towards its back.
But as it's trying to self-balance in an upright position, it rotates towards one of its sides. And this is probably because the top sensor, which is the red geometry, could be too light or causing the mass imbalance in the geometry of the robot, or simply because the red geometry is taking the reference point for the IMU sensor to match on one of the sides, causing it to rotate.
All right, so looking into the analysis of the robot and trying to see whether the simulation was working as intended, here, we have an output graph, which has the desired angle versus the actual angle. And we see here a peak of the graph, which was that initial jerking movement of the robot, which was backwards. And then as we move forward with time, we see that the graph stabilizes itself to make the robot balance.
Now some of the key parameters which can be further studied are some of the parameters which include the overshoot, the rise time, and so on.
Now for some of the key takeaways of this project, to make the simulation more realistic, I had to use the geometries, the masses, and the forces such as the gravity. The same to have a realistic representation of the simulation, I have also used the damping and the stiffness coefficients for all the joints and the wheels.
Same with the coefficients of friction, the dynamic and static ones, to make representation between the wheels, which are simulated to be rubber and the ground to be simulated as if it were cement.
Now moving forward with the system modeling approach, the way the system was reorganized was to have a visual representation of how the robot looks like to make it easier to debug, as well as to study the behavior of the robot and tune it properly and also to test it accordingly.
Now some of the parameters which I have manipulated along the way are the PIDs and the set points. And that was done via trial and error to have a correct outcome of-- to have a correct and desired outcome of the behavior of the robot.
And if you're interested into exploring how you can potentially also use automatic ways of finding coefficients for your controllers, you can check out the documentation for the Control System Toolbox and Simulink Control Design which will also help moving forward in a project like this.
So for what could be done next in the development of this project, the controllers' performance could be improved. So for example, as we saw, the robot was moving on one of the sides, and the controllers' performance could be modified to make the robot balance in an upright position without it turning left or right.
And some other challenges to implement some other features for this robot could be to make it jump or to have each individual legs moving vertically to overcome some other obstacles. Now for some other different approaches to solve this challenge and make this robot work could be to implement a linear quadratic regulator, a model predictive control, or a reinforcement learning.
OK, that looks great. Thank you so much, Aurel, for sharing your project and all of your development with us. If any of you are interested in following along more closely with Aurel's design, I think the files will be available in the description below.
And if you have any questions, you can always reach out to our team in MathWorks at roboticsarena@mathworks.com, or through our Facebook group, which is also RoboticsArena. Thank you, everybody, and have a good day.