Method for determining the stroke of an armature in a magnetic actuator and method for training a machine learning model

DE102023209909A1Pending Publication Date: 2025-04-10ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
DE102023209909
Authority / Receiving Office
DE · DE
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-10-10
Publication Date
2025-04-10

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present invention relates to a method for determining the stroke of an armature in a magnetic actuator, comprising the steps of: providing a magnetic characteristic curve (200) of the magnetic actuator, wherein the magnetic characteristic curve has been acquired, in particular measured, during an energizing process of the magnetic actuator, wherein the magnetic characteristic curve characterizes a chained magnetic flux over a current during the energizing process of the magnetic actuator, wherein the energizing process at least comprises bringing the armature from a second end position to a first end position by reducing the current, in particular to zero;Determine, based on a selected part (220) of the magnetic characteristic curve where the armature is in the second end position, using a machine learning model, a hypothetical extension (222) of the magnetic characteristic curve that characterizes a hypothetical current-energizing process in which the armature remains in the second end position by reducing the current, in particular to zero; determine (532) the stroke of the armature based on a difference (230), in particular an area, between the hypothetical extension of the magnetic characteristic curve and the magnetic characteristic curve; and provide the determined stroke of the armature.
Need to check novelty before this filing date? Find Prior Art

Description

The present invention relates to a method for determining a stroke of an armature in a magnetic actuator, to a method for training a machine learning model for this purpose, and to a computing unit and to a computer program for carrying out the same.BACKGROUND OF THE INVENTIONMagnetic actuators with an armature can be used in many fields of application, for example in solenoid valves, in particular magnetic switching valves. In this case, it is frequently necessary to set the armature stroke of the magnetic actuator during production to a certain value within a certain tolerance. This in turn makes it necessary to determine the actuator stroke of the magnetic actuator.Disclosure of the InventionAccording to the invention, a method for determining a stroke of an armature in a magnetic actuator, a method for training a machine learning model for this purpose, and a computing unit and a computer program for carrying them out are proposed with the features of the independent patent claims. Advantageous embodiments are the subject matter of the dependent claims and of the following description.The invention relates to magnetic actuators having an armature and there in particular to the determination of a stroke of the armature (armature stroke or actuator stroke). As mentioned, magnetic actuators with an armature can be used in many fields of application, for example in solenoid valves, in particular magnetic switching valves.In order to determine or measure the stroke of the armature of the magnetic actuator, a particularly elegant possibility is a magnetic measurement technique in which the armature stroke is determined from the linked magnetic flux. Here, the armature stroke can be determined on the basis of a magnetic characteristic curve which characterizes or maps a profile of the linked magnetic flux ψ as a function of a current flowing through the magnetic actuator.If a magnetic actuator is controlled, a current is applied to a coil of the magnetic actuator, i.e. energized. The linked mag changes. Flux ψ. First, the anchor is in a first end position, in particular an unfastened or dropped end position. Starting with a stream of zero, the concatenated magincreases. Flux ψ at and following a first course. Starting from a certain current, the armature is lifted, i.e. moved to a second end position, in particular a attracted end position. By changing from the first to the second end position, the air gap in the magnetic actuator and thus also the magnetic inductance change. The concatenated mag. Flux ψ increases more strongly here and changes in another, second course (that with the armature raised) and then follows this.In the opposite direction, the current can be reduced again and the concatenated mag. Flux ψ initially runs again according to the second profile as long as the armature is in the second end position. Then the anchor changes to the first end position, which may be linked. Flux ψ falls off more strongly here and then changes into the first course and follows it, in particular up to current zero.The first and second curves mentioned with the two changes can be understood as the magnetic characteristic curve. When the current increases, energy is stored in the magnetic material and in the air gap; when the current is reduced, this energy is removed again. The armature moves from one end position into the other end position when it represents the more favourable state in terms of energy. The magnetic characteristic curve has in particular a hysteresis. This magnetic characteristic curve can be measured, for example, by suitable measurement means.The linked magnetic flux ψ (coil flux) is therefore detected as a function of a current I through a coil of the magnetic actuator, wherein the current I changes over time t.Methods for determining the coil flux ψ over the coil current I are known. For example, the coil flux can be determined by measuring current and voltage by means of a single-coil measurement using a suitable bridge circuit. In this case, no additional measuring winding surrounding the magnetic circuit of the magnetic actuator is required, but the voltage U at the coil of the magnetic actuator minus a product of the coil resistance R and the current I flowing through it can be integrated over time:Alternatively or additionally, such a measuring winding can be attached to the magnetic actuator and the voltage U induced therein can be measured directly in ind fashion.If the current I flowing through the coil of the magnet armature is increased, the magnetic force also increases due to the increasing coil flux ψ and the armature is moved out of its rest position. During the movement of the armature from the first into the second end position, the magnetic resistance R m and thus the inductance L and the coil flux ψ change according to the changing length of the air gap. In the magnetic characteristic curve, a transition from a curve of the coil flux ψ with a maximum air gap (first curve) to a curve of the coil flux ψ with a closed air gap (second curve) can therefore be seen.However, the characteristic curve measured in this way does not comprise a specific range, namely a hypothetical part or a hypothetical extension, if the armature were fixed in the second end position, and therefore would not change to the first end position when reducing the current, but rather the linked one may. Flux ψ would follow the second course to the end.However, a difference, in particular a surface area, between this hypothetical extension of the magnetic characteristic curve and the (measured) magnetic characteristic curve is now a measure for the air gap and thus also for the stroke of the armature. On the basis of this difference or this surface area, the stroke of the armature can thus be determined, e.g. via corresponding tables or the like, or generally on the basis of the specific structure of the magnetic actuator and its magnetic properties.This hypothetical extension of the magnetic characteristic curve can now be calculated, for example. However, this is very complicated.Against this background, in the context of the present invention, that of a machine learning model, for example of an (artificial) neural network, is proposed, with the result that this hypothetical extension of the magnetic characteristic curve can be determined (i.e. estimated, for example) on the basis of a selected part of the magnetic characteristic curve.In this case, the complete magnetic characteristic curve as described above is not necessary, but it is sufficient if the magnetic characteristic curve characterizes a linked magnetic flux over a current during an energization process of the magnetic actuator, wherein the energization process at least comprises the armature having been brought from the second end position into the first end position by reducing the current, in particular down to zero. A part in which the armature is moved from the first into the second end position can indeed also be detected, especially as the armature is typically located in the first end position at the beginning of a measurement, but this is not absolutely necessary for determining the stroke.Thus, the magnetic characteristic curve provides the selected part which follows the second course and from which the hypothetical extension can be determined, as well as a part which follows the first course, as well as also comprises the change from the second to the first course. This then allows the difference, in particular the surface area, between the hypothetical extension of the magnetic characteristic curve and the magnetic characteristic curve to be determined, and thus the stroke, which can then be provided, for example, for further use.Training data can be used to train such a machine learning model, which training data comprise such hypothetical extensions that have been determined, for example, in earlier determinations of the anchor stroke, and are therefore present anyway. Thus, no new training data needs to be generated, although this is of course possible. This also eliminates the need for training magnetic actuators.In one embodiment, determining the hypothetical extension of the magnetic characteristic comprises iteratively applying a determination process. This determination process comprises, in each case, i.e. per execution, providing a plurality of points of an existing part of the magnetic characteristic curve as an input for the machine learning model, and determining at least one point of the hypothetical extension of the magnetic characteristic curve, by means of the machine learning model, as an output of the machine learning model. In this case, the plurality of points comprise one or more points of the selected part of the magnetic characteristic curve (the selected part has in particular been obtained by measurement) and / or one or more points determined in a previous determination process. Preferably, in a first determination process, the plurality of points correspond to the plurality of points of the selected part of the magnetic characteristic curve; in each further determination process, the plurality of points then in particular each comprise at least the point determined in the preceding determination process. Thus, for example, starting from points of an existing measurement, first a point of the hypothetical extension may be estimated as the output of the machine learning model, then this estimated point may be used as the input for the machine learning model in the next iteration, and so on. This can also result in the machine learning model receiving only already estimated points, but no more measured points as input.In one specific embodiment, the magnetic characteristic curve of the magnetic actuator is provided in normalized form. Thus, for example, the maximum current for which the magnetic characteristic curve is present can be normalized to 1, the maximum linked current may. Flux ψ for which the magnetic characteristic curve is present can likewise be normalized to 1. This normalization must then be taken into account in determining the stroke of the armature. The magnetic characteristic curve of the magnetic actuator can likewise be provided in a manner changed by an absolute or relative difference amount, which must then likewise be taken into account in determining the stroke of the armature. Here, for example, the minimum value of the concatenated may be used. Flux ψ present for the magnetic characteristic curve can be set to zero current (by an absolute difference amount in current). It is also possible, for example, to use an angle bisector (between the zero point and the maximum linked bisector. Flux ψ) may be subtracted (as a relative difference amount). This facilitates, for example, the application of the machine learning model, or the accuracy thereof is increased.The mentioned normalization is helpful for the AI method, as described, but also serves, for example, to allow the neural network to be used in different products. These products have different values of ψ and I, therefore normalization is convenient.If the current I flowing through the coil of the magnet armature is increased, the magnetic force also increases due to the increasing coil flux ψ and the armature is moved out of its rest position. During the movement of the armature from a first into a second end position, the magnetic resistance R m and thus the inductance L and the coil flux ψ change according to the changing length of the air gap. In the magnetic characteristic curve, a transition from a course of the coil flux ψ with a maximum air gap to a course of the coil flux ψ with a closed air gap can therefore be seen.An embodiment of the invention relates to training a machine learning model, in particular an (artificial) neural network, for use in determining a stroke of an armature in a magnetic actuator, e.g. as explained above. Training data is provided that comprises a plurality of data sets.Each data record comprises in each case a selected part of a magnetic characteristic curve of the magnetic actuator, wherein the magnetic characteristic curve has been detected, in particular measured, during an energization process of the magnetic actuator, wherein the magnetic characteristic curve characterizes a linked magnetic flux over a current during an energization process of the magnetic actuator which has been carried out. The energization process comprises at least that the armature has been brought from a second end position into a first end position by reducing the current, in particular to zero, wherein the armature is in the second end position in the selected part of the magnetic characteristic curve.In addition, each data record comprises an extension of the magnetic characteristic curve, wherein the extension of the magnetic characteristic curve characterizes a hypothetical energization process in which the armature remains in the second end position by reducing the current, in particular down to zero.The machine learning model, in particular weights of the machine learning model, are then adjusted based on the training data such that the extension of the magnetic characteristic is determined based on the selected portion of the magnetic characteristic. The machine learning model trained in this manner is then provided for use.Preferably, the adjusting of the machine learning model comprises an iterative application of a determination process, wherein the determination process comprises in each case providing a plurality of points of an existing part of the magnetic characteristic curve as an input for the machine learning model. The machine learning model or its weights are then adapted in such a way that at least one point of the expansion of the magnetic characteristic curve is determined by means of the machine learning model as output. The plurality of points here comprise one or more points of the selected part of the magnetic characteristic curve and / or one or more points determined in a previous determination process.Here, as in the application already described, in a first determination process, the plurality of points may correspond to the plurality of points of the selected part of the magnetic characteristic curve, and in each further determination process, the plurality of points may each include at least the point determined in the previous determination process.Here, as in the case of the application already described, a normalization and an absolute and / or relative difference amount can also be taken into account.Training is thus preferably also carried out using the iterative method, wherein already available, e.g. measurement data for the selected part of the magnetic characteristic curve and e.g. available data determined by means of a possibly complex or other algorithm can be used for expanding the magnetic characteristic curve. In other words, training data can thus be used which comprise such extensions which have been determined, for example, with the mentioned complex algorithm in earlier determinations of the armature stroke, and are therefore present anyway. Thus, no new training data needs to be generated, although this is of course possible.In addition, the neural network or the machine learning model is intended to learn, in particular, to generalize the form of hysteresis curves. Therefore, it can also be trained with data in which only the magnetic core (without moving parts) is measured. The cores can be measured in fixed clampings, and an air gap then also exists, similar to the second end position. There are generally always a great number of data of this too, for example also at the beginning of an injector development.A computing unit according to the invention, e.g. a control unit of a motor vehicle, which can preferably be the engine control, or else a computer, is set up, in particular by programming, to carry out a method according to the invention, as described above.The implementation of a method according to the invention in the form of a computer program or computer program product with program code for carrying out all method steps is also advantageous since this causes particularly low costs, in particular if an executing control device is also used for further tasks and is therefore present in any case. Finally, a machine-readable storage medium is provided with a computer program stored thereon, as described above. Suitable storage media or data carriers for providing the computer program are, in particular, magnetic, optical and electrical memories, such as hard disks, flash memories, EEPROMs, DVDs, among others. Download of a program via computer networks (Internet, intranet, etc.) is also possible. Such a download can be effected in a wired or wired or wireless manner (e.g. via a WLAN network, a 3G, 4G, 5G or 6G connection, etc.).Further advantages and embodiments of the invention will become apparent from the description of the accompanying drawings.The invention is schematically illustrated in the drawings on the basis of exemplary embodiments and is described below with reference to the drawings. Identical elements are provided with identical reference symbols and are therefore not described a number of times, if this is not necessary.Brief Description of the DrawingsFIGS. 1 aand 1 b show schematically a magnetic actuator in which a method according to the invention can be used. FIGS. 2, 3 and 4 show schematic diagrams for explaining the invention. FIG. 5 schematically shows a sequence of a method according to the invention in one embodiment. FIG. 6 schematically shows a sequence of a method according to the invention in a further embodiment.Embodiment(s) of the InventionFIGS. 1 aand 1 bschematically show a solenoid valve 20 with a solenoid actuator 10 in various views. In the case of the magnetic actuator 10 or the solenoid valve 20, a method according to the invention can be used.The magnetic actuator 10 has an armature 1, to which valve needle 2 of the solenoid valve 20 is fastened, the valve needle 2 in turn being connected to a valve plate 5 of the solenoid valve 20. The valve plate 5 is seated on the valve pot 3 of the solenoid valve 20 when the armature is in the rest position, as shown in FIG. 1 a. In this position, the armature stroke h is A= 0 and the air gap δ has a maximum length δ=δ max. The magnetic actuator 10 also has an armature counterpart 4, a coil 6 and a spring 7. If the coil 6 of the magnetic actuator 10 is energized, a magnetic circuit builds up through the armature 1, air gap δ and armature counterpart 4 and a magnetic force acts against the force of the spring 7, which moves the armature 1 in the direction of the armature counterpart 4.In FIG. 1 b, the armature 1 is fully tightened and bears against the armature counterpart 4. In this position, the armature 1 has reached its maximum stroke h A= h max and the air gap δ is closed (δ=0). As a result, the valve needle 2 is likewise moved in the direction of the armature counterpart 4 and the valve disk 5 is pressed against the valve seat. The solenoid valve 20 is then closed when the armature 1 is attracted (FIG. 1 b ) and is open in the rest position of the armature 1 (FIG. 1 a ).FIG. 2 is a schematic diagram for explaining the invention. A magnetic characteristic curve 200 of one of the magnetic actuators is shown here, which can be determined by determining a coil flux or linked magnetic flux ψ over a time-variant current I through the coil 6 of the magnetic actuator 10. In the exemplary embodiment shown, the magnetic characteristic curve 200 has the form of a hysteresis curveFirst, the anchor is in a first end position, in particular the non-attracted or dropped end position. In this case, the current I is to be increased starting from zero. The magnetic characteristic curve follows section 210 (first curve) up to a value I 2 of current I, which may be linked. Flux ψ increases. At the value I 2 the anchor is lifted, i.e. moved to a second end position, in particular the attracted end position. The magnetic characteristic curve follows section 214. The portion 212 shown in dashed lines would correspond to the course if the anchor were fixed in the first position. In the second position, the armature then follows the section 220 (second course).Now the current I is to be reduced again, in particular down to zero. The magnetic characteristic curve follows section 220 (second curve) up to a value I 1 of current I, which may be linked. Flux ψ decreases. At the value I 1 the armature falls, i.e. it is moved to the first end position. The magnetic characteristic curve follows section 224. The portion 222 shown in dashed lines would correspond to the course if the anchor were fixed in the second position. In the first position, the anchor then follows the section 210 (first course).The magnetic characteristic curve thus measured does not include the mentioned region or section 222. The section 222 is thus a hypothetical part or a hypothetical extension if the armature were fixed in the second end position, and therefore would not change to the first end position when reducing the current, but rather the concatenated one. Flux ψ would follow the second course to the end.A difference, in particular a surface area, between this hypothetical extension 222 of the magnetic characteristic curve and the (measured) magnetic characteristic curve, in this case in particular a part of the section 210 and the section 224 (i.e. a part of the magnetic characteristic curve which is obtained when reducing the current from just before the change from the second into the first end position and then to the end) is, as mentioned, a measure for the air gap and therefore also for the stroke of the armature. This difference or the surface area is designated here as 230.On the basis of this difference or this surface area, the stroke of the armature can thus be determined, e.g. via corresponding tables or the like, or generally on the basis of the specific structure of the magnetic actuator and its magnetic properties.For the proposed determination of the stroke, at least the region of the magnetic characteristic curve 200 is required here, where the energization process at least comprises the armature having been brought from the second end position into the first end position by reducing the current, in particular down to zero, i.e. here e.g. the sections 220, 224 and a part of 210, namely from where (towards zero) the section 224 meets the section 210. Nevertheless, the entire magnetic characteristic curve 200 is detected.As mentioned, the magnetic characteristic curve can also be normalized. Thus, for example, the maximum current I max, which occurs when the characteristic curve is detected, can be normalized to 1, and the maximum linked flux ψ max, which occurs when the characteristic curve is detected, can likewise be normalized to 1. An intersection point of the characteristic curve with the right-hand value axis can be set to zero. For this purpose, the value-related value I c can be added or subtracted as required (absolute difference amount), in particular before the normalization.In FIG. 3, a part of a magnetic characteristic curve after normalization is shown and denoted by 300. The magnetic characteristic curve 300 comprises a course in which the armature would be fixed in the second end position, i.e. the hypothetical extension is included. In addition, 301 shows an angle bisector which extends from the origin to the point with maximum current I max and maximum linked flux ψ max here therefore at 1.1. As mentioned above, the model accuracy can thus be increased.FIG. 4 shows part of a magnetic characteristic curve after normalization and is denoted by 400 and corresponds basically to the curve 300 according to FIG. 3. Here, the portion 420 corresponding to the portion 220 of FIG. 2 and the portion 422 corresponding to the portion 222 of FIG. 2 are now shown.The portion 420 may be measured. For this purpose, it is possible to measure, for example, at certain intervals for values of the current I (here distances of 0.1; normalized without unit da). By way of example, these are points P 1 to P 4. The section 422 is a hypothetical extension that can be determined using a machine learning model, also, for example, point by point. By way of example, the points P 5, P 6 are not measured points, but rather points determined using a machine learning model, which represent the hypothetical extension of the magnetic characteristic curve.FIG. 5 schematically illustrates a sequence of a method according to the invention in one embodiment, specifically for determining a stroke of an armature in a magnetic actuator as is illustrated, for example, in FIGS. 1 a, 1 b. In this case, reference is also made in particular to FIGS. 2 to 4 or the diagrams shown there.In a step 500, magnetic characteristic curve of the magnetic actuator is provided. The magnetic characteristic curve is recorded, in particular measured, during an energization process of the magnetic actuator and characterizes a linked magnetic flux over a current during the energization process of the magnetic actuator. It can be, for example, the magnetic characteristic curve 200 with the sections 210, 214, 220, 224 according to FIG. 2. In this case, the energization process comprises at least that the armature has been brought from the second end position into the first end position by reducing the current, in particular to zero, i.e. the entire magnetic characteristic curve according to FIG. 2 is not necessary, as already explained. For example, only portion 420 of FIG. 4 may be provided.The magnetic characteristic curve can also be normalized and it can have been changed by an absolute and / or relative difference amount, as shown, for example, in FIGS. 2 and 3.Then, step 510, based on a selected portion of the magnetic characteristic where the armature is in the second end position, using a machine learning model, a hypothetical extension of the magnetic characteristic is determined that characterizes a hypothetical energization process where the armature remains in the second end position by reducing the current, particularly to zero. The selected part can comprise, for example, a part of the section 420, in particular the measured points P 1 to P 4 shown there; it should be mentioned at this point that the detection of a magnetic characteristic curve can typically comprise the measurement of specific points with subsequent interpolation.The hypothetical extension to be determined in this case may correspond to section 422 according to FIG. 4, which may in turn be defined via points P 5, P 6. It is understood that in practice more points are possible, in particular also with smaller distances from one another.Specifically, a determination process 520 may be iteratively applied, for example. The determination process 520 includes, respectively, providing, step 552, a plurality of points of an existing portion of the magnetic characteristic as an input to the machine learning model. In the first application or iteration (first determination process), these may be the points P 1 to P 4 (or even more than four points or less). At step 524, at least one point of hypothetical extension of the magnetic characteristic is determined, e.g., point P5. This is done using the machine learning model 526. Here, the points P 1 to P 4 serve as an input of the machine learning model, the point P 5 is an output. The measured points are preferably chosen such that the course lies as close as possible to the point at which the armature would fall off. As a result, the curve to be reconstructed becomes as small as possible, ideally only the hypothetical extension. The first point, here P5, which is no longer measurable is predicted. At this point, it should be noted that a point indicates a value of the linked magnetic flux for a value of a current.In a next determination process, the points P 2 to P 5 may then be selected as an input for the machine learning model, the output of the machine learning model is then P 6. Fewer of the measured points are thus taken here, but a previously determined point is used as an input.Thus, to predict the second point (P6), for example, the first predicted point (P5) is used to replace one of the measured points (here P1). Accordingly, three measured values and one point estimated by the model are used to estimate the next point in the course.With each further iteration, a further point of the hypothetical extension of the magnetic characteristic curve can thus be determined. This can be done until the entire hypothetical extension, i.e. the entire curve, is predicted.Then, step 530, the difference or area between the hypothetical extension of the magnetic characteristic curve and the magnetic characteristic curve can be determined, as shown in FIG. 2. Based thereon, then, step 532, the lift 534 of the armature may be determined and then provided, step 540.In favor of the accuracy of the model, the current axis of the measurement can be changed, as already mentioned, in such a way that the characteristic curve exactly intersects the I axis at I=0. For this purpose, the current value I c at which the characteristic curve intersects the I axis is determined. The new corrected current results from: I-I c. For calculating the actual hysteresis curve, I c must therefore be known. Here, another model can be used to estimate Ic, or simply the average of all measurements of a product can be used.FIG. 6 schematically illustrates a sequence of a method according to the invention in a further embodiment, namely for training a machine learning model for use for determining a stroke of an armature in a magnetic actuator.In this case, in step 600, training data 602 are provided which comprise a multiplicity of data sets. Each data set comprises a selected part of a magnetic characteristic curve of the magnetic actuator, as well as an extension of the magnetic characteristic curve. The magnetic characteristic curve corresponds, for example, to the characteristic curve explained above for the application or the determination of the stroke. The extension of the magnetic characteristic curve corresponds to the hypothetical extension explained above for the application or the determination of the stroke, for example, but in this case it is not estimated by the machine learning model but rather obtained in another manner, for example by another algorithm.In this case, the selected part and the extension of the characteristic curve can be present, for example, in the form of a continuous profile, as shown, for example, in FIG. 4. The normalization or the difference amount can be applied to each data set.In step 610, the machine learning model, in particular the weights of the machine learning model, is then adjusted based on the training data, namely in such a way that the extension of the magnetic characteristic curve is determined based on the selected part of the magnetic characteristic curve. In step 620, the adjusted machine learning model is provided. It can then be used as explained with reference to FIG. 5.Adapting the machine learning model or weights functions similarly to the application, also with iterative procedure. As inputs, for example, the points P1 to P4 according to FIG. 4 are used first. The machine learning model is then adapted such that it outputs the point P5-which in this case is actually part of the training data-or at least as well as possible as an output. Here, for example, an optimization can be carried out in which weights are adjusted until, for each of the plurality of data sets or on average, a difference between output and point P 5 present is minimal. Thereafter, this may be done for points P2 to P5 as input with point P6 as output, and so on.For adjusting the machine learning model or the weights, however, it is also possible, for example, to generate all input-output combinations in a dataset for the training. Then, the weights can be optimized thereto.

