Аннотация:The influence of different polymeric dopants belonging to the class of poly(amidosulfonic acids) on the spectral characteristics of heavily- and weakly-colored forms of polyaniline was studied with the purpose to adjust spectral characteristic of electrochromic optical filter both in the opaque and bleached state thus making it to look like a neutrally-grey filter. It was shown that the use of polymeric sulfonic acids during the electrosynthesis allows one to increase significantly the deposition rate of the layers, to improve their uniformity, mechanical properties and adherence to substrate. The use of rigid-chain polymeric acids with phthalic fragments allows one to obtain more smooth spectra characteristic. For controlling the electrochromic filter a model of electronic device with a feedback based on illumination intensity behind the filter was developed and tested. It can be considered as a prototype of real devices, for example, "smart" windows with variable light transmittance in the visible and NIR-spectral ranges, rear-view mirrors with variable reflectance for cars, sun- and light-protective glasses, etc.