PID
Learning and science
control theory demo
SHOW HN2015
How HN took it
1 positive, 16 neutral or asking, 0 mixed, 1 critical, out of 18 comments about the project. Thread score 0.00.
Design: 1 for, 0 againstDocs: 0 for, 1 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Nice, clear demo of PID behaviour
From 2 comments
Very nice simulation!
adiko on HNNice demo. Thanks. FYI http://nikital.github.io/ is 404.
fnordfnordfnord on HN
Objections
The PID values were not exposed in text boxes at first
From 1 comment
It's a shame that the PID values aren't exposed directly in text boxes but you can affect how the ball behaves (react faster/slower or cause under or overshoot) by adjusting the…
sjtrny on HN
Integral term is useless without gravity or friction
From 2 comments
Would be pretty nice to have some external force (like gravity), otherwise the i value is pretty much useless. Also, some friction would be nice.
xnzakg on HNLooking at the source this is actually a PD controller, which makes sense for a simple simulation like this.
mrpsrinkles on HN
Implementation is a PD controller rather than full PID
From 1 comment
Looking at the source this is actually a PD controller, which makes sense for a simple simulation like this.
mrpsrinkles on HN
Requests
Add gravity or friction to the simulation
From 2 comments
Would be pretty nice to have some external force (like gravity), otherwise the i value is pretty much useless. Also, some friction would be nice.
xnzakg on HNOne way to make the integral term useful would be to add some static friction to the simulation, that would be interesting.
antoinealb on HN
Show PID parameters through time in a graph
From 1 comment
The article links the Wikipedia page: https://en.wikipedia.org/wiki/PID_controller If the goal is to teach about PID controllers, then the demo could use a graph showing the…
watmough on HN
Display closed loop poles and zeros
From 1 comment
This would be a really cool illustration if you could solve the closed loop transfer function, and display the locations of the closed loop zeros and poles.
bobmoretti on HN
Questions
What is a PID controller and how does it work?
From 2 comments
Can anyone explain what is this?
rounak on HNProportional-integral-derivative (PID) controller is a feedback loop algorithm for control. You give some desired goal (in this case is to reach a position) and it moves to that…
sjtrny on HN
Is there a configuration that gives optimal control?
From 2 comments
I'm curious, is there any configuration of the PID parameters that would achieve optimal control for this simple physical system? I suppose the optimum looks like 100% thrust and…
ambrop7 on HNYes. Reformulate the systems transfer function into a state space representation, and then solve the algebraic ricatti equation to find an optimal gain matrix. This is know and…
agoetz on HN
Alternatives named
Python PID loop implementation in ownercredit repository
From 1 comment
For a complete Python PID loop implementation and (console) demo: ``` git clone https://github.com/pjkundert/ownercredit.git PYTHONPATH=$PWD python ./ownercredit/pid.py ```
pjkundert on HN