Claims

Method for determining a stroke of an armature (1) in a magnetic actuator (10), comprising the steps of: providing (500) a magnetic characteristic curve of the magnetic actuator (200, 300, 304, 420), wherein the magnetic characteristic curve has been detected, in particular measured, during an energization process of the magnetic actuator, wherein the magnetic characteristic curve characterizes a linked magnetic flux over a current during the energization process of the magnetic actuator, wherein the energization process at least comprises the armature having been brought from a second end position (h max) into a first end position (h 0) by reducing the current, in particular to zero; determining (510), based on a selected portion (200, P1, P2, P3, P4) of the magnetic characteristic curve, in which the armature is in the second end position, using a machine learning model, a hypothetical extension (222, 422) of the magnetic characteristic curve, which characterizes a hypothetical energization process in which the armature remains in the second end position by reducing the current, in particular to zero; determining (532) the stroke (534) of the armature based on a difference (230), in particular an area, between the hypothetical extension of the magnetic characteristic curve and the magnetic characteristic curve; and providing (540) the determined stroke of the armature.The method of claim 1, wherein determining (510) the hypothetical extension of the magnetic characteristic comprises an iterative application of a determination process, wherein the determination process (520) each comprises: providing (522) a plurality of points (P1, P2, P3, P4) of an existing portion of the magnetic characteristic as an input to the machine learning model (526); and determining (524) at least one point (P5, P6) of the hypothetical extension of the magnetic characteristic, by the machine learning model (524), as an output of the machine learning model, wherein the plurality of points comprise one or more points of the selected portion of the magnetic characteristic and / or one or more points determined in a previous determination process.The method according to claim 2, wherein in a first determination process, the plurality of points correspond to a plurality of points of the selected part of the magnetic characteristic.The method according to claim 3, wherein in each further determination process, the plurality of points each include at least the point determined in the previous determination process.Method according to one of the preceding claims, wherein the magnetic characteristic curve of the magnetic actuator is provided normalized and / or changed by an absolute and / or relative difference amount, and wherein the normalization of the magnetic characteristic curve and / or the absolute and / or relative difference amount is taken into account in determining the stroke of the armature.Method according to one of the preceding claims, wherein the magnetic actuator is used in a solenoid valve (20).Method for training a machine learning model for use for determining a stroke of an armature in a magnetic actuator, comprising: providing (600) training data (602) comprising a plurality of data sets, each data set respectively comprising: - a selected part of a magnetic characteristic curve of the magnetic actuator, wherein the magnetic characteristic curve has been detected, in particular measured, during an energization process of the magnetic actuator, wherein the magnetic characteristic curve characterizes a linked magnetic flux over a current during an energization process of the magnetic actuator carried out, wherein the energization process at least comprises the armature having been brought from a second end position to a first end position by reducing the current, in particular up to zero, wherein the armature is in the second end position at the selected part of the magnetic characteristic curve, - an extension of the magnetic characteristic curve, wherein the expansion of the magnetic characteristic curve characterizes a hypothetical energization process in which the armature remains in the second end position by reducing the current, in particular up to zero; adjusting (610) the machine learning model, in particular weights of the machine learning model, based on the training data, such that the expansion of the magnetic characteristic curve is determined based on the selected part of the magnetic characteristic curve; and providing (620) the adjusted machine learning model.The method of claim 7, wherein adjusting (610) the machine learning model comprises iteratively applying a determination process, the determination process each comprising: providing a plurality of points of an existing portion of the magnetic characteristic as an input to the machine learning model; and adjusting the machine learning model such that at least one point of the extension of the magnetic characteristic is determined as an output using the machine learning model, wherein the plurality of points comprise one or more points of the selected portion of the magnetic characteristic and / or one or more points determined in a previous determination process.Method according to claim 7 or 8, wherein the expansion of the magnetic characteristic curve has been determined by means of a calculation algorithm at least for a part of the plurality of data sets.A computing unit comprising a processor configured to perform the method of any preceding claim.A computer program comprising instructions which, when the program is executed by a computer, cause the computer to carry out the method of claims 1 to 9.Computer-readable data medium on which the computer program according to Claim 11 is stored.