In-situ control of microdischarge characteristics in unipolar pulsed plasma electrolytic oxidation of aluminum

Microdischarges occurring during plasma electrolytic oxidation are the main mechanism promoting oxide growth compared to classical anodization. When the dissipated energy by microdischarges during the coating process gets too large, high-intensity discharges might occur, which are detrimental to the oxide layer. In bipolar pulsed plasma electrolytic oxidation a so called ‘soft-sparking’ mode limits microdischarge growth. This method is not available for unipolar pulsing and for all material combinations. In this work, the authors provide a method to control the size- and intensity distributions of microdischarges by utilizing a multivariable closed-loop control. In-situ detection of microdischarge properties by CCD-camera measurements and fast image processing algorithms are deployed. The visible size of microdischarges is controlled by adjusting the duty cycle in a closed-loop feedback scheme, utilizing a PI-controller. Uncontrolled measurements are compared to controlled cases. The microdischarge sizes are controlled to a mean value of A=5⋅10−3mm2 and A=7⋅10−3mm2, respectively. Results for controlled cases show, that size and intensity distributions remain constant over the processing time of 35 minutes. Larger, high-intensity discharges can be effectively prevented. Optical emission spectra reveal, that certain spectral lines can be influenced or controlled with this method. Calculated black body radiation fits with very good agreement to measured continuum emission spectra ( T=3200 K). Variance of microdischarge size, emission intensity and continuum radiation between consecutive measurements is reduced to a large extent, promoting uniform microdischarge and oxide layer properties. A reduced variance in surface defects can be seen in SEM measurements, after coating for 35 minutes, for controlled cases. Surface defect study shows increased number density of microdischarge impact regions, while at the same time reducing pancake diameters, implying reduced microdischarge energies compared to uncontrolled cases.

Original Content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.

Introduction
Plasma electrolytic oxidation (PEO) is a process to passivate various lightweight metals. Up until now, methods to coat Al, Ti, Mg, Zr, Zn, Mo, Nb, Si, Ta and their respective alloys have been found [1][2][3][4][5][6][7][8][9]. New results show that even carbon steels can be coated by PEO with an insulating oxide layer [10]. An addition of chemical compounds or even solids, like nanoparticles, increases the range of producible surfaces dramatically. Due to this flexibility, the PEO process has gained popularity over the last 20 years, as the number of journal publications per year has risen from around 20 in 2003, to over 450 in 2017 [11]. One of the main differences to classical anodization is an increased cell voltage. The increase of cell voltage over a process and material specific voltage, which is believed to be the breakdown voltage of the oxide layer, leads to the generation of microdischarges on the anode surface. These microdischarges are statistically distributed on the surface with lifetimes of 10-1000 µs [12][13][14]. In the literature, it is widely accepted that microdischarges are one of the main factors of enhanced coating growth characteristics in comparison to classical anodization [15]. Due to the temporally and spatially stochastic nature of microdischarges, a detailed analysis is a challenging task.
The process of plasma electrolytic oxidation can be divided into two different regimes concerning the dynamic behaviour of voltage and current. The constant voltage mode is called potentiostatic mode. In this mode, the current is limited by oxide layer conductivity. A large current spike in the beginning is followed by a rapid fall in amplitude, due to the growth of oxide layer thickness [16,17]. The number and size of microdischarges exhibits a maximum in the beginning, where the current is at the maximum. As the current decreases, the individual microdischarge size rises to a certain level and decreases thereafter. This effect results in a limiting of the maximum microdischarge energy and reduces highintensity discharges, which can be detrimental to the oxide layer [18]. However, the coating growth rate is proportional to the current (or current density). This proportionality was derived from Faraday's law in classical anodization and was experimentally verified for the PEO process [19,20]. The PEO process does not obey Faraday's law anymore, as it is much more complex, but the dependency on current density is still accurate. So the self-limited scaling behaviour is accompanied by a reduced coating growth in the potentiostatic mode. In contrast, the galvanostatic mode exhibits a constant coating growth over time, utilizing a constant current mode [19]. In this case, the voltage rises rapidly in the non-plasma anodization phase, while growing slower during the onset of microdischarges and behaves proportional to the oxide layer thickness [19]. At this point, microdischarges are relatively small, but large in number density [21]. With growth of the oxide layer the size of microdischarges increases and the corresponding number density decreases. The lifetime and current per individual microdischarge increases as well [21]. A rise in generator voltage leads to more energetic microdischarges, as individual surface area and depth of the oxide layer increases. As a result, by keeping the generator current constant, the number of simultaneous microdischarges has to fall. If individual current of microdischarges becomes too large, arcing might occur [1].
To prevent this, a method has been developed to limit the maximum size and energy per discharge for the galvanostatic mode. In bipolar pulsed plasma electrolytic oxidation the charge ratio between positive and negative half cycles is important to generate a so called soft-sparking mode [22]. Martin et al found that the build-up of negative and positive charge plays an important role in the onset of a so-called 'soft-sparking' mode [23]. As a matter of fact, the negative half cycle is important for decharging the oxide surface and changing the dynamic behaviour of microdischarges. It was observed that the strongest microdischarges were reduced compared to unipolar pulsing and reduced electron temperature spikes were recorded using optical emission spectroscopy [15]. However, bipolar pulsing can also be disadvantageous, as the changed polarity also leads to dissolution of the oxide layer. Gao et al reported that negative pulsing might result in reduced corrosion resistance and an increase in surface defects compared to unipolar pulsing for treated magnesium substrates [24]. A soft-sparking mode established by bipolar pulsing may therefore not be applicable in every process. These findings were supported by Tsai and Chou, who found that the dense inner layer of coatings on magnesium and titanium were inferior compared to the inner layer of aluminum coatings. Comparable coating characteristics to aluminum could only be reproduced by inserting aluminate anions to the electrolyte [25]. For unipolar pulsed plasma electrolytic oxidation there is no method known comparable to a 'soft-sparking' mode. Dehnavi et al reported reduced duty cycles in a unipolar pulsed configuration may lead to a slightly higher number of microdischarges and slightly smaller individual size of microdischarges [26]. That study was devoted to parametric changes of electrical parameters and gave way to following research in this area.
Typically, the PEO process is set to certain electrical parameters at the beginning, which are constant over time (galvanostatic or potentiostatic operation). As there is no feedback loop regarding microdischarge characteristics, the microdischarge behaviour changes with growth of the oxide layer. In this work, a method to keep the microdischarge size constant over time by a control of pulse duty cycle and current amplitude is proposed (closed-loop control). The current amplitude I(t) is increased anti-proportionally to the duty cycle, to compensate for a smaller pulse-on time T on (t). This ensures a constant charge transfer Q(t) to the sample, which would otherwise be reduced with coating time, like in the potentiostatic mode of operation.

