1 Introduction and motivation

The hairpin technology is an industrial process chain for the cost-efficient manufacturing of stators with high-quality distributed rectangular wire winding. Stators with hairpin winding are applied in both hybrid and all-electric vehicles as the main component of efficient and powerful electric traction motors. From a product-specific perspective, the hairpin technology as a so-called bar winding technique enables technological advantages in terms of the ratio of copper in the slots of the stator lamination stack – a functional property that is linked to the mechanical and electrical fill factor in product development. Based on this, a high efficiency and power density can be achieved in operation [1], as both parameters are related to the copper losses and the thermal behavior of the electric motor [2].

In contrast to conventional round wire winding technologies such as the insertion technique [3], which are well-established in stator production for industrial electric motors, the hairpin technology is mainly based on a sequence of decoupled forming, assembly and joining processes as shown in Fig. 1. Afterwards, the functional stator is isolated and impregnated in a procedural process to meet the requirements resulting from the desired operation lifetime. [4] Therefore, the production capacity required for high-volume applications can be achieved by parallelizing individual automated process steps linked with conveyor or gantry systems. Based on the use of state-of-the-art manufacturing equipment and production concepts, cost advantages are to be expected above a production volume of 150.000 units per year compared to round wire winding technologies [5].

Fig. 1
figure 1

Process chain for the manufacturing of stators by hairpin technology based on forming, assembly and joining processes of enameled rectangular copper wire, slot insulations and the stator lamination stack

Due to its high level of automation and productivity, the hairpin technology is prevalent in automotive industry and can be considered as the state-of-the-art manufacturing technology for stators of powerful and efficient electric traction motors. But in addition to productivity, both robustness and flexibility are demanded from a cost-efficient automotive manufacturing technology to ensure low reject rates and to cope with uncertainties in market demand and technological developments. Thus, the overall maturity level of automotive production systems based on the hairpin technology is still insufficient. While flexibility is limited by the use of tool-bound manufacturing techniques with predominant mechanical process parameters, process reliability is significantly influenced by the quality of the wrought material which depends on suppliers and batches as well. Hence, variations in both the mechanical and geometric properties of the enameled rectangular copper wire cause differing springback effects within the forming operations along the process chain. However, as concluded by Allwood et al., closed-loop control concepts have a high potential for improving product properties in metal forming [6]. Therefore, closed-loop control architectures for adaptive process parametrization need to be developed for increased robustness within the process chain for the manufacturing of stators by hairpin technology.

As the first manufacturing process with a direct effect on the spatial contour of the stator with hairpin winding, the bending of the hairpin coils has an influence on all downstream processes. While electrical defects of the hairpin coils result in reject costs but do not compromise the operation of the production system, geometric defects such as alignment and pitch errors of the hairpin legs, orientation errors of the hairpin endings and shape errors of the hairpin head are able to cause severe malfunctions [7]. In addition, geometric defects may also result in defect-related costs as there are no known strategies for economic rework after the hairpin coils are inserted into the stator lamination stack. Geometric defects regarding the position and orientation of the hairpin endings are significantly affected by uncompensated springback effects. However, the geometric quality characteristics of the hairpin head (coil pitch and coil shape) mainly result from the tooling used for bending as well as the basic machine and process parameters.

2 State of the art

Regarding the bending process of hairpin coils, three different forming techniques with industrial relevance can be classified according to the characteristic sequence of bending operations: tool-bound bending, sequential tool-bound bending and kinematic bending. Tool-bound bending processes usually consist of two consecutive operations: a planar three-point bending, swing bending, classical pipe bending or rotary draw bending process that is followed by spatial die bending. In contrast, sequential tool-bound and kinematic processes are based on discrete or continuous changes of the bending position and the bending plane in between consecutive rotary draw bending, tube bending or free bending operations. As shown in the simplified example given by Fig. 2, in case of tool-bound bending, a planar hairpin coil is manufactured by classical pipe bending in three bending operations. Subsequently, the semifinished component is formed into the final 3-D shape by die bending in an additional bending stage. In case of sequential tool-bound bending, a sequence of rotary draw bending operations is carried out to form the hairpin coil in a single bending stage. Between the consecutive bending operations \(\text {A}_{10}\) and \(\text {B}_{20}\), the bending plane and the tooling are changed from configuration A to B for manufacturing a 3-D shape.

Fig. 2
figure 2

Tool-bound and sequential tool-bound processes for hairpin coils with spatial contour

2.1 Classification of hairpin coil geometries

In order to identify the most relevant types of hairpin coils as boundary condition for the subsequent development of the closed-loop control system, a literature review was conducted considering both academic and patent publications. In parallel, a classification scheme based on the sequence of design elements, corresponding types of elementary bending operations and process parameters was developed to structure the results of the literature review. In addition to the number of straight wire sections, the bending planes, approximate ranges of bending radii and bending angles as well as two special forming operations – a reverse bending and a twist of the enameled rectangular wire along its main axis – were considered as the most relevant characteristics of hairpin coil geometries.

