Mechanism of ferroelectricity in d3 perovskites: A model study