You are on page 1of 5

ThBP-23

2007 IEEE International Conference on Control and Automation


Guangzhou, CHINA - May 30 to June 1, 2007

Design and Realization of Embedded General


Intelligent Controller Based on Microprocessor with
ARM Core
Qian Zhang

Qiusheng Zheng, Guoqiang Wang

ZhongYuan Institute of Technology


Zhengzhou, China
zqwylwi@ 163.com
Abstract The realization method of designing a sort of controller
based on microprocessor with ARM core was discussed in this
paper, and the project of adopting intelligent control algorithm
library as control strategy of embedded intelligent controller was
proposed, a kind of improved single NN-PID control algorithm
and a human-simulation intelligent control algorithm were given,
too. The hardware circuit and structure of system software
ensure the controller general and advanced, which make it to
have broad application prospect in the industry of process
control.

Keywords- intelligent controller; embedded system; ARM


microprocessor

I.
INTRODUCTION
According to the definition of embedded system by
Institute of Electrical and Electronics Engineers (IEEE),
embedded controllers have been widely applied in industry
process control systems, such as digital adjustor, programmable
logical controller and so on. Although, the embedded devices
have applied well in industry practice, there exist numbers of
shortages in some application occasions, for example, the
control effect is difficult to meet system requirement when the
controlled objects have the following questions, such as nonlinearity, time-varying property, randomicity brought by
complicated working conditions and so on; embedded devices
must cooperate with host computer to compose the control
system when composing industry control network or needing
graph processing, thus, the cost of system will increase and
performance price ratio will decrease. So the rapid
development of computer and LSI technique make it possible
that high-dependability and high performance price ratio
general embedded intelligent controller based on 32-bit
microprocessor with ARM core meets the control system
requirement.

II. MICROPROCESSOR WITH ARM CORE


ARM is the shortened form of Advanced RISC Machines,
which can be considered the name of a company as well as the
general call of a kind of microprocessors, also the name of a
technique. ARM Company comes into existence in Cambridge
in 1991, which mostly sales the authorization of chip design
technique at present. After the 32-bit microprocessors based
on ARM are push to market, almost big semiconductor
companies in world buy in succession the ARM
microprocessor kernel designed by ARM Company, and then
they add corresponding periphery circuits according to their
different application fields to compose their own ARM

ZhongYuan Institute of Technology


Zhengzhou, China
zmysl63d4163.com

microprocessors to meet market demand. Today, ARM


microprocessors share about 75% in application market of 32bit microprocessor [1]. The advantages, such as low energy
consumption, high performance, low cost and so on, make
ARM microprocessors occupy leading role in the application
of embedded system. And ARM microprocessor provides
extended 16-bit/32-bit double instruction sets.
In the paper, the design adopts ARM microprocessor chip
S3C44B0 of Samsung Company, and the chip, based on
ARM7TDMI structure, has high work efficiency up to 60MHZ
and all kinds of general interfaces, furthermore, it provides
independent and powerful Ethernet controller especially, which
is very adapt to act as the bottom controller in industry Ethernet
systems.
III. GENERAL EMBEDDED INTELLIGENT CONTROLLER
Intelligent controller can be composed when introducing
intelligent control algorithm based on intelligent control
theory into the control strategy of digital controller. In order to
make intelligent controller apply to as many controlled objects
as possible, different control strategies are designed with the
analysis method of intelligent control theory according to the
dynamic characteristics of different kinds of objects to
compose a intelligent algorithm library, when in application
the algorithms are chosen automatically or by human, in this
way, different objects all can be controlled well. And the
intelligent controller with intelligent algorithm library is
defined as general embedded intelligent controller [2].
The more powerful intelligent control algorithm library can
be composed if a 32-bit microprocessor with ARM core acts as
the core of general embedded intelligent controller; because the
operation speed can be increased greatly, more complicated
calculations can be accomplished within appropriate time. And
also, adding real-time operating system into the software
system of controller makes it more easily to realize the network
function of the controller to compose remote monitoring
system, therefore, which makes the applicability of the
controller wider.

IV.

1469

1-4244-0818-0/07/$20.00 ( 2007 IEEE

THE DESIGN OF CONTROLLER PROJECT

The hardware of general controller is composed of input


channel, output channel, computer and its corresponding
extended circuit, the structure composition is indicated in
Fig. 1.
The controlled parameters from industry spots are converted

to standard electricity signals by transmitters, then input


channel transmits the standard signals to computer with full
signal and full scale, and all signals can be input directly, for
example, thermocouple B,E,J,K,S,T,R,N, Re5226,WRe3225;
thermal resistance Pt100,Cu50, JPtl00; and electricity signals
0-5V,1-5V,0-lOmA,4-20mA etc.
The controller receives the signal which is the real value
measured by sensor from industry spot, and compares it with
desired value. Depending on the comparison, the controller
chooses the control strategy to dispose the deviation, and
output channel converts the disposed result to standard
electricity signal (4-2OmA, 1-5V) to transmit to final control
element.

IrqXn 0dp1A Memoir


Model

Internet

Ntetwork |

Model

Model

3C44BO

ARBMTDMI

Keyboard|

Input Model

Peripheral

Conrtruiucation Equipments
Model

Display
Model

Figure 1. The structure drawing of embedded controller.

Computer and its corresponding extended circuits consist of


embedded microprocessor S3C44B0, the circuits composed of
integrated chip and electronic components which is needed by
human-machine interface, such as keyboard operation circuit,
LCD display circuit, alarm circuit, network communication
interface circuit, and the controller is accessed to Ethernet by
network chip RTL8019AS. Computer collects data, calculates
control algorithm, disposes data, sends out control result,
accomplishes all tasks required by consumer cooperated with
other circuits.
The main work process of system software in general
embedded intelligent controller is as follows: first, the work
parameter is set according to demand of spot or remoteness and
the spot signal is collected in real time; then depending on the
comparison of real value with desired value, the controller
chooses the control strategy to calculate the deviation;
subsequently, the disposed result is converted to real operation
quantity by controller to be transmitted to final control element
by output channel; at the same time, the parameters are
displayed, alarmed and communicated according to demand
and spot conditions; and the above-mentioned process is
circular. The system software consist of three parts: humanmachine interface, real-time control and data disposing,
establishing intelligent control algorithm and realizing remote
monitoring and control are the characteristic of the software
design compared to conventional controllers.
V.

THE REALIZATION OF DYNAMIC WEB

In the designing of controller software, except the main


control part, control algorithm library, it also involves
reducing the kernel of embedded real-time operating system
uClinux, the transplanting of embedded software Web Server
BOA, serial interface driver, LCD display driver and the
design of CGI gateway.

1470

There are different Web servers in uClinux, and BOA Web


server which supports general gateway interface CGI is chosen
according to demand of functions. The dynamic Web server
with BOA has powerful universality, the primary test result
indicates: BOA can accept the click rate of hundreds of times
per second and run with high efficiency in embedded flat,
which has good application prospect.
CGI is the standard interface of server host-computer to
external. CGI program can be executed in real time and output
dynamic information. Now there are four popular CGI
program languages: C, shell, Perl and Visual Basic, and in the
design, our CGI program is written by C.
Dynamic Web server can be realized by transplanting BOA,
and the file boa.conf need to be modified, CGI file and its
location should be considered also, start-up script should be
modified according to design demand [3, 4].
VI. IDEA OF ALGORITHM LIBRARY AND ITS APPLICATIONS
The control algorithm is most important in real-time control
at the point of universality, only if we chose the most useful
control strategy according to different controlled objects, the
good control effect can be obtained, because the real industry
processes are various, which is just the idea of control
algorithm library. Therefore, whether the performance of an
intelligent controller is good is mainly decided by its
performance of control algorithm. As we know, any intelligent
control algorithm has its limitation, and its suitable object is
certain. If we want to design a more powerful intelligent
controller with broad extension of adaptability, according to
the idea of dynamic model library, we could integrate different
kinds of intelligent control algorithm to construct an
intelligent algorithm library. While designing the software of
intelligent controller, we can use the intelligent algorithm
library. Definitely, it can greatly improve the performance of
intelligent controller.
A. The Composition ofAlgorithm Library
At present, we often use digital regulator based on
microcontroller in industry, and commonly, we adopt classical
control strategy---digital PID algorithm. Sometimes, we use
advanced algorithms such as fuzzy control. In a word,
controller can satisfy general industrial needs, but its function
is not comprehensive. And another problem is some controllers
which designed according to special object has a specific
intelligent algorithm, so it is not universal. With the
development of computer technology, the function of microcontroller is more and more powerful, and its memory space is
not restricted, so in programming, we should program various
intelligent control algorithms as much as possible so as to
apply to different control object. First, through intelligent
control simulation process, we could give the suitable scope of
intelligent control algorithm, then we would choose
corresponding intelligent algorithm library according to the
occasion in which the intelligent controller used, and then we
use program to realize it. So, it's easy to be designed to general
intelligent controller. Our algorithm library consists of 6
algorithms, including fuzzy-adaptive algorithm, variable
structure algorithm, etc. and a kind of improved single NN-PID
control algorithm and a human-simulation intelligent control
algorithm we proposed will be introduced.

B. A Kind ofImproved Single NN-PID ControlAlgorithm


The digital control rule of integral-separated PID
algorithm can be written as formula:
(1)
u(k)= K e(k)+KL K Ee(j)+K (e(k)- e(k -1)).

control system y(k), so we know ay(k)/1u(k)= 1


modification formula of weight coefficient is

Where, KL is the switch coefficient of integral item, KI, KD is


the proportion coefficient of integral item and differential item
respectively, is the threshold of error item e(k). The switch
coefficient of integral item KL is

Consequently, the adjusting weight coefficient control


algorithm of SNIS PID controller can be written as
W I (k ) = w , (k - I ) + q , e (k )X , (k ) .
(6)
I ) + , 83e (k ) X 2 (k ) .
W 2 (k ) = W 2 (k
(7)

then the

AW X (k) = t7i x (k) = 7'e(k)Xj (k).

(5)

II

1,(k)l <

(2)

KL ={

|e(k)l >

The configuration of controller with single NN-PID


control algorithm (SNIS PID ) is shown in Fig.2[5], the
algorithm is written as

u(k)= u(k -])+K


where

(k)x j(k)

(3)

W j (k)

W (k)
J

(k)l

1W

u(k)

state
conversion

controlled y(k)
variable

Widrow-Hoff learning rule with tutor is used to adjust the


weight coefficient of SNIS [6], and in the rule, the input
signal is tutor signal, by means of the grads steepest descent
algorithm, weight coefficient changes with the minus grads
direction of quadratic error according to the error of input to
actual output of system to obtain the mapping of input to
output with least trainings.
The weight coefficient of Widrow-Hoff learning rule is
proportional to the error of network and the input samples, so
according to gradient descent method, the modification
coefficient of weight will be
(k)

anet (k) U=1,2,3).

