View unanswered posts | View active topics It is currently Sat Aug 24, 2019 3:47 pm

 Page 1 of 1 [ 4 posts ]
 Print view Previous topic | Next topic
Why does Tetrix motor spin slower under PID control?
Author Message
Rookie

Joined: Wed Jan 23, 2013 6:16 pm
Posts: 7
Why does Tetrix motor spin slower under PID control?
We are using PID control on a Tetrix motor to control position. The moves are long and trapazoidal in nature (e.g. motor ramps up, moves at a flat speed, ramps down, then sits idle).

Wetried to run the motor with and without PID and each time the motor command is 100%. It spins faster when the PID attribute is disabled. I understand slower speeds while ramping up and down, but it should be 100% during the flat portion of the move.

Does anyone understand why this happens? Is there anything we can do to speed things up?

Tue Feb 05, 2013 3:08 pm
Rookie

Joined: Tue Nov 20, 2012 8:09 pm
Posts: 36
Re: Why does Tetrix motor spin slower under PID control?
I'm wondering this as well, anybody know the answer?

Tue Mar 19, 2013 4:39 pm

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Re: Why does Tetrix motor spin slower under PID control?
When you use PID, the power is regulated based on the speed of the motor. When you switch PID off, the power is simply a percentage of a duty cycle. With PID you like to have a little wiggle room at the top, so you can maintain the speed, even under load. When you use PID and you're really giving it 100% duty cycle, where do you go when that's not fast enough to achieve the pre-determined number of RPM? 105% duty cycle? That's unpossible! Unless you're bad at math, but then you probably shouldn't be in the FTC.

I know with the NXT, when you're using PID, each % motor speed has a pre-determined amount of RPMs assigned to it. It is based on a average maximum of a large sample of motors, taking into account the deviation in those samples. If you assigned 50% to two motors, you don't want one of them to run at 80 RPM and the other at 72 RPM.

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]

Wed Mar 20, 2013 1:39 am

Joined: Thu May 24, 2012 12:15 pm
Posts: 722
Re: Why does Tetrix motor spin slower under PID control?
Xander beat me to it but he is absolutely correct. Also, normal usage of the TETRIX motors (without PID control) 'cap out' the motor speed quicker; it's hard to explain without writing a full paragraph on it, but in a nutshell the PID control will 'linearize' the power level to actual speed ratio. Thus, at most power level setting the PID control seems to be running slower, when in fact it's running at a speed that relates more directly to the given power level.

For more information on this, take a look at the links below. You can also test this yourself by using the code below both with and without PID control enabled, then copy and paste the Debug Stream results into an Excel spreadsheet and graph the results (which I have also done, screenshot below).

TETRIX Drive Motor Dynamic Test Results A: http://xa.yimg.com/kq/groups/19264378/1 ... 5B1%5D.pdf
TETRIX Drive Motor Dynamic Test Results B: https://c10645061.ssl.cf2.rackcdn.com/r ... rspecs.pdf
HiTechnic Motor Controller Specifications: http://www.legoeducation.us/etc/support ... efv1.3.pdf

 Code:#pragma DebuggerWindows("debugStream")task main(){      clearDebugStream();   for(int x =0; x<100; x++)   {      nMotorEncoder[motorD]=0;      motor[motorD] = x;      wait1Msec(100);      writeDebugStreamLine("%d,%d", x, nMotorEncoder[motorD]);      wait1Msec(50);   }}

Results (note that the values are encoder counts/100 ms):

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our updated help documentation and the ROBOTC Forums.

Wed Mar 20, 2013 9:25 am
Display posts from previous:  Sort by
 Page 1 of 1 [ 4 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