1 Introduction

Mobile robots are seems to be everywhere in today’s scenario and are used in huge variety of applications. The work of mobile robot is to give the command to finish the operation or any task. Legged robots design and control is complicated in comparison to the wheeled mobile robots. Robot motion is alteration or refashioning of awareness of the elements of physical environment.

Two wheeled mobile robots are more beneficial in comparison to other mobile robots and easily controllable in comparison to the legged robots. The appropriate analysis of parameters is required for the control of motion which includes the derivation of kinematic model to study the behavior of mechanical system. Since the wheels of mobile robot directly influence the movement of the robot. We can generate free paths through road map or cell decomposition in accustomed environment. Robot should have a very important feature which can adapt its characteristic to handle any type of situation.

The document mainly focuses on the velocity control of dc motor applied in the wheels of the two wheeled mobile robot. The TWMR has been assembled with the wheels and controller which is consists of motor, driver and controller. This study presents the speed control of wheels of the mobile robot by controlling the speed of motor. First a mathematical model has been derived for a dc motor in the terms of angle and velocity of dc motor. Then simulink model of dc motor has been designed in MATLAB and its response has been modified by using various control techniques. Then the speed of the dc motor has been controlled by PID Controller and LQR (linear quadratic regulator) controller. In last section the comparison of both the techniques is presented.

2 Literature survey

The Kalman filter is used to reduce the existing excursions and for getting the angular position of the links. Input tracking can be used to catechize the interpretation of the PD-Fuzzy and PID controllers. A difference between the PD-Fuzzy and PID for the stasis control of an elongated and outstretched dual link of the TWMR has been discussed in [1, 2].

Round pipes or ducts that are usually represented by cylindrical workspace are often maintained by wheeled mobile robots (WMR). On the basis of this analysis, screw theory forms an important tool and is used to analyze the dynamic behavior of wheeled mobile robots in cylindrical workspaces.

The law of control on the basis of two axis measuring instruments facts is put forward which can lead the robot to move parallel in round pipes or ducts. Simulation of the movement of the single wheel totally scrolling in the cylindrical workspace has been done in [3,4,5] (Fig. 1).

Fig. 1
figure 1

Two wheeled dc motor assembly with wheel and controller

Non-linear and unstable characteristics of wheeled mobile robot arises interest in researcher that intensively providing assistance to the human for performing their regular exercise or tasks, for human transportation, for teaching objective and assistance robotics [6,7,8,9,10]. Initially there are so many hurdles comes to designing of controller. For the solution of wheeled mobile robot control issue experiments of various controlling techniques have been done. Feedback linearization approach is also used for solving non-linear system, so that we can applied linear laws to non-linear system [11,12,13,14]. A lot of studies have been made aiming at tracking trajectories accurately, including methods of optimal control, robust control, adaptive control, back-stepping control, neural networks control and integral sliding-mode control [15,16,17].

This paper is organized as follows: In section III we describe the mobile robot, section IV describes controller design, and section V presents simulation results. Finally, the conclusion is presented in section VI. In this document we have designed various linear controllers for the system and applied to it. Slipping and cornering forces are considered negligible in designing mathematical modeling of wheeled mobile robot.

Mathematical Modeling.

The equivalent circuit of DC motor can be represented in electromechanical for the wheeled mobile robot case. The equivalent circuit diagram of electromechanical system of the motor is shown in Fig. 2.

Fig. 2
figure 2

Equivalent circuit diagram of the dc motor

\({R}_{eq}\) is the equivalent resistance and \({L}_{eq}\) is the equivalent inductance of the coil of the dc motor. Torque of the motor is taken as \(\tau\) and the input voltage of the dc motor has been taken as \({V}_{t}\).

The equations of the system are as follows:

The torque equation of dc motor in the form of armature current and the constant is:

$$\tau =K*{i}_{a}$$
(1)

The relationship between angular velocity \({\omega }_{m}\) and generated voltage \({\mathrm{e}}_{\mathrm{a}}\) is given by

$${\mathrm{e}}_{\mathrm{a}}=\mathrm{K}{\omega }_{m}=\mathrm{K}\left(\frac{\mathrm{d\theta }}{\mathrm{dt}}\right)$$
(2)

By applying Kirchhoff’s law and Newton’s law in the Fig. 2, these expressions can be obtained.

