Go to Post ...because "someone on ChiefDelphi said so," doesn't fly when your robot can't pass inspection. - Madison [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 26 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 11-02-2015, 11:31
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,715
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: PID control help

Quote:
Originally Posted by Ether View Post
Please don't take this the wrong way, but I need to know before answering: did you see the attachment?


Yes.
Reply With Quote
  #2   Spotlight this post!  
Unread 11-02-2015, 11:58
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: PID control help


Motor1 is controlled by a PID whose setpoint is the driver's position command and whose process variable is position feedback from encoder1. The output of this PID is limited to 90% to allow for motor tolerances as suggested by Steve in post#9.

Motor2 is controlled by a closed-loop controller whose output is the sum of two terms:
1) the output from an Integral controller whose setpoint is encoder1 position and whose process variable is encoder2 position, and

2) the output from a Proportional controller whose setpoint is the driver's position command and whose process variable is encoder2 position

Reply With Quote
  #3   Spotlight this post!  
Unread 11-02-2015, 12:26
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,715
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: PID control help

Quote:
Originally Posted by Ether View Post

Motor1 is controlled by a PID whose setpoint is the driver's position command and whose process variable is position feedback from encoder1. The output of this PID is limited to 90% to allow for motor tolerances as suggested by Steve in post#9.

Motor2 is controlled by a closed-loop controller whose output is the sum of two terms:
1) the output from an Integral controller whose setpoint is encoder1 position and whose process variable is encoder2 position, and

2) the output from a Proportional controller whose setpoint is the driver's position command and whose process variable is encoder2 position

Would this be better or more efficient than having your motor1, and a motor2 that just uses a positional PID controller and the setpoint is always the position of motor1?
Reply With Quote
  #4   Spotlight this post!  
Unread 11-02-2015, 13:02
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: PID control help

Quote:
Originally Posted by notmattlythgoe View Post
Would this be better or more efficient than having your motor1, and a motor2 that just uses a positional PID controller and the setpoint is always the position of motor1?
...and the process variable for Motor2 is encoder2 position, like this?

The problem I see with that is the transient response to large step changes in driver position command. Motor1 responds immediately to the large change, but Motor2's controller must wait for the error to form between encoder1 & encoder2. Granted, you could crank the P gain way up for Motor2, but it's not immediately clear how well that would work in practice.



Attached Thumbnails
Click image for larger version

Name:	2PID.png
Views:	27
Size:	15.6 KB
ID:	18282  
Reply With Quote
  #5   Spotlight this post!  
Unread 11-02-2015, 13:07
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,715
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: PID control help

Quote:
Originally Posted by Ether View Post
...and the process variable for Motor2 is encoder2 position, like this?

The problem I see with that is the transient response to large step changes in driver position command. Motor1 responds immediately to the large change, but Motor2's controller must wait for the error to form between encoder1 & encoder2. Granted, you could crank the P gain way up for Motor2, but it's not immediately clear how well that would work in practice.



Yes like that.

Yeah, that could definitely cause some problems. Depending on the system you might be able to tune it to react correctly, but it could difficult. The more you limit the speed of motor1 the better the system would react I'd imagine.

The more I think about it, the more I like your original proposal. I wish I had a system I could try it out on.

Last edited by notmattlythgoe : 11-02-2015 at 13:09.
Reply With Quote
  #6   Spotlight this post!  
Unread 11-02-2015, 13:06
gpetilli gpetilli is offline
Registered User
FRC #1559
 
Join Date: Jan 2009
Location: Victor, NY
Posts: 285
gpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to all
Re: PID control help

Quote:
Originally Posted by notmattlythgoe View Post
Would this be better or more efficient than having your motor1, and a motor2 that just uses a positional PID controller and the setpoint is always the position of motor1?
Yes. If motor2 is only a slave to motor1, then motor2 will not move until a sufficient error in position has occurred (due to a change in command to motor1).

What Ether suggested is basically to send the same command to both motors simultaneously, and use the Integrated error between the positions to fine tune motor2. The Integrated error has high DC gain but slow "step response".

The settled response for both systems should be similar, but the match while changing position should be much better with Ether's system.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:15.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi