# Parameterization and Design of Telepresence Robot to Avoid Obstacles
## 3 System Design and Implementation
### Root Locus of Speed Controller  
The root locus for this is shown in Figure 5. The aperiodic limiting case occurs at a controller gain of \(K_{P}\) = 0.18. With larger gains, the controller oscillates. The root locus curves were determined using MATLAB's single-input, single-output (SISO) design tool. If the smoothing in the feedback of the control loop is also considered, the controller receives an additional pole. This also significantly changes the root locus curve. For the controller parameterization, the smoothing has a time constant of \(\tau_{P}\) = 0.05 s, corresponding to a pole at \(-\)20. Figure 6 shows the root locus of the new control loop. The poles for distinctive points are drawn in different colors. The aperiodic limit case occurs with a controller gain of \(K_{P}=0.139\) (magenta). The stability limit is at a gain of \(K_{P}=2.15\) (orange). The amplification of \(K_{P}=0.18\) (green) determined in the previous investigation leads to a slightly oscillating behavior. Now the transmission behavior of the control circuit is determined. The open-loop transfer function is unaffected by the smoothing in the feedback, so Equation (9) can still be used for this. However, the transfer function \(G_{G}(s)\) of the closed control loop is relevant for the overall behavior, which is calculated as:  
\[G_{G}(s)=\frac{G_{o}(s)}{1+G_{o}(s)\cdot G_{P}(s)}. \tag{13}\]  
Figure 5: Root locus of the speed controller without smoothing in the feedback. Figure 6: Root locus of the speed controller with smoothing in the feedback. By inserting the individual transfer functions, one obtains:  
\[G_{G}(s)=\frac{\frac{K_{P}\cdot K_{M}\cdot K_{S}\cdot p_{S1}\cdot p_{S2}}{s\cdot(s -p_{S1})}}{1+\frac{K_{P}\cdot K_{M}\cdot K_{S}\cdot p_{S1}\cdot p_{S2}}{s\cdot(s -p_{S1})}\cdot\left(-\frac{p_{P}}{s-p_{P}}\right)}. \tag{14}\]  
By solving the double fraction, we obtain:  
\[G_{G}(s)=\frac{K_{P}\cdot K_{M}\cdot K_{S}\cdot p_{S1}\cdot p_{S2}\cdot(s-p_{P })}{s^{3}-(p_{S1}+p_{P})\cdot s^{2}+p_{S1}\cdot p_{P}\cdot s-K_{P}\cdot K_{M} \cdot K_{S}\cdot p_{S1}\cdot p_{S2}\cdot p_{P}}. \tag{15}\]  
At this point, the controller gain of the speed controller is set to \(K_{P}\) = 0.18. The control circuit thus has a slightly oscillating behavior. However, it must be noted that the actual value measurement is subject to a large amount of quantization noise. If the oscillation amplitude is below the rotary encoder's resolution, it is practically non-existent because it cannot penetrate the controller input. Due to the zero point \(n_{R}\) at \(n_{R}=p_{S2}=-2.5\), the amplification of the integral component is calculated:  
\[K_{i}=-K_{P}\cdot n_{R}=-0.18\cdot(-2.5)=0.45. \tag{16}\]  
This means that all parameters for the speed controller are known. Inserting them into Equation (15) results in the transfer function \(G_{G}(s)\) for this special case of the speed controller:  
\[G_{G}(s)=\frac{25\cdot s+500}{s^{3}+30\cdot s^{2}+200\cdot s+500} \tag{17}\]  
The poles of the controller are included:  
\[P_{1}=-21.9149 \tag{18}\]  
\[P_{\tau_{3}}=-4.04256\pm 2.54426j \tag{19}\]  
The zero point of the controller corresponds to the time constant \(\tau_{P}\) of the PT1 element in the feedback. \[G_{G}(s)=\frac{G_{o}(s)}{1+G_{o}(s)\cdot G_{P}(s)}. \tag{13}\]0  
Figure 7 shows the step response of the speed controller when the speed jumps from 0 EncImp/s to 800 EncImp/s at time t = 0 s. The diagram clearly shows that the system is corrected very quickly. There is a slight overshoot in speed. The permanent oscillation is so small that it can no longer be seen in the diagram. The system reached the end value after approximately one second. The controller is thus set almost ideally. Finally, the manipulated variable-limited and quantized control loop was modeled with Simulink and given the same step response. The result can be seen in  
\[G_{G}(s)=\frac{G_{o}(s)}{1+G_{o}(s)\cdot G_{P}(s)}. \tag{13}\]1 Theoretical step response of the speed controller (linear model).