tempcontroller

As one increases the proportional gain, the system becomes faster, but care must be taken not make the system unstable. Once P has been set to obtain a desired fast response, The integral term is increased to stop the oscillations. The integral term reduces the steady state error, but increases overshoot. Some amount of overshoot is always necessary for a fast system so that it could respond to changes immediately. The integral term is tweaked to achieve a minimal steady state error. Once the P and I have been set to get the desired fast control system with minimal steady state error, the derivative term is increased until the loop is acceptably quick to its set point. Increasing derivative term decreases overshoot and yields higher gain with stability but would cause the system to be highly sensitive to noise.

Members

init static

Initialise PID parameters.

Methods

getTemp() → number static

Get current temp of the controller.

setTemp(desiredTemp, mins) static

Define temp then update until reached.
Arguments:
  1. desiredTemp (number)  Desired temp.
  2. mins (number)  Hold duration.

calculatePower(actualTemperature) → Number inner

Calculate the power required to reach desired temperature
Arguments:
  1. actualTemperature (*)