Investigation on Corrosion Resistance and Formation Mechanism of a P – F – Zr Contained Micro-Arc Oxidation Coating on AZ 31 B Magnesium Alloy Using an Orthogonal Method

In this study, the synergistic effects of NH4HF2, sodium phytate (Na12Phy), K2ZrF6, and treatment time on corrosion resistance of a micro-arc oxidation (MAO) treated magnesium alloy and the entrance mechanism of P, F, and Zr into anodic coatings were investigated using an orthogonal method. In addition, the roles of NH4HF2, Na12Phy, and K2ZrF6 on coating development were separately studied. The results show that NH4HF2 and Na12Phy, the corrosion inhibitors of magnesium alloys, are beneficial but K2ZrF6 is harmful to developing anodic coatings. The corrosion resistance of MAO coatings is synergistically determined by coating characteristics, though the coating thickness plays a main role. Na12Phy significantly improves but NH4HF2 decreases the corrosion resistance of MAO coatings, while excess high K2ZrF6 is harmful to the coating corrosion resistance. Treatment time can increase the coating thickness but is the least important factor in corrosion resistance. During MAO, NH4HF2, Na12Phy, and K2ZrF6 take part in coating formation, causing P, F, and Zr to compete with each other to enter into anodic coatings.


Introduction
Fractures and bone defects occur frequently due to road traffic accidents and sports injuries [1].Magnesium alloys appear to be the most promising biomedical metal due to their several advantages over the permanent metallic materials currently in use, including similar density and Young's modulus to human bone, good biocompatibility, and many functions of Mg ions in vivo [2].However, the major obstacle hampering the clinical applications of magnesium alloys is their rapid degradation in vivo [2,3].The degradation rate must be controlled before magnesium alloys can be safely used as implants, and therefore the method of surface modification is widely used to limit their deterioration [2,3].
Potassium fluorozirconate (K 2 ZrF 6 ), a MAO electrolyte containing fluorine (F) and zirconium (Zr) elements, has recently received increasing attention [11,[16][17][18][19][20][21].Results show that in a solution containing K 2 ZrF 6 , the developed self-sealing MAO coatings can considerably improve the corrosion resistance of magnesium alloys [17][18][19].Zirconium oxide implants are bioinert and have good biocompatibility, high strength, high compression resistance, and excellent wear resistance [22,23].A particularly compelling find is that zirconia can inhibit bacterial adhesion and colonization on the surface [22,24,25] Fluorine-containing electrolytes such as KF [3,13,14,17,26] and NaF [19,27] can improve the coating corrosion resistance due to enhanced coating thickness, compact microstructure, and a stable MgF 2 product [13,17,26,27].Moreover, F is an essential trace element in humans, and a proper amount of F can promote bone development [28] and prevent dental caries [29].The recommended dietary allowance (RDA) for F is 4 mg day −1 [30], and high levels of F amount will harm health, such as dental fluorosis [31], denser bones, joint pain, and a limited range of joint movement [32].In order to fabricate MAO coatings with excellent corrosion resistance and good biocompatibility, investigating the influences of processing factors on corrosion resistance and chemical compositions (especially the F amount of MAO coatings) is required yet rarely reported.
In this study, ammonium hydrogen fluoride (NH 4 HF 2 ), usually used as corrosion inhibitor of magnesium alloys [33,34] but barely as MAO electrolyte on magnesium alloys [32,35], was selected as a fluorine-containing substance and K 2 ZrF 6 as the source of both Zr and F to fabricate MAO coating on AZ31B magnesium alloy by MAO process.Sodium phytate (abbreviated as Na 12 Phy), the main form of phosphorus (P) storage in plants, was applied as an environmentally friendly MAO electrolyte on magnesium alloys [12].Treatment time is a major processing parameter and has significant effect on the thickness [36].In this study, the main research is presented as follows: (1) the synergetic effect of NH 4 HF 2 , Na 12 Phy, K 2 ZrF 6 , and treatment time on the corrosion resistance of MAO coatings was investigated by an orthogonal method; (2) the influences of NH 4 HF 2 , Na 12 Phy, and K 2 ZrF 6 on coating development capability were investigated by observing surface morphology and measuring the I corr values of untreated AZ31B alloy in corresponding solutions; and (3) the entrance mechanisms of P, F, and Zr into MAO coatings were deduced according to the experimental results, electrolyte properties, and MAO characteristics.

Materials and Coating Preparation
AZ31B magnesium alloys were machined into the samples with a cuboidal shape of 10 × 10 × 6 mm 3 .Prior to MAO treatment, all samples were ground with 80-1000 grit SiC waterproof abrasive paper, cleaned sequentially with tap water followed by distilled water, and then dried with a hair dryer.
As listed in Table 1, the influences of NH 4 HF 2 , Na 12 Phy, and K 2 ZrF 6 concentration, as well as treatment time on corrosion resistance and the amounts of P, F, and Zr in MAO coatings, were investigated by using the orthogonal method of four factors with three levels.According to the processing parameters in Table 1, nine MAO samples designated as Nos.1-9 were fabricated.
The MAO treatment was carried out by a MAO5D power supply (Chengdu Tongchuang New Material Surface Engineering and Technology Center, Chengdu, China) using a positive pulse constant current control mode.The used electrical parameters were a current density of 50 mA/cm 2 , a duty cycle of 35%, and a frequency of 2000 Hz.

Microstructural Characterization
Surface and cross-sectional morphologies of MAO coatings were observed using a ΣIGMA SEM (Zeiss Sigma, Oberkochen, Germany).The coating compositions were analyzed using an energy dispersive spectrometry (EDS, Oxford INCA, Oberkochen, Germany) attached to an SEM.The phase structure of the oxide film was detected using an X-ray diffractometer (Shimadzu XRD-6100, Tokyo, Japan) with Cu Kα radiation in the 2θ range of 10 • -80 • at a scanning speed of 4 • /min.In order to detect the element states on the surface of the anodic coatings, an X-ray photoelectron spectroscopy (XPS, ESCALAB250, Thermo VG, Waltham, MA, USA) was used with an Al Kα anode (λ = 1486.6eV).

Electrochemical Test
Potentiodynamic polarization was measured to measure corrosion current density (I corr ) of magnesium alloy before and after MAO treatment using an electrochemical analyzer (CHI660E, Shanghai Chenhua Instrument Co., Ltd., Shanghai, China).All measurements were performed at 37 • C in solutions composed of NH 4 HF 2 , Na 12 Phy, and/or K 2 ZrF 6 as well as a simulated body fluid (SBF) composed of 8 g/L NaCl, 0.4 g/L KCl, 0.14 g/L CaCl 2 , 0.35 g/L NaHCO 3 , 1.0 g/L C 6 H 12 O 6 , 0.2 g/L MgSO 4 •7H 2 O, 0.1 g/L KH 2 PO 4 , and 0.06 g/L Na 2 HPO 4 •7H 2 O.A three-electrode cell with a sample area of 1 cm 2 was used as the working electrode, a saturated calomel electrode (SCE) as the reference electrode, and a platinum electrode as the counter electrode.The SCE was put into a beaker composed of saturated potassium nitrate while the working and the platinum electrodes were placed into a cell containing SBF.The beaker was connected with the cell by a salt bridge.After an initial delay of 300 s, the potentiodynamic polarization curves were measured from −0.3 to 0.8 V with respect to the open circuit potential (OCP) at a scan rate of 1 mV/s.The corresponding electrochemical parameters including corrosion potential (E corr ), I corr , and anodic/cathodic Tafel slopes were derived by using the Tafel extrapolation method.The experiment of each sample was repeated at least three times.

Surface Morphology and Chemical Composition
Surface morphologies of the nine MAO coatings were observed and are shown in Figure 1.The MAO coating developed on sample No. 1 was rough and loose with small pore size (Figure 1a), while all other coating samples exhibited uniform and compact porous structure (Figure 1b-i).In addition, micro-cracks shown by arrows were developed on some MAO treated samples, especially on Nos. 6 and 7 (Figure 1f,g).Anodic coatings developed on No. 8 exhibited uniform and compact characteristics with a pore size in the range of 1-4 µm (Figure 1h).and 7 (Figure 1f,g).Anodic coatings developed on No. 8 exhibited uniform and compact characteristics with a pore size in the range of 1-4 μm (Figure 1h).
Chemical compositions of MAO coatings fabricated in nine processes are listed in Table 2.The MAO coatings were mainly composed of C, O, F, Mg, P, and Zr elements (Table 2).Na12Phy took part in coating formation and phosphorus-containing coatings were developed on the sample surface.The P, F, and Zr contents of each sample are listed in Table 1.2a), while other samples achieved typically porous characteristics with many micro pores (Figure 2b-i).The achieved coating thickness of each sample (Figure 3) is listed in Table 3.Among the nine MAO samples, samples Nos. 3 and 8 achieved the thickest and the second thickest coating, 23.5 and 20.3 μm, respectively.The coating developed on sample No. 1 was the thinnest, only 8.5 μm (Table 3).Chemical compositions of MAO coatings fabricated in nine processes are listed in Table 2.The MAO coatings were mainly composed of C, O, F, Mg, P, and Zr elements (Table 2).Na 12 Phy took part in coating formation and phosphorus-containing coatings were developed on the sample surface.The P, F, and Zr contents of each sample are listed in Table 1.2a), while other samples achieved typically porous characteristics with many micro pores (Figure 2b-i).The achieved coating thickness of each sample (Figure 3) is listed in Table 3.Among the nine MAO samples, samples Nos. 3 and 8 achieved the thickest and the second thickest coating, 23.5 and 20.3 µm, respectively.The coating developed on sample No. 1 was the thinnest, only 8.5 µm (Table 3).3. The untreated AZ31B alloy presented typical characteristic peaks of magnesium, while the MAO coatings were mainly composed of Mg, Mg3(PO4)2, ZrO2, Mg2Zr5O12, and MgF2.
Intensity (a.u.)  4a).The C 1s spectrum could be divided into two component peaks at 284.6 and 286.5 eV, which were separately assigned to C-C(H) and C-O.The P 2p spectrum exhibited two peaks at 133.4 and 134.3 eV (Figure 4c), which represented PO4 3− and HPO4 2− , respectively [37].The Zr 3d spectrum was divided into two peaks at 182.1 and 184.3 eV, corresponding to zirconium oxide [38].3. The untreated AZ31B alloy presented typical characteristic peaks of magnesium, while the MAO coatings were mainly composed of Mg, Mg 3 (PO 4 ) 2 , ZrO 2 , Mg 2 Zr 5 O 12 , and MgF 2 ., respectively [37].The Zr 3d spectrum was divided into two peaks at 182.1 and 184.3 eV, corresponding to zirconium oxide [38].4a).The C 1s spectrum could be divided into two component peaks at 284.6 and 286.5 eV, which were separately assigned to C-C(H) and C-O.The P 2p spectrum exhibited two peaks at 133.4 and 134.3 eV (Figure 4c), which represented PO4 3− and HPO4 2− , respectively [37].The Zr 3d spectrum was divided into two peaks at 182.1 and 184.3 eV, corresponding to zirconium oxide [38].

