View unanswered posts | View active topics It is currently Sun Jun 24, 2018 10:15 pm

 Page 1 of 1 [ 3 posts ]
 Print view Previous topic | Next topic
Lurch on Speed Change while turning using PID control
Author Message
Rookie

Joined: Sun Nov 16, 2008 3:07 pm
Posts: 45
Lurch on Speed Change while turning using PID control
We are having a problem with a Lurch or Glitch while changing the speed during a turn.

For example, we are turning a tank-style robot with a command like

motor[motorD] = 50;
motor[motorE] = -50;

Then when we get close to the target heading, we are slowing down:

motor[motorD] = 10;
motor[motorE] = -10;

At the transition between the speeds, the robot will sometimes move straight forward or maybe straight backward for an inch or 2.

This seems to not happen if PID control if Off, so I am thinking maybe it has to do with accumulated error in the PID control or something like that. But that is total guess on my part.
My gut feel is that the error accumulated on each side should be about the same and in opposite directions, so it surprises me that the result is a lurch forward, not just a bump in the rotation speed.

Anyone have any thoughts on this? Similar experiences?

And is there a way to peek at what is going on inside the PID algorithm?

For example:
What is the current error?
What is the current commanded output to the motor?
If in the Ramp Profile, what is the current target speed?
What are the gain values?

David Fort
Rockwell Automation
Team 1001
Charles F. Brush High School

[Edit update] I notice I can get this to happen just using the "NXT Device Control Display" dialog with the robot up on blocks.
If I check the Reg checkbox, then set Speed on motorD to 50, then change to 10 then 50, etc., it will sometimes reverse direction. There might be a correlation with resisting force, not sure.

Tue Dec 23, 2008 5:42 pm
Professor

Joined: Fri Sep 19, 2008 1:22 am
Posts: 200
Re: Lurch on Speed Change while turning using PID control
Do you have shaft encoders installed on your motors and plugged into the motor controller? PID control doesn't work if you do not have the shaft encoders installed.

_________________
Jeff McBride
Benson Robotics Club

Wed Dec 24, 2008 1:04 pm
Rookie

Joined: Sun Nov 16, 2008 3:07 pm
Posts: 45
Re: Lurch on Speed Change while turning using PID control
 Jeff McBride wrote:Do you have shaft encoders installed on your motors and plugged into the motor controller?

yes.

We seem to be getting good results with the PID except during these speed changes.

Wed Dec 24, 2008 2:34 pm
Display posts from previous:  Sort by
 Page 1 of 1 [ 3 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