In this paper, we propose a control strategy for the quadruped robot in the trotting gait. The quadruped robot is simplified as a planar seven-link closed kinematic chain and a LIP (linear inverted pendulum). The quadruped robot can achieve steady locomotion by velocity control. This paper designs a method of virtual sliding mode controller for estimation of velocity and applys to the method of velocity control. Simulations and experimental results demonstrate the method of control and estimation of velocity as a quadruped robot successfully trotting.