(4)

Here, we suppose
9
=-an,et (k ) =-ay (k) au (k) anet (k)
=

ane4k)

awj(k)

=x

I ) + q D e (k ) X 3 (k ) .

After state conversion, the input of single neuron is


X1 (k) = e(k) - e(k -1);
X2 (k) = e(k);
X3 (k) = e(k) - 2e(k -1) + e(k - 2)

~e(k) au f '(net (k))


eka(k)f(ntk)

In formula (4), C is the learning step of single neuron, f(.) is


linear activation, sof!(.)=,. In order to improve the convergence
velocity of control system, the output u(k) of single-neuron
PID controller will be substituted by the actual output of

(8)

When the coefficient K is low, the convergence velocity is


not very satisfied according to the above algorithm, therefore,
the improved adjusting weight coefficient control algorithm of
SNIS PID controller is given

(k).

Figure 2. Configuration of single-neuron integral-separated PID control.

1W (k)= -7 D

(k ) = W 3 (k

W I (k)= WI (k - 1)+77,pAe(k)X I (k)(I1- cr)+


oc 77p Aie(k - 1I)Xl

K is proportion coefficient of single neuron (K>O).


r(k) e(k)
-y

W2(k)= W2(k- 1)+7I7A,e(k)X2(k)(1- a)+


a 7I7 A e(k -1)X 2 (k).
W3(k)= W3(k -1)+7De(k)X3(k)(1 -a)A +

ax)De(k -)X3(k)2A.