$$\mathrm{J}\frac{{\mathrm{d}}^{2}\uptheta }{{\mathrm{dt}}^{2}}+\mathrm{ b}\frac{\mathrm{d\theta }}{\mathrm{dt}}=\mathrm{K}{i}_{a}$$
(3)
$$\mathrm{L}\frac{\mathrm{d}{i}_{a}}{\mathrm{dt}}+\mathrm{R}{i}_{a}=\mathrm{V}-\mathrm{K}\frac{\mathrm{d\theta }}{\mathrm{dt}}$$
(4)

These equations are converted into the following equations by taking the Laplace transformation.

$${\mathrm{Js}}^{2}\uptheta \left(\mathrm{s}\right)+\mathrm{ bs\theta }\left(\mathrm{s}\right)=\mathrm{KI}(\mathrm{s})$$
(5)
$$\mathrm{LsI}\left(\mathrm{s}\right)+\mathrm{RI}\left(\mathrm{s}\right)=\mathrm{V}\left(\mathrm{s}\right)-\mathrm{ Ks\theta }(\mathrm{s})$$
(6)

From (5) \(\mathrm{I}\left(\mathrm{s}\right)=\frac{{\mathrm{Js}}^{2}+\mathrm{bs}}{\mathrm{K}}\uptheta (\mathrm{s})\)

As = \({\omega }_{m}=\left(\frac{\mathrm{d\theta }}{\mathrm{dt}}\right)\) > \({W}_{m}(s)=s \theta (s)\)

From (6) \(\left(\frac{{\mathrm{Js}}^{2}+\mathrm{bs}}{\mathrm{K}}\uptheta (\mathrm{s})\right)\left(Ls+R\right)=V\left(s\right)-Ks\theta (s)\)

$$\theta \left(s\right)\left[\frac{{K}^{2}+ \left(Ls+R\right)\left(J{\mathrm{s}}^{2}+\mathrm{bs}\right)}{K}\right]=V(s)$$

Now By solving these equations, we get

$${\mathrm{G}}_{\mathrm{p}}\left(\mathrm{s}\right)= \frac{\uptheta (\mathrm{s})}{\mathrm{V}(\mathrm{s})}= \frac{\mathrm{K}}{\left\{\mathrm{s}\left[\left(\mathrm{R}+\mathrm{Ls}\right)\left(\mathrm{Js}+\mathrm{b}\right)+{\mathrm{K}}^{2}\right]\right\}}$$
(7)
$${\mathrm{G}}_{\mathrm{v}}\left(\mathrm{s}\right)= \frac{\mathrm{w}(\mathrm{s})}{\mathrm{V}(\mathrm{s})}= \frac{\mathrm{K}}{\left\{\left[\left(\mathrm{R}+\mathrm{Ls}\right)\left(\mathrm{Js}+\mathrm{b}\right)+{\mathrm{K}}^{2}\right]\right\}}$$
(8)

For a 12 V dc motor considering the number of turns of the motor N = 5000 rpm and power is 8 watts. Let us consider the inertia of rotation is to be J = 0.01.

Then K can be calculated K as

$${\upomega }_{\mathrm{m}}=\frac{{\mathrm{V}}_{\mathrm{t}}}{\mathrm{K}}=\frac{2\mathrm{\pi N}}{60}$$
(9)

The value of constant K is 0.023 and the angular velocity is \(524\mathrm{ rad}/\mathrm{s}.\)

The calculations for the torque \(\tau\) is

$$\tau =\frac{\mathrm{P}}{\mathrm{W}}= 15.27\mathrm{ mNm}.$$
(10)

The specifications of the parameters in the dc motor of wheeled mobile robot are given in Tables 1, 2.

Table 1 Specification of the parameters of WMR
Table 2 Comparison of parameters

3 Controller design

By using the overall transfer function of DC motor in terms of angle and velocity, the step response of the dc motor is shown in Fig. 3.

Fig. 3
figure 3

The step response of open loop dc motor

