# Delay Compensation In Network Control Systems Computer Science Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Abstract- Feedback control systems are ubiquitous in both natural and engineered systems. Recent advancements in communication technologies have enabled control systems to transmit and receive control data over networks giving rise to an emerging technology what we call "Networked Control Systems (NCS)". Communication networks induce random delays in the loop which deteriorate the performance of system and even destabilize the system in some cases. In order to cater for the delay problem in NCS, we have proposed a design of a middleware device (called Play-Back Buffer and Gain) which will enable existing control techniques to work in Networked environment. A Magnetic Levitated System (Maglev) example has been considered. Once system is connected through network, delays deteriorate the performance of the system. Playback buffers have been used in typical multimedia application over internet to reduce variability in network delay and jitter. We have used the same concept of buffers in networked control system to eliminate randomness in the delay. Buffer is followed by a gain which is used to restore the performance of the system. The proposed strategy has resulted in a system which is stable and follows steady state and overshoots criteria however the time response of the system is bit slower instructions.

## INTRODUCTION

RECENT progress in communication, control and computation techniques has enabled the communication networks to offer sophisticated implementation of control systems. These control systems use communication networks to send and receive control data among sensors, actuators, controllers and plants. Ethernet, CAN, Profibus, Fieldbus, ATM and Internet are examples of such networks which transmit signals in a control system to make Networked Control Systems. Feedback Control Systems wherein the control loops are closed through real-time networks are called Networked Control Systems (NCS) or a Networked Based Control System [1] as shown in figure 1.

Physical Plant

Actuator 1

Sensor n

Controller

Sensor 1

Actuator m

## . . . . . .

Other Network Control Other Processes Processes

Figure 1: Typical Networked Control System[1]

They have several benefits comparing with traditional point-to-point wired feedback control systems. Unlike traditional control systems with clumsy network of wires, which make them impractical, Networked Control Systems, save space and offer easy maintenance and installation for complex systems. Modern communication technology can provide flexible and cost effective installation, maintenance, manipulation and expansion of Networked Control Systems. Application based on NCS can be easily maneuvered compared with application with wired connections; this makes NCS more acceptable in manufacturing factories. Moreover, only NCS has enabled us to operate and control systems remotely i.e. teleoperation.

Due to these advantages, NCS have become widely used in factory automation, aircrafts, vehicles, robots, telesurgery and mobile teleoperation in space and hazardous places. Insertion of communication network in a control loop makes the analysis and design complex however. In a traditional point to point control system information is instantaneously delivered from sensors to the controller and from the controller to the actuators whereas in a Networked Control System regardless of the network type several side effects will be introduced in the control loop. The following factors have been pointed out by various researchers affecting the performance of NCS:

Network induced time delay in the loop

Packet drop outs and data loss in the network

Multiple packet transmission

Sampling rate constraints

Network capacity for communication

Disturbance introduced in the medium

These constraints affect the performance of networked control systems and even destabilize the system in some cases. This issue of delays can be address by the following two approaches:

Designing of a good communication medium that can cope with the network constraints

Designing of intelligent control methodologies that can tolerate these constraints

Several researchers have produced valuable results in both directions. In designing control methodologies robust to network constraints, again two directions can be followed.

Design of controllers which can cater for network related issues and replace them with existing controllers.

Design of techniques that will enable existing controllers to handle the network related issues.

We will be focusing on the issue of network induced delays only, neglecting all other network related issues. The delay in the loop severely affects the performance of the system. These delays are random in nature which makes the analysis and design of the system even more complex. Finally, we want to enable existing control to work in the networked environment as replacing a controller is costly and complex task in some cases.

The organization of the paper is as follows: Section I has introduced the basic concepts of Networked Control Systems, issues related with them and design issues we are dealing with in this work. Section II discusses the literature reviewed. In Section III, strategy for design of middleware (Play-back Buffer and Gain) to handle these issues is described. Section IV summarizes the results obtained from the simulating a Magnetic Levitation (Maglev) System of a Steel Ball. Conclusions and future work are discussed in Section V.

## Literature Review

