A method for automatically determining optimum welding parameters (P i,opt ) for carrying out a weld on a workpiece , wherein - a plurality of test welds are carried out on test workpieces along test welding tracks , and at each test weld at least one welding parameter (P i (x)) is changed automatically along the test welding track from a predefined initial value (P i,A ) to a predefined final value (P i,E ), depending on the location (x), - each resulting test weld seam is measured along the test welding track with at least one sensor , and at least one sensor signal (S j (P i (x))) is received, depending on the location (x) along the test weld seam , - at least one quality parameter (Q k (S j (P i (x)))) which characterizes each weld seam is calculated from at least one sensor signal (S j (P i (x))), - a quality functional (G(Q k (S j (P j (x))))) for characterizing the quality of the test weld seams in accordance with the changed welding parameters (P i (x)) is calculated from the at least one quality parameter (Q k (S j (P i (x)))), - an optimum of the quality functional (G opt (Q k (S j (P i (x)))) is ascertained, and from this determined optimum of the quality functional (G opt (Q k (S j (P i (x)))) the respective optima of the quality parameters (Q k , opt (S j (P i (x))) are determined, and from the optima of the quality parameters (Q k,opt (S j (P i (x))) from the sensor signals (S j (P i (x))) those locations (x) are identified as optimum locations (x opt ) along the test weld seam at which the welding result of the test weld is optimum according to the respective quality parameter (Q k (S j (P i (x))), and the welding parameters (P i (x)) at these locations (x opt ) of the test weld seams , identified as optimum, are defined as values for the optimum welding parameters (P i,opt ) for carrying out the welding on the workpiece , and saved. - a plurality of test welds are carried out on test workpieces along test welding tracks , and at each test weld at least one welding parameter (P i (x)) is changed automatically along the test welding track from a predefined initial value (P i,A ) to a predefined final value (P i,E ), depending on the location (x), - each resulting test weld seam is measured along the test welding track with at least one sensor , and at least one sensor signal (S j (P i (x))) is received, depending on the location (x) along the test weld seam , - at least one quality parameter (Q k (S j (P i (x)))) which characterizes each weld seam is calculated from at least one sensor signal (S j (P i (x))), - a quality functional (G(Q k (S j (P j (x))))) for characterizing the quality of the test weld seams in accordance with the changed welding parameters (P i (x)) is calculated from the at least one quality parameter (Q k (S j (P i (x)))), - an optimum of the quality functional (G opt (Q k (S j (P i (x)))) is ascertained, and from this determined optimum of the quality functional (G opt (Q k (S j (P i (x)))) the respective optima of the quality parameters (Q k , opt (S j (P i (x))) are determined, and from the optima of the quality parameters (Q k,opt (S j (P i (x))) from the sensor signals (S j (P i (x))) those locations (x) are identified as optimum locations (x opt ) along the test weld seam at which the welding result of the test weld is optimum according to the respective quality parameter (Q k (S j (P i (x))), and the welding parameters (P i (x)) at these locations (x opt ) of the test weld seams , identified as optimum, are defined as values for the optimum welding parameters (P i,opt ) for carrying out the welding on the workpiece , and saved. <EOS>