Top Banner
2007 IEEE International Conference on Control and Automation ThBP-23 Guangzhou, CHINA - May 30 to June 1, 2007 Design and Realization of Embedded General Intelligent Controller Based on Microprocessor with ARM Core Qian Zhang 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 non- linearity, 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 Qiusheng Zheng, Guoqiang Wang ZhongYuan Institute of Technology Zhengzhou, China zmysl63d4163.com microprocessors to meet market demand. Today, ARM microprocessors share about 75% in application market of 32- bit 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. 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 1469 1-4244-0818-0/07/$20.00 2007 IEEE
5
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: design

2007 IEEE International Conference on Control and Automation ThBP-23Guangzhou, CHINA - May 30 to June 1, 2007

Design and Realization of Embedded GeneralIntelligent Controller Based on Microprocessor with

ARM Core

Qian ZhangZhongYuan Institute of Technology

Zhengzhou, Chinazqwylwi@ 163.com

Abstract The realization method of designing a sort of controllerbased on microprocessor with ARM core was discussed in thispaper, and the project of adopting intelligent control algorithmlibrary as control strategy of embedded intelligent controller wasproposed, a kind of improved single NN-PID control algorithmand a human-simulation intelligent control algorithm were given,too. The hardware circuit and structure of system softwareensure the controller general and advanced, which make it tohave broad application prospect in the industry of processcontrol.

Keywords- intelligent controller; embedded system; ARMmicroprocessor

I. INTRODUCTIONAccording to the definition of embedded system by

Institute of Electrical and Electronics Engineers (IEEE),embedded controllers have been widely applied in industryprocess control systems, such as digital adjustor, programmablelogical controller and so on. Although, the embedded deviceshave applied well in industry practice, there exist numbers ofshortages in some application occasions, for example, thecontrol effect is difficult to meet system requirement when thecontrolled objects have the following questions, such as non-linearity, time-varying property, randomicity brought bycomplicated working conditions and so on; embedded devicesmust cooperate with host computer to compose the controlsystem when composing industry control network or needinggraph processing, thus, the cost of system will increase andperformance price ratio will decrease. So the rapiddevelopment of computer and LSI technique make it possiblethat high-dependability and high performance price ratiogeneral embedded intelligent controller based on 32-bitmicroprocessor with ARM core meets the control systemrequirement.

II. MICROPROCESSOR WITH ARM COREARM is the shortened form of Advanced RISC Machines,

which can be considered the name of a company as well as thegeneral call of a kind of microprocessors, also the name of atechnique. ARM Company comes into existence in Cambridgein 1991, which mostly sales the authorization of chip designtechnique at present. After the 32-bit microprocessors basedon ARM are push to market, almost big semiconductorcompanies in world buy in succession the ARMmicroprocessor kernel designed by ARM Company, and thenthey add corresponding periphery circuits according to theirdifferent application fields to compose their own ARM

Qiusheng Zheng, Guoqiang WangZhongYuan Institute of Technology

Zhengzhou, Chinazmysl63d4163.com

microprocessors to meet market demand. Today, ARMmicroprocessors share about 75% in application market of 32-bit microprocessor [1]. The advantages, such as low energyconsumption, high performance, low cost and so on, makeARM microprocessors occupy leading role in the applicationof embedded system. And ARM microprocessor providesextended 16-bit/32-bit double instruction sets.

In the paper, the design adopts ARM microprocessor chipS3C44B0 of Samsung Company, and the chip, based onARM7TDMI structure, has high work efficiency up to 60MHZand all kinds of general interfaces, furthermore, it providesindependent and powerful Ethernet controller especially, whichis very adapt to act as the bottom controller in industry Ethernetsystems.

III. GENERAL EMBEDDED INTELLIGENT CONTROLLER

