A Ferroelectric Capacitor Mathematical Model for Spice Simulation