View unanswered posts | View active topics It is currently Mon Apr 23, 2018 12:04 am

 Page 1 of 1 [ 6 posts ]
 Print view Previous topic | Next topic
motor speed not proportional?
Author Message
Rookie

Joined: Wed Sep 18, 2013 9:48 pm
Posts: 1
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
Professor

Joined: Sat May 18, 2013 1:24 pm
Posts: 271
Location: Olympia, WA
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).

Wed Sep 18, 2013 11:12 pm
Guru

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1523
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
Rookie

Joined: Fri Oct 25, 2013 7:35 am
Posts: 1
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 [ 6.32 KiB | Viewed 5279 times ]
Fri Oct 25, 2013 7:54 am
Guru

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1523
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
Professor

Joined: Sat May 18, 2013 1:24 pm
Posts: 271
Location: Olympia, WA
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).

Sat Oct 26, 2013 12:18 am
Display posts from previous:  Sort by
 Page 1 of 1 [ 6 posts ]

#### Who is online

Users browsing this forum: No registered users and 2 guests

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

Search for:
 Jump to:  Select a forum ------------------ ROBOTC Applications    ROBOTC for LEGO MINDSTORMS       Third-party sensors    ROBOTC for CORTEX & PIC    ROBOTC for VEX IQ    ROBOTC for Arduino    Robot Virtual Worlds    Multi-Robot Communications    Issues and Bugs Competitions & Partners    Mini Urban Challenge    CS2N Robot Virtual Worlds Competitions       VEX Skyrise Competition 2014-2015       VEX Toss Up 2013-2014       FTC Block Party! 2013-2014    Competitions using VEX - BEST, TSA, VEX, and RoboFest!    FTC Programming    RoboCup Junior and Other ROBOT Competitions Virtual Brick Robotics Discussions    General Discussions    Project Discussions Off-Topic ROBOTC Forum & ROBOTC.net Suggestions/Feedback    ROBOTC Forums Suggestions/Comments    ROBOTC.net Suggestions/Comments       NXT Programming: Tips for Beginning with ROBOTC       VEX Programming: Tips for Beginning with ROBOTC    2013 Robotics Summer Of Learning       VEX Toss Up Programming Challenge       FTC Ring It Up! Programming Challenge    International Forums       Spanish Forums          ROBOTC for MINDSTORMS          ROBOTC for VEX       French Forums          ROBOTC pour Mindstorms          ROBOTC pour IFI VEX       Japanese Forums （日本語のフォーラム）       German Forums    2015 Spring Carnival Event    PLTW (Project Lead The Way)    Robotics Merit Badge    2014 Robotics Academy Summer of Learning