Selected Mathematical Optimization Methods for Solving Problems of Engineering Practice

: Engineering optimization is the subject of interest for many scientific research teams on a global scale; it is a part of today’s mathematical modelling and control of processes and systems. The attention in this article is focused on optimization modelling of technological processes of sur ‐ face treatment. To date, a multitude of articles are devoted to the applications of mathematical op ‐ timization methods to control technological processes, but the situation is different for surface treat ‐ ment processes, especially for anodizing. We perceive their lack more, so this state has stimulated our interest, and the article contributes to filling the gap in scientific research in this area. The article deals with the application of non ‐ linear programming (NLP) methods to optimise the process of anodic oxidation of aluminium using MATLAB toolboxes. The implementation of optimization meth ‐ ods is illustrated by solving a specific problem from engineering practice. The novelty of this article lies in the selection of effective approaches to the statement of optimal process conditions for anodiz ‐ ing. To solve this complex problem, a solving strategy based on the design of experiments approach (for five factors), exploratory data analysis, confirmatory analysis, and optimization modelling is pro ‐ posed. The original results have been obtained through the experiment (performed by using the DOE approach), statistical analysis, and optimization procedure. The main contribution of this study is the developed mathematical ‐ statistical computational (MSC) model predicting the thickness of the result ‐ ing aluminium anodic oxide layer (AOL). Based on the MSC model, the main goal has been achieved— the statement of optimal values of factors acting during the anodizing process to achieve the thickness of the protective layer required by clients, namely, for 5, 7, 10, and 15 [ μ m].


