# Discrete-Time Sliding Mode Controller for NCS with Deterministic Type Fractional Delay: A Switching Type Algorithm

- 613 Downloads

## Abstract

In this chapter, a novel approach is presented for designing a discrete-time sliding mode controller. The effect of sensor to controller fractional delay and controller to actuator fractional delay in discrete-time domain is compensated through Thiran’s approximation technique. The forward channel delay is compensated at the actuator side, while feedback channel delay is compensated at the sliding surface. An evolved sliding surface with delay compensation is used to derive SMC law. The stability condition for the closed-loop system with proposed controller is derived using Lyapunov function. The efficacy of the proposed algorithm is shown by simulation results and also validated by the experimental results considering DC servo system in networked environment having matched uncertainties.

## Keywords

Network delay Thiran’s approximation Discrete-time sliding mode control Stability## 3.1 Network-Induced Fractional Delay Compensation with Thiran’s Approximation

## 3.2 Problem Statement

*d*(

*t*) is the matched bounded disturbance with \(|d(t)|\le d_{max}\), and \(\tau \) is the deterministic total networked-induced delay in continuous-time domain.

*d*(

*k*) is also bounded and

*O*(

*h*) [1]. For simplicity, it is assumed that

*d*(

*k*) is slowly varying and remains constant over the interval \(kh\le t \le (k+1)h\) [1].

*h*is the sampling interval.

### Remark 1

