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

- 600 Downloads

## Abstract

In this chapter, the design of discrete-time sliding mode controller using Thiran’s delay approximation is extended for non-switching type algorithm. The effect of sensor to controller delay is compensated using Thiran’s delay approximation technique in the sliding surface. Further, Lyapunov approach is used to determine the stability of closed-loop NCSs with the proposed controller. The efficacy of the control methodology is endowed by simulation and experimental results in the presence of networked delay. The performance of the proposed control algorithm is further validated in the presence of real-time networks such as CAN and Switched Ethernet using true time simulator.

## Keywords

Deterministic network delay Thiran’s approximation True time simulator CAN Switched Ethernet Discrete-time sliding mode control Stability## 4.1 Network-Induced Fractional Delay Compensation

## 4.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*) [3]. For simplicity, it is assumed that

*d*(

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

*h*is the sampling interval.

### Remark 5

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 3

The total network-induced delay \((\tau )\) is deterministic in nature satisfying,

### Remark 6

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

### Assumption 4

*d*(

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

### Remark 7

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 (4.3, 4.4) in the presence of deterministic fractional network delays \(\tau '_{sc}\) and \(\tau '_{ca}\) under the Assumptions (3) and (4).

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.

## 4.3 Sliding Surface Design

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. The Thiran approximation [4] 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 and \(\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 2 given below.

### Lemma 2

*s*(

*k*) for the given system (4.3, 4.4) with sensor to controller network-induced fractional delay (\(\tau '_{sc}\)) satisfying condition (4.5) and under the Assumptions (3) and (4) is given as:

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

### Proof

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

*z*-transform, we may have

*Proof*.

From Eq. (4.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 (4.18).

## 4.4 Discrete-Time Sliding Mode Control

In this section, non-switching type control law along with its stability is proposed based on reaching law in [6] using compensated sliding surface (4.18). The reaching law proposed by Bartoszewicz causes less chattering compared to Gao’s law [7] and offers faster convergence with limited magnitude of the control signal.

### Theorem 4.1

The non-switching discrete-time sliding mode controller for system (4.3, 4.4) in the presence of deterministic type sensor to controller fractional delay satisfying condition (4.5) and matched uncertainty *d*(*k*) is given as,

\(H=(C_{s}F)\), \(I=\alpha C_{s}\), \(J=\{1-q[s(k)]\}\).

### Proof

### Remark 8

*d*(

*k*) appearing in the reaching law is applied through the network. So, the compensated disturbance using Thiran’s approximation is given as:

### Remark 9

\(H=(C_{s}F)\), \(I=\alpha C_{s}\) and \(J=\{1-q[s(k)]\}\)

This completes the *proof*.

Next, the stability condition is derived using compensated sliding surface (4.18) and control law proposed in Eq. (4.25) such that the system states remain within specified band (4.22) over a finite interval of time.

## 4.5 Stability Analysis

### Theorem 4.2

*d*(

*k*) satisfying (4.7) drive towards the sliding surface (4.18) provided following condition (4.26) is feasible:

### Proof

*u*(

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

So, by tuning the parameter \(\psi \), we have \(\varDelta V_{s}(k)\prec \eta s^{T}(k)s(k)\) which guarantees the convergence of \(\varDelta V_{s}(k)\) and implies that any trajectory of the system (4.3, 4.4) will be driven onto the sliding surface and maintain on it.

This completes the *proof*.

## 4.6 Results and Discussions

This section briefly discusses about the simulation results as well as experimental results of the proposed control algorithm in the presence of deterministic network delays and matched uncertainty. The efficiency and robustness of the proposed control algorithms are tested under three different situations: (i) illustrative example (ii) real-time plant as DC servo motor and (iii) real-time networks.

### 4.6.1 Illustrative Example

In this section, an illustrative example given in [8] is simulated in MATLAB environment.

\( A = \) \(\begin{bmatrix} -0.7&2\\ 0&-1.5 \\ \end{bmatrix}\), \( B = \) \(\begin{bmatrix} -0.03\\ -1 \\ \end{bmatrix}\),

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

\( F = \) \(\begin{bmatrix} 0.9792&0.05805\\ 0&0.956 \\ \end{bmatrix}\), \( G = \) \(\begin{bmatrix} -0.001771\\ -0.02934 \\ \end{bmatrix}\),

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

Figures 4.4 and 4.5 show the plant state variables with initial condition \(\begin{matrix} x(k)=[1&1]\end{matrix}\). Both the states converge to zero from given initial condition in the presence of network fractional delay. Figure 4.6 shows the magnified response of the plant state variables. It can be noticed that the effect of fractional delay is compensated from first sampling instant. Figure 4.7 shows the compensated sliding surface calculated using Thiran’s approximation. It can be observed that the compensated sliding variable is also computed from first sampling instant in the presence of sensor to controller fractional delay. The magnified response of the same is shown in Fig. 4.8. Figure 4.9 shows the control signal \(u(k)\) which is computed using proposed compensated sliding surface \(s(k)\). This control signal is further applied to the plant through the network. The same approach of time delay compensation is used to compute the compensated control signal \(u_{a}(k)\) as shown in Fig. 4.10. From the magnified result in Fig. 4.11, it can be justified that the effect of controller to actuator fractional delay is also compensated from first sampling interval.

The algorithm is also examined for different signal-to-noise ratio (SNR) as shown in Fig. 4.12. It can be observed from Fig. 4.13 that the system states converge to zero for different SNR. Figure 4.14 shows the results of stability. It is observed from Fig. 4.14 that for given \(\psi =100\) and \(d_{2}=0.2\) guarantees the covergence of \(\varDelta V_{s}(k)\) and implies that the trajectories of system ( 3.3, 3.4) will be driven on the compensated sliding surface and maintain on it under the specified network fractional delay and matched uncertainty.

### 4.6.2 Simulation and Experimental Results of Brushless DC Motor

\(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}\),

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

Comparison of proposed algorithm, switching-based SMC and conventional SMC

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

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

Conventional SMC | 12.8 | Undefined | High | Unstable |

Switching SMC | 12.8 | 1 s | Within QSMB | Stable |

Proposed method | 12.8 | 0.3 s | Nil | Stable |

## 4.7 Simulation with Real-Time Networks

In previous section, the efficacy of the proposed control law is examined in the presence of brushless DC motor connected through networked medium. It can be observed from simulation results that the control law proposed using non-switching reaching law provides faster convergence without increasing the amplitude of control signal. The chattering is also negligible compared to switching type control law. Thus, in this section, the efficacy of the proposed non-switching control law is further tested in the presence of real-time networks and matched uncertainty. The real-time networks are simulated using true time software which provides wide range of simulated networks such as CAN, Switched Ethernet, Profibus, Profinet, CSMA/CD, Round Robbin [9]. In this work, the simulations are carried out under CAN and Switched Ethernet communication medium as network delays are assumed to be deterministic in nature. Further, the performance of the system is also studied in the presence of packet loss situation.

The following network specifications and parameters are considered for simulations:

\(Networked\) \(medium\): CAN and Switched Ethernet

\(Data\) \(rate\) \((bits/s)\) = 80,000

\(Minimum\) \(frame\) \(size\) \((bits)\) = 512 (*CAN*) and 1024 (*Switched* *Ethernet*)

\(Loss\) \(probability\) = 0 to 0.5

\(sampling\) \(interval\) \(h\) = 0.030 s.

\(\begin{matrix}C_{s}=[24.5156&31.6288]\end{matrix}\)

\(|s(k)|\le \) \(+0.2\) to \(-0.2\) with user-defined constant \(\psi =1500\).

\(A = \) \(\begin{bmatrix} -0.7&2\\ 0&-1.5 \\ \end{bmatrix}\), \(B = \) \(\begin{bmatrix} -0.03\\ -1 \\ \end{bmatrix}\),

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

\(F=\) \(\begin{bmatrix} 0.9792&0.05805\\ 0&0.956 \\ \end{bmatrix}\), \(G=\) \(\begin{bmatrix} -0.001771\\ -0.02934 \\ \end{bmatrix}\),

### 4.7.1 CAN as a Network Medium

In this section, the nature of the system with CAN as a networked medium is studied in Figs. 4.22, 4.23, 4.24, 4.25, 4.26, 4.27, 4.28, 4.29, 4.30, 4.31, 4.32, 4.33, 4.34, 4.35, 4.36 and 4.37. The robustness of the proposed controller is checked by applying slowly time-varying disturbance at the input side of the system as shown in Fig. 4.2. In CAN, it is assumed that the minimum frame size is 512 bits and data transfer rate is 80,000 bits/s. So, the delay generated in the CAN network to transfer the data packets from sensor to controller is \(\tau _{sc}=6.4\,\hbox {ms}\) and from controller to actuator is \(\tau _{ca}=6.4\,\hbox {ms}\). The processing and the computational delays at sensor, controller and actuator are considered as 0.9, 0.5 and \(0.5\,\hbox {ms}\), respectively. Thus, the total networked delay generated within the closed-loop system is \(\tau =14.7\,\hbox {ms}\). The fractional part of total network delay is obtained as \(\tau '=0.49, \tau '_{sc}=0.213\) and \(\tau '_{ca}=0.213\) for sampling interval of \(h=30\,\hbox {ms}\). The scheduling policies of sensor to controller and controller to actuator with network under ideal condition and bandwidth sharing condition are shown in Figs. 4.22 and 4.23, respectively. It can be observed that blue samples are indicated as the traffic while yellow and red samples indicate the scheduling policy for sensor to controller and controller to actuator. The trajectory response of the system for the network under ideal condition and traffic condition is shown in Figs. 4.24 and 4.25. It can be noticed that under both situations, the output tracks the reference trajectory for the specified networked delay. In order to show the precise effect of time delay compensation in CAN network at the output results are magnified as shown in Figs. 4.26 and 4.27. It can be noticed that the effect of fractional delay from sensor to controller is compensated as the output tracks the reference input at \(t=8.3\,\hbox {ms}\). The similar effect of time delay compensation for the network under traffic condition can be observed in sliding variable, Figs. 4.28 and 4.29, as well as control signal, Figs. 4.30 and 4.31. Observing the magnified results in Figs. 4.29 and 4.31, it can be noticed that the sliding variable and control signal are computed exactly after an interval of \(t=1.4\,\hbox {ms}\) even in the presence of sensor to controller delay. Apart from time delay compensation, the proposed algorithm was examined under packet loss condition. Figures 4.32, 4.33 and 4.34 show the results of tracking response under packet loss condition, while Figs. 4.35, 4.36 and 4.37 show the instances of packet drop. It can be observed from results that when the packet loss is \(50\%\), the system goes to unstable condition. Thus, it can be concluded that the system shows the satisfactory response under \(30\%\) of packet loss for specified network delay with CAN as a communication medium.

### 4.7.2 Switched Ethernet as a Network Medium

### 4.7.3 Comparison of Proposed Algorithm with Conventional Sliding Mode Control Under CAN and Switched Ethernet as a Network Medium

Comparison of proposed algorithm with conventional SMC in true time

Algorithm | Comparison results | |||
---|---|---|---|---|

\(\tau _{CAN}\) (ms) | \(\tau _{Ether}\) (ms) | \(T_{s}\) | Response | |

Conventional SMC | 14.7 | 25.7 | Undefined | Unstable |

Proposed method | 14.7 | 25.7 | 1 s | Stable |

## 4.8 Conclusion

In this chapter, we explored Thiran’s approximation technique for fractional delay compensation in discrete-time domain for designing non-switching type discrete-time sliding mode controller 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 such that system states remain within the specified band. The effectiveness of the derived algorithms is tested using illustrative example and brushless DC motor set-up with deterministic networked delay and matched uncertainty. The experimental results are compared with switching SMC as well as conventional algorithm without delay compensation. The comparative results show that the non-switching type algorithm is most efficient technique than switching type algorithm. The simulation results and experimental results carried out for DC servo motor plant proved that the control algorithm designed using non-switching reaching law is robust and efficient algorithm as it provides the faster convergence with less chattering in discrete-time domain. Further, the efficiency of non-switching controller was examined under simulated CAN and Switched Ethernet networked medium using true time. The results show that the proposed control algorithm compensates the networked delay and performs well in the presence of network-induced delay.

## References

- 1.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. Sys. (IJCAS)
**15**(6), 2690–2703 (Dec. 2017)Google Scholar - 2.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 - 3.A. Mehta, B. Bandyopadhyay, Multirate output feedback based stochastic sliding mode control. J. Dyn. Sys. Meas. Control
**138**(12), 124503(1–6) (2016)CrossRefGoogle Scholar - 4.J. Thiran, Recursive digital filters with maximally flat group delay. IEEE Trans. Circ. Theory
**18**(6), 659–664 (1971)MathSciNetCrossRefGoogle Scholar - 5.S. Eduardo,
*Mathematical control theory: deterministic finite dimensional systems*, 2nd ed. (Springer, 1998) ISBN 0-387-98489-5Google Scholar - 6.A. Bartoszewicz, P. Lesniewski, Reaching law approach to the sliding mode control of periodic review inventory systems. IEEE Trans. Autom. Sci. Eng.
**11**(3), 810–817 (2014)CrossRefGoogle 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.J. Wu, T. Chen, Design of networked control systems with packet dropouts. IEEE Trans. Autom. Control
**52**(7), 1314–1319 (2007)MathSciNetCrossRefzbMATHGoogle Scholar - 9.D. Shah, A. Mehta, Design of robust controller for networked control system, in
*Proceedings of IEEE International Conference on Computer, Communication and Control Technology*(2014) pp. 385–390Google Scholar - 10.K. Astrom, J. Apkarian, P. Karam, M. Levis, J. Falcon,
*Student Workbook: QNET DC Motor Control Trainer for NI ELVIS*, Quanser, 2015Google Scholar