The augmented state model is a significant method for analyzing and designing an NCS. Halevi and Ray [2] considered a continuous time plant and discrete time controller over a periodic delay network. They studied a clock driven controller with mis-synchronization between the plant and the controller. They augmented the system model to include past values of the plant input and output as additional states, in addition to current state vector of the plant and controller.

Nilsson [3] also analyzed NCS in discrete time domain. He modeled the network delays as constant, independently random and random but governed by an underlying Markov Chain. His proposed strategy Optimal Stochastic Control Methodology, as called by Tipsuwan, solved the effect of delay as LQG problem.

Walsh et al. [4] considered a continuous plant and a continuous controller. They introduced the notion of MATI (Maximum Allowable Transfer Interval) i.e. the interval between two successive messages to ensure absolute stability. They also introduces in the form of the TOD protocol, the concept of dynamically allocating network resources to those information sources with critical information. In TOD, the node with greatest weighted error from the last reported value wins the competition for network access; this scheduling technique is called Maximum Error First (MEF).

Zhang et al. [1] analyzed fundamental issues of network induced delay, packet dropout and multiple packet transmission in Networked Control Systems. They characterized the relation between sampling rate and network delay and discussed the stability of NCS using hybrid system stability analysis and using time domain solution. They modeled an NCS with packet dropout and multiple packet transmission and determined the highest rate of data loss for the NCS to be stable.

Wang et al. [5] proposed a new estimator, which along with actuator, was both event and time driven. In the proposed scheme, the current control signals in every sampling interval were received and delay was compensated.

The work of [6], a new sliding mode controller (SMC) based on the predicted vectors of the system is proposed. By the prediction of sliding mode control scheme, the long time delays are compensated in time.

Zhang and Hritsu-Varsakelis [7] designed a communication sequence to access the communication medium. They ignored the actuators and sensors that are not actively communicating with the plant and controller which significantly decreases the complexity of the joint controller/ communication design. An output feedback controller consisting of state observer followed by time varying feedback can be designed for such a communication sequence that exponentially stabilizes the NCS.

In [8], authors focused on the use of play-back buffers to eliminate the variability in the loop delay in a Networked Control System. They explored the design issues for a smith predictor with a play-back buffer controlling a first order linear plant with loop delays given by both bounded interval and heavy tailed distribution. An analytical approximation method for finding optimal play back delay was presented.

A. A-Mihaela et al. also proposes a combination between play-back buffers, which eliminated the randomness of the network delay, and a Smith predictor to compensate the resulting process time delay. The performances of the proposed control system compared with those obtained by using an unbuffered PID controller [9].

As existing controllers has to be replaced in order to control a system over a data network, which is often costly and inconvenient, Tipsuwan and Chow [10], [11] introduced a methodology to enable existing controllers for networked control and teleoperation by use of a middleware. This middleware modifies the output of the controller with respect to the current network traffic conditions. Controller output modification is performed based on a gain scheduling algorithm. They presented case studies on the use of the proposed methodology for networked control system and teleoperation in the presence of IP network delays in these companion papers.

Fei et al. [12] found that modeling the round trip time (RTT) in a network by a single statistical model is not adequate. Therefore two combined statistical distributions, Pareto distribution and generalized exponential distribution, are used to develop their model. An initial study of gain-scheduling controller design for NCS using the developed delay statistical model to adjust controller gain to compensate time delay is presented in their work.

Several other researchers has summarized researched in their work [13-17].

## System Description

## External Gain Scheduling for Network Delays

The dynamics of a linear system can be described by the generalized equations:

## ()

## ()

Where represents states, is output, is the input and are the system parameters.

A simple output feedback controller may be described generally as

## ()

Where represents controller parameter is the gain which is used to change the parameters of controller.

When the system is connected via communication network the performance of the system is affected by the network conditions. Let variable defines the network condition, then in presence of network the system is defined as:

## ()

## ()

The existing control is no longer applicable to this system. A new controller can be designed to handle these network issues.

Recent research [12] has shown that an external gain factor can always be extracted in almost all types of controllers, varying which directly influence the internal parameters of the controller. Hence we can describe a controller as:

## ()

Where is the external gain which can be used to vary the internal parameters of the controller.

It is observed that for a class of systems and are linearly dependent satisfying the relationship:

## ()

Hence we have control over controller parameters by simply adjusting the gain externally and without altering the internal structure of the controller itself.

