For a biped-walking robot, the position of the ZMP (Zero Moment Point) determines its stability of dynamic walking. In off-line gait planning, the desired ZMP trajectory can be obtained by dynamic modeling. But in real walking, there is always some deviation between the actual ZMP trajectory and the desired one, which may affect the stability if not properly reduced. During walking, the real-time ZMP trajectory can be obtained from the output signals of torque sensors, which are fixed on the soles of the robot. By comparing with the off-line planned ZMP trajectory, and using fuzzy logic to adjust the four ankle-joint angles, the ZMP deviation can be decreased.