planetguy Posted April 20, 2014 Share Posted April 20, 2014 For a school project, I made a demonstration of PID controllers. It's kind of primitive, but here it is. (Mostly-up-to-date source code here.) When you start it, it creates three windows (since I didn't know how to get everything into one window). The biggest window is the graph. The blue line is the target value, the red line is the controller's output. The green lines (if there are any) are the distance the controller can be pushed by the random noise selected. The straight red line at the bottom is the zero mark, and the red line across the middle is the controller's output. To the right is the help window. It has a list of the parameters that can be changed, and next to each one is a short description of what it does. Note that the "historyLength" parameter is ignored. To the bottom of the graph is the input window. Commands are entered in the form <parameter>=<value>, where parameter is one of the things named in the help window, and value is a (possibly decimal) number. For example, to set the proportional term to 0.9 I would type "p=0.9" and hit enter to run it. TheBytemaster 1 Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now