The presented idea of active control of buildings is valid for the general concept of stabilization of some constructions subjected to an excitation coming, for instance, from earthquakes. The problem is analyzed in a two case studies describing not excited and externally loaded two degrees-of-freedom dynamical system. 2-DOF linear system is used to model the building-ground interactions. Algorithm that actively controls the system has been implemented and tested as well. The task finally reduces the investigations conducted in the work to estimation of the control force which could guarantee the sufficient minimization of the cost function proposed. On the basis of both analytical derivations and numerical analysis performed a few time histories of convergence of control force, components of the matrix of gain and accelerations of system masses have been illustrated and shortly described.