Kinetic movement power generation

NOTE: ADVANCED!

Here are a couple of ways electricity can be generated while walking. These devices are not as straight forward as others and need some knowledge of electrical circuits and ac/dc motors. Can you work out how to make one?

Where is the energy coming from to power these devices? Unlike wind or solar, we can't really say that it's free energy. Is it sustainable?