Introduction
Researchers and engineers very often face the challenges of predicting the behaviour of certain systems or processes in order to control them and what it is possible to achieve through mathematical models [1,2] and numerical simulations [3].Although numerical simulations usually provide a good prediction of the behaviour of a certain system and its properties [4], initially, the best choice of many solution alternatives is unknown [5,6].As research activities are aimed at finding an alternative with the best properties, engineers and researchers eventually enter the field of engineering optimization based on a mathematical approach, the field of optimal control [6,7].In engineering practice, it is sometimes common that the optimization goal-mathematically defined by the objective function-can be formulated intuitively when taking into account technical or economic requirements [8,9] and, based on experience, subsequently to achieve a system with better properties [10,11].However, when applying the scientific approach to solve a real engineering optimization problem, one is then confronted with the mathematical formulation of the optimization problem (FOP) [12], with a countless number of optimization methods and algorithms (OM) [13,14], as well as with a wide range of optimization software (OS) [8,15,16].As there is no universal optimization algorithm suitable for solving any optimization problem [17], it is important for engineers, as newcomers in the optimization field, to be able and competent in these three areas of scientific interest (FOP, OM, and OS).Hence, the article contributes to this in Section 2, where we offer a brief description of the mathematical formulation of the optimization problem and a brief summary of optimization methods that appear to be effective in solving some engineering optimization problems (EOP), especially for the EOP set out in Section 4.
To simplify the search for the optimal solution not only for newcomers, researchers are developing optimization frameworks that are appropriate and addressed for solving a specific problem [8].So far, a large number of optimization frameworks or libraries have been published that facilitate the solution of real optimization problems in engineering practice.Each of these frameworks targets a different community, so a wide range of programming languages are used [18,19].As stated in [8], frameworks are programmed in a range from low-level languages such as C and C++, to higher scripting languages such as Python (e.g., OpenMDAO framework), Java (jMetal), and so on.There are numerous engineering optimization problems in which problem specificities such as linearity, convexity, or differentiability of objective functions and constraints are either non-existent, unknown, or un-exploitable; therefore, the scientific community has focused on derivative-free optimization algorithms in the past two decades [20].In [20], the authors review blackbox optimization applications, demonstrate the versatility of the mesh adaptive direct search (MADS) derivative-free optimization algorithm, and highlight the evolution of the NO-MAD software package as a standard tool for blackbox optimization.The MADS algorithm in the original version is part of the official MATLAB distribution.
A large community of researchers, engineers, and doctoral students prefer the programming language MATLAB due to the ease of use of this programming syntax and due to its suitability for research as well as for taking first steps into optimization.MATLAB supports single-objective and multi-objective optimization, including constraints, by its optimization toolboxes [18,19], providing multiple functionalities for optimization purposes.MATLAB lowers the barrier for practical engineering optimization by a high level of usability, thus it is widely used in academia as well as in engineering practice.The implementation of MATLAB toolboxes to solve the real optimization problem is presented in this article.
The rapid development in the field of optimization methods/algorithms and special software in conjunction with the growing computational capabilities of modern computers creates favourable conditions for the application of optimization in a wide range of scientific fields.Using the Web of Science and citations, some authors generate tables, diagrams, and "word cloud" graphs to illustrate a broad variety of fields where optimization algorithms and their implementation have been employed, as can be seen in [20].Note that this selection is far from being exhaustive but highlights different areas of application of optimization methods and algorithms, starting from computer science, chemistry, physics, electrical engineering, mechanical engineering, geoscience and the environment, civil engineering, materials science, etc., to social sciences and biosciences [21][22][23].Indeed, mathematical optimization has become an important tool in a variety of areas.The list of applications is still steadily expanding [24][25][26][27][28][29][30][31][32].Solving real problems is the main motivation for the development, so engineering optimization attract attention considerably of many scientists, research teams, and engineers; it is a part of today's current mathematical modelling and control of processes and systems.Our attention focuses on optimization modelling of technological processes of surface treatment.Nowadays, there are many articles devoted to the applications of mathematical optimization methods to control technological processes, but the situation is different for surface treatment processes, especially for anodizing processes.We perceive their lack more, so this state has stimulated our interest in this research topic.Moreover, our interest is supported by the 25 years of practical experience of one of our co-authors in the surface treatment field.Noticeable results are presented in [33][34][35].
Optimisation methods and algorithms are applied to different fields of materials science depending on their purpose: to optimise materials performance, to optimise industrial/technological processes, such as surface treatment, electrolysis, and so on, and to design new materials.Optimisation of technological processes, including processes of metal surface treatment, involves the determination of optimal process conditions such as temperature, time of deposition, chemical composition of electrolyte, etc., with the purpose of obtaining the best responses/results.The obvious aim is to promote the saving of energy and to minimise energy costs during process performance.In metal surface treatment processes, the duration of the process (deposition time) is one of the most important parameters that determines the efficiency of the whole process.If we are able, by setting control variables (input factors), to minimise the time required for the creation of a protective layer with the thickness demanded by clients while maintaining the required quality, it is possible to maximise economic profit.
The main goal of anodizing is to obtain a thickness of an oxide layer that provides high resistance to corrosion and abrasion, so it is necessary to optimise the anodizing process.The process of anodizing on aluminium in mixed sulfuric-oxalic acid electrolyte is used to improve the mechanical properties of plated parts because the hardness, thickness, and wear resistance of an anodic aluminium oxide layer (AOL) on aluminium must be high enough for industrial purposes.Many works have studied the effect of anodizing conditions such as electrolyte composition [36][37][38][39], electrolyte temperature [36,37,40,41], current density [36,37,40,42], time of deposition [33] on the properties of the AOL.Bensalah et al. deals in [36][37][38] with the studying of mechanical and tribological properties of alumina coatings formed in various conditions.To optimise the properties of the anodic layer formed on aluminium in mixed electrolytes (oxalic/sulphuric acid bath), the authors prefer to use the methodology of Doehlert experimental design.In [36], the optimization objective was to maximise the growth rate and the microhardness of the anodic oxide layer (AOL) and to minimise its abrasion and chemical resistance using multicriteria optimization by desirability function.
The thickness and density of the AOL formed in the sulfuric acid electrolyte are studied in [38].In [43], Bargui, M. et al. (2017) varied three anodizing bath parameters (bath temperature, current density, and sulphuric acid concentrations) using Doehlert experimental design and examined their effects on the selected responses (micro-hardness, wear, and growth rate of AOL) in order to obtain response models and optimise microhardness and the tribological properties of the anodized Al 5754 aluminium alloy.Lednicky, T. and Mozalev, A. [44] have observed nanoporous anodic films self-organized grown on aluminium in certain organic electrolytes.By using the response surface method (RSM), Roshani, M. et al. [45] have studied the effect of electrical process parameters (frequency, duty cycle, and current density in a cycle) on the mechanical properties of AOL.In order to maximise the thickness, microhardness, and wear resistance of the AOL, optimization was conducted by means of desirability function.The optimal experimental condition was calculated, and the response values were estimated.Deeper and more complex identification of significant chemical and technological factors affecting the thickness of the formed AOL by the electrolysis method in a sulfuric acid solution is presented in [33], where defined input variables are varied simultaneously during the experimental procedure.On the other hand, much of the research so far has studied the influence of process parameters on the AOL properties by varying only one factor and keeping other factors constant.As is known, there are interactions between factors, so process conditions determined by such a method may not be optimal.By using the design of experiments methodology (DOE) in conjunction with correct statistical analysis and evaluation of experimentally obtained data-detailed in Section 3-it is possible to take into account interactions between factors and then create a mathematical-statistical computational (MSC) model predicting the responses.
Based on the MSC model and taking into account nonlinearities, the optimization procedure can be performed by applying suitable mathematical optimization methods/algorithms and software.This article contributes to filling the gap in scientific research in this area of optimization of the aluminium anodic oxidation process.In metal surface treatment processes, the process duration (time of deposition) is one of the most important parameters that determines the efficiency of the whole process.If we manage to minimise the time necessary to create a coated layer with the required thickness while maintaining the desired quality by setting the control variables (input factors), it is possible to maximise the economic profit.In this paper, we present the application of nonlinear programming methods to optimise the process of anodic oxidation of aluminium (anodizing) using MATLAB software tools (detailed in Section 4).Interpretation and discussion of the influence of input factors on output is part of the article.The implementation of optimization methods is illustrated by solving a specific problem from engineering practice.We operate with a mathematical-statistical model developed from real data, which is obtained through the experiment performed based on the DOE approach-detailed in Section 3. Original results obtained by the usage of DOE, statistical analysis, and the optimization procedure are presented in this study.The main contribution of the scientific study is the mathematical-statistical computational (MSC) model (developed by the authors) predicting the thickness of the formed aluminium anodic oxide layer (AOL).Based on the MSC model, the main goal is achieved-the optimal values of factors acting during the anodizing process are established.Namely, m (H 2 SO 4 )concentration of sulphuric acid in the electrolyte, m (NaCl)-concentration of sodium chloride, T-the electrolyte temperature, and U-voltage, are determined by using methods of non-linear programming (NLP).Optimal values of decision variables were determined for the 5, 7, 10, and 15 [µm] layer thicknesses required by customers, in order to minimise time of deposition and then to maximise economic benefits.

