Automatic control of a freeze-drying process: Detection of the end point of primary drying