Corrosion Resistance
Figure 5 shows the potentiodynamic polarization curves of untreated AZ31B alloy and the nine MAO treated samples.Derived from Figure 6, the electrochemical parameters of the tested sample could be achieved.The Ecorr and the Icorr of AZ31B alloy were −1.5287V (vs.SCE) and 4.06 × 10 −6 A/cm 2 , respectively.The achieved Icorr values of the nine MAO treated samples are listed in Table 3.The Icorr value reflects the corrosion resistance of the measured sample.The smaller the Icorr value, the better the corrosion resistance.Compared with untreated AZ31B alloy, it was clear that all MAO samples achieved smaller Icorr values (Table 3), indicating that the MAO treatment could effectively improve the corrosion resistance of the AZ31B alloy.Among the nine samples, sample No. 3 exhibited the best corrosion resistance, and its Icorr (1.48 × 10 −9 A/cm 2 ) was three orders of magnitude smaller than that of untreated AZ31B alloy.

Influences of Processing Factors on P, F and Zr Contents
The measured P, F, and Zr contents of the MAO coatings were set as the objective parameters, and the intuitionistic analysis was used to analyze the experimental data and reveal the influences of processing factors on the objective parameters.K1, K2, and K3 in Table 1 separately represent objective parameter summation of MAO coatings fabricated at the first, second, and third levels for each of the four processing factors.The maximum difference between K1, K2, and K3 for each factor reflects the

