Note: Segway Robot project was done during the years 2011 – 2013 when Madi was a Master’s student.

Study on two-wheeled robots started in late 1990 in different robotic labs in different countries. The main objective is to design a balanced two-wheeled robot that has human-like abilities. The main research challenge in these robots is the inherent instability of their dynamical system. These robots can be used as autonomous vehicles in companies, factories, or just to transport people.

Mechanical Design of Segway Robot Actuator Modeling According to Kirchhoff’s law:

$${V}_{a}\u2013Ri\u2013L\frac{di}{dt}\u2013{V}_{e}=0$$

Newton’s Law for the shaft of the motor:

$$\sum M={\tau}_{m}\u2013{k}_{f}\omega \u2013{\tau}_{a}={I}_{R}\frac{d\omega}{dt}$$

Thus:

$$\left[\begin{array}{c}\dot{\theta}\\ \dot{\omega}\end{array}\right]=\left[\begin{array}{cc}0& 1\\ 0& \frac{-{k}_{m}{k}_{e}}{{I}_{R}R}\end{array}\right]\left[\begin{array}{c}\theta \\ \omega \end{array}\right]+\left[\begin{array}{cc}0& 0\\ \frac{{k}_{m}}{{I}_{R}R}& \frac{-1}{{I}_{R}}\end{array}\right]\left[\begin{array}{c}{V}_{a}\\ {\tau}_{a}\end{array}\right]$$

$$y=\left[\begin{array}{cc}1& 0\end{array}\right]\left[\begin{array}{c}\theta \\ \omega \end{array}\right]+\left[\begin{array}{cc}0& 0\end{array}\right]\left[\begin{array}{c}{V}_{a}\\ {\tau}_{a}\end{array}\right]$$

Wheel Modeling Applying Newton’s law in the x-direction and around wheel axis:

$$\sum {F}_{x}=Ma$$

$${M}_{w}\ddot{x}={H}_{fR}\u2013{H}_{R}$$

$$\sum {M}_{a}=I\alpha $$

$${I}_{w}\ddot{\theta}={C}_{R}\u2013{H}_{fR}r$$

Chassis Modeling Applying Newton’s laws to the chassis’s free diagram:

$${I}_{p}{\ddot{\theta}}_{p}\u2013\frac{2{k}_{m}{k}_{e}}{Rr}\dot{x}+2\frac{{k}_{m}}{R}{V}_{a}+{M}_{p}g\ell sin({\theta}_{p})+{M}_{p}{\ell}^{2}{\ddot{\theta}}_{p}=-{M}_{p}\ddot{x}\ell cos({\theta}_{p})$$

$$2({M}_{w}+\frac{{I}_{w}}{{r}^{2}})\ddot{x}=\frac{-2{k}_{m}{k}_{e}}{R{r}^{2}}\dot{x}+\frac{2{k}_{m}}{Rr}{V}_{a}\u2013{M}_{p}\ddot{x}\u2013{M}_{p}\ell {\ddot{\theta}}_{p}cos({\theta}_{p})+{M}_{p}\ell {\ddot{{\theta}_{p}}}^{2}sin({\theta}_{p})$$

Linearizing the above nonlinear equations, the state equations of the system are as follows:

$$\left[\begin{array}{c}\dot{x}\\ \ddot{x}\\ \dot{\varphi}\\ \ddot{\varphi}\end{array}\right]=\left[\begin{array}{cccc}0& 1& 0& 0\\ 0& \frac{2{k}_{m}{k}_{e}({M}_{p}\ell r\u2013{I}_{p}\u2013{M}_{p}{\ell}^{2})}{R{r}^{2}\alpha}& \frac{{{M}_{p}}^{2}g{\ell}^{2}}{\alpha}& 0\\ 0& 0& 0& 1\\ 0& \frac{2{k}_{m}{k}_{e}(r\beta \u2013{M}_{p}\ell )}{R{r}^{2}\alpha}& \frac{{M}_{p}g\ell \beta}{\alpha}& 0\end{array}\right]\left[\begin{array}{c}x\\ \dot{x}\\ \varphi \\ \dot{\varphi}\end{array}\right]+\left[\begin{array}{c}0\\ \frac{2{k}_{m}(-{M}_{p}\ell r+{I}_{p}+{M}_{p}{\ell}^{2})}{Rr\alpha}\\ 0\\ \frac{2{k}_{m}({M}_{p}\ell \u2013r\beta )}{Rr\alpha}\end{array}\right]{V}_{a}$$

Segway Robot Electronics Motor specifications EMG30, DC motor with gearbox and encoder, 170 rpm speed, 1.5 kg/cm torque. Motor driver is L298 IC.

Sensor Specifications GP2D12 distance measuring sensor, 10-80 cm range, 5(v) power supply, voltage output

Designed Segway Robot Circuit in Proteus

Built Segway Robot