1 Introduction

Laser technology has became a reference technology in many strategic productive sectors, such as telecommunications, metrology and dimensional analysis, reprography, medicine, control of pollution and material processing, among others, with a total sales of 6,900 million dollars last year, from which 2,184 millions correspond to laser material processing systems [1].

The introduction of laser technology in the field of industrial materials processing, together with the increment in the automation degree of the productive processes, has improved considerably their efficiency, providing an excellent flexibility, precision, processing speed and final quality in a wide variety of applications, among which can be highlighted cutting, welding and overall surface heat treatments, essentially laser hardening and laser cladding [1].

Due to the exceptional features of laser technology, nowadays a false appearance of technological maturity is created, but a deep analysis still reveals the existence of numerous unsolved questions, essentially in the monitoring and automatic control field [24].

Among the main limitations in the industrial application of laser technology, it must be emphasized that the possible lack in the treatment uniformity as a result of its high sensitivity to external disturbances is derived essentially from instabilities in the laser source and imperfections in the surface of the treated element.

These irregularities in the treatment can produce an unacceptable behavior of the final product, reducing its resistance to wearing, fatigue or corrosion, requiring a reprocessing or even the rejection and destruction of the element, with the consequent increase of cost [2, 3].

Therefore, all these considerations underscore the need for developing a real time control system able to maintain the process within the nominal work conditions, improving the treatment uniformity and increasing the final quality of the obtained product [24].

The development and implementation of an efficient real time monitoring and control system for highly complex processes like laser surface treatments constitutes an important technological challenge, being critical a representative model of the process.

Considering that the physical phenomena involved in laser material processing are basically thermal, and the high experience available about the correlation between the final properties of the treated element and the thermal cycle applied, it is common to estimate the uniformity and quality of the treatment by the measurement of the maximum temperature reached on the material surface, using optical pyrometry [24].

Mathematically, the process can be characterized by the heat conduction equation, an ordinary second order differential equation [5]:

$$ \rho \cdot c_{\text{P}} \cdot \frac{\partial T}{\partial t} + \nabla \left( { - K \cdot \nabla T} \right) = f\left( {r,t} \right) $$

where T is the system temperature, t the time, ρ the density, c p the specific heat, K the thermal conductivity and f (r,t) the laser energy density.

Except for some very specific cases with a high degree of symmetry, it is not possible to obtain a direct analytical solution to the problem, being necessary to resort to approximate numerical solutions methods, like Green’s function or finite elements [69].

2 Green’s function modeling of laser surface treatments

Formally, the use of the Green’s function provides an elegant and simple method for the resolution of electrostatic potential problems with a high degree of complexity. Based on the deep knowledge of the method and considering the existing similarities between the electrostatic potential and the temperature field, Carslaw and Jaeger proposed the extension of the Green’s function method to the resolution of the heat conduction equation [5].

In this case, the Green’s function G represents the temperature reached in the point r = (x,y,z) at moment t due to an instantaneous point source of intensity unit located in the point r′ = (x′,y′,z′) at moment t′, considering that the temperature is 0 at the initial instant.

For a laser source moving with a uniform speed v b, the Green’s function can be obtained from Fourier transformation [6, 8]:

$$ G\left( {\left| {r - r'} \right|,t - t'} \right) = \frac{1}{{4 \cdot K \cdot \sqrt {\kappa \cdot \left( {{{\uppi}} \cdot \left( {t - t'} \right)} \right)^{3} } }} \cdot {\text{e}}^{{ - \left( {\frac{{\left( {x - \left( {x' + v_{b} \cdot t} \right)} \right)^{2} + \left( {y - y'} \right)^{2} + z^{2} }}{{4 \cdot \kappa \cdot \left( {t - t'} \right)}}} \right)}} $$

The general solution of the temperature induced at moment t, by an extensive laser source can be obtained integrating the product of the Green’s function by the laser beam energy density f (r,t):

