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 = 510^-3 mm^2 and A = 710^-3 mm^2, 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.