Intelligent controller can be composed when introducingintelligent control algorithm based on intelligent controltheory into the control strategy of digital controller. In order tomake intelligent controller apply to as many controlled objectsas possible, different control strategies are designed with theanalysis method of intelligent control theory according to thedynamic characteristics of different kinds of objects tocompose a intelligent algorithm library, when in applicationthe algorithms are chosen automatically or by human, in thisway, different objects all can be controlled well. And theintelligent controller with intelligent algorithm library isdefined as general embedded intelligent controller [2].

The more powerful intelligent control algorithm library canbe composed if a 32-bit microprocessor with ARM core acts asthe core of general embedded intelligent controller; because theoperation speed can be increased greatly, more complicatedcalculations can be accomplished within appropriate time. Andalso, adding real-time operating system into the softwaresystem of controller makes it more easily to realize the networkfunction of the controller to compose remote monitoringsystem, therefore, which makes the applicability of thecontroller wider.

IV. THE DESIGN OF CONTROLLER PROJECT

The hardware of general controller is composed of inputchannel, output channel, computer and its correspondingextended circuit, the structure composition is indicated inFig. 1.

The controlled parameters from industry spots are converted

1469

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

Page 2: design

to standard electricity signals by transmitters, then inputchannel transmits the standard signals to computer with fullsignal and full scale, and all signals can be input directly, forexample, thermocouple B,E,J,K,S,T,R,N, Re5226,WRe3225;thermal resistance Pt100,Cu50, JPtl00; and electricity signals0-5V,1-5V,0-lOmA,4-20mA etc.

The controller receives the signal which is the real valuemeasured by sensor from industry spot, and compares it withdesired value. Depending on the comparison, the controllerchooses the control strategy to dispose the deviation, andoutput channel converts the disposed result to standardelectricity signal (4-2OmA, 1-5V) to transmit to final controlelement.

IrqXn 0dp1A MemoirModel Model

PeripheralInternet EquipmentsNtetwork | 3C44BO Conrtruiucation

Model ARBMTDMI Model

Keyboard| DisplayInput Model Model

Figure 1. The structure drawing of embedded controller.

Computer and its corresponding extended circuits consist ofembedded microprocessor S3C44B0, the circuits composed ofintegrated chip and electronic components which is needed byhuman-machine interface, such as keyboard operation circuit,LCD display circuit, alarm circuit, network communicationinterface circuit, and the controller is accessed to Ethernet bynetwork chip RTL8019AS. Computer collects data, calculatescontrol algorithm, disposes data, sends out control result,accomplishes all tasks required by consumer cooperated withother circuits.

The main work process of system software in generalembedded intelligent controller is as follows: first, the workparameter is set according to demand of spot or remoteness andthe spot signal is collected in real time; then depending on thecomparison of real value with desired value, the controllerchooses the control strategy to calculate the deviation;subsequently, the disposed result is converted to real operationquantity by controller to be transmitted to final control elementby output channel; at the same time, the parameters aredisplayed, alarmed and communicated according to demandand spot conditions; and the above-mentioned process iscircular. The system software consist of three parts: human-machine interface, real-time control and data disposing,establishing intelligent control algorithm and realizing remotemonitoring and control are the characteristic of the softwaredesign compared to conventional controllers.

V. THE REALIZATION OF DYNAMIC WEB

In the designing of controller software, except the maincontrol part, control algorithm library, it also involvesreducing the kernel of embedded real-time operating systemuClinux, the transplanting of embedded software Web ServerBOA, serial interface driver, LCD display driver and thedesign of CGI gateway.

There are different Web servers in uClinux, and BOA Webserver which supports general gateway interface CGI is chosenaccording to demand of functions. The dynamic Web serverwith BOA has powerful universality, the primary test resultindicates: BOA can accept the click rate of hundreds of timesper second and run with high efficiency in embedded flat,which has good application prospect.

CGI is the standard interface of server host-computer toexternal. CGI program can be executed in real time and outputdynamic information. Now there are four popular CGIprogram languages: C, shell, Perl and Visual Basic, and in thedesign, 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 itslocation should be considered also, start-up script should bemodified according to design demand [3, 4].VI. IDEA OF ALGORITHM LIBRARY AND ITS APPLICATIONS

