You are on page 1of 4

Study of Immune PID Networked Control System

Based on TrueTime

Daogang Peng
1,2
, Hao Zhang
1
, Conghua Huang
1
, J iajun Lin
2
, Hui Li
1

1
School of Electric Power and Automation Engineering, Shanghai University of Electric Power, Shanghai, China
2
School of Information Science and Engineering, East China University of Science and Technology, Shanghai, China
Email: jypdg@163.com, hzhangk@yahoo.com.cn


AbstractNetworked control system has been a hotspot in
the research fields of control theory and control engineering
applications at home and abroad. Immune PID controller
based on biological immune mechanism has simple
structure and algorithms, and with the features of strong
robustness and adaptability. The structure of networked
control system based on immune PID controller had been
designed in this paper, taking the typical one-order inertia
plant with time delay and second-order inertia plant in the
process of industrial production for example, the simulation
model of immune PID networked control system based on
TrueTime toolbox had built in the MATLAB environment,
and simulation studies have shown the feasibility and
effectiveness of the control scheme.
Index TermsNetworked control system; Immune PID
controller; TrueTime toolbox; Advance control
I. INTRODUCTION
Networked control system has been a hotspot in the
research fields of control theory and control engineering
application at home and abroad. In the networked control
system, due to the introduction of the communication
network, the uncertainty problem of information
transmission that followed also appeared in the control
system, mainly for the transmission time delay, network
packet loss, data packet out of order, error phenomenon
and information collision, and so on. The TrueTime
toolbox in the MATLAB environment provided a very
good platform for the research of networked control
system, whose control task can be realized by
user-written code functions, either in C++or M-file in
MATLAB, also be implemented by the form of using
simulation module of simulink. The dynamic process of
distributed real-time control system, control task
execution and co-simulation environment of network
interaction can be built by the TrueTime toolbox, and in
the simulation environment, the effect that most
scheduling strategies and network protocol in physical
layer on control system performance can be studied.
Artificial immune system is an intelligent information
processing system developed by the use of biological
immune system with principles and mechanisms of
strong robustness and adaptability in the environment
with lots of disturbance and uncertainty. The immune
PID controller had been constituted by the combination
of biological immune principles and traditional PID
controller, which can learn mutually from each other, and
improve the control performance of the system further.
In this paper, taking the typical one-order inertia plant
with time delay and second-order inertia plant in the
process of industrial production for example, and using
the TrueTime toolbox, the networked control system
based on immune PID controller had been designed, and
the feasibility and effectiveness of the control scheme had
been proved by the simulation studies.
II. PRINCIPLES OF IMMUNE PID CONTROLLER
A. Feedback Mechanism of Immune System
The most important cells in immune system are the
lymphocytes, mainly two types, B cell and T cell. As
the T cell

play a key role in the immune response, so the
immune feedback algorithm is mainly based on the
feedback regulating principle of T cell

