View unanswered posts | View active topics It is currently Mon Sep 22, 2014 10:21 pm






Reply to topic  [ 6 posts ] 
motor speed not proportional? 
Author Message
Rookie

Joined: Wed Sep 18, 2013 9:48 pm
Posts: 1
Post motor speed not proportional?
I have a program that is setting the motor speeds motor[] in a loop from -100 to 100 and back. For some reason the motor speed is not consistent; it starts out OK but jumps when it gets to around 45, and slows down again suddenly when it reduces to 45. Not only can I see the inconsistency, but I can really hear a sudden change in the motors. I wrote the values to a file, and to the screen, and they are being set as expected. The change in speed is not meant to be linear, I'm actually using a Sin function, and I realize the maximum rate of change is around that point, but this is way beyond that, it's a real elbow. I did set bFloatDuringInactiveMotorPWM to false in case it was coasting but no change. Any idea why this is happening?

NXT 1.0, RobotC 3.62


Wed Sep 18, 2013 10:04 pm
Profile
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post Re: motor speed not proportional?
This is to be expected, and is normal behavior. When you are setting the power of the motor, you are simply setting the current percentage that the motor is receiving. This does not correspond linearly with the speed of the motor. What you are observing is the effects of inertia and such on the motor. To actually control the speed of the motor, you will need to install encoders on the motor, and then set up a PID loop or something to control how fast the motor is spinning.

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Wed Sep 18, 2013 11:12 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: motor speed not proportional?
daveoverbeck wrote:
I have a program that is setting the motor speeds motor[] in a loop from -100 to 100 and back. For some reason the motor speed is not consistent; it starts out OK but jumps when it gets to around 45, and slows down again suddenly when it reduces to 45. Not only can I see the inconsistency, but I can really hear a sudden change in the motors. I wrote the values to a file, and to the screen, and they are being set as expected. The change in speed is not meant to be linear, I'm actually using a Sin function, and I realize the maximum rate of change is around that point, but this is way beyond that, it's a real elbow. I did set bFloatDuringInactiveMotorPWM to false in case it was coasting but no change. Any idea why this is happening?

NXT 1.0, RobotC 3.62

What's your code look like? Were you using the built-in PID control? I believe the RobotC built-in PID control employs two different algorithms depending on what power/speed the motor is in. It's either doing a position control (on lower speed) or speed control (on higher speed). This will explain the discontinuity of the curve. There was an explanation from one of the RobotC folks in one of the forum posts. You may want to search for it.


Fri Sep 20, 2013 6:08 pm
Profile
Rookie

Joined: Fri Oct 25, 2013 7:35 am
Posts: 1
Post Re: motor speed not proportional?
I've created a program to simulate acceleration by looping through and incrementing the power. When I measured the distance covered I found that it was further than the SUVAT equations predicted. So I tested the motor power to speed at 10 point power intervals and then graphed them. The relationship is logarithmic.


Attachments:
log.gif
log.gif [ 6.32 KiB | Viewed 1741 times ]
Fri Oct 25, 2013 7:54 am
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: motor speed not proportional?
I just want to read your graph correctly but you did not label the axes nor specify the units. I assume the x axis is the motor power value and the y axis is the speed but in what unit? Also, what type of motor is this graph for? Lego motor? Tetrix motor? Please also share with us how you come up with the data (i.e. the setup such as if the graph is plotting no load speed or speed under load and what load). I have been thinking about plotting the characteristics of at least the Tetrix motors under load but did not get to it since I got too many projects to finish up.


Fri Oct 25, 2013 2:56 pm
Profile
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post Re: motor speed not proportional?
Another data point: In our tests, we found that the speed of the motor depended heavily on the load on the motor; if there was a substantial load, it would take a large amount of power to overcome the friction, but once in motion you could ramp down the power and the motor would keep turning.

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Sat Oct 26, 2013 12:18 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.