Experimental setup
A schematic of the experimental setup is shown in figure 1. The process chamber consists of a double walled glass cylinder with mountings of optical grade, quartz glass windows on opposite sides. A cooling pump (Julabo FP-35) is connected to a heat exchanger system to keep the electrolyte temperature under control. Heat exchange and mixing of electrolyte is achieved by a magnetic stirrer on the bottom of the vessel. A PTFE coated PT-100 sensor is connected to an A/D-converter and measures the electrolyte temperature during the coating process. A cylindrical stainless steel electrode acts as the cathode. Aluminum (6061) specimen are cut to 20 × 10 mm in size and are polished, degreased and rinsed before treatment. The electrolyte consists of distilled water with an addition of 1 g/l potassium hydroxide (KOH). A power supply (Magpuls MP2-30) generates a rectangular, unipolar pulsed waveform, while controlling the time averaged current. Possible frequency range is between 50 Hz to 100 kHz. In the beginning of each treatment, the generator current is set to 0.5 A for a duty cycle of 0.5. Pulse on-time is set to 200 µs. This leads to an initial frequency of 2500 kHz. Reduction of duty cycle is achieved by a decrease in pulse-on time. The pulseoff time is constant (200 µs). A minimum pulse-on time of 10 µs is programmed into the control setup to limit the minimum value in case of error. For this case, a maximum pulsing frequency of 4.76 kHz would be applied. The current amplitude is increased anti-proportionally to the duty cycle, so that a constant charge transfer is achieved. Aluminum specimen are processed for a duration of 35 minutes. A scientific CCDcamera (PCO sensicam qe) records microdischarges during the process with a repetition frequency of 1 Hz and an exposure time of 20 ms. The working distance, together with a zoom lens (Navitar 6000 Zoom Lens), is adjusted to reach a pixel size of 13 µm. A digital oscilloscope (LeCroy Waverunner 8254) is equipped with a differential voltage divider (Tektronix ADP305) and a current probe (LeCroy CP030) for the monitoring of discharge voltage and current for each pulse and over the processing time. Optical emission spectra of microdischarges are recorded with an OceanOptics QE65 000 spectrometer. Emission spectra are recorded with a repetition rate of 1 Hz, an exposure time of 1000 ms and corrected to the efficiency of the used spectrometer. The optical spectrometer is relatively calibrated by means of tungsten ribbon lamp and a deuterium lamp for a wavelength range of 200 nm to 950 nm. All are controlled by LabView software and generated data is transferred to a personal computer. Defect size and structure of aluminum specimen after treatment are investigated with a scanning electron microscope (Jeol JSM-6510).