Fig. 3
figure 3

Classification scheme for the geometry-based description of hairpin coils

Using the classification scheme given by Fig. 3, five basic types of hairpin coil geometries were identified by clustering the review results as shown in Fig. 4: the flat shape, the S-like shape, the P-like shape, the helix shape and the U-like shape.

2.1.1 F-shape

Regarding the flat shape of hairpin coils, three sub-types with related sequences of characteristic bending operations need to be differentiated: the simple F-shape as shown in Fig. 4, the complex F-shape with an additional torsion within the hairpin head as well as the complex F-shape with multiple bendings in the hairpin head. In general, hairpin coils with flat shape are characterized by a repetitive sequence of independent design elements in the height and width direction of the rectangular winding wire within the hairpin shoulders and hairpin head, which limits the flexibility in winding head design – especially in case of the simple F-shape. However, the F-shape offers advantages in manufacturing due to the applicability of highly productive tool-based bending processes as die bending.

2.1.2 S-shape

The S-shape with a S-like contour of the hairpin head from a top view has been described by Pushev et al. in 2016 [8]. In addition to the previous definition, two sub-types need to be distinguished: the S-shape of type C with a circumferential orientation of the main bending direction and the S-shape of type R with a radial orientation. In general, the manufacturing of S-shaped hairpin coils is characterized by two independent bending operations in height and width direction of the rectangular winding wire within the hairpin shoulders and a reverse bending against the main bending direction within the hairpin head. Hairpin coils with S-shape enable short winding heads in stators with a regular design and a low number of conductors per slot, and can be manufactured by highly productive multi-stage bending processes consisting of planar U-bending and spatial end-controlled bending operations.

2.1.3 P-shape

Likewise, the P-shape has also been introduced by Pushev et al. in 2016 [8]. In general, hairpin coils with P-like shape are characterized by two superimposed design elements within the hairpin shoulder: a bending in height direction of the rectangular winding wire and a torsion along its main axis. Moreover, the hairpin head is characterized by a reverse bending, which is superimposed by additional bending operations in both the height and width direction of the rectangular winding wire. Due to the superimposed design elements, hairpin coils with flexible P-shape are appropriate for achieving short winding heads. However, the manufacturing is more complex compared to the similar S-shape as additional bending operations are required.

2.1.4 H-shape

The helix shape is characterized by a helical twist of the rectangular winding wire within the winding head in order to switch the inner and outer sides of the hairpin legs inside the active length of the stator. Enabled by this geometric feature, the influence of the proximity effect on the frequency-dependent copper losses of the electric traction motor can be theoretically reduced as shown by Yang et al. for segmented hairpin coils [9]. In addition, the characteristic sequence of design elements is similar to the F-shape with disadvantages in terms of installation space due to the helical twist. However, since state-of-the-art bending machines for hairpin coils have not been developed for extensive twisting operations, manufacturing limits need to be considered in product design.

2.1.5 U-shape

In contrast to the four basic types of hairpin coil geometries defined in the previous sections, hairpin coils with U-shape are characterized by a sequence of independent bending operations in single bending planes. Therefore, design elements resulting from superimposed bending operations at the same position along the arc length – as known from the comparable F-shape with multiple bendings in the winding head – are not typical. Since no superimposed bending operations are required to manufacture the characteristic hairpin contour, the mechanical stress on the insulation coating is low. However, the independence of the sequential design elements results in an increased installation space of hairpin coils with U-shape. Hence, the U-shape is often used for special hairpin coils with complex geometry which are needed to realize enhanced stator designs. From a manufacturing point of view, the basic geometry of hairpin coils with U-shape is similar to well-known tubular structures such as brake pipes. Therefore, established bending machines with a simple functional structure can be adopted to meet the specific requirements of hairpin coil manufacturing – but the high number of independent bending operations causes long cycle times.

Fig. 4
figure 4

Overview of the five basic types of hairpin coil geometries with industrial relevance based on the results of the conducted literature review

2.2 Manufacturing of hairpin coils for stators with hairpin winding