Corrosion Resistance
Figure 5 shows the potentiodynamic polarization curves of untreated AZ31B alloy and the nine MAO treated samples.Derived from Figure 6, the electrochemical parameters of the tested sample could be achieved.The E corr and the I corr of AZ31B alloy were −1.5287V (vs.SCE) and 4.06 × 10 −6 A/cm 2 , respectively.The achieved I corr values of the nine MAO treated samples are listed in Table 3.The I corr value reflects the corrosion resistance of the measured sample.The smaller the I corr value, the better the corrosion resistance.Compared with untreated AZ31B alloy, it was clear that all MAO samples achieved smaller I corr values (Table 3), indicating that the MAO treatment could effectively improve the corrosion resistance of the AZ31B alloy.Among the nine samples, sample No. 3 exhibited the best corrosion resistance, and its I corr (1.48 × 10 −9 A/cm 2 ) was three orders of magnitude smaller than that of untreated AZ31B alloy.

Corrosion Resistance
Figure 5 shows the potentiodynamic polarization curves of untreated AZ31B alloy and the nine MAO treated samples.Derived from Figure 6, the electrochemical parameters of the tested sample could be achieved.The Ecorr and the Icorr of AZ31B alloy were −1.5287V (vs.SCE) and 4.06 × 10 −6 A/cm 2 , respectively.The achieved Icorr values of the nine MAO treated samples are listed in Table 3.The Icorr value reflects the corrosion resistance of the measured sample.The smaller the Icorr value, the better the corrosion resistance.Compared with untreated AZ31B alloy, it was clear that all MAO samples achieved smaller Icorr values (Table 3), indicating that the MAO treatment could effectively improve the corrosion resistance of the AZ31B alloy.Among the nine samples, sample No. 3 exhibited the best corrosion resistance, and its Icorr (1.48 × 10 −9 A/cm 2 ) was three orders of magnitude smaller than that of untreated AZ31B alloy.

Influences of Processing Factors on P, F and Zr Contents
The measured P, F, and Zr contents of the MAO coatings were set as the objective parameters, and the intuitionistic analysis was used to analyze the experimental data and reveal the influences of processing factors on the objective parameters.K1, K2, and K3 in Table 1 separately represent objective parameter summation of MAO coatings fabricated at the first, second, and third levels for each of the four processing factors.The maximum difference between K1, K2, and K3 for each factor reflects the

Influences of Processing Factors on P, F and Zr Contents
The measured P, F, and Zr contents of the MAO coatings were set as the objective parameters, and the intuitionistic analysis was used to analyze the experimental data and reveal the influences of processing factors on the objective parameters.K 1 , K 2 , and K 3 in Table 1 separately represent objective parameter summation of MAO coatings fabricated at the first, second, and third levels for each of the four processing factors.The maximum difference between K 1 , K 2 , and K 3 for each factor reflects the  1).Obviously, Na 12 Phy was the primary contributing factor to the P and F contents, and K 2 ZrF 6 mainly determined the Zr content of MAO coatings.
The influence of the four processing factors on the P, F, and Zr contents are shown in Figure 6.In detail, with the increasing NH 4 HF 2 concentration, the P and Zr amounts decreased while the F amount continually increased.The increasing Na 12 Phy concentration considerably increased the P but decreased both F and Zr amounts.With the increase of K 2 ZrF 6 concentration, the Zr contents increased progressively, while the P and F contents decreased gradually.Moreover, with the extension of treatment time, the F amount in anodic coatings continually decreased, while the P and Zr contents firstly decreased from Level 1 to Level 2 but then slightly increased from Level 2 to Level 3.These results showed that P, F, and Zr competed with each other to enter into MAO coatings.1).Obviously, Na12Phy was the primary contributing factor to the P and F contents, and K2ZrF6 mainly determined the Zr content of MAO coatings.
The influence of the four processing factors on the P, F, and Zr contents are shown in Figure 6.In detail, with the increasing NH4HF2 concentration, the P and Zr amounts decreased while the F amount continually increased.The increasing Na12Phy concentration considerably increased the P but decreased both F and Zr amounts.With the increase of K2ZrF6 concentration, the Zr contents increased progressively, while the P and F contents decreased gradually.Moreover, with the extension of treatment time, the F amount in anodic coatings continually decreased, while the P and Zr contents firstly decreased from Level 1 to Level 2 but then slightly increased from Level 2 to Level 3.These results showed that P, F, and Zr competed with each other to enter into MAO coatings.

Influences of Processing Factors on Corrosion Resistance and Thickness
The Icorr values of nine MAO samples derived from the potentiodynamic polarization curves in Figure 5 are listed in Table 3 and were selected as the objective parameter for corrosion evaluation.According to the intuitionistic analysis results shown in Table 2, the rank of processing factors on Icorr of the MAO samples was Na12Phy concentration > K2ZrF6 concentration > NH4HF2 concentration > treatment time.Based on Table 3, the influences of the four factors on Icorr value are shown in Figure 6.
The change trends of Icorr values with the four processing factors are shown in Figure 6.With the increasing NH4HF2 concentration, the Icorr values significantly increased, and therefore the corrosion resistance of MAO coatings evidently decreased.However, with the increase of Na12Phy concentration, the Icorr values decreased gradually, suggesting that Na12Phy was definitely beneficial to enhancing the corrosion resistance of the MAO coating.With the increase of K2ZrF6 concentration,

