## 1 Introduction  
Compared to conventional manually operated wheelchairs, motorized wheelchairs equipped with an automatic control system (so-called robotic wheelchairs) have many advantages. For example, they have better navigation capabilities and can respond to different motion requirements autonomously [1; 2; 3]. Most conventional robotic wheelchairs contain two active driving wheels and two passive casters [4]. Though casters enhance the stability of the wheelchair, they have a negative effect on its mobility [5; 6; 7]. To solve this problem, caster-free two-wheeled robotic wheelchair equipped with an active stability controller was proposed [8; 9; 10]. There are several types of two-wheeled wheelchairs with special features. The iBot has four wheels, but can be converted to a two-wheeled wheelchair by lifting up its two caster wheels [11; 12; 13]. The height of the rider seat increases as a result. A patented iBalanceTM technology, a synthesis of computers and gyroscope, is used to keep the wheelchair stable. A two-wheeled transportation vehicle called B2 has a self-balancing (stability) capability when it is subject to disturbances from the road. It is suitable for use on narrow roads as it can turn on the spot in a space much smaller than that needed by a conventional car [14; 15]. Nonlinear controllers can be used for velocity and stability control of a two-wheeled wheelchair as its dynamic model is highly nonlinear [16]. One example is computed torque control based on nonlinear feedback and the assumption that the exact dynamic model of the system is known [17]. For the cases where the system dynamics cannot be accurately modelled, or there are external disturbances, \(H_{\infty}\) which is robust against disturbances can be used [18; 19]. Nonlinear \(H_{\infty}\) control is developed based on the Hamilton-Jacobi-Bellman-Isaacs (HJBI) equation which is hard to solve in real-time though [20]. Another type of robust controller is sliding mode control (SMC) which has an elegant structure and is effective in disturbance rejection and is robust to system parameters variation. In this controller, the state of the closed-loop system is forced to slide along the predefined sliding surface [21; 22; 23]. However, it suffers chatterings in the closed-loop system states. This problem can be solved by quasi-sliding mode control (QSMC) where the non-smooth sign function used in SMC is replaced with a smooth sigmoid function to govern the switching behavior in the controller [24]. For a system whose number of inputs is less than the number of outputs (underactuated system), hierarchical sliding mode control (HSMC) can be used. In HSMC, the sliding surfaces are designed in layers which are called layer sliding surface [25]. In most controllers, the motion and stability of the wheelchair all rely on the motions of the driving wheels which need large driving torque and power [26]. Some approaches have been proposed to solve this problem. For example, the rider's seat is made to move to enhance the wheelchair's stability [27]. The wheelchair is designed in a way such that its center of gravity is under the driving wheels' axis [28]. A mass under the rider's seat moves linearly to keep the wheelchair from overturning [29]. These approaches have the drawbacks of compromising the comfort of the rider or limited effectiveness. In this paper, an active velocity and stability controller is developed for a two-wheeled wheelchair added with a compact pendulum-like movable mechanism. The Euler-Lagrange equation is used to derive the equation of motion (EOM) of the system and a quasi-sliding mode control approach is used in the controller design. Through the proposed control scheme, the wheelchair's velocity and stability can be controlled with driving torque and power much less than those of conventional controllers which only rely on the motions of the driving wheels. Simulation results prove the effectiveness of the proposed controller. The rest of the paper is organized as follows.