Human motions are good energy sources for energy harvesters to support wearable devices. Among them, walking motions have received considerable attention as energy sources due to their large kinetic energy. Most of the studies about energy harvesting from human walking have been tested in real human wearing energy harvesters. In this paper, we use a humanoid robot to study energy harvesting from walking motion. We quantitatively analyze the energy harvesting from walking through the repeatable motion of the humanoid robot. A knee pad is attached on the leg of the humanoid robot. We make a pocket on the knee pad and put a piezoelectric composite as an energy transducer into the pocket. We refer to a trajectory of knee angle during one walking cycle of human from literature. The knee motion is formulated by performing Fourier series fitting for programming the movement of the humanoid robot. Additionally, an electromechanical model is used to explain the electrical responses from the piezoelectric composite in the pocket during the motion of the humanoid robot. We estimate average power transferred from the piezoelectric composite to the load resistances during the knee motion by using the model and validate the theoretical predictions by comparing with experimental results.