(9)
(10)

(11)

Where flp , llI liD iS the learning step of proportion,


integral and differential respectively, because their learning
speeds are different, the parameters can be adjusted online
according to their different weight coefficients, ac is
momentum factor. Here, the correction information along
minus grads direction not only at current moment but also at
current moment is included into weight coefficient with the
introduction of ac item. This is useful to restrain the local
extremum and oscillation in learning process of weight
coefficient, but the introduction of ac item is damp item
virtually, so correction factor A(i>0) is introduced to improve
convergence velocity of long time-delayed system.
The selection of neuron proportion coefficient K and )X is
important, the higher K and )X are, the faster the system are, but
the overshooting will increase and even the system may
become not steady. Therefore, K and )X must be decreased
along with the increasing of pure delay time to make sure the
system is steady, vice versa, too low K and )X will make the
character of fastness bad.
Based on the analysis above, the calculation steps of
improved SNIS PID control algorithm are as Fig. 3:
1) The initializations of all weight coefficients of single
neuron inputs is minimum random, and the initializations of
control variable, output and error are zero, then the momentum
factor, corrector factor and the learning steps of proportion,
integral and differential are set to appropriate values, at the
same time, the switch coefficient of integral item and the
control range of error are set.

1471

2) Sample control system and obtain y (k), then calculate


e(k), e(k)=r(k)-y(k), if e(k) <&, the switch coefficient of
integral item equals 1, or else the coefficient is zero;
3) Input signal acts as tutor signal, and adjust the weight
coefficients of all input components of single neuron network
according to error e(k) in terms of formula (9),(10) and (11),
then calculate the output u(k) of controller;
4) Circulate till error fulfills the control requirement.

M1=2M2, M2=2M3, the 20% or 30% of steady value can


be chose to the initial value of M1,
Kp: proportion coefficient;
Ki: adaptive coefficient.
The rules of the human-simulation intelligent control
algorithm are summarized referring to the processes of human
controlling the actuator by hands, and the idea of the algorithm
is similar in theory to intelligent PI control. The key of
realizing the intelligent algorithm is how to determine the
values of Ki and M1 by means of adaptive method. The original
values of Ki and M1 are determined by parameters setting in
first commissioning and then regulated by the variety of
overshooting and regulation time in running, the calculation of
overshooting and regulation time is included into control
programs. For example, when overshooting is trending to
increase, Ki should be increased or M1 should be decreased
properly until the overshooting and regulation time satisfied
the desired value.
TABLE I.
A E.>O

A E=O

Rule 1

Rule 1

A En<O
Rule 2

Rule 1
Rule 2

Rule 2
Rule 3

Rule 3
Rule 4

O<E.<=M3

Rule 3

Rule 4

E0=O

Rule 4

Rule 5

Rule 5
Rule 6

-M3<=En<O

Rule 5

Rule 6

Rule 7

-M2<=En<-M3

Rule 6

Rule 7

Rule 8

-M1<=E.<-M2

Rule 7

Rule 8

Rule 9

En>Ml
M2<=En<=Ml

M3<=En<=Ml

Figure3. The block diagram of subprogram of improved SNIS-PID.

C. A Human-Simulation Intelligent Control Algorithm


There are many complicated processes difficult to be
controlled automatically in practice, but they can be operated
by experienced operators, skilled workers or experts to gain
satisfactory control effects, and if the human control
experiences are expressed with control rules, which is called

human-simulation intelligent control. The intelligent algorithm