Settling time for open loop step response is 72.58 s. which is very large. The closed loop step response is shown in Fig. 4. Settling time for closed loop step response is 3.83 s. which yield a good result as compared to open loop transfer function but also we got overshoot here which we tries to minimize by using controller.

  1. A.

    P-Controller:

    Output of the proportional controller is given by the multiplication of controller gain and plant function.

    $$Con\left(t\right)={k}_{p} e\left(t\right)$$
    (11)

    Here Con (t) is the controller output.

  2. B.

    PI-Controller:

    Output of the proportional integral controller is given by:

    $$Con\left(t\right)={k}_{p} e\left(t\right)+ {K}_{i}{\int }_{0}^{T}e\left(\tau \right) d\tau$$
    (12)

    Integral term contains product of integral gain and summation of errors. It improves the steady state response.

  3. C.

    PID Controller:

    Output equation is given by following equation:

    $$Con\left(t\right)={k}_{p} e\left(t\right)+ {K}_{i}{\int }_{0}^{T}e\left(\tau \right) d\tau +{K}_{d}\frac{de(t)}{dt}$$
    (13)

    Here e(t) is dissimilitude of the desiderate reference points and current proportion (process variable measurement), r(t) is the input reference. \({k}_{p}\), \({K}_{i}\) and \({K}_{d}\) are proportional gain, integral gain and derivative gain respectively of a PID controller.

    We have designed a PID feedback controller. The transfer function of the PID is given as

    $$Cont\left(s\right)=\frac{U(s)}{E(s)}={k}_{p}+ \frac{{K}_{i}}{s}$$
    (14)
    $$C\left(s\right)= \frac{{k}_{d}{s}^{2}+{K}_{p}s+{K}_{i}}{s}$$
    (15)
  4. D.

    LQR controller:

    It stand for Linear Quadratic Regulator. It can be applied to linear systems or linearized non linear systems. State-Space model of a linear system is given by following equation:

    $$\dot{x}=Ax+Bu$$
    (16)
    $$y=Cx+Du$$
    (17)

    For optimal control approach, we have to find a state feedback law that minimizes the cost function given by:

    $$J=\frac{1}{2}{\int }_{0}^{\infty }\left({x}^{T}Qx+{U}^{T}RU\right)dt$$
    (18)

    Here Q and R are weighting matrix which include weight on states and control input respectively.

Fig. 4
figure 4

The step response of close loop dc motor

4 Results and discussion

PID Controller has been applied to the DC motor to control the motor’s speed and improving the performance. Figures 5, 6 show the model and response of PID controller applied to the DC motor and its response. Figures 7, 8 show the model and response of PID controller applied to both the motors. Figure 9 shows the linear quadratic response of the motor. The complete analysis shows that the LQR is giving better performance in comparison to PID controller. According to our design constraint with increasing value of we kp get the oscillatory response which is not desired at all and for decreasing value of kp settling limit is not in designing range.

  1. E.

    P-Controller

    Using pid tuner we get \({k}_{p}\)=0.7482. Response under P controller is given in Fig. 5.

    According to our design constraint with increasing value of \({k}_{p}\) we get the oscillatory response which is not desired at all and for decreasing value of \({k}_{p}\) settling limit is not in designing range.

  2. F.

    PI-Controller

    Best value of \({k}_{p}\) and \({K}_{i}\) is 1.502 and \({K}_{d}\) is 0.06034 respectively. Response is given in Fig. 6.

    Here response shows oscillatory nature and peak value is also high so now we introduce D factor in it to compensate the problems encountered in PI controller.

  3. G.

    PID-Controller

    Again using pid tuner we get the value of gains \({k}_{p}\), \({K}_{i}\) and \({K}_{d}\) which are 5.404, 2.69 and 2.713 respectively. Response for the controller is given in Fig. 7. Close loop system and System under PID controller can be viewed in Fig. 8 simultaneously.

    Robustness of system is a problem. Also we can only control one state at a time. If we want to control position as well as velocity simultaneously we will go for state feedback system.

  4. H.

    LQR-Controller

    Since our system is controllable so now we can design state feedback system with K i.e., gain matrix by providing a command K = lqr (A, B, Q, R). Q is selected by using y = 21 and R = 1. Response can be seen in Fig. 9

Fig. 5
figure 5

step response under P controller

Fig. 6
figure 6

step response under PI controller

Fig. 7
figure 7

step response under PID controller

Fig. 8
figure 8

step response of PID controller of close loop transfer function

Fig. 9
figure 9

step response of system under LQR controller

This response shows less settling time as well as less overshoot in comparison to P, PI, PID Controllers.

5 Conclusion

The mathematical model of the simplified DC motor is taken and simulated; P, PI, PID controller and a LQR have been designed for improving the performance. A differential drive wheeled robot application is presented with simulated model in simulink and in editor command window. Various controllers are designed for improving the performance. PI gives oscillatory response but PID has compensated it and provided good results. LQR yields better result as compared to all the controllers used in this work. Overall analysis shows that the LQR is giving better performance than P, PI, PID controller. It can be analyzed from the plots that system has been settled in the half of the time in comparison to the PID controller. Future work involves fuzzy controller. More number of observations is needed to be performed for the evaluation of the robustness of the system. Future work will also consider the friction on wheels as well as slippage and use of non-linear controller for designing purposes.