1 Introduction

The atmospheric plasma spray process (APSP) used to produce a variety of coatings such as low porosity, thermal barrier, wear and corrosion resistant, and functionally graded [1] is schematically shown in Fig. 1. Coatings of thickness less than a few micrometers are categorized as thin, and others as thick. Besides an APSP, coating techniques include electroplating, chemical treatments, hot dipping, chemical vapor deposition, physical vapor deposition (e.g., evaporation, puttering, ion plating), and pulsed laser deposition. Primary characteristics of coating processes are summarized in Table 2.1 of Fauchais et al.’s [2] chapter. The methodology of finding significant input parameters and controlling them to produce a good quality coating described in this paper is applicable to the above-mentioned processes and to other technologies like hot forging and machining. Details are provided below only for an APSP.

Fig. 1
figure 1

Schematics of an APSP [3]. Gases injected into the gas gun pass over the arc to form a plasma that exits the gun. Powder particles through the powder port are injected into the plasma and travel with it to the substrate. The particles are heated during their trajectory in the plasma. The plasma exiting the gun outlet and trajectories of particles injected into it are numerically simulated to find particles’ temperature and velocity as they move through the plasma

An APSP involves plasma formation within a gun nozzle, particle injection into the plasma jet flowing out of the nozzle, particle heating and acceleration during their motion in the plasma, and coating formation on a substrate. Usually, a mixture of argon (Ar, ~ 30–60 slm (standard liter per minute)) and hydrogen (H2, ~ 0–15 slm) injected into the gun nozzle is ignited by a high-intensity arc between tips of a cathode and a water-cooled anode. The arc intensity depends on the current (~ 300–600 A), the voltage (~ 30–70 V), the distance between the anode and the cathode, their geometries, and the gun efficiency. The resulting plasma jet emanating from the nozzle outlet has the maximum temperature of ~ 14,000 K, and peak velocity of ~ 2.5 km/s at its centerline, and steep temperature and velocity gradients in the radial direction (~ 104 K/mm and 5 × 105 /s) [3, 4]. In general, micron-sized powder particles (~ 10–100 µm) and a carrier gas (typically Ar) are injected vertically downward through the powder port to reach the hot core of the plasma jet. These particles are heated, partially or fully melted, accelerated towards the substrate situated at ~ 10–15 cm from the nozzle, and are deposited on it to form a coating. Complex interactions between the plasma and the powder particles significantly influence coating properties and repeatability, and hence the process cost [5,6,7].

A small disturbance in process parameters can significantly alter mean particles’ temperature and axial velocity (collectively called mean particles’ states, MPSs) and thus the coating quality [8]. These disturbances can be caused by nozzle wear, powder port (injector) wear, pulsing of powder due to leaks, worn parts in the powder feeder, and powder dampness. The powder port’s wear can be caused by angular-shaped particles interacting with its inner surface. Fluctuations in particles’ mass flow rate can occur due to the powder clogging and/or changes in the carrier gas flow rate. Whereas the particle dwell time in the plasma is ~ 1- 4 ms, the arc root fluctuations have time scales of the order of 10–1–10–2 ms [7, 9], time constants of the powder feeder instabilities are in the range of 1–200 s, and the electrode/injector erosion occurs in minutes. Hence, mitigating their effects on MPSs in a few ms by suitably varying significant input parameters using a real-time feedback controller can maintain consistency in the coating quality.

The development of a controller requires how input parameters (e.g., current, gas flow rates) affect MPSs. Choudhury et al. [10] and Zhang et al. [11] used an artificial neural network (ANN) to establish such relationships. Even though an ANN can reveal complex nonlinear interactions amongst dependent and independent variables, it is a ‘black box’ that is prone to overfitting and is computationally expensive [12]. Some of these limitations can be overcome by using statistical design techniques such as screening, full factorial, and the response surface methodology. One can then focus on delineating effects of the main process parameters and cross-interactions amongst them on the output parameters; e.g., see Mawdsley [13] for the 2-level factorial design based multiple regression, and Li et al. [14] for the uniform design of experiments to develop regression equations. These investigations did not consider noise variables.

Srinivasan et al. [15] explored controlling the MPSs by using a monitoring system with a feedback controller to vary the primary gas flow rate and the current. Kanta et al. [16] used two ANNs—one to predict the process input parameters and the other to predict in-flight MPSs, and a fuzzy logic (FL) controller to adjust the former for keeping MPSs within their prescribed bounds. Planche et al. [17] developed an automatic system using an ANN to predict MPSs for the desired coating properties, another ANN to predict the needed input process parameters, and two FL controllers to correct errors in predictions from the ANNs. Finke et al. [7] developed real-time diagnostics and control by monitoring the MPSs and adjusting the input parameters with a proportional–integral–derivative controller that employs a manually selected constant gain factor. These works did not consider effects of random noise variables.

The motivation, then, is to develop a stable and adaptive controller for an APSP to achieve the desired MPSs. The adaptive controller presented here has an adjustable tuning mechanism to cope up with effects of unknown disturbances and has been designed using a model reference adaptive control (MRAC) scheme based on the linearized dynamics of the MPSs.

2 Methods

2.1 Development of mathematical model of the problem

A major challenge in developing a science-based model of a physical problem is to capture physics relevant to all important phenomena such as the plasma jet exiting from the nozzle outlet, chemical interactions amongst the jet constituents, the drag force experienced by powder particles injected into the plasma, heat transfer between particles and the plasma, and plasma’s interaction with the air surrounding it. The mathematical model of the APSP developed in this paper is based on the following assumptions. (1) The plasma jet exiting the nozzle is axisymmetric, is in local thermodynamic equilibrium, and is composed of a mixture of chemically reacting constituents with temperature-dependent thermodynamic and transport properties. (2) Chemical reactions among different species including ionization, dissociation, and recombination are considered, and the turbulence is simulated by using the standard \(k-\in\) model. (3) The arc voltage fluctuations in the plasma nozzle are neglected because of difficulties in expressing them in terms of gases injected into the nozzle, the anode and the cathode materials, and the distance between them. (4) Powder particles are rigid spheres, randomly vary in diameter, do not interact with each other, exchange heat with the plasma, and can melt due to temperature rise, and the internal convection within a molten particle has a negligible effect on the heat transfer. (5) A powder particle is regarded as a point mass for simulating its heating, melting, and solidification [6]. The volume fraction of the melted material is computed by considering the latent heat of melting. (6) Effects of gravity and buoyancy on the plasma jet and particles’ trajectories are negligible as compared to that of the viscous drag forces [18, 19]. (7) The effect of the carrier gas flowing through the powder port at ~ 5 slm on the plasma jet is negligible [6].

2.1.1 Justification of assumptions

Assumption 5 considerably simplifies the analysis of heating of particles, has been shown by other investigators to give fairly accurate results that are close to the experimental observations, and saves considerable computational resources. Assumption 6 is reasonable because of large differences between particles’ and the plasma velocities, and drag forces are dominant. For assumption 7, we note that even though the injection of the carrier gas and the powder particles adversely affects axisymmetry of the plasma jet near the powder injection port, however, the effect is local and the plasma jet is nearly axisymmetric away from the powder port.

The injection velocity (speed and direction) of particles varying in diameters from 5 to 125 μm are randomly assigned within their pre-specified ranges to achieve the desired powder mass injection rate.

2.2 Governing equations and solution techniques

For brevity, we refer the reader to Sects. 3, 4 and 5 of Shang et al. [3] for details of the governing equations for the plasma modeled as a mixture of different constituents, and particles’ trajectories and heating. The software LAVA-P numerically solves these equations by the finite volume method over the simulation region exhibited in Fig. 1 and using the following boundary conditions (BCs) [20] for the temperature, the velocity, and the turbulence variables at the nozzle exit plane.