with nine rules in temperature control is given [7], and the
simulation results show that system has good robustness. The
calculating formulas are written as follow:
Rule 1: Yn=Ymax
Rule 2: Yn=Yn-1+Ki*Kp*lE
Rule 3: Yn=yn-1+Kp*lEn
Rule 4: Y =Yn 1+En
Rule 5: Yn=Yn1
Rule 6: Yn=Yn 1-En
Rule 7: Yn=Yn-1-Kp*lEn
Rule 8: Yn=Yn-1-Ki*Kp*lE
Rule 9: Y =Y
The method of choosing corresponding control rules
according to the error En and the variety rate of error AEn
attained in runming are shown in table I.
Where:
Yn: output of controller at time n;
Yn 1: output of controller at time n-1;
MI M21 M3: the interval value of error;
I

1472

CONTROL REGULAR

D. Application points of algorithm library


Under the same channel structure condition, the more

intelligent control algorithm library contents, the stronger the


corresponding intelligent controller's versatility is. Although
the algorithm library contents a lot, but regarding a concrete
controlled process, according to the structure of the system
composition, in the automatic control movement process, we
often use one, two or three kinds of concrete controls
algorithms. For example, the single circle system only needs
one algorithm, but the typical cascade control system needs
two algorithms, in which, the inner loop is a servo system
needing rapid control, so proportion algorithm is enough; the
outer loop is a fixed-value system, the algorithm should be
chosen according to real conditions. Therefore, in the general
intelligent controller programming, we must consider the
choosing question of the control algorithm. There are two
ways to choose algorithm: one is to carry on through the
intelligent controller man-machine interface before the system
start, and to manually choose the algorithms by the system
operator according to the algorithm library's concrete contents
as well as the controlled process characteristics; the other is to
select a more reasonable algorithm automatically by the
computer through the program in the algorithm library in the
controlled system movement process, according to the system
movement's actual effect. Regardless of which way, it takes all
kinds of the intelligent control algorithms' simulation results in
the model library as the main basis, then finally determines
which to be chosen combining with the actual movement

effect. In our design, the two ways above-mentioned both can


be used.
VII. CONCLUSION
The control effect of the embedded general intelligent
controller mentioned in the paper has been validated in a
temperature control system, and the results are as follows: the
maximal error is 0.5C, overshooting is less than 2% and
regulation time less than 10 minutes, which meets the demand
of performance index completely. When changing the
structure parameters (altering the closing degree of heating
furnace' door) or increasing interferences (altering the
diameter of intake), the control effect is still satisfactory after
short-time running, this indicates that the robustness of the
algorithm is very well.
Powerful ARM microprocessor combining with advanced
intelligent control theory gives digital controller a new life. At
the point of demand, the embedded general intelligent
controller will have broad application prospect in the
mechanical industry, textile industry, light industry, chemical
industry etc.

REFERENCES
[1]
[2]

[3]
[4]
[5]
[6]
[7]

Y.Li, Pricinple and Appliacation of Embedded uCLinux Based on


S3C44BOX, Beijing: TsingHua University Press, 2005.
Q. Zhang, "Embedded system and design of embedded intelligent
controller," Journal of Zhongyuan Institute of Technology, pp.4-7, April
2005.
G.-M.Liu, and P.-A.Zheng, "Implementation of dynamic web
technology under uClinux," Microcontrollers & Embedded Systems,
pp.67-69,February 2004.
D.Chen, C.-W.Peng, and H.-H.Hu,"The Design of embedded automatic
biochemistry analyzer control system model based on ARM7 and
uCliunx," Electronics Quality, pp.3-5, November 2005.
J.-K. Liu, Advanced PID Control and MATLAB Simulation (2nd ed.),
Beijing: Publishing House of Electronics Industry, 2004.
G.-Y. Li, Intelligent Control and Its Realization with MATLAB, Beijing:
Publishing House of Electronics Industry, 2005.
Q. Zhang, Y. Wang and L. Wang, "The simulation method of intelligent
control based on dynamic models library and its application,"
Proceedings of 2006 International Conference on Artificial
Intelligence-50 Years' Achievements, Future Directions and Social
Impacts, Beijing, China, pp.542-546,August 2006.

1473

You might also like