A hydraulic system is provided for a working machine that includes a hydraulic cylinder for raising and lowering an implement. The hydraulic system includes a sensor for measuring a pressure in the hydraulic cylinder; and a control unit for controlling the movement of the hydraulic cylinder; wherein the control unit is configured to compare a pressure value measured by the sensor with a preset target pressure level range and to control the pressure in the hydraulic cylinder to be within the preset target pressure level range by adding or draining hydraulic fluid to/from a pressure side of the hydraulic cylinder for maintaining a substantially constant ground contact force between the implement and the ground.