### Author Topic: Constant velocity robot  (Read 2120 times)

0 Members and 1 Guest are viewing this topic.

#### greatworld

• Beginner
• Posts: 3
• Helpful? 0
##### Constant velocity robot
« on: January 03, 2011, 06:40:50 PM »
Hello everyone,

I would like to build a robot, a wheeled robot 2 or 4 wheels , but I need it to move with a constant angular velocity and linear velocity, any ideas of how to achieve this model??

thanks so much.

#### waltr

• Supreme Robot
• Posts: 1,944
• Helpful? 99
##### Re: Constant velocity robot
« Reply #1 on: January 03, 2011, 06:53:16 PM »
A wheel on a Bot moving at a constant angular velocity is moving the Bot at a constant linear velocity.
Is this what you mean?

As for regulating the speed there are several methods to provide feed-back to the motor control.
A common one, since it is fairly straight forward, is to put enocder on the wheels the the processor measure the rate of or the time between the encoder ticks. The processor is also the controlling the motor speed with a PWM signal to the motor driver circuit. The processor code adjusts the PWM duty to maintain a constant speed.

#### greatworld

• Beginner
• Posts: 3
• Helpful? 0
##### Re: Constant velocity robot
« Reply #2 on: January 03, 2011, 07:09:05 PM »
yes that's what I exactly mean,

1- do you mean to maintain a constant PWM so that my speed will be constant?

2- is their any way to simulate this model,  using MATLAB Simulink, or other software , or it will be hard as it depends on the motor type and specifications??

3- if not, I need to give my main project algorithm a constant linear and angular velocity, even just for assumptions, but I don't know how to obtain a relation ship between them or how to put my assumptions on?

thanks.

#### waltr

• Supreme Robot
• Posts: 1,944
• Helpful? 99
##### Re: Constant velocity robot
« Reply #3 on: January 03, 2011, 08:23:16 PM »
Quote
1- do you mean to maintain a constant PWM so that my speed will be constant?
Yes, IF all external forces remain constant. However, that is almost never the case which is why feed-back is so commonly used. With feed-back the velocity can be held constant by changing the PWM duty to compensate for changes in external forces (which can also be changes in items like gear box friction and motor efficiency).

Quote
2- is their any way to simulate this model,  using MATLAB Simulink, or other software , or it will be hard as it depends on the motor type and specifications??
It can be modeled but it is difficult due to the reasons you stated. You can make some assumptions and guesses for an approximate model that would be helpful to work out how to do it.

Quote
I don't know how to obtain a relation ship between them or how to put my assumptions on?
The beauty of feed-back control is that the system can be self correcting within reason. You could also build parts of the system and make measurements to have more than just some guesses.

A place to start is the DC specs of the gear motors. Assume a 100% duty PWM (DC) and the no load RPM. This would be the absolute top speed. Then assume some loading that will slow the motor with 100% PWM (here guess or measure a real motor).
Now assume or measure the loaded speed at 50% PWM and set the target (desired) speed for this RPM.
Choose an encoder configuration, number of ticks per revolution, and calculate the relation between the encoder and the PWM duty.
Now you have a basic model. If you can then make measurements of a real motor/gear box/sheel & Bot you can refine the model.

#### greatworld

• Beginner
• Posts: 3
• Helpful? 0
##### Re: Constant velocity robot
« Reply #4 on: January 04, 2011, 06:56:10 AM »
thanks, so much for your help, but  I have one final request,

I'm a system engineer not a mechanical, I only know some fundamentals about the mechanical systems, so if you please direct me to some articles about the implementation of the mechanicals and how to deal with them
(the robot is only a small part in my project).

thanks

#### waltr

• Supreme Robot
• Posts: 1,944
• Helpful? 99
##### Re: Constant velocity robot
« Reply #5 on: January 04, 2011, 08:31:51 AM »
Most application to electro-mechanical systems is from the first year Physics courses. If you took this course then get out the old text book for the fundamentals. If not then keep googling for info.

Here is some good info on motors:
http://www.micromo.com/n42044/n.html
The "Motor calculations" and "How To Select A DC Motor" and other articles are quite good.

Some google terms hat may help are:
closed-loop
servo motor
PID
PID tuning
« Last Edit: January 04, 2011, 10:30:04 AM by waltr »

#### airuno2l

• Jr. Member
• Posts: 12
• Helpful? 0
##### Re: Constant velocity robot
« Reply #6 on: January 11, 2011, 06:48:44 AM »
I would suggest using PI (proportional and integral control), it is PID without the D which is derivative. The derivative usually causes way to much noise in cheap applications like hobby robotics, and PI can do good enough.

Wikipedia has a good write up on the PID controller,
http://en.wikipedia.org/wiki/PID_controller
But don't worry about all the maths, just the intro, the control loop basics section, the section on manual tuning, then the pseudocode

If you need some help with the pseudocode:  you get the "actual_position" from encoders mounted to the motors or wheels, and "set point" is the the position you desire to be in, (this also works with velocity instead of position by the way). Then your "output" can simply be the PWM duty cycle (with some scaling of couse).

Get Your Ad Here

data_list