There has been an increasing amount of research on WMRs. The WMRs have lots of advantages: their mechanical system is usually simple; the whole movement mostly contains two dependent motors; and their motions in two-dimensional space are quite adaptable. At the same time, the WMRs have better power efficiency. WMRs have been studied from many points of view, such as modelling control, obstacle avoidance, localization, tip-over stability, and so on. This paper discusses the control algorithm. WMRs have nonholonomic constraints. That is, the mobile robot may not be able to reach a specific position and angle in a specific time; however, the robot can reach the target in a different motion or within a limited time. In this paper, an error model based on the WMR is introduced. The model explains the error between the actual position and the ideal or target position in the continuous motion of WMRs. The error model will be transformed into a state-space equation in order to demonstrate that the algorithm that controls the WMR`s movement is controllable. By splitting the inputs into and , the whole equation is transformed into a zero-input state-space system. Then, the errors can be minimized with the optimization of the feedback. The results show that by optimizing the time-varying feedback matrix, the error is asymptotically stable and close to zero. Therefore, by adding this control law to the controller, an approach to making mobile robots follow the planned trajectory is obtained.