Current generator device comprising a processing unit comprising: - an input module designed to acquire input data representing a desired current wave; - a management and control module connected to the input module and designed for: a) receiving the input data representing the desired current wave; b) generating a primary voltage wave; - an output module connected to the management and control module and designed to receive the primary voltage wave and to process it so as to generate an output current wave, said management and control module being further designed for: c) receiving the output current wave from the output module; d) comparing said output current wave with the desired current wave and, if the output current wave does not have, instant by instant, a value lying within a predetermined range of the corresponding value of the desired current wave, modifying the primary voltage wave so as to obtain a new output current wave substantially equal to the desired current wave, characterised in that said management and control module is designed for: e) calculating the transfer function between the output current wave and the primary voltage wave; f) applying the transfer function so as to obtain a new primary voltage wave; g) repeating steps c) - f) until the primary voltage wave which is obtained corresponds to an output current wave having, instant by instant, a value lying within a predetermined range of the corresponding value of the desired current wave; h) applying proportional-integral control to the primary voltage wave obtained at step g) so as to obtain a final output current wave; i) controlling the stability of the final output current wave; l) comparing the final output current wave with the desired current wave and checking whether they are coincident. - an input module designed to acquire input data representing a desired current wave; - a management and control module connected to the input module and designed for: a) receiving the input data representing the desired current wave; b) generating a primary voltage wave; a) receiving the input data representing the desired current wave; b) generating a primary voltage wave; - an output module connected to the management and control module and designed to receive the primary voltage wave and to process it so as to generate an output current wave, said management and control module being further designed for: c) receiving the output current wave from the output module; d) comparing said output current wave with the desired current wave and, if the output current wave does not have, instant by instant, a value lying within a predetermined range of the corresponding value of the desired current wave, modifying the primary voltage wave so as to obtain a new output current wave substantially equal to the desired current wave, characterised in that said management and control module is designed for: e) calculating the transfer function between the output current wave and the primary voltage wave; f) applying the transfer function so as to obtain a new primary voltage wave; g) repeating steps c) - f) until the primary voltage wave which is obtained corresponds to an output current wave having, instant by instant, a value lying within a predetermined range of the corresponding value of the desired current wave; h) applying proportional-integral control to the primary voltage wave obtained at step g) so as to obtain a final output current wave; i) controlling the stability of the final output current wave; l) comparing the final output current wave with the desired current wave and checking whether they are coincident. c) receiving the output current wave from the output module; d) comparing said output current wave with the desired current wave and, if the output current wave does not have, instant by instant, a value lying within a predetermined range of the corresponding value of the desired current wave, modifying the primary voltage wave so as to obtain a new output current wave substantially equal to the desired current wave, e) calculating the transfer function between the output current wave and the primary voltage wave; f) applying the transfer function so as to obtain a new primary voltage wave; g) repeating steps c) - f) until the primary voltage wave which is obtained corresponds to an output current wave having, instant by instant, a value lying within a predetermined range of the corresponding value of the desired current wave; h) applying proportional-integral control to the primary voltage wave obtained at step g) so as to obtain a final output current wave; i) controlling the stability of the final output current wave; l) comparing the final output current wave with the desired current wave and checking whether they are coincident.