I have been having some good success with my first PID controller. It seems it needs just a little bit more work. Below is a picture of a sample run with my controller implemented. Currently I only have the proportional term correcting the signal and I am just graphing the integral term to see where is lies. My first question is, does the integral line seem to be "right"? It doesn't seem to be related to the other values in the way I would think. Mind you this is my first experience with closed loop controls, so I guess I probably shouldn't know what it should look like.
- Red - Commanded value (psi; this is the command prior to the correction)
- Purple - Actual Value (psi; this is the actual output with only the proportional correction)
- Yellow - Proportional correction (This value is added to the commanded value to produce the actual value)
- Orange - Integral correction (This is simply being graphed to see where it would lie)
It just seems that the drop-off in the middle of the graph of the integral term is just random. I think it might have to do with a overflow condition with an Integer I am using, but then again I'm pretty sure the value should shoot to +-INF if thats the case.
Also, where the integral term is about constant (on the left side), should it not be around zero instead of 25? Because at those points in the graph (again on the left) the commanded and actual values are almost the same, why would the integral term command more to the signal if the signal is already where is should be?
The one other thing to mind is also, I only have the proportional term correcting. I have not added the integral term into the correction. This might effect how this graph would look, though I do not want to put the correction in and have the system react badly, thus why I am graphing it first and asking questions!