TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Phenomenological Introduction to PID Controllers

92 pointsby vha3over 3 years ago

8 comments

YZFover 3 years ago
I haven&#x27;t done PID for a looong time but the best method for tuning PID loops is to look at the frequency response, somewhat along these lines: <a href="https:&#x2F;&#x2F;eng.libretexts.org&#x2F;Bookshelves&#x2F;Industrial_and_Systems_Engineering&#x2F;Book%3A_Chemical_Process_Dynamics_and_Controls_(Woolf)&#x2F;09%3A_Proportional-Integral-Derivative_(PID)_Control&#x2F;9.04%3A_PID_tuning_via_Frequency_Responses_with_Bode_Plots" rel="nofollow">https:&#x2F;&#x2F;eng.libretexts.org&#x2F;Bookshelves&#x2F;Industrial_and_System...</a><p>This is much much better than the rules of thumb of increasing the proportional gain until the system becomes unstable etc. etc. You can tell what your gain and phase margins actually are which is difficult otherwise so you can push the correct parameters to the limit while maintaining margin.<p>There are also other approaches that rely on modelling the system and calculating the parameters based on the model... That can work but tends to be iffy for real world systems in my experience...
monkmartinezover 3 years ago
The old ship steering analogy:<p>P: is steering hard because you are off course.<p>I: is steering into the wind to counteract wind drift and into the current to counteract opposing currents as you move toward course.<p>D: is reducing steering input as you close on the intended course
评论 #29887576 未加载
oceanghostover 3 years ago
Please also see &quot;PID without a PHD&quot; (I am not affiliated with these people):<p><a href="https:&#x2F;&#x2F;wescottdesign.com&#x2F;articles&#x2F;pid&#x2F;pidWithoutAPhd.pdf" rel="nofollow">https:&#x2F;&#x2F;wescottdesign.com&#x2F;articles&#x2F;pid&#x2F;pidWithoutAPhd.pdf</a>
fortysixdegreesover 3 years ago
I would be interested to hear people here smarter than me explain why PID is better than some simple explicit control logic made by a person.<p>They work well, but you have to tune it properly and don&#x27;t have much flexibility to add in prior knowledge of non linearities etc which as a human we know about and know the complexities of.<p>I&#x27;ve found similar things with Kalman filters. Everyone is always keen to go PID, Kalman etc by default, but I&#x27;ve found getting them to behave correctly in complex systems can take ages and maybe never quite get there. Throw them out and do a few really simple explicit logic control steps like you would if you as a human were controlling it and bingo everything works great, the code is understandable by even non programmers as it&#x27;s explicit and easy to deal with.<p>Don&#x27;t get me wrong, I use all of the above, but I do find that PID and Kalman etc end up in places where a few if statements end up being just as good.<p>(Seriously not trying to flamebait here... Just never seen this discussed before)
评论 #29890889 未加载
评论 #29887347 未加载
评论 #29888705 未加载
评论 #29889320 未加载
评论 #29903899 未加载
condour75over 3 years ago
In case anyone else needs it, <a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;PID_controller" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;PID_controller</a>
synthosover 3 years ago
Control systems (analog) was one of the courses I did poorly in university. And of course, my first job after school was working on (digital) control systems! It turns out digital is a lot easier than analog (to me, at least).<p>A couple things I discovered:<p>- When changing setpoints for your controller it helps to slowly ramp them to prevent disturbing the system. Calculate a (end-start)&#x2F;steps and apply the delta every loop cycle.<p>- For integral wind-up, I found it more convenient to re-calculate the integral term when hitting a control limit.
entropicgravityover 3 years ago
When you get into the Z domain don&#x27;t forget to do your long division of the polynomials.
tanseydavidover 3 years ago
Very well-worded and understandable. Thanks for this.