Below are graphs showing the effect of Kp Ki and Kd on an Arduino Mega Output running the PID Libraries using PWM.
I expect there will be no noticeable change using Time Proportional.
Figure 0 shows Kp=255 Ki=0 and Kd=0
Figure 8 shows what I found to be the perfect settings for 18L in a 33L Nordic Stockpot using a 2.4kwh Backer heating element.
This is intended for use as an HLT.
If used in a Herms or Rims I imagine the values will be very different.
Figure 0 and Figure 8 give the fastest ramp time and fastest to settle to steady state of 2.35%
Effect of Kp Ki and Kd on PID Output
Re: Effect of Kp Ki and Kd on PID Output
Below is a graph showing the values of Kp Ki and Kd which were found using step tuning methods
After a few minutes and once the Output and Temperature have reached steady state I started Autotune
As You can see the Output oscillates from +198 to -193 for a few cycles and then sets Kp=251.82 Ki=3.56 Kd=0
It took months of tweeking the values to get the fast ramp time low overshoot and steady state.
By measuring the rise in temperature over 10 minutes and then how much it cooled over 1 hour I could use those figures to simulate the HLT in code on the Arduino.
Made future testing a lot simpler and can not wait to test on a Mash next time I brew.
After a few minutes and once the Output and Temperature have reached steady state I started Autotune
As You can see the Output oscillates from +198 to -193 for a few cycles and then sets Kp=251.82 Ki=3.56 Kd=0
It took months of tweeking the values to get the fast ramp time low overshoot and steady state.
By measuring the rise in temperature over 10 minutes and then how much it cooled over 1 hour I could use those figures to simulate the HLT in code on the Arduino.
Made future testing a lot simpler and can not wait to test on a Mash next time I brew.
Re: Effect of Kp Ki and Kd on PID Output
The Autotune took around 12 minutes.
The 1st section using the step tuned values took around 90 seconds to heat from 60C to 63C and 270 seconds to reach steady state.
As You can see it takes quite a while longer in fact 1215 seconds for the Autotune derived values to reach a steady state value of 2.35% output.
4.5 times longer.
As We are entering a Driverless Car era, PID is going to be playing a major part in Our lives from a reaction to an event perspective.
From brake control to steering and acceleration all being controlled by these amazing formulas.
The 1st section using the step tuned values took around 90 seconds to heat from 60C to 63C and 270 seconds to reach steady state.
As You can see it takes quite a while longer in fact 1215 seconds for the Autotune derived values to reach a steady state value of 2.35% output.
4.5 times longer.
As We are entering a Driverless Car era, PID is going to be playing a major part in Our lives from a reaction to an event perspective.
From brake control to steering and acceleration all being controlled by these amazing formulas.
Re: Effect of Kp Ki and Kd on PID Output
I was a little surprised by the fact the Autotune finished in only 12 minutes.
As I am running simulations of 18L with a single 2.4kwh element in a 33L stockpot I checked the code and found a small oversight regarding the fact that the Autotune Library cycles the Output between +198% to -193%.
As I am using PWM on Arduino the maximum and minimum could only ever be 100% and 0%, or 255 and 0.
This had an unforeseen effect on the time it actually takes Autotune to complete as the routine that ramps the temperature was not accounting for this.
The graph below now shows the more realistic results.
As I am running simulations of 18L with a single 2.4kwh element in a 33L stockpot I checked the code and found a small oversight regarding the fact that the Autotune Library cycles the Output between +198% to -193%.
As I am using PWM on Arduino the maximum and minimum could only ever be 100% and 0%, or 255 and 0.
This had an unforeseen effect on the time it actually takes Autotune to complete as the routine that ramps the temperature was not accounting for this.
The graph below now shows the more realistic results.
Re: Effect of Kp Ki and Kd on PID Output
Having read that changing the Setpoint can have undesired effects on the process I tested a few increases to see what happened.
Not a lot other than ramping up to the new Setpoint so all seems well.
Not a lot other than ramping up to the new Setpoint so all seems well.
Re: Effect of Kp Ki and Kd on PID Output
The graphs below show how the Arduino PID libraries react to the following Kp Ki and Kd values:
1st run uses Kp=20 Ki=5 Kd=1 and a SP and PV of 63 degrees C.
2nd run uses Kp=1240.0 Ki=2524.5 Kd=1198.5 and a SP and PV of 63 degrees C.
Temperature curve is in the top half of the graph and Output curve is in the lower half.
1st run uses Kp=20 Ki=5 Kd=1 and a SP and PV of 63 degrees C.
2nd run uses Kp=1240.0 Ki=2524.5 Kd=1198.5 and a SP and PV of 63 degrees C.
Temperature curve is in the top half of the graph and Output curve is in the lower half.