Phase Transition in Bi-Layered Perovskite and a Model of Ultra-Thin Ferroelectric Film