An espresso coffee machine comprising a dispensing group configured to dispense a shot of espresso coffee, the dispensing group being configured to removably engage a portafilter, the machine comprising:
- a pump configured to provide pressurized water to the dispending group;
- a pressure sensor positioned at the dispensing group and configured to measure values of a dispensing pressure at the dispensing group;
- a weighing device configured to measure values of a mass of liquid at an outlet of the dispensing group;
- and
- a control unit configured to receive the values of the dispensing pressure and the values of the mass of liquid,
- wherein the control unit is configured to control, using the values of the dispensing pressure and the values of the mass of liquid, the dispensing pressure according to a profile of dispensing pressure as a function of the mass of liquid, wherein the control unit operates by feedback to adjust flowrate of the pressurized water supplied to the dispensing group by regulating the flowrate of the pump.