Influences of Processing Factors on Corrosion Resistance and Thickness
The I corr values of nine MAO samples derived from the potentiodynamic polarization curves in Figure 5 are listed in Table 3 and were selected as the objective parameter for corrosion evaluation.According to the intuitionistic analysis results shown in Table 2, the rank of processing factors on I corr of the MAO samples was Na 12 Phy concentration > K 2 ZrF 6 concentration > NH 4 HF 2 concentration > treatment time.Based on Table 3, the influences of the four factors on I corr value are shown in Figure 6.
The change trends of I corr values with the four processing factors are shown in Figure 6.With the increasing NH 4 HF 2 concentration, the I corr values significantly increased, and therefore the corrosion resistance of MAO coatings evidently decreased.However, with the increase of Na 12 Phy concentration, the I corr values decreased gradually, suggesting that Na 12 Phy was definitely beneficial to enhancing Coatings 2019, 9, 197 9 of 17 the corrosion resistance of the MAO coating.With the increase of K 2 ZrF 6 concentration, the I corr values of the MAO samples slightly increased from Level 1 to Level 2 but then significantly increased from Level 2 to Level 3 (Figure 6), indicating that excess high K 2 ZrF 6 was harmful to the coating corrosion resistance.Treatment time was the least important factor on I corr value, and the I corr firstly increased from Level 1 to Level 2 but then decreased from Level 2 to Level 3 (Figure 6).
The influencing sequence of four processing factors on the coating thickness was Na 12 Phy concentration > treatment time > K 2 ZrF 6 concentration > NH 4 HF 2 concentration (Table 3).The change trends of the coating thickness with four factors are shown in Figure 6.With the increasing Na 12 Phy concentration, the MAO coating first increased and then slowly decreased.With the prolongation of treatment time, the coating thickness gradually increased.K 2 ZrF 6 firstly decreased but then increased the coating thickness, while the increasing NH 4 HF 2 concentration presented a slightly decreased coating thickness.
The correlation between the I corr values and coating characteristics such as thickness, P, F, and Zr amounts is shown in Figure 7.It was clear that except Nos. 4 and 5, the coating thickness exhibited a negative effect on I corr values of the MAO treated alloy.On the contrary, the F amount in the MAO coatings exhibited a positive effect on I corr values.However, the interrelation between I corr and the amounts of P and Zr in MAO coatings remained unclear (Figure 7). the Icorr values of the MAO samples slightly increased from Level 1 to Level 2 but then significantly increased from Level 2 to Level 3 (Figure 6), indicating that excess high K2ZrF6 was harmful to the coating corrosion resistance.Treatment time was the least important factor on Icorr value, and the Icorr firstly increased from Level 1 to Level 2 but then decreased from Level 2 to Level 3 (Figure 6).The influencing sequence of four processing factors on the coating thickness was Na12Phy concentration > treatment time > K2ZrF6 concentration > NH4HF2 concentration (Table 3).The change trends of the coating thickness with four factors are shown in Figure 6.With the increasing Na12Phy concentration, the MAO coating first increased and then slowly decreased.With the prolongation of treatment time, the coating thickness gradually increased.K2ZrF6 firstly decreased but then increased the coating thickness, while the increasing NH4HF2 concentration presented a slightly decreased coating thickness.
The correlation between the Icorr values and coating characteristics such as thickness, P, F, and Zr amounts is shown in Figure 7.It was clear that except Nos. 4 and 5, the coating thickness exhibited a negative effect on Icorr values of the MAO treated alloy.On the contrary, the F amount in the MAO coatings exhibited a positive effect on Icorr values.However, the interrelation between Icorr and the amounts of P and Zr in MAO coatings remained unclear (Figure 7).

Influences of Electrolyte Components on Coating Development
As shown in Figure 1a, MAO coating developed on No. 1 was fabricated in the solution composed of 4 g/L NH4HF2, 8 g/L Na12Phy, and 5 g/L K2ZrF6 with a treatment time of 2.5 min.In order to clarify the influences of NH4HF2, Na12Phy, and K2ZrF6 on coating development, surface morphologies of the MAO treated samples fabricated in solutions composed of one, two, or three electrolyte solutions and the Icorr values of untreated AZ31B alloy measured in corresponding solutions are shown in Figure 8.
In a solution of 4 g/L NH4HF2, anodic coatings with rough characteristics were developed on a magnesium surface (Figure 8a).Icorr measured in the solution was 6.21 × 10 −6 A/cm 2 .During MAO treatment in 8 g/L Na12Phy, the working voltage increased very slowly and reached 161 V after 2.5 min.

Influences of Electrolyte Components on Coating Development
As shown in Figure 1a, MAO coating developed on No. 1 was fabricated in the solution composed of 4 g/L NH 4 HF 2 , 8 g/L Na 12 Phy, and 5 g/L K 2 ZrF 6 with a treatment time of 2.5 min.In order to clarify the influences of NH 4 HF 2 , Na 12 Phy, and K 2 ZrF 6 on coating development, surface morphologies of the MAO treated samples fabricated in solutions composed of one, two, or three electrolyte solutions and the I corr values of untreated AZ31B alloy measured in corresponding solutions are shown in Figure 8. of 4 g/L NH4HF2 + 8 g/L Na12Phy, 4 g/L NH4HF2 + 5 g/L K2ZrF6, and 8 g/L Na12Phy + 5 g/L K2ZrF6 were separately 3.46 × 10 −6 , 1.81 × 10 −4 , and 4.86 × 10 −5 A/cm 2 , while Icorr obtained in 4 g/L NH4HF2 + 8 g/L Na12Phy + 5 g/L K2ZrF6 was 1.01 × 10 −5 A/cm 2 (Figure 8g).The results showed that coating development on magnesium alloy in a used solution was determined by electrolyte component and Icorr of untreated AZ31B measured in the solution.In general, anodic coatings fabricated in the solution with a low Icorr achieved good property.