Due to the high relevance of the hairpin technology for the automotive industry, there has been intensive research on the manufacturing of hairpin coils in recent past, which is discussed in the following. Pushev et al. developed a multi-stage tool-bound manufacturing process for bending three different types of hairpin coils by means of numerical and experimental analyses [8]. Moreover, Weigelt et al. demonstrated the potentials of an explicit finite element model to deduce process limits and quality characteristics of hairpin coils using the examples of three-point and die bending [10]. In addition, Kühl et al. developed a robotic manufacturing process for hairpin coils based on three consecutive bending operations: First, a planar hairpin geometry was formed by sequential swing bending operations using a dual arm robot. Second, the spatial hairpin head was formed by tool-bound die bending; and third, the hairpin legs were manufactured by torsional bending. [11] Furthermore, Barbieri et al. implemented an implicit finite element model of a kinematic bending process in order to analyze torsional instabilities of rectangular wires with different cross-sections [12]. Additionally, the authors have shown in previous research work that variations in the geometric (width, height and radius) and material (Young’s modulus and flow curve) properties of enameled rectangular wire cause significant deviations of the spatial hairpin contour after bending [13]. For this purpose, uniaxial tensile tests as well as finite element models based on consecutive explicit forming and implicit springback simulations were used for sensitivity analyses. To enable the use of accurate finite element models with high calculation effort for model-based closed-loop process control, a methodology for data-efficient metamodeling of numerical process simulations was additionally introduced by the authors [14]. In the same field of research, Mayr et al. analyzed the potential of data-driven quality monitoring for bending processes in hairpin stator production using experimental data and machine learning techniques [15]. Furthermore, Choi et al. analyzed the springback behavior of enameled rectangular copper wire by means of experimental and implicit finite element analyses considering both the copper conductor and the insulation coating. In addition, a data-based process model for springback compensation was implemented for a multi-stage die bending process [16]. The artificial neural network (ANN) used for metamodeling and numerical process optimization consists of eight layers and 128 nodes per hidden layer; the activation function was set to ReLU and Adam was chosen as optimizer for training using the mean squared error as loss function. As input parameters, the tolerances of the wire width and height, the yield strength and a specific process parameter corresponding to the die punch were defined. The eight output parameters were set to characteristic geometry features of the hairpin coil (three length and five angle measures). For training, 160,000 data sets were used – generated by data augmentation from 162 simulation runs.

A summarizing overview on state-of-the-art research work regarding the development, modeling and control of manufacturing processes in the context of hairpin coils is given by Table 1.

Table 1 Summary of state-of-the-art research work regarding the manufacturing of hairpin coils

2.3 Closed-loop process control in tube and profile bending

Enabled by the establishment of numerical control systems in forming and advances in metrology, several concepts for closed-loop control of profile bending processes have been described in past, mainly focusing on the forming of profiles with small curvatures or hollow cross-sections – such as tubes. After first closed-loop control concepts have already been introduced by Hardt et al. in the 1980s, Luo and Stelson developed a direct offline closed-loop control for multi-axis bending [19, 20]. The control architecture referred to a simplified process model based on the analytical bending and twisting theory of elastic-perfectly-plastic beams as well as classical control theory. Based on previous research on the direct closed-loop control of a three-roll profile bending process, a semi-analytical and a data-based concept were proposed by Chatti et al. [21]. For rotary draw bending of 3-D tubes, Lou and Stelson compared a closed-loop control concept with a manual optimization process [22, 23]. The control architecture based on online measurements of bending angles after load to compensate subsequent bending parameters in advance. For batches with unknown springback effects, iterative loading and unloading was proposed. In addition, Staupendahl et al. proposed a direct and an indirect closed-loop control concept for TSS-bending of 3-D profiles [24]. Moreover, Ma et al. developed and experimentally validated a data-based springback compensation model for tube bending [25]. Therefore, 46 experimental data sets obtained by the variation of material properties, bending geometries and process parameters were used to train an ANN with three layers as process model for a particle swarm optimization algorithm. Also focusing on the rotary draw bending process of 3-D tubes, Simonetto et al. integrated an inertial measurement unit into the bending mandrel [26]. The orientation of the mandrel inside the tube was calculated from the measured rotational speed and the springback was predicted during the process by analyzing the strain distribution within the bending zone. In addition, Ha et al. developed a low-cost laser system to be integrated into the bending mandrel of a rotary draw bending machine for 3-D tubes in order to enable on-machine springback measurements [27]. The accuracy of the measurement approach, which based on the translation of the laser spot on a datum board, was quantified to 0.06 deg to 0.12 deg in experimental test series [28]. Likewise using an optical approach, He et al. integrated a laser displacement sensor into the bending die of a rotary draw bending machine for 3-D tubes for on-machine measurements of springback based on the geometric correlation of bending radius and bending angle [29]. By means of experimental test series, the average accuracy was quantified to 0.15 deg.

An overview on state-of-the-art closed-loop process control concepts in tube and profile bending is given by Table 2.

Table 2 Summary of state-of-the-art research work regarding closed-loop process control in tube and profile bending

