When I was going to my school with my ID card hanging around my neck, it started doing oscillations like a pendulum. I was moving forward and it was oscillating left to right and right to left. What forces are at play here?
As humans we oscillate left and right when we walk because we have two legs. You can get a resonance when the length of the cord is such that your pace matches the period of the swing.
(Like pushing a child on a swing a little higher each time they approach you.)
Whilst walking we also oscillate up and down - this can also contribute to driving the resonance.
Perhaps the right way to ask is 'why does my ID card oscillate far more strongly than it ought to?'. Although walking gives the right kick to start oscillating the ID card hanging on your neck, sometimes the card swings far more violently than that is explainable by the kick your walking induces.
Actually, this is a parametric resonance problem. As you walk, your body goes up and down in a periodic manner. This changes the effective gravitational acceleration your ID card hanging on your neck experiences, and changes the natural frequency of the oscillation. As explained in the linked Wikipedia article, parametric resonance occurs when parametric perturbation has twice the frequency of the system's natural frequency. So, when you start walking with the just right pace-taking a step per ID card swing-parametric resonance starts to take over and will make the card go wild.
when we walk our legs moves up and down and so is our bodies in a periodic like manner. this induces oscillatory like motion on the ID which oscillates in the reverse dirrection to the movement of our bodies. sometimes the oscillations of the ID hanging on our necks can be so violent than the kicks our legs induces, the effect can be explained by the fact that the natural frequency of the card is changed by the change in gravitational acceleration of the card hanging on your neck. if the pase is maintained the card oscillates more violently