In this paper an active vibration control technique for a smart beam is presented. The structure is made of two layers of piezoelectric material (PZT8) embedded on the surface of an aluminium beam. The active control is inserted into the finite element model by using programming tools of the general purpose code used here