# Dynamic model of two wheeled mobile robot

I wanted to design a LQR controller for my two wheel mobile robot. What are the equation of two wheeled mobile robot can be rearranged into state space model? My two wheeled mobile robot is nonlinear system. The outputs of the system are v, linear velocity and w, angular velocity while the inputs of the system are x, y and theta.

• Provide whatever you've done. If you have the nonlinear system, then just linearize it and you're ready to go. – CroCo Mar 18 '18 at 2:40
• I know the method of linearise but I am still unable to find the equations that can rearrange into state space. – CK1994 Mar 18 '18 at 2:44

At first we should define what a dynamic model is. A dynamic model is equal to a physics engine. The input value is given to the engine, and the engine calculates where the robot will be in the next timestep. The calculation is done with a sinus function, Dynamic Modeling and Stabilization of Wheeled Mobile Robot For example: the robot looks to north, and both wheels are spinning. Then the robot will drive to north. If only the right wheel is spinning, then the robot will not drive to north but in a slightly different angle to the right.

Let us increase the abstraction level a bit. Writing down the formula for a dynamic model is equal to program a physics engine from scratch. Modeling a two wheeled robot is a special case. The better approach is to use a general purpose physics engine like Physx or Box2D which can not only model a single robot, but a robot plus obstacles. These kind of general purpose physics engine are also using mathematical formulas with sin and cos but are able to model any system: a wheeled robot, a wheeled robot in a maze, an inverted pendulum and so forth. The term is used for the aim to implement real software, for example in Matlab or C++. While the term “dynamic model” is used in theoretical lectures about optimal control.