Regarding the geometric analysis of 3-D profiles with circular cross-section, Bauer and Polthier described an algorithm based on the moving least squares method to compute the centerline for the reconstruction of parametric design models from laser scans [31]. Moreover, Katona et al. gave a methodological overview of different concepts for the integration of optical 3-D measurement techniques into direct closed-loop process control architectures using planar tube bending as an example [32]. Furthermore, Liu et al. proposed a reconstruction algorithm for profiles with arbitrary cross-section based on multi-vision [33]. In addition, Zhao et al. developed and experimentally validated an optical offline measurement method for 3-D tubes based on a multi-camera system and a perspective projection model of the tube endpoints [34].

3 Methodology

As shown in the previous section, ANNs are well suited for modeling nonlinear correlations between input and output variables. Therefore, predictions provided by ANN-based metamodels of accurate but time-consuming finite element simulations can be used as an alternative to simplified analytical or specific empirical approaches for optimizing process parameters in manufacturing. In addition, closed-loop control concepts with high accuracy, speed of convergence and robustness can be implemented. While the accuracy of indirect closed-loop control architectures is limited by the process model used to correlate the measured process variables with the actual controlled variables, direct closed-loop control architectures are characterized by the need for complex measuring systems to acquire actual values of the controlled variables during system operation. Therefore, the direct run-by-run closed-loop control architecture shown in Fig. 5 was chosen as compromise in the research work at hand.

Fig. 5
figure 5

Generalized architecture of a direct run-by-run closed-loop control system for geometry-specific manufacturing operations in production

4 Implementation

Based on the general control architecture introduced before, a more specific model-based closed-loop run-by-run control architecture for sequential bending processes of hairpin coils was derived. As shown in Fig. 6, the control algorithm, process model and geometry model are the central elements of the control system. The mathematical geometry model is required to analyze both the 3-D reference contour \({\textbf {w}}_{\text {3D}}\) and the controlled contour \({\textbf {x}}_{\text {3D}}\) of the hairpin coils for computing the control deviation based on the sequences \({\textbf {w}}_{\text {2D}}\) and \({\textbf {x}}_{\text {2D}}\) of scalar variables. Using the control deviation \({\textbf {e}}^{i-1}\) of the last manufacturing run as an input variable, an adapted control variable \({\textbf {u}}^{i}\) is calculated by the control algorithm for minimizing the control deviation. Within the scope of the paper at hand, a model-based control algorithm was chosen according to equation (1).

$$\begin{aligned} {\textbf {u}}_{\text {ANN}}^{i} = {\textbf {f}}_{\text {ANN}}^{-1}\left( {\textbf {u}}_{\text {ANN}}^{i-1}+{\textbf {e}}^{i-1},\,{\textbf {p}}\right) \end{aligned}$$
(1)

Thus, the inverse function \({\textbf {f}}_{\text {ANN}}^{-1}\) of the data-based process metamodel, which is introduced in detail in the following section, is used to calculate the adapted control variable \({{\textbf {u}}}_{\text {ANN}}^i\) based on the control variable \({\textbf {u}}_{\text {ANN}}^{i-1}\) and the control deviation \({\textbf {e}}^{i-1}\) of the last manufacturing run. Moreover, a set of process- and wire-specific parameters \({\textbf {p}}\), which is considered as time-invariant, is taken into account. In contrast to this, the manipulated variable \({\textbf {y}}^{i}\) as input variable of the physical actuators is calculated by a mathematical model of the forming machine – e.g. considering the process kinematics.

Fig. 6
figure 6

Specialized architecture of a direct run-by-run closed-loop control system for the sequential tool-bound bending of hairpin coils

Based on this closed-loop control architecture and the initial analysis of characteristic design elements as well as bending operations in the context of hairpin coil manufacturing, the implementation of the process and geometry model is described in the following sections.

4.1 Numerical process modeling

For modeling the sequential tool-bound bending process, a parametrized two-stage finite element analysis of the elementary rotary draw bending operation was implemented in Abaqus CAE 2022. The numerical process model consists of an explicit dynamic forming analysis and a subsequent static implicit springback analysis according to the geometric set-up and boundary conditions shown in Fig. 7.

Fig. 7
figure 7

Geometric set-up and implementation of the explicit finite element simulation model using the example of the reference wire with a nominal copper cross-section of \(\text {4.50}\times \text {2.36}\,\text {mm}^{2}\) at a bending angle of 60 deg

During the forming analysis, the tooling was pinned in its axial and lateral position with a single degree of freedom by rotation around the bending axis. As no significant elastic effects were expected, all tools were modeled with discrete rigid bodies. For modeling the contact behavior in between the wire and the tooling, a general contact with a penalty formulation and a friction coefficient of 0.1 was chosen. The mechanical forming properties of the rectangular copper wire were defined according to the results of uniaxial tensile tests on ten specimens. As reference material, a representative rectangular winding wire with a nominal cross-section of \(\text {4.50}\times \text {2.36}\,\text {mm}^{2}\) and edge radii of 0.7 mm – referring to the conductor – was chosen. The conductor made of the copper grade Cu-OFE was insulated with a polyamide-imide coating of 0.1 mm nominal thickness. Based on iterative calculations, the Young’s modulus was set to 88 MPa according to a linear regression within a range of 10–40 % of the identified yield strength. To model the plastic behavior of the wire at large strains, the Swift hardening law was used for extrapolating the experimental data according to equation (2):