$$ T\left( {r,t} \right) = T_{0} + \int\limits_{t' = 0}^{t' = t} {\int\limits_{y' = - \infty }^{y' = - \infty } {\int\limits_{x' = - \infty }^{x' = + \infty } {f\left( {r',t'} \right) \cdot G\left( {\left| {r - r'} \right|,t - t'} \right) \cdot dx' \cdot dy' \cdot dt'} } } $$

The space distribution of the laser beam energy density is specific of each installation, being two of the most common distributions in industrial installations, the TEM01* mode, typical of medium and high power CO2 laser resonators, and the Gaussian TEM00 mode, characteristic of all fibber transmitted lasers (diode, Nd:YAG, etc.), and CO2 low and medium power resonators [79].

Figure 1 presents the space energy density distribution for a TEM01* laser source, with a characteristic diameter d c = 10 mm and a source power of P = 1,500 W, whose energy density function takes the following form:

$$ f\left( {r',t'} \right) = Pot\left( {t'} \right) \cdot \left( {\frac{{16 \cdot r^{\prime 2} }}{{{{\uppi}} \cdot \left( {d_{\text{c}} /2} \right)^{4} }}} \right) \cdot {\text{e}}^{{ - 4 \cdot \left( {\frac{r'}{{\left( {d_{\text{c}} /2} \right)}}} \right)^{2} }} $$
Fig. 1
figure 1

TEM01* space energy distribution

Figure 2 presents the Gaussian TEM00 distribution, whose energy density function takes the following form:

$$ f\left( {r',t'} \right) = Pot\left( {t'} \right) \cdot \left( {\frac{2}{{{{\uppi}} \cdot \left( {d_{\text{c}} /2} \right)^{2} }}} \right) \cdot {\text{e}}^{{ - 2 \cdot \left( {\frac{r'}{{\left( {d_{\text{c}} /2} \right)}}} \right)^{2} }} $$
Fig. 2
figure 2

Gaussian TEM00 space energy distribution

The Green’s function method provides a very versatile solution, able to model the temperature evolution of any point of the material during the whole treatment, simulating the signal provided by the temperature sensors used for monitoring the process [24].

As an example, Fig. 3 presents the thermal cycle for a fixed point in the middle of the laser beam trajectory for a TEM01* laser, with a characteristic diameter of d c = 10 mm and a source power of P = 1,500 W.

Fig. 3
figure 3

Thermal cycle for a fixed point

This model provides also the temperature distribution in the whole volume during the treatment, allowing identifying and analyzing the heat affected zone, as shown in Figs. 4 and 5.

Fig. 4
figure 4

Temperature distribution on the surface

Fig. 5
figure 5

Transversal temperature distribution

Nevertheless, as a result of its own nature, based on a temporary integral from the beginning of the treatment, it requires an excessive memory consumption and a high calculation time, being not suitable for the design and simulation of control systems for laser surface treatments.

Consequently, considering the proved universal approximant property of ANFIS adaptive neurofuzzy inference models, in the present article we propose an ANFIS modeling of the Green’s function solution [1012].

Due to its high versatility and efficiency, this model is suitable not only for the design of controller systems, but also for the development of an expert real time supervision system, allowing detecting any failure during the treatment [24].

3 Neurofuzzy modeling of complex nonlinear processes

Over the past years, many neurofuzzy inference structures have been developed in an effort to combine the ability of learning and generalize from examples of the artificial neuronal networks, with the fuzzy logic capacity of modeling the human reasoning and the verbal communication.

Formally, last generation neurofuzzy inference systems implement a Sugeno fuzzy inference system by a multi-layer neuronal network, with five layers, each of them dedicated to a specific task of the fuzzy inference process [11, 13, 14].

The parameters associated with the membership functions are optimized using several variants of the classical neural networks training algorithms, based on backpropagation [11].

Among the neurofuzzy models most used nowadays, it must be highlighted the Adaptive NeuroFuzzy Inference System (ANFIS) proposed in 1992 by J.S. Roger in his Ph.D. thesis [1012].

Most of the success of ANFIS comes from its implementation in the Matlab® Fuzzy Logic Toolbox, with an excellent graphical interface personally developed by J.S. Roger in collaboration with N. Gulley, incorporating also diverse fuzzy logic pattern classification algorithms for the definition and dimensioning of the input membership functions [15].

In addition, another important contribution of J.S. Roger to ANFIS development has been the establishment of its universal approximant nature, and the functional equivalence of Sugeno fuzzy inference systems with radial neuronal networks, providing the essential theoretical support for the practical application of ANFIS to nonlinear systems modeling [10, 14].

Functionally, the five layers adaptive neuronal network proposed by J.S. Roger is equivalent to a classical first order Sugeno fuzzy logic inference system, where each layer implements a specific stage of the fuzzy inference process, as shown in Fig. 6 [13]:

Fig. 6
figure 6

Neurofuzzy ANFIS model structure

  • Layer 1: The first layer of the network fuzzyfies the input signals, evaluating the membership degree of each membership function.

Although it is possible to use any continuous membership function, the most common is the generalized bell function:

$$ \mu_{\text{A}} \left( x \right) = {\text{gbellmf}}\left( {x;a,b,c} \right) = \frac{1}{{1 + \left| {\frac{x - c}{a}} \right|^{2b} }} $$
  • Layer 2: The second layer evaluates the satisfaction degree of the different rules of the rule base.

  • Layer 3: The third layer makes the implication process.

  • Layer 4: The nodes of the fourth layer evaluate the consequent functions of each fuzzy rule.

  • Layer 5: The fifth layer makes the defuzzification, generating the output signal adding the outputs of the different neurons from the previous layer.

For its training, J.S. Roger has proposed a highly efficient hybrid training algorithm in two stages, where the parameters of the consequent functions are updated by least squares estimation, propagating the input signals towards the output, while the rest of the operative parameters of the network is updated in the second stage backpropagating the estimation error, accelerating considerably the convergence of the training process [11].

In a general way, the fine tuning of the operative parameters of a neurofuzzy model is extremely difficult, considering the high number of parameters to be tuned, as well as the own neurofuzzy information storage mechanism, in such a way that it is essential a good design of the model structure, as well as the availability of a suitable and representative training-data set, covering all the normal operation rank.

3.1 ANFIS modeling of laser surface treatments

Once established the high nonlinearity of laser surface treatment and the impossibility of obtaining a direct model suitable for the design and simulation of control systems, it has been developed an adaptive ANFIS neurofuzzy model.

A deep analysis of the characteristic parameters that govern the laser–material interaction, allows establishing that in a typical treatment, the maximum temperature in the surface of the material at the current sampling period can be estimated with sufficient precision from the temperature at the previous sampling period and the laser beam power.

A model of these characteristics deals with both the possible variations in the laser power induced by the control system, as well the alterations in the physical properties of the material due to the temperature evolution during the treatment.

In a first approach, the logical option would be synthesizing a conventional input–output model that directly provided the estimation of the temperature at the next sampling period, from the temperature in the surface and the laser power at the current instant.

Nevertheless the technical training difficulties inherent to the similarity of the temperature signal between two consecutive sampling periods, suggests an incremental design of the model, where the temperature variation at the following sampling period is estimated from the temperature and the laser power at the present moment, as shown in the block diagram presented in Fig. 7.

Fig. 7
figure 7

Incremental neurofuzzy ANFIS model

In this case, in agreement with our previous experience on laser surface treatments, a conventional neurofuzzy ANFIS inference model has been developed, defining five fuzzy sets with generalized bell membership functions for each input variable, generating consequently, a rule base with 25 first order Sugeno type fuzzy rules [13].

The tuning of the 105 operative parameters of the ANFIS model has been made using the hybrid algorithm proposed by J.S. Roger, with a representative data set of 300 steps of 3 s each one, providing an acceptable estimation error after <80 iterations [12, 15].

Figure 8 presents the ANFIS estimation surface obtained, showing its high smoothness and nonlinearity.

Fig. 8
figure 8

ANFIS estimation surface

The experimental validation of the proposed ANFIS model has been made in an industrial medium power TEM01* CO2 laser resonator, which allows to directly compare the estimation provided by the model with the real response of the plant, once filtered.

Figure 9 shows a systematic validation test, where have been applied several steps to the laser power, proving the excellent reliability and adjustment degree of the proposed ANFIS model. In order to minimize the sensor noise, a first order digital Butterworth filter with a cut-off frequency of 25 Hz has been implemented in the data acquisition program, filter that is also used during the normal operation of the plant [24].

Fig. 9
figure 9

ANFIS model response

4 Conclusions

The development and implementation of an efficient real time monitoring and control system for highly complex processes like laser surface treatments constitutes an important technological challenge, being critical a representative model of the process.

Due to its high nonlinearity and complexity, it is not possible to obtain a direct analytical model, being necessary to resort to approximate numerical solutions methods, with a high simulation time. Consequently in order to develop a real time simulation model, it is essential to resort to the ultimate nonlinear advanced modeling and control techniques, as the proposed neurofuzzy ANFIS model.

Even when the training process of the developed neurofuzzy model has been relatively long and complex, being necessary a high number of input–output data, whose experimental acquisition can be not easy, once concluded, the simulation time of any treatment is minimum.

The proposed neurofuzzy model allows reducing the simulation time from the 3.5 s required to directly evaluate the Green’s function model in Matlab and the 0.12 s required to evaluate the model in C++ to the 0.003 s required to evaluate the ANFIS model in Matlab.

Considering that the fast system response imposes in order to minimize the information loose intrinsic to the system sampling, an extremely short sampling period, 10 ms, this model is approximated three times faster than the control system [2, 3]. Consequently it is completely possible the implementation of the proposed ANFIS model in a real time monitoring and control system, constituting the basis of an expert supervision system, allowing detecting and correcting any failure during the treatment.