Frame structures are widely used in engineering applications, especially in space structures. For special use such as shape and vibration control of such structures, piezoelectric patches are usually placed on the beam surfaces to form active frame structures. To perform shape control or vibration control tasks, modeling methods for the formed active frame structures need to be studied. This paper develops a new distributed model of an active frame structure composed of multilayer piezoelectric beam components. First, the governing equations of a beam, bonded with piezoelectric patches, are developed via the generalized Hamilton principle, by considering the transverse shear strain. Then, the analytical solutions of the governing equations and the generalized element stiffness matrix are derived through the distributed transfer function formulation. Finally, the analytical solution of the entire system is obtained by the technique for assembling element stiffness matrix. In numerical simulations, buckling and vibration of an active frame structure are both studied. In addition, a novel Improved Ant Lion algorithm is proposed for optimal design of the frame structures. The optimization examples confirm that the proposed algorithm is more efficient than other existing popular algorithms such as Genetic Algorithm (GA) and Ant Lion Optimization (ALO) algorithm.