A method for controlling a reciprocating piston pump , consisting of an electromagnet and a displacement unit loaded by a spring , wherein the electromagnet is built of a magnetic coil , a magnetic yoke and a magnetic armature , by means of an electrical controller , which has a memory-programmable processor , a switching device and a measuring device , wherein the processor - calculates the electrical resistance of the magnetic coil from the values of the electrical voltage and of the electrical current measured by the measuring device and - calculates the temporal change of the linked magnetic flux in the electromagnet from the electrical voltage, the electrical current and the electric resistance of the magnetic coil and - calculates the linked magnetic flux in the electromagnet from a previously calculated or estimated magnetic flux and the temporal change and - determines the location of the magnetic armature from the calculated linked magnetic flux in the electromagnet and the measured electrical current through the magnetic coil and - depending on the location of the magnetic armature influences the effective electrical voltage on the magnetic coil by means of the switching device , characterized in that - the current location of the magnetic armature is determined by means of an estimation process from a table determined prior to the appropriate operation of the controller by measurements and/or calculations and stored in the processor with assigned values of the electrical current, the linked magnetic flux and the location of the magnetic armature by the processor in the controller , - the estimate of the location of the magnetic armature is improved, by, in the event of different effective voltages on the magnetic coil of the voltage and/or of the voltage change, using corresponding previously determined tables with respective assigned values of the electrical current, the linked magnetic flux and the location of the magnetic armature . - calculates the electrical resistance of the magnetic coil from the values of the electrical voltage and of the electrical current measured by the measuring device and - calculates the temporal change of the linked magnetic flux in the electromagnet from the electrical voltage, the electrical current and the electric resistance of the magnetic coil and - calculates the linked magnetic flux in the electromagnet from a previously calculated or estimated magnetic flux and the temporal change and - determines the location of the magnetic armature from the calculated linked magnetic flux in the electromagnet and the measured electrical current through the magnetic coil and - depending on the location of the magnetic armature influences the effective electrical voltage on the magnetic coil by means of the switching device , - the current location of the magnetic armature is determined by means of an estimation process from a table determined prior to the appropriate operation of the controller by measurements and/or calculations and stored in the processor with assigned values of the electrical current, the linked magnetic flux and the location of the magnetic armature by the processor in the controller , - the estimate of the location of the magnetic armature is improved, by, in the event of different effective voltages on the magnetic coil of the voltage and/or of the voltage change, using corresponding previously determined tables with respective assigned values of the electrical current, the linked magnetic flux and the location of the magnetic armature . <EOS>