The Entrance Mechanisms of P, F, and Zr into MAO Coatings
Formation of MAO coatings on valve metals is a complex process potentially involving anodic oxidation, thermal oxidation, and plasma-chemical reactions [19].In this study, the development of anodic coatings containing P, F, and Zr can be classified into two stages, as shown in Figure 9.In the first stage, the ionization of the used electrolytes occurs.For example, Na12Phy is ionized into phytic acid radicals (IP6), while NH4HF2 can be ionized into NH4 + , HF, and F − (shown as red circle in Figure 9): In a solution of 4 g/L NH 4 HF 2 , anodic coatings with rough characteristics were developed on a magnesium surface (Figure 8a).I corr measured in the solution was 6.21 × 10 −6 A/cm 2 .During MAO treatment in 8 g/L Na 12 Phy, the working voltage increased very slowly and reached 161 V after 2.5 min.Observed by SEM, the fabricated film achieved evident cracks (Figure 8b).The tested I corr in 8 g/L Na 12 Phy was 2.31 × 10 −5 A/cm 2 , evidently larger than that in 4 g/L NH 4 HF 2 .However, in the solution of 5 g/L K 2 ZrF 6 , the working voltage firstly increased slowly to 96 V but then fluctuated at about 60 V. Anodic coatings could not develop, and I corr in the solution was 1.58 × 10 −5 A/cm 2 (Figure 8c).
In solutions composed of two electrolyte components, the AZ31B samples were MAO treated, and the results are shown in Figure 8d-f.In the solution composed of 4 g/L NH 4 HF 2 + 8 g/L Na 12 Phy, the working voltage reached 295 V after 2.5 min, and the fabricated coatings exhibited typically porous structure (Figure 8d).However, it was evident that in solutions composed of 4 g/L NH 4 HF 2 + 5 g/L K 2 ZrF 6 and 8 g/L Na 12 Phy + 5 g/L K 2 ZrF 6 , anodic coatings could not develop on magnesium alloy (Figure 8e,f).After 5 g/L K 2 ZrF 6 was added into the solution of 4 g/L NH 4 HF 2 + 8 g/L Na 12 Phy, the developed MAO coatings achieved self-sealing characteristics (Figure 1a or Figure 8g), demonstrating that K 2 ZrF 6 played a sealing role on anodic coatings.I corr values measured in solutions of 4 g/L NH 4 HF 2 + 8 g/L Na 12 Phy, 4 g/L NH 4 HF 2 + 5 g/L K 2 ZrF 6 , and 8 g/L Na 12 Phy + 5 g/L K 2 ZrF 6 were separately 3.46 × 10 −6 , 1.81 × 10 −4 , and 4.86 × 10 −5 A/cm 2 , while I corr obtained in 4 g/L NH 4 HF 2 + 8 g/L Na 12 Phy + 5 g/L K 2 ZrF 6 was 1.01 × 10 −5 A/cm 2 (Figure 8g).The results showed that coating development on magnesium alloy in a used solution was determined by electrolyte component and I corr of untreated AZ31B measured in the solution.In general, anodic coatings fabricated in the solution with a low I corr achieved good property.

