A method of automatically calculating controller parameters in a system comprising a controller operatively connected to a sensor and an actuator, whereby the sensor output depends on an actuator input, the method comprising the steps of: performing an automatic sensor calibration procedure to determine the controller's window of operation, namely its maximum and minimum sensor levels by: performing a series of first actuator ramps and recording the sensor responses; determining the maximum and minimum sensor values recoded during the first actuator ramping; recording an actuator value corresponding to the minimum sensor value; recording an actuator value corresponding to the maximum sensor value; determining a window of operation of the controller being the range of actuator values falling between the actuator value corresponding to the minimum sensor value and the actuator value corresponding to the maximum sensor value; automatically performing a series of actuator actions and, based on the sensor response: performing a system identification procedure for determining information on the dynamics of the system to be controlled, namely the dynamic response characteristics of the system by: selecting an actuator value falling within the window of operation of the controller; performing a second actuator ramping about the selected actuator value; analysing the sensor response by recording the gradient of the sensor response (dy/dt) at an actuator value (Δu) offset from the selected actuator value (uO); and determining a relationship that is characteristic of a dynamic system parameter where B = f(dy/dt, Δu); and automatically calculating the controller parameters for a specified dynamic response based on the calibration and system identification procedures. performing an automatic sensor calibration procedure to determine the controller's window of operation, namely its maximum and minimum sensor levels by: performing a series of first actuator ramps and recording the sensor responses; determining the maximum and minimum sensor values recoded during the first actuator ramping; recording an actuator value corresponding to the minimum sensor value; recording an actuator value corresponding to the maximum sensor value; determining a window of operation of the controller being the range of actuator values falling between the actuator value corresponding to the minimum sensor value and the actuator value corresponding to the maximum sensor value; performing a series of first actuator ramps and recording the sensor responses; determining the maximum and minimum sensor values recoded during the first actuator ramping; recording an actuator value corresponding to the minimum sensor value; recording an actuator value corresponding to the maximum sensor value; determining a window of operation of the controller being the range of actuator values falling between the actuator value corresponding to the minimum sensor value and the actuator value corresponding to the maximum sensor value; automatically performing a series of actuator actions and, based on the sensor response: performing a system identification procedure for determining information on the dynamics of the system to be controlled, namely the dynamic response characteristics of the system by: selecting an actuator value falling within the window of operation of the controller; performing a second actuator ramping about the selected actuator value; analysing the sensor response by recording the gradient of the sensor response (dy/dt) at an actuator value (Δu) offset from the selected actuator value (uO); and determining a relationship that is characteristic of a dynamic system parameter where B = f(dy/dt, Δu); and automatically calculating the controller parameters for a specified dynamic response based on the calibration and system identification procedures. performing a system identification procedure for determining information on the dynamics of the system to be controlled, namely the dynamic response characteristics of the system by: selecting an actuator value falling within the window of operation of the controller; performing a second actuator ramping about the selected actuator value; analysing the sensor response by recording the gradient of the sensor response (dy/dt) at an actuator value (Δu) offset from the selected actuator value (uO); and determining a relationship that is characteristic of a dynamic system parameter where B = f(dy/dt, Δu); and selecting an actuator value falling within the window of operation of the controller; performing a second actuator ramping about the selected actuator value; analysing the sensor response by recording the gradient of the sensor response (dy/dt) at an actuator value (Δu) offset from the selected actuator value (uO); and determining a relationship that is characteristic of a dynamic system parameter where B = f(dy/dt, Δu); and automatically calculating the controller parameters for a specified dynamic response based on the calibration and system identification procedures.