Mathematical Formulation of Optimization Problem and Selected Methods
The optimisation is applied to process control at all levels: at the level of elementary processes, technological processes, production processes, as well as in the control of processes of strategic importance.In the field of design, construction, or operation of any engineering system, engineers have to make various technological and managerial decisions on several levels and in several phases.Decisions are made and subsequently implemented for the purpose of managing and controlling a given engineering system in such a way that the required criteria are achieved and fulfilled [6].The final aim of all such decisions is to minimise the consumed effort, energy, and costs or to maximise the desired benefit, which can be expressed as an objective function of certain decision variables.Mathematical optimisation is the process of minimizing/maximizing one or more objectives without violating specified constraints by regulating a set of decision variables influencing both the objectives and the constraints [9,10,46].
Optimisation provides a human decision maker (a system operator, who supervises the process and checks the results), with a way to obtain an optimal solution.From the general standpoint, engineering optimisation provides tools for searching for the best available solution to specific tasks; their implementation is a process of finding conditions that will ensure the maximum or minimum value of the criterion function [7,12].In order to apply mathematical optimization, the objective(s) and the constraints must be expressed as quantitative functions of the decision variables (variable parameters).The optimisation itself is a process carried out in two key phases: the first is to establish on optimisation problem (an optimisation model based on an engineering problem), and the second is to obtain the optimal solution to the established optimisation problem [47].Some authors distinguish three key steps of the optimisation process for engineering optimisation problems (EOP): the mathematical modelling of the problem, the selection of effective approaches, and the implementation of heuristics [48].The aim is to find the following optimal solution: to recognise and choose the best alternative among a finite or even infinite set of feasible alternatives.Optimisation problem formulation, also called the "modelling the optimisation problem," is strongly correlated with the choice of optimisation algorithms.The class of optimisation methods/algorithms available to solve an established optimisation problem depends on how that problem is formulated [9].

Mahtematical Formulation of the Problem
The mathematical formulation of an optimisation problem is generally based on the search for the minimum (or maximum when changing the sign) of a function known as an objective function (also known as a criterion function or optimality criterion).The basic general form of an optimisation problem is as follows: where X ⊆ R n is the feasible region and f : X → R is the objective function.The validity of the relationship min allows us to transform each maximum problem into a minimum problem.If a set X is empty, i.e., X = Ø , the optimisation problem is infeasible.If a set X is a nonempty, each vector x ∈ X = Ø is denoted as a feasible solution.In many publications, we can find deviations in the definition of an optimisation problem.The differences are mainly in the marking and the symbols used, but the essence remains the same-an extremization of a function.Authors in [49] use a symbol Min (with a capital initial letter) instead of the usual operator min expressing a final state to emphasise that a problem of optimisation (minimization) is the process of finding a final state.
The goal of minimising an objective function f 0 (x) in a feasible region K is formulated as a mathematical programming problem and is written as follows: If the feasible region K has the form X i , the optimisation problem (OP) in the narrower sense can be briefly written in the following form: In case x ∈ X ⊂ R n we discuss the constrained optimization, for x ∈ R n about unconstrained optimization.
The optimisation problem with the equality and inequality constraints written as is called a mathematical programming problem (MP) in the broader sense.In addition to the p inequality constraints f i (x) ≤ 0, i ∈ I = {1, 2, . . . ,p} there are also considered r constraints in the form of equations h j (x) = 0, j ∈ J = {p + 1, p + 2, . . ., p + r}, where I, J are index sets.If at least one of the functions f 0 , f i , i ∈ I, h j , j ∈ J in ( 5) is nonlinear, we discuss about the nonlinear programming problem (NLP).A vector x * ∈ X is the optimal solution to the problem (5) if it assumes the smallest value among all the vectors in the feasible region, i.e., the formula ∀x ∈ X : f 0 (x * ) ≤ f 0 (x) is valid.It is obvious that vector x = (x 1 , x 2 , . . ., x n ) T is the n-dimensional vector of design variables (vector of independent variables, also known as design vector).According to the above-mentioned, depending on the engineering application, the optimisation problem involves one or more objectives and may contain a finite number of the equality and inequality constraints, which define a feasible region X.In the literature, OP is usually distinguished in two main categories.

1.
Single-objective optimisation problems (with or without constraints) Many basic engineering OP fall into the category of bounded, unconstrained, non-linear and derivative-free optimisation problems with the scalar objective function f 0 , i.e., Minimize f 0 (x) for f 0 ∈ R, x ∈ R n , where the design vector x is n-dimensional.The space of the design variables is bounded to the volume of a hypercube x lb ≤ x ≤ x ub where x lb and x ub are the lower and upper bounding vectors, respectively.

2.
Multi-objective optimisation problems (with or without constraints) The bounded, unconstrained, nonlinear, and derivative-free OP is solved in this category.
, where f 0 , in contrast to the previous case, is the m-dimensional objective function.
Constrained optimisation problem within two main categories is formulated when solving some engineering problems requiring the usage of constraints, which define a feasible region inside the bounded design space.The constrained OP can be expressed as follows: where f i is a one-sided inequality constraint equation (one of p inequality equations), h j is an equality constraint equation (one of r such equations).

