Energy Harvesting Using a Nonlinear Resonator