The Entrance Mechanisms of P, F, and Zr into MAO Coatings
Formation of MAO coatings on valve metals is a complex process potentially involving anodic oxidation, thermal oxidation, and plasma-chemical reactions [19].In this study, the development of anodic coatings containing P, F, and Zr can be classified into two stages, as shown in Figure 9.In the first stage, the ionization of the used electrolytes occurs.For example, Na 12 Phy is ionized into phytic acid radicals (IP6), while NH 4 HF 2 can be ionized into NH 4 + , HF, and F − (shown as red circle in magnesium phosphate and magnesium fluoride are 10 -10 and 6.5 × 10 , respectively [42].PO4 ions preferentially combine with Mg 2+ to develop stable Mg3(PO4)2 (Equation ( 5)).Therefore, Na12Phy is the important factor contributing to the F and Zr contents, and the increasing Na12Phy concentration decreases both F and Zr amounts in MAO coatings.
Compared with K2ZrF6, NH4HF2 plays a larger role on the F amount (Table 1).The reason behind this may result from the different moving speed of HF2 − or F − from NH4HF2 and ZrF6 2− from K2ZrF6 in a water solution.Due to a comparatively large spatial structure [43], ZrF6 2− moves slower in a water solution than HF2 − or F − .As shown in Figure 7, with the increasing K2ZrF6 concentration, the Zr amount in anodic coatings increases significantly, while the F amount slowly decreases.The reasoning may be that the reaction of ZrF6 2− combining with OH − into Zr(OH)5 − and F -takes place near the anode (Figure 9).The electric field causes the ZrF6 2− ions to move slowly toward the anode.After arriving at the anode, ZrF6 2− ions combine with OH − into Zr(OH)5 − and F -under high temperatures due to sparks discharging (Equation ( 6)).Next, Zr(OH)5 − and F − separately enter into anodic coatings, according to Equations ( 7)- (9).Because of the slower ZrF6 2− speed compared to that of HF2 − or F − (Figure 9) and the late reaction of ZrF6 2− into Zr(OH)5 − and F − , the F − from ZrF6 2− has less influence on the F amount than F − from NH4HF2.In contrast, the obtained Zr(OH)5 − from ZrF6 2− can develop into considerable amounts of Mg2Zr5O12 and ZrO2 (Equations ( 7) and ( 8)), resulting in the comparative decrease of F element in anodic coatings.The used electrolytes should first arrive at the anode by diffusion or electromigration and then enter into MAO coatings through a serious of chemical reactions.Cations move to the anode mainly by diffusion, while anions can arrive at the anode by both diffusion and electromigration.Between the moving speed and reaction speed, the slower step determines the amount that develops in MAO coatings.Treatment time can affect the coating compositions by determining the intensity of the electric field.With a prolonged treatment time, the electric field becomes stronger, and therefore the anions in the solution move faster toward the anode [12,39].In this study, P, F, and Zr compete with each other to enter anodic coatings, causing a complex influencing mechanism of treatment time on coating compositions.F − ions move quickly due to their comparatively small spatial structure [44], resulting in the F amount in anodic coatings to be mainly determined by reaction speed.In contrast, the P and Zr amounts are mainly determined by the movement speed of phytic acid radicals and ZrF6 2− .Therefore, the prolonged treatment time is helpful for improving the P and Zr amounts but decreases the F amount.When treatment time is prolonged from 3.0 to 3.5 min, the Zr amount slightly In the second stage, namely MAO, work voltage continually increases, and moving sparks appear on the sample surface.In this stage, a magnesium alloy sample is oxidized into Mg 2+ : During MAO, an electric field develops between the anode and the cathode, driving anions such as F − , OH − , phytic acid radicals, and ZrF 6 2− towards the anode [12,39].When these anions arrive at the anode, they compete against each other to combine with Mg 2+ and develop stable ceramic coatings under instantaneous high temperature and high pressure.As listed in Table 2, the fabricated anodic coating contains P, which originates from Na 12 Phy.Na 12 Phy is an organic phosphorus-containing substance and remains stable at low temperatures.However, Na 12 Phy can be hydrolyzed between temperatures of 320 and 345 • C [40].During MAO, the instantaneous high temperature on the anode surface due to sparks discharging can result in the hydrolysis of Na 12 Phy into phosphorylated myo-myo-inositols (IP1-IP5) and inorganic phosphate [41], which may include the following equations: In the second stage, namely MAO, work voltage continually increases, and moving sparks appear on the sample surface.In this stage, a magnesium alloy sample is oxidized into Mg 2+ : During MAO, an electric field develops between the anode and the cathode, driving anions such as F − , OH − , phytic acid radicals, and ZrF6 2− towards the anode [12,39].When these anions arrive at the anode, they compete against each other to combine with Mg 2+ and develop stable ceramic coatings under instantaneous high temperature and high pressure.As listed in Table 2, the fabricated anodic coating contains P, which originates from Na12Phy.Na12Phy is an organic phosphorus-containing substance and remains stable at low temperatures.However, Na12Phy can be hydrolyzed between temperatures of 320 and 345 °C [40].During MAO, the instantaneous high temperature on the anode surface due to sparks discharging can result in the hydrolysis of Na12Phy into phosphorylated myomyo-inositols (IP1-IP5) and inorganic phosphate [41], which may include the following equations: (5) Besides P element, F and Zr are also incorporated into the MAO coatings.F in MAO coatings comes from both NH4HF2 and K2ZrF6, while Zr originates from K2ZrF6.K2ZrF6, a complex electrolyte containing both F and Zr elements, is the most important factor on Zr content but is the least important factor on F content (Table 1).In a solution containing NH4HF2 and K2ZrF6, the following reactions may be involved [18,19]: Zr(OH)5 During MAO, Zr(OH)5 − and F − (shown as green circle in Figure 9) are firstly obtained from ZrF6 2− according to Equation (6).Then, Zr(OH)5 − ions take part in the coating formation by converting into Mg2Zr5O12 or ZrO2 in MAO coatings (Equations ( 7) and ( 8)).F − ions are mainly combined with Mg 2+ Besides P element, F and Zr are also incorporated into the MAO coatings.F in MAO coatings comes from both NH 4 HF 2 and K 2 ZrF 6 , while Zr originates from K 2 ZrF 6 .K 2 ZrF 6 , a complex electrolyte containing both F and Zr elements, is the most important factor on Zr content but is the least important factor on F content (Table 1).In a solution containing NH 4 HF 2 and K 2 ZrF 6 , the following reactions may be involved [18,19]: 5Zr(OH) 5 Zr(OH) 5 During MAO, Zr(OH) 5 − and F − (shown as green circle in Figure 9) are firstly obtained from ZrF 6 2− according to Equation (6).Then, Zr(OH) 5 − ions take part in the coating formation by converting into Mg 2 Zr 5 O 12 or ZrO 2 in MAO coatings (Equations ( 7) and ( 8)).F − ions are mainly combined with Mg 2+ to develop stable MgF 2 (Equation ( 9)).Therefore, Zr and F from K 2 ZrF 6 compete with each other to take part in the coating formation.
The solubility of the developed products is a main factor in determining the combination sequence of these anions with Mg 2+ ion.At 298.15 K, the solubility product constant (K sp ) of magnesium phosphate and magnesium fluoride are 10 −27 -10 −23 and 6.5 × 10 −9 , respectively [42].PO  7, with the increasing K 2 ZrF 6 concentration, the Zr amount in anodic coatings increases significantly, while the F amount slowly decreases.The reasoning may be that the reaction of ZrF 6 2− combining with OH − into Zr(OH) 5 − and F − takes place near the anode (Figure 9).The electric field causes the ZrF 6 2− ions to move slowly toward the anode.After arriving at the anode, ZrF 6 2− ions combine with OH − into Zr(OH) 5 − and F − under high temperatures due to sparks discharging (Equation ( 6)).Next, Zr(OH) 5 − and F − separately enter into anodic coatings, according to Equations ( 7)- (9).Because of the slower ZrF 6 2− speed compared to that of HF 2 − or F − (Figure 9) and the late reaction of ZrF  7) and ( 8)), resulting in the comparative decrease of F element in anodic coatings.
The used electrolytes should first arrive at the anode by diffusion or electromigration and then enter into MAO coatings through a serious of chemical reactions.Cations move to the anode mainly by diffusion, while anions can arrive at the anode by both diffusion and electromigration.Between the moving speed and reaction speed, the slower step determines the amount that develops in MAO coatings.Treatment time can affect the coating compositions by determining the intensity of the electric field.With a prolonged treatment time, the electric field becomes stronger, and therefore the anions in the solution move faster toward the anode [12,39].In this study, P, F, and Zr compete with each other to enter anodic coatings, causing a complex influencing mechanism of treatment time on coating compositions.F − ions move quickly due to their comparatively small spatial structure [44], resulting in the F amount in anodic coatings to be mainly determined by reaction speed.In contrast, the P and Zr amounts are mainly determined by the movement speed of phytic acid radicals and ZrF 6 2− .Therefore, the prolonged treatment time is helpful for improving the P and Zr amounts but decreases the F amount.When treatment time is prolonged from 3.0 to 3.5 min, the Zr amount slightly decreases (Table 1).The reason may be that under this condition, the Zr amount increases slower than the P amount, and therefore the Zr amount comparatively decreases.