$$\begin{gathered} \left( {y = 0 and R_{i} \le x \le R_{0} } \right):\left\{ {\begin{array}{*{20}c} {T_{f} \left( {x,0} \right) = \left( {T_{0} - T_{w} } \right)\left[ {1 - \left( {\frac{x}{{R_{i} }}} \right)^{{n_{T} }} } \right] + T_{w} } \\ {u\left( {x,0} \right) = 0,v\left( {x,0} \right) = V_{0} \left[ {1 - \left( {\frac{x}{{R_{0} }}} \right)^{{n_{v} }} } \right]} \\ {k\left( {x,0} \right) = \kappa V_{0} \left[ {\frac{\partial v}{{\partial x}}/\left( {\frac{\partial u}{{\partial x}}} \right)_{\max } } \right]} \\ {\varepsilon \left( {x,0} \right) = k(x/\left( {0.0075\delta_{0.1} /c_{\mu }^{3/4} } \right)} \\ \end{array} } \right. \hfill \\ \quad \quad \quad \left( { y = 0, x \ge R_{o} } \right): \left\{ {\begin{array}{*{20}c} {T_{f} \left( {x,0} \right) = T_{w} - \left( {T_{\infty } - T_{w} } \right)\frac{{\ln \left( {x/R_{i} } \right)}}{{\ln \left( {R_{i} /R_{o} } \right)}}} \\ {u\left( {x,0} \right) = v\left( {x,0} \right) = 0} \\ {k\left( {x,0} \right) = 0} \\ {\varepsilon \left( {x,0} \right) = 0} \\ \end{array} } \right. \hfill \\ \end{gathered}$$
(1)

Here, \(T_{f}\) is the plasma temperature; u and v, respectively, are the radial and the axial velocity components; Ri and Ro, respectively, are the inner and the outer radii of the nozzle exit; \(T_{0}\) and \(V_{0}\), respectively, are the plasma temperature and the axial velocity at the nozzle exit; \(T_{w}\) is the torch wall temperature; and \(k\) and \(\varepsilon\), respectively, are the turbulence kinetic energy and its dissipation rate. Coefficients nT and nv indicate how fast the temperature and the axial velocity decrease in the radial direction; the x-axis is in the radial direction, \(\left( {\partial u/\partial x} \right)_{{{\text{max}}}}\) equals the maximum value of the radial velocity gradient; the parameter κ determines the shape of the profile, and δ0.1 equals the jet width at the location where \(v = 0.1V_{0}\). The torch wall is assumed to be rigid where no-slip condition holds [20]. \(T_{\infty }\) represents the ambient temperature. Open boundaries and downstream boundaries are considered as either inward or outward flow conditions [20]. On the axis of symmetry, x = 0, BCs are u = 0 and \(\frac{\partial u}{{\partial y}} + \frac{\partial v}{{\partial {\text{x}}}}\) = 0. Initially, the simulation region is filled with quiescent air at room temperature.

Following [20], we choose \(n_{T}\) and \(n_{v}\), and iteratively find \(T_{0}\) and \(V_{0}\) so that the total mass flow rate and the energy output from the nozzle exit differ by less than 1%, respectively, from their input values into the nozzle.

For the specified powder mass injection rate, the software calculates the number of particles for a given average injection speed and assigns them a random velocity when exiting the powder port.

2.2.1 Parameter values

Values assigned to parameters are: Ri = 0.39 mm, Ro = 15 mm, the gun efficiency = 0.7, T = 300 K, P = 85.5 kPa, Tw = 700 K, κ = 0.015. Values of material parameters used for the zirconia (Zr) powder particles are listed in [6]. Figure s1 of the supporting information represents the distribution of particles’ diameters used in simulations, a schematic of their trajectories in the plasma, and the location of the observation window used to measure particles’ temperature and velocity.

2.2.2 Measure of quality of computed results

The deviation of the computed results from those measured experimentally is quantified by using the following L2-norm, \(e_{2}\), of the difference between them.

$$e_{2} = \sqrt {\frac{{\smallint \left( {\varphi_{{{\text{Simulated}}}} \left( x \right) - \varphi_{{{\text{Experimental}}}} \left( x \right)} \right)^{2} dx}}{{\smallint \varphi_{{{\text{Experimental}}}}^{2} \left( x \right)dx}}}$$
(2)

where \(\varphi\) represents either the temperature or a velocity component. This provides the average of deviations between the computed and the experimental values of \(\varphi\) rather than the maximum difference between them at any location. A local spike in the difference over a small distance has the same effect on \(e_{2}\) as a small difference over a large distance.

2.3 Finding optimal input parameters for the MPSs

Three steps involved in finding values of the process input parameters for achieving desired MPSs are screening, finding response functions relating significant input parameters to the MPSs, and using a genetic algorithm (GA) to solve nonlinear algebraic response function equations for the input parameters when the MPSs are prescribed. The screening analysis ranks the influence of each process parameter on the MPSs to identify which ones should be included in developing response functions for the MPSs. To investigate statistical significance of process parameters and interactions between any two of them, a complete polynomial of at least degree 2 is needed. Here, we use a complete polynomial of degree 2, employ the analysis of variance (ANOVA) to statistically quantify the significance of various terms in the polynomial, construct an objective function in terms of the two response functions (one for the mean particles’ temperature and the other for the velocity), and use an GA to find values of the significant process parameters from the response functions for desired MPSs.

2.3.1 Screening of process parameters

We use Morris’ [21] global one-factor-at-a-time (OFAT) screening method to rank their effects on the MPSs as: (1) negligible, (2) linear and additive, and (3) nonlinear and/or involved in interactions with other process parameters [21]. As explained in [21, 22], it requires calculating elementary effects (EEs) of a randomly chosen value of one process parameter at a time on the MPSs. We assume that each MPS is a scalar-valued function of 7 process parameters \(u_{i} \left( {i = 1, \ldots ,7} \right)\) that have been normalized to vary between 0 and 1. Each \(u_{i}\) is discretized into a p – level grid \(\left\{ {0,\frac{1}{p - 1},\frac{2}{p - 1}, \ldots ,1} \right\}\) where p is an even integer. With \(\Delta \equiv \frac{p}{{2\left( {p - 1} \right)}}\), the EE of the ith parameter at a randomly chosen base point \({\varvec{u}}^{\user2{*}} = \left( {u_{1} , \ldots u_{7} } \right)\) is defined by

$$EE_{i} \left( {{\varvec{u}}^{\user2{*}} } \right) = \frac{1}{\Delta }\left[ {y\left( {u_{1} , \ldots ,u_{i} + \Delta , \ldots ,u_{7} } \right) - y\left( {u_{1} , \ldots ,u_{7} } \right)} \right]$$
(3)

The value of \(EE_{i} \left( {{\varvec{u}}^{\user2{*}} } \right)\) equals the sensitivity of the MPS (\({\text{denoted by }} y {\text{ in Eq}}. 3)\) to the ith parameter at the base point \({\varvec{u}}^{\user2{*}}\). The mean, \(\mu_{i} ,\) and the standard deviation, \(\sigma_{i} ,\) of the \(EE_{i}\) of the ith process parameter are computed using

$$\begin{array}{*{20}c} {\begin{array}{*{20}c} {\mu_{i} = \frac{1}{r}\mathop \sum \limits_{j = 1}^{r} \left| {EE_{i}^{\left( j \right)} } \right|;} & {} \\ \end{array} } & {{ }\begin{array}{*{20}c} {\sigma_{i} = \sqrt {\frac{1}{r - 1}\mathop \sum \limits_{j = 1}^{r} \left( {EE_{i}^{\left( j \right)} - \mu_{i} } \right)^{2} } ,} & {i = 1, \ldots ,7} \\ \end{array} .} \\ \end{array}$$
(4)

Here, \(u^{\left( j \right)} \left( {j = 1, \ldots ,r} \right)\) are \(r\) randomly chosen base points, and \(EE_{i}^{\left( j \right)}\) represents the EE of the ith parameter at the base point \(u^{\left( j \right)} .\) Values of \(\mu_{i}\) and \(\sigma_{i}\) identify process parameters that have negligible (low \(\mu_{i} ),\) linear (high \(\mu_{i}\) and low \(\sigma_{i}\)), and nonlinear and/or interactions (high \(\mu_{i}\) and high \(\sigma_{i}\)) effects [21, 23].

2.3.2 Identification of significant input parameters using analysis of variance (ANOVA)

The results of ANOVA are meaningful only if the input values used in the design of experiments are independent of each other [24], i.e., the correlation coefficient, \(cr\), between the input variables ξ1 and ξ2 defined by

$$cr = \frac{{\mathop \sum \nolimits_{{{\text{i}} = 1}}^{{\text{n}}} \left( {{\xi }_{1}^{{\left( {\text{i}} \right)}} - {\overline{\xi }}_{1} } \right)\left( {{\xi }_{2}^{{\left( {\text{i}} \right)}} - {\overline{\xi }}_{2} } \right)}}{{\sqrt {\mathop \sum \nolimits_{{{\text{i}} = 1}}^{{\text{n}}} \left( {{\xi }_{1}^{{\left( {\text{i}} \right)}} - {\overline{\xi }}_{1} } \right)^{2} } \sqrt {\mathop \sum \nolimits_{{{\text{i}} = 1}}^{{\text{n}}} \left( {{\xi }_{2}^{{\left( {\text{i}} \right)}} - {\overline{\xi }}_{2} } \right)^{2} } }}$$
(5)

is very small. Here, superscript (i) refers to the ith observation out of n observations, and a bar superimposed on a variable indicates the mean value of n observations. The \(cr\) has the range [-1, 1], its magnitude indicate the strength and sign of the direction of the linear dependence between the two variables [24]. The -ve sign means that variables \(\xi_{1}\) and \(\xi_{2 }\) have opposite effects.

To investigate effects of the main and the cross-interactions between process parameters on MPSs, we use ANOVA by considering a complete polynomial degree of 2 given by Eq. (6) to fit the computed data to the MPSs.

$$y_{{{\text{model}}}} = b_{0} + \mathop \sum \limits_{i = 1}^{14} b_{i} u_{i}$$
(6)

In Eq. (6), \(y_{{{\text{model}}}}\) represents the normalized fit to the MPSs, \(u = \left\{ {P,Q,I,d_{y} ,PQ,PI,Pd_{y} ,QI,Qd_{y} ,Id_{y} ,P^{2} ,Q^{2} ,I^{2} ,d_{y}^{2} } \right\}\) and the vector b represents the sensitivity coefficients that quantify the effect of an element of u on the output [24]. To delineate the importance of the parameter \(u_{{i_{0} }}\) in the array \(u\), we define a new model

$$\tilde{y}_{{{\text{model,}}i_{0} }} = b_{0} + \mathop \sum \limits_{{i = 1,i \ne i_{0} }}^{14} b_{i} u_{i}$$
(7)

that omits the term \(u_{{i_{0} }}\) from the sum in Eq. (6). The sum of squares (SS) associated with \(u_{{i_{0} }}\) is given by

$$SS_{i0} = \mathop \sum \limits_{i = 1}^{N} \left( {y_{{{\text{model}}}}^{\left( i \right)} - \overline{y}} \right) ^{2} - \mathop \sum \limits_{i = 1}^{N} \left( {\tilde{y}_{{{\text{model, }}i_{0} }}^{\left( i \right)} - \overline{y}} \right)^{2}$$
(8)

Here, \(N\) equals the number of samples and \(\overline{y}\) the mean of the vector \(y\). The mean squares are defined as \(MS_{{i_{0} }} = SS_{{i_{0} }} /DF_{{i_{0} }}\), where \(DF_{{i_{0} }}\) is the degree of freedom of the parameter \({ }u_{i0}\). The value of \(MS_{{i_{0} }}\) is used to test the null hypothesis by calculating the F–ratio defined as \(F_{{i_{0} }} = MS_{{i_{0} }} /MS_{E}\), where \(MS_{E}\) is the mean squares associated with the residual error. If \(F_{{i_{0} }}\) is less than the standard value of its F – distribution, then the parameter \(u_{{i_{0} }}\) is significant. The significance of terms in Eq. (6) is calculated by using the null hypothesis with 0.5% rejection, i.e., if the p-value (Probability > F) for \(b_{i}\) is less than 0.005, then \(u_{i}\) will be significant [25] in evaluating \(y_{{{\text{model}}}}\).

2.3.3 Finding the response functions, i.e., expressions for MPSs in terms of significant process parameters

The response functions or equivalently expressions for the MPSs in terms of significant process parameters are found by performing numerical experiments by using the full factorial approach. For the number of significant processing parameters = a and b levels for each parameter, ba simulations are conducted. The coefficients of the response functions in Eq. (6) are estimated by using the linear regression analysis, and finding R2 where

$$R^{2} = \frac{{\mathop \sum \nolimits_{i = 1}^{N} \left( {y_{{{\text{model}}}}^{\left( i \right)} - \overline{y}} \right)^{2} }}{{\mathop \sum \nolimits_{i = 1}^{N} \left( {y^{\left( i \right)} - \overline{y}} \right)^{2} }}$$
(9)

The value of R2 close to 1 means that the model accurately captures the variability of the MPSs with the change in process parameters.

We note that Batra and Taetragool [26] used the response surface methodology and the regression analysis to relate MPSs to the significant input parameters.

2.3.4 Solution of nonlinear algebraic equations using the genetic algorithm

The GA explained in [27] is used to solve, within a prescribed error, the nonlinear Eq. (6)for the significant input parameters for desired values of the MPSs. We use the ‘ga’ toolbox in MATLAB with default values of parameters to minimize the Error defined by

$${\text{Error = }}\sqrt {\left( {T_{{{\text{des}}}} - T\left( {I,P,Q} \right)} \right)^{2} + \left( {v_{{{\text{des}}}} - v\left( {I,P,Q} \right)} \right)^{2} }$$
(10)

where the subscript ‘des’ represents the desired value of the variable, and \(P\), \(Q\) and \(I\), respectively, denote the Ar flow rate, the H2 flow rate, and the current. We accept the solution that reduces the normalized error to less than 10–6.

2.4 Development of adaptive controller

The objective is to develop an adaptive controller for the APSP to maintain MPSs within the prescribed range when the average powder injection velocity and the arc voltage change. The design criterion is to attain the desired MPSs in less than 50 ms for \(20 {\text{slm}} \le P \le 60 {\text{slm}},\) \(0 \le Q \le 20 {\text{slm}},\) and \(300 A \le I \le 600 A.\)

Developing the adaptive controller involves the following five steps: a mathematical model, the system identification, controller design, implementation, and testing. These are briefly explained below.

2.4.1 Approximate mathematical model for the MPSs

We find below a relation between the inputs and the outputs by linearizing the nonlinear dynamics of particles’ states around a known steady-state solution called an equilibrium point. Recall that a particle’s temperature is found by assuming it as a rigid sphere [3], and its motion in the plasma is affected by only the drag force exerted on it by the plasma. The particle’s acceleration, governed by Newton’s second law of motion, equals the drag force divided by its mass. That is,

$$\frac{{d{\varvec{U}}_{p} }}{dt} = \frac{3}{8}\frac{\rho }{{\rho_{p} }}\frac{{C_{D} }}{{r_{p} }}\left| {{\varvec{U}}_{rel} } \right|{\varvec{U}}_{rel}$$
(11)

where \({\varvec{U}}_{p} = \left\{ {\begin{array}{*{20}c} {u_{p} } & {v_{p} } & {w_{p} } \\ \end{array} } \right\}^{T}\) is the particle velocity vector, \({ }{\varvec{U}}_{f}\) the plasma velocity, \(\rho\) means mass density of the plasma, \(\rho_{p}\) the particle mass density, rp the particle radius, \({\varvec{U}}_{rel}\) the velocity of the particle relative to that of the plasma, \({ }{\varvec{U}}_{rel} = {\varvec{U}}_{f} - {\varvec{U}}_{p}\), and \({ }C_{D}\) the drag coefficient.

The heating of a particle is governed by

$$V_{p} \rho_{p} c_{p} \frac{{dT_{p} }}{dt} = A_{p} h\left( {T_{f} - T_{p} } \right)$$
(12)

where \(V_{p}\) is the particle volume, \(T_{f}\) the plasma temperature, \(T_{p}\) the particle temperature, \(c_{p}\) the specific heat capacity, \(A_{p}\) the surface area of the particle, and \(h\) the heat transfer coefficient. Using \(A_{p} = 4\pi r^{2}\) and \(V_{p} = \frac{4}{3}\pi r^{3 }\)(r equals the particle radius) in Eqs. 11 and 12, the particle acceleration in the axial (y-) direction and its temperature are given by

$$\frac{{dv_{p} \left( t \right)}}{dt} = \left( {\frac{3}{8}\frac{\rho }{{\rho_{p} }}\frac{{C_{D} }}{{r_{p} }}\left| {\varvec{U}_{rel} } \right|} \right)( - v_{p} \left( t \right) + v_{f} \left( t \right))$$
(13)
$$\frac{{dT_{p} \left( t \right)}}{dt} = \left( {\frac{3h}{{\rho_{p} r_{p} C_{p} }}} \right)\left( { - T_{p} \left( t \right) + T_{f} \left( t \right)} \right)$$
(14)

where \(v_{p} \left( t \right)\) and \(v_{f} \left( t \right)\) are, respectively, components of \({\varvec{U}}_{p} \left( t \right)\) and \({\varvec{U}}_{f} \left( t \right)\) in the y-direction. Equations 13 and 14 are first-order nonlinear ordinary differential equations with \(v_{f}\) and \(T_{f}\) as excitations.

To develop an approximate model for the MPSs as a function of the Ar and the H2 flow rates and the current I, we assume the following affine relations:

$$\begin{array}{*{20}c} {v_{f} \left( t \right) = c_{0,v} + c_{1,v} P\left( t \right) + c_{2,v} Q\left( t \right) + c_{3,v} I\left( t \right)} \\ {T_{f} \left( t \right) = c_{0,T} + c_{1,T} P\left( t \right) + c_{2,T} Q\left( t \right) + c_{3,T} I\left( t \right)} \\ \end{array}$$
(15)

where \(c_{0,v} , \ldots ,c_{3,v}\) and \(c_{0,T} , \ldots ,c_{3,T}\) are constants.

Substitution from Eq. 15 into Eqs. (13) and (14) gives

$$\begin{gathered} \frac{dv\left( t \right)}{{dt}} = \left( {\frac{3}{8}\frac{\rho }{{\rho_{p} }}\frac{{C_{D} }}{{r_{p} }}\left| {\varvec{U}_{rel}^{s} } \right|} \right)\left( { - v\left( t \right) + \left( {c_{1,v} P\left( t \right) + c_{2,v} Q\left( t \right) + c_{3,v} I\left( t \right) + c_{0,v} } \right)} \right) \hfill \\ \frac{dT\left( t \right)}{{dt}} = \left( {\frac{3h}{{\rho_{p} r_{p} C_{p} }}} \right)\left( { - T\left( t \right) + \left( {c_{1,T} P\left( t \right) + c_{2,T} Q\left( t \right) + c_{3,T} I\left( t \right) + c_{0,T} } \right)} \right) \hfill \\ \end{gathered}$$
(16)

Here, \(\left| {{\varvec{U}}_{rel}^{s} } \right|\) equals its value in the steady-state configuration around which the equations are linearized. Neglecting the bias terms \(c_{0,v}\) and \(c_{0,T}\) in Eq. (16) results in the following multi-input multi-output (MIMO; 3 inputs and 2 outputs) state-space (SS) model for the MPSs.

$$\begin{array}{*{20}c} {\dot{v}\left( t \right) = a_{v} v\left( t \right) + b_{11} P\left( t \right) + b_{12} Q\left( t \right) + b_{13} I\left( t \right),} & {v\left( 0 \right) = v_{0} } \\ {\dot{T}\left( t \right) = a_{T} v\left( t \right) + b_{21} P\left( t \right) + b_{22} Q\left( t \right) + b_{23} I\left( t \right),} & {T\left( 0 \right) = T_{0} } \\ \end{array}$$
(17)

Values of constants \(a_{v} ,a_{T} ,b_{11} ,...,b_{23}\) in Eq. 17 depend on the equilibrium point, value of \(\left| {{\varvec{U}}_{rel}^{s} } \right|\) at the equilibrium point, and are estimated using the input–output data.

We will verify in Results section that Eq. 17 well represents deviations from the equilibrium point of the MPSs.

2.4.2 System identification

For estimating constants in Eq. 17, we use the following sinusoidal variations in the input variable u = P, Q or I:

$$u\left( t \right) = \left\{ {\begin{array}{*{20}c} {u_{b} ,} & {t \le 10 ms} \\ {\begin{array}{*{20}c} {u_{b} + u_{a1} \sin \left( {\omega_{1} \left( {t - 10} \right)} \right) + u_{a2} \sin \left( {\omega_{2} \left( {t - 10} \right)} \right) + u_{a3} \sin \left( {\omega_{3} \left( {t - 10} \right)} \right)} \\ { + u_{a4} \sin \left( {\omega_{4} \left( {t - 10} \right)} \right) + u_{a5} \sin \left( {\omega_{5} \left( {t - 10} \right)} \right)} \\ \end{array} } & {t > 10 ms} \\ \end{array} } \right.$$
(18)

where \({ }u_{b}\) is the base value, \(u_{a1} , u_{a2} , u_{a3} , u_{a4},\) and \(u_{a5}\) are amplitudes of perturbations; \(\omega_{1} ,\omega_{2} ,\omega_{3} ,\omega_{4},\) and \(\omega_{5}\) are frequencies, and \(t\) is the time in ms. According to [28], the input variations given by Eq. 18 are sufficiently rich as they contain enough frequencies of excitation. Values of the 11 variables \(\left( {u_{b} ,u_{a1} ,u_{a2} , \ldots ,u_{a5} ,\omega_{1} ,\omega_{2} , \ldots \omega_{5} } \right)\) are chosen using the Latin Hypercube sampling approach based on the normal distributions with the mean (\(\mu\)) and the standard deviation (\(\sigma\)). The corresponding MPSs are calculated in the observation window at a sampling time of 0.01 ms. The values of parameters in Eq. 17 are estimated by using the simulated (with LAVA-P) input–output data and the MATLAB toolbox ‘ident’ lucidly explained by Ljung [29] the prediction error method (PEM) framework, and the MATLAB function ‘ssest’ with the order of the system = 1, input delay = 0, form = canonical, feed through = 0, disturbance model = none, initial states = 0, and the weighting scheme for singular value decomposition = the canonical variable algorithm. The entire input-MPS data of each sample are first processed by subtracting from it the mean value. Next, the output data are smoothened by using a moving average of 100 data points to reduce noise in it. The resulting input–output data are divided into two equal parts; the first part is used for estimation of parameter values and the second part for validation. The quality of model prediction is measured by the comparison index, ‘Fit,’ defined as

$${\text{Fit}} = 100\left( {1 - \frac{{\left\| {y - \hat{y}} \right\|}}{{\left\| {y - \bar{y}} \right\|}}} \right)$$
(19)

where \(\hat{y}\) is the predicted output for the input \(y\), \(\overline{y}\) is the mean of the output, and \(\left\| \cdot \right\|\) indicates the L2 norm (or the length) of a vector.

2.4.3 Controller design

The linearized MIMO SS model, Eq. 17, for the MPSs around an equilibrium point is rewritten as

$$\begin{array}{*{20}c} \begin{gathered} \hfill \\ \underbrace {{\left\{ {\begin{array}{*{20}c} {\dot{v}\left( t \right)} \\ {\dot{T}\left( t \right)} \\ \end{array} } \right\}}}_{{ = \dot{y}\left( t \right)}} = \underbrace {{\left[ {\begin{array}{*{20}c} {a_{v} } & 0 \\ 0 & {a_{T} } \\ \end{array} } \right]}}_{ = A}\underbrace {{\left\{ {\begin{array}{*{20}c} {v\left( t \right)} \\ {T\left( t \right)} \\ \end{array} } \right\}}}_{ = y\left( t \right)} + \underbrace {{\left[ {\begin{array}{*{20}c} {\begin{array}{*{20}c} {b_{11} } & {b_{12} } & {b_{13} } \\ \end{array} } \\ {\begin{array}{*{20}c} {b_{21} } & {b_{22} } & {b_{23} } \\ \end{array} } \\ \end{array} } \right]}}_{ = B}\underbrace {{\left\{ {\begin{array}{*{20}c} {P\left( t \right)} \\ {Q\left( t \right)} \\ {I\left( t \right)} \\ \end{array} } \right\}}}_{ = u\left( t \right)}, \hfill \\ \end{gathered} & {\left\{ {\begin{array}{*{20}c} {v\left( 0 \right)} \\ {T\left( 0 \right)} \\ \end{array} } \right\} = \left\{ {\begin{array}{*{20}c} {v_{0} } \\ {T_{0} } \\ \end{array} } \right\} } \\ \end{array}$$
(20)

Here, \(y\left( t \right) = \left\{ {v\left( t \right),T\left( t \right)} \right\}^{T}\) is the output vector, \(u\left( t \right) = \left\{ {P\left( t \right),Q\left( t \right),I\left( t \right)} \right\}^{T}\) the input vector, and matrices ‘A’ and ‘B’ depend on the equilibrium point (i.e., the operating point). We assume that matrix A is Herwitz and the plant is controllable, i.e., for any desired output \(y_{des}\), there exists a sequence of inputs \(u\left( 0 \right), u\left( 1 \right), \ldots , u\left( k \right)\) such that \(y\left( k \right) = y_{des}\) within an acceptable tolerance. The model reference adaptive control (MRAC) algorithm involves two loops—the inner loop consisting of a feedback and the outer loop of an adaptive mechanism for the controller as shown in Fig. 2. Based on Eq. 20, we choose the following reference model for updating the controller gains

$$\underbrace {{\left\{ {\begin{array}{*{20}c} {\dot{v}_{m} \left( t \right)} \\ {\dot{T}_{m} \left( t \right)} \\ \end{array} } \right\}}}_{{ = \dot{y}_{m} \left( t \right)}} = \underbrace {{\left[ {\begin{array}{*{20}c} {a_{mv} } & 0 \\ 0 & {a_{mT} } \\ \end{array} } \right]}}_{{ = A_{m} }}\underbrace {{\left\{ {\begin{array}{*{20}c} {v_{m} \left( t \right)} \\ {T_{m} \left( t \right)} \\ \end{array} } \right\}}}_{{ = y_{m} \left( t \right)}} + \underbrace {{\left[ {\begin{array}{*{20}c} {\begin{array}{*{20}c} { - a_{mv} } & 0 & { - a_{mv} } \\ \end{array} } \\ {\begin{array}{*{20}c} 0 & { - a_{mT} } & { - a_{mT} } \\ \end{array} } \\ \end{array} } \right]}}_{{ = B_{m} }}\underbrace {{\left\{ {\begin{array}{*{20}c} {v_{des} \left( t \right)} \\ {T_{des} \left( t \right)} \\ 0 \\ \end{array} } \right\}}}_{ = r\left( t \right)},\left\{ {\begin{array}{*{20}c} {v_{m} \left( 0 \right)} \\ {T_{m} \left( 0 \right)} \\ \end{array} } \right\} = \left\{ {\begin{array}{*{20}c} {v_{0} } \\ {T_{0} } \\ \end{array} } \right\}$$
(21)
Fig. 2
figure 2

Schematic of the model reference adaptive controller (MRAC)

Using MPSs at the instant of a perturbation initiation as the initial conditions, the outputs \(v_{m}\) and \(T_{m}\) of the reference model asymptotically converge, respectively, to the desired outputs \(v_{des}\) and \(T_{des}\) with the rate of convergence depending on the parameters \(a_{mv}\) and \(a_{mT}\). In order for the MPSs \(v\left( t \right)\,{\text{and }}T\left( t \right)\) from LAVA-P to asymptotically track the reference outputs \(v_{m} \left( t \right)\,{\text{and }}T_{m} \left( t \right)\), we consider the following control law:

$$\left\{ {\begin{array}{*{20}c} {P\left( t \right)} \\ {Q\left( t \right)} \\ {I\left( t \right)} \\ \end{array} } \right\} = - \underbrace {{\left[ {\begin{array}{*{20}c} {K_{11} \left( t \right)} & {K_{12} \left( t \right)} \\ {K_{21} \left( t \right)} & {K_{22} \left( t \right)} \\ {K_{31} \left( t \right)} & {K_{32} \left( t \right)} \\ \end{array} } \right]}}_{ = K\left( t \right)}\left\{ {\begin{array}{*{20}c} {v\left( t \right)} \\ {T\left( t \right)} \\ \end{array} } \right\} + \underbrace {{\left[ {\begin{array}{*{20}c} {L_{11} \left( t \right)} & {L_{12} \left( t \right)} & {L_{13} \left( t \right)} \\ {L_{21} \left( t \right)} & {L_{22} \left( t \right)} & {L_{23} \left( t \right)} \\ {L_{31} \left( t \right)} & {L_{32} \left( t \right)} & {L_{33} \left( t \right)} \\ \end{array} } \right]}}_{ = L\left( t \right)} \left\{ {\begin{array}{*{20}c} {v_{des} \left( t \right)} \\ {T_{des} \left( t \right)} \\ 0 \\ \end{array} } \right\}$$
(22)

The objective is to design an adaptive law that guarantees (a) the stability of the control system (controller + process dynamics), and (b) the MPS \(y\left( t \right)\) tracks \(y_{m} \left( t \right)\) within a small bound for all finite inputs \(u\left( t \right)\). The theory for designing the adaptive controller is given in the supporting information. As explained there, for positive definite matrices Λ and P, we find gain matrices \(K\left( t \right)\) and \(L\left( t \right)\) by using the following adaptive law: 

$$\begin{array}{*{20}c} {\begin{array}{*{20}c} {\dot{K}\left( t \right) = \Lambda B_{m}^{T} P e\left( t \right)y\left( t \right)^{T} ,} & {K\left( 0 \right) = K_{0} } & {} \\ \end{array} } \\ {\begin{array}{*{20}c} {\dot{L}\left( t \right) = - \Lambda B_{m}^{T} P e\left( t \right)r\left( t \right)^{T},} & {L\left( 0 \right) = L_{0} } & {} \\ \end{array} } \\ \end{array}$$
(23)

2.4.4 Implementation

By assuming that the LAVA-P represents an actual plant, we discuss implementation of the adaptive controller. We assume that the MPSs reach their desired values in 50 ms, and set

$$\begin{array}{*{20}c} {A_{m} = \left[ {\begin{array}{*{20}c} { - 0.5} & 0 \\ 0 & { - 0.5} \\ \end{array} } \right];} & {B_{m} = \left[ {\begin{array}{*{20}c} {0.5} & 0 & {0.5} \\ 0 & {0.5} & {0.5} \\ \end{array} } \right]} \\ \end{array}$$

for the reference model. For the tracking error to be asymptotically stable, there should exist a positive definite and symmetric matrix \(R\) such that the time derivative of the Lyapunov function (refer to the supporting material), \(\dot{V} = - e^{T} Re \le 0\) [28]. A different choice of \(R\) affects the transient response but not the boundedness and the asymptotic convergence of the error. We choose

$$R = I_{2 \times 2} { },{ }P = I_{2 \times 2} ,K_{0} = 0 {\text{ and }} L_{0} = u_{sol} r_{0}^{ - 1}$$
(24)

where \(u_{sol} = \left[ {\begin{array}{*{20}c} {P_{sol} } & {Q_{sol} } & {I_{sol} } \\ \end{array} } \right]^{T}\) is the optimal solution obtained from the GA for the desired output \(r_{0} = \left[ {\begin{array}{*{20}c} {v_{des} \left( 0 \right)} & {T_{des} \left( 0 \right)} & 0 \\ \end{array} } \right]^{T}\) at \(t = 0.\) For example, for \(r_{0} = \left[ {\begin{array}{*{20}c} {90} & {2850} & 0 \\ \end{array} } \right]^{T}\), \(u_{sol} = \left[ {\begin{array}{*{20}c} {35.0} & {8.93} & {408} \\ \end{array} } \right]^{T}\), the initial gains from Eq. 24 are

$$\begin{array}{*{20}c} {K_{0} = \left[ {\begin{array}{*{20}c} 0 & 0 \\ 0 & 0 \\ 0 & 0 \\ \end{array} } \right];} & {L_{0} = \left[ {\begin{array}{*{20}c} {0.0004} & {0.0123} & 0 \\ {0.0001} & {0.0031} & 0 \\ {0.0045} & {0.1430} & 0 \\ \end{array} } \right]} \\ \end{array}$$
(25)

The next step is to choose an appropriate adaptive gain matrix \(\Lambda\) for the APSP. The theorem presented in the supporting material only requires that \(\Lambda\) be positive definite. Lacking any systematic way to find \(\Lambda ,\) the following form is found by trial and error:

$$\Lambda = \left[ {\begin{array}{*{20}c} {\gamma_{1} \times 10^{ - 8} } & 0 & 0 \\ 0 & {\gamma_{2} \times 10^{ - 10} } & 0 \\ 0 & 0 & {\gamma_{3} \times 10^{ - 9} } \\ \end{array} } \right]$$
(26)

where \(\gamma_{1} , \gamma_{2},\) and \(\gamma_{3}\) are tuning parameters for P, Q, and I, respectively. By tuning these parameters, one can adjust the MPSs in real-time remembering that a large value of \(\gamma\) can make the MRAC unstable.

Figure 3 shows the proposed intelligent adaptive process control scheme for the APSP to get consistent MPSs. At the start of the process, values of P, Q, and I are predicted using the response function, the desired values of MPSs, and the GA. These are used to find initial estimates of the controller gains from Eq. 24 which are then used to calculate inputs from Eq. 22 to be used in LAVA-P. During the spray process, the MPSs are measured in the observation window from LAVA-P at every sampling time, and the inputs are adaptively varied by the MRAC that updates the gains to minimize the tracking error using Eqs. 21 and 23 and achieve desired MPSs. The controller stops the process (or the plant) if any of the inputs reach their limiting values.

Fig. 3
figure 3

Schematic of the proposed adaptive control scheme for an APSP

2.4.5 Testing

The proposed adaptive control scheme is tested with software LAVA-P for disturbances introduced either in the average injection velocity or in the arc voltage.

3 Results and discussion

3.1 Validation of the software

3.1.1 Plasma flow

The Ar plasma jet profile computed using LAVA-P and the Miller SG-100 plasma gun is compared with Williamson et al.’s [30] experimental findings by using their values of the operating parameters. That is, current = 900 A, voltage = 15.4 V, gun efficiency = 70%, Ar flow rate = 35.4 slm, nozzle inner diameter = 8 mm, and nozzle outer diameter = 66.6 mm. Values of \(T_{0}\) and \(V_{0}\) in Eq. 1 are estimated, respectively, as 11,000 K and 1,100 m/s. Converged values of \(T_{0} , V_{0} , \kappa , n_{T},\) and \(n_{v}\) that satisfy the balance of mass and power are, respectively, found to be 12,913 K, 1,092 m/s, 0.00015, 2.3, and 1.4.

The computed and the experimental distributions of the steady-state plasma velocity and temperature along the jet axis (x = 0) and on the radial line y = 2 cm are compared in Fig. 4. With time t = 0, when the plasma jet exits the nozzle, the plasma was found to reach a steady state at 4 ms with at most 1% error (pointwise) in the axial velocity and the temperature in the computational domain.

Fig. 4
figure 4

Comparison between the simulated and the experimental results of Williamson et al. [30]: a plasma axial velocity (e2 = 14.82%) and plasma temperature (e2 = 5.59%) distributions along the jet (y-) axis, b plasma axial velocity (e2 = 5.24%) and temperature (e2 = 11.9%) versus the distance from the jet axis on the radial line y = 2 cm. The decaying trends along and perpendicular to the jet axis of the computed and the experimental temperatures and the axial velocities agree qualitatively and quantitatively

3.1.2 Particles’ axial velocity and temperature

Powder particles are injected one at a time into the plasma through the powder port located at the point (x = 8 mm, y = 6 mm) at t = 5 ms, and their trajectories till t = 10 ms are recorded. The computed average values of particles’ axial velocity and temperature in the 1 cm wide window (9.5 \(\le y \le\) 10.5 cm, shown in Fig. s1 of the supporting information) at t = 9.1, 9.2 …, 9.9, 10 ms are compared in Fig. 5 with their experimental values of Smith et al. [31]. Smith et al. [31] used a two-color pyrometer, IPP2000, and a spray pattern trajectory (SPT) sensor to measure, respectively, the average temperature and the axial velocity of particles flowing through the observation window. They emphasized that the SPT sensor was focused on a narrow zone near the plasma jet axis but did not list coordinates of the sensor location. To compare the computed results with the experimental findings of Smith et al., they are divided into three groups based on their diameters in the ranges 30–42 µm, 56–71 µm, and 85–100 µm. The variations with the axial distance y from the nozzle of the average axial velocity and the average temperature of particles at time t = 10 ms are shown in Fig. 5a, b. The computed particle characteristics of small particles are close to those measured experimentally. However, computed results for the medium and the large size particles differ from the corresponding experimental findings. At some axial locations, the difference in the mean axial velocities of particles in each of the two groups is about 50%. The small-sized particles have higher axial velocity because they are easily accelerated by the plasma jet. The results depicted in Fig. 5b reveal that the computed average temperature of particles agrees well with that measured experimentally. The temperatures of the small-size particles are higher than that of large particles due to their in-flight motion near the hotter jet axis. The smaller size particles have melted by the time they go out of the observation window and arrive at the substrate. By observing the plot (not included here) between temperature vs size of injected particles, we note that the temperature of the medium-size particles (45–65 μm) stays close to the melting point (2,950 K) during their in-flight path. Many of the large particles are only partially melted or even not melted at all. Recalling that the heating model (cf. Equation 12) regards a particle as a point mass, a large particle requires more time to be heated to the melting temperature. Larger particles have low axial velocity resulting in more residence time in the plasma jet which helps in their being heated up. Also, some large particles travel farther away from the jet axis where the plasma temperature is not very high and hence are either partially melted or not melted at all depending upon their locations in the plasma jet.

Fig. 5
figure 5

For particles divided in three groups of different sizes, comparison of the computed and the experimental results for a the axial velocity and b the temperature along the axial distance. Solid lines represent mean values of particles’ axial velocity and surface temperature. ZrO2 particles of random sizes between 5 and 130 μm are injected into the plasma at t = 5 ms to achieve a mass rate of 20 g/min. The particle size distribution and the location of the observation window are exhibited in Fig. s1 of the supplement material

3.2 Input parameters that significantly influence the MPSs

Keeping the applied voltage, the average powder injection speed and the particle size fixed at 50 V, 10 m/s, and 30–100 μm, respectively, we present results of screening the seven process parameters, namely the current, the Ar flow rate, the H2 flow rate, the powder feed rate, the spray distance, and the injector location (y, x) along and perpendicular to the jet axis. Their minimum and maximum values considered are: current (A) 300, 600; H2 flow rate (slm) 2, 12; Ar flow rate (slm) 30, 60; powder feed rate (g/min) 10, 40; stand-off distance (cm) 7.5, 12.5; y-location of the injector (cm) 0.4, 1.0, and x-location of the injector (cm) 0.6, 1.0.

3.2.1 Screening using elementary effects

We choose r = 8 in Eq. (4) and investigate the influence of the seven parameters for p = 12 and p = 20 resulting in \(8 \times \left( {7 + 1} \right) = 64\) simulations needed for this study. The mean and the standard deviations of EEs of the MPSs are depicted in Fig. 6. The results associated with p = 12 and p = 20 are qualitatively similar. The stand-off distance, the powder feed rate, and the x-location of the injector are the least significant parameters since their mean EEs have low values. The y-location of the injector, the current, and the Ar flow rate have nonlinear effects and/or interactions among them as signified by high values of the mean and the standard deviation for them. The H2 flow rate has the least effect on the mean axial velocity but a strong effect on the mean temperature. Accordingly, the Ar flow rate, the current, the y-location of the injector, and the H2 flow rate are considered as significant process parameters for developing the response functions.

Fig. 6
figure 6

The standard deviation vs. the mean of elementary effect for normalized a mean axial velocity and b mean temperature (P = Ar flow rate, Q = H2 flow rate, I = Current, SD = Stand-off distance, PFR = Powder feed rate, dy = y- location of the injector, and dx = x-location of the injector). High values of EEs for I, P, Q, and dy signify that they are significant parameters

3.2.2 Screening using ANOVA

The maximum and the minimum values of the process parameters and the MPSs used for the ANOVA are: current (A) 350, 550; H2 flow rate (slm) 2, 10; Ar flow rate (slm) 35, 55; y-location of the injector (cm) 0.4, 1.0; maximum axial velocity (m/s) 69, 137; mean temperature (K) 1,638, 3,103. The results of the ANOVA test for the MPSs are given in Table 1. Based on the null hypothesis, we find that all process parameters in Eq. 6 for both MPSs are significant since their p-values are almost zero. Even though the p-value for the interaction between Q and dy is greater than 0.005, those for Q and dy are less than 0.005.

Table 1 ANOVA results for the quadratic fit of the mean axial velocity and the mean temperature

From results of the ANOVA and the EEs, and for illustrating the development of the controller, we henceforth take the Ar flow rate, the current, the y-location of the injector, and the H2 flow rate as significant process parameters for developing the response functions. Values of the probability are indicated in bold font to easily decide which parameters are significant.

3.3 Response functions for the mean particles’ states

We now present results for the response functions for the MPSs from the numerical experiments designed by using the full factorial approach for the 4 significant process parameters and 5 levels for each parameter that require \(5^{4} = 625\) simulations. The five values of the four parameters are: 350, 400, 450, 500, and 550 A for the current; 35, 40, 45, 50, and 55 slm for the Ar flow rate; 2, 4, 6, 8, and 10 slm for the H2 flow rate; and \(d_{y}\) = 4, 5.5, 7, 8.5, and 10 mm for the powder injection point located at \(d_{x}\) = 0.8 cm. The arc voltage, the average particles’ injection velocity, the powder feed rate, and the powder particle size, respectively, are kept fixed at 50 V, 10 m/s, 20 g/min, and 30 – 100 μm. The MPSs are calculated for the observation window of 9.5 \(\le y \le\) 10.5 cm.

Values of \(cr\) (computed using the definition in Eq. 5) providing the correlation among all parameters (process parameters and MPSs) are listed in Table 2. The correlations between the process parameters are indeed zero; hence, they are independent of each other. Thus, the corresponding MPSs are statistically significant. The correlation coefficients suggest that the dependence of the MPSs upon the Ar flow rate is strong. The dependence of the mean axial velocity upon  the current is minimal. The correlation between the mean temperature and the Ar flow rate is negative, which implies that there exists an inverse dependence between them. There is also inverse dependence between the MPSs and the injector location along the y-axis. The correlation coefficient between the mean axial velocity and the mean temperature is -0.07, which implies that the mean axial velocity does not depend upon the mean temperature.

Table 2 Correlation coefficients between the process parameters and the MPSs (Symbols \(P, Q, I,\) and \(d_{y}\) are defined in Fig. 6)

3.3.1 Response functions

The coefficients of the quadratic expression in Eq. 6 are estimated by using the linear regression analysis on the data from the full factorial approach (625 simulations) resulting in the following response functions for the MPSs.

$$\begin{gathered} v_{n,\bmod el} = 0.248 + 0.476P_{n} + 0.105Q_{n} + 0.308I_{n} - 0.276d_{y,n} - 0.040P_{n} Q_{n} + 0.047P_{n} I_{n} - 0.034P_{n} d_{y,n} \hfill \\ \quad \quad \quad + 0.091Q_{n} I_{n} - 0.013I_{n} d_{y,n} - 0.078P_{n}^{2} - 0.061Q_{n}^{2} - 0.097I_{n}^{2} + 0.048d_{y,n}^{2} ; R^{2} = 1 \hfill \\ \end{gathered}$$
(27)
$$\begin{gathered} T_{n,\bmod el} = 0.651 - 0.323P_{n} + 0.331Q_{n} + 0.298I_{n} - 0.127d_{y,n} + 0.122P_{n} Q_{n} + 0.152P_{n} I_{n} - 0.106P_{n} d_{y,n} - 0.108Q_{n} I_{n} \hfill \\ \quad \quad \quad - 0.017Q_{n} d_{y,n} + 0.139I_{n} d_{y,n} - 0.044P_{n}^{2} - 0.162Q_{n}^{2} - 0.126I_{n}^{2} - 0.044d_{y,n}^{2} ; R^{2} = 0.98 \hfill \\ \end{gathered}$$
(28)

Here, subscript ‘n’ represents the normalized parameter with values between 0 and 1. The R2 values of 1 and 0.98, respectively, for the mean axial velocity and the mean temperature imply that the postulated expression in Eq. 6 is a good representation of the numerical data. The validity of the response functions in Eqs. 27 and 28 is tested for a new set of process parameters, and the corresponding results are listed in Table s1 of the supporting information. For these cases, the percentage error is less than 2%.

3.4 Values of process parameters for desired MPSs obtained by solving Eqs. 27 and 28

The solutions for arbitrarily selected values for the desired MPSs computed by minimizing the error defined in Eq. 10 using the GA are summarized in Table 3. For a given gas gun, the powder inject port location is fixed. Hence, dy cannot be changed and we work with three significant input process parameters, namely the current, the Ar flow rate, and the H2 flow rate. Recalling that the GA solution depends upon the seed number, results for the first seed number are provided in Table 3 and those for the second set of seed numbers in the supporting information. Results from the two sets of seed numbers are similar to each other.

Table 3 For desired MPSs values of the three process parameters found from the response functions using the GA with the first set of seed numbers, and comparison of desired MPSs with those found using LAVA-P with the GA provided values of the process parameters

It is clear that the GA values of the three process parameters provide MPSs that differ by less than 4.5% from their desired values that occurs for the desired mean axial velocity = 100 m/s and the desired mean temperature = 3,100 K. We emphasize that for accurately predicting values of the three process parameters, the desired values of the MPSs should be in the range used to generate the response functions given by Eqs. 27 and 28. The desired mean particles’ velocity of 3,100 m/s is outside the range employed to develop Eqs. 27 and 28.

3.5 Effect of disturbance in process parameters on mean particles’ states

Even though there are several disturbance parameters, we consider here only the powder injection velocity and the arc voltage. Their time variations and the resulting computed MPSs are exhibited in Fig. 7. Changes in the arc voltage affect the power input into the nozzle that influences values of \(v_{0}\) and \(T_{0}\) in Eq. 1. Values of the other process parameters are: current = 500 A, Ar flow rate = 40 slm, H2 flow rate = 10 slm, powder feed rate = 20 g/min, powder diameter range = 30–100 μm, and the simulation sampling time = 0.01 ms. Even though the computed MPSs are oscillatory, the trends exhibited by their values averaged over 100 trailing points are as follows: They follow in the direction of the disturbance in the powder injection velocity but in the opposite direction of the disturbance in the arc voltage.

Fig. 7
figure 7

Effect on the MPSs of a step variation in the a average injection velocity of powder particles, and b arc voltage. The variations in the MPSs qualitatively follow variations in the powder injection velocity and the arc voltage; they decrease with an increase in the powder injection velocity but decrease with a decrease in the arc voltage.

3.6 Validation of three-input two-output model represented by Eq. 17

The 10 randomly generated functions u in Eq. 18 for exciting the Ar flow rate are listed in Table 4, and the corresponding variations of inputs are shown in Fig. 8a for samples 1, 2, and 3. Subsequently, 50 new samples (their input values are omitted here) are randomly generated to verify whether or not the number of samples influences the variance of estimated parameters of the State Space (SS) models. Figure 8b,c shows time histories of the MPSs for the inputs exhibited in Fig. 8a. The predicted values from the MIMO SS model of Eq. 17 are listed in Table 5 for 10 samples. The computed MPSs for the 10 and the 50 samples are similar to each other (results for 50 samples are omitted here). For sample 1, when the data exhibited in Fig. 8b,c are smoothened by taking the moving average of 100 trailing points, we get solid curves displayed in Fig. 8d.

Table 4 Values of variables in Eq. 18 used for exciting the Ar (denoted in the table by P) flow rate
Fig. 8
figure 8

a Variations of the Ar flow rate for samples 1, 2, and 3; b, c corresponding variations of the mean axial velocity and the mean temperature; d, e for inputs of sample 1 listed in Table 4 smoothened mean axial velocity (Fit = 84.5% (85%) for training (validation)), and mean temperature (Fit = 73.6% (74.4%) for training (validation))

Table 5 Parameters for the particles’ states in the MIMO SS model, Eq. 17, using inputs listed in Table 4 and the two tables in the supporting material used for training and validating the models

Similar analyses are conducted for randomly generated vectors for exciting the H2 flow rate and the current. Their plots as well as those of results for the MPSs are provided in the supporting information.

Predictions from models for the MPSs agree well with those found using LAVA-P software with an average fit of 85% for training and 82% for validation for the mean axial velocity, and 72% for training and 66% for validation for the mean temperature.

The parameters for the MPSs estimated using results for the 50 samples, depicted as box plots in Fig. 9, are distributed close to each other with a few outliers enclosed in red circles. Thus, Eq. 17 satisfactorily represents the dynamics of the MPSs for variations in the input variables.

Fig. 9
figure 9

Box plots of values of parameters for the MIMO SS model of the mean particles’ axial velocity and temperature. The closeness of most values of the parameters validates Eq. 17 for modeling the MPSs

3.7 Results for the adaptive controller

Based on the knowledge gained from preliminary results, we select \(\gamma_{1} = 2, \gamma_{2} = 2\) and \(\gamma_{3} = 5\) in Eq. 26 and investigate the performance of the proposed control scheme for the problem presented in subsection 3.5. The objective of the MRAC is to attain the desired mean particles’ axial velocity = 90 m/s and temperature = 2,850 K within 50 ms of the introduction of a disturbance. Results depicted in Fig. 10 confirm that indeed the objective is achieved, and the proposed controller minimizes deviations in the MPSs caused by disturbances.

Fig. 10
figure 10

The closed-loop responses of the MRAC system in the presence of a step disturbance in a the average powder injection velocity, and b the arc voltage

We now check whether the controller works when the desired MPSs vary with time that has applications for producing functionally graded coatings [7]. In this case, the performance of the controller is shown in Figs. 11 and 12 for step variations in \({ }v_{des} \left( t \right){\text{ and }}T_{des} \left( t \right)\), i.e., abrupt disturbances that are kept constant afterwards. It is evident that the MPSs follow outputs of the reference model.

Fig. 11
figure 11

The closed-loop control responses of the MRAC for a increasing desired mean particles’ axial velocity but decreasing mean temperature, and b increasing desired mean particles’ axial velocity and mean particles’ temperature

Fig. 12
figure 12

The closed-loop control responses of the MRAC for a decreasing desired mean particles’ axial velocity and mean particles’ temperature, and b decreasing desired mean particles’ axial velocity but increasing mean particles’  temperature

These two examples establish the effectiveness of the designed process controller in mitigating effects of disturbances. Of course, in practice disturbances are not limited to those stipulated here. Even though the controller will not work for all disturbances, one can use the methodology to design controllers for a pre-specified class of disturbances.

The real-time performance of the proposed controller will depend upon how quickly a motor can change the process input parameters, and the time lag of the plant to respond to these changes.

4 Conclusions

This paper proposes an approach to design an adaptive controller for an atmospheric plasma spray process (APSP) to get consistency in mean particles’ states (the axial velocity and the temperature, MPSs) before they impact the substrate. Throughout this work, the physical tests are replaced by numerical experiments that use the software, LAVA-P, whose predictions are first shown to agree well with the experimentally measured values of particles’ velocity and temperature. From the screening analysis, the argon (Ar) and the hydrogen (H2) flow rates, the current, and the y-location of the injector are identified as significant input parameters for the MPSs. The response functions (i.e., relations between the MPSs and the significant input parameters) are first established as nonlinear algebraic equations between the four significant input parameters and the MPSs. For a given gas gun, the powder injector location is generally fixed. For desired values of the MPSs, the trial input values of Ar and H2 flow rates and the current are predicted by solving these nonlinear algebraic equations using a genetic algorithm (GA) included in MATLAB. Using equations for the evolution of particle’s axial velocity and temperature linearized around steady-state values of these variables, an adaptive controller is designed to modify the trial input values of the three process parameters to obtain desired values of the MPSs in the presence of a noise variable (either a disturbance in the powder injection velocity or in the arc voltage). The performance of the controller has been successfully tested for two example problems.

Additional research is needed to design a robust controller for mitigating effects of all noise variables and either warn the operator or shut down the process when MPSs cannot be controlled. The methodology presented here is applicable to other coating processes and manufacturing processes such as hot forging and machining.