PID

Learning and science

control theory demo

SHOW HN2015

73points
38comments
#362of 2,565 in 2015
Top 15%of 2015 by points

How HN took it

CuriousMostly questions and neutral comments

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

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 HN
    • Looking 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 HN
    • One 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 HN
    • Proportional-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 HN
    • Yes. 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

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/9476603)