Discharge detection and closed-loop control
Microdischarges are analyzed with an in-house developed MATLAB code. In a first step, the contrast is increased to the boundaries of each intensity histogram. Noise is reduced by using a two-dimensional 5 x 5 Wiener filter. Inhomogeneous lighting and 'hot-pixels' are removed by subtracting a background image without microdischarge emission. Following is image segregation. In image processing, there are several methods for image segregation and object identification. Greyscale images can either be filtered by edge detection or intensity based algorithms. Two-dimensional edge detection algorithms, like the sobel operator, are typically computationally intensive. The algorithm scales with f ∈ O(n 2 ) in Landau notation, where n denotes the number of pixels [27]. In contrast to that, intensity based algorithms, like thresholding high-pass filters, scale with f ∈ O(n) [27]. The resolution (can be seen as n) of each image has to be as high as possible, ensuring that the minimum size of a microdischarge is as large as the pixel size. Therefore, a simple threshold based algorithm is implemented for microdischarge segmentation. In image processing, the threshold value for the high-pass filter is often deducted by unsupervised adaptive threshold methods. These methods, like Otsu's method [28], are computationally intensive and therefore not suitable for an in-situ application. Furthermore, the threshold level changes the number of pixels detected in an image and a time-variant value would change the size of detected microdischarges. For the sake of comparability, a fixed threshold is chosen. The value is chosen by taking a raw set of expected images in an uncontrolled case and running the method of maximum entropy by Yin [29]. By applying this threshold filter, the image is converted into a binary image. Following this procedure, coherent pixels are merged and then labelled. The size of individual microdischarges equals the number of pixels, multiplied with the area per pixel (pixel area: 13 · 13 µ m 2 ), determined by the optical setup. The mean microdischarge size is calculated for each frame by dividing the summed microdischarge area by the number of microdischarges. Graphical demonstration of the microdischarge detection algorithm is shown in figure 2. Mean microdischarge size, photoemission intensities and discharge number per recording are evaluated and saved in a text file. Figure 3 visualizes the multivariable control loop approach by using a block diagram. The manipulated variables are the duty cycle (or T on ), while the time averaged current and the microdischarge size are the controlled variables. Both control loops serve different goals. The averaged current I is internally controlled by the power supply to maintain galvanostatic operation with constant charge transfer in respect to the processing time. The transferred charge Q is calculated using Control of the microdischarge size is performed by the optical detection path and a software implemented PI-controller manipulating the duty cycle. A LabView program controls the whole process from the hardware-and software side. Camera recordings taken with a repetition rate of 1 Hz are saved in a binary format and read by the MATLAB discharge detection code. Evaluated information is stored in a text file and read by LabView. This information can be used as a process variable for a closed-loop control of the mean microdischarge size. A digital PI-controller is used as the controlling element. PI-controller parameters are calculated by instability criteria [30]. Yerokhin et al [31] found that the system response for voltage and current are linear in a wide range of operating voltages. In case of a change in duty cycle and current amplitude, the change in discharge size and discharge number are non-linear. The plasma electrolytic oxidation process itself is time-variant, depending mainly on the oxide surface thickness and composition. In control engineering this is called process state variable. For a time interval of tens of seconds, the system response, and therefore the state, can be linearized to a time-invariant timescale [32]. A non-linear and time variant system response makes it more difficult to find adequate PIcontroller values. Therefore, a gain scheduling scheme is used in this work [33]. The sensitivity to changes in the duty-cycle increases with increasing oxide thickness, therefore the proportional value is decreased with processing time. The digital PI-controller programmed in LabView transfers a new value for the duty cycle to the power supply. The microdischarge detection algorithm takes around 100 ms (160 ms in the worst case) to complete on our personal computer system. The entire process loop takes less than t < 500 ms, so that a repetition rate of 1 Hz can be maintained, which is sufficient for a processing time of 30 minutes and the slow changes of state in the process.
To validate the control setup and detection algorithms, uncontrolled measurements are compared to controlled cases set to a mean discharge size value of A 1 = 5 · 10 −3 mm 2 and to a value of A 2 = 7 · 10 −3 mm 2 , respectively. The value for A 2 is chosen, because it is slightly lower than the mean value in the uncontrolled case, before large, high-intensity discharges appear (A uncon. = 8.6 · 10 −3 mm 2 ). Staying under this value is later proven to effectively suppress high-intensity discharges. A 1 is chosen as a set point to show the differences in results for even lower values. In our case, the value cannot be set lower, as the voltage increases with smaller set point values and with increasing coating time. The used generator can only supply a maximum voltage of 1000 V. Therefore, set points lower than A 1 would lead to voltages exceeding the maximum generator voltage.

