Original scientific paper In this study, an optimal control algorithm is proposed to overcome low performance problems arising from the non-linear characteristics of pneumatic motor in compressed air-based energy conversion systems. The effectiveness of the proposed algorithm is tested on an energy conversion system which includes a compressor, a proportional valve, a pneumatic motor (PM), a permanent magnet direct current (PMDC) generator and a control card. The control function of the system is carried out by driving the proportional valve with the control signals which is obtained depending on the PMDC generator output voltage error. In this structure, an optimal proportional-integral-derivative (PID) controller which tunes on-line its own gain parameters by particle swarm optimization (PSO) algorithm according to the operating conditions of the system used. In order to observe the effects of PSO-based PID controller on the system performance, the energy conversion system is also controlled by a discrete time PID controller. The experimental results show that PSO-based PID controller provides more robust control performance than discrete time PID controller under various operating conditions. Keywords: compressed air-based energy conversion; optimal PID controller; particle swarm optimization algorithm; pneumatic motor Konstrukcija PID regulatora zasnovanog na PSO za sustav pretvorbe energije pomoću stlačenog zraka Izvorni znanstveni članak U ovom se radu predlaže optimalni kontrolni algoritam za rješavanje problema niske performanse zbog nelinearnih značajki pneumatskog motora u sustavima za pretvorbu energije pomoću stlačenog zraka. Učinkovitost predloženog algoritma se ispituje na sustavu za pretvorbu energije koji uključuje kompresor, proporcionalni ventil, pneumatski motor (PM), generator istosmjerne struje s trajnim magnetom (PMDC) i kontrolnu karticu. Kontrolna funkcija sustava provodi se pogonjenjem proporcionalnog ventila s kontrolnim signalima što se postiže ovisno o greški napona na izlazu PMDC generatora. U toj konstrukciji, optimalni proporcionalni-integralni-derivativni (PID) regulator izravno podešava vlastite parametre pojačanja algoritmom optimizacije roja čestica -particle swarm optimization (PSO) u skladu s radnim uvjetima primijenjenog sustava. U svrhu promatranja učinaka PIDregulatora zasnovanog na PSO na rad sustava, sustav za pretvorbu energije se kontrolira PID regulatorom diskretnog vremena. Eksperimentalni rezultati pokazuju da PID regulator zasnovan na PSO osigurava robustniju regulaciju rada nego PID regulator diskretnog vremena kod različitih radnih uvjeta.Ključne riječi: algoritam optimizacije roja čestica; optimalni PID regulator; pneumatski motor; pretvorba energije pomoću stlačenog zraka