$$\begin{aligned} \sigma _{f}^{\text {Swift}}(\varepsilon ) = 441\,\text {MPa} *(0.002 + \varepsilon )^{0.33} \end{aligned}$$
(2)

Since the influence of the insulation coating on the forming behavior of the enameled rectangular copper wire was considered negligible in previous analyses, the insulation coating was not explicitly modeled as separate material layer but taken into account by a geometric offset of the tooling. Additional details regarding the chosen methodology in material modeling can be taken from [35].

To discretize the rectangular wire, a symmetrically structured mesh with 108 reduced integrated hexahedron elements of type C3D8R in its cross-section was chosen; the axial element length was set to 0.5 mm within the forming zone and 1.0 mm apart from that. The pressure die, clamp die and bending die as modeled parts of the tooling were discretized in a structured manner with a mesh size of 0.5 mm in the contact zones. The simulation time was set to 10 ms for the clamping step and to 200 ms per 90 deg for the forming step using smoothed displacement amplitudes. To reduce the calculation effort, an additional mass scaling factor of 16 (clamping step) and 64 (forming step) could be chosen at negligible dynamic effects. After the two-step forming analysis, a static implicit analysis with a simulation time of 1 sec was implemented to model the nonlinear springback effects.

After successful numerical studies of convergence in terms of mesh size, time and mass scaling, an experimental validation was carried out using the reference wire as an example. Within the experimental test series, two planar hairpin coil geometries with simple bending sequences of 60-60-60 deg and 75-30-75 deg were considered. In addition, six different bending dies with representative bending radii of 2 mm, 3 mm, 4 mm, 5 mm, 6 mm and 8 mm were taken into account for both basic hairpin geometries. Using the experimental set-up described in Sect. 5.1, ten specimens were manufactured for each configuration and measured with a professional 3-D scanning system from ZEISS of type GOM ATOS Q 8M using a measuring volume of 170 mm. The measurement accuracy was considered as sufficient, as no significant changes in the measured results were observed in a comparative measurement series with an increased measuring volume of 350 mm.

Figure 8 shows the results of the experimental validation test series compared to the corresponding numerical results with focus on the springback after forming. For a bending parameter of 30 deg, a minimum absolute modeling error of 0.34 deg and a maximum modeling error of 0.61 deg were observed for bending radii of 3 mm and 8 mm respectively. Likewise, for a bending parameter of 60 deg, a minimum absolute modeling error of 0.16 deg and a maximum modeling error of 0.57 deg were observed for bending radii of 4 mm and 2 mm. For a bending parameter of 75 deg, a minimum modeling error of 0.08 deg and a maximum modeling error of 0.47 deg were observed for bending radii of 3 mm and 8 mm. In contrast, with respect to the gradient of the characteristic dependence of springback and bending angle, the absolute modeling error was limited to a maximum 0.26 deg between bending parameters of 30 deg and 75 deg. The systematic underestimation of the springback effects by the numerical process model can be basically explained by the finite stiffness of the experimental set-up. In addition, a simplified material model was used instead of a strain-dependent Young’s modulus and anisotropic kinematic hardening as identified by Komododromos et al. for enameled round copper wires [36]. Furthermore, the initial offset of the numerical results can be explained by local plastic deformations of the rectangular copper wire caused by the contact algorithm within the clamping step. However, as an accurate prediction of the gradient is an important factor for convergence in terms of direct closed-loop control, the accuracy of the finite element process model was considered as sufficient. Hence, the numerical model was used to generate training and test data sets for implementing a real-time metamodel in the following.

Fig. 8
figure 8

Numerical calcuations of springback in comparison to experimental results at different bending radii using the example of the reference wire with a nominal cross-section of \(\text {4.50}\times \text {2.36}\,\text {mm}^{2}\)

4.2 Data-based process modeling

According to the results of a methodological analysis conducted by the authors [14], a noncollapsing, space-filling Latin hypercube design of experiments was chosen as the basis for data-efficient modeling. The number of training data sets was set to 864 following the established methodology of full factorial experimental design and the number of test data sets was set to 172 as approximately 20 % of the number of training data sets. Based on the results of an iterative optimization of hyperparameters, a network architecture with seven input parameters (wire: width, height and edge radius; process: bending radius and bending angle; material: Young’s modulus and flow curve), two hidden layers with 32 and five neurons as well as one output parameter (springback after load) was chosen; as activation functions, softsign and sigmoid were defined. For training, Adam was applied as optimizer with a learning rate of 0.01, a batch size of two and a maximum of 1000 training epochs. In contrast to most of the known approaches, no cross-validation was applied for splitting the database into training and validation data sets, as a sufficient number of reliable data sets was already available.