Results and discussion
This section is divided into three parts. Subsection 3.1 covers a proof of function of the multivariable control loop by investigating the recorded microdischarge characteristics and the corresponding electrical parameters. Subsequently, subsection 3.2 is devoted to optical emission spectra and their interpretation. Finally, impact of controlled and uncontrolled microdischarges on the coating surface is discussed in subsection 3.3. Figure 4 shows the evolution of mean microdischarge size and number of microdischarges during the process under controlled and uncontrolled processing schemes. In the first 750 s, the uncontrolled mean discharge size rises linearly. After that stage, the gradient decreases until a size of A = 8.6 · 10 −3 mm 2 is reached. At t = 1550 s the mean discharge size sharply rises and reaches an average value of around A = 15.2 · 10 −3 mm 2 , while the scatter between each measurement drastically increases. This phase can be associated with a high probability for large, high-intensity discharges. These have to be avoided, as the oxide layer quality may diminish under their influence. In the beginning, the discharge size for the controlled cases rises with nearly the same gradient as the uncontrolled case. In this phase, the duty cycle is not changed, because the set point is not reached yet. At the moment, when the mean discharge size reaches the set point (A 1 = 5 · 10 −3 mm 2 and A 2 = 7 · 10 −3 mm 2 , respectively), the duty cycle is adjusted by the PI-controller. From this point on, the mean discharge sizes are stabilized in value and the respective curves follow a straight line parallel to the x-axis. This behaviour proves the applicability of the control method for stabilizing the mean discharge size. The scatter in mean size for the controlled cases slightly increases after 1500 s. Table 1 summarizes statistical quantities of uncontrolled and controlled measurements. The first timespan (1000-1500 s) is chosen, because in this region, all measurements reached their corresponding set point and the region of high-intensity, large discharges has not begun yet. The second timespan (1500-2000 s) is set within this larger discharge regime. It is important to divide the time into two regions, as the behaviour in the uncontrolled case is quite different between both. The mean size (uncontrolled) roughly doubles in value, while the relative standard deviation (RSD) increases from 10.1 % to 27.6 %. The controlled case mean sizes match their respective set points well. The relative standard deviation also rises, but stays below 13.3 % for all measurements and times. Comparing the averaged mean sizes with their respective set points reveals a maximum control deviation of 1.4 %.