The control algorithm is most important in real-time controlat the point of universality, only if we chose the most usefulcontrol strategy according to different controlled objects, thegood control effect can be obtained, because the real industryprocesses are various, which is just the idea of controlalgorithm library. Therefore, whether the performance of anintelligent controller is good is mainly decided by itsperformance of control algorithm. As we know, any intelligentcontrol algorithm has its limitation, and its suitable object iscertain. If we want to design a more powerful intelligentcontroller with broad extension of adaptability, according tothe idea of dynamic model library, we could integrate differentkinds of intelligent control algorithm to construct anintelligent algorithm library. While designing the software ofintelligent controller, we can use the intelligent algorithmlibrary. Definitely, it can greatly improve the performance ofintelligent controller.

A. The Composition ofAlgorithm LibraryAt present, we often use digital regulator based on

microcontroller in industry, and commonly, we adopt classicalcontrol strategy---digital PID algorithm. Sometimes, we useadvanced algorithms such as fuzzy control. In a word,controller can satisfy general industrial needs, but its functionis not comprehensive. And another problem is some controllerswhich designed according to special object has a specificintelligent algorithm, so it is not universal. With thedevelopment of computer technology, the function of micro-controller is more and more powerful, and its memory space isnot restricted, so in programming, we should program variousintelligent control algorithms as much as possible so as toapply to different control object. First, through intelligentcontrol simulation process, we could give the suitable scope ofintelligent control algorithm, then we would choosecorresponding intelligent algorithm library according to theoccasion in which the intelligent controller used, and then weuse program to realize it. So, it's easy to be designed to generalintelligent controller. Our algorithm library consists of 6algorithms, including fuzzy-adaptive algorithm, variablestructure algorithm, etc. and a kind of improved single NN-PIDcontrol algorithm and a human-simulation intelligent controlalgorithm we proposed will be introduced.

1470

Page 3: design

B. A Kind ofImproved Single NN-PID ControlAlgorithmThe digital control rule of integral-separated PID

algorithm can be written as formula:

u(k)= K e(k)+KLK Ee(j)+K (e(k)- e(k -1)). (1)

Where, KL is the switch coefficient of integral item, KI, KD isthe proportion coefficient of integral item and differential itemrespectively, £ is the threshold of error item e(k). The switchcoefficient of integral item KL is

(2)II 1,(k)l < £

KL ={

O |e(k)l >£

The configuration of controller with single NN-PIDcontrol algorithm (SNIS PID ) is shown in Fig.2[5], thealgorithm is written as

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

W (k)x j(k) (3)

where W (k) W j (k)J

1W (k)l

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

r(k) e(k) state u(k) controlled y(k)-y conversion variable

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

Widrow-Hoff learning rule with tutor is used to adjust theweight coefficient of SNIS [6], and in the rule, the inputsignal is tutor signal, by means of the grads steepest descentalgorithm, weight coefficient changes with the minus gradsdirection of quadratic error according to the error of input toactual output of system to obtain the mapping of input tooutput with least trainings.

The weight coefficient of Widrow-Hoff learning rule isproportional to the error of network and the input samples, soaccording to gradient descent method, the modificationcoefficient of weight will be

1W (k)= -7 D (k) 7 anet (k) U=1,2,3). (4)

Here, we suppose

9 ==~e(k) f'(net(k))

=-an,et (k ) =-ay(k) au (k) anet (k) aueka(k)f(ntk)ane4k)

=x k

awj(k)

In formula (4), C is the learning step of single neuron, f(.) islinear activation, sof!(.)=,. In order to improve the convergencevelocity of control system, the output u(k) of single-neuronPID controller will be substituted by the actual output of

control system y(k), so we know ay(k)/1u(k)= 1 then themodification formula of weight coefficient is

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

Consequently, the adjusting weight coefficient controlalgorithm of SNIS PID controller can be written as