Based on the methodology and the hyperparameters described before, a mean absolute error (MAE) of 0.073 deg and a mean squared error (MSE) of 0.013 \(\text {deg}^{2}\) were achieved in a series of predictions on an independent test data set generated by 172 additional simulation runs. By means of the developed ANN architecture, the modeling accuracy was improved by a factor of about 2.5 compared to a reference metamodel based on linear regression, which was limited to a MAE of 0.018 deg and a MSE of 0.062 \(\text {deg}^{2}\). The calculation effort could be reduced from about 20 min for the numerical simulation of a bending operation with a bending parameter of 60 deg to less than 0.01 sec – which is suitable for real-time predictions in the context of the focused run-by-run closed-loop process control.

In Fig. 9, predictions of springback by the finite element process model introduced in Sect. 4.1 and the data-based metamodel are compared using the reference wire with a nominal cross-section of \(\text {4.50}\times \text {2.36}\,\text {mm}^{2}\) as example. Since the difference between the modeling approaches is large at low and high bending parameters as the limits of the training data set, the validity of the metamodel is limited to bending parameters from 5 deg to 90 deg. With respect to this range of application, an average difference of 1.08–1.27 % was observed over all relevant bending radii and bending parameters.

Fig. 9
figure 9

Springback prediction of the real-time metamodel in comparison to numerical and experimental results at different bending radii using the example of the reference wire with a nominal cross-section of \(\text {4.50}\times \text {2.36}\,\text {mm}^{2}\)

To avoid a misinterpretation of the results based on a single type of rectangular winding wire, the accuracy of the springback predictions was compared for two additional rectangular wires with nominal cross-sections of \(\text {3.20}\times \text {2.80}\,\text {mm}^{2}\) and \(\text {5.00}\times \text {2.00}\,\text {mm}^{2}\). As shown in Figs. 10 and 11, the performance of the ANN is significantly increased in both applications compared to the reference configuration. Within the valid range of application, average differences of 0.14–0.30 % were identified over all bending radii and bending parameters for the wire with a nominal cross-section of \(\text {3.20}\times \text {2.80}\,\text {mm}^{2}\). Using the example of the wire with a nominal cross-section of \(\text {5.00}\times \text {2.00}\,\text {mm}^{2}\), similar average differences of 0.34–0.40 % were observed in scope of the relevant bending radii and bending parameters. Since the modeling errors do not limit the stationary accuracy of the direct closed-loop process control system, the quality of the data-based metamodel was considered as sufficient.

Fig. 10
figure 10

Springback prediction of the real-time metamodel in comparison to numerical calculations at different bending radii using the example of a wire with a nominal cross-section of \(\text {3.20}\times \text {2.80}\,\text {mm}^{2}\)

Fig. 11
figure 11

Springback prediction of the real-time metamodel in comparison to numerical calculations at different bending radii using the example of a wire with a nominal cross-section of \(\text {5.00}\times \text {2.00}\,\text {mm}^{2}\)

4.3 3-D measurement and analysis

Implementing the measuring element of the control system requires both a precise measuring system and an efficient geometry model for the contour analysis. Enabled by the decision for a direct run-by-run closed-loop control architecture a general 3-D approach was chosen. Thus, the same geometry model could be used both for analyzing ideal hairpin coil geometries given by the electromagnetic design in the context of initial process parametrization and for measurement data in terms of closed-loop process control. As already applied in the scope of modeling validation, a GOM ATOS Q 8M universal 3-D scanning system from ZEISS was used as alternative to measure the hairpin coils. However, more efficient and specialized measuring systems such as laser scanners could be used according to the neutral STL-based interface of the geometry model to reduce the actual measuring time of about 8 min for future applications in series production. The functional principle of the geometry model is explained in the following sections and can be structured in three consecutive steps: an initial analysis of the 3-D contour, a segmentation of the centerline according to the characteristic design elements of hairpin coils identified in Sect. 2.1 and a final extraction of the corresponding geometric parameters.

4.3.1 Contour analysis