Evaluating microdischarge characteristics and electrical parameters
An increase in scatter can easily be explained using figure 4(b), which represents the counted number of discharges per exposure as a function of processing time. In the first 500 s all curves are overlapping with only a small error due to uncertainty error between measurements. It is expected that the number density decreases over time and the mean discharge size increases [21,34]. In our case, the discharge number starts at zero and increases until a local maximum is reached. This region has not been investigated by Yerokhin et al [21] and Petkovic et al [34], as the data starts after a   9.40 % few minutes after onset of plasma emission. The reason for a rise in number density in the beginning can be found in the combination of the discharge detection algorithm and the exposure time. To avoid an overexposure, the exposure time (t exp = 20ms) has been adjusted, so that the strongest discharges at the end of the process do not cause overexposure. The microdischarges have a minimum individual photoemission in the beginning of the process and can therefore not be distinguished from the background noise. This error does not influence the presented method, as the discharge size is smallest in the beginning. After a local maximum, the number density decreases as expected. The curve of the uncontrolled case shows a second local maximum around 1500 s. This may be related to the generator frequency of f = 2.5 kHz. Comparable measurements at lower frequencies do not show a second maximum. The reason for this second maximum is still unclear and needs further investigation, due to sparse data in the literature. With the beginning of the controlled phase, the duty cycle is adjusted, which also has an effect on the number density. The number density increases with a decreasing duty cycle. As stated before, the generator current is increased at the same rate, as the duty cycle is decreased. Therefore, the number density follows an increase in current. The second maximum can even become larger than the first maximum for a set point of A 1 = 5 · 10 −3 mm 2 . For the uncontrolled case, the number density drops to single digits. The number density in the controlled cases is one order of magnitude higher than in the uncontrolled case. The largest reduction in duty cycle is at the beginning of the controlled phase (compare with figure 5). This is why the number density rises fast in this initial control regime. After that, the change in duty cycle is smaller and the number density starts to reduce again in later stages.
Monitoring and controlling the output of the electrical generator is important for the robustness of the control setup in regards to errors. Voltage and current at the electrical cell are measured with a differential voltage and current probe. The mean voltage during pulse-on time plotted over the processing time is shown in figure 5(a). Figure 5(b) displays the duty cycle during the same time frame. The voltage curves can be divided into three phases. Phase one is the non-plasma anodization phase, as the critical breakdown voltage has not been reached yet. This transitional phase is defined by a fast rise in cell voltage. Following, the second phase exhibits a lower, but constant, cell voltage gradient. Both observed phases are well documented and in agreement to findings in the literature [35].The third phase is an onset of the controlled regime by reducing the duty cycle. As the duty cycle is reduced, the voltage starts to deviate from the straight line of the uncontrolled regime. The effect of voltage increase over decreasing duty cycle can be found in the literature [35,36]. It can be attributed to a higher reignition voltage needed after longer pulse-off times. Relaxation times, like charge transport, cooling of oxide material and gas evolution may be important factors comparing to the pulseoff time. As the system is non-linear and time variant, the duty cycle cannot remain constant and changes over the course of the coating time to re-adjust changes in microdischarge properties. This shows the need for an additional closed-control loop regarding microdischarge properties, as an open-loop control is susceptible to errors and deviations in process parameters. The method of bipolar 'soft-sparking' does only limit the microdischarge size and photoemission intensity. It cannot control the value of microdischarge size and is not suitable for every process (see [24,25]). Comparing both methods, it turned out that each has their advantage and disadvantage. The bipolar 'soft-sparking' mode is very easy to implement, but needs a bipolar pulsed generator and cannot control to a precise value. The unipolar control setup is able to control the microdischarge size, but additional optical setup and software, as well as a transparent electrolyte, are needed.
Voltage and current pulses change in amplitude, length and appearance during the control regime. Current pulses for all three measurements are displayed in figures 6(d)-(f). As amplitude and duty cycle in the uncontrolled case do not change, there is no visible difference in the current pulses over time, except for a small increase in the initial current spike, caused by the capacitive-resistive impedance of the electrolytic cell. Charge transport current at the oxide-electrolyte interface is dominant in the beginning of the pulse-on time.
As the breakdown voltage is reached, the current is dominated by the microdischarge current. The corresponding voltage pulses (see figures 6(a)-(c)) are defined by this impedance and the controlled current pulses. A decrease in duty cycle and accompanied increase in current over the treated surface area changes both current and voltage pulses. To compensate for a reduced pulse-on time, the current is increased by the generator. This also increases the current spike in the first microseconds of a current pulse. After 1400 s, and for a set point of A = 5 · 10 −3 mm 2 , the current spike reaches a maximum of 5 A, while at the same time the voltage reaches a maximum of around 1000 V. A suitable power supply is recommended, so it can supply these short spikes in current and voltage in comparison to just galvanostatic operation.
The mean microdischarge size is only an aggregate evaluation of a distribution of individual microdischarges. It may not give inside to distributional changes for different control regimes over processing time. Microdischarge photoemission intensities plotted over the respective size are shown in figure 7. Each plot is a summation of discharges around a certain point of time and five measurements before and after, respectively. This ensures that the sample size for later processing times (t > 1400 s) is high enough to see differences in statistical behaviour. To compare the uncontrolled and controlled regime (A 2 = 7 · 10 −3 mm 2 ) directly, both measurements are shown in the same plot in different colours. There is too much overlap between all three measurements, hence only two are presented at the same time for clarity. Up until 400 s, the scatter plots between control regimes show nearly the same behaviour and differences can be attributed to uncertainties in the measurements. As can be seen, the mean value for the controlled case shows a maximum mean discharge size of A 2 = 7 · 10 −3 mm 2 , which fits well to the set point. In contrast, the uncontrolled case drifts towards higher microdischarge sizes and higher intensities. The strong decrease in microdischarge number density for long processing times is apparent between measurements at 1600 s and 1800 s. Controlling the size also reduces intensities of larger discharges (A ≥ 10 −2 mm 2 ).
Careful optimization of the optical setup is significant for reliable global microdischarge estimation. The exposure time has to be adapted, ensuring that signal-to-noise ratio is high enough for microdischarge detection. Furthermore, overexposure has to be avoided. Performing a parameter sweep analysis of the exposure time at a given set point helps minimizing measurement errors. ICCD (intensified charge-coupled device) cameras are not suited for this method, as the intensities can be high enough, but the exposure time may be too short for statistical analysis. In addition, there is a trade-off between optical resolution and microdischarge sample size. Microdischarges have to be larger than one pixel, but the overall area studied has to be as large as possible. By evaluating scatter plots during the studied process parameters, we were able to   ensure that the share of microdischarges being at the lower limits of detection were always below 3 % of the total number. This is not the case for the first 100 s, because the intensities and discharge sizes might be lower than the detection limits. This matter of fact may not play a role for the method of controlling microdischarge sizes, because this part of time is not of interest, due to mentioned smaller size distribution.
To visualize distributions of single microdischarge characteristics, histogram plots give additional insight over scatter plots. This is shown in figure 8 for intensity distributions and in figure 9 for size distributions. Measurements are presented for a process time of 200 s and 1400 s, because at 200 s both controlled and uncontrolled regimes should show the same distributions and at 1400 s should show a large deviation between measurements, while at the same time exhibiting a large enough sample size. In figures 8(a) and 9(a) the distributions of controlled and uncontrolled regimes match to a high degree, as both are uncontrolled at this point of time. That means there is a good repeatability in the detection of microdischarges and the PEO process itself from a statistical point of view. The falling slope is important for determining the distribution of microdischarge intensities and sizes. Looking at discharge intensities (see figure 8), the number of discharges with low intensities is much higher in the controlled case (at t = 1400 s) compared to the uncontrolled case. Additionally, the falling slope is steeper. This leads to a distribution where lower intensities are more dominant. The same statement can be made for microdischarge sizes, however the effect is not that pronounced in comparison to microdischarge intensities. Hussein et al classified microdischarges into A-, B-and C-type discharges [15]. B-type discharges are said to be large, high-intensity discharges. Combining the insights of scatter plots and histograms, we can conclude that microdischarge sizes and photoemission intensities correlate to a high degree. Controlling the mean size of microdischarges is an effective way to decrease high-intensity discharges. B-type discharges may be reduced considerably, as size and intensity distributions are kept constant over the whole processing time. Figure 10 shows optical emission spectra (uncontrolled) recorded with a repetition rate of 1 Hz at a spectral range between 200 nm ≤ λ ≤ 900 nm. The strongest lines are emitted by aluminum, hydrogen, potassium, hydroxyl radicals, oxygen and magnesium (corresponding wavelengths are denoted in figure 10). In the first 1000 s, the changes in emission spectra between consecutive exposures is relatively small. After this initial stage, drastic changes appear between consecutive measurements. In the later stages the emission lines may vary by multiple orders of magnitude and the behaviour gets more and more stochastic, even considering an exposure time of 1000 ms. Controlled case measurements are shown in figure 11. Fluctuations between consecutive measurements are much smaller and long-term trends in behaviour are easier to detect. Except for a few emission lines, the trend between uncontrolled and controlled spectra over time are generally equal (while neglecting differences in variances between measurements). The two main reasons are an increased number density of microdscharges in the later stages by controlling the process and, much more important, Emission lines are a product of bound-bound transitions, e.g. spontaneous emission of excited species. The broadband continuum in figures 10 and 11 may have multiple origins. It was proposed by different groups that the broadband emission originates from free-bound transitions, e.g. charged species recombination or bremsstrahlung [12,34]. These studies do not elaborate the reasons onto why this may be the main process. Another contribution may be black body radiation emitted by the heated substrate metal and metal-oxides. Electron temperatures inside of microdischarges are assumed to be between T e, in = 7000 − 15000 K for microdischarge cores or very intense microdischarges and between T e, out = 3000 − 6000 K for outer regions or lower intensity microdischarges [12,15,37]. Melting and recrystallization are observed for produced oxide layers, hinting at high substrate temperatures. Temperature and wavelength dependent emission B(λ, T) of a black body radiator is defined by Planck's law:

