Mathematical Modelling of a Piezoelectric Energy Harvesting System