To describe the geometry of hairpin coils based on a finite sequence of interpolation points and corresponding orientations instead of a nonparametric point cloud or surface mesh, the centerline of the hairpin contour needs to be calculated and analyzed as shown in Fig. 12a. Therefore, an iterative algorithm was developed based on the following sequence of operations:

  1. 1.

    Preprocessing of the geometric data – given as STL file – to limit the maximum number of surface triangles for increased calculation speed.

  2. 2.

    Graph-based analysis of the triangular surface mesh to identify an initial guess of the centerline along the arc length of the hairpin coil as a starting point for subsequent refinement iterations.

  3. 3.

    Computation of sectional planes by performing plane-mesh intersections in a reduced number of initial interpolation points using the tangents of the previously identified centerline as normal directions of the planes.

  4. 4.

    Calculation of centroids within the sectional planes by using a bounding box algorithm to refine the centerline predition along the arc length; suppression of erroneous multiple cuts of adjacent wire sections by excluding cutting sections that do not enclose the previous centroid.

  5. 5.

    Iterative refinement of the analysis results by repeating the operations 3 and 4 using an exponentially increasing number of interpolation points up to a predefined maximum.

  6. 6.

    Identification of an idealized rectangular wire cross-section considering a certain percentile of the bounding box dimensions calculated in the previous operations.

  7. 7.

    Calculation of the cross-sectional orientations of the hairpin coil at the interpolation points along the centerline by fitting a parametric cross-section of the rounded rectangular wire to the sectional planes as shown in Fig. 12b.

  8. 8.

    Parametric modeling of the centerline by fitting a user-specific shape function, such as cubic splines, to the sequence of interpolation points.

  9. 9.

    Reconstruction of hairpin legs by removing end points with poor quality and replacing them with idealized points extrapolated from the tangent of the centerline.

In addition, several geometry-specific thresholds were applied within the previous sequence of operations to make the algorithm more robust.

Fig. 12
figure 12

a STL file of a hairpin coil with spatial geometry generated by CAD; b Centerline of the hairpin coil with interpolation points and surface orientations as results of the contour analysis; c Segmented contour with characteristic design elements of the hairpin coil as geometric basis for process parametrization

4.3.2 Extraction of design elements

Based on the sequence of interpolation points and cross-sectional orientations along the arc length of the hairpin coil shown in Fig. 12b, the centerline needs to be segmented to describe the characteristic design elements introduced in Sect. 2.1. For this purpose, roots and saddle points of the curvatures in both the normal and binormal direction of the centerline were identified as potential limits of the design elements – so-called characteristic points – in a first step. Afterwards, the characteristic points were postprocessed and filtered according to the following criteria for segmenting the centerline as shown in Fig. 12c:

  • Remove characteristic point if extreme values in between adjacent roots are below a specific threshold normalized to the global extremum of curvature.

  • Remove characteristic point if distance of adjacent roots is below a specific number of interpolation points.

  • Remove characteristic point if extremum between two roots is below a specific threshold.

  • Divide the curvature between two adjacent roots based on the local extremum of curvature; remove the identified characteristic points until two saddle points with maximum and minimum derivatives of curvature remain.

4.3.3 Extraction of geometric parameters

To describe the hairpin coil for process parametrization based on a quantified version of the classification scheme introduced in Sect. 2.1, distances between characteristic design elements, bending radii as well as bending angles need to be extracted as geometric parameters from the segmented centerline.

The approximate distance between two design elements can be calculated with sufficient accuracy by summing the linearized distances between the enclosed interpolation points. In contrast, the bending angles can be calculated using both an indirect approach based on the integral of the enclosed curvature and a direct approach based on the spatial angle between the regression lines through the two bounding straight design elements. To calculate the bending radii, a more complex two-stage approach based on the projection of the enclosed interpolation points to a regression plane and a subsequent fitting of a circular design element was implemented.

According to validation tests on a complex hairpin coil with U-shape, errors caused by the geometry model were rated to be negligible if a sufficient number of interpolation points is chosen.

5 Validation

To validate the proposed direct run-by-run closed-loop process control, three independent experimental test series were conducted in addition to the previous validation of all individual elements of the control architecture. For this purpose, the planar hairpin coil geometry with three consecutive bending angles of 60 deg introduced in Sect. 4.1 and a representative bending radius of 4 mm were used as example. In addition, the three different types of rectangular winding wire with nominal copper cross-sections of \(\text {4.50}\times \text {2.36}\,\text {mm}^{2}\), \(\text {3.20}\times \text {2.80}\,\text {mm}^{2}\) and \(\text {5.00}\times \text {2.00}\,\text {mm}^{2}\) introduced in Sect. 4.2 were considered to validate the general applicability of the control concept.

5.1 Experimental set-up

To conduct the experimental validation test series, an automated forming machine for the planar rotary draw bending of enameled rectangular copper wire was developed and implemented according to the set-up shown in Fig. 13. In order to minimize the influence of unknown deviations in between the real experimental set-up and the numerical process model, the forming machine was inspected before the experiments with the GOM ATOS Q 8M 3-D scanning system. The identified mechanical misalignments have already been considered in the finite element model introduced in Sect. 4.1 for means of numerical compensation.

Fig. 13
figure 13