Influence of Processing Factors on Corrosion Resistance
The corrosion resistance of the fabricated MAO samples is jointly determined by coating characteristics such as coating thickness, surface morphology, phase structure, and the used substrate [3,9,11,13,14,16,17,19,36,[44][45][46].The thick MAO coating with a uniform surface, a compact inner layer, and chemically stable components can effectively prevent the corrosion solution from penetrating the coating and reacting with magnesium substrate.Among coating characteristics, coating thickness plays an important role in its corrosion resistance.With increasing coating thickness, the corrosion resistance of MAO treated samples increases [13,14].Besides coating thickness, surface morphology such as micro-cracks, micro pore size, and porosity can effectively influence the corrosion resistance of MAO treated magnesium alloys [3,13,17,45,46].For example, with an increasing KOH concentration, through porosity also increases and corrosion resistance decreases [46].
In this study, the changing regularity of P and Zr amounts with that of I corr is not clear (Figure 7), indicating that the influences of P and Zr on the corrosion resistance is not fixed.According to Figure 8, the coating thickness and the F amount in MAO coatings are approximately closely related with I corr of MAO treated samples.With the increased coating thickness, the MAO coatings achieve decreased I corr and therefore good corrosion resistance.However, sample No. 7 achieves the worst corrosion resistance, yet its coating thickness is not the thinnest (Table 3), indicating that besides coating thickness, other factors such as chemical compositions and surface morphology of MAO coatings can also influence the corrosion resistance.NH 4 HF 2 , an acidic fluorine-containing substance, is usually used as a corrosion inhibitor for magnesium alloy in electroless nickel plating [33,34].The measured I corr in 4 g/L NH 4 HF 2 is very low and anodic coatings can be developed in the solution (Figure 8a).As listed in Tables 1 and 2, the increasing NH 4 HF 2 concentration significantly increases the F amount but decreases the coating thickness and corrosion resistance (Table 3).These results indicate that NH 4 HF 2 is beneficial for the coating formation and takes part in coating formation.However, compared with Na 12 Phy, K 2 ZrF 6 , or treatment time, NH 4 HF 2 has little influence on coating thickness and therefore continually decreases the corrosion resistance.
Na 12 Phy or phytic acid is a corrosion inhibitor of copper [47], aluminum alloy [48], and magnesium alloy [34].The results show that Na 12 Phy promotes the formation of a passive film but is not a suitable candidate for the inhibition of copper corrosion due to its low inhibition efficiency [47].Compared with NH 4 HF 2 or K 2 ZrF 6 , I corr measured in 8 g/L Na 12 Phy is the largest, but anodic coatings with many cracks are developed on AZ31B alloy (Figure 8b).After 4 g/L NH 4 HF 2 is added into the solution of 8 g/L Na 12 Phy, the measured I corr is very small and uniform, and compact MAO coatings are developed on magnesium alloys (Figure 8d).As listed in Table 3, Na 12 Phy can significantly increase the coating thickness and therefore improve the corrosion resistance.
Unlike NH 4 HF 2 or Na 12 Phy, K 2 ZrF 6 is not an inhibitor of magnesium alloys [33].In a solution containing 5 g/L K 2 ZrF 6 , the coating cannot develop (Figure 8c), which may be due to the acidic characteristics of K 2 ZrF 6 .After 4 g/L NH 4 HF 2 or 8 g/L Na 12 Phy is added into the solution of 5 g/L K 2 ZrF 6 , anodic coatings still cannot develop (Figure 8e,f), demonstrating that K 2 ZrF 6 belongs to the corrosive agent of magnesium alloys.In fact, ZrF 6 2− is usually used to develop a conversion film on magnesium alloys [49].Only under the combined action of NH 4 HF 2 and Na 12 Phy can K 2 ZrF 6 take part in coating formation and develop self-sealing coatings.K 2 ZrF 6 plays a positive and a negative role on coating corrosion resistance.On the one hand, the fabricated MAO samples in solutions containing K 2 ZrF 6 achieve excellent corrosion resistance due to the superior stability of ZrO 2 [16] and the developed self-sealing coatings [17][18][19].On the other hand, surface cracks develop on MAO coating in solutions containing K 2 ZrF 6 [17,18].As listed in Table 2, when Na 12 Phy, NH 4 HF 2 , Na 12 Phy, and treatment time are separately at Level 1, Level 3, Level 3, and Level 2, the fabricated sample No. 7 achieves the worst corrosion resistance, which may be attributed to the evident micro-cracks (Figure 1g) and rough microstructure (Figure 2g).Therefore, with the increase of K 2 ZrF 6 concentration, the corrosion resistance slightly decreases from 5 to 10 g/L but significantly deteriorates from 10 to 15 g/L (Table 3).

Conclusions
P and F are essential elements of human beings, while zirconium oxides are bioinert with good biocompatibility.The influences of NH 4 HF 2 , Na 12 Phy, and K 2 ZrF 6 concentrations as well as treatment time on the corrosion resistance of MAO treated samples were systematically investigated using the orthogonal method.In addition, the entrance mechanisms of P, F, and Zr into MAO coatings were discussed.The developed anodic coatings can effectively improve the corrosion resistance of magnesium alloys.Some conclusions are as follows:

Figure 4
Figure 4 displayed the survey spectrum and high-resolution XPS spectra of C, P, and Zr elements on sample No. 3. The developed MAO coatings on sample No. 3 consisted of C, Mg, O, P, Zr, F, and Al elements (Figure 4a).The C 1s spectrum could be divided into two component peaks at 284.6 and 286.5 eV, which were separately assigned to C-C(H) and C-O.The P 2p spectrum exhibited two peaks at 133.4 and 134.3 eV (Figure 4c), which represented PO 4 3− and HPO 4 2−, respectively[37].The Zr 3d

Figure 4
Figure 4 displayed the survey spectrum and high-resolution XPS spectra of C, P, and Zr elements on sample No. 3. The developed MAO coatings on sample No. 3 consisted of C, Mg, O, P, Zr, F, and Al elements (Figure4a).The C 1s spectrum could be divided into two component peaks at 284.6 and 286.5 eV, which were separately assigned to C-C(H) and C-O.The P 2p spectrum exhibited two peaks at 133.4 and 134.3 eV (Figure4c), which represented PO4 3− and HPO4 2− , respectively[37].The Zr 3d spectrum was divided into two peaks at 182.1 and 184.3 eV, corresponding to zirconium oxide[38].

Figure 5 .
Figure 5. Potentiodynamic polarization curves of untreated AZ31B alloy and nine MAO treated samples measured in simulated body fluid (SBF).

Figure 5 .
Figure 5. Potentiodynamic polarization curves of untreated AZ31B alloy and nine MAO treated samples measured in simulated body fluid (SBF).

Figure 6 .
Figure 6.The influences of the processing parameters on the P, F, Zr contents, and the coating thickness and Icorr: (A) NH4HF2 concentration; (B) Na12Phy concentration; (C) K2ZrF6 concentration; and (D) treatment time.

Figure 6 .
Figure 6.The influences of the processing parameters on the P, F, Zr contents, and the coating thickness and I corr : (A) NH 4 HF 2 concentration; (B) Na 12 Phy concentration; (C) K 2 ZrF 6 concentration; and (D) treatment time.

Figure 7 .
Figure 7.The correlation between Icorr of nine MAO treated samples with P, F, and Zr amounts and coating thickness.

Figure 7 .
Figure 7.The correlation between I corr of nine MAO treated samples with P, F, and Zr amounts and coating thickness.

Figure 9 .
Figure 9.The schematic diagram of P, F, and Zr into MAO coatings.Illustrations: the red F − comes from NH4HF2; the green F − comes from K2ZrF6; (IP1-IP5) is the lower inositol phosphate ester due to the hydrolysis of Na12Phy.

Figure 9 .
Figure 9.The schematic diagram of P, F, and Zr into MAO coatings.Illustrations: the red F − comes from NH 4 HF 2 ; the green F − comes from K 2 ZrF 6 ; (IP1-IP5) is the lower inositol phosphate ester due to the hydrolysis of Na 12 Phy.

Table 1 .
The orthogonal array and experimental results about the contents of P, F, and Zr elements.

Table 2 .
Elemental compositions of anodic coatings developed on nine MAO treated samples (at.%).

Table 2 .
Elemental compositions of anodic coatings developed on nine MAO treated samples (at.%).

Table 3 .
The orthogonal array and experimental results about Icorr values and the thickness of MAO treated samples.

Table 3 .
The orthogonal array and experimental results about I corr values and the thickness of MAO treated samples.

Table 1 ,
Nos. 3, 5, and 7 contained high Zr contents(5.38,4.48,and 4.58 at.%), while No. 6 achieved low Zr amount (1.84 at.%).The XRD spectra of untreated AZ31B alloy and the four MAO samples above are displayed in Figure effect of that factor.Based on this point of view, the influencing ranks of four processing factors on P, F, and Zr content were separately: Na 12 Phy concentration > K 2 ZrF 6 concentration > treatment time > NH 4 HF 2 concentration; Na 12 Phy concentration > NH 4 HF 2 concentration > treatment time > K 2 ZrF 6 concentration; and K 2 ZrF 6 concentration > NH 4 HF 2 concentration > Na 12 Phy concentration > treatment time (Table general Coatings 2019, 9, x FOR PEER REVIEW 8 of 17 general effect of that factor.Based on this point of view, the influencing ranks of four processing factors on P, F, and Zr content were separately: Na12Phy concentration > K2ZrF6 concentration > treatment time > NH4HF2 concentration; Na12Phy concentration > NH4HF2 concentration > treatment time > K2ZrF6 concentration; and K2ZrF6 concentration > NH4HF2 concentration > Na12Phy concentration > treatment time (Table 4  3− ions preferentially combine with Mg 2+ to develop stable Mg 3 (PO 4 ) 2 (Equation (5)).Therefore, Na 12 Phy is the important factor contributing to the F and Zr contents, and the increasing Na 12 Phy concentration decreases both F and Zr amounts in MAO coatings.Compared with K 2 ZrF 6 , NH 4 HF 2 plays a larger role on the F amount (Table1).The reason behind this may result from the different moving speed of HF 2 − or F − from NH 4 HF 2 and ZrF 6 2− from K 2 ZrF 6 − .As shown in Figure

•
NH 4 HF 2 , Na 12 Phy, and K 2 ZrF 6 all partake in the coating formation, and the fabricated MAO coatings are mainly composed of Mg 3 (PO 4 ) 2 , ZrO 2 , Mg 2 Zr 5 O 12 , and MgF 2 .NH 4 HF 2 and Na 12 Phy, the corrosion inhibitors of magnesium alloys, are beneficial but K 2 ZrF 6 is harmful to develop anodic coatings.Only under the combined action of NH 4 HF 2 and Na 12 Phy can K 2 ZrF 6 take part in coating formation and develop self-sealing coatings; • The corrosion resistance of MAO coatings is synergistically determined by coating characteristics such as coating thickness, surface morphology, and phase structure, though the coating thickness plays a main role.Na 12 Phy significantly improves but NH 4 HF 2 decreases the corrosion resistance of MAO coatings, while excess high K 2 ZrF 6 is harmful to the coating corrosion resistance.Treatment time can increase the coating thickness but is the least important factor on corrosion resistance; • P, F, and Zr compete with each other to enter into anodic coatings.The influencing rank on P content is Na 12 Phy concentration > K 2 ZrF 6 concentration > treatment time > NH 4 HF 2 concentration.With the increase of Na 12 Phy or the decrease of K 2 ZrF 6 concentration, the P amount of anodic coatings increases.The sequence of processing factors on F content is Na 12 Phy concentration > NH 4 HF 2 concentration > treatment time > K 2 ZrF 6 concentration.The F amount decreases with the increasing Na 12 Phy concentration, decreasing NH 4 HF 2 concentration, prolonging treatment time, or increasing K 2 ZrF 6 concentration.The order on the Zr amount is K 2 ZrF 6 concentration > NH 4 HF 2 concentration > Na 12 Phy concentration > treatment time.The Zr content can be increased by increasing K 2 ZrF 6 concentration, decreasing NH 4 HF 2 and Na 12 Phy concentrations, or with proper treatment.