W I (k ) = w , (k - I ) + q , e (k )X , (k ) . (6)W 2 (k ) = W 2 (k - I ) + 3, 8 e (k )X 2 (k ) .

W 3 (k ) = W 3 (k - I ) + q D e (k )X 3 (k ) .

After state conversion, the input of single neuron is

(7)(8)

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

When the coefficient K is low, the convergence velocity isnot very satisfied according to the above algorithm, therefore,the improved adjusting weight coefficient control algorithm ofSNIS PID controller is given

W I (k)= WI (k - 1)+77,pAe(k)X I (k)(I1- cr)+oc 77p Aie(k - 1I)Xl (k).

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 learningspeeds are different, the parameters can be adjusted onlineaccording to their different weight coefficients, ac ismomentum factor. Here, the correction information alongminus grads direction not only at current moment but also atcurrent moment is included into weight coefficient with theintroduction of ac item. This is useful to restrain the localextremum and oscillation in learning process of weightcoefficient, but the introduction of ac item is damp itemvirtually, so correction factor A(i>0) is introduced to improveconvergence velocity of long time-delayed system.

The selection of neuron proportion coefficient K and )X isimportant, the higher K and )X are, the faster the system are, butthe overshooting will increase and even the system maybecome not steady. Therefore, K and )X must be decreasedalong with the increasing of pure delay time to make sure thesystem is steady, vice versa, too low K and )X will make thecharacter of fastness bad.

Based on the analysis above, the calculation steps ofimproved SNIS PID control algorithm are as Fig. 3:

1) The initializations of all weight coefficients of singleneuron inputs is minimum random, and the initializations ofcontrol variable, output and error are zero, then the momentumfactor, corrector factor and the learning steps of proportion,integral and differential are set to appropriate values, at thesame time, the switch coefficient of integral item and thecontrol range of error £ are set.

1471

Page 4: design

2) Sample control system and obtain y (k), then calculatee(k), e(k)=r(k)-y(k), if e(k) <&, the switch coefficient ofintegral item equals 1, or else the coefficient is zero;

3) Input signal acts as tutor signal, and adjust the weightcoefficients of all input components of single neuron networkaccording 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 canbe chose to the initial value of M1,

Kp: proportion coefficient;Ki: adaptive coefficient.

The rules of the human-simulation intelligent controlalgorithm are summarized referring to the processes of humancontrolling the actuator by hands, and the idea of the algorithmis similar in theory to intelligent PI control. The key ofrealizing the intelligent algorithm is how to determine thevalues of Ki and M1 by means of adaptive method. The originalvalues of Ki and M1 are determined by parameters setting infirst commissioning and then regulated by the variety ofovershooting and regulation time in running, the calculation ofovershooting and regulation time is included into controlprograms. For example, when overshooting is trending toincrease, Ki should be increased or M1 should be decreasedproperly until the overshooting and regulation time satisfiedthe desired value.

TABLE I. CONTROL REGULAR

A E.>OEn>Ml Rule 1

M2<=En<=Ml Rule 1

M3<=En<=Ml Rule 2

O<E.<=M3 Rule 3

E0=O Rule 4

-M3<=En<O Rule 5

-M2<=En<-M3 Rule 6

-M1<=E.<-M2 Rule 7

A E=O A En<O

Rule 1 Rule 2

Rule 2 Rule 3

Rule 3 Rule 4

Rule 4 Rule 5

Rule 5 Rule 6

Rule 6 Rule 7

Rule 7 Rule 8

Rule 8 Rule 9

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

C. A Human-Simulation Intelligent Control AlgorithmThere are many complicated processes difficult to be

controlled automatically in practice, but they can be operatedby experienced operators, skilled workers or experts to gainsatisfactory control effects, and if the human controlexperiences are expressed with control rules, which is calledhuman-simulation intelligent control. The intelligent algorithmwith nine rules in temperature control is given [7], and thesimulation results show that system has good robustness. Thecalculating formulas are written as follow:

Rule 1: Yn=YmaxRule 2: Yn=Yn-1+Ki*Kp*lERule 3: Yn=yn-1+Kp*lEnRule 4: Y =Yn 1+EnRule 5: Yn=Yn1Rule 6: Yn=Yn 1-EnRule 7: Yn=Yn-1-Kp*lEnRule 8: Yn=Yn-1-Ki*Kp*lERule 9: Y =Y

The method of choosing corresponding control rulesaccording to the error En and the variety rate of error AEnattained 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 I M21 M3: the interval value of error;

D. Application points of algorithm libraryUnder the same channel structure condition, the more

intelligent control algorithm library contents, the stronger thecorresponding intelligent controller's versatility is. Althoughthe algorithm library contents a lot, but regarding a concretecontrolled process, according to the structure of the systemcomposition, in the automatic control movement process, weoften use one, two or three kinds of concrete controlsalgorithms. For example, the single circle system only needsone algorithm, but the typical cascade control system needstwo algorithms, in which, the inner loop is a servo systemneeding rapid control, so proportion algorithm is enough; theouter loop is a fixed-value system, the algorithm should bechosen according to real conditions. Therefore, in the generalintelligent controller programming, we must consider thechoosing question of the control algorithm. There are twoways to choose algorithm: one is to carry on through theintelligent controller man-machine interface before the systemstart, and to manually choose the algorithms by the systemoperator according to the algorithm library's concrete contentsas well as the controlled process characteristics; the other is toselect a more reasonable algorithm automatically by thecomputer through the program in the algorithm library in thecontrolled system movement process, according to the systemmovement's actual effect. Regardless of which way, it takes allkinds of the intelligent control algorithms' simulation results inthe model library as the main basis, then finally determineswhich to be chosen combining with the actual movement

1472

Page 5: design

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

VII. CONCLUSION

The control effect of the embedded general intelligentcontroller mentioned in the paper has been validated in atemperature control system, and the results are as follows: themaximal error is 0.5°C, overshooting is less than 2% andregulation time less than 10 minutes, which meets the demandof performance index completely. When changing thestructure parameters (altering the closing degree of heatingfurnace' door) or increasing interferences (altering thediameter of intake), the control effect is still satisfactory aftershort-time running, this indicates that the robustness of thealgorithm is very well.

Powerful ARM microprocessor combining with advancedintelligent control theory gives digital controller a new life. Atthe point of demand, the embedded general intelligentcontroller will have broad application prospect in themechanical industry, textile industry, light industry, chemicalindustry etc.

REFERENCES

[1] Y.Li, Pricinple and Appliacation of Embedded uCLinux Based onS3C44BOX, Beijing: TsingHua University Press, 2005.

[2] Q. Zhang, "Embedded system and design of embedded intelligentcontroller," Journal of Zhongyuan Institute of Technology, pp.4-7, April2005.

[3] G.-M.Liu, and P.-A.Zheng, "Implementation of dynamic webtechnology under uClinux," Microcontrollers & Embedded Systems,pp.67-69,February 2004.

[4] D.Chen, C.-W.Peng, and H.-H.Hu,"The Design of embedded automaticbiochemistry analyzer control system model based on ARM7 anduCliunx," Electronics Quality, pp.3-5, November 2005.

[5] J.-K. Liu, Advanced PID Control and MATLAB Simulation (2nd ed.),Beijing: Publishing House of Electronics Industry, 2004.

[6] G.-Y. Li, Intelligent Control and Its Realization with MATLAB, Beijing:Publishing House of Electronics Industry, 2005.

[7] Q. Zhang, Y. Wang and L. Wang, "The simulation method of intelligentcontrol based on dynamic models library and its application,"Proceedings of 2006 International Conference on ArtificialIntelligence-50 Years' Achievements, Future Directions and SocialImpacts, Beijing, China, pp.542-546,August 2006.

1473