Experimental set-up used for rotary draw bending of the hairpin coils with planar geometry after the third bending operation

5.2 Experimental results

Based on the segmented centerline and extracted geometric parameters of the characteristic design elements, three sets of initial bending parameters were calculated using the real-time metamodel introduced in Sect. 4.2 for springback compensation. The acquired sets of process parameters were subsequently used to manufacture six hairpin coils as specimens. Afterwards, the actual contours of the hairpin coils were measured and analyzed again. Based on this data, the control deviation was determined for each characteristic design element and used to compensate the nominal process parameters within the next manufacturing run according to equation (1). In order to minimize the influence of possible changes in the set-up on the validation results, the three wire-specific experimental test series were conducted in a batch sequence.

5.2.1 Test series with wire 4.50 x 2.36

Figure 14 shows the results of the experimental test series using the reference wire with a copper cross-section of \(\text {4.50}\times \text {2.36}\,\text {mm}^{2}\). After the initial control iteration based on the data-based springback compensation, mean control deviations of \(-\)0.61 deg to \(-\)0.81 deg were measured for the three consecutive bending operations (BOP). In contrast, after the first control-based adaption of the bending parameters, the mean deviations of the controlled bending angles to the three reference bending angles of 60 deg were limited to 0.04 deg.

Fig. 14
figure 14

Results of the experimental test series for six hairpin coils with bending angles of 3 \(\times\) 60 deg using the example of the reference wire with a nominal cross-section of \(\text {4.50}\times \text {2.36}\,\text {mm}^{2}\)

5.2.2 Test series with wire 3.20 x 2.80

Following the same methodology, Fig. 15 shows the results of the experimental test series using the wire with a copper cross-section of \(\text {3.20}\times \text {2.80}\,\text {mm}^{2}\). In this case, mean control deviations of \(-\)0.78 deg to \(-\)0.81 deg were measured after the initial control iteration. In spite of this, the control deviations of the controlled and reference bending angles were limited to a maximum of 0.13 deg after the first control iteration.

Fig. 15
figure 15

Results of the experimental test series for six hairpin coils with bending angles of 3 \(\times\) 60 deg using the example of a wire with a nominal cross-section of \(\text {3.20}\times \text {2.80}\,\text {mm}^{2}\)

5.2.3 Test series with wire 5.00 x 2.00

In addition, the experimental results using a wire with a copper cross-section of \(\text {5.00}\times \text {2.00}\,\text {mm}^{2}\) are shown in Fig. 16. According to the results of the two previous analyses, significant control deviations of \(-\)0.76 deg to −0.83 deg were measured after the initial control iteration. After the first control iteration, the deviation between the reference and controlled angle was limited to a maximum of 0.06 deg.

Fig. 16
figure 16

Results of the experimental test series for six hairpin coils with bending angles of 3 \(\times\) 60 deg using the example of a wire with a nominal cross-section of \(\text {5.00}\times \text {2.00}\,\text {mm}^{2}\)

5.3 Conclusion

With a maximum control deviation of 0.13 deg after a single control iteration, a sufficient performance of the implemented direct run-by-run closed-loop control system was experimentally proven. However, there are still drawbacks regarding the accuracy of the initial model-based process parametrization which need to be improved in future. Since the difference between the three experimental test series is small despite of the different wire types, a systematic error caused by the experimental set up seems to be probable, e.g. due to mechanical misalignments which could not be measured by accurate 3-D scanning as the home position of the bending die or the limited stiffness of the clamp die. Against this background, the functional principle of the direct closed-loop control architecture referring to measurement of the controlled variable is highly advantageous compared to indirect alternatives.

6 Summary

The hairpin technology is the state-of-the-art manufacturing process chain for stators of electric traction motors. However, achieving sufficient process reliability is a major challenge in industrial production due to inevitable variations in wire quality causing differing springback effects within the forming operations. In order to develop a methodology for adaptive process parametrization, a literature review was conducted to identify the most relevant characteristic design elements of hairpin coils as knowledge base for deriving a unique classification scheme related to the sequence of bending operations. Using the example of sequential tool-bound bending as forming technique, a parametric finite element model of the rotary draw bending process was developed to generate a data set of 864 springback calculations for training an artificial neural network as real-time process model. Furthermore, a geometry model consisting of an initial analysis of the hairpin contour, a segmentation of the centerline considering the characteristic design elements as well as an extraction of scalar geometric parameters was developed to derive information about the controlled variables from 3-D measurement data. Based on both the real-time process model as part of the control algorithm and the geometry model, a direct run-by-run closed-loop control architecture was implemented. Using an experimental set-up for planar rotary draw bending operations, the approach was validated in experimental test series on a planar hairpin coil geometry and three different types of winding wire with a maximum control deviation of 0.13 deg after a single control iteration.