# How do I model a robot?

The answers I received to the question on training a line following robot using reinforcement learning techniques, got me to think on how to train a robot. I believe there are essentially two ways -

1. Train the physical robot.
2. Model the robot and simulate the training.
3. Did I miss something?

Approach 2 is definitely the better approach. However, a priori knowledge of the motion (response), a certain PWM signal (stimulus) would cause when the robot is in a given state is required. The motion caused by a PWM signal may depend on the (1) current battery voltage, (2) the mass of the robot and the (3) current velocity (did I miss something?).

How do I model such a robot? And how do I model it quick? If I change the battery or add a few boards and other peripherals and change the mass of the robot, I would have to remodel and retrain the robot. Can I do this by providing some random stimulus PWMs and measuring the response?

added: My related question in dsp.SE

Update: A suggested edit to the title by Ian worth mentioning - "How do I model train a robot so that if its dynamics change, it does not need complete re-training?" I think this is a good question too but different from the one I am asking here. I am okay with re-training for now.

• There are lots of great questions here. In fact it might be better to split this into multiple questions. – DaemonMaker Nov 15 '12 at 18:53
• How do you suggest I do that without loosing the background? I already split a part of my question into dsp.SE – Lord Loh. Nov 15 '12 at 19:08
• You basically have two questions going on here. The first being, how do I model a robot? The second being, how do I train a robot given a model and a learning algorithm? It seems to me these could be two separate questions. – DaemonMaker Nov 15 '12 at 19:20
• You are right. The question that appears as how to train a robot was intended to be rhetorical. I think I will try to edit it out. – Lord Loh. Nov 15 '12 at 19:26
• In that case I'll wait to see your edits before I attempt to answer your question. – DaemonMaker Nov 15 '12 at 20:13

For modeling the kinematics Denavit–Hartenberg parameters are commonly used. the course Introduction to Robotics provided by Stanford University is available on YouTube