Frequency dependence of the properties of a ferroelectric heterostructure