It is considered that network-induced fractional delay (\(\tau '\)) in discrete time has non-integer values so it is required to compensate the delay at each sampling instants.

### Assumption 1

### Remark 2

The above condition (3.5) indicates that the values of total fractional network-induced delay (\(\tau '\)) in discrete-time domain will be less than unity.

### Assumption 2

*d*(

*k*) is bounded by upper and lower bounds as:

### Remark 3

Without loss of generality, the sensor processing delay (\(\tau _{sp}\)), controller computational delay (\(\tau _{cp}\)) and actuator processing delay (\(\tau _{ap}\)) are neglected as their values are negligible compared to network-induced delay (\(\tau \)).

Now, we are ready to define the problem statement with above assumptions and conditions.

### Problem Statement

To design robust discrete-time sliding mode controller for the system (3.3, 3.4) in the presence of deterministic fractional network delays \(\tau '_{sc}\) and \(\tau '_{ca}\) under the Assumptions (1) and (2).

The sliding mode controller design involves the sliding surface design and the control law that computes the control sequences and steers the states towards the surface.

The next section proposes the design of sliding surface that compensates the effect of fractional delay occurring from sensor to controller.

## 3.3 Sliding Surface Design for Deterministic Type Network-Induced Delay

There are two widely used approaches, namely Tustin approximation and bilinear transformation for time delay compensation in discrete-time domain. However, the limitation of both the approaches is that they cannot approximate fractional delay which is of main concern here [2, 3, 4]. The Thiran approximation [5] technique approximates the non-integer types of delays in discrete-time domain. Thiran has proposed the time delay approximation algorithm for maximally flat group of fractional delays occurring in signal processing applications. Hence, it is proper candidate for fractional delay compensation for discrete-time SMC design.

*l*indicates the order of approximation, \(\nu =\frac{\delta }{h}\) indicates the fractional part of delay, \(\delta \) is the delay occurring during signal transmission, and

*h*is the sampling interval.

*ceil*operator rounds the nearest positive integer greater than or equal to \(\nu \).

Next, the sliding surface using above approximation is proposed as Lemma 1 given below.

### Lemma 1

The compensated sliding variable *s*(*k*) for the given system (3.3, 3.4) with sensor to controller network-induced fractional delay (\(\tau '_{sc}\)) satisfying condition (3.5) and under the Assumptions (1) and (2) is given as:

\(\alpha =\frac{{\tau '_{sc}}}{{\tau '_{sc}}+1}\) and \(C_{s}\) is the sliding gain.

### Proof

*z*-transform to Eq. (3.11), we get

*z*-transform, we may have

*proof*.

From Eq. (3.18), it is inferred that the network-induced fractional delay from sensor to controller can be compensated in the sliding surface *s*(*k*) at each sampling instant *h* using the current and immediate past sample information and parameter \(\alpha \).

Now, we are ready to design a discrete-time sliding mode control law using the proposed sliding surface (3.18).

## 3.4 Design of Discrete-Time Sliding Mode Control for NCS Using Thiran’s Delay Approximation: A Switching Type Algorithm

This section proposes switching type control law based on Gao’s reaching law [7] and sliding surface (3.18). The Gao’s reaching law provides the faster convergence within the specified quasi-sliding mode band.

### Theorem 3.1

*d*(

*k*) is given as

\(M=(C_{s}F)\) and \(N=\alpha C_{s}\).

### Proof

*q*, \(\varepsilon \succ 0\), \(0\prec (1-qh)\prec 1\), *sgn* is the signum function, *h* represents the sampling interval, and *s*(*k*) is the sliding surface proposed in (3.18).

### Remark 4

\(M=(C_{s}F)\) and \(N=\alpha C_{s}\).

This completes the *proof*.

The closed-loop stability is derived using compensated sliding surface (3.18) and control law proposed in Eq. (3.25) such that the system states remain within specified band (3.21) for a finite interval of time.

## 3.5 Stability Analysis

### Theorem 3.2

*d*(

*k*) with the controller (3.25) drive towards the sliding surface (3.18) and maintain on it for any \(q, \varepsilon , \beta \succ 0\), \(0\prec 1-qh \prec 1\) and \(1-qh \prec \varepsilon \) provided the following condition holds true:

### Proof

*u*(

*k*) from Eq. (3.25) and further solving it, we have

*q*and \(\varepsilon \). If \(\varPhi \) is close to zero, then \(s^{T}(k)s(k)\) will be larger than \(\varPhi \). Thus, for any small parameter \(\beta \), we have \(\varPhi -s^{T}(k)s(k)\prec \beta s^{T}(k)s(k)\).

Thus, by tuning the parameter *q* and \(\varepsilon \), we have \(\varDelta V_{s}(k)\prec \beta s^{T}(k)s(k)\) which guarantees the convergence of \(\varDelta V_{s}(k)\) and implies that any trajectory of the system (3.3, 3.4) will be driven onto the sliding surface and maintain on it.

This completes the *proof*.

*u*(

*k*) computed in (3.25) using compensated sliding surface (3.10) will also experience controller to actuator fractional delay \((\tau '_{ca})\) which results in the delayed control signal \(u(k-\tau '_{ca})\). So, in order to avoid the degradation of the plant response again the time delay is compensated from controller to actuator. The compensated control signal at the actuator end can be represented as:

\(\alpha '=\frac{\tau '_{ca}}{1+\tau '_{ca}}\).

It can be noticed from above Eq. (3.34) that the compensated control signal \(u_{a}(k)\) depends on difference of the present control signal that is available from network as well as past control signal which is multiplied over the parameter \(\alpha '\) approximated through Thiran’s approximation. Thus, the effect of controller to actuator fractional delay is compensated at actuator side which is further applied to the plant.

## 3.6 Simulation and Experimental Results

### 3.6.1 System Description

Figure 3.4 shows the block diagram of Quanser made Qnet 2.0 brushed DC motor setup used for the simulation as well as experimental purpose. The Qnet DC motor provides an integrated amplifier and a communication interface with the NI ELVIS II (+) for the amplifier command and encoder port [8]. The NI ELVIS II (+) is interfaced to the PC via USB link to the Qnet DC motor setup as shown in Fig. 3.5. The NI ELVIS II (+) block reads the angular encoder as an input and commands the power amplifier which acts as driver for the motor. The various network delays are generated through software blocks.

\(\theta (s)\) = output from the system (position),

\(V_{m}\) = input to the system,

\(J_{m}\) = rotor inertia = \(4\times 10^{-6}\,\hbox {kgm}^{2}\),

\(R_{m}\) = terminal resistance = 8.4 \(\Omega \),

\(K_{m}\) = motor back emf constant = 0.042 V/(rad/s).

\(A=\) \(\begin{bmatrix} -201&0\\ 1&0 \\ \end{bmatrix}\), \(B=\) \(\begin{bmatrix} 1\\ 0 \\ \end{bmatrix}\),

\(C=\) \(\begin{bmatrix} 0&1 \\ \end{bmatrix}\), \( D=\) \(\begin{bmatrix} 1 \\ 1\\ \end{bmatrix}\), \(d(t)=0.2 \hbox { sin } (0.086t)\).

\(F=\) \(\begin{bmatrix} 0.001836&0\\ 0.004753&1 \\ \end{bmatrix}\), \(G=\) \(\begin{bmatrix} 0.004753\\ -0.0001242 \\ \end{bmatrix}\),

\(C=\) \(\begin{bmatrix} 0&1 \\ \end{bmatrix}\).

### 3.6.2 Discussion of Simulation and Experimental Results

Figures 3.6a and 3.7d show the simulation and experimental results of position control of DC motor plant for total network delay of \(\tau = 12.8\,\hbox {ms}\) with \(\tau _{sc}=6.4\,\hbox {ms}\) and \(\tau _{ca}=6.4\,\hbox {ms}\). The fractional part of total network delay is obtained as \(\tau '=0.426, \tau '_{sc} = 0.213\) and \(\tau '_{ca} = 0.213\) for \(h = 30\,\hbox {ms}\). The trajectory response of the system in case of simulation and experimental results is shown in Fig. 3.6a, b, respectively. In both cases, the output tracks the reference trajectory in the presence of specified network delay. In order to show the exact effect of time delay compensation at the output, results are magnified as shown in Figs. 3.6c, d. It can be noticed that the effect of fractional time delay from sensor to controller is compensated as the output tracks the trajectory at \(6.4\,\hbox {ms}\). The same effect of time delay compensation from sensor to controller can be observed in sliding surface as shown in Fig. 3.6e, f as well as control signal as shown in Fig. 3.7a, b. Observing the magnified results of Fig. 3.6c, d, g, h, it can be noticed that both the sliding surface and control signal are computed at first sampling instant even in the presence of sensor to controller delay. Thus, the effects of fractional delay from sensor to controller at sliding surface and control signal are compensated and remain within the specified sliding band (3.21). The proposed algorithm was further extended for higher values of \(\tau \). Figures 3.7e and 3.8h show the simulation and experimental results of position control of DC motor for total networked delay of \(\tau =24\,\hbox {ms}\) with \(\tau _{sc}=12\,\hbox {ms}\) and \(\tau _{ca}=12\,\hbox {ms}\). The fractional part of total network delay is computed as \(\tau '=0.8\), \(\tau '_{sc}=0.4\) and \(\tau '_{ca}=0.4\) for \(h=30\,\hbox {ms}\). The simulated and experimental trajectory response of the system are shown in Fig. 3.7e, f respectively. Observing the results, it can be noticed the output tracks the reference signal in the specified networked delay. In order to show the effect of delay compensation, the output results are magnified as shown in Fig. 3.7g and h, respectively. It can be noticed that the effect of fractional delay from sensor to controller is nullified as the output tracks the reference trajectory at \(t=12\,\hbox {ms}\). The similar effect of time delay compensation can be observed in sliding surface as well as control efforts signal as shown in Fig. 3.8a–h. Observing the simulated and experimental magnified results of sliding surface (Fig. 3.8c, d) as well as control signal (Fig. 3.8g, h), it can be noticed that in both the cases the sliding surface and control signal are computed at first sampling instant. Thus, the fractional delay from sensor to controller is compensated and remains within the specified sliding band (3.21). Figures 3.9a and 3.10c show the simulation and experimental results of position control of DC motor for total networked delay of \(\tau =28\,\hbox {ms}\) with \(\tau _{sc}=14\,\hbox {ms}\) and \(\tau _{ca}=14\,\hbox {ms}\). The fractional part of total networked delay for \(h=30\,\hbox {ms}\) is obtained as \(\tau '=0.933\), \(\tau '_{sc}=0.466\) and \(\tau '_{ca}=0.466\), respectively. The simulation and experimental results with magnified response of reference trajectory are shown in Fig. 3.9a–d, respectively. Observing the results, it can be concluded that the output tracks the reference trajectory at \(t=14\,\hbox {ms}\) for the specified networked delay. Thus, the effect of fractional delay from sensor to controller is nullified at the output as shown in Fig. 3.9c, d. The similar effect of time delay compensation will be observed in sliding surface and control signal results as shown in Figs. 3.9e and 3.10c. Observing the results, it can be noticed that in simulation as well as experimental case the sliding surface and the control signal are computed from first sampling instant. Thus, the effect of fractional delay from sensor to controller is compensated at sliding surface as well as at control signal. Apart from delay compensation, the position of motor was also controlled by applying the external disturbances through rotating the wheel in forward and reverse directions. The situation of motor under external disturbances is shown in Fig. 3.10d.

Thus, from all the results it can be concluded that the proposed algorithm works efficiently with network delay range of \(12.8\,\hbox {ms}\le \tau \le 28\,\hbox {ms}\) in experimental as well as in simulated environment. The proposed controller compensates the network time delay for \(q=30\) and \(\varepsilon =2000\) satisfying (3.5) and shows the stable response satisfying condition (3.26) in the presence of matched uncertainty.

#### 3.6.2.1 Comparison of Proposed Algorithm with Conventional Sliding Mode Control

Simulation and experimental results with different networked-induced delays

Network delays (\(\tau \)) | Simulations and experimental results | |
---|---|---|

Chattering | Response | |

\(12.8\,\hbox {ms}\) | Within QSMB | Satisfactory |

\(24\,\hbox {ms}\) | Within QSMB | Satisfactory |

\(28\,\hbox {ms}\) | Within QSMB | Satisfactory |

Comparison of proposed algorithm with conventional SMC

Algorithm | Comparative results | |||
---|---|---|---|---|

\(\tau \) (ms) | \(T_{s}\) | Chattering | Response | |

Conventional SMC | 12.8 | Undefined | High | Unstable |

Proposed method | 12.8 | 1 s | Within QSMB | Stable |

## 3.7 Conclusion

In this chapter, we explored Thiran’s approximation technique for fractional delay compensation in discrete-time domain. The effect of network-induced fractional delay generated due to the communication medium is compensated in sliding surface. The sliding surface is designed in such a manner that the system states slide along the predetermined surface according to network delay. A switching type discrete-time sliding mode controller is designed which computes the control actions in the presence of network delay and matched uncertainty. The stability of the closed-loop NCS is assured by using Lyapunov approach. The effectiveness of the proposed algorithm is tested in simulation and experimental environment on brushless DC motor with deterministic type networked delay and matched uncertainty. The results are also compared with conventional sliding mode. The comparative results endow that the proposed SMC algorithm in the presence of fractional delay compensated by Thiran’s approximation technique performs well in the presence of matched uncertainties.

## References

- 1.A. Mehta, B. Bandyopadhyay, Multirate output feedback based stochastic sliding mode control. J. Dyn. Syst. Meas. Control
**138**(12), 124503(1–6) (2016)CrossRefGoogle Scholar - 2.D. Shah, A. J. Mehta, Design of robust controller for networked control system,
*Proceedings of IEEE International Conference on Computer, Communication and Control Technology*(Sept. 2014), pp. 385–390Google Scholar - 3.D. Shah, A. Mehta, Discrete-time sliding mode controller subject to real-time fractional delays and packet losses for networked control system. Int. J. Control, Autom. Syst. (IJCAS),
**15**(6), 2690–2703 (Dec. 2017)Google Scholar - 4.D. Shah, A. Mehta, Fractional delay compensated discrete-time SMC for networked control system. Digital Commun. Networks (DCN), Elsevier,
**2**(3), 385–390 (Dec. 2016)Google Scholar - 5.J. Thiran, Recursive digital filters with maximally flat group delay. IEEE Trans. Circ. Theory
**18**(6), 659–664 (1971)MathSciNetCrossRefGoogle Scholar - 6.S. Eduardo,
*Mathematical Control Theory: Deterministic Finite Dimensional Systems*, 2nd ed. (Springer, Berlin, 1998), ISBN 0-387-98489-5Google Scholar - 7.W. Gao, Y. Wang, A. Homaifa, Discrete-time variable structure control systems. IEEE Trans. Ind. Electron.
**42**(2), 117–122 (1995)CrossRefGoogle Scholar - 8.D. Shah, A. Mehta, Discrete-time sliding mode control using Thiran’s delay approximation for networked control system, in
*43rd Annual Conference on Industrial Electronics (IECON-17)*, pp. 3025–3031 (Nov. 2017), ISBN 978-1-5386-1126-5Google Scholar - 9.K. Astrom, J. Apkarian, P. Karam, M. Levis, J. Falcon,
*Student Workbook: QNET DC Motor Control Trainer for NI ELVIS*(Quanser, 2015)Google Scholar - 10.W. Yang, L. Fan, J. Luo, Design of discrete time sliding mode observer in networked control system, in
*2010 Chinese Control and Decision Conference*, (July 2010) pp. 1884–1887Google Scholar