Sequences of Steps When Solving an Optimisation Problem from Engineering Practice
According to [1,2,5,7,[9][10][11] in optimal decision making it is essentially necessary to know the following: (a) mathematical model of a control object, (b) objective function, and (c) constraints, conditions.Characteristics summarized in (a)-(c) represent only a minimal range of issues that we must address if we want to reach an optimal decision in production and technological processes optimization.
The creation of a mathematical model is the first step on the way to an optimal solution.It is necessary to create a corresponding model that mathematically describes the relevant object, system, or process under investigation [50].For the meaningful decision-making process, its object must have defined quantifiable parameters: input parameters that we can influence and output parameters that we want to influence.To be as close as possible to engineering reality, a mathematical model can contain various constraints.Constraints establishment provides a way to avoid infeasible solutions to a given problem during an optimisation process.Formulation of an objective function is a key step to proper optimisation and its selection requires deep engineering experience in the issue of optimisation modelling in the given research field [6].The selection of a suitable optimization algorithm and its implementation in a suitable software environment in order to obtain the solution to an optimization problem follows the implementation of the previous steps.Finally, the results must be evaluated to verify whether this is the appropriate solution to the optimisation problem.A short version of the sequences of individual steps: mathematical model → objective function → constraint conditions → selection of optimisation method → software for processing → result verification.

Selected Optimisation Methods and Algorithms
The nature of f 0 , f i , h j , and X dictates what optimisation methods and algorithms will be used to solve a given engineering problem.Exploiting specificities of the problem such as linearity, convexity, or differentiability led to the use and implementation of efficient algorithms.
This subsection aims to provide an overview (partial) of popular optimisation algorithms available to solve practical engineering optimisation problems.As is reported in the literature, four types of optimisation strategies are usually implemented to solve optimisation problems in engineering practice; the state-of-the-art optimisation strategies are also comprised within them.Specifically, the gradient-based, convexification-based, dynamic programming based, and derivative-free (heuristic-based) optimisation techniques [48].Several optimisation methods are put forward for calculating the constrained minimum/maximum optimisation problems, which can be further grouped into deterministic methods, stochastic approaches, and meta-heuristic methods [51].The most popular optimisation methods among deterministic approaches are summarised in Table 1.
Table 1.Popular optimisation methods among deterministic approaches.

Deterministic Optimisation Algorithms
Steepest descent method (SDM) [52] Quasi-Newton methods (QNM) [53] Linear programming (LP) [54] Interior point method (IPM) [55] Interior point sequential quadratic programming (IPSQP) [56] Sequential quadratic programming (SQP) [57] Second-0rder cone programming (SOCP) [58] Coordinate descent method (CD) [59] Global pattern search (GPS) [60] Semidefinite programming (SDP) [61] Dynamic programming (DP) [62] Differential dynamic programming (DDP) [63] Stochastic differential dynamic programming (SDDP) [64] In order to obtain the optimal solution of EOP, deterministic methods use numerical iterations based on calculus (including simplex algorithm and linear programming [5]) and on infinitesimal calculus (gradient-based methods).Due to the fact that classic gradientbased methods are rigorous in mathematical logic and easy to understand, they are commonly used for optimizing, but there are the following requirements: objective function in the optimisation model have to be continuous and differentiable, constraint equations are required.Among gradient-based methods are involved (Table 1), the steepest descent method (SDM), Quasi-Newton methods (QNM), the interior point method (IPM), and sequential quadratic programming (SQP).IPM and SQP are successfully used for solving large-scale NLP problems [65].In general, the SQP algorithm is focused on the transformation of the original problem into a sequence of quadratic programming sub-problems.However, each quadratic programming sub-problem contains Jacobian and Hessian matrices, and these have to be calculated for each Newton iteration of the SQP loop, which may result in a significant increase in the computational burden of the solver.Therefore, the IPM has been developed during the last two decades as an alternative to the gradient-based method SQP.It is worth noting, that static NLP can be addressed by implementing the IPM method with the penalty function in a suitable form.The interior point sequential quadratic programming (IPSQP) combines the advantages of the SQP and IPM.Derivativefree deterministic optimization algorithms have become the most popular.Coordinate descent is one of the oldest and simplest local optimisers, more detailed in [59].The global pattern search [60] is a global deterministic derivative-free optimisation algorithm based on the generalisation of the local derivative-free pattern search.
In some cases, the classic gradient-based method might no longer be reliable because it is difficult to obtain the required gradient information for the objective functions or constraints (e.g., difficulties caused by the high nonlinearity involved in these functions).In these cases, stochastic and meta-heuristics approaches provide some advantages, as there is no derivative information required for the implementation of the evolutionary-based methods.Since these methods do not suffer from the difficulty of calculating Jacobian and Hessian matrices, they become the convenient way to obtain the optimum in such cases of OP.The most popular optimisation methods among stochastic and metaheuristic approaches, addressed to solving EOP, are summarised in Table 2.It is obvious that only selected optimisation algorithms under individual categories are presented in Tables 1 and 2.

Evolution strategy (ES)
[66] Differential evolution (DE) [67] Violation learning differential evolution (VLDE) [68] Genetic algorithm (GA) [69] Simulated annealing (SA) [70] Particle swarm optimisation (PSO) [71] Predator-prey Pigeon-inspired optimisation (PPPIO) [72] Ant colony (AC) [73] Artificial bee colony (ABC) [74] Tabu search (TS) [75] Harmony search (HS) [76] Compared with classic gradient-based methods, a random step size within calculusbased numerical iteration is introduced in stochastic and meta-heuristic approaches; in many cases, no initial guess value is required by algorithms in this category (due to random initialization).There are many types of evolutionary-based algorithms, commonly known as global optimisation methods, which are suitable and convenient for finding the optimum of an engineering optimisation problem [8].Essentially, evolutionary algorithms use the "survival of the fittest" principle, which is adopted to a population of elements (candidate solutions) [66,77].The determination of the global minimum tends to be more likely by stochastic algorithms than by classic deterministic methods.It results from the nature of evolutionary algorithms (EA).We distinguish within them the generic-based class of EA (such as ES, DE, VLDE, and GA), the agent-based class (such as PSO and PPPIO), and the colony-based class of evolutionary algorithms (ACO and ABC).For instance, Particle Swarm Optimisation (PSO) is inspired by the social behaviour of organisms and uses individual and social learning to perform the iterative evolution of a particle swarm [47].Among the advantages are the high speed of convergence and easy implementation, but it tends to premature convergence.Simulated annealing (SA) is inspired by annealing processes (developed thanks to the observation of temperature decreasing during the annealing process), but SA requires acceptance of probability.The popularity of implementation of meta-heuristic methods increases in conjunction with the continuous progress and development of computer technology.They are successfully applied to very complex and multi-variable engineering optimization problems where high non-linearity is involved.A genetic algorithm is proposed via an imitation of organic evolution, using natural selection to comprise cross-over, mutation, and selection operations.Although the feasibility of the usage of meta-heuristic-based methods for solving EOP is shown, there are some difficulties with the validation of solution optimality, and they are still not treated as "standard" optimisation algorithms.Recently, a convexification-based method has begun to attract attention.Engineering optimisation problems are usually nonconvex, so it is necessary to transform the original problem formulation into the form of a convex OP by some convexification techniques before applying the convex method.For instance, linear programming as a convex optimisation procedure has been successfully used to determine the optimal cutting parameters in machining processes.
Based on Tables 1 and 2, several state-of-the-art algorithms can be included in the following set of algorithms that are suitable for derivative-free single-objective optimization, namely: CD, ES, GA, SA, PSO, HS, and GPS.For multi-objective optimisation, the following can be implemented: non-dominated sorting genetic algorithm II (NSGA-II) and multi-objective global pattern search (MOGPS) [8].In this study, our attention is focused on engineering optimisation problems, which belong to static nonlinear programming problems.The following software products were mainly used in the design of experiments, statistical data analysis, and optimization: Design Expert, R, QC Expert, Minitab, Statistica, and MATLAB.

Experimental Procedure
This study aims to provide optimal control of anodizing process by setting the operating process parameters to the optimal values according to the energy and economic load saving targets.To solve this complex problem, first it was necessary to establish optimisation problem and develop mathematical model (on basis of the performed experiment) with respect to the aforementioned sequences of steps.A solving strategy based on design of experiments (DOE) methodology, exploratory data analysis (EDA), confirmatory data analysis (CDA), and optimisation procedure is applied and presented in this study.
The modified anodic oxidation of aluminium by direct current with sodium chloride, also known and termed as "Mod".GS method of anodic oxidation is used to perform the experimental research.Anodizing is an electrochemical surface treatment used to improve mechanical properties of treated components by producing protective surface film-thick anodic aluminium oxide layer (AOL) with high hardness in order to provide wear and corrosion resistance.Several variables (input factors) are acting during the process of anodic oxidation of aluminium and its alloys.To perform the experimental research, investigators must consider the influence of chemical factors (composition of the electrolyte), physical factors (the temperature of the electrolyte, time of deposition, current density) and technological factors (especially the electrolyte cooling method and the dimensions of electrolyse tank).Moreover, the composition of used material is important (surface material and kind of the cathode used) and it is suitable to consider with uncontrolled factors (maintaining them at a constant value), and with random negligible factors.Some of the factors used during the experimental procedure are varied within the chosen range of levels that must be chosen and defined with respect to the following two aspects: theoretical and practical aspect.In our experimental work both aspects were passed.Firstly, they were stated to respect the recommendations presented in scientific publications; on the other hand, they were selected based on the 25 years of practical experience of one of the co-authors of this study, obtained during work in a company that provides surface treatment of metals.The individual defined levels of the factors had to meet the conditions for the feasibility of the individual experimental runs in all their possible combinations.The research was carried out by implementation of the DOE methodology in accordance with the experimental conditions presented in Table 3. 1 The factors represent: x 1 -the amount of sulphuric acid in the electrolyte, x 2 -the amount of sodium chloride in the electrolyte, x 3 -the electrolyte temperature, and x 4 -the time of deposition, x 5 -the applied voltage.
In accordance with the design matrix, the individual experimental runs were carried out in a random order because of to avoid the subjective preference of one of the input factor levels and then minimise the systematic error.The functionality of the electrolyte was tested by using a tank (Hull cell) illustrated in Figure 1.The technological verification of the electrolyte was successfully performed.As shown in Figure 1, the experimental apparatus involves a controllable DC power source (continuous voltage regulation within the range from 0 to 20 [V] and direct current within the range from 0 to 5 [A]), ammeter, and voltmeter.In case of experiment presented in this study, the anodizing process for individual experimental runs was performed at constant current density of 1 [A•dm −2 ].

Material
Tables 4 and 5 display the experimental materials, namely, aluminium EN AW-1050A H24 (Alumeco Service GmbH., Coswig, Germany) of dimensions 100 × 70 × 0.5 [mm], sulphuric acid solution, and distilled water.Table 4 shows the chemical composition of sulphuric acid used to prepare the electrolyte in terms of the admixtures.Sulphuric acid of p.a. purity was used for electrolyte preparation.In general, aluminium dissolved in the electrolyte does not have a significant influence on the anodizing process; this statement is valid for the recommended values of anodic oxidation by the GS method.According to the authors' practical experience with the commercialization of the anodic oxidation of aluminium, the influence of aluminium in the electrolyte begins to have an adverse effect as early as 12 [g•L −1 ].Therefore, it is interesting to verify the validity of the above-mentioned statement even outside the range of recommended anodic oxidation parameters.Note that aluminium was added to the electrolyte as Al 2 O 3 , the chemical composition of which is illustrated in Table 5.

Measurement of the AOL Thickness
The MiniTest 4000 digital thickness meter by the German manufacturer ElektroPhysik (Köln, Germany) was used for measurement of the resulting AOL thickness on individual samples, together with the N400 measuring probe, which provides the measurement of non-magnetic layers such as aluminium, chromium, copper, rubber, and others by the eddy current method within the range of 0-400 [µm].Extended uncertainty U expressed as the standard uncertainty u c , multiplied by the coverage factor k = 2, represents the value µ c = 1.5 [µm] for a nominal thickness of a layer defined by a standard of 50 ± 1 [µm].This value was determined by calibrating the probe used by an independent certification authority.The AOL thickness was measured 5 times in each of experimental points defined as intersections of horizontal and vertical lines with distance of 5 [µm].

Statistical Analysis of DOE Data
Due to the fact that experimental data are commonly characterized by asymmetric distribution, unconventional variance and violation of the essential requirements for a set of data, three follow-up steps are implemented during the evaluation of experimentally obtained data.The series of these three sequential steps were also applied to the outputs of the experimental verification of the thickness of the resulting anodic oxide layer.Specifically, namely, the following: Exploratory data analysis (EDA)-enables experimenters to investigate the data observation to see whether there is anything special about it, such as specifics in the shape of data distribution, the occurrence of outliers, local data concentration, etc.The exploratory data analysis provides techniques to deal with them in an appropriate manner, to identify the shape of the distribution of an experimentally obtained data set if it is fairly similar to that of a normal (Gaussian) distribution or not, and also to detect deviations and anomalies.If the EDA demonstrates a distribution type inappropriate for standard statistical analysis (such as the presence of an asymmetric shape), appropriate data transformation (power or Box-Cox transformation) should be performed for correct statistical analysis; 2.
Verification of requirements on a data set (sample/group of observations)-it is important to verify essential requirements such as homogeneity of a sample, independence of elements, variance of a sample and sufficient large sample size; 3.
Confirmatory analysis (CDA)-provides tools for estimation of position, dispersion, and shape parameters.The following two groups of estimations are known: traditional estimates and robust estimates (insensitive to outliers and other requirements for input data).
The sampling analysis procedure was aimed to determine an objective mean value-a representative of the measuring results of the AOL thickness formed on individual samples for individual test runs performed at a constant current density of 1 [A•dm −2 ] and, of course, for the measurement on a standard.The sampling analysis itself was carried out in the following two steps: first, individual measurements were evaluated by standard statistical methods (Shapiro-Wilk test), aiming to examine the normality of a data set and then to identify outliers and extreme values (Grubs test, Dixon test).This analysis was applied to the thickness measurements for all samples of experiments and to the corresponding measurements on the standard.In cases where the presence of outliers and extreme values was confirmed and normal distribution was not possible to implement, and in cases where normality of data distribution was not demonstrated even after the exclusion of the confirmed outliers, exponential and Box-Cox transformations were performed to ensure correct further statistical analysis of the experimentally obtained data.Depending on the results of the exploratory analysis for the set of experimentally obtained data, the mean value was determined as follows: the arithmetic mean was used for the sets with normal distribution; power-adjusted or Box-Cox transformed average; Winsorized mean (robust characteristic) for sets where data transformation was not appropriate and Gaussian distribution was not shown.

Statistical Analysis of Predictive Model Fitting and Validation
A summary analysis of the usefulness of the developed model, describing the influence of input factors on t h [µm]-the resulting thickness of AOL, is reported in Table 6.Model interpretation plays an important role in the data analysis.To express the goodness of the regression model, the following model diagnostic fit tools should be implemented: the summary of fit plot, the lack of fit test, and the normal probability plot of residuals.As it can be seen from Table 6, the variability of t h (RSquare) reaches the value 96.9296% and the adjusted index of determination (denoted as RSquare Adj), which points to the level of variability explanation by a given model, reaches the value 95.5991%.It is appropriate to highlight that, in accordance with the reached value of the adjusted index of determination, the fit of quality or functionality of the developed model is satisfactory, and the model may be suitable for the future optimisation procedure.The average error of the mathematicalstatistical computational (MSC) model is 0.614 [µm] and the average value of the thickness of the formed layer during the anodizing process is 61.895 [µm].However, R 2 alone is not a sufficient indicator for probing the validity of a model; furthermore, advanced data analysis was performed.The value of AIC C -Akaike Information Criterion for the MSC model is 112.2981 and the value of BIC-Bayes Information Criterion is 121.918.Using these criteria, when comparing multiple models, a model with a lower AIC C and BIC is better.
The results of the analysis of variance (ANOVA) are summarised in Table 7.As it is observable from these results, the variability caused by random errors is significantly less than the variability of the values determined and explained by the model.Based on the Fisher-Snedecor test criterion, the achieved value (Prob > F) at the chosen level of significance α = 5% indicates the adequacy of the used model.It results from the verified null statistical hypothesis, which states that none of the factors (terms) in the model affects the value of the examined variable (response).As the achieved value (Prob > F) is less than the significance level α = 0.05, it can be said that there is at least one non-zero term in the model that affects the value of the investigated variable.When computing the model validity, the outcomes of the lack of fit test are used.The variance of residuals and the variance of measured data within groups should be used to diagnose if the model well fits the observed dependence.The outputs of the ANOVA lack-of-fit test are presented in Table 8.In order to estimate the predictive power of the developed model, the ANOVA lack of fit test was used.The residual variability was compared with the variability of measured data within groups.Thus, it can be said that the null statistical hypothesis (H 0 ) that the variance of residuals is less than or equal to the variance within groups was being tested against the alternative hypothesis (H 1 ) that the variance of residuals is greater than the variance within groups.At the chosen significance level of level α = 0.05, the value of the Fisher test criterion converted to a probability scale (Prob > F) is 0.4936; therefore, it can be concluded that we do not have enough evidence to reject the null statistical hypothesis (H 0 ).Hence, the result is that the variance of residuals is less than or equal to the variance within groups, and thus the model is sufficient.In other words, the model is statistically significant.When a sufficiently low model error is obtained, the model shows a good fit to the data; therefore, in our case, we conclude that the MSC model is adequate and sufficient.

Model Description
As the model obtained passes the basic diagnostic, the last stage in the analysis of DOE data is to use the regression model for making predictions.It is of crucial importance to derive a model with optimal predictive capability; therefore, evaluation of data, regression analysis, and model interpretation must be performed statistically correctly.In our case, it was performed, and estimation of model parameters/coefficients was achieved, as is presented in Table 9.The MSC model regression coefficients, listed in column Estimate in order from the highest impact, are unscaled but refer to the original measurement scale of the considered individual factors (they are listed in the coded unit).It is clear from Table 9 that the highest impact on the explanation of the response variability, i.e., on the layer thickness, has an intercept (x 0 ), also known as the absolute term of the model.Intercept represents both all unconsidered input factors operating during the anodic oxidation process and used intervals (Table 3) of considered input variables.In terms of five considered input factors (Table 3), a separate main effect of 22.11% corresponds to the main effect of the electrolyte temperature (x 3 ), that is, the change in layer thickness, when raising the temperature of the electrolyte, the resulting thickness of AOL also increases.However, at the temperature of the electrolyte, it is necessary to consider its quadratic and cubic terms, which are statistically significant.The electrolyte temperature in the form of its square root contributes 3.17% to the change of the formed AOL thickens, and the influence of the temperature in the sense of the square root is 8.26%.Interestingly, when we consider the electrolyte temperature in the interaction, its effect is negative.This means that when increasing the temperature of the electrolyte, the thickness of the formed layer decreases due to the interaction.
Another significant effect on the layer thickness is the concentration of sulfuric acid in the electrolyte (x 1 ).In a similar way, when the amount of sulfuric acid is raised, the thickness of the layer formed is increased.The main effect of factor (x 1 ) on the AOL thickness is 17.10%.The deposition time (x 4 ), expressing the duration of the anodic oxidation process, contributes to changes in the growth of the layer thickness by 12.31% and, as with the factor x 2 , when raising the deposition time, the layer thickness increases.The last significant factor acting as the main factor is the applied voltage (x 5 ).The effect of factor x 5 in the layer thickness changes is 5.31% and, as in the above-mentioned cases, the response increases with the increase in the applied voltage.
Based on the estimation of the model parameters presented in Table 9, it was possible to compile a mathematical-statistical computational (MSC) model expressing the relationship between input factors (x 1 -x 5 ) and response (the AOL thickness).For coded input factors, the following fitted model will be of the form: When taking into account that input factors were coded by DOE coding during statistical evaluation of experimentally obtained data, it is necessary to apply the reverse DOE coding in order to obtain the predicting model in natural scale.DOE coding is expressed by the following Formula (8): x d (i) = x(i) − x max +x min 2 x max −x min 2 (8) where x d (i)-is a coded variable according to DOE coding, x (i)-is the original basic variable in natural scale for i = 1,2,3, . . .,n where n is the number of input factors, x max -is the maximum value of the original variable, x (i) a x min -is the minimum value of the original variable x (i).
Considering the coding Equation ( 8) and the mathematical-statistical formula of the fitted Model (7), it is possible to obtain the computational (MSC) model describing the resulting AOL thickness in natural scale as follows: Due to provide the complexity of the performed analysis and confirmation of the correctness and suitability of the selected model, it is necessary to verify the residues, the difference between the actually measured and predicted values, calculated using the prediction model in terms of their distribution and autocorrelation.The value of the Durbin-Watson statistic represents the value of 1.6695713, while the calculated significance value is 0.1507; therefore, it is possible to accept a null statistical hypothesis that there is no autocorrelation.The achieved level of significance of the Shapiro-Wilk test (Figure 2) indicates Gaussian residue distributions.In conclusion, we can proclaim the prediction model as statistically and numerically correct.

Optimisation Analysis and Procedure
In view of the conclusions reached in the previous analysis on the numerical and statistical correctness of the model predicting the thickness of the formed layer t h depending on the five independently variable factors x 1 , x 2 , x 3 , x 4 , and x 5 ; Equation (9) can be accepted as a valid mathematical model and useful for the next optimisation procedure.In the context of techno-economical optimisation of the anodic oxidation process of aluminium, the Model (9) can be used for the purpose of formulating an optimisation problem, i.e., for the formulation of objective functions and technological constraints.In real technical practice, the economy of the process of anodic oxidation is defined by the production equipment, i.e., by the number of surface-treated curtains per unit time, as is known from practice.In general, the production line cycle is given by the length of the longest operation during the production process.When optimising the process of anodic oxidation of aluminium in terms of time saving, we recognise that the longest operation in the production process is the anodic oxidation itself.In other words, the deposition time, i.e., the time of anodic oxide layer formation, was stated as the optimality criterion.The criterion of optimality has to take into account the aspect of economic efficiency of the given surface treatment process, and for the anodic oxidation of aluminium, the decisive indicator of economic efficiency is the deposition time.In comparison with the time duration of other process operations (degreasing, pickling, clearing, and sealing), the deposition time is the longest and thus defines the cycle of the production line.When we minimise the time of AOL with the required thickness by setting the optimal combination of values for the acting factors, we can maximise the economic yield while ensuring the required quality.From practical experience, it can be said that up to 95% of customers define the thickness of the formed layer as the basic demand for the implementation of surface treatment by anodic oxidation, which is the most frequently entered parameter in the design documentation.Therefore, as part of the optimisation procedure, our effort will be to minimise the deposition time for a predetermined thickness of the final formed layer.
Therefore, within the optimisation procedure, we focus on minimising the deposition time at a predefined, i.e., prescribed thickness of the formed layer.Due to the fact, that MSC Model ( 9) is nonlinear in parameters, it can be expected that the objective function will also be nonlinear.Hence, non-linear programming was chosen in order to perform the optimisation procedure using the MATLAB software system.
The minimization optimisation problem in the extended sense of the meaning can be defined as follows: with the constraints in the form of equations and also inequalities, where I, J are index sets.If at least one of the functions f 0 , f i , i ∈ I, h j , j ∈ J is non-linear, we discuss an optimisation task called nonlinear programming.As mentioned above, we will apply nonlinear programming in the case of optimizing the AAO process, as the purpose function (expressing the functional dependence for the deposition time) will be nonlinear.In our case, the main goal of optimisation can be defined as the minimization of the deposition time t while maintaining the prescribed thickness th p of the resulting layer.
The objective function can be written in the following general form: resp. in natural scale (Table 1) in the following general form: The Equation ( 11) expresses the objective function f 0 (x) modelling, saving time.Our main goal is to find such a combination of x 1 , x 2 , x 3 , x 5 from a feasible region, (x 1 , x 2 , x 3 ) = x * ∈ X, which will guarantee the minimum value of the objective (criterion) function while complying with all prescribed technological limitations.We will call this combination of numbers the optimal solution.
The objective function t = f 0 (x 1 , x 2 , x 3 , x 5 ) th=const describes the relationship between the response (AOL thickness) and independent variables (5 input factors).The objective function in natural scale was derived in the form of the following equation: When defining the constraints of the anodic oxidation process of aluminium by the modified GS method, we must take into account the practically proven intervals of technological limitations in conjunction with the limitations given by the performed experiment, i.e., in accordance with the data presented in Tables 3 and 9. Based on this, we define technological boundary conditions (optimisation constraints) in the following form of inequalities: To run the optimisation procedure for solving the defined EOP-the minimization problem with the objective function (13) subject to the optimisation constraints ( 14)-( 17), the appropriate script was created in MATLAB 2019a software, using nonlinear programming (NP) methods available within the Optimisation toolbox.It should be mentioned that we used the "fmincon ()" solver for constrained nonlinear minimization and the interior point method (IPM) algorithm.The task of nonlinear optimisation in the MATLAB environment was, in our case, to find the minimum (local extreme) of the objective function for the optimisation problem written in a format suitable for the given software, i.e., in the following form: where x, b, beq, lb (lower boundary), and ub (upper boundary) are vectors, A and Aeq are matrices with constant coefficients, c(x) and ceq(x) are vector functions, and f (x) is a scalar function.Functions f (x), c(x) and ceq(x) are nonlinear.The objective function (13) and optimisation constraints ( 14)-( 17) have been rewritten into a form suitable for optimisation in the MATLAB software environment.
After the implementation of the optimization procedure, we obtained the optimal combination of values of control variables (input factors) and the optimal value of the time duration of anodic oxidation of aluminium by the GS method (the value of the objective function).The outputs of the anodizing optimization procedure for the individual prediscribed thicknesses (demanded by customers) of the AAO layer formed at the defined current density of 1 [A•dm −2 ] are listed in Table 10.
Table 10.Results of the optimisation of the anodic oxide aluminum process.The first column in Table 10 shows the required thickness of the resulting anodic oxide layer, namely, 5, 7, 10, and 15 [µm].The rest of the columns (except the last) present calculated/suggested optimum values of input factors.A graphical representation of the optimisation process for the formed AOL thickness of th p = 5 [µm] is given in Figure 3.

The Required AOL Thickness
As it is observable from the results of data analysis and outputs of the optimisation process (Tables 9 and 10), the optimum (minimum) value of the anodizing time is mostly affected by the concentration of sulfuric acid in the electrolyte.The results (Table 10) reveal that the optimum of the deposition time can be achieved by changing (increasing) the sulfuric acid concentration in the electrolyte while maintaining a constant value of sodium chloride concentration m (NaCl) = 0.213 [g•L −1 ] and setting values of temperature and voltage closer to the upper limit of the interval defined by constraints ( 16) and (17).
Although it is clear from the previous research results that the electrolyte temperature has the greatest effect on the layer thickness, raising the value of the electrolyte temperature has its limitations.It is necessary to take into account the value of the critical temperature at which the formed layer starts to dissolve and cause the unsatisfactory quality.Therefore, we limited the temperature from above to 25 [ • C].When this temperature is exceeded, a layer with an unsatisfactory appearance and quality parameters is formed, even if the layer thickness is sufficient.
These results (Table 10) were verified under real operating conditions (for thicknesses of 5, 7, 10, and 15 [µm]).They are also consistent with the results achieved in our previous experimental work (different approach without implementation of optimization).Defining the limiting conditions derives from our practical experience and research work.

Conclusions
At this time, the characteristic feature of production processes is the effort to produce at low cost but high quality and in a short time.Because the required effort can be expressed as a function of certain decision variables, the correct choice of the input parameter values of each process, not excluding technological processes, has a positive effect on the output in the sense of the above.Finding the right combination of values for the adjustable input variables of a given process has been the effort of experts for many years, as evidenced by research and years of experimentation.However, experimentation is often expensive and time-consuming, as is the case with experimentation to streamline technological processes.For this reason, in finding the right combination of setting input variables of a certain production, technological, or other process, it is important to use the following possibilities offered by modern times: methods of modern applied mathematics, DOE methods, statistical methods, and especially optimization methods, in conjunction with advances in computer technology and in the development of special software.
This study declares the following power and usefulness of these: the optimal combination of input factors acting during anodic oxidation of aluminium was achieved.
Namely, the optimization goal-to achieve a minimum deposition time (as listed in Table 10) while maintaining the required thickness (5, 7, 10, and 15 [µm]) and quality of the formed anodic aluminium oxide layer by implementing an optimization procedure has been reached.The developed mathematical-statistical model predicting the thickness of the created protective layer (AOL) provided the basis for the optimization procedure.It is important to combine experimentation with optimization.It has to go hand in hand.We are not able to optimise without experimentation (as a mathematical model is necessary to develop) and experimentation without trying to optimise the system or process is not worthwhile.
The anodic oxidation time is a significant factor influencing the thickness of the formed anodic layer at the considered current densities used in practice.This input factor is manifested by its influence both independently and in interactions with other factors depending on the current density.
For further investigation in this scientific area, it is necessary to take a more comprehensive approach to the optimisation of surface treatment processes and to take into account the critical values of some factors.To perform anodic oxidation of aluminium under optimal process conditions, we must also take into account the value of the critical temperature, as exceeding it will dissolve the layer being formed or form layers of unsatisfactory quality.Therefore, in order to increase the efficiency of the operation of the anodic oxidation process in practice, in the future we will focus our attention on experimental and research activities on the analysis of the rate of AAO formation and the determination of the critical temperature for varied defined current densities.

Figure 1 .
Figure 1.Diagram of the experimental bath connection.

Figure 2 .
Figure 2. The graphical analysis of residuals for predicting layer thickness t h .

Table 2 .
Popular optimisation methods among stochastic and metaheuristic approaches.

Table 4 .
The composition of the H 2 SO 4 solution/weight percentage of the additive elements (%).

Table 5 .
Chemical composition of Al 2 O 3 used/weight percentage of the additive elements (%).

Table 6 .
Summary analysis of fit quality of MSC model.

Table 7 .
ANOVA evaluation of the MSC model.

Table 8 .
Lack of fit test of the model.