derivative is also based on 1 second and can be divided // Derivative term using angle changeĭerivative = (input - lastInput) / (double)(timeChange *. the temperature starts rising and derivative shuts off the heat early trying to keep you from overshooting setpoint. when the door is closed the same thing happens in reverse. but once the change has settled down ( door left open ) derivative disappears from the equation. example derivative happens when a door is opened to a cold winter night and cold air is let in the sensor sees the air and derivative sees the quick change in temperature and turns on the heat a bit more than the proportional would do by its self. if you were driving a car and heading for a cliff derivative term would kick in and make a drastic temporary adjustment. derivative uses the rate of change to temporary add or subtract from the output to alter course. most of us don’t even need derivative until we are fine tuning and using derivative during initial tuning may cause difficulties.
![kd max tune kd max tune](https://www.kicksonfire.com/wp-content/uploads/2017/11/Nike-Air-Max-Plus-97-2.jpg)
000001) ĭerivative is most complex but it isn’t hard to understand. Integral += error * (double) (timeChange *. The integral is based on 1 second of time but you can devide that time change up into fractions of a second to make the changes more detailed at that time. If the output produces too little heat to achieve room temperature setpoint after the proportional term settles your integral term will be added to every cycle to provide more and more heat to reach setpoint. Integral uses time and adds a portion of the error to the ITerm and should be used to help land setpoint. Proportional is a floating point number so you can use fractions for detailed tuning. If proportional is 1 and the input changes by 10 our output changes by 10.
![kd max tune kd max tune](https://static.nike.com/a/images/w_1536,c_limit,f_auto/jwiyiaqws7dpwamha7nk/kdx-still-kd-stay-tuned.jpg)
if you make a change in the input you get an immediate change in the output Proportional is simple it is just a differential using error.