A pressure regulator comprising: a housing having an input port and an output port, with a flow channel extending between the input port and the output port, the inlet port having an inlet pressure and the output port having an outlet pressure; a valve member situated in the flow channel, the valve member separating an upstream side of the flow channel from a downstream side of the flow channel; a valve actuator operatively coupled to the valve member for controlling a position of the valve member and thus a flow rate of fluid through the flow channel; a pressure sensing chamber and a reference chamber, with a diaphragm fluidly separating the pressure sensing chamber from the reference chamber, the pressure sensing chamber is in fluid communication with the downstream side of the flow channel; a bias mechanism for applying a bias force to the diaphragm, wherein a pressure differential between the pressure sensing chamber and the reference chamber provides a counter force to the bias force, and wherein a current position of the diaphragm is dependent on a differential between the bias force and the counter force; a position sensor for sensing the current position of the diaphragm, wherein the position sensor comprises a Linear Variable Differential Transformer (LVDT) operatively coupled to the diaphragm, therein the LVDT includes a coil; and a controller operatively coupled to the valve actuator and the position sensor, wherein the controller is configured to control the valve actuator and thus the position of the valve member based at least in part on the current position of the diaphragm such that the current position of the diaphragm is driven toward a control position that results in a constant or substantially constant pressure at the output port of the housing over a predefined range of input pressures; the pressure regulator being characterised in that: the controller is further configured to determine a resistance of the coil of the LVDT, determine a temperature of the coil based at least in part on the determined resistance of the coil, and perform a temperature compensation so that the pressure at the output port of the housing remains constant or substantially constant over a predefined temperature range. a housing having an input port and an output port, with a flow channel extending between the input port and the output port, the inlet port having an inlet pressure and the output port having an outlet pressure; a valve member situated in the flow channel, the valve member separating an upstream side of the flow channel from a downstream side of the flow channel; a valve actuator operatively coupled to the valve member for controlling a position of the valve member and thus a flow rate of fluid through the flow channel; a pressure sensing chamber and a reference chamber, with a diaphragm fluidly separating the pressure sensing chamber from the reference chamber, the pressure sensing chamber is in fluid communication with the downstream side of the flow channel; a bias mechanism for applying a bias force to the diaphragm, wherein a pressure differential between the pressure sensing chamber and the reference chamber provides a counter force to the bias force, and wherein a current position of the diaphragm is dependent on a differential between the bias force and the counter force; a position sensor for sensing the current position of the diaphragm, wherein the position sensor comprises a Linear Variable Differential Transformer (LVDT) operatively coupled to the diaphragm, therein the LVDT includes a coil; and a controller operatively coupled to the valve actuator and the position sensor, wherein the controller is configured to control the valve actuator and thus the position of the valve member based at least in part on the current position of the diaphragm such that the current position of the diaphragm is driven toward a control position that results in a constant or substantially constant pressure at the output port of the housing over a predefined range of input pressures; the pressure regulator being characterised in that: the controller is further configured to determine a resistance of the coil of the LVDT, determine a temperature of the coil based at least in part on the determined resistance of the coil, and perform a temperature compensation so that the pressure at the output port of the housing remains constant or substantially constant over a predefined temperature range.