1. A device for controlling a material separation process, comprising: at least one processor, at least one computer-readable medium, and a state estimating unit implemented through software stored in the computer-readable medium and programmed to execute on the at least one processor, the software including instructions: to receive at least one measured process output variable in said material separation process that is indicative of the degree of separation between a desired material and an undesired material, and to estimate the state of the process at a certain instant in time by applying the measured output variable and external constraints for a prediction time interval on a model of the material separation process, said model being based on at least one input variable that can be manipulated and said output variable, and an optimising unit implemented through software stored in the computer-readable medium and programmed to execute on the at least one processor, the software including instructions: to optimize an objective function that involves at least one predicted controlled process output variable and said external constraints, where said predicted controlled process output variable is defined by said process model based on said state and this optimising takes place under either or both of constraints imposed by said process model and said external constraints through adapting said input variables, to provide at least one set point value for each input variable for said prediction time interval, for use in regulating said separation process in order to influence the separation process for separating the desired material from bulk material, to, when optimising the objective function, maximise the recovery of the desired material in the separation process or minimise the amount of additives or the amount of energy used.