of biological
immune system.
The immune feedback rules based on immune
feedback mechanism of T cell, the definition of the
external substance quality of the generation k is:
) ( ) 1 ( ) ( d k u k k
kill
= (1)
Where is the proliferative factor of external
substance; ) (k u
kill
is the number of killedT cell; and
d is the postmortem interval. The definition of the output
from auxiliary T cell stimulated by the external
substance
) (k T
H
is as follow:
) ( ) (
1
k K k T
H
= (2)
Where
1
K
is the stimulating factor of
H
T
cell, whose
symbol is plus. Although the activity of other cells is
forbidden by the restraining T cell, considering applying
the function to feedback control, assuming that the action
from restrainingT cell to Bcell is given as:
) ( )] ( [ ) (
2
k k u f K k T
kill s
= (3)
Where
2
K is restraining factor of
s
T cell, whose
symbol is plus. The definition of
) (k u
kill

is as:
) 1 ( ) ( ) ( = d k u d k u k u
kill kill kill
(4)
912 JOURNAL OF NETWORKS, VOL. 6, NO. 6, JUNE 2011
2011 ACADEMY PUBLISHER
doi:10.4304/jnw.6.6.912-915
In equation (3),
) ( f
is a nonlinear function selected,
introducing the reactivity of being responsible for killed
T cell and external substance of generation ) ( d k , the
function
) ( f
is defined as:
) / exp( 0 . 1 ) (
2
a x x f = (5)
Where 0 > a , which is a parameter changing the form
of function, for choosing different a , the relationship
between input and output of function
) ( f
is different,
and the larger the a is, the more smooth the curve of
function
) ( f
is, but for all x , always have ] 1 , 0 [ ) ( x f .
The total stimulation received by B cell is as follow:
) ( ) ( ) ( k T k T k S
s H
= (6)
Where the activity of B cell is given by the
integration of ) (k S . Supposing that the amount of killed
T cell is given by the differentiation of the activity
of B cell, then the amount of killed T cell ) (k u
kill
is:
) ( )]} ( [ 1 {
) ( )] ( [ ) ( ) (
0
2 1
k k u f K
k k u f K k K k u
kill
kill kill


=
=

(7)
Where
1
K K = and
1 2 0
/ K K =
. Equation (7) is the
immune feedback rules. The control response rate of
parameter K and the control stabilization of parameter
0
can been seen from the equation (7). Therefore, the
performance of immune feedback rules greatly depends
on the choice of the factors.
B Immune PID Controller
Based on the immune feedback rule above, using the
mount of external substance ) (k as the deviation
) (k e , using the total stimulus ) (k S received byBcell
as the control input ) (k u , the feedback control rule of
immune P controller is as follow:
) ( ) ( )]} ( [ 1 { ) (
'
k e K k e k u f K k u = = (8)
Where )]} ( [ 1 { ' k u f K K =

is the proportional
coefficient; and the gain
1
K K = is reaction rate of
control, and
1 2
/ K K =

is restraining parameter to
control the stable effect. The controller based on immune
feedback rule is actually a non-linear P controller, whose
proportional coefficient ' K varies with the change of the
input of controller, and the gainK is regulated by its own
output, which can been seen from equation (8). However,
the P-type immune controller is not very effective for the
objects of second-order or high-order, which cant
compensate for noise or control error caused by
non-linear interference. To overcome these problems, the
following PID immune controller should be improved.
According to the algorithm of traditional PID
controller, the P-type immune controller in equation (8)
was changed into the following PID-type immune
controller, whose formula is as:
) ( )
1
1
1 )]}( ( [ 1 { ) ( k e
z
z
K
z
K
k u f K k u
d
i

+

+ = (9)
Where
i
K and
d
K
are integral and differential
coefficient respectively. From equation (9) we can see:
when 1 )] ( [ 0 < k u f , immune PID controller
represents the negative feedback action; when
)] ( [ 1 k u f < , it means positive feedback action. In
which, the upper limit of the factor keeps the stability
of the control system, and when 0 = , then the immune
PID controller is equivalent to the traditional PID
controller.
III. IMMUNE PID NETWORKED CONTROL SYSTEM
BASED ON TRUETIME
A The TrueTime Toolbox
The TrueTime toolbox is a simulation platform based
on Matlab/Simulink for networked control system, which
is developed by Martin OhlinDan Henriksson and Anton
Cervin, etc of Sweden Lund University. It does not need
actual network connection, and its advantages are
relatively simple, low cost and code open. Meanwhile,
owing to it based on Matlab/Simulink environment, it is
very easy to design the network controller. So, the
TrueTime is an ideal platform for delay compensation
algorithm of networked control system and scheduling
algorithms of different resources.
There are four main modules in the TrueTime toolbox,
namely TrueTime Kernel module, TrueTime Network
module, TrueTime Wireless Network Module and
TrueTime Battery module. Connecting the modules in
TrueTime and the common modules in Simulink, the
corresponding real-time control system or networked
control system can be built.
The TrueTime Kernel module can be used to simulate
nodes of networked control system, such as sensors,
controllers and actuators etc. It has flexible real-time
kernel, A/D and D/A converters, network sending and
receiving interfaces, external interrupting channels and
multi-task scheduling and monitoring output interfaces,
where the output of dispatchers and monitors are used to
display the distribution conditions of public resources
(CPU, monitor, network) in the simulation process. The
Kernel module can execute the task according to the user
defined, which supports four kinds of task scheduling
algorithms, such as fixed priority (prioFP), rate
monotonic (prioRM), deadline monotonic (prioDM) and
earliest deadline first (prioEDF).
The TrueTime Network module uses event-driven
mode, when the messages are read in or sent out, the
module executes the task. In the simulation environment,
when a message transmission is completed, the message
will be stored in the buffer at the destination computer
node, and it will inform the destination computer by the
form of interruption. The messages read in or sent out
should contain the information about the sending and
JOURNAL OF NETWORKS, VOL. 6, NO. 6, JUNE 2011 913
2011 ACADEMY PUBLISHER
receiving computer nodes, user defined control signals or
measured signal data, the total length of the message,
real-time characteristic parameters such as priority,
deadline and so on. The network module simulates
receiving and sending of data in accordance with the
network module selected, which can provide six kinds of
modes and network parameters, such as the number of
network nodes, transmission rate and medium access
control protocol (MAC) and so on, where MAC includes
CSMA/CD (Ethernet), CSMA/AMP, Round Robin,
FDMA, TDMA, and Switched Ethernet, etc.
B The Structure of Immune PID Networked Control
System and Its Simulation Model
The directly relative field devices between networked
control system and control loops involve such as sensors,
controllers and actuators and so on, and the three types of
devices belong to the network nodes in the networked
control system. The essence of the networked control
system is messages about reference input, object output
and control input etc exchanging the data among each
component of networked control system such as sensors,
controllers and actuators and so on by the network. Each
node in the networked control system is directly
connected to the network, so it has the advantages of
resource sharing, fewer cables, easy to extend and
maintain.

Figure 1. The structure of immune PID networked control system

The structure of immune PID networked control
system is shown in the figure 1, where sensors are used to
sample signals periodically from controlled objects and
pass them to the immune PID controller through network
communication channels, then immune PID controller
calculates the control signals via immune PID algorithm,
thirdly pass them to the actuators by network
communication channels, and the actuators control the
controlled object in accordance with the results of
immune PID controller.
The immune PID networked control system based on
TrueTime consists of a network module and a number of
computer modules under MATLAB environment, where
computer modules are used as nodes of network.
According to the structure of networked control system
shown in figure 1, the simulation model of networked
control system built by using TrueTime toolbox is shown
in the figure 2.

Figure 2. The simulation model of immune PID networked control
systembased on TrueTime

The system includes four computer nodes, and each of
them is represented by TrueTime kernel module. A
sensor node (Node 4) is periodic sampling from the
controlled object, and through the network module, the
samples will be sent to the controller node (Node 3). The
task of controller node is calculating the control signals
and sending the results to actuator node (Node 2), and the
actuator node executes the control signals later. The
system also contains an interference node (Node 1),
which is used to produce a random interference signal to
hinder the network transmission, and to simulate loads in
the network, which send and receive data periodically,
occupy the network bandwidth and make the network
node involved in control have transmission delay.
Prescribe that the signals produced by interference node
has the highest priority, and the reference signal uses the
square wave signal triggered at zero. The sensor node is
set to clock driven mode (sampling period to drive the
device to work), and the controller node and actuator
node are set to event-driven mode (specific data reaching
or sending over to drive devices to work). The network
communication mode in TrueTime can be selected as
CSMA / CD (Ethernet), CSMA / AMP (CAN), Round
Robin, FDMA, TDMA, Switched Ethernet, etc, which
can be changed through setting the Network type in the
TrueTime Network module. The network communication
model used in this paper is CSMA / CD (Ethernet).
IV. SIMULATION STUDIES
The typical one-order inertia plant with time delay and
second-order inertia plant in the process of industrial
production are used, whose transfer functions are as
follows respectively:
s
e
s
s G
2
1
1 10
75 . 1
) (

+
=

2 2
) 1 10 (
5 . 1
) (
+
=
s
s G

In the simulation process, when the controlled object is
one-order inertia plant with time delay, the parameters of
immune PID controller are as follows:
1 . 0 =
8 . 0 = K
0012 . 0 =
i
K
2 . 0 =
d
K ; When the controlled object is
914 JOURNAL OF NETWORKS, VOL. 6, NO. 6, JUNE 2011
2011 ACADEMY PUBLISHER
second-order inertia, the parameters of immune PID
controller are as follows: 1 . 0 = 6 . 0 = K
0008 . 0 =
i
K 2 . 0 =
d
K . Figure 3 is the simulation result
of one-order inertia plant with time delay, and figure 4 is
the simulation result of second-order inertia plant, where
curve is the given square wave input signal, curve
is the output signal of the system. It can be seen from the
figures, networked control system with the use of
immune PID controller has good control performance,
and the figures show the feasibility and effectiveness of
the control scheme.

Figure 3. Simulation result of one-order inertia plant with time delay


Figure 4. Simulation result of second-order inertia plant
V. CONCLUSIONS
Networked control system is a research frontier and hot
spot in current international control theory and control
engineering field. The TrueTime toolbox in the
MATLAB environment provided a very good platform
for the research of networked control system, and the
dynamic process of distributed real-time control system,
control task execution and co-simulation environment of
network interaction can be built by TrueTime toolbox.
The immune PID controller constituted by the
combination of biological immune principles and
traditional PID control has simple structure and algorithm,
and with the features of strong robustness and
adaptability, which can improve the control performance
of the system further. In this paper, taking the typical
one-order inertia plant with time delay and second-order
inertia plant in the process of industrial production for
example, and using the TrueTime toolbox, the networked
control system based on immune PID controller had been
designed, and the feasibility and effectiveness of the
control scheme had been proved by the simulation studies,
which provides a good example for application studies of
advanced control theory in networked control system.
ACKNOWLEDGMENT
This work is supported by the State Key Program of
National Natural Science Foundation of China under
Grant No. 61034004 and the Shanghai Educational
Development Foundation under Grant No. 09CG61.
REFERENCES
[1] Chen B., Meng C.M., Ge B., et al. Simulation Research on
Networked Control System Based on Truetime [J]. Control
Engineering of China, 2008, 15(5):501-503
[2] Sun J .M., Deng W., Li L.P., et al. Matlab based Simulation
Platform for Networked Control System[J ]. Process
Automation Instrumentation, 2010,31(3):19-22
[3] Yin Y., Li S.F., Wang J .H.. Research on Adaptive Fuzzy
PID Control Method For Networked Control Systems[J ].
J ournal of Wuhan University of Technology,
2010,32(6):144-148
[4] Peng D.G., Zhang H., Yang P.. The Boiler-Turbine
Coordinated Control System Based on Immune Feedback
Mechanism[C]. Proceedings of the 6th International
Conference on Machine Learning and Cybernetics, August
19-22, 2007, pp:449-453
[5] Fei C.G., Li C.G., Zhang Q.Z., et al. Simulation of
Adaptive DMC Algorithm in Networked Control
Systems[J ]. J ournal of System Simulation,
2008,20(1):65-67



Daogang Peng received the BS degree in
Control Theory and Control Engineering
from North China Electric Power
University, China in 2004, and Ph.D.
degree in System Engineering from
Tongji University in 2009. He is
currently an Associate Professor in the
School of Electric Power and Automation
Engineering at Shanghai University of
Electric Power and a post-doctor in the
School of Information Science and Engineering at East China
University of Science and Technology. His main research
interests include networked control system, intelligent control,
embedded system, industrial Ethernet, etc.


Hao Zhang received the BS degree from Xian J iaotong
University, China in 1987, and Ph.D. degree from Shanghai
J iaotong University in 1990. He is currently a Professor and
vice president at Shanghai University of Electric Power. His
main research interests include electrical power system
automation, industrial Ethernet, systems engineering, etc.


JOURNAL OF NETWORKS, VOL. 6, NO. 6, JUNE 2011 915
2011 ACADEMY PUBLISHER

You might also like