Go to Post Are you saying you want to submerge your circuit board in an open container of liquid nitrogen? - Ether [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 29-12-2014, 02:54
GuyM142's Avatar
GuyM142 GuyM142 is offline
Registered User
AKA: Guy
FRC #3339 (BumbleBee)
Team Role: Mentor
 
Join Date: Jul 2013
Rookie Year: 2012
Location: Israel
Posts: 158
GuyM142 is just really niceGuyM142 is just really niceGuyM142 is just really niceGuyM142 is just really niceGuyM142 is just really nice
Arrow Question about the I term in the PID

Using I with the PID causes the error to sum and then change the output,
when does this sum resets?
Is a new set point enough to reset it?

I want to know this in order to use the same PID loop to set the system to several set points sequentially.
Reply With Quote
  #2   Spotlight this post!  
Unread 29-12-2014, 06:14
Michael Hill's Avatar
Michael Hill Michael Hill is offline
Registered User
FRC #3138 (Innovators Robotics)
Team Role: Mentor
 
Join Date: Jul 2004
Rookie Year: 2003
Location: Dayton, OH
Posts: 1,576
Michael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond repute
Re: Question about the I term in the PID

According to conventional control theory, you shouldn't have to because, in general, you move, say, an arm up (which causes a positive integral term), then you'll move it down (offsetting back to 0). However, when dealing with real systems, a phenomenon known as integral windup occurs (http://en.wikipedia.org/wiki/Integral_windup). It's most noticeable when your motors go into saturation and just accumulate integral error. Theoretical motors don't have any saturation point, but real motors...well, you can feed in more gain, but once they're in saturation, they're not going any faster. In the wiki link, they outline a few ways to prevent the phenomenon. It's generally system dependent, so try them out and see what works best for your system.
Reply With Quote
  #3   Spotlight this post!  
Unread 29-12-2014, 11:03
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Question about the I term in the PID

By the way, I'm not the author of the code for the PID, and because it is written using lots of scalars, and contains many features, I also find it hard to read. But here is what it looks like to me.

On the initial call and when the reset input is true, the integral accumulation is zeroed.

If the I term is zero, the accumulation is forced to zero.

If the P, I, or D terms are changed, the accumulator isn't zeroed, but it is adjusted based on the error term, the P coefficient and the derivative term. I believe this is the bumpless feature that allows you to tune the coefficients without causing the controller to oscillate as badly.

Finally, when the controller is saturated, when the output value is at the max or min value that you indicated were acceptable, the integral accumulation is adjusted by the proportional term to avoid windup.

The best way to observe the effect of these features is to open one of the plant examples that show the PID in use. You can force the situations above and that will give you something to debug or play with. You can also read about it here

http://www.ni.com/white-paper/3782/en/

Greg McKaskle
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 20:09.

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