Optical emission spectroscopy
where h is the Planck constant, c the material dependent speed of light and k B the Boltzmann constant. Photons can be absorbed while travelling through the electrolyte. As a matter of fact, water has a wavelength dependant absorption coefficient α(λ) (cf [38]). The reduced intensity I(λ) of absorbed emission can be estimated with the Beer-Lambert law: I 0 is the initial emission intensity and x is the length of the absorbing medium. The absorption length from substrate to the optical window is estimated to be x = 60 mm. The unit of calculated intensities is denoted in W/nm, whereas the spectrometer is calibrated to measure N phot /(s · nm) (N phot is the number of photons). To compare the calculated black body emission with the measured data, the calculated emission intensity has to be divided by the energy E = hc/λ. Calculated black body emission in comparison with experimental data can be seen in figure 12. The black body radiation shows very good agreement with normalized emission spectra. A maximum intensity of the measured continuum can be found at a wavelength of 802 nm. This maximum corresponds to a temperature of T = 3200 K for combined Planck's law and water absorption. This temperature is just below the boiling point of aluminum oxide (T Al2O3 = 3250 K). The electrolyte absorption coefficient is simplified to behave like distilled water. Therefore, a more realistic absorption coefficient, taking the addition of potassium hydroxide into account, may lead to increased absorption and even better agreement in the near infrared region. Measured intensities at wavelengths around 200 nm and after 900 nm are overestimated due to low efficiency of the optical spectrometer and low signal-to-noise ratio in these spectral ranges. The very good agreement of calculated black body radiation with the measured continuum spectra may lead to the conclusion that thermal radiation by fast heating and melting of oxide material is the main reason for continuum radiation in our setup.  Comparison of the temporal evolution of controlled and uncontrolled continuum emission intensities at the maximum of 802 nm are shown in figure 12(a). Both cases show the same general behaviour of reaching a maximum and declining afterwards, while in the controlled case the maximum is reached slightly earlier. The maximum scatter between two consecutive measurements becomes very large in the uncontrolled case (a factor of 5.3 between I(t = 1966 s) = 2.3 · 10 7 and I(t = 1967 s) = 1.9 · 10 8 ), while the maximum scatter in the controlled case is much smaller (a factor of 1.45 with I(t = 1824 s) = 1.1 · 10 8 and I(t = 1825 s = 1.6 · 10 8 ). Concluding from this, the continuum emission is less stochastic in the controlled case and predictability between measurements increases. As the scatter decreases, the inherent fluctuation of continuum production mechanisms may also decrease. This is significant, as it is an indication for less fluctuation in intensity or active radiation area on the surface. Following this, these findings support a possible reduction of strong B-type microdischarges proposed in subsection 3.2.
As was already mentioned, the temporal behaviour of most emission lines is similar between controlled and uncontrolled regimes. Two noteworthy examples of contrary behaviour are shown in figure 13. In figure 13(a) the emission intensity of the potassium line at 769.9 nm is plotted over processing time. As the duty cycle is decreased from the standard value of 0.5, the emission of potassium starts to rise. The maximum difference (a factor of approx. 5.1) between the controlled and uncontrolled case is at 1510 s. After this point in time, the emission intensities seem to equalize again. In contrast to these cases is the H α emission of hydrogen. The uncontrolled emission changes in a similar way to the potassium emission, but the controlled emission remains stable over the process time (compare dashed line in figure 13(b). Both examples show that it is possible to either change or control the emission of certain elements. This is interesting, as possible material properties or surface functionalities could be promoted by changing the emission of particular species (e.g. potassium or hydrogen).

Scanning electron micropscopy
SEM measurements show the direct impact of microdischarges on the visible surface region. Differences between the studied control regimes are shown in figure 14. The largest differences can be seen in the porosity of the treated surfaces, namely the number density of microdischarge holes, and diameters of melted and solidified areas around these holes, so called pancake structures. Ten images from the central region of the substrate are taken into account for quantification. The number density in the uncontrolled case is approx. n hole = (198 ± 20) mm −2 , for the controlled case of A 2 = 7 · 10 −3 mm 2 it is approx. n hole = (471 ± 20) mm −2 and for the controlled case of A 1 = 5 · 10 −3 mm 2 it is approx. n hole = (773 ± 20) mm −2 . This leads to a maximum increase in number density by a factor of 3.9 between controlled and uncontrolled samples.
Further, the difference in pancake radii can be estimated. First of all, in the uncontrolled regime, the mean radius is approx. r pan = (10.31 ± 2) µ m. In the controlled case of A 2 = 7 · 10 −3 mm 2 , the mean radius is approx. r pan = (7.32 ± 2) µ m. Whereas for the smallest case of A 1 = 5 · 10 −3 mm 2 the mean radius is approx. r pan = (5.92 ± 2) µ m. Zhuang et al compared the surface structure of treated substrates under variation of current density. Their research showed an increase of pancake radius and a decrease in hole number density for higher currents over the treated substrate area [20]. In this study, the current density is increased as well, but at the same time reducing the pulse-on time. This negates the effect of an increase in pancake radii and a reduction in hole number densities. As a matter of fact, the radius of the pancake structure is an indirect estimate for the energy that is dissipated into the oxide layer by microdischarges. A higher dissipated energy, assuming the energy conversion mechanisms between all cases stay constant, would lead to higher microdischarge energies, which mainly depends on the microdischarge radius and the electron density n e . Microdischarge energies largely depend on the microdischarge radius and electron density n e . Due to lack of data in the literature regarding electron densities depending on time, frequency or duty cycle, a change in electron density cannot be excluded. Nevertheless, a change in mean microdischarge area between the different control regimes can explain a large part of the change in mean pancake diameter. The intensities that we measured in 3.1 may not be used as an estimation of microdischarge energies, as they tend to ignite in cascades at the same spot [39]. However, cascading microdischarges should not affect the pancake radius, as it is mostly influenced by individual microdischarge impact. Estimated pancake radii are further evidence  that strong B-type discharges can be suppressed. Finally, controlling the unipolar plasma electrolytic process with the presented method may control the microdischarge energy and therefore tailor the dissipated energy onto the oxide layer.

Conclusion
In this work, we introduced a method to control the mean microdischarge size during unipolar pulsed plasma electrolytic oxidation. This method is based on an in-situ discharge detection process, consisting of CCD-camera measurements followed by fast image processing algorithms. A PI-controller adjusts duty cycle and total current over treated substrate area for stabilizing the mean discharge size. Distribution of microdischarge statistics, e.g. mean size, number of discharges and discharge photoemission intensity have been studied. Applicability and control error have been estimated. Differences in photoemission spectra between controlled and uncontrolled regimes were studied and possible continuum production mechanisms were discussed. Lastly, the impact of microdischarges on the surface of produced aluminum oxide coatings was studied. The most import findings are summarized in the following: • Mean microdischarge size can be controlled to a given set point with a maximum control deviation of 1.4 %. Relative standard deviation of mean microdischarge sizes after 35 min of processing can be reduced from 27.6 % to 9.40 %. High-intensity, large discharges can be effectively suppressed with a reduced mean microdischarge size by an elimination of strong B-type discharges. • Number of microdischarges increases when decreasing the duty cycle, most importantly because of an increase in current density. Not only the mean microdischarge size can be controlled, but also the size and intensity distributions over time. • Short term voltage, current and power demand during pulse-on time increase compared to classical galvanostatic operated PEO. • Intensity of certain emission lines can be promoted (potassium) or controlled (hydrogen) compared to classical galvanostatic or potentiostatic PEO. This may open the possibility to new surface process techniques, like multistep approaches. In a first step, a desired coating could be produced using any kind of process parameters. Using the microdischarge control technique as a second step, a functional surface coating can be produced, where microdischarge control opens the possibility to change plasma excitation dynamics (compare subsection 3.2) or coating surface properties (compare subsection 3.3). • Calculated black body emission intensities are in very good agreement with measured continuum spectra (T = 3200 K). It is concluded that in our setup the main origin of continuum emission is black body radiation. Variance in continuum emission intensity can be reduced, which may lead to less variance in local surface oxide temperatures or active radiating surface area.
• Number of microdischarge induced pancake structures can be increased, while decreasing the mean radius of melted and solidified areas (pancake radius). Together with the results from the previous camera measurements and optical emission spectroscopy, it is very likely that microdischarge energies can be controlled with this method.
Further studies have to be devoted to high frequency pulsing of the plasma electrolytic process and the interaction of electrical parameters and microdischarges in this frequency range. In addition, this work was mostly devoted to microdischarge characteristics and their control. The scope of further investigations has to be on the characterization of surfaces and material compositions created with the presented closed-loop control of unipolar pulsed plasma electrolytic oxidation.