Let GP represents the transfer function of a second order linear system. A simple Phase-Lead controller is designed to get the desired performance and let Gc be the transfer function of the controller such that,

## ()

## ()

Where z, p and K are the zero, pole and gain respectively.

The closed loop transfer function can be described as:

## ()

In presence of network, let and , delays from controller to plant and from plant to controller respectively affects the system performance. In case of an event driven controller both these delays can be added and let Ï„ be the combined delay or RTT then the plant may be described as:

## ()

The existing control does not remain valid for the system and a new controller is designed to get the performance in this case. Let Gm be the transfer function of the modified controller.

## ()

As per our earlier discussion, let Î² be the external gain factor for this system such that

## ()

Simple mathematics yields.

(14)

It can also be seen that analytically adjusts K while maintaining the ratio between the two.

Hence, in place of designing a whole new controller we can simply find a suitable gain factor which controls the performance of the system by enabling the existing control strategy.

## Network Delays and Randomness

The other major issue was to handle with the delays in the system.

Block diagram of the system with network delays is as depicted in the figure below.

GDCP(s)

GC(s)

GDCP(s)

GP(s)R(s) + E(s) U(s) Y(s)

## -

Figure 2: Block Diagram of the System with Network Delays [10]

Where GDCP(s) and GDPC(s) represents controller to plant and plant to controller delays transfer functions respectively.

Delay models GDCP(s) and GDPC(s) can be written analytically as

(15)

(16)

## Network delays can take on any value from fractions of milliseconds to several minutes.

The network delays can be modeled by various delay distributions. Poisson, Pareto distribution and Exponential distribution can be used to model the network delays. Some researchers have used beta distribution to model the network delays because of their simplicity and the fact that most of the delays in any network are close to the minimum delay while probability of occurrence of longer delays is very less, which is supported by beta distribution.

The probability distribution function (PDF) of the beta distribution is described in (17).

Where we are supposing that the delays in the network are bounded in an interval of.

Parameters Î± and Î² are used to describe the behaviors of the distribution. For Î±=1 and Î²=1, the delays are uniformly distributed and shape of distribution changes with Î± and Î².

(17)

If these delays can be made fixed, controlling the system will become relatively easier.

Playback buffers are being used in video streaming to reduce delay jitter by storing the media packets before the playback [19]. Playback buffers have recently been used by researchers in Networked Control Systems [9, 18]. The only drawback of playback buffers is they incur end-to-end delays in the overall system.

We will use a playback buffer to store command signal from the controller received over a communication network for a certain time and then apply calculated amount of gain to get desired performance from the plant. Figure 3 depicts the block diagram of the proposed system.

Output

Network

MiddlewareRef Error

Plant

Gain

Playback Buffer

Existing Controller +

## -

## -

## Figure 3: Block Diagram of the Proposed System

## Design of Middleware

The proposed middleware has two essential elements: Buffer and Gain. Random delays in the network are fixed to a certain value by using buffer and then gain is tuned to get desired response.

## Play Back Delay

Finding an optimal playback delay for networked control systems is an important and yet very critical task. A very large delay with effect the performance of the system and a too small delay will create issues in handling data thus destroying a lot of important information. A cost function is defined and calculated for various candidate playback delays.

Let Jpb be the cost function for a particular candidate playback delay , such that:

(18)

Where represents the probability of occurrence of the candidate is delay and , cost function, is the IAE associated with a loop delay against candidate playback delay .

This cost function is evaluated for .

This cost function tends to find the delay which has the capability to cause most damage to the system performance.

## External Gain

The open loop transfer function of the system with buffer and hold may be defined as:

GP GBD = GP (19)

The transfer function of the closed loop system with existing control in this case is described as:

(20)

However this system does not fulfill the desired performance.

A new controller has to be designed to get the desired performance. Let Gm be the modified controller.

(21)

As discussed in earlier section Gm = Î² Gc we get the following transfer function

(22)

That is by adjusting the value of gain only we can restore the performance of the system. Stability being the core issue in control system, we first need to find the range for which the system remains stable.

This can be done by using root locus technique. for the closed loop system including the delay and buffer hold.

Our performance criterion relies mainly on rise time, settling time and overshoot of the system when a step input is applied. An efficient technique would be one which ensures minimum deviation from the desired performance criterion. A cost function can be defined here which involves all these system specification. Our performance is based on meeting design requirements in settling time, rise time, percentage overshoot and steady state error. Each one of this design requirement can be taken as a cost function and overall cost function is given as [10]:

Jc =w1J1 + w2J2 + w3J3 + w4J4 (23)

Where J1 denotes rise time, J2 settling time, J3 overshoot and J4 is steady state error, then:

Where w1, w2, w3, and w4 are the weighting functions. These weighting function are defined on the basis of importance of each parameter. Here nominal values are taken as the desired requirement.

In order to find the best possible value of gain, we first impose limits on gain values. This is done by finding the stable set of gain values i.e. gain values for which system remains stable. This can be done by simply drawing the root locus and observing the value of K at which it touches the imaginary axis. Once the stable set of gain is calculated we start simulating the cost function for various values of gain from the stable set and the one with minimum cost function is selected as optimal gain. The process flowchart is depicted in figure 4.

Start

End

k=0

J=âˆž

J=Jc

B=k

k=k+1

Jc<J

k=Bm

Compute J1, J2, J3 and J4.

Find Jc from them.

No

No

Yes

Yes

Figure 4: Flow Chart for Finding Optimal Gain

## Simulations And Results

## Assumptions Made on the System

In networked environment the goal of designing is to maintain the performance of the system regardless of the network delays. The main objective of this paper is to evaluate the performance restoration of the delayed system when we use proposed Play-back buffer and Gain methodology. In order to carry out our research following assumptions are made about the system as made by other researchers [21]:

All control and measurement signals are transmitted in a single packet.

No packet loss or packet dropout occurs during the process.

Effects of disturbances and noise are neglected.

The sampling period of the system is assumed to be considerably smaller than the network delays.

The analysis and design are carried out in continuous domain for the sake of simplicity. However for implementation all systems are to be discretized. If our assumption of sampling period being smaller than the network delays holds, the same results will hold for discrete case.

## System Model

Here for the purpose of our experiments and simulations we are considering an example of a magnetic levitated system of a steel ball using phase-lead controller over DeviceNet based CAN network. This model has been taken from [22] to make analysis and comparison easier in the later stages.

The physical system consists of a steel ball that is to be levitated under an electromagnet. For the electromagnet, the required parameters a resistance, an inductance, a magnetic constant and mass of the steel ball and any hysteresis effects of the electromagnet were assumed to be negligible [22].

mThe physical system is shown in figure 5.

## Electro-Magnet

x

## Steel Ball

Weight = mg

## Figure 5: Physical System of Magnetic Levitation

The following is how [22] derived the equations for this model.

The steel ball stays suspended in the air by counteracting the ball's gravitational force by the electromagnetic force.

- x (t) is the distance between the steel ball and the electromagnet.

- X0, the reference position, is the proper levitation distance.

The electromagnetic force, f(x,t), acts on the ball, which can be expressed as the following dynamic formula in an upward direction according to Newton's law and where m is the weight of the ball, and g is the gravitational constant.

(24)

By solving the above Equation, we get the transfer function

(25)

By using Virtual Pole Cancellation method, we get this open loop transfer function as

(26)

This is the final transfer function of Magnetic Levitation System of Steel Ball [22].

This Magnetic Levitation plant is used for simulations.

The design criteria for the plant under consideration, as set in the reference, are:

Percentage Overshot â‰¤ 5%

Settling Time â‰¤ 0.0352 s

Rise Time â‰¤ 0.0139 s

## Simulations

The plant's step response can be modified using control techniques to get desired performance. A simple Phase-Lead controller GC(s), is designed to get the desired performance.

Consider the first-order compensator with the transfer function of the phase-lead compensated controller is shown as

(27)

When â”‚zâ”‚<â”‚pâ”‚, the network is called a Phase-Lead network.

The pole and zero of the compensator network is selected to cancel the unstable pole of uncompensated system. As a rule of thumb, p is equal to 10 times z. The design values of z and p are 25 and 250, respectively.

The compensator transfer function becomes

(28)

The system should have K>8.35, because below to this, the system is Un-stable [22].

At K=40, the Magnetic Levitation system of Steel ball is stable and satisfying all performance criteria i.e. Overshoot, Steady-State Error, Settling time etc that we are considering..

Thus the Phase-Lead Controller is as

(29)

The results of simulations are summarized in figures 6-10.

The figure 6 shows the closed loop response of Magnetic Levitation System with the Phase-Lead Controller.

Figure 6: Step Response of the Maglev System with Controller in Absence of Network

Step response of the plant with the controller shows that the system is stable and efficiently working. It has rise time of 0.0139 s, settling time of 0.0352 sec, and overshoot is 3.3%. Here we are not considering any Network. This result shows a stable system with faster response.

Then system is connected through network as shown in figure 7.

Figure 7: Systems behavior in presence of 3 ms delay

The figure 7 shows the closed loop response of the magnetic levitation system with controller in presence of Network delay of 3 milli seconds. Due to insertion of the Network the response of the system deteriorated. Its performance deteriorated as, Rise time changes from 0.019s to 0.011s, settling time shifted from 0.0352s to 0.0626s, and overshoot rises from 3.3% to 23.5%. In this case, the system performance is becoming stable after 0.1s in term of transients.

Now we are considering a Network delay of 5 milli seconds. The closed loop response of the magnetic levitation system with controller in presence of Network delay of 5 milli seconds, as shown in figure 8. The performance of the system deteriorated more. Its Rise time changes from 0.019s to 0.011s, settling time shifted from 0.0352s to 0.117s, and overshoot rises from 3.3% to 41.1%. In this case, the system performance is becoming stable after 0.18s in term of transients.

## Figure 8: Systems behavior in presence of 5 ms delay

The figure 9 shows the closed loop response of the magnetic levitation system with controller in presence of Network delay of 10 milli seconds.

## Figure 9: Systems behavior in presence of 10 ms delay

Due to insertion of the Network the response of the system deteriorated. Its performance is worst in this case. Rise time changes from 0.019s to 0.0123s, settling time shifted from 0.0352s to 0.933s, and overshoot rises from 3.3% to 81.2% which is very high. In this case, the system performance is becoming stable after 1.3s in term of transients.

Now proposed methodology Play-back buffers and Gain was used to cater for the effects of network delays.

## Figure 10: Response of the Maglev System with Proposed Play-Back and Gain Strategy

The figure 10 shows that the step response of magnetic levitation system in presence of Network by using the proposed Play-back buffer Gain methodology providing nearly desirable behavior as it was in Absence of any Network. Its rise time is 0.0257s, settling time is 0.0712s, and overshoot is 4.64% which is less than 5% that we required.

The result shows that the proposed strategy efficiently working and obeying the performance criteria in term of Overshoot and Steady-state error. Rise time and Settling time is little bit increased but they are in fractions of milli seconds.

## Conclusions and Future work

Proposed strategy is applied to cope up with the network delays. Buffer delay is carefully chosen to handle most of the delays in the loop. The system thus resulted is stable and nearly follows the performance criteria i.e. Overshoot, Steady State Error, Settling time etc. However the system becomes a bit slower as can be seen in the figure 11 where GsPlant is the closed loop system in absence of any network and Gsn_PB is the closed loop system in presence of network with proposed strategy. The figure 11 shows a comparison of the Magnetic Levitation System of a steel ball in Absence of Network and in Presence of Network with Play-back buffer Gain methodology. There is only a little bit difference in their step responses as before insertion of Network and after insertion of Network.

From these results we can say that the proposed strategy is good enough to implement in many other applications as the need of re-designing of controller is completely overcome by using this Play-back buffer gain methodology. This methodology is efficiently overcome the random delays in the network.

The research result can also be applied to

Different Network Control Systems where there is a need of redesigning controller to compensate delay effects

The methodology will save cost of redesigning by utilizing existing controller

Figure 11: Comparison of the Closed Loop System in Absence of Network and in Presence of Network with Proposed Play-Back and Gain Strategy

Include a more accurate and real network delay model

Consider other network related issues e.g. multiple packet transmission

Design a more realistic playback buffer taking into account its various parameters

